@nmshd/runtime 7.0.0-alpha.2 → 7.0.0-alpha.21

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 (233) hide show
  1. package/README.md +2 -2
  2. package/dist/ConfigHolder.d.ts +7 -0
  3. package/dist/ConfigHolder.d.ts.map +1 -0
  4. package/dist/ConfigHolder.js +14 -0
  5. package/dist/ConfigHolder.js.map +1 -0
  6. package/dist/Runtime.d.ts +2 -2
  7. package/dist/Runtime.d.ts.map +1 -1
  8. package/dist/Runtime.js +27 -17
  9. package/dist/Runtime.js.map +1 -1
  10. package/dist/buildInformation.js +5 -5
  11. package/dist/dataViews/DataViewExpander.d.ts +1 -0
  12. package/dist/dataViews/DataViewExpander.d.ts.map +1 -1
  13. package/dist/dataViews/DataViewExpander.js +81 -149
  14. package/dist/dataViews/DataViewExpander.js.map +1 -1
  15. package/dist/dataViews/consumption/index.d.ts +0 -1
  16. package/dist/dataViews/consumption/index.d.ts.map +1 -1
  17. package/dist/dataViews/consumption/index.js +0 -1
  18. package/dist/dataViews/consumption/index.js.map +1 -1
  19. package/dist/dataViews/content/AttributeDVOs.d.ts +0 -2
  20. package/dist/dataViews/content/AttributeDVOs.d.ts.map +1 -1
  21. package/dist/dataViews/content/RequestItemDVOs.d.ts +13 -3
  22. package/dist/dataViews/content/RequestItemDVOs.d.ts.map +1 -1
  23. package/dist/dataViews/content/ResponseItemDVOs.d.ts +10 -4
  24. package/dist/dataViews/content/ResponseItemDVOs.d.ts.map +1 -1
  25. package/dist/dataViews/transport/MessageDVO.d.ts +2 -2
  26. package/dist/dataViews/transport/RelationshipDVO.d.ts +1 -0
  27. package/dist/dataViews/transport/RelationshipDVO.d.ts.map +1 -1
  28. package/dist/events/transport/MessageDeliveredEvent.js +1 -1
  29. package/dist/extensibility/facades/transport/FilesFacade.d.ts +2 -6
  30. package/dist/extensibility/facades/transport/FilesFacade.d.ts.map +1 -1
  31. package/dist/extensibility/facades/transport/FilesFacade.js +2 -14
  32. package/dist/extensibility/facades/transport/FilesFacade.js.map +1 -1
  33. package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.d.ts +4 -8
  34. package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.d.ts.map +1 -1
  35. package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.js +5 -17
  36. package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.js.map +1 -1
  37. package/dist/extensibility/facades/transport/TokensFacade.d.ts +2 -4
  38. package/dist/extensibility/facades/transport/TokensFacade.d.ts.map +1 -1
  39. package/dist/extensibility/facades/transport/TokensFacade.js +2 -8
  40. package/dist/extensibility/facades/transport/TokensFacade.js.map +1 -1
  41. package/dist/extensibility/modules/RuntimeModule.d.ts +2 -3
  42. package/dist/extensibility/modules/RuntimeModule.d.ts.map +1 -1
  43. package/dist/extensibility/modules/RuntimeModule.js +2 -4
  44. package/dist/extensibility/modules/RuntimeModule.js.map +1 -1
  45. package/dist/extensibility/modules/RuntimeModuleRegistry.d.ts +0 -1
  46. package/dist/extensibility/modules/RuntimeModuleRegistry.d.ts.map +1 -1
  47. package/dist/extensibility/modules/RuntimeModuleRegistry.js +0 -3
  48. package/dist/extensibility/modules/RuntimeModuleRegistry.js.map +1 -1
  49. package/dist/modules/DeciderModule.d.ts.map +1 -1
  50. package/dist/modules/DeciderModule.js +3 -5
  51. package/dist/modules/DeciderModule.js.map +1 -1
  52. package/dist/modules/RequestModule.d.ts.map +1 -1
  53. package/dist/modules/RequestModule.js +18 -11
  54. package/dist/modules/RequestModule.js.map +1 -1
  55. package/dist/modules/decide/RequestConfig.d.ts +5 -18
  56. package/dist/modules/decide/RequestConfig.d.ts.map +1 -1
  57. package/dist/modules/decide/RequestConfig.js.map +1 -1
  58. package/dist/modules/decide/ResponseConfig.d.ts +1 -5
  59. package/dist/modules/decide/ResponseConfig.d.ts.map +1 -1
  60. package/dist/modules/decide/ResponseConfig.js +0 -4
  61. package/dist/modules/decide/ResponseConfig.js.map +1 -1
  62. package/dist/types/transport/FileDTO.d.ts +6 -3
  63. package/dist/types/transport/FileDTO.d.ts.map +1 -1
  64. package/dist/types/transport/MessageDTO.d.ts +1 -1
  65. package/dist/types/transport/MessageDTO.d.ts.map +1 -1
  66. package/dist/types/transport/MessageWithAttachmentsDTO.d.ts +1 -1
  67. package/dist/types/transport/MessageWithAttachmentsDTO.d.ts.map +1 -1
  68. package/dist/types/transport/PasswordProtectionDTO.d.ts +2 -0
  69. package/dist/types/transport/PasswordProtectionDTO.d.ts.map +1 -1
  70. package/dist/types/transport/RelationshipDTO.d.ts +1 -2
  71. package/dist/types/transport/RelationshipDTO.d.ts.map +1 -1
  72. package/dist/types/transport/RelationshipDTO.js.map +1 -1
  73. package/dist/types/transport/RelationshipTemplateDTO.d.ts +4 -1
  74. package/dist/types/transport/RelationshipTemplateDTO.d.ts.map +1 -1
  75. package/dist/types/transport/TokenDTO.d.ts +5 -1
  76. package/dist/types/transport/TokenDTO.d.ts.map +1 -1
  77. package/dist/useCases/common/PasswordProtectionMapper.d.ts +16 -0
  78. package/dist/useCases/common/PasswordProtectionMapper.d.ts.map +1 -0
  79. package/dist/useCases/common/PasswordProtectionMapper.js +57 -0
  80. package/dist/useCases/common/PasswordProtectionMapper.js.map +1 -0
  81. package/dist/useCases/common/RuntimeErrors.d.ts +0 -1
  82. package/dist/useCases/common/RuntimeErrors.d.ts.map +1 -1
  83. package/dist/useCases/common/RuntimeErrors.js +5 -8
  84. package/dist/useCases/common/RuntimeErrors.js.map +1 -1
  85. package/dist/useCases/common/Schemas.d.ts +1 -6
  86. package/dist/useCases/common/Schemas.d.ts.map +1 -1
  87. package/dist/useCases/common/Schemas.js +1121 -911
  88. package/dist/useCases/common/Schemas.js.map +1 -1
  89. package/dist/useCases/common/index.d.ts +1 -1
  90. package/dist/useCases/common/index.d.ts.map +1 -1
  91. package/dist/useCases/common/index.js +1 -1
  92. package/dist/useCases/common/index.js.map +1 -1
  93. package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.d.ts +2 -0
  94. package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.d.ts.map +1 -1
  95. package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.js +17 -0
  96. package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.js.map +1 -1
  97. package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts +4 -4
  98. package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts.map +1 -1
  99. package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.js +10 -1
  100. package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.js.map +1 -1
  101. package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.d.ts +0 -3
  102. package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.d.ts.map +1 -1
  103. package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.js.map +1 -1
  104. package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.d.ts +1 -3
  105. package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.d.ts.map +1 -1
  106. package/dist/useCases/consumption/attributes/CreateRepositoryAttribute.js.map +1 -1
  107. package/dist/useCases/consumption/attributes/GetAttributes.d.ts +0 -3
  108. package/dist/useCases/consumption/attributes/GetAttributes.d.ts.map +1 -1
  109. package/dist/useCases/consumption/attributes/GetAttributes.js +1 -26
  110. package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
  111. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts +0 -3
  112. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts.map +1 -1
  113. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js +1 -1
  114. package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js.map +1 -1
  115. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts +0 -3
  116. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts.map +1 -1
  117. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js +1 -1
  118. package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js.map +1 -1
  119. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.d.ts +0 -2
  120. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.d.ts.map +1 -1
  121. package/dist/useCases/consumption/attributes/GetRepositoryAttributes.js.map +1 -1
  122. package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.d.ts +0 -1
  123. package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.d.ts.map +1 -1
  124. package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.js.map +1 -1
  125. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.d.ts +1 -3
  126. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.d.ts.map +1 -1
  127. package/dist/useCases/consumption/attributes/SucceedRelationshipAttributeAndNotifyPeer.js.map +1 -1
  128. package/dist/useCases/consumption/attributes/SucceedRepositoryAttribute.d.ts +1 -3
  129. package/dist/useCases/consumption/attributes/SucceedRepositoryAttribute.d.ts.map +1 -1
  130. package/dist/useCases/consumption/attributes/SucceedRepositoryAttribute.js.map +1 -1
  131. package/dist/useCases/index.d.ts +1 -0
  132. package/dist/useCases/index.d.ts.map +1 -1
  133. package/dist/useCases/index.js +1 -0
  134. package/dist/useCases/index.js.map +1 -1
  135. package/dist/useCases/transport/account/SyncEverything.d.ts +1 -3
  136. package/dist/useCases/transport/account/SyncEverything.d.ts.map +1 -1
  137. package/dist/useCases/transport/account/SyncEverything.js +4 -9
  138. package/dist/useCases/transport/account/SyncEverything.js.map +1 -1
  139. package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.d.ts +11 -1
  140. package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.d.ts.map +1 -1
  141. package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js +2 -2
  142. package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js.map +1 -1
  143. package/dist/useCases/transport/files/CreateTokenForFile.d.ts +8 -1
  144. package/dist/useCases/transport/files/CreateTokenForFile.d.ts.map +1 -1
  145. package/dist/useCases/transport/files/CreateTokenForFile.js +2 -2
  146. package/dist/useCases/transport/files/CreateTokenForFile.js.map +1 -1
  147. package/dist/useCases/transport/files/FileMapper.d.ts.map +1 -1
  148. package/dist/useCases/transport/files/FileMapper.js +10 -3
  149. package/dist/useCases/transport/files/FileMapper.js.map +1 -1
  150. package/dist/useCases/transport/files/UploadOwnFile.d.ts +3 -1
  151. package/dist/useCases/transport/files/UploadOwnFile.d.ts.map +1 -1
  152. package/dist/useCases/transport/files/UploadOwnFile.js +10 -1
  153. package/dist/useCases/transport/files/UploadOwnFile.js.map +1 -1
  154. package/dist/useCases/transport/files/index.d.ts +0 -2
  155. package/dist/useCases/transport/files/index.d.ts.map +1 -1
  156. package/dist/useCases/transport/files/index.js +0 -2
  157. package/dist/useCases/transport/files/index.js.map +1 -1
  158. package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.d.ts.map +1 -1
  159. package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.js +4 -1
  160. package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.js.map +1 -1
  161. package/dist/useCases/transport/messages/MessageMapper.js +2 -2
  162. package/dist/useCases/transport/messages/MessageMapper.js.map +1 -1
  163. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts +8 -1
  164. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts.map +1 -1
  165. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js +1 -1
  166. package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js.map +1 -1
  167. package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.d.ts +11 -4
  168. package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.d.ts.map +1 -1
  169. package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.js +11 -10
  170. package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.js.map +1 -1
  171. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.d.ts +1 -0
  172. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.d.ts.map +1 -1
  173. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js +6 -1
  174. package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js.map +1 -1
  175. package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.d.ts.map +1 -1
  176. package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js +9 -7
  177. package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js.map +1 -1
  178. package/dist/useCases/transport/relationshipTemplates/index.d.ts +0 -2
  179. package/dist/useCases/transport/relationshipTemplates/index.d.ts.map +1 -1
  180. package/dist/useCases/transport/relationshipTemplates/index.js +0 -2
  181. package/dist/useCases/transport/relationshipTemplates/index.js.map +1 -1
  182. package/dist/useCases/transport/relationships/DecomposeRelationship.js +1 -1
  183. package/dist/useCases/transport/relationships/GetRelationships.d.ts +1 -1
  184. package/dist/useCases/transport/relationships/GetRelationships.d.ts.map +1 -1
  185. package/dist/useCases/transport/relationships/GetRelationships.js +2 -2
  186. package/dist/useCases/transport/relationships/GetRelationships.js.map +1 -1
  187. package/dist/useCases/transport/relationships/RelationshipMapper.d.ts.map +1 -1
  188. package/dist/useCases/transport/relationships/RelationshipMapper.js +1 -2
  189. package/dist/useCases/transport/relationships/RelationshipMapper.js.map +1 -1
  190. package/dist/useCases/transport/tokens/CreateOwnToken.d.ts +8 -1
  191. package/dist/useCases/transport/tokens/CreateOwnToken.d.ts.map +1 -1
  192. package/dist/useCases/transport/tokens/CreateOwnToken.js +1 -1
  193. package/dist/useCases/transport/tokens/CreateOwnToken.js.map +1 -1
  194. package/dist/useCases/transport/tokens/GetTokens.d.ts +1 -0
  195. package/dist/useCases/transport/tokens/GetTokens.d.ts.map +1 -1
  196. package/dist/useCases/transport/tokens/GetTokens.js +6 -1
  197. package/dist/useCases/transport/tokens/GetTokens.js.map +1 -1
  198. package/dist/useCases/transport/tokens/TokenMapper.d.ts.map +1 -1
  199. package/dist/useCases/transport/tokens/TokenMapper.js +12 -10
  200. package/dist/useCases/transport/tokens/TokenMapper.js.map +1 -1
  201. package/dist/useCases/transport/tokens/index.d.ts +0 -1
  202. package/dist/useCases/transport/tokens/index.d.ts.map +1 -1
  203. package/dist/useCases/transport/tokens/index.js +0 -1
  204. package/dist/useCases/transport/tokens/index.js.map +1 -1
  205. package/package.json +11 -13
  206. package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts +0 -47
  207. package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts.map +0 -1
  208. package/dist/dataViews/consumption/DecidableRequestItemDVOs.js +0 -3
  209. package/dist/dataViews/consumption/DecidableRequestItemDVOs.js.map +0 -1
  210. package/dist/useCases/common/QRCode.d.ts +0 -10
  211. package/dist/useCases/common/QRCode.d.ts.map +0 -1
  212. package/dist/useCases/common/QRCode.js +0 -55
  213. package/dist/useCases/common/QRCode.js.map +0 -1
  214. package/dist/useCases/transport/files/CreateQRCodeForFile.d.ts +0 -19
  215. package/dist/useCases/transport/files/CreateQRCodeForFile.d.ts.map +0 -1
  216. package/dist/useCases/transport/files/CreateQRCodeForFile.js +0 -51
  217. package/dist/useCases/transport/files/CreateQRCodeForFile.js.map +0 -1
  218. package/dist/useCases/transport/files/CreateTokenQRCodeForFile.d.ts +0 -29
  219. package/dist/useCases/transport/files/CreateTokenQRCodeForFile.d.ts.map +0 -1
  220. package/dist/useCases/transport/files/CreateTokenQRCodeForFile.js +0 -67
  221. package/dist/useCases/transport/files/CreateTokenQRCodeForFile.js.map +0 -1
  222. package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.d.ts +0 -19
  223. package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.d.ts.map +0 -1
  224. package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.js +0 -54
  225. package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.js.map +0 -1
  226. package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.d.ts +0 -29
  227. package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.d.ts.map +0 -1
  228. package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.js +0 -79
  229. package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.js.map +0 -1
  230. package/dist/useCases/transport/tokens/GetQRCodeForToken.d.ts +0 -19
  231. package/dist/useCases/transport/tokens/GetQRCodeForToken.d.ts.map +0 -1
  232. package/dist/useCases/transport/tokens/GetQRCodeForToken.js +0 -51
  233. package/dist/useCases/transport/tokens/GetQRCodeForToken.js.map +0 -1
@@ -2,33 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TokenMapper = void 0;
4
4
  const transport_1 = require("@nmshd/transport");
5
+ const typescript_ioc_1 = require("@nmshd/typescript-ioc");
6
+ const ConfigHolder_1 = require("../../../ConfigHolder");
5
7
  const common_1 = require("../../common");
6
8
  class TokenMapper {
7
9
  static toTokenDTO(token, ephemeral) {
8
10
  if (!token.cache) {
9
11
  throw common_1.RuntimeErrors.general.cacheEmpty(transport_1.Token, token.id.toString());
10
12
  }
11
- const reference = token.toTokenReference();
13
+ const backboneBaseUrl = typescript_ioc_1.Container.get(ConfigHolder_1.ConfigHolder).getConfig().transportLibrary.baseUrl;
14
+ const reference = token.toTokenReference(backboneBaseUrl);
12
15
  return {
13
16
  id: token.id.toString(),
17
+ isOwn: token.isOwn,
14
18
  createdBy: token.cache.createdBy.toString(),
15
19
  createdByDevice: token.cache.createdByDevice.toString(),
16
20
  content: token.cache.content.toJSON(),
17
21
  createdAt: token.cache.createdAt.toString(),
18
22
  expiresAt: token.cache.expiresAt.toString(),
19
- truncatedReference: reference.truncate(),
20
- isEphemeral: ephemeral,
21
23
  forIdentity: token.cache.forIdentity?.toString(),
22
- passwordProtection: token.passwordProtection
23
- ? {
24
- password: token.passwordProtection.password,
25
- passwordIsPin: token.passwordProtection.passwordType.startsWith("pin") ? true : undefined
26
- }
27
- : undefined
24
+ passwordProtection: common_1.PasswordProtectionMapper.toPasswordProtectionDTO(token.passwordProtection),
25
+ reference: {
26
+ truncated: reference.truncate(),
27
+ url: reference.toUrl()
28
+ },
29
+ isEphemeral: ephemeral
28
30
  };
29
31
  }
30
32
  static toTokenDTOList(tokens, ephemeral) {
31
- return tokens.map((t) => TokenMapper.toTokenDTO(t, ephemeral));
33
+ return tokens.map((t) => this.toTokenDTO(t, ephemeral));
32
34
  }
33
35
  }
34
36
  exports.TokenMapper = TokenMapper;
@@ -1 +1 @@
1
- {"version":3,"file":"TokenMapper.js","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/TokenMapper.ts"],"names":[],"mappings":";;;AAAA,gDAAyC;AAEzC,yCAA6C;AAE7C,MAAa,WAAW;IACb,MAAM,CAAC,UAAU,CAAC,KAAY,EAAE,SAAkB;QACrD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,sBAAa,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAK,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC3C,OAAO;YACH,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAE;YACvD,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YACrC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,kBAAkB,EAAE,SAAS,CAAC,QAAQ,EAAE;YACxC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,QAAQ,EAAE;YAChD,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;gBACxC,CAAC,CAAC;oBACI,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,QAAQ;oBAC3C,aAAa,EAAE,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;iBAC5F;gBACH,CAAC,CAAC,SAAS;SAClB,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,MAAe,EAAE,SAAkB;QAC5D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ;AA7BD,kCA6BC"}
1
+ {"version":3,"file":"TokenMapper.js","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/TokenMapper.ts"],"names":[],"mappings":";;;AAAA,gDAAyC;AACzC,0DAAkD;AAClD,wDAAqD;AAErD,yCAAuE;AAEvE,MAAa,WAAW;IACb,MAAM,CAAC,UAAU,CAAC,KAAY,EAAE,SAAkB;QACrD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,sBAAa,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAK,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,eAAe,GAAG,0BAAS,CAAC,GAAG,CAAe,2BAAY,CAAC,CAAC,SAAS,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC;QACvG,MAAM,SAAS,GAAG,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAE1D,OAAO;YACH,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE;YACvB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAE;YACvD,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;YACrC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,QAAQ,EAAE;YAChD,kBAAkB,EAAE,iCAAwB,CAAC,uBAAuB,CAAC,KAAK,CAAC,kBAAkB,CAAC;YAC9F,SAAS,EAAE;gBACP,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE;gBAC/B,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE;aACzB;YACD,WAAW,EAAE,SAAS;SACzB,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,MAAe,EAAE,SAAkB;QAC5D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,CAAC;CACJ;AA9BD,kCA8BC"}
@@ -1,6 +1,5 @@
1
1
  export * from "./CreateOwnToken";
2
2
  export * from "./DeleteToken";
3
- export * from "./GetQRCodeForToken";
4
3
  export * from "./GetToken";
5
4
  export * from "./GetTokens";
6
5
  export * from "./LoadPeerToken";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateOwnToken"), exports);
18
18
  __exportStar(require("./DeleteToken"), exports);
19
- __exportStar(require("./GetQRCodeForToken"), exports);
20
19
  __exportStar(require("./GetToken"), exports);
21
20
  __exportStar(require("./GetTokens"), exports);
22
21
  __exportStar(require("./LoadPeerToken"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gDAA8B;AAC9B,sDAAoC;AACpC,6CAA2B;AAC3B,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gDAA8B;AAC9B,6CAA2B;AAC3B,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B"}
package/package.json CHANGED
@@ -62,22 +62,21 @@
62
62
  "dependencies": {
63
63
  "@js-soft/docdb-querytranslator": "^1.1.5",
64
64
  "@js-soft/logging-abstractions": "^1.0.1",
65
- "@js-soft/ts-serval": "2.0.11",
65
+ "@js-soft/ts-serval": "2.0.12",
66
66
  "@js-soft/ts-utils": "^2.3.3",
67
- "@nmshd/consumption": "7.0.0-alpha.2",
68
- "@nmshd/content": "7.0.0-alpha.2",
69
- "@nmshd/core-types": "7.0.0-alpha.2",
70
- "@nmshd/crypto": "2.1.0",
71
- "@nmshd/iql": "^1.0.2",
72
- "@nmshd/transport": "7.0.0-alpha.2",
67
+ "@nmshd/consumption": "7.0.0-alpha.21",
68
+ "@nmshd/content": "7.0.0-alpha.21",
69
+ "@nmshd/core-types": "7.0.0-alpha.21",
70
+ "@nmshd/crypto": "2.1.1",
71
+ "@nmshd/iql": "^1.0.3",
72
+ "@nmshd/transport": "7.0.0-alpha.21",
73
73
  "@nmshd/typescript-ioc": "3.2.4",
74
74
  "ajv": "^8.17.1",
75
75
  "ajv-errors": "^3.0.0",
76
76
  "ajv-formats": "^3.0.1",
77
77
  "json-stringify-safe": "^5.0.1",
78
78
  "lodash": "^4.17.21",
79
- "luxon": "^3.5.0",
80
- "qrcode": "1.5.4",
79
+ "luxon": "^3.6.1",
81
80
  "reflect-metadata": "^0.2.2",
82
81
  "ts-simple-nameof": "^1.3.1"
83
82
  },
@@ -87,14 +86,13 @@
87
86
  "@js-soft/node-logger": "1.2.0",
88
87
  "@types/json-stringify-safe": "^5.0.3",
89
88
  "@types/lodash": "^4.17.16",
90
- "@types/luxon": "^3.4.2",
91
- "@types/qrcode": "^1.5.5",
92
- "ts-json-schema-generator": "2.3.0",
89
+ "@types/luxon": "^3.6.2",
90
+ "ts-json-schema-generator": "2.4.0",
93
91
  "ts-mockito": "^2.6.1"
94
92
  },
95
93
  "publishConfig": {
96
94
  "access": "public",
97
95
  "provenance": true
98
96
  },
99
- "version": "7.0.0-alpha.2"
97
+ "version": "7.0.0-alpha.21"
100
98
  }
@@ -1,47 +0,0 @@
1
- import { RequestItemDVO } from "../content";
2
- import { DraftIdentityAttributeDVO, DraftRelationshipAttributeDVO, IdentityAttributeQueryDVO, ThirdPartyRelationshipAttributeQueryDVO } from "../content/AttributeDVOs";
3
- import { LocalAttributeDVO, ProcessedAttributeQueryDVO } from "./LocalAttributeDVO";
4
- export interface DecidableRequestItemDVO extends RequestItemDVO {
5
- isDecidable: true;
6
- }
7
- export interface DecidableReadAttributeRequestItemDVO extends DecidableRequestItemDVO {
8
- type: "DecidableReadAttributeRequestItemDVO";
9
- query: ProcessedAttributeQueryDVO;
10
- }
11
- export interface DecidableProposeAttributeRequestItemDVO extends DecidableRequestItemDVO {
12
- type: "DecidableProposeAttributeRequestItemDVO";
13
- query: ProcessedAttributeQueryDVO;
14
- attribute: DraftIdentityAttributeDVO | DraftRelationshipAttributeDVO;
15
- }
16
- export interface DecidableCreateAttributeRequestItemDVO extends DecidableRequestItemDVO {
17
- type: "DecidableCreateAttributeRequestItemDVO";
18
- attribute: DraftIdentityAttributeDVO | DraftRelationshipAttributeDVO;
19
- }
20
- export interface DecidableDeleteAttributeRequestItemDVO extends DecidableRequestItemDVO {
21
- type: "DecidableDeleteAttributeRequestItemDVO";
22
- attributeId: string;
23
- attribute: LocalAttributeDVO;
24
- }
25
- export interface DecidableShareAttributeRequestItemDVO extends DecidableRequestItemDVO {
26
- type: "DecidableShareAttributeRequestItemDVO";
27
- sourceAttributeId: string;
28
- thirdPartyAddress?: string;
29
- attribute: DraftIdentityAttributeDVO;
30
- }
31
- export interface DecidableAuthenticationRequestItemDVO extends DecidableRequestItemDVO {
32
- type: "DecidableAuthenticationRequestItemDVO";
33
- }
34
- export interface DecidableConsentRequestItemDVO extends DecidableRequestItemDVO {
35
- type: "DecidableConsentRequestItemDVO";
36
- consent: string;
37
- link?: string;
38
- }
39
- export interface DecidableFreeTextRequestItemDVO extends DecidableRequestItemDVO {
40
- type: "DecidableFreeTextRequestItemDVO";
41
- freeText: string;
42
- }
43
- export interface DecidableRegisterAttributeListenerRequestItemDVO extends DecidableRequestItemDVO {
44
- type: "DecidableRegisterAttributeListenerRequestItemDVO";
45
- query: IdentityAttributeQueryDVO | ThirdPartyRelationshipAttributeQueryDVO;
46
- }
47
- //# sourceMappingURL=DecidableRequestItemDVOs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecidableRequestItemDVOs.d.ts","sourceRoot":"","sources":["../../../src/dataViews/consumption/DecidableRequestItemDVOs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,uCAAuC,EAAE,MAAM,0BAA0B,CAAC;AACxK,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEpF,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,oCAAqC,SAAQ,uBAAuB;IACjF,IAAI,EAAE,sCAAsC,CAAC;IAC7C,KAAK,EAAE,0BAA0B,CAAC;CACrC;AAED,MAAM,WAAW,uCAAwC,SAAQ,uBAAuB;IACpF,IAAI,EAAE,yCAAyC,CAAC;IAChD,KAAK,EAAE,0BAA0B,CAAC;IAClC,SAAS,EAAE,yBAAyB,GAAG,6BAA6B,CAAC;CACxE;AAED,MAAM,WAAW,sCAAuC,SAAQ,uBAAuB;IACnF,IAAI,EAAE,wCAAwC,CAAC;IAC/C,SAAS,EAAE,yBAAyB,GAAG,6BAA6B,CAAC;CACxE;AAED,MAAM,WAAW,sCAAuC,SAAQ,uBAAuB;IACnF,IAAI,EAAE,wCAAwC,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,qCAAsC,SAAQ,uBAAuB;IAClF,IAAI,EAAE,uCAAuC,CAAC;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,yBAAyB,CAAC;CACxC;AAED,MAAM,WAAW,qCAAsC,SAAQ,uBAAuB;IAClF,IAAI,EAAE,uCAAuC,CAAC;CACjD;AAED,MAAM,WAAW,8BAA+B,SAAQ,uBAAuB;IAC3E,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;IAC5E,IAAI,EAAE,iCAAiC,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gDAAiD,SAAQ,uBAAuB;IAC7F,IAAI,EAAE,kDAAkD,CAAC;IACzD,KAAK,EAAE,yBAAyB,GAAG,uCAAuC,CAAC;CAC9E"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DecidableRequestItemDVOs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DecidableRequestItemDVOs.js","sourceRoot":"","sources":["../../../src/dataViews/consumption/DecidableRequestItemDVOs.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- export declare class QRCode {
2
- private readonly base64;
3
- private constructor();
4
- asBase64(): string;
5
- static from(content: string, prefix: string): Promise<QRCode>;
6
- static forTruncateable(truncateable: {
7
- truncate(): string;
8
- }): Promise<QRCode>;
9
- }
10
- //# sourceMappingURL=QRCode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QRCode.d.ts","sourceRoot":"","sources":["../../../src/useCases/common/QRCode.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IACK,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA3C,OAAO;IAEA,QAAQ,IAAI,MAAM;WAIL,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAOtD,eAAe,CAAC,YAAY,EAAE;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAG7F"}
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.QRCode = void 0;
37
- const qrcodeLibrary = __importStar(require("qrcode"));
38
- class QRCode {
39
- constructor(base64) {
40
- this.base64 = base64;
41
- }
42
- asBase64() {
43
- return this.base64;
44
- }
45
- static async from(content, prefix) {
46
- const dataUrl = await qrcodeLibrary.toDataURL(`nmshd://${prefix}#${content}`);
47
- const base64 = dataUrl.split(",")[1];
48
- return new QRCode(base64);
49
- }
50
- static async forTruncateable(truncateable) {
51
- return await this.from(truncateable.truncate(), "tr");
52
- }
53
- }
54
- exports.QRCode = QRCode;
55
- //# sourceMappingURL=QRCode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QRCode.js","sourceRoot":"","sources":["../../../src/useCases/common/QRCode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,MAAa,MAAM;IACf,YAAqC,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEhD,QAAQ;QACX,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAe,EAAE,MAAc;QACpD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,WAAW,MAAM,IAAI,OAAO,EAAE,CAAC,CAAC;QAC9E,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAErC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,YAAoC;QACpE,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;CACJ;AAjBD,wBAiBC"}
@@ -1,19 +0,0 @@
1
- import { Result } from "@js-soft/ts-utils";
2
- import { FileController } from "@nmshd/transport";
3
- import { FileIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
4
- export interface CreateQRCodeForFileRequest {
5
- fileId: FileIdString;
6
- }
7
- export interface CreateQRCodeForFileResponse {
8
- qrCodeBytes: string;
9
- }
10
- declare class Validator extends SchemaValidator<CreateQRCodeForFileRequest> {
11
- constructor(schemaRepository: SchemaRepository);
12
- }
13
- export declare class CreateQRCodeForFileUseCase extends UseCase<CreateQRCodeForFileRequest, CreateQRCodeForFileResponse> {
14
- private readonly fileController;
15
- constructor(fileController: FileController, validator: Validator);
16
- protected executeInternal(request: CreateQRCodeForFileRequest): Promise<Result<CreateQRCodeForFileResponse>>;
17
- }
18
- export {};
19
- //# sourceMappingURL=CreateQRCodeForFile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateQRCodeForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateQRCodeForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAQ,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAyB,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/G,MAAM,WAAW,0BAA0B;IACvC,MAAM,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IACxC,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,0BAA0B,CAAC;gBACpC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IAEhG,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc,EAC/C,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;CAUrH"}
@@ -1,51 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CreateQRCodeForFileUseCase = void 0;
16
- const ts_utils_1 = require("@js-soft/ts-utils");
17
- const core_types_1 = require("@nmshd/core-types");
18
- const transport_1 = require("@nmshd/transport");
19
- const typescript_ioc_1 = require("@nmshd/typescript-ioc");
20
- const common_1 = require("../../common");
21
- let Validator = class Validator extends common_1.SchemaValidator {
22
- constructor(schemaRepository) {
23
- super(schemaRepository.getSchema("CreateQRCodeForFileRequest"));
24
- }
25
- };
26
- Validator = __decorate([
27
- __param(0, typescript_ioc_1.Inject),
28
- __metadata("design:paramtypes", [common_1.SchemaRepository])
29
- ], Validator);
30
- let CreateQRCodeForFileUseCase = class CreateQRCodeForFileUseCase extends common_1.UseCase {
31
- constructor(fileController, validator) {
32
- super(validator);
33
- this.fileController = fileController;
34
- }
35
- async executeInternal(request) {
36
- const file = await this.fileController.getFile(core_types_1.CoreId.from(request.fileId));
37
- if (!file) {
38
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.File));
39
- }
40
- const qrCode = await common_1.QRCode.forTruncateable(file);
41
- return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
42
- }
43
- };
44
- exports.CreateQRCodeForFileUseCase = CreateQRCodeForFileUseCase;
45
- exports.CreateQRCodeForFileUseCase = CreateQRCodeForFileUseCase = __decorate([
46
- __param(0, typescript_ioc_1.Inject),
47
- __param(1, typescript_ioc_1.Inject),
48
- __metadata("design:paramtypes", [transport_1.FileController,
49
- Validator])
50
- ], CreateQRCodeForFileUseCase);
51
- //# sourceMappingURL=CreateQRCodeForFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateQRCodeForFile.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateQRCodeForFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAA2C;AAC3C,gDAAwD;AACxD,0DAA+C;AAC/C,yCAA+G;AAU/G,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA2C;IAC/D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,gBAAgE;IAC5G,YAC6B,cAA8B,EAC/C,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,mBAAc,GAAd,cAAc,CAAgB;IAI3D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAmC;QAC/D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAE5E,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,gBAAI,CAAC,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAlBY,gEAA0B;qCAA1B,0BAA0B;IAE9B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADkC,0BAAc;QACpC,SAAS;GAHvB,0BAA0B,CAkBtC"}
@@ -1,29 +0,0 @@
1
- import { Result } from "@js-soft/ts-utils";
2
- import { FileController, TokenController } from "@nmshd/transport";
3
- import { AddressString, FileIdString, ISO8601DateTimeString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
4
- export interface CreateTokenQRCodeForFileRequest {
5
- fileId: FileIdString;
6
- expiresAt?: ISO8601DateTimeString;
7
- forIdentity?: AddressString;
8
- passwordProtection?: {
9
- /**
10
- * @minLength 1
11
- */
12
- password: string;
13
- passwordIsPin?: true;
14
- };
15
- }
16
- export interface CreateTokenQRCodeForFileResponse {
17
- qrCodeBytes: string;
18
- }
19
- declare class Validator extends TokenAndTemplateCreationValidator<CreateTokenQRCodeForFileRequest> {
20
- constructor(schemaRepository: SchemaRepository);
21
- }
22
- export declare class CreateTokenQRCodeForFileUseCase extends UseCase<CreateTokenQRCodeForFileRequest, CreateTokenQRCodeForFileResponse> {
23
- private readonly fileController;
24
- private readonly tokenController;
25
- constructor(fileController: FileController, tokenController: TokenController, validator: Validator);
26
- protected executeInternal(request: CreateTokenQRCodeForFileRequest): Promise<Result<CreateTokenQRCodeForFileResponse>>;
27
- }
28
- export {};
29
- //# sourceMappingURL=CreateTokenQRCodeForFile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateTokenQRCodeForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenQRCodeForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAQ,cAAc,EAA0D,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjI,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAyB,gBAAgB,EAAE,iCAAiC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvK,MAAM,WAAW,+BAA+B;IAC5C,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;KACxB,CAAC;CACL;AAED,MAAM,WAAW,gCAAgC;IAC7C,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,SAAU,SAAQ,iCAAiC,CAAC,+BAA+B,CAAC;gBAC3D,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,+BAA+B,EAAE,gCAAgC,CAAC;IAE/G,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EACjD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAAC,CAAC;CAyB/H"}
@@ -1,67 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CreateTokenQRCodeForFileUseCase = void 0;
16
- const ts_utils_1 = require("@js-soft/ts-utils");
17
- const core_types_1 = require("@nmshd/core-types");
18
- const transport_1 = require("@nmshd/transport");
19
- const typescript_ioc_1 = require("@nmshd/typescript-ioc");
20
- const common_1 = require("../../common");
21
- let Validator = class Validator extends common_1.TokenAndTemplateCreationValidator {
22
- constructor(schemaRepository) {
23
- super(schemaRepository.getSchema("CreateTokenQRCodeForFileRequest"));
24
- }
25
- };
26
- Validator = __decorate([
27
- __param(0, typescript_ioc_1.Inject),
28
- __metadata("design:paramtypes", [common_1.SchemaRepository])
29
- ], Validator);
30
- let CreateTokenQRCodeForFileUseCase = class CreateTokenQRCodeForFileUseCase extends common_1.UseCase {
31
- constructor(fileController, tokenController, validator) {
32
- super(validator);
33
- this.fileController = fileController;
34
- this.tokenController = tokenController;
35
- }
36
- async executeInternal(request) {
37
- const file = await this.fileController.getFile(core_types_1.CoreId.from(request.fileId));
38
- if (!file) {
39
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.File));
40
- }
41
- const tokenContent = transport_1.TokenContentFile.from({
42
- fileId: file.id,
43
- secretKey: file.secretKey
44
- });
45
- const defaultTokenExpiry = file.cache?.expiresAt ?? core_types_1.CoreDate.utc().add({ days: 12 });
46
- const tokenExpiry = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : defaultTokenExpiry;
47
- const token = await this.tokenController.sendToken({
48
- content: tokenContent,
49
- expiresAt: tokenExpiry,
50
- ephemeral: true,
51
- forIdentity: request.forIdentity ? core_types_1.CoreAddress.from(request.forIdentity) : undefined,
52
- passwordProtection: transport_1.PasswordProtectionCreationParameters.create(request.passwordProtection)
53
- });
54
- const qrCode = await common_1.QRCode.forTruncateable(token);
55
- return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
56
- }
57
- };
58
- exports.CreateTokenQRCodeForFileUseCase = CreateTokenQRCodeForFileUseCase;
59
- exports.CreateTokenQRCodeForFileUseCase = CreateTokenQRCodeForFileUseCase = __decorate([
60
- __param(0, typescript_ioc_1.Inject),
61
- __param(1, typescript_ioc_1.Inject),
62
- __param(2, typescript_ioc_1.Inject),
63
- __metadata("design:paramtypes", [transport_1.FileController,
64
- transport_1.TokenController,
65
- Validator])
66
- ], CreateTokenQRCodeForFileUseCase);
67
- //# sourceMappingURL=CreateTokenQRCodeForFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateTokenQRCodeForFile.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenQRCodeForFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAAkE;AAClE,gDAAiI;AACjI,0DAA+C;AAC/C,yCAAuK;AAmBvK,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,0CAAkE;IACtF,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACzE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,gBAA0E;IAC3H,YAC6B,cAA8B,EAC9B,eAAgC,EACjD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,mBAAc,GAAd,cAAc,CAAgB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;IAI7D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAwC;QACpE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAE5E,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,gBAAI,CAAC,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,YAAY,GAAG,4BAAgB,CAAC,IAAI,CAAC;YACvC,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC,CAAC;QAEH,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,EAAE,SAAS,IAAI,qBAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACrF,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,qBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC;QAC9F,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;YAC/C,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,WAAW;YACtB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,wBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;YACpF,kBAAkB,EAAE,gDAAoC,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC;SAC9F,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACnD,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAlCY,0EAA+B;0CAA/B,+BAA+B;IAEnC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFkC,0BAAc;QACb,2BAAe;QACtC,SAAS;GAJvB,+BAA+B,CAkC3C"}
@@ -1,19 +0,0 @@
1
- import { Result } from "@js-soft/ts-utils";
2
- import { RelationshipTemplateController } from "@nmshd/transport";
3
- import { RelationshipTemplateIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
4
- export interface CreateQRCodeForOwnTemplateRequest {
5
- templateId: RelationshipTemplateIdString;
6
- }
7
- declare class Validator extends SchemaValidator<CreateQRCodeForOwnTemplateRequest> {
8
- constructor(schemaRepository: SchemaRepository);
9
- }
10
- export interface CreateQRCodeForOwnTemplateResponse {
11
- qrCodeBytes: string;
12
- }
13
- export declare class CreateQRCodeForOwnTemplateUseCase extends UseCase<CreateQRCodeForOwnTemplateRequest, CreateQRCodeForOwnTemplateResponse> {
14
- private readonly templateController;
15
- constructor(templateController: RelationshipTemplateController, validator: Validator);
16
- protected executeInternal(request: CreateQRCodeForOwnTemplateRequest): Promise<Result<CreateQRCodeForOwnTemplateResponse>>;
17
- }
18
- export {};
19
- //# sourceMappingURL=CreateQRCodeForOwnRelationshipTemplate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateQRCodeForOwnRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAwB,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAExF,OAAO,EAAU,4BAA4B,EAAiB,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/H,MAAM,WAAW,iCAAiC;IAC9C,UAAU,EAAE,4BAA4B,CAAC;CAC5C;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,iCAAiC,CAAC;gBAC3C,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,MAAM,WAAW,kCAAkC;IAC/C,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,iCAAkC,SAAQ,OAAO,CAAC,iCAAiC,EAAE,kCAAkC,CAAC;IAErH,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,8BAA8B,EACnE,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,iCAAiC,GAAG,OAAO,CAAC,MAAM,CAAC,kCAAkC,CAAC,CAAC;CAcnI"}
@@ -1,54 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CreateQRCodeForOwnTemplateUseCase = void 0;
16
- const ts_utils_1 = require("@js-soft/ts-utils");
17
- const core_types_1 = require("@nmshd/core-types");
18
- const transport_1 = require("@nmshd/transport");
19
- const typescript_ioc_1 = require("@nmshd/typescript-ioc");
20
- const common_1 = require("../../common");
21
- let Validator = class Validator extends common_1.SchemaValidator {
22
- constructor(schemaRepository) {
23
- super(schemaRepository.getSchema("CreateQRCodeForOwnTemplateRequest"));
24
- }
25
- };
26
- Validator = __decorate([
27
- __param(0, typescript_ioc_1.Inject),
28
- __metadata("design:paramtypes", [common_1.SchemaRepository])
29
- ], Validator);
30
- let CreateQRCodeForOwnTemplateUseCase = class CreateQRCodeForOwnTemplateUseCase extends common_1.UseCase {
31
- constructor(templateController, validator) {
32
- super(validator);
33
- this.templateController = templateController;
34
- }
35
- async executeInternal(request) {
36
- const template = await this.templateController.getRelationshipTemplate(core_types_1.CoreId.from(request.templateId));
37
- if (!template) {
38
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.RelationshipTemplate));
39
- }
40
- if (!template.isOwn) {
41
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipTemplates.cannotCreateQRCodeForPeerTemplate());
42
- }
43
- const qrCode = await common_1.QRCode.forTruncateable(template);
44
- return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
45
- }
46
- };
47
- exports.CreateQRCodeForOwnTemplateUseCase = CreateQRCodeForOwnTemplateUseCase;
48
- exports.CreateQRCodeForOwnTemplateUseCase = CreateQRCodeForOwnTemplateUseCase = __decorate([
49
- __param(0, typescript_ioc_1.Inject),
50
- __param(1, typescript_ioc_1.Inject),
51
- __metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
52
- Validator])
53
- ], CreateQRCodeForOwnTemplateUseCase);
54
- //# sourceMappingURL=CreateQRCodeForOwnRelationshipTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateQRCodeForOwnRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAA2C;AAC3C,gDAAwF;AACxF,0DAA+C;AAC/C,yCAA+H;AAM/H,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAkD;IACtE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAMD,IAAa,iCAAiC,GAA9C,MAAa,iCAAkC,SAAQ,gBAA8E;IACjI,YAC6B,kBAAkD,EACnE,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAgC;IAI/E,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA0C;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAExG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,gCAAoB,CAAC,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YAClB,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,qBAAqB,CAAC,iCAAiC,EAAE,CAAC,CAAC;QAChG,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACtD,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAtBY,8EAAiC;4CAAjC,iCAAiC;IAErC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,0CAA8B;QACxD,SAAS;GAHvB,iCAAiC,CAsB7C"}
@@ -1,29 +0,0 @@
1
- import { Result } from "@js-soft/ts-utils";
2
- import { RelationshipTemplateController, TokenController } from "@nmshd/transport";
3
- import { AddressString, ISO8601DateTimeString, RelationshipTemplateIdString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
4
- export interface CreateTokenQRCodeForOwnTemplateRequest {
5
- templateId: RelationshipTemplateIdString;
6
- expiresAt?: ISO8601DateTimeString;
7
- forIdentity?: AddressString;
8
- passwordProtection?: {
9
- /**
10
- * @minLength 1
11
- */
12
- password: string;
13
- passwordIsPin?: true;
14
- };
15
- }
16
- declare class Validator extends TokenAndTemplateCreationValidator<CreateTokenQRCodeForOwnTemplateRequest> {
17
- constructor(schemaRepository: SchemaRepository);
18
- }
19
- export interface CreateTokenQRCodeForOwnTemplateResponse {
20
- qrCodeBytes: string;
21
- }
22
- export declare class CreateTokenQRCodeForOwnTemplateUseCase extends UseCase<CreateTokenQRCodeForOwnTemplateRequest, CreateTokenQRCodeForOwnTemplateResponse> {
23
- private readonly templateController;
24
- private readonly tokenController;
25
- constructor(templateController: RelationshipTemplateController, tokenController: TokenController, validator: Validator);
26
- protected executeInternal(request: CreateTokenQRCodeForOwnTemplateRequest): Promise<Result<CreateTokenQRCodeForOwnTemplateResponse>>;
27
- }
28
- export {};
29
- //# sourceMappingURL=CreateTokenQRCodeForOwnRelationshipTemplate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreateTokenQRCodeForOwnRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAGH,8BAA8B,EAG9B,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,aAAa,EACb,qBAAqB,EAErB,4BAA4B,EAE5B,gBAAgB,EAChB,iCAAiC,EACjC,OAAO,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,sCAAsC;IACnD,UAAU,EAAE,4BAA4B,CAAC;IACzC,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;KACxB,CAAC;CACL;AAED,cAAM,SAAU,SAAQ,iCAAiC,CAAC,sCAAsC,CAAC;gBAClE,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,MAAM,WAAW,uCAAuC;IACpD,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,sCAAuC,SAAQ,OAAO,CAAC,sCAAsC,EAAE,uCAAuC,CAAC;IAEpI,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,kBAAkB,EAAE,8BAA8B,EAClD,eAAe,EAAE,eAAe,EACjD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,sCAAsC,GAAG,OAAO,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC;CAyC7I"}