@icure/api 7.1.16 → 8.0.0-RC.2

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 (363) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +12 -1
  2. package/icc-api/api/IccAccesslogApi.js +142 -98
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccBemikronoApi.d.ts +81 -0
  5. package/icc-api/api/IccBemikronoApi.js +163 -0
  6. package/icc-api/api/IccBemikronoApi.js.map +1 -0
  7. package/icc-api/api/IccCalendarItemApi.d.ts +21 -1
  8. package/icc-api/api/IccCalendarItemApi.js +183 -117
  9. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  10. package/icc-api/api/IccClassificationApi.d.ts +21 -1
  11. package/icc-api/api/IccClassificationApi.js +119 -63
  12. package/icc-api/api/IccClassificationApi.js.map +1 -1
  13. package/icc-api/api/IccContactApi.d.ts +21 -1
  14. package/icc-api/api/IccContactApi.js +385 -294
  15. package/icc-api/api/IccContactApi.js.map +1 -1
  16. package/icc-api/api/IccDocumentApi.d.ts +38 -25
  17. package/icc-api/api/IccDocumentApi.js +279 -212
  18. package/icc-api/api/IccDocumentApi.js.map +1 -1
  19. package/icc-api/api/IccExchangeDataApi.d.ts +19 -0
  20. package/icc-api/api/IccExchangeDataApi.js +85 -0
  21. package/icc-api/api/IccExchangeDataApi.js.map +1 -0
  22. package/icc-api/api/IccExchangeDataMapApi.d.ts +18 -0
  23. package/icc-api/api/IccExchangeDataMapApi.js +65 -0
  24. package/icc-api/api/IccExchangeDataMapApi.js.map +1 -0
  25. package/icc-api/api/IccFormApi.d.ts +21 -1
  26. package/icc-api/api/IccFormApi.js +321 -229
  27. package/icc-api/api/IccFormApi.js.map +1 -1
  28. package/icc-api/api/IccHelementApi.d.ts +21 -1
  29. package/icc-api/api/IccHelementApi.js +207 -137
  30. package/icc-api/api/IccHelementApi.js.map +1 -1
  31. package/icc-api/api/IccInvoiceApi.d.ts +21 -1
  32. package/icc-api/api/IccInvoiceApi.js +404 -298
  33. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  34. package/icc-api/api/IccMaintenanceTaskApi.d.ts +12 -1
  35. package/icc-api/api/IccMaintenanceTaskApi.js +79 -43
  36. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  37. package/icc-api/api/IccMessageApi.d.ts +28 -1
  38. package/icc-api/api/IccMessageApi.js +294 -191
  39. package/icc-api/api/IccMessageApi.js.map +1 -1
  40. package/icc-api/api/IccPatientApi.d.ts +12 -1
  41. package/icc-api/api/IccPatientApi.js +447 -351
  42. package/icc-api/api/IccPatientApi.js.map +1 -1
  43. package/icc-api/api/IccReceiptApi.d.ts +22 -8
  44. package/icc-api/api/IccReceiptApi.js +121 -64
  45. package/icc-api/api/IccReceiptApi.js.map +1 -1
  46. package/icc-api/api/IccRestApiPath.js +1 -1
  47. package/icc-api/api/IccRestApiPath.js.map +1 -1
  48. package/icc-api/api/IccSecureDelegationKeyMapApi.d.ts +26 -0
  49. package/icc-api/api/IccSecureDelegationKeyMapApi.js +71 -0
  50. package/icc-api/api/IccSecureDelegationKeyMapApi.js.map +1 -0
  51. package/icc-api/api/IccTimeTableApi.d.ts +12 -1
  52. package/icc-api/api/IccTimeTableApi.js +86 -48
  53. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  54. package/icc-api/api/IccTopicApi.d.ts +90 -0
  55. package/icc-api/api/IccTopicApi.js +193 -0
  56. package/icc-api/api/IccTopicApi.js.map +1 -0
  57. package/icc-api/index.d.ts +2 -0
  58. package/icc-api/index.js +2 -0
  59. package/icc-api/index.js.map +1 -1
  60. package/icc-api/model/AbstractFilterMessage.d.ts +15 -0
  61. package/icc-api/model/AbstractFilterMessage.js +21 -0
  62. package/icc-api/model/AbstractFilterMessage.js.map +1 -0
  63. package/icc-api/model/AbstractFilterTopic.d.ts +15 -0
  64. package/icc-api/model/AbstractFilterTopic.js +21 -0
  65. package/icc-api/model/AbstractFilterTopic.js.map +1 -0
  66. package/icc-api/model/AccessLog.d.ts +2 -0
  67. package/icc-api/model/AccessLog.js.map +1 -1
  68. package/icc-api/model/Article.d.ts +2 -0
  69. package/icc-api/model/Article.js.map +1 -1
  70. package/icc-api/model/CalendarItem.d.ts +2 -0
  71. package/icc-api/model/CalendarItem.js.map +1 -1
  72. package/icc-api/model/Classification.d.ts +2 -0
  73. package/icc-api/model/Classification.js.map +1 -1
  74. package/icc-api/model/ClassificationTemplate.d.ts +2 -0
  75. package/icc-api/model/ClassificationTemplate.js.map +1 -1
  76. package/icc-api/model/Connection.d.ts +1 -1
  77. package/icc-api/model/Connection.js.map +1 -1
  78. package/icc-api/model/Contact.d.ts +2 -0
  79. package/icc-api/model/Contact.js.map +1 -1
  80. package/icc-api/model/Device.d.ts +4 -4
  81. package/icc-api/model/Device.js.map +1 -1
  82. package/icc-api/model/Document.d.ts +2 -0
  83. package/icc-api/model/Document.js.map +1 -1
  84. package/icc-api/model/ExchangeDataMapCreationBatch.d.ts +13 -0
  85. package/icc-api/model/ExchangeDataMapCreationBatch.js +10 -0
  86. package/icc-api/model/ExchangeDataMapCreationBatch.js.map +1 -0
  87. package/icc-api/model/FilterChainMessage.d.ts +19 -0
  88. package/icc-api/model/FilterChainMessage.js +11 -0
  89. package/icc-api/model/FilterChainMessage.js.map +1 -0
  90. package/icc-api/model/FilterChainTopic.d.ts +19 -0
  91. package/icc-api/model/FilterChainTopic.js +11 -0
  92. package/icc-api/model/FilterChainTopic.js.map +1 -0
  93. package/icc-api/model/Form.d.ts +2 -0
  94. package/icc-api/model/Form.js.map +1 -1
  95. package/icc-api/model/HealthElement.d.ts +2 -0
  96. package/icc-api/model/HealthElement.js.map +1 -1
  97. package/icc-api/model/HealthcareParty.d.ts +2 -2
  98. package/icc-api/model/HealthcareParty.js +13 -1
  99. package/icc-api/model/HealthcareParty.js.map +1 -1
  100. package/icc-api/model/IcureStub.d.ts +2 -0
  101. package/icc-api/model/IcureStub.js.map +1 -1
  102. package/icc-api/model/Invoice.d.ts +2 -0
  103. package/icc-api/model/Invoice.js.map +1 -1
  104. package/icc-api/model/MaintenanceTask.d.ts +13 -10
  105. package/icc-api/model/MaintenanceTask.js +13 -11
  106. package/icc-api/model/MaintenanceTask.js.map +1 -1
  107. package/icc-api/model/Message.d.ts +2 -0
  108. package/icc-api/model/Message.js.map +1 -1
  109. package/icc-api/model/PaginatedListExchangeData.d.ts +9 -0
  110. package/icc-api/model/PaginatedListExchangeData.js +10 -0
  111. package/icc-api/model/PaginatedListExchangeData.js.map +1 -0
  112. package/icc-api/model/PaginatedListTopic.d.ts +20 -0
  113. package/icc-api/model/PaginatedListTopic.js +10 -0
  114. package/icc-api/model/PaginatedListTopic.js.map +1 -0
  115. package/icc-api/model/Patient.d.ts +4 -2
  116. package/icc-api/model/Patient.js.map +1 -1
  117. package/icc-api/model/PatientByHcPartyGenderEducationProfession.d.ts +31 -0
  118. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js +32 -0
  119. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js.map +1 -0
  120. package/icc-api/model/Receipt.d.ts +2 -0
  121. package/icc-api/model/Receipt.js.map +1 -1
  122. package/icc-api/model/SecureDelegation.d.ts +52 -0
  123. package/icc-api/model/SecureDelegation.js +16 -0
  124. package/icc-api/model/SecureDelegation.js.map +1 -0
  125. package/icc-api/model/SecurityMetadata.d.ts +33 -0
  126. package/icc-api/model/SecurityMetadata.js +13 -0
  127. package/icc-api/model/SecurityMetadata.js.map +1 -0
  128. package/icc-api/model/Service.d.ts +2 -0
  129. package/icc-api/model/Service.js.map +1 -1
  130. package/icc-api/model/TimeTable.d.ts +2 -0
  131. package/icc-api/model/TimeTable.js.map +1 -1
  132. package/icc-api/model/Topic.d.ts +95 -0
  133. package/icc-api/model/Topic.js +16 -0
  134. package/icc-api/model/Topic.js.map +1 -0
  135. package/icc-api/model/internal/ExchangeData.d.ts +64 -0
  136. package/icc-api/model/internal/ExchangeData.js +15 -0
  137. package/icc-api/model/internal/ExchangeData.js.map +1 -0
  138. package/icc-api/model/internal/ExchangeDataMap.d.ts +24 -0
  139. package/icc-api/model/internal/ExchangeDataMap.js +13 -0
  140. package/icc-api/model/internal/ExchangeDataMap.js.map +1 -0
  141. package/icc-api/model/internal/SecureDelegationKeyMap.d.ts +14 -0
  142. package/icc-api/model/internal/SecureDelegationKeyMap.js +13 -0
  143. package/icc-api/model/internal/SecureDelegationKeyMap.js.map +1 -0
  144. package/icc-api/model/models.d.ts +26 -40
  145. package/icc-api/model/models.js +19 -37
  146. package/icc-api/model/models.js.map +1 -1
  147. package/icc-api/model/requests/EntityBulkShareResult.d.ts +28 -0
  148. package/icc-api/model/requests/EntityBulkShareResult.js +16 -0
  149. package/icc-api/model/requests/EntityBulkShareResult.js.map +1 -0
  150. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.d.ts +10 -0
  151. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js +17 -0
  152. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js.map +1 -0
  153. package/icc-api/model/requests/EntityShareRequest.d.ts +110 -0
  154. package/icc-api/model/requests/EntityShareRequest.js +63 -0
  155. package/icc-api/model/requests/EntityShareRequest.js.map +1 -0
  156. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.d.ts +54 -0
  157. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js +24 -0
  158. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js.map +1 -0
  159. package/icc-api/model/requests/MinimalEntityBulkShareResult.d.ts +23 -0
  160. package/icc-api/model/requests/MinimalEntityBulkShareResult.js +13 -0
  161. package/icc-api/model/requests/MinimalEntityBulkShareResult.js.map +1 -0
  162. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.d.ts +21 -0
  163. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js +14 -0
  164. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js.map +1 -0
  165. package/icc-x-api/basexapi/EncryptedEntityXApi.d.ts +55 -6
  166. package/icc-x-api/basexapi/EncryptedEntityXApi.js.map +1 -1
  167. package/icc-x-api/crypto/AES.js +1 -1
  168. package/icc-x-api/crypto/AES.js.map +1 -1
  169. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.d.ts +18 -0
  170. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js +50 -0
  171. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js.map +1 -0
  172. package/icc-x-api/crypto/AccessControlSecretUtils.d.ts +43 -0
  173. package/icc-x-api/crypto/AccessControlSecretUtils.js +97 -0
  174. package/icc-x-api/crypto/AccessControlSecretUtils.js.map +1 -0
  175. package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +146 -0
  176. package/icc-x-api/crypto/BaseExchangeDataManager.js +342 -0
  177. package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -0
  178. package/icc-x-api/crypto/BaseExchangeKeysManager.d.ts +0 -18
  179. package/icc-x-api/crypto/BaseExchangeKeysManager.js +11 -85
  180. package/icc-x-api/crypto/BaseExchangeKeysManager.js.map +1 -1
  181. package/icc-x-api/crypto/ConfidentialEntities.d.ts +26 -16
  182. package/icc-x-api/crypto/ConfidentialEntities.js +30 -17
  183. package/icc-x-api/crypto/ConfidentialEntities.js.map +1 -1
  184. package/icc-x-api/crypto/CryptoStrategies.d.ts +8 -1
  185. package/icc-x-api/crypto/CryptoStrategies.js.map +1 -1
  186. package/icc-x-api/crypto/DelegationsDeAnonymization.d.ts +44 -0
  187. package/icc-x-api/crypto/DelegationsDeAnonymization.js +235 -0
  188. package/icc-x-api/crypto/DelegationsDeAnonymization.js.map +1 -0
  189. package/icc-x-api/crypto/ExchangeDataManager.d.ts +97 -0
  190. package/icc-x-api/crypto/ExchangeDataManager.js +501 -0
  191. package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -0
  192. package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +32 -0
  193. package/icc-x-api/crypto/ExchangeDataMapManager.js +70 -0
  194. package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -0
  195. package/icc-x-api/crypto/ExchangeKeysManager.d.ts +4 -16
  196. package/icc-x-api/crypto/ExchangeKeysManager.js +4 -62
  197. package/icc-x-api/crypto/ExchangeKeysManager.js.map +1 -1
  198. package/icc-x-api/crypto/ExtendedApisUtils.d.ts +326 -0
  199. package/icc-x-api/crypto/ExtendedApisUtils.js +3 -0
  200. package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -0
  201. package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +174 -0
  202. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +559 -0
  203. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -0
  204. package/icc-x-api/crypto/KeyRecovery.d.ts +5 -2
  205. package/icc-x-api/crypto/KeyRecovery.js +59 -29
  206. package/icc-x-api/crypto/KeyRecovery.js.map +1 -1
  207. package/icc-x-api/crypto/LegacyCryptoStrategies.d.ts +7 -2
  208. package/icc-x-api/crypto/LegacyCryptoStrategies.js +8 -1
  209. package/icc-x-api/crypto/LegacyCryptoStrategies.js.map +1 -1
  210. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.d.ts +33 -0
  211. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js +141 -0
  212. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js.map +1 -0
  213. package/icc-x-api/crypto/RSA.d.ts +34 -8
  214. package/icc-x-api/crypto/RSA.js +80 -13
  215. package/icc-x-api/crypto/RSA.js.map +1 -1
  216. package/icc-x-api/crypto/SecureDelegationsEncryption.d.ts +54 -0
  217. package/icc-x-api/crypto/SecureDelegationsEncryption.js +178 -0
  218. package/icc-x-api/crypto/SecureDelegationsEncryption.js.map +1 -0
  219. package/icc-x-api/crypto/SecureDelegationsManager.d.ts +66 -0
  220. package/icc-x-api/crypto/SecureDelegationsManager.js +261 -0
  221. package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -0
  222. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.d.ts +46 -0
  223. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js +312 -0
  224. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js.map +1 -0
  225. package/icc-x-api/crypto/SecurityMetadataDecryptor.d.ts +97 -0
  226. package/icc-x-api/crypto/SecurityMetadataDecryptor.js +79 -0
  227. package/icc-x-api/crypto/SecurityMetadataDecryptor.js.map +1 -0
  228. package/icc-x-api/crypto/ShamirKeysManager.d.ts +5 -5
  229. package/icc-x-api/crypto/ShamirKeysManager.js +6 -9
  230. package/icc-x-api/crypto/ShamirKeysManager.js.map +1 -1
  231. package/icc-x-api/crypto/TransferKeysManager.d.ts +8 -6
  232. package/icc-x-api/crypto/TransferKeysManager.js +75 -52
  233. package/icc-x-api/crypto/TransferKeysManager.js.map +1 -1
  234. package/icc-x-api/crypto/{KeyManager.d.ts → UserEncryptionKeysManager.d.ts} +4 -6
  235. package/icc-x-api/crypto/{KeyManager.js → UserEncryptionKeysManager.js} +43 -23
  236. package/icc-x-api/crypto/UserEncryptionKeysManager.js.map +1 -0
  237. package/icc-x-api/crypto/UserSignatureKeysManager.d.ts +26 -0
  238. package/icc-x-api/crypto/UserSignatureKeysManager.js +74 -0
  239. package/icc-x-api/crypto/UserSignatureKeysManager.js.map +1 -0
  240. package/icc-x-api/crypto/utils.d.ts +61 -11
  241. package/icc-x-api/crypto/utils.js +113 -44
  242. package/icc-x-api/crypto/utils.js.map +1 -1
  243. package/icc-x-api/filters/LatestMessageByHcPartyTransportGuidFilter.d.ts +8 -0
  244. package/icc-x-api/filters/LatestMessageByHcPartyTransportGuidFilter.js +13 -0
  245. package/icc-x-api/filters/LatestMessageByHcPartyTransportGuidFilter.js.map +1 -0
  246. package/icc-x-api/filters/MessageByHcPartyFilter.d.ts +7 -0
  247. package/icc-x-api/filters/MessageByHcPartyFilter.js +13 -0
  248. package/icc-x-api/filters/MessageByHcPartyFilter.js.map +1 -0
  249. package/icc-x-api/filters/MessageByHcPartyTransportGuidFilter.d.ts +8 -0
  250. package/icc-x-api/filters/MessageByHcPartyTransportGuidFilter.js +13 -0
  251. package/icc-x-api/filters/MessageByHcPartyTransportGuidFilter.js.map +1 -0
  252. package/icc-x-api/filters/TopicByHcPartyFilter.d.ts +7 -0
  253. package/icc-x-api/filters/TopicByHcPartyFilter.js +13 -0
  254. package/icc-x-api/filters/TopicByHcPartyFilter.js.map +1 -0
  255. package/icc-x-api/filters/TopicByParticipantFilter.d.ts +7 -0
  256. package/icc-x-api/filters/TopicByParticipantFilter.js +13 -0
  257. package/icc-x-api/filters/TopicByParticipantFilter.js.map +1 -0
  258. package/icc-x-api/filters/filters.d.ts +5 -0
  259. package/icc-x-api/filters/filters.js +5 -0
  260. package/icc-x-api/filters/filters.js.map +1 -1
  261. package/icc-x-api/icc-accesslog-x-api.d.ts +49 -12
  262. package/icc-x-api/icc-accesslog-x-api.js +81 -44
  263. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  264. package/icc-x-api/icc-calendar-item-x-api.d.ts +53 -15
  265. package/icc-x-api/icc-calendar-item-x-api.js +105 -51
  266. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  267. package/icc-x-api/icc-classification-x-api.d.ts +47 -10
  268. package/icc-x-api/icc-classification-x-api.js +62 -33
  269. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  270. package/icc-x-api/icc-contact-x-api.d.ts +59 -33
  271. package/icc-x-api/icc-contact-x-api.js +101 -66
  272. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  273. package/icc-x-api/icc-crypto-x-api.d.ts +33 -333
  274. package/icc-x-api/icc-crypto-x-api.js +47 -764
  275. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  276. package/icc-x-api/icc-data-owner-x-api.d.ts +20 -8
  277. package/icc-x-api/icc-data-owner-x-api.js +31 -10
  278. package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
  279. package/icc-x-api/icc-document-x-api.d.ts +51 -12
  280. package/icc-x-api/icc-document-x-api.js +117 -66
  281. package/icc-x-api/icc-document-x-api.js.map +1 -1
  282. package/icc-x-api/icc-form-x-api.d.ts +48 -11
  283. package/icc-x-api/icc-form-x-api.js +71 -37
  284. package/icc-x-api/icc-form-x-api.js.map +1 -1
  285. package/icc-x-api/icc-hcparty-x-api.d.ts +2 -2
  286. package/icc-x-api/icc-hcparty-x-api.js +3 -3
  287. package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
  288. package/icc-x-api/icc-helement-x-api.d.ts +59 -20
  289. package/icc-x-api/icc-helement-x-api.js +78 -43
  290. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  291. package/icc-x-api/icc-icure-maintenance-x-api.d.ts +7 -2
  292. package/icc-x-api/icc-icure-maintenance-x-api.js +38 -27
  293. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  294. package/icc-x-api/icc-invoice-x-api.d.ts +53 -16
  295. package/icc-x-api/icc-invoice-x-api.js +69 -35
  296. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  297. package/icc-x-api/icc-maintenance-task-x-api.d.ts +56 -22
  298. package/icc-x-api/icc-maintenance-task-x-api.js +77 -36
  299. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  300. package/icc-x-api/icc-message-x-api.d.ts +75 -19
  301. package/icc-x-api/icc-message-x-api.js +126 -37
  302. package/icc-x-api/icc-message-x-api.js.map +1 -1
  303. package/icc-x-api/icc-patient-x-api.d.ts +86 -29
  304. package/icc-x-api/icc-patient-x-api.js +318 -379
  305. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  306. package/icc-x-api/icc-receipt-x-api.d.ts +47 -13
  307. package/icc-x-api/icc-receipt-x-api.js +72 -36
  308. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  309. package/icc-x-api/icc-time-table-x-api.d.ts +46 -13
  310. package/icc-x-api/icc-time-table-x-api.js +61 -27
  311. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  312. package/icc-x-api/icc-topic-x-api.d.ts +191 -0
  313. package/icc-x-api/icc-topic-x-api.js +307 -0
  314. package/icc-x-api/icc-topic-x-api.js.map +1 -0
  315. package/icc-x-api/icc-user-x-api.d.ts +2 -2
  316. package/icc-x-api/icc-user-x-api.js +3 -3
  317. package/icc-x-api/icc-user-x-api.js.map +1 -1
  318. package/icc-x-api/index.d.ts +18 -2
  319. package/icc-x-api/index.js +203 -156
  320. package/icc-x-api/index.js.map +1 -1
  321. package/icc-x-api/maintenance/KeyPairUpdateRequest.d.ts +1 -1
  322. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.d.ts +2 -0
  323. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js +9 -2
  324. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js.map +1 -1
  325. package/icc-x-api/storage/IcureStorageFacade.d.ts +23 -2
  326. package/icc-x-api/storage/IcureStorageFacade.js +36 -2
  327. package/icc-x-api/storage/IcureStorageFacade.js.map +1 -1
  328. package/icc-x-api/storage/KeyStorageFacade.d.ts +12 -0
  329. package/icc-x-api/storage/KeyStorageFacade.js.map +1 -1
  330. package/icc-x-api/storage/KeyStorageImpl.d.ts +2 -0
  331. package/icc-x-api/storage/KeyStorageImpl.js +10 -0
  332. package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
  333. package/icc-x-api/storage/StorageEntryKeysFactory.d.ts +14 -1
  334. package/icc-x-api/storage/StorageEntryKeysFactory.js.map +1 -1
  335. package/icc-x-api/utils/EntityWithDelegationTypeName.d.ts +32 -0
  336. package/icc-x-api/utils/EntityWithDelegationTypeName.js +75 -0
  337. package/icc-x-api/utils/EntityWithDelegationTypeName.js.map +1 -0
  338. package/icc-x-api/utils/ShareResult.d.ts +74 -0
  339. package/icc-x-api/utils/ShareResult.js +61 -0
  340. package/icc-x-api/utils/ShareResult.js.map +1 -0
  341. package/icc-x-api/utils/binary-utils.d.ts +1 -0
  342. package/icc-x-api/utils/binary-utils.js +8 -1
  343. package/icc-x-api/utils/binary-utils.js.map +1 -1
  344. package/icc-x-api/utils/collection-utils.d.ts +5 -0
  345. package/icc-x-api/utils/collection-utils.js +26 -1
  346. package/icc-x-api/utils/collection-utils.js.map +1 -1
  347. package/icc-x-api/utils/crypto-utils.d.ts +4 -3
  348. package/icc-x-api/utils/crypto-utils.js +5 -4
  349. package/icc-x-api/utils/crypto-utils.js.map +1 -1
  350. package/icc-x-api/utils/lru-temporised-async-cache.d.ts +26 -3
  351. package/icc-x-api/utils/lru-temporised-async-cache.js +75 -15
  352. package/icc-x-api/utils/lru-temporised-async-cache.js.map +1 -1
  353. package/icc-x-api/utils/websocket.d.ts +14 -10
  354. package/icc-x-api/utils/websocket.js +26 -9
  355. package/icc-x-api/utils/websocket.js.map +1 -1
  356. package/index.d.ts +1 -1
  357. package/index.js +3 -1
  358. package/index.js.map +1 -1
  359. package/package.json +2 -3
  360. package/icc-x-api/crypto/EntitiesEncryption.d.ts +0 -275
  361. package/icc-x-api/crypto/EntitiesEncryption.js +0 -734
  362. package/icc-x-api/crypto/EntitiesEncryption.js.map +0 -1
  363. package/icc-x-api/crypto/KeyManager.js.map +0 -1
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.IccMessageApi = void 0;
4
13
  /**
@@ -19,15 +28,19 @@ const Message_1 = require("../model/Message");
19
28
  const PaginatedListMessage_1 = require("../model/PaginatedListMessage");
20
29
  const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
21
30
  const IccRestApiPath_1 = require("./IccRestApiPath");
31
+ const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
22
32
  class IccMessageApi {
33
+ get headers() {
34
+ return Promise.resolve(this._headers);
35
+ }
23
36
  constructor(host, headers, authenticationProvider, fetchImpl) {
24
37
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
25
- this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
38
+ this._headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
26
39
  this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
27
40
  this.fetchImpl = fetchImpl;
28
41
  }
29
42
  setHeaders(h) {
30
- this.headers = h;
43
+ this._headers = h;
31
44
  }
32
45
  handleError(e) {
33
46
  throw e;
@@ -38,14 +51,16 @@ class IccMessageApi {
38
51
  * @param body
39
52
  */
40
53
  createMessage(body) {
41
- let _body = null;
42
- _body = body;
43
- const _url = this.host + `/message` + '?ts=' + new Date().getTime();
44
- let headers = this.headers;
45
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
46
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
47
- .then((doc) => new Message_1.Message(doc.body))
48
- .catch((err) => this.handleError(err));
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ let _body = null;
56
+ _body = body;
57
+ const _url = this.host + `/message` + '?ts=' + new Date().getTime();
58
+ let headers = yield this.headers;
59
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
60
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
61
+ .then((doc) => new Message_1.Message(doc.body))
62
+ .catch((err) => this.handleError(err));
63
+ });
49
64
  }
50
65
  /**
51
66
  *
@@ -54,15 +69,17 @@ class IccMessageApi {
54
69
  * @param delegateId
55
70
  */
56
71
  deleteDelegation(messageId, delegateId) {
57
- let _body = null;
58
- const _url = this.host +
59
- `/message/${encodeURIComponent(String(messageId))}/delegate/${encodeURIComponent(String(delegateId))}` +
60
- '?ts=' +
61
- new Date().getTime();
62
- let headers = this.headers;
63
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
64
- .then((doc) => new Message_1.Message(doc.body))
65
- .catch((err) => this.handleError(err));
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ let _body = null;
74
+ const _url = this.host +
75
+ `/message/${encodeURIComponent(String(messageId))}/delegate/${encodeURIComponent(String(delegateId))}` +
76
+ '?ts=' +
77
+ new Date().getTime();
78
+ let headers = yield this.headers;
79
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
80
+ .then((doc) => new Message_1.Message(doc.body))
81
+ .catch((err) => this.handleError(err));
82
+ });
66
83
  }
67
84
  /**
68
85
  *
@@ -70,12 +87,14 @@ class IccMessageApi {
70
87
  * @param messageIds
71
88
  */
72
89
  deleteMessages(messageIds) {
73
- let _body = null;
74
- const _url = this.host + `/message/${encodeURIComponent(String(messageIds))}` + '?ts=' + new Date().getTime();
75
- let headers = this.headers;
76
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
77
- .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
78
- .catch((err) => this.handleError(err));
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ let _body = null;
92
+ const _url = this.host + `/message/${encodeURIComponent(String(messageIds))}` + '?ts=' + new Date().getTime();
93
+ let headers = yield this.headers;
94
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
95
+ .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
96
+ .catch((err) => this.handleError(err));
97
+ });
79
98
  }
80
99
  /**
81
100
  *
@@ -83,14 +102,16 @@ class IccMessageApi {
83
102
  * @param body
84
103
  */
85
104
  deleteMessagesBatch(body) {
86
- let _body = null;
87
- _body = body;
88
- const _url = this.host + `/message/delete/byIds` + '?ts=' + new Date().getTime();
89
- let headers = this.headers;
90
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
91
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
92
- .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
93
- .catch((err) => this.handleError(err));
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ let _body = null;
107
+ _body = body;
108
+ const _url = this.host + `/message/delete/byIds` + '?ts=' + new Date().getTime();
109
+ let headers = yield this.headers;
110
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
111
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
112
+ .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
113
+ .catch((err) => this.handleError(err));
114
+ });
94
115
  }
95
116
  /**
96
117
  *
@@ -100,18 +121,20 @@ class IccMessageApi {
100
121
  * @param limit
101
122
  */
102
123
  findMessages(startKey, startDocumentId, limit) {
103
- let _body = null;
104
- const _url = this.host +
105
- `/message` +
106
- '?ts=' +
107
- new Date().getTime() +
108
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
109
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
110
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
111
- let headers = this.headers;
112
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
113
- .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
114
- .catch((err) => this.handleError(err));
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ let _body = null;
126
+ const _url = this.host +
127
+ `/message` +
128
+ '?ts=' +
129
+ new Date().getTime() +
130
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
131
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
132
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
133
+ let headers = yield this.headers;
134
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
135
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
136
+ .catch((err) => this.handleError(err));
137
+ });
115
138
  }
116
139
  /**
117
140
  *
@@ -123,20 +146,22 @@ class IccMessageApi {
123
146
  * @param hcpId
124
147
  */
125
148
  findMessagesByFromAddress(fromAddress, startKey, startDocumentId, limit, hcpId) {
126
- let _body = null;
127
- const _url = this.host +
128
- `/message/byFromAddress` +
129
- '?ts=' +
130
- new Date().getTime() +
131
- (fromAddress ? '&fromAddress=' + encodeURIComponent(String(fromAddress)) : '') +
132
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
133
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
134
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
135
- (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
136
- let headers = this.headers;
137
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
138
- .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
139
- .catch((err) => this.handleError(err));
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ let _body = null;
151
+ const _url = this.host +
152
+ `/message/byFromAddress` +
153
+ '?ts=' +
154
+ new Date().getTime() +
155
+ (fromAddress ? '&fromAddress=' + encodeURIComponent(String(fromAddress)) : '') +
156
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
157
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
158
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
159
+ (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
160
+ let headers = yield this.headers;
161
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
162
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
163
+ .catch((err) => this.handleError(err));
164
+ });
140
165
  }
141
166
  /**
142
167
  *
@@ -144,14 +169,16 @@ class IccMessageApi {
144
169
  * @param body
145
170
  */
146
171
  findMessagesByHCPartyPatientForeignKeysUsingPost(body) {
147
- let _body = null;
148
- _body = body;
149
- const _url = this.host + `/message/byHcPartySecretForeignKeys` + '?ts=' + new Date().getTime();
150
- let headers = this.headers;
151
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
152
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
153
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
154
- .catch((err) => this.handleError(err));
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ let _body = null;
174
+ _body = body;
175
+ const _url = this.host + `/message/byHcPartySecretForeignKeys` + '?ts=' + new Date().getTime();
176
+ let headers = yield this.headers;
177
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
178
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
179
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
180
+ .catch((err) => this.handleError(err));
181
+ });
155
182
  }
156
183
  /**
157
184
  * Keys must be delimited by coma
@@ -159,16 +186,18 @@ class IccMessageApi {
159
186
  * @param secretFKeys
160
187
  */
161
188
  findMessagesByHCPartyPatientForeignKeys(secretFKeys) {
162
- let _body = null;
163
- const _url = this.host +
164
- `/message/byHcPartySecretForeignKeys` +
165
- '?ts=' +
166
- new Date().getTime() +
167
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
168
- let headers = this.headers;
169
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
170
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
171
- .catch((err) => this.handleError(err));
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ let _body = null;
191
+ const _url = this.host +
192
+ `/message/byHcPartySecretForeignKeys` +
193
+ '?ts=' +
194
+ new Date().getTime() +
195
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
196
+ let headers = yield this.headers;
197
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
198
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
199
+ .catch((err) => this.handleError(err));
200
+ });
172
201
  }
173
202
  /**
174
203
  *
@@ -181,21 +210,23 @@ class IccMessageApi {
181
210
  * @param hcpId
182
211
  */
183
212
  findMessagesByToAddress(toAddress, startKey, startDocumentId, limit, reverse, hcpId) {
184
- let _body = null;
185
- const _url = this.host +
186
- `/message/byToAddress` +
187
- '?ts=' +
188
- new Date().getTime() +
189
- (toAddress ? '&toAddress=' + encodeURIComponent(String(toAddress)) : '') +
190
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
191
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
192
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
193
- (reverse ? '&reverse=' + encodeURIComponent(String(reverse)) : '') +
194
- (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
195
- let headers = this.headers;
196
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
197
- .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
198
- .catch((err) => this.handleError(err));
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ let _body = null;
215
+ const _url = this.host +
216
+ `/message/byToAddress` +
217
+ '?ts=' +
218
+ new Date().getTime() +
219
+ (toAddress ? '&toAddress=' + encodeURIComponent(String(toAddress)) : '') +
220
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
221
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
222
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
223
+ (reverse ? '&reverse=' + encodeURIComponent(String(reverse)) : '') +
224
+ (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
225
+ let headers = yield this.headers;
226
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
227
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
228
+ .catch((err) => this.handleError(err));
229
+ });
199
230
  }
200
231
  /**
201
232
  *
@@ -208,21 +239,23 @@ class IccMessageApi {
208
239
  * @param hcpId
209
240
  */
210
241
  findMessagesByTransportGuid(transportGuid, received, startKey, startDocumentId, limit, hcpId) {
211
- let _body = null;
212
- const _url = this.host +
213
- `/message/byTransportGuid` +
214
- '?ts=' +
215
- new Date().getTime() +
216
- (transportGuid ? '&transportGuid=' + encodeURIComponent(String(transportGuid)) : '') +
217
- (received ? '&received=' + encodeURIComponent(String(received)) : '') +
218
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
219
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
220
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
221
- (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
222
- let headers = this.headers;
223
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
224
- .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
225
- .catch((err) => this.handleError(err));
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ let _body = null;
244
+ const _url = this.host +
245
+ `/message/byTransportGuid` +
246
+ '?ts=' +
247
+ new Date().getTime() +
248
+ (transportGuid ? '&transportGuid=' + encodeURIComponent(String(transportGuid)) : '') +
249
+ (received ? '&received=' + encodeURIComponent(String(received)) : '') +
250
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
251
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
252
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
253
+ (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
254
+ let headers = yield this.headers;
255
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
256
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
257
+ .catch((err) => this.handleError(err));
258
+ });
226
259
  }
227
260
  /**
228
261
  *
@@ -236,22 +269,24 @@ class IccMessageApi {
236
269
  * @param hcpId
237
270
  */
238
271
  findMessagesByTransportGuidSentDate(transportGuid, from, to, startKey, startDocumentId, limit, hcpId) {
239
- let _body = null;
240
- const _url = this.host +
241
- `/message/byTransportGuidSentDate` +
242
- '?ts=' +
243
- new Date().getTime() +
244
- (transportGuid ? '&transportGuid=' + encodeURIComponent(String(transportGuid)) : '') +
245
- (from ? '&from=' + encodeURIComponent(String(from)) : '') +
246
- (to ? '&to=' + encodeURIComponent(String(to)) : '') +
247
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
248
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
249
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
250
- (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
251
- let headers = this.headers;
252
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
253
- .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
254
- .catch((err) => this.handleError(err));
272
+ return __awaiter(this, void 0, void 0, function* () {
273
+ let _body = null;
274
+ const _url = this.host +
275
+ `/message/byTransportGuidSentDate` +
276
+ '?ts=' +
277
+ new Date().getTime() +
278
+ (transportGuid ? '&transportGuid=' + encodeURIComponent(String(transportGuid)) : '') +
279
+ (from ? '&from=' + encodeURIComponent(String(from)) : '') +
280
+ (to ? '&to=' + encodeURIComponent(String(to)) : '') +
281
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
282
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
283
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
284
+ (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
285
+ let headers = yield this.headers;
286
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
287
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
288
+ .catch((err) => this.handleError(err));
289
+ });
255
290
  }
256
291
  /**
257
292
  *
@@ -259,12 +294,14 @@ class IccMessageApi {
259
294
  * @param messageId
260
295
  */
261
296
  getChildrenMessages(messageId) {
262
- let _body = null;
263
- const _url = this.host + `/message/${encodeURIComponent(String(messageId))}/children` + '?ts=' + new Date().getTime();
264
- let headers = this.headers;
265
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
266
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
267
- .catch((err) => this.handleError(err));
297
+ return __awaiter(this, void 0, void 0, function* () {
298
+ let _body = null;
299
+ const _url = this.host + `/message/${encodeURIComponent(String(messageId))}/children` + '?ts=' + new Date().getTime();
300
+ let headers = yield this.headers;
301
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
302
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
303
+ .catch((err) => this.handleError(err));
304
+ });
268
305
  }
269
306
  /**
270
307
  *
@@ -272,14 +309,16 @@ class IccMessageApi {
272
309
  * @param body
273
310
  */
274
311
  getChildrenMessagesOfList(body) {
275
- let _body = null;
276
- _body = body;
277
- const _url = this.host + `/message/children/batch` + '?ts=' + new Date().getTime();
278
- let headers = this.headers;
279
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
280
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
281
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
282
- .catch((err) => this.handleError(err));
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ let _body = null;
314
+ _body = body;
315
+ const _url = this.host + `/message/children/batch` + '?ts=' + new Date().getTime();
316
+ let headers = yield this.headers;
317
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
318
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
319
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
320
+ .catch((err) => this.handleError(err));
321
+ });
283
322
  }
284
323
  /**
285
324
  *
@@ -287,12 +326,14 @@ class IccMessageApi {
287
326
  * @param messageId
288
327
  */
289
328
  getMessage(messageId) {
290
- let _body = null;
291
- const _url = this.host + `/message/${encodeURIComponent(String(messageId))}` + '?ts=' + new Date().getTime();
292
- let headers = this.headers;
293
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
294
- .then((doc) => new Message_1.Message(doc.body))
295
- .catch((err) => this.handleError(err));
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ let _body = null;
331
+ const _url = this.host + `/message/${encodeURIComponent(String(messageId))}` + '?ts=' + new Date().getTime();
332
+ let headers = yield this.headers;
333
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
334
+ .then((doc) => new Message_1.Message(doc.body))
335
+ .catch((err) => this.handleError(err));
336
+ });
296
337
  }
297
338
  /**
298
339
  *
@@ -300,14 +341,16 @@ class IccMessageApi {
300
341
  * @param body
301
342
  */
302
343
  listMessagesByInvoiceIds(body) {
303
- let _body = null;
304
- _body = body;
305
- const _url = this.host + `/message/byInvoiceId` + '?ts=' + new Date().getTime();
306
- let headers = this.headers;
307
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
308
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
309
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
310
- .catch((err) => this.handleError(err));
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ let _body = null;
346
+ _body = body;
347
+ const _url = this.host + `/message/byInvoiceId` + '?ts=' + new Date().getTime();
348
+ let headers = yield this.headers;
349
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
350
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
351
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
352
+ .catch((err) => this.handleError(err));
353
+ });
311
354
  }
312
355
  /**
313
356
  *
@@ -316,14 +359,16 @@ class IccMessageApi {
316
359
  * @param hcpId
317
360
  */
318
361
  listMessagesByTransportGuids(hcpId, body) {
319
- let _body = null;
320
- _body = body;
321
- const _url = this.host + `/message/byTransportGuid/list` + '?ts=' + new Date().getTime() + (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
322
- let headers = this.headers;
323
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
324
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
325
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
326
- .catch((err) => this.handleError(err));
362
+ return __awaiter(this, void 0, void 0, function* () {
363
+ let _body = null;
364
+ _body = body;
365
+ const _url = this.host + `/message/byTransportGuid/list` + '?ts=' + new Date().getTime() + (hcpId ? '&hcpId=' + encodeURIComponent(String(hcpId)) : '');
366
+ let headers = yield this.headers;
367
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
368
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
369
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
370
+ .catch((err) => this.handleError(err));
371
+ });
327
372
  }
328
373
  /**
329
374
  *
@@ -331,14 +376,16 @@ class IccMessageApi {
331
376
  * @param body
332
377
  */
333
378
  modifyMessage(body) {
334
- let _body = null;
335
- _body = body;
336
- const _url = this.host + `/message` + '?ts=' + new Date().getTime();
337
- let headers = this.headers;
338
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
339
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
340
- .then((doc) => new Message_1.Message(doc.body))
341
- .catch((err) => this.handleError(err));
379
+ return __awaiter(this, void 0, void 0, function* () {
380
+ let _body = null;
381
+ _body = body;
382
+ const _url = this.host + `/message` + '?ts=' + new Date().getTime();
383
+ let headers = yield this.headers;
384
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
385
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
386
+ .then((doc) => new Message_1.Message(doc.body))
387
+ .catch((err) => this.handleError(err));
388
+ });
342
389
  }
343
390
  /**
344
391
  *
@@ -347,14 +394,16 @@ class IccMessageApi {
347
394
  * @param messageId
348
395
  */
349
396
  newMessageDelegations(messageId, body) {
350
- let _body = null;
351
- _body = body;
352
- const _url = this.host + `/message/${encodeURIComponent(String(messageId))}/delegate` + '?ts=' + new Date().getTime();
353
- let headers = this.headers;
354
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
355
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
356
- .then((doc) => new IcureStub_1.IcureStub(doc.body))
357
- .catch((err) => this.handleError(err));
397
+ return __awaiter(this, void 0, void 0, function* () {
398
+ let _body = null;
399
+ _body = body;
400
+ const _url = this.host + `/message/${encodeURIComponent(String(messageId))}/delegate` + '?ts=' + new Date().getTime();
401
+ let headers = yield this.headers;
402
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
403
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
404
+ .then((doc) => new IcureStub_1.IcureStub(doc.body))
405
+ .catch((err) => this.handleError(err));
406
+ });
358
407
  }
359
408
  /**
360
409
  *
@@ -362,14 +411,16 @@ class IccMessageApi {
362
411
  * @param body
363
412
  */
364
413
  setMessagesReadStatus(body) {
365
- let _body = null;
366
- _body = body;
367
- const _url = this.host + `/message/readstatus` + '?ts=' + new Date().getTime();
368
- let headers = this.headers;
369
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
370
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
371
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
372
- .catch((err) => this.handleError(err));
414
+ return __awaiter(this, void 0, void 0, function* () {
415
+ let _body = null;
416
+ _body = body;
417
+ const _url = this.host + `/message/readstatus` + '?ts=' + new Date().getTime();
418
+ let headers = yield this.headers;
419
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
420
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
421
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
422
+ .catch((err) => this.handleError(err));
423
+ });
373
424
  }
374
425
  /**
375
426
  *
@@ -378,14 +429,66 @@ class IccMessageApi {
378
429
  * @param status
379
430
  */
380
431
  setMessagesStatusBits(status, body) {
381
- let _body = null;
382
- _body = body;
383
- const _url = this.host + `/message/status/${encodeURIComponent(String(status))}` + '?ts=' + new Date().getTime();
384
- let headers = this.headers;
385
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
386
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
387
- .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
388
- .catch((err) => this.handleError(err));
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ let _body = null;
434
+ _body = body;
435
+ const _url = this.host + `/message/status/${encodeURIComponent(String(status))}` + '?ts=' + new Date().getTime();
436
+ let headers = yield this.headers;
437
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
438
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
439
+ .then((doc) => doc.body.map((it) => new Message_1.Message(it)))
440
+ .catch((err) => this.handleError(err));
441
+ });
442
+ }
443
+ /**
444
+ * @internal this method is for internal use only and may be changed without notice
445
+ */
446
+ bulkShareMessages(request) {
447
+ return __awaiter(this, void 0, void 0, function* () {
448
+ const _url = this.host + '/message/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime();
449
+ let headers = yield this.headers;
450
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
451
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
452
+ .then((doc) => doc.body.map((x) => new EntityBulkShareResult_1.EntityBulkShareResult(x, Message_1.Message)))
453
+ .catch((err) => this.handleError(err));
454
+ });
455
+ }
456
+ /**
457
+ * Returns a list of messages along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
458
+ * @summary List messages for the current user (HcParty) or the given hcparty in the filter
459
+ * @param body
460
+ * @param startDocumentId A Message document ID
461
+ * @param limit Number of rows
462
+ */
463
+ filterMessagesBy(body, startDocumentId, limit) {
464
+ return __awaiter(this, void 0, void 0, function* () {
465
+ const _url = this.host +
466
+ `/message/filter` +
467
+ '?ts=' +
468
+ new Date().getTime() +
469
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
470
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
471
+ let headers = yield this.headers;
472
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
473
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
474
+ .then((doc) => new PaginatedListMessage_1.PaginatedListMessage(doc.body))
475
+ .catch((err) => this.handleError(err));
476
+ });
477
+ }
478
+ /**
479
+ *
480
+ * @summary Get ids of messages matching the provided filter for the current user (HcParty)
481
+ * @param body
482
+ */
483
+ matchMessagesBy(body) {
484
+ return __awaiter(this, void 0, void 0, function* () {
485
+ const _url = this.host + `/message/match` + '?ts=' + new Date().getTime();
486
+ let headers = yield this.headers;
487
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
488
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
489
+ .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
490
+ .catch((err) => this.handleError(err));
491
+ });
389
492
  }
390
493
  }
391
494
  exports.IccMessageApi = IccMessageApi;