@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.IccInvoiceApi = void 0;
4
13
  /**
@@ -20,15 +29,20 @@ const LabelledOccurence_1 = require("../model/LabelledOccurence");
20
29
  const PaginatedListInvoice_1 = require("../model/PaginatedListInvoice");
21
30
  const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
22
31
  const IccRestApiPath_1 = require("./IccRestApiPath");
32
+ const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
33
+ const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
23
34
  class IccInvoiceApi {
35
+ get headers() {
36
+ return Promise.resolve(this._headers);
37
+ }
24
38
  constructor(host, headers, authenticationProvider, fetchImpl) {
25
39
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
26
- this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
40
+ this._headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
27
41
  this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
28
42
  this.fetchImpl = fetchImpl;
29
43
  }
30
44
  setHeaders(h) {
31
- this.headers = h;
45
+ this._headers = h;
32
46
  }
33
47
  handleError(e) {
34
48
  throw e;
@@ -46,21 +60,23 @@ class IccInvoiceApi {
46
60
  * @param gracePeriod
47
61
  */
48
62
  appendCodes(userId, type, sentMediumType, secretFKeys, insuranceId, invoiceId, gracePeriod, body) {
49
- let _body = null;
50
- _body = body;
51
- const _url = this.host +
52
- `/invoice/byauthor/${encodeURIComponent(String(userId))}/append/${encodeURIComponent(String(type))}/${encodeURIComponent(String(sentMediumType))}` +
53
- '?ts=' +
54
- new Date().getTime() +
55
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
56
- (insuranceId ? '&insuranceId=' + encodeURIComponent(String(insuranceId)) : '') +
57
- (invoiceId ? '&invoiceId=' + encodeURIComponent(String(invoiceId)) : '') +
58
- (gracePeriod ? '&gracePeriod=' + encodeURIComponent(String(gracePeriod)) : '');
59
- let headers = this.headers;
60
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
61
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
62
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
63
- .catch((err) => this.handleError(err));
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ let _body = null;
65
+ _body = body;
66
+ const _url = this.host +
67
+ `/invoice/byauthor/${encodeURIComponent(String(userId))}/append/${encodeURIComponent(String(type))}/${encodeURIComponent(String(sentMediumType))}` +
68
+ '?ts=' +
69
+ new Date().getTime() +
70
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
71
+ (insuranceId ? '&insuranceId=' + encodeURIComponent(String(insuranceId)) : '') +
72
+ (invoiceId ? '&invoiceId=' + encodeURIComponent(String(invoiceId)) : '') +
73
+ (gracePeriod ? '&gracePeriod=' + encodeURIComponent(String(gracePeriod)) : '');
74
+ let headers = yield this.headers;
75
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
76
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
77
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
78
+ .catch((err) => this.handleError(err));
79
+ });
64
80
  }
65
81
  /**
66
82
  *
@@ -68,14 +84,16 @@ class IccInvoiceApi {
68
84
  * @param body
69
85
  */
70
86
  createInvoice(body) {
71
- let _body = null;
72
- _body = body;
73
- const _url = this.host + `/invoice` + '?ts=' + new Date().getTime();
74
- let headers = this.headers;
75
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
76
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
77
- .then((doc) => new Invoice_1.Invoice(doc.body))
78
- .catch((err) => this.handleError(err));
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ let _body = null;
89
+ _body = body;
90
+ const _url = this.host + `/invoice` + '?ts=' + new Date().getTime();
91
+ let headers = yield this.headers;
92
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
93
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
94
+ .then((doc) => new Invoice_1.Invoice(doc.body))
95
+ .catch((err) => this.handleError(err));
96
+ });
79
97
  }
80
98
  /**
81
99
  * Returns the created invoices.
@@ -83,14 +101,16 @@ class IccInvoiceApi {
83
101
  * @param body
84
102
  */
85
103
  createInvoices(body) {
86
- let _body = null;
87
- _body = body;
88
- const _url = this.host + `/invoice/batch` + '?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 Invoice_1.Invoice(it)))
93
- .catch((err) => this.handleError(err));
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ let _body = null;
106
+ _body = body;
107
+ const _url = this.host + `/invoice/batch` + '?ts=' + new Date().getTime();
108
+ let headers = yield this.headers;
109
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
110
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
111
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
112
+ .catch((err) => this.handleError(err));
113
+ });
94
114
  }
95
115
  /**
96
116
  *
@@ -98,12 +118,14 @@ class IccInvoiceApi {
98
118
  * @param invoiceId
99
119
  */
100
120
  deleteInvoice(invoiceId) {
101
- let _body = null;
102
- const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
103
- let headers = this.headers;
104
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
105
- .then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
106
- .catch((err) => this.handleError(err));
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ let _body = null;
123
+ const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
124
+ let headers = yield this.headers;
125
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
126
+ .then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
127
+ .catch((err) => this.handleError(err));
128
+ });
107
129
  }
108
130
  /**
109
131
  * Returns a list of invoices along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
@@ -111,14 +133,16 @@ class IccInvoiceApi {
111
133
  * @param body
112
134
  */
113
135
  filterInvoicesBy(body) {
114
- let _body = null;
115
- _body = body;
116
- const _url = this.host + `/invoice/filter` + '?ts=' + new Date().getTime();
117
- let headers = this.headers;
118
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
119
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
120
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
121
- .catch((err) => this.handleError(err));
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ let _body = null;
138
+ _body = body;
139
+ const _url = this.host + `/invoice/filter` + '?ts=' + new Date().getTime();
140
+ let headers = yield this.headers;
141
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
142
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
143
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
144
+ .catch((err) => this.handleError(err));
145
+ });
122
146
  }
123
147
  /**
124
148
  *
@@ -131,20 +155,22 @@ class IccInvoiceApi {
131
155
  * @param limit Number of rows
132
156
  */
133
157
  findByAuthor(hcPartyId, fromDate, toDate, startKey, startDocumentId, limit) {
134
- let _body = null;
135
- const _url = this.host +
136
- `/invoice/byauthor/${encodeURIComponent(String(hcPartyId))}` +
137
- '?ts=' +
138
- new Date().getTime() +
139
- (fromDate ? '&fromDate=' + encodeURIComponent(String(fromDate)) : '') +
140
- (toDate ? '&toDate=' + encodeURIComponent(String(toDate)) : '') +
141
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
142
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
143
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
144
- let headers = this.headers;
145
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
146
- .then((doc) => new PaginatedListInvoice_1.PaginatedListInvoice(doc.body))
147
- .catch((err) => this.handleError(err));
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ let _body = null;
160
+ const _url = this.host +
161
+ `/invoice/byauthor/${encodeURIComponent(String(hcPartyId))}` +
162
+ '?ts=' +
163
+ new Date().getTime() +
164
+ (fromDate ? '&fromDate=' + encodeURIComponent(String(fromDate)) : '') +
165
+ (toDate ? '&toDate=' + encodeURIComponent(String(toDate)) : '') +
166
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
167
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
168
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
169
+ let headers = yield this.headers;
170
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
171
+ .then((doc) => new PaginatedListInvoice_1.PaginatedListInvoice(doc.body))
172
+ .catch((err) => this.handleError(err));
173
+ });
148
174
  }
149
175
  /**
150
176
  * Keys have to delimited by coma
@@ -153,18 +179,20 @@ class IccInvoiceApi {
153
179
  * @param hcPartyId
154
180
  */
155
181
  findInvoicesByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
156
- let _body = null;
157
- _body = body;
158
- const _url = this.host +
159
- `/invoice/byHcPartySecretForeignKeys` +
160
- '?ts=' +
161
- new Date().getTime() +
162
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
163
- let headers = this.headers;
164
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
165
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
166
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
167
- .catch((err) => this.handleError(err));
182
+ return __awaiter(this, void 0, void 0, function* () {
183
+ let _body = null;
184
+ _body = body;
185
+ const _url = this.host +
186
+ `/invoice/byHcPartySecretForeignKeys` +
187
+ '?ts=' +
188
+ new Date().getTime() +
189
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
190
+ let headers = yield this.headers;
191
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
192
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
193
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
194
+ .catch((err) => this.handleError(err));
195
+ });
168
196
  }
169
197
  /**
170
198
  * Keys have to delimited by coma
@@ -173,17 +201,19 @@ class IccInvoiceApi {
173
201
  * @param secretFKeys
174
202
  */
175
203
  findInvoicesByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
176
- let _body = null;
177
- const _url = this.host +
178
- `/invoice/byHcPartySecretForeignKeys` +
179
- '?ts=' +
180
- new Date().getTime() +
181
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
182
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
183
- let headers = this.headers;
184
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
185
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
186
- .catch((err) => this.handleError(err));
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ let _body = null;
206
+ const _url = this.host +
207
+ `/invoice/byHcPartySecretForeignKeys` +
208
+ '?ts=' +
209
+ new Date().getTime() +
210
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
211
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
212
+ let headers = yield this.headers;
213
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
214
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
215
+ .catch((err) => this.handleError(err));
216
+ });
187
217
  }
188
218
  /**
189
219
  *
@@ -192,18 +222,20 @@ class IccInvoiceApi {
192
222
  * @param hcPartyId
193
223
  */
194
224
  findInvoicesDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
195
- let _body = null;
196
- _body = body;
197
- const _url = this.host +
198
- `/invoice/byHcPartySecretForeignKeys/delegations` +
199
- '?ts=' +
200
- new Date().getTime() +
201
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
202
- let headers = this.headers;
203
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
204
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
205
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
206
- .catch((err) => this.handleError(err));
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ let _body = null;
227
+ _body = body;
228
+ const _url = this.host +
229
+ `/invoice/byHcPartySecretForeignKeys/delegations` +
230
+ '?ts=' +
231
+ new Date().getTime() +
232
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
233
+ let headers = yield this.headers;
234
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
235
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
236
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
237
+ .catch((err) => this.handleError(err));
238
+ });
207
239
  }
208
240
  /**
209
241
  * Keys must be delimited by coma
@@ -212,17 +244,19 @@ class IccInvoiceApi {
212
244
  * @param secretFKeys
213
245
  */
214
246
  findInvoicesDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
215
- let _body = null;
216
- const _url = this.host +
217
- `/invoice/byHcPartySecretForeignKeys/delegations` +
218
- '?ts=' +
219
- new Date().getTime() +
220
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
221
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
222
- let headers = this.headers;
223
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
224
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
225
- .catch((err) => this.handleError(err));
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ let _body = null;
249
+ const _url = this.host +
250
+ `/invoice/byHcPartySecretForeignKeys/delegations` +
251
+ '?ts=' +
252
+ new Date().getTime() +
253
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
254
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
255
+ let headers = yield this.headers;
256
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
257
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
258
+ .catch((err) => this.handleError(err));
259
+ });
226
260
  }
227
261
  /**
228
262
  *
@@ -230,12 +264,14 @@ class IccInvoiceApi {
230
264
  * @param invoiceId
231
265
  */
232
266
  getInvoice(invoiceId) {
233
- let _body = null;
234
- const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
235
- let headers = this.headers;
236
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
237
- .then((doc) => new Invoice_1.Invoice(doc.body))
238
- .catch((err) => this.handleError(err));
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ let _body = null;
269
+ const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
270
+ let headers = yield this.headers;
271
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
272
+ .then((doc) => new Invoice_1.Invoice(doc.body))
273
+ .catch((err) => this.handleError(err));
274
+ });
239
275
  }
240
276
  /**
241
277
  *
@@ -243,14 +279,16 @@ class IccInvoiceApi {
243
279
  * @param body
244
280
  */
245
281
  getInvoices(body) {
246
- let _body = null;
247
- _body = body;
248
- const _url = this.host + `/invoice/byIds` + '?ts=' + new Date().getTime();
249
- let headers = this.headers;
250
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
251
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
252
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
253
- .catch((err) => this.handleError(err));
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ let _body = null;
284
+ _body = body;
285
+ const _url = this.host + `/invoice/byIds` + '?ts=' + new Date().getTime();
286
+ let headers = yield this.headers;
287
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
288
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
289
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
290
+ .catch((err) => this.handleError(err));
291
+ });
254
292
  }
255
293
  /**
256
294
  *
@@ -258,12 +296,14 @@ class IccInvoiceApi {
258
296
  * @param minOccurences
259
297
  */
260
298
  getTarificationsCodesOccurences(minOccurences) {
261
- let _body = null;
262
- const _url = this.host + `/invoice/codes/${encodeURIComponent(String(minOccurences))}` + '?ts=' + new Date().getTime();
263
- let headers = this.headers;
264
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
265
- .then((doc) => doc.body.map((it) => new LabelledOccurence_1.LabelledOccurence(it)))
266
- .catch((err) => this.handleError(err));
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ let _body = null;
301
+ const _url = this.host + `/invoice/codes/${encodeURIComponent(String(minOccurences))}` + '?ts=' + new Date().getTime();
302
+ let headers = yield this.headers;
303
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
304
+ .then((doc) => doc.body.map((it) => new LabelledOccurence_1.LabelledOccurence(it)))
305
+ .catch((err) => this.handleError(err));
306
+ });
267
307
  }
268
308
  /**
269
309
  *
@@ -274,19 +314,21 @@ class IccInvoiceApi {
274
314
  * @param to
275
315
  */
276
316
  listAllHcpsByStatus(status, from, to, body) {
277
- let _body = null;
278
- _body = body;
279
- const _url = this.host +
280
- `/invoice/allHcpsByStatus/${encodeURIComponent(String(status))}` +
281
- '?ts=' +
282
- new Date().getTime() +
283
- (from ? '&from=' + encodeURIComponent(String(from)) : '') +
284
- (to ? '&to=' + encodeURIComponent(String(to)) : '');
285
- let headers = this.headers;
286
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
287
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
288
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
289
- .catch((err) => this.handleError(err));
317
+ return __awaiter(this, void 0, void 0, function* () {
318
+ let _body = null;
319
+ _body = body;
320
+ const _url = this.host +
321
+ `/invoice/allHcpsByStatus/${encodeURIComponent(String(status))}` +
322
+ '?ts=' +
323
+ new Date().getTime() +
324
+ (from ? '&from=' + encodeURIComponent(String(from)) : '') +
325
+ (to ? '&to=' + encodeURIComponent(String(to)) : '');
326
+ let headers = yield this.headers;
327
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
328
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
329
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
330
+ .catch((err) => this.handleError(err));
331
+ });
290
332
  }
291
333
  /**
292
334
  *
@@ -294,14 +336,16 @@ class IccInvoiceApi {
294
336
  * @param body
295
337
  */
296
338
  listByContactIds(body) {
297
- let _body = null;
298
- _body = body;
299
- const _url = this.host + `/invoice/byCtcts` + '?ts=' + new Date().getTime();
300
- let headers = this.headers;
301
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
302
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
303
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
304
- .catch((err) => this.handleError(err));
339
+ return __awaiter(this, void 0, void 0, function* () {
340
+ let _body = null;
341
+ _body = body;
342
+ const _url = this.host + `/invoice/byCtcts` + '?ts=' + new Date().getTime();
343
+ let headers = yield this.headers;
344
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
345
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
346
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
347
+ .catch((err) => this.handleError(err));
348
+ });
305
349
  }
306
350
  /**
307
351
  * Keys have to delimited by coma
@@ -310,15 +354,17 @@ class IccInvoiceApi {
310
354
  * @param groupId
311
355
  */
312
356
  listByHcPartyGroupId(hcPartyId, groupId) {
313
- let _body = null;
314
- const _url = this.host +
315
- `/invoice/byHcPartyGroupId/${encodeURIComponent(String(hcPartyId))}/${encodeURIComponent(String(groupId))}` +
316
- '?ts=' +
317
- new Date().getTime();
318
- let headers = this.headers;
319
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
320
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
321
- .catch((err) => this.handleError(err));
357
+ return __awaiter(this, void 0, void 0, function* () {
358
+ let _body = null;
359
+ const _url = this.host +
360
+ `/invoice/byHcPartyGroupId/${encodeURIComponent(String(hcPartyId))}/${encodeURIComponent(String(groupId))}` +
361
+ '?ts=' +
362
+ new Date().getTime();
363
+ let headers = yield this.headers;
364
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
365
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
366
+ .catch((err) => this.handleError(err));
367
+ });
322
368
  }
323
369
  /**
324
370
  * Keys have to delimited by coma
@@ -331,17 +377,19 @@ class IccInvoiceApi {
331
377
  * @param to
332
378
  */
333
379
  listByHcPartySentMediumTypeInvoiceTypeSentDate(hcPartyId, sentMediumType, invoiceType, sent, from, to) {
334
- let _body = null;
335
- const _url = this.host +
336
- `/invoice/byHcParty/${encodeURIComponent(String(hcPartyId))}/mediumType/${encodeURIComponent(String(sentMediumType))}/invoiceType/${encodeURIComponent(String(invoiceType))}/sent/${encodeURIComponent(String(sent))}` +
337
- '?ts=' +
338
- new Date().getTime() +
339
- (from ? '&from=' + encodeURIComponent(String(from)) : '') +
340
- (to ? '&to=' + encodeURIComponent(String(to)) : '');
341
- let headers = this.headers;
342
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
343
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
344
- .catch((err) => this.handleError(err));
380
+ return __awaiter(this, void 0, void 0, function* () {
381
+ let _body = null;
382
+ const _url = this.host +
383
+ `/invoice/byHcParty/${encodeURIComponent(String(hcPartyId))}/mediumType/${encodeURIComponent(String(sentMediumType))}/invoiceType/${encodeURIComponent(String(invoiceType))}/sent/${encodeURIComponent(String(sent))}` +
384
+ '?ts=' +
385
+ new Date().getTime() +
386
+ (from ? '&from=' + encodeURIComponent(String(from)) : '') +
387
+ (to ? '&to=' + encodeURIComponent(String(to)) : '');
388
+ let headers = yield this.headers;
389
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
390
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
391
+ .catch((err) => this.handleError(err));
392
+ });
345
393
  }
346
394
  /**
347
395
  *
@@ -353,19 +401,21 @@ class IccInvoiceApi {
353
401
  * @param to
354
402
  */
355
403
  listByHcpartySendingModeStatusDate(hcPartyId, sendingMode, status, from, to) {
356
- let _body = null;
357
- const _url = this.host +
358
- `/invoice/byHcpartySendingModeStatusDate/${encodeURIComponent(String(hcPartyId))}` +
359
- '?ts=' +
360
- new Date().getTime() +
361
- (sendingMode ? '&sendingMode=' + encodeURIComponent(String(sendingMode)) : '') +
362
- (status ? '&status=' + encodeURIComponent(String(status)) : '') +
363
- (from ? '&from=' + encodeURIComponent(String(from)) : '') +
364
- (to ? '&to=' + encodeURIComponent(String(to)) : '');
365
- let headers = this.headers;
366
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
367
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
368
- .catch((err) => this.handleError(err));
404
+ return __awaiter(this, void 0, void 0, function* () {
405
+ let _body = null;
406
+ const _url = this.host +
407
+ `/invoice/byHcpartySendingModeStatusDate/${encodeURIComponent(String(hcPartyId))}` +
408
+ '?ts=' +
409
+ new Date().getTime() +
410
+ (sendingMode ? '&sendingMode=' + encodeURIComponent(String(sendingMode)) : '') +
411
+ (status ? '&status=' + encodeURIComponent(String(status)) : '') +
412
+ (from ? '&from=' + encodeURIComponent(String(from)) : '') +
413
+ (to ? '&to=' + encodeURIComponent(String(to)) : '');
414
+ let headers = yield this.headers;
415
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
416
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
417
+ .catch((err) => this.handleError(err));
418
+ });
369
419
  }
370
420
  /**
371
421
  *
@@ -373,12 +423,14 @@ class IccInvoiceApi {
373
423
  * @param invoiceIds
374
424
  */
375
425
  listByIds(invoiceIds) {
376
- let _body = null;
377
- const _url = this.host + `/invoice/byIds/${encodeURIComponent(String(invoiceIds))}` + '?ts=' + new Date().getTime();
378
- let headers = this.headers;
379
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
380
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
381
- .catch((err) => this.handleError(err));
426
+ return __awaiter(this, void 0, void 0, function* () {
427
+ let _body = null;
428
+ const _url = this.host + `/invoice/byIds/${encodeURIComponent(String(invoiceIds))}` + '?ts=' + new Date().getTime();
429
+ let headers = yield this.headers;
430
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
431
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
432
+ .catch((err) => this.handleError(err));
433
+ });
382
434
  }
383
435
  /**
384
436
  *
@@ -386,12 +438,14 @@ class IccInvoiceApi {
386
438
  * @param recipientIds
387
439
  */
388
440
  listByRecipientsIds(recipientIds) {
389
- let _body = null;
390
- const _url = this.host + `/invoice/to/${encodeURIComponent(String(recipientIds))}` + '?ts=' + new Date().getTime();
391
- let headers = this.headers;
392
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
393
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
394
- .catch((err) => this.handleError(err));
441
+ return __awaiter(this, void 0, void 0, function* () {
442
+ let _body = null;
443
+ const _url = this.host + `/invoice/to/${encodeURIComponent(String(recipientIds))}` + '?ts=' + new Date().getTime();
444
+ let headers = yield this.headers;
445
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
446
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
447
+ .catch((err) => this.handleError(err));
448
+ });
395
449
  }
396
450
  /**
397
451
  *
@@ -399,12 +453,14 @@ class IccInvoiceApi {
399
453
  * @param serviceIds
400
454
  */
401
455
  listByServiceIds(serviceIds) {
402
- let _body = null;
403
- const _url = this.host + `/invoice/byServiceIds/${encodeURIComponent(String(serviceIds))}` + '?ts=' + new Date().getTime();
404
- let headers = this.headers;
405
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
406
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
407
- .catch((err) => this.handleError(err));
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ let _body = null;
458
+ const _url = this.host + `/invoice/byServiceIds/${encodeURIComponent(String(serviceIds))}` + '?ts=' + new Date().getTime();
459
+ let headers = yield this.headers;
460
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
461
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
462
+ .catch((err) => this.handleError(err));
463
+ });
408
464
  }
409
465
  /**
410
466
  *
@@ -412,12 +468,14 @@ class IccInvoiceApi {
412
468
  * @param userIds
413
469
  */
414
470
  listToInsurances(userIds) {
415
- let _body = null;
416
- const _url = this.host + `/invoice/toInsurances` + '?ts=' + new Date().getTime() + (userIds ? '&userIds=' + encodeURIComponent(String(userIds)) : '');
417
- let headers = this.headers;
418
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
419
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
420
- .catch((err) => this.handleError(err));
471
+ return __awaiter(this, void 0, void 0, function* () {
472
+ let _body = null;
473
+ const _url = this.host + `/invoice/toInsurances` + '?ts=' + new Date().getTime() + (userIds ? '&userIds=' + encodeURIComponent(String(userIds)) : '');
474
+ let headers = yield this.headers;
475
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
476
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
477
+ .catch((err) => this.handleError(err));
478
+ });
421
479
  }
422
480
  /**
423
481
  *
@@ -425,12 +483,14 @@ class IccInvoiceApi {
425
483
  * @param userIds
426
484
  */
427
485
  listToInsurancesUnsent(userIds) {
428
- let _body = null;
429
- const _url = this.host + `/invoice/toInsurances/unsent` + '?ts=' + new Date().getTime() + (userIds ? '&userIds=' + encodeURIComponent(String(userIds)) : '');
430
- let headers = this.headers;
431
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
432
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
433
- .catch((err) => this.handleError(err));
486
+ return __awaiter(this, void 0, void 0, function* () {
487
+ let _body = null;
488
+ const _url = this.host + `/invoice/toInsurances/unsent` + '?ts=' + new Date().getTime() + (userIds ? '&userIds=' + encodeURIComponent(String(userIds)) : '');
489
+ let headers = yield this.headers;
490
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
491
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
492
+ .catch((err) => this.handleError(err));
493
+ });
434
494
  }
435
495
  /**
436
496
  *
@@ -438,12 +498,14 @@ class IccInvoiceApi {
438
498
  * @param hcPartyId
439
499
  */
440
500
  listToPatients(hcPartyId) {
441
- let _body = null;
442
- const _url = this.host + `/invoice/toPatients` + '?ts=' + new Date().getTime() + (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
443
- let headers = this.headers;
444
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
445
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
446
- .catch((err) => this.handleError(err));
501
+ return __awaiter(this, void 0, void 0, function* () {
502
+ let _body = null;
503
+ const _url = this.host + `/invoice/toPatients` + '?ts=' + new Date().getTime() + (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
504
+ let headers = yield this.headers;
505
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
506
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
507
+ .catch((err) => this.handleError(err));
508
+ });
447
509
  }
448
510
  /**
449
511
  *
@@ -451,16 +513,18 @@ class IccInvoiceApi {
451
513
  * @param hcPartyId
452
514
  */
453
515
  listToPatientsUnsent(hcPartyId) {
454
- let _body = null;
455
- const _url = this.host +
456
- `/invoice/toPatients/unsent` +
457
- '?ts=' +
458
- new Date().getTime() +
459
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
460
- let headers = this.headers;
461
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
462
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
463
- .catch((err) => this.handleError(err));
516
+ return __awaiter(this, void 0, void 0, function* () {
517
+ let _body = null;
518
+ const _url = this.host +
519
+ `/invoice/toPatients/unsent` +
520
+ '?ts=' +
521
+ new Date().getTime() +
522
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
523
+ let headers = yield this.headers;
524
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
525
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
526
+ .catch((err) => this.handleError(err));
527
+ });
464
528
  }
465
529
  /**
466
530
  *
@@ -469,14 +533,16 @@ class IccInvoiceApi {
469
533
  * @param invoiceId
470
534
  */
471
535
  mergeTo(invoiceId, body) {
472
- let _body = null;
473
- _body = body;
474
- const _url = this.host + `/invoice/mergeTo/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
475
- let headers = this.headers;
476
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
477
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
478
- .then((doc) => new Invoice_1.Invoice(doc.body))
479
- .catch((err) => this.handleError(err));
536
+ return __awaiter(this, void 0, void 0, function* () {
537
+ let _body = null;
538
+ _body = body;
539
+ const _url = this.host + `/invoice/mergeTo/${encodeURIComponent(String(invoiceId))}` + '?ts=' + new Date().getTime();
540
+ let headers = yield this.headers;
541
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
542
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
543
+ .then((doc) => new Invoice_1.Invoice(doc.body))
544
+ .catch((err) => this.handleError(err));
545
+ });
480
546
  }
481
547
  /**
482
548
  *
@@ -484,14 +550,16 @@ class IccInvoiceApi {
484
550
  * @param body
485
551
  */
486
552
  modifyInvoice(body) {
487
- let _body = null;
488
- _body = body;
489
- const _url = this.host + `/invoice` + '?ts=' + new Date().getTime();
490
- let headers = this.headers;
491
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
492
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
493
- .then((doc) => new Invoice_1.Invoice(doc.body))
494
- .catch((err) => this.handleError(err));
553
+ return __awaiter(this, void 0, void 0, function* () {
554
+ let _body = null;
555
+ _body = body;
556
+ const _url = this.host + `/invoice` + '?ts=' + new Date().getTime();
557
+ let headers = yield this.headers;
558
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
559
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
560
+ .then((doc) => new Invoice_1.Invoice(doc.body))
561
+ .catch((err) => this.handleError(err));
562
+ });
495
563
  }
496
564
  /**
497
565
  * Returns the modified invoices.
@@ -499,14 +567,16 @@ class IccInvoiceApi {
499
567
  * @param body
500
568
  */
501
569
  modifyInvoices(body) {
502
- let _body = null;
503
- _body = body;
504
- const _url = this.host + `/invoice/batch` + '?ts=' + new Date().getTime();
505
- let headers = this.headers;
506
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
507
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
508
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
509
- .catch((err) => this.handleError(err));
570
+ return __awaiter(this, void 0, void 0, function* () {
571
+ let _body = null;
572
+ _body = body;
573
+ const _url = this.host + `/invoice/batch` + '?ts=' + new Date().getTime();
574
+ let headers = yield this.headers;
575
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
576
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
577
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
578
+ .catch((err) => this.handleError(err));
579
+ });
510
580
  }
511
581
  /**
512
582
  *
@@ -515,14 +585,16 @@ class IccInvoiceApi {
515
585
  * @param invoiceId
516
586
  */
517
587
  newInvoiceDelegations(invoiceId, body) {
518
- let _body = null;
519
- _body = body;
520
- const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}/delegate` + '?ts=' + new Date().getTime();
521
- let headers = this.headers;
522
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
523
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
524
- .then((doc) => new Invoice_1.Invoice(doc.body))
525
- .catch((err) => this.handleError(err));
588
+ return __awaiter(this, void 0, void 0, function* () {
589
+ let _body = null;
590
+ _body = body;
591
+ const _url = this.host + `/invoice/${encodeURIComponent(String(invoiceId))}/delegate` + '?ts=' + new Date().getTime();
592
+ let headers = yield this.headers;
593
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
594
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
595
+ .then((doc) => new Invoice_1.Invoice(doc.body))
596
+ .catch((err) => this.handleError(err));
597
+ });
526
598
  }
527
599
  /**
528
600
  *
@@ -530,14 +602,16 @@ class IccInvoiceApi {
530
602
  * @param body
531
603
  */
532
604
  reassignInvoice(body) {
533
- let _body = null;
534
- _body = body;
535
- const _url = this.host + `/invoice/reassign` + '?ts=' + new Date().getTime();
536
- let headers = this.headers;
537
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
538
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
539
- .then((doc) => new Invoice_1.Invoice(doc.body))
540
- .catch((err) => this.handleError(err));
605
+ return __awaiter(this, void 0, void 0, function* () {
606
+ let _body = null;
607
+ _body = body;
608
+ const _url = this.host + `/invoice/reassign` + '?ts=' + new Date().getTime();
609
+ let headers = yield this.headers;
610
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
611
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
612
+ .then((doc) => new Invoice_1.Invoice(doc.body))
613
+ .catch((err) => this.handleError(err));
614
+ });
541
615
  }
542
616
  /**
543
617
  *
@@ -548,18 +622,20 @@ class IccInvoiceApi {
548
622
  * @param secretFKeys
549
623
  */
550
624
  removeCodes(userId, serviceId, secretFKeys, body) {
551
- let _body = null;
552
- _body = body;
553
- const _url = this.host +
554
- `/invoice/byauthor/${encodeURIComponent(String(userId))}/service/${encodeURIComponent(String(serviceId))}` +
555
- '?ts=' +
556
- new Date().getTime() +
557
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
558
- let headers = this.headers;
559
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
560
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
561
- .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
562
- .catch((err) => this.handleError(err));
625
+ return __awaiter(this, void 0, void 0, function* () {
626
+ let _body = null;
627
+ _body = body;
628
+ const _url = this.host +
629
+ `/invoice/byauthor/${encodeURIComponent(String(userId))}/service/${encodeURIComponent(String(serviceId))}` +
630
+ '?ts=' +
631
+ new Date().getTime() +
632
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
633
+ let headers = yield this.headers;
634
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
635
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
636
+ .then((doc) => doc.body.map((it) => new Invoice_1.Invoice(it)))
637
+ .catch((err) => this.handleError(err));
638
+ });
563
639
  }
564
640
  /**
565
641
  * Keys must be delimited by coma
@@ -567,14 +643,16 @@ class IccInvoiceApi {
567
643
  * @param body
568
644
  */
569
645
  setInvoicesDelegations(body) {
570
- let _body = null;
571
- _body = body;
572
- const _url = this.host + `/invoice/delegations` + '?ts=' + new Date().getTime();
573
- let headers = this.headers;
574
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
575
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
576
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
577
- .catch((err) => this.handleError(err));
646
+ return __awaiter(this, void 0, void 0, function* () {
647
+ let _body = null;
648
+ _body = body;
649
+ const _url = this.host + `/invoice/delegations` + '?ts=' + new Date().getTime();
650
+ let headers = yield this.headers;
651
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
652
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
653
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
654
+ .catch((err) => this.handleError(err));
655
+ });
578
656
  }
579
657
  /**
580
658
  *
@@ -584,17 +662,45 @@ class IccInvoiceApi {
584
662
  * @param forcedValue
585
663
  */
586
664
  validate(invoiceId, scheme, forcedValue) {
587
- let _body = null;
588
- const _url = this.host +
589
- `/invoice/validate/${encodeURIComponent(String(invoiceId))}` +
590
- '?ts=' +
591
- new Date().getTime() +
592
- (scheme ? '&scheme=' + encodeURIComponent(String(scheme)) : '') +
593
- (forcedValue ? '&forcedValue=' + encodeURIComponent(String(forcedValue)) : '');
594
- let headers = this.headers;
595
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
596
- .then((doc) => new Invoice_1.Invoice(doc.body))
597
- .catch((err) => this.handleError(err));
665
+ return __awaiter(this, void 0, void 0, function* () {
666
+ let _body = null;
667
+ const _url = this.host +
668
+ `/invoice/validate/${encodeURIComponent(String(invoiceId))}` +
669
+ '?ts=' +
670
+ new Date().getTime() +
671
+ (scheme ? '&scheme=' + encodeURIComponent(String(scheme)) : '') +
672
+ (forcedValue ? '&forcedValue=' + encodeURIComponent(String(forcedValue)) : '');
673
+ let headers = yield this.headers;
674
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
675
+ .then((doc) => new Invoice_1.Invoice(doc.body))
676
+ .catch((err) => this.handleError(err));
677
+ });
678
+ }
679
+ /**
680
+ * @internal this method is for internal use only and may be changed without notice
681
+ */
682
+ bulkShareInvoices(request) {
683
+ return __awaiter(this, void 0, void 0, function* () {
684
+ const _url = this.host + '/invoice/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime();
685
+ let headers = yield this.headers;
686
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
687
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
688
+ .then((doc) => doc.body.map((x) => new EntityBulkShareResult_1.EntityBulkShareResult(x, Invoice_1.Invoice)))
689
+ .catch((err) => this.handleError(err));
690
+ });
691
+ }
692
+ /**
693
+ * @internal this method is for internal use only and may be changed without notice
694
+ */
695
+ bulkShareInvoicesMinimal(request) {
696
+ return __awaiter(this, void 0, void 0, function* () {
697
+ const _url = this.host + '/invoice/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime();
698
+ let headers = yield this.headers;
699
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
700
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
701
+ .then((doc) => doc.body.map((x) => new MinimalEntityBulkShareResult_1.MinimalEntityBulkShareResult(x)))
702
+ .catch((err) => this.handleError(err));
703
+ });
598
704
  }
599
705
  }
600
706
  exports.IccInvoiceApi = IccInvoiceApi;