@icure/api 7.1.14 → 8.0.0-RC.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) 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 +32 -25
  17. package/icc-api/api/IccDocumentApi.js +264 -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 +12 -1
  38. package/icc-api/api/IccMessageApi.js +257 -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/IccTimeTableApi.d.ts +12 -1
  49. package/icc-api/api/IccTimeTableApi.js +86 -48
  50. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  51. package/icc-api/index.d.ts +1 -0
  52. package/icc-api/index.js +1 -0
  53. package/icc-api/index.js.map +1 -1
  54. package/icc-api/model/AccessLog.d.ts +4 -0
  55. package/icc-api/model/AccessLog.js +1 -0
  56. package/icc-api/model/AccessLog.js.map +1 -1
  57. package/icc-api/model/Article.d.ts +4 -0
  58. package/icc-api/model/Article.js +1 -0
  59. package/icc-api/model/Article.js.map +1 -1
  60. package/icc-api/model/CalendarItem.d.ts +4 -0
  61. package/icc-api/model/CalendarItem.js +1 -0
  62. package/icc-api/model/CalendarItem.js.map +1 -1
  63. package/icc-api/model/Classification.d.ts +4 -0
  64. package/icc-api/model/Classification.js +1 -0
  65. package/icc-api/model/Classification.js.map +1 -1
  66. package/icc-api/model/ClassificationTemplate.d.ts +2 -0
  67. package/icc-api/model/ClassificationTemplate.js.map +1 -1
  68. package/icc-api/model/Contact.d.ts +4 -0
  69. package/icc-api/model/Contact.js +1 -0
  70. package/icc-api/model/Contact.js.map +1 -1
  71. package/icc-api/model/Device.d.ts +4 -4
  72. package/icc-api/model/Device.js.map +1 -1
  73. package/icc-api/model/Document.d.ts +4 -0
  74. package/icc-api/model/Document.js +1 -0
  75. package/icc-api/model/Document.js.map +1 -1
  76. package/icc-api/model/ExchangeData.d.ts +61 -0
  77. package/icc-api/model/ExchangeData.js +12 -0
  78. package/icc-api/model/ExchangeData.js.map +1 -0
  79. package/icc-api/model/ExchangeDataMap.d.ts +21 -0
  80. package/icc-api/model/ExchangeDataMap.js +10 -0
  81. package/icc-api/model/ExchangeDataMap.js.map +1 -0
  82. package/icc-api/model/ExchangeDataMapCreationBatch.d.ts +13 -0
  83. package/icc-api/model/ExchangeDataMapCreationBatch.js +10 -0
  84. package/icc-api/model/ExchangeDataMapCreationBatch.js.map +1 -0
  85. package/icc-api/model/Form.d.ts +4 -0
  86. package/icc-api/model/Form.js +1 -0
  87. package/icc-api/model/Form.js.map +1 -1
  88. package/icc-api/model/HealthElement.d.ts +4 -0
  89. package/icc-api/model/HealthElement.js +1 -0
  90. package/icc-api/model/HealthElement.js.map +1 -1
  91. package/icc-api/model/HealthcareParty.d.ts +2 -2
  92. package/icc-api/model/HealthcareParty.js.map +1 -1
  93. package/icc-api/model/IcureStub.d.ts +2 -0
  94. package/icc-api/model/IcureStub.js.map +1 -1
  95. package/icc-api/model/Invoice.d.ts +4 -0
  96. package/icc-api/model/Invoice.js +1 -0
  97. package/icc-api/model/Invoice.js.map +1 -1
  98. package/icc-api/model/MaintenanceTask.d.ts +4 -0
  99. package/icc-api/model/MaintenanceTask.js +1 -0
  100. package/icc-api/model/MaintenanceTask.js.map +1 -1
  101. package/icc-api/model/Message.d.ts +4 -0
  102. package/icc-api/model/Message.js +1 -0
  103. package/icc-api/model/Message.js.map +1 -1
  104. package/icc-api/model/PaginatedListExchangeData.d.ts +9 -0
  105. package/icc-api/model/PaginatedListExchangeData.js +10 -0
  106. package/icc-api/model/PaginatedListExchangeData.js.map +1 -0
  107. package/icc-api/model/Patient.d.ts +6 -2
  108. package/icc-api/model/Patient.js +1 -0
  109. package/icc-api/model/Patient.js.map +1 -1
  110. package/icc-api/model/PatientByHcPartyGenderEducationProfession.d.ts +31 -0
  111. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js +32 -0
  112. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js.map +1 -0
  113. package/icc-api/model/Receipt.d.ts +4 -0
  114. package/icc-api/model/Receipt.js +1 -0
  115. package/icc-api/model/Receipt.js.map +1 -1
  116. package/icc-api/model/SecureDelegation.d.ts +52 -0
  117. package/icc-api/model/SecureDelegation.js +16 -0
  118. package/icc-api/model/SecureDelegation.js.map +1 -0
  119. package/icc-api/model/SecurityMetadata.d.ts +33 -0
  120. package/icc-api/model/SecurityMetadata.js +13 -0
  121. package/icc-api/model/SecurityMetadata.js.map +1 -0
  122. package/icc-api/model/Service.d.ts +2 -0
  123. package/icc-api/model/Service.js.map +1 -1
  124. package/icc-api/model/TimeTable.d.ts +4 -0
  125. package/icc-api/model/TimeTable.js +1 -0
  126. package/icc-api/model/TimeTable.js.map +1 -1
  127. package/icc-api/model/models.d.ts +20 -39
  128. package/icc-api/model/models.js +15 -37
  129. package/icc-api/model/models.js.map +1 -1
  130. package/icc-api/model/requests/EntityBulkShareResult.d.ts +28 -0
  131. package/icc-api/model/requests/EntityBulkShareResult.js +16 -0
  132. package/icc-api/model/requests/EntityBulkShareResult.js.map +1 -0
  133. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.d.ts +10 -0
  134. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js +17 -0
  135. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js.map +1 -0
  136. package/icc-api/model/requests/EntityShareRequest.d.ts +110 -0
  137. package/icc-api/model/requests/EntityShareRequest.js +63 -0
  138. package/icc-api/model/requests/EntityShareRequest.js.map +1 -0
  139. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.d.ts +54 -0
  140. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js +24 -0
  141. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js.map +1 -0
  142. package/icc-api/model/requests/MinimalEntityBulkShareResult.d.ts +23 -0
  143. package/icc-api/model/requests/MinimalEntityBulkShareResult.js +13 -0
  144. package/icc-api/model/requests/MinimalEntityBulkShareResult.js.map +1 -0
  145. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.d.ts +21 -0
  146. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js +14 -0
  147. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js.map +1 -0
  148. package/icc-x-api/basexapi/EncryptedEntityXApi.d.ts +3 -2
  149. package/icc-x-api/basexapi/EncryptedEntityXApi.js.map +1 -1
  150. package/icc-x-api/crypto/AES.js +1 -1
  151. package/icc-x-api/crypto/AES.js.map +1 -1
  152. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.d.ts +16 -0
  153. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js +41 -0
  154. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js.map +1 -0
  155. package/icc-x-api/crypto/AccessControlSecretUtils.d.ts +42 -0
  156. package/icc-x-api/crypto/AccessControlSecretUtils.js +86 -0
  157. package/icc-x-api/crypto/AccessControlSecretUtils.js.map +1 -0
  158. package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +146 -0
  159. package/icc-x-api/crypto/BaseExchangeDataManager.js +342 -0
  160. package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -0
  161. package/icc-x-api/crypto/BaseExchangeKeysManager.d.ts +0 -18
  162. package/icc-x-api/crypto/BaseExchangeKeysManager.js +11 -85
  163. package/icc-x-api/crypto/BaseExchangeKeysManager.js.map +1 -1
  164. package/icc-x-api/crypto/ConfidentialEntities.d.ts +26 -16
  165. package/icc-x-api/crypto/ConfidentialEntities.js +30 -17
  166. package/icc-x-api/crypto/ConfidentialEntities.js.map +1 -1
  167. package/icc-x-api/crypto/CryptoStrategies.d.ts +8 -1
  168. package/icc-x-api/crypto/CryptoStrategies.js.map +1 -1
  169. package/icc-x-api/crypto/ExchangeDataManager.d.ts +95 -0
  170. package/icc-x-api/crypto/ExchangeDataManager.js +493 -0
  171. package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -0
  172. package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +32 -0
  173. package/icc-x-api/crypto/ExchangeDataMapManager.js +70 -0
  174. package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -0
  175. package/icc-x-api/crypto/ExchangeKeysManager.d.ts +4 -16
  176. package/icc-x-api/crypto/ExchangeKeysManager.js +4 -62
  177. package/icc-x-api/crypto/ExchangeKeysManager.js.map +1 -1
  178. package/icc-x-api/crypto/ExtendedApisUtils.d.ts +336 -0
  179. package/icc-x-api/crypto/ExtendedApisUtils.js +3 -0
  180. package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -0
  181. package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +181 -0
  182. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +562 -0
  183. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -0
  184. package/icc-x-api/crypto/KeyRecovery.d.ts +5 -2
  185. package/icc-x-api/crypto/KeyRecovery.js +59 -29
  186. package/icc-x-api/crypto/KeyRecovery.js.map +1 -1
  187. package/icc-x-api/crypto/LegacyCryptoStrategies.d.ts +7 -2
  188. package/icc-x-api/crypto/LegacyCryptoStrategies.js +8 -1
  189. package/icc-x-api/crypto/LegacyCryptoStrategies.js.map +1 -1
  190. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.d.ts +39 -0
  191. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js +150 -0
  192. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js.map +1 -0
  193. package/icc-x-api/crypto/RSA.d.ts +34 -8
  194. package/icc-x-api/crypto/RSA.js +80 -13
  195. package/icc-x-api/crypto/RSA.js.map +1 -1
  196. package/icc-x-api/crypto/SecureDelegationsEncryption.d.ts +54 -0
  197. package/icc-x-api/crypto/SecureDelegationsEncryption.js +178 -0
  198. package/icc-x-api/crypto/SecureDelegationsEncryption.js.map +1 -0
  199. package/icc-x-api/crypto/SecureDelegationsManager.d.ts +66 -0
  200. package/icc-x-api/crypto/SecureDelegationsManager.js +261 -0
  201. package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -0
  202. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.d.ts +37 -0
  203. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js +294 -0
  204. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js.map +1 -0
  205. package/icc-x-api/crypto/SecurityMetadataDecryptor.d.ts +114 -0
  206. package/icc-x-api/crypto/SecurityMetadataDecryptor.js +98 -0
  207. package/icc-x-api/crypto/SecurityMetadataDecryptor.js.map +1 -0
  208. package/icc-x-api/crypto/ShamirKeysManager.d.ts +5 -5
  209. package/icc-x-api/crypto/ShamirKeysManager.js +6 -9
  210. package/icc-x-api/crypto/ShamirKeysManager.js.map +1 -1
  211. package/icc-x-api/crypto/TransferKeysManager.d.ts +8 -6
  212. package/icc-x-api/crypto/TransferKeysManager.js +75 -52
  213. package/icc-x-api/crypto/TransferKeysManager.js.map +1 -1
  214. package/icc-x-api/crypto/{KeyManager.d.ts → UserEncryptionKeysManager.d.ts} +4 -6
  215. package/icc-x-api/crypto/{KeyManager.js → UserEncryptionKeysManager.js} +43 -23
  216. package/icc-x-api/crypto/UserEncryptionKeysManager.js.map +1 -0
  217. package/icc-x-api/crypto/UserSignatureKeysManager.d.ts +26 -0
  218. package/icc-x-api/crypto/UserSignatureKeysManager.js +74 -0
  219. package/icc-x-api/crypto/UserSignatureKeysManager.js.map +1 -0
  220. package/icc-x-api/crypto/utils.d.ts +61 -11
  221. package/icc-x-api/crypto/utils.js +113 -44
  222. package/icc-x-api/crypto/utils.js.map +1 -1
  223. package/icc-x-api/filters/filters.js.map +1 -1
  224. package/icc-x-api/icc-accesslog-x-api.d.ts +46 -11
  225. package/icc-x-api/icc-accesslog-x-api.js +75 -42
  226. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  227. package/icc-x-api/icc-calendar-item-x-api.d.ts +50 -14
  228. package/icc-x-api/icc-calendar-item-x-api.js +99 -49
  229. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  230. package/icc-x-api/icc-classification-x-api.d.ts +44 -9
  231. package/icc-x-api/icc-classification-x-api.js +56 -31
  232. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  233. package/icc-x-api/icc-contact-x-api.d.ts +56 -32
  234. package/icc-x-api/icc-contact-x-api.js +95 -64
  235. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  236. package/icc-x-api/icc-crypto-x-api.d.ts +28 -334
  237. package/icc-x-api/icc-crypto-x-api.js +41 -765
  238. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  239. package/icc-x-api/icc-data-owner-x-api.d.ts +20 -8
  240. package/icc-x-api/icc-data-owner-x-api.js +31 -10
  241. package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
  242. package/icc-x-api/icc-document-x-api.d.ts +48 -11
  243. package/icc-x-api/icc-document-x-api.js +111 -64
  244. package/icc-x-api/icc-document-x-api.js.map +1 -1
  245. package/icc-x-api/icc-form-x-api.d.ts +45 -10
  246. package/icc-x-api/icc-form-x-api.js +65 -35
  247. package/icc-x-api/icc-form-x-api.js.map +1 -1
  248. package/icc-x-api/icc-hcparty-x-api.d.ts +2 -2
  249. package/icc-x-api/icc-hcparty-x-api.js +3 -3
  250. package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
  251. package/icc-x-api/icc-helement-x-api.d.ts +55 -18
  252. package/icc-x-api/icc-helement-x-api.js +76 -41
  253. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  254. package/icc-x-api/icc-icure-maintenance-x-api.d.ts +7 -2
  255. package/icc-x-api/icc-icure-maintenance-x-api.js +38 -27
  256. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  257. package/icc-x-api/icc-invoice-x-api.d.ts +50 -15
  258. package/icc-x-api/icc-invoice-x-api.js +63 -33
  259. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  260. package/icc-x-api/icc-maintenance-task-x-api.d.ts +53 -21
  261. package/icc-x-api/icc-maintenance-task-x-api.js +72 -35
  262. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  263. package/icc-x-api/icc-message-x-api.d.ts +53 -15
  264. package/icc-x-api/icc-message-x-api.js +65 -36
  265. package/icc-x-api/icc-message-x-api.js.map +1 -1
  266. package/icc-x-api/icc-patient-x-api.d.ts +84 -29
  267. package/icc-x-api/icc-patient-x-api.js +313 -378
  268. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  269. package/icc-x-api/icc-receipt-x-api.d.ts +44 -12
  270. package/icc-x-api/icc-receipt-x-api.js +67 -35
  271. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  272. package/icc-x-api/icc-time-table-x-api.d.ts +43 -12
  273. package/icc-x-api/icc-time-table-x-api.js +56 -26
  274. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  275. package/icc-x-api/icc-user-x-api.d.ts +2 -2
  276. package/icc-x-api/icc-user-x-api.js +3 -3
  277. package/icc-x-api/icc-user-x-api.js.map +1 -1
  278. package/icc-x-api/index.d.ts +4 -2
  279. package/icc-x-api/index.js +154 -135
  280. package/icc-x-api/index.js.map +1 -1
  281. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.d.ts +2 -0
  282. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js +9 -2
  283. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js.map +1 -1
  284. package/icc-x-api/storage/IcureStorageFacade.d.ts +23 -2
  285. package/icc-x-api/storage/IcureStorageFacade.js +36 -2
  286. package/icc-x-api/storage/IcureStorageFacade.js.map +1 -1
  287. package/icc-x-api/storage/KeyStorageFacade.d.ts +12 -0
  288. package/icc-x-api/storage/KeyStorageFacade.js.map +1 -1
  289. package/icc-x-api/storage/KeyStorageImpl.d.ts +2 -0
  290. package/icc-x-api/storage/KeyStorageImpl.js +10 -0
  291. package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
  292. package/icc-x-api/storage/StorageEntryKeysFactory.d.ts +14 -1
  293. package/icc-x-api/storage/StorageEntryKeysFactory.js.map +1 -1
  294. package/icc-x-api/utils/EntityWithDelegationTypeName.d.ts +32 -0
  295. package/icc-x-api/utils/EntityWithDelegationTypeName.js +75 -0
  296. package/icc-x-api/utils/EntityWithDelegationTypeName.js.map +1 -0
  297. package/icc-x-api/utils/ShareResult.d.ts +74 -0
  298. package/icc-x-api/utils/ShareResult.js +61 -0
  299. package/icc-x-api/utils/ShareResult.js.map +1 -0
  300. package/icc-x-api/utils/binary-utils.d.ts +1 -0
  301. package/icc-x-api/utils/binary-utils.js +8 -1
  302. package/icc-x-api/utils/binary-utils.js.map +1 -1
  303. package/icc-x-api/utils/collection-utils.d.ts +5 -0
  304. package/icc-x-api/utils/collection-utils.js +26 -1
  305. package/icc-x-api/utils/collection-utils.js.map +1 -1
  306. package/icc-x-api/utils/crypto-utils.d.ts +4 -3
  307. package/icc-x-api/utils/crypto-utils.js +5 -4
  308. package/icc-x-api/utils/crypto-utils.js.map +1 -1
  309. package/icc-x-api/utils/lru-temporised-async-cache.d.ts +26 -3
  310. package/icc-x-api/utils/lru-temporised-async-cache.js +75 -15
  311. package/icc-x-api/utils/lru-temporised-async-cache.js.map +1 -1
  312. package/icc-x-api/utils/websocket.d.ts +10 -10
  313. package/icc-x-api/utils/websocket.js +18 -9
  314. package/icc-x-api/utils/websocket.js.map +1 -1
  315. package/index.d.ts +1 -1
  316. package/index.js +3 -1
  317. package/index.js.map +1 -1
  318. package/package.json +2 -3
  319. package/icc-x-api/crypto/EntitiesEncryption.d.ts +0 -275
  320. package/icc-x-api/crypto/EntitiesEncryption.js +0 -734
  321. package/icc-x-api/crypto/EntitiesEncryption.js.map +0 -1
  322. 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.IccFormApi = void 0;
4
13
  /**
@@ -19,15 +28,20 @@ const FormTemplate_1 = require("../model/FormTemplate");
19
28
  const IcureStub_1 = require("../model/IcureStub");
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");
32
+ const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
22
33
  class IccFormApi {
34
+ get headers() {
35
+ return Promise.resolve(this._headers);
36
+ }
23
37
  constructor(host, headers, authenticationProvider, fetchImpl) {
24
38
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
25
- this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
39
+ this._headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
26
40
  this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
27
41
  this.fetchImpl = fetchImpl;
28
42
  }
29
43
  setHeaders(h) {
30
- this.headers = h;
44
+ this._headers = h;
31
45
  }
32
46
  handleError(e) {
33
47
  throw e;
@@ -38,14 +52,16 @@ class IccFormApi {
38
52
  * @param body
39
53
  */
40
54
  createForm(body) {
41
- let _body = null;
42
- _body = body;
43
- const _url = this.host + `/form` + '?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 Form_1.Form(doc.body))
48
- .catch((err) => this.handleError(err));
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ let _body = null;
57
+ _body = body;
58
+ const _url = this.host + `/form` + '?ts=' + new Date().getTime();
59
+ let headers = yield 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) => new Form_1.Form(doc.body))
63
+ .catch((err) => this.handleError(err));
64
+ });
49
65
  }
50
66
  /**
51
67
  * Returns an instance of created form template.
@@ -53,14 +69,16 @@ class IccFormApi {
53
69
  * @param body
54
70
  */
55
71
  createFormTemplate(body) {
56
- let _body = null;
57
- _body = body;
58
- const _url = this.host + `/form/template` + '?ts=' + new Date().getTime();
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) => new FormTemplate_1.FormTemplate(doc.body))
63
- .catch((err) => this.handleError(err));
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ let _body = null;
74
+ _body = body;
75
+ const _url = this.host + `/form/template` + '?ts=' + new Date().getTime();
76
+ let headers = yield this.headers;
77
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
78
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
79
+ .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
80
+ .catch((err) => this.handleError(err));
81
+ });
64
82
  }
65
83
  /**
66
84
  * Returns the created forms.
@@ -68,14 +86,16 @@ class IccFormApi {
68
86
  * @param body
69
87
  */
70
88
  createForms(body) {
71
- let _body = null;
72
- _body = body;
73
- const _url = this.host + `/form/batch` + '?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) => doc.body.map((it) => new Form_1.Form(it)))
78
- .catch((err) => this.handleError(err));
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ let _body = null;
91
+ _body = body;
92
+ const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
93
+ let headers = yield this.headers;
94
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
95
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
96
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
97
+ .catch((err) => this.handleError(err));
98
+ });
79
99
  }
80
100
  /**
81
101
  *
@@ -83,12 +103,14 @@ class IccFormApi {
83
103
  * @param formTemplateId
84
104
  */
85
105
  deleteFormTemplate(formTemplateId) {
86
- let _body = null;
87
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
88
- let headers = this.headers;
89
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
90
- .then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
91
- .catch((err) => this.handleError(err));
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ let _body = null;
108
+ const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
109
+ let headers = yield this.headers;
110
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
111
+ .then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
112
+ .catch((err) => this.handleError(err));
113
+ });
92
114
  }
93
115
  /**
94
116
  * Response is a set containing the ID's of deleted forms.
@@ -96,12 +118,14 @@ class IccFormApi {
96
118
  * @param formIds
97
119
  */
98
120
  deleteForms(formIds) {
99
- let _body = null;
100
- const _url = this.host + `/form/${encodeURIComponent(String(formIds))}` + '?ts=' + new Date().getTime();
101
- let headers = this.headers;
102
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
103
- .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
104
- .catch((err) => this.handleError(err));
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ let _body = null;
123
+ const _url = this.host + `/form/${encodeURIComponent(String(formIds))}` + '?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) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
127
+ .catch((err) => this.handleError(err));
128
+ });
105
129
  }
106
130
  /**
107
131
  *
@@ -110,17 +134,19 @@ class IccFormApi {
110
134
  * @param raw
111
135
  */
112
136
  findFormTemplates(loadLayout, raw) {
113
- let _body = null;
114
- const _url = this.host +
115
- `/form/template` +
116
- '?ts=' +
117
- new Date().getTime() +
118
- (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
119
- (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
120
- let headers = this.headers;
121
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
122
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
123
- .catch((err) => this.handleError(err));
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ let _body = null;
139
+ const _url = this.host +
140
+ `/form/template` +
141
+ '?ts=' +
142
+ new Date().getTime() +
143
+ (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
144
+ (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
145
+ let headers = yield this.headers;
146
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
147
+ .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
148
+ .catch((err) => this.handleError(err));
149
+ });
124
150
  }
125
151
  /**
126
152
  *
@@ -129,17 +155,19 @@ class IccFormApi {
129
155
  * @param loadLayout
130
156
  */
131
157
  findFormTemplatesBySpeciality(specialityCode, loadLayout, raw) {
132
- let _body = null;
133
- const _url = this.host +
134
- `/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +
135
- '?ts=' +
136
- new Date().getTime() +
137
- (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
138
- (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
139
- let headers = this.headers;
140
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
141
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
142
- .catch((err) => this.handleError(err));
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ let _body = null;
160
+ const _url = this.host +
161
+ `/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +
162
+ '?ts=' +
163
+ new Date().getTime() +
164
+ (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
165
+ (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
166
+ let headers = yield this.headers;
167
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
168
+ .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
169
+ .catch((err) => this.handleError(err));
170
+ });
143
171
  }
144
172
  /**
145
173
  * Keys must be delimited by coma
@@ -151,21 +179,23 @@ class IccFormApi {
151
179
  * @param body
152
180
  */
153
181
  findFormsByHCPartyPatientForeignKeysUsingPost(hcPartyId, healthElementId, planOfActionId, formTemplateId, body) {
154
- let _body = null;
155
- _body = body;
156
- const _url = this.host +
157
- `/form/byHcPartySecretForeignKeys` +
158
- '?ts=' +
159
- new Date().getTime() +
160
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
161
- (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
162
- (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
163
- (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
164
- let headers = this.headers;
165
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
166
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
167
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
168
- .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
+ `/form/byHcPartySecretForeignKeys` +
187
+ '?ts=' +
188
+ new Date().getTime() +
189
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
190
+ (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
191
+ (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
192
+ (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
193
+ let headers = yield this.headers;
194
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
195
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
196
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
197
+ .catch((err) => this.handleError(err));
198
+ });
169
199
  }
170
200
  /**
171
201
  * Keys must be delimited by coma
@@ -177,20 +207,22 @@ class IccFormApi {
177
207
  * @param formTemplateId
178
208
  */
179
209
  findFormsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys, healthElementId, planOfActionId, formTemplateId) {
180
- let _body = null;
181
- const _url = this.host +
182
- `/form/byHcPartySecretForeignKeys` +
183
- '?ts=' +
184
- new Date().getTime() +
185
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
186
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
187
- (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
188
- (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
189
- (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
190
- let headers = this.headers;
191
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
192
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
193
- .catch((err) => this.handleError(err));
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ let _body = null;
212
+ const _url = this.host +
213
+ `/form/byHcPartySecretForeignKeys` +
214
+ '?ts=' +
215
+ new Date().getTime() +
216
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
217
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
218
+ (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
219
+ (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
220
+ (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
221
+ let headers = yield this.headers;
222
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
223
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
224
+ .catch((err) => this.handleError(err));
225
+ });
194
226
  }
195
227
  /**
196
228
  * Keys must be delimited by coma
@@ -199,18 +231,20 @@ class IccFormApi {
199
231
  * @param hcPartyId
200
232
  */
201
233
  findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
202
- let _body = null;
203
- _body = body;
204
- const _url = this.host +
205
- `/form/byHcPartySecretForeignKeys/delegations` +
206
- '?ts=' +
207
- new Date().getTime() +
208
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
209
- let headers = this.headers;
210
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
211
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
212
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
213
- .catch((err) => this.handleError(err));
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ let _body = null;
236
+ _body = body;
237
+ const _url = this.host +
238
+ `/form/byHcPartySecretForeignKeys/delegations` +
239
+ '?ts=' +
240
+ new Date().getTime() +
241
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
242
+ let headers = yield this.headers;
243
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
244
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
245
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
246
+ .catch((err) => this.handleError(err));
247
+ });
214
248
  }
215
249
  /**
216
250
  *
@@ -219,17 +253,19 @@ class IccFormApi {
219
253
  * @param secretFKeys
220
254
  */
221
255
  findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
222
- let _body = null;
223
- const _url = this.host +
224
- `/form/byHcPartySecretForeignKeys/delegations` +
225
- '?ts=' +
226
- new Date().getTime() +
227
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
228
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
229
- let headers = this.headers;
230
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
231
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
232
- .catch((err) => this.handleError(err));
256
+ return __awaiter(this, void 0, void 0, function* () {
257
+ let _body = null;
258
+ const _url = this.host +
259
+ `/form/byHcPartySecretForeignKeys/delegations` +
260
+ '?ts=' +
261
+ new Date().getTime() +
262
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
263
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
264
+ let headers = yield 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 IcureStub_1.IcureStub(it)))
267
+ .catch((err) => this.handleError(err));
268
+ });
233
269
  }
234
270
  /**
235
271
  * Keys must be delimited by coma
@@ -238,12 +274,14 @@ class IccFormApi {
238
274
  * @param hcPartyId
239
275
  */
240
276
  getChildrenForms(formId, hcPartyId) {
241
- let _body = null;
242
- const _url = this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime();
243
- let headers = this.headers;
244
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
245
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
246
- .catch((err) => this.handleError(err));
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ let _body = null;
279
+ const _url = this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime();
280
+ let headers = yield this.headers;
281
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
282
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
283
+ .catch((err) => this.handleError(err));
284
+ });
247
285
  }
248
286
  /**
249
287
  *
@@ -251,12 +289,14 @@ class IccFormApi {
251
289
  * @param formId
252
290
  */
253
291
  getForm(formId) {
254
- let _body = null;
255
- const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
256
- let headers = this.headers;
257
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
258
- .then((doc) => new Form_1.Form(doc.body))
259
- .catch((err) => this.handleError(err));
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ let _body = null;
294
+ const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
295
+ let headers = yield this.headers;
296
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
297
+ .then((doc) => new Form_1.Form(doc.body))
298
+ .catch((err) => this.handleError(err));
299
+ });
260
300
  }
261
301
  /**
262
302
  *
@@ -264,12 +304,14 @@ class IccFormApi {
264
304
  * @param logicalUuid
265
305
  */
266
306
  getFormByLogicalUuid(logicalUuid) {
267
- let _body = null;
268
- const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
269
- let headers = this.headers;
270
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
271
- .then((doc) => new Form_1.Form(doc.body))
272
- .catch((err) => this.handleError(err));
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ let _body = null;
309
+ const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
310
+ let headers = yield this.headers;
311
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
312
+ .then((doc) => new Form_1.Form(doc.body))
313
+ .catch((err) => this.handleError(err));
314
+ });
273
315
  }
274
316
  /**
275
317
  *
@@ -277,12 +319,14 @@ class IccFormApi {
277
319
  * @param uniqueId
278
320
  */
279
321
  getFormByUniqueId(uniqueId) {
280
- let _body = null;
281
- const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
282
- let headers = this.headers;
283
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
284
- .then((doc) => new Form_1.Form(doc.body))
285
- .catch((err) => this.handleError(err));
322
+ return __awaiter(this, void 0, void 0, function* () {
323
+ let _body = null;
324
+ const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
325
+ let headers = yield this.headers;
326
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
327
+ .then((doc) => new Form_1.Form(doc.body))
328
+ .catch((err) => this.handleError(err));
329
+ });
286
330
  }
287
331
  /**
288
332
  *
@@ -291,16 +335,18 @@ class IccFormApi {
291
335
  * @param raw
292
336
  */
293
337
  getFormTemplate(formTemplateId, raw) {
294
- let _body = null;
295
- const _url = this.host +
296
- `/form/template/${encodeURIComponent(String(formTemplateId))}` +
297
- '?ts=' +
298
- new Date().getTime() +
299
- (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
300
- let headers = this.headers;
301
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
302
- .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
303
- .catch((err) => this.handleError(err));
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ let _body = null;
340
+ const _url = this.host +
341
+ `/form/template/${encodeURIComponent(String(formTemplateId))}` +
342
+ '?ts=' +
343
+ new Date().getTime() +
344
+ (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
345
+ let headers = yield this.headers;
346
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
347
+ .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
348
+ .catch((err) => this.handleError(err));
349
+ });
304
350
  }
305
351
  /**
306
352
  *
@@ -310,16 +356,18 @@ class IccFormApi {
310
356
  * @param raw
311
357
  */
312
358
  getFormTemplatesByGuid(formTemplateGuid, specialityCode, raw) {
313
- let _body = null;
314
- const _url = this.host +
315
- `/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +
316
- '?ts=' +
317
- new Date().getTime() +
318
- (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
319
- let headers = this.headers;
320
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
321
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
322
- .catch((err) => this.handleError(err));
359
+ return __awaiter(this, void 0, void 0, function* () {
360
+ let _body = null;
361
+ const _url = this.host +
362
+ `/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +
363
+ '?ts=' +
364
+ new Date().getTime() +
365
+ (raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
366
+ let headers = yield this.headers;
367
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
368
+ .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
369
+ .catch((err) => this.handleError(err));
370
+ });
323
371
  }
324
372
  /**
325
373
  * Keys must be delimited by coma
@@ -327,14 +375,16 @@ class IccFormApi {
327
375
  * @param body
328
376
  */
329
377
  getForms(body) {
330
- let _body = null;
331
- _body = body;
332
- const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime();
333
- let headers = this.headers;
334
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
335
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
336
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
337
- .catch((err) => this.handleError(err));
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ let _body = null;
380
+ _body = body;
381
+ const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime();
382
+ let headers = yield this.headers;
383
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
384
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
385
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
386
+ .catch((err) => this.handleError(err));
387
+ });
338
388
  }
339
389
  /**
340
390
  *
@@ -342,12 +392,14 @@ class IccFormApi {
342
392
  * @param logicalUuid
343
393
  */
344
394
  getFormsByLogicalUuid(logicalUuid) {
345
- let _body = null;
346
- const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
347
- let headers = this.headers;
348
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
349
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
350
- .catch((err) => this.handleError(err));
395
+ return __awaiter(this, void 0, void 0, function* () {
396
+ let _body = null;
397
+ const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
398
+ let headers = yield this.headers;
399
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
400
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
401
+ .catch((err) => this.handleError(err));
402
+ });
351
403
  }
352
404
  /**
353
405
  *
@@ -355,12 +407,14 @@ class IccFormApi {
355
407
  * @param uniqueId
356
408
  */
357
409
  getFormsByUniqueId(uniqueId) {
358
- let _body = null;
359
- const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
360
- let headers = this.headers;
361
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
362
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
363
- .catch((err) => this.handleError(err));
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ let _body = null;
412
+ const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
413
+ let headers = yield this.headers;
414
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
415
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
416
+ .catch((err) => this.handleError(err));
417
+ });
364
418
  }
365
419
  /**
366
420
  * Returns the modified form.
@@ -368,14 +422,16 @@ class IccFormApi {
368
422
  * @param body
369
423
  */
370
424
  modifyForm(body) {
371
- let _body = null;
372
- _body = body;
373
- const _url = this.host + `/form` + '?ts=' + new Date().getTime();
374
- let headers = this.headers;
375
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
376
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
377
- .then((doc) => new Form_1.Form(doc.body))
378
- .catch((err) => this.handleError(err));
425
+ return __awaiter(this, void 0, void 0, function* () {
426
+ let _body = null;
427
+ _body = body;
428
+ const _url = this.host + `/form` + '?ts=' + new Date().getTime();
429
+ let headers = yield this.headers;
430
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
431
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
432
+ .then((doc) => new Form_1.Form(doc.body))
433
+ .catch((err) => this.handleError(err));
434
+ });
379
435
  }
380
436
  /**
381
437
  * Returns the modified forms.
@@ -383,14 +439,16 @@ class IccFormApi {
383
439
  * @param body
384
440
  */
385
441
  modifyForms(body) {
386
- let _body = null;
387
- _body = body;
388
- const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
389
- let headers = this.headers;
390
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
391
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
392
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
393
- .catch((err) => this.handleError(err));
442
+ return __awaiter(this, void 0, void 0, function* () {
443
+ let _body = null;
444
+ _body = body;
445
+ const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
446
+ let headers = yield this.headers;
447
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
448
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
449
+ .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
450
+ .catch((err) => this.handleError(err));
451
+ });
394
452
  }
395
453
  /**
396
454
  * It delegates a form to a healthcare party. Returns the form with the new delegations.
@@ -399,14 +457,16 @@ class IccFormApi {
399
457
  * @param formId
400
458
  */
401
459
  newFormDelegations(formId, body) {
402
- let _body = null;
403
- _body = body;
404
- const _url = this.host + `/form/delegate/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
405
- let headers = this.headers;
406
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
407
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
408
- .then((doc) => new Form_1.Form(doc.body))
409
- .catch((err) => this.handleError(err));
460
+ return __awaiter(this, void 0, void 0, function* () {
461
+ let _body = null;
462
+ _body = body;
463
+ const _url = this.host + `/form/delegate/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
464
+ let headers = yield this.headers;
465
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
466
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
467
+ .then((doc) => new Form_1.Form(doc.body))
468
+ .catch((err) => this.handleError(err));
469
+ });
410
470
  }
411
471
  /**
412
472
  * Keys must be delimited by coma
@@ -414,14 +474,16 @@ class IccFormApi {
414
474
  * @param body
415
475
  */
416
476
  setFormsDelegations(body) {
417
- let _body = null;
418
- _body = body;
419
- const _url = this.host + `/form/delegations` + '?ts=' + new Date().getTime();
420
- let headers = this.headers;
421
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
422
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
423
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
424
- .catch((err) => this.handleError(err));
477
+ return __awaiter(this, void 0, void 0, function* () {
478
+ let _body = null;
479
+ _body = body;
480
+ const _url = this.host + `/form/delegations` + '?ts=' + new Date().getTime();
481
+ let headers = yield this.headers;
482
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
483
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
484
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
485
+ .catch((err) => this.handleError(err));
486
+ });
425
487
  }
426
488
  /**
427
489
  *
@@ -430,19 +492,21 @@ class IccFormApi {
430
492
  * @param formTemplateId
431
493
  */
432
494
  setTemplateAttachmentMulti(attachment, formTemplateId) {
433
- let _body = null;
434
- if (attachment && !_body) {
435
- const parts = Array.isArray(attachment) ? attachment : [attachment];
436
- const _blob = new Blob(parts, { type: 'application/octet-stream' });
437
- _body = new FormData();
438
- _body.append('attachment', _blob);
439
- }
440
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime();
441
- let headers = this.headers;
442
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'multipart/form-data'));
443
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
444
- .then((doc) => JSON.parse(JSON.stringify(doc.body)))
445
- .catch((err) => this.handleError(err));
495
+ return __awaiter(this, void 0, void 0, function* () {
496
+ let _body = null;
497
+ if (attachment && !_body) {
498
+ const parts = Array.isArray(attachment) ? attachment : [attachment];
499
+ const _blob = new Blob(parts, { type: 'application/octet-stream' });
500
+ _body = new FormData();
501
+ _body.append('attachment', _blob);
502
+ }
503
+ const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime();
504
+ let headers = yield this.headers;
505
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'multipart/form-data'));
506
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
507
+ .then((doc) => JSON.parse(JSON.stringify(doc.body)))
508
+ .catch((err) => this.handleError(err));
509
+ });
446
510
  }
447
511
  /**
448
512
  * Returns an instance of created form template.
@@ -451,14 +515,42 @@ class IccFormApi {
451
515
  * @param formTemplateId
452
516
  */
453
517
  updateFormTemplate(formTemplateId, body) {
454
- let _body = null;
455
- _body = body;
456
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
457
- let headers = this.headers;
458
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
459
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
460
- .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
461
- .catch((err) => this.handleError(err));
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ let _body = null;
520
+ _body = body;
521
+ const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
522
+ let headers = yield this.headers;
523
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
524
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
525
+ .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
526
+ .catch((err) => this.handleError(err));
527
+ });
528
+ }
529
+ /**
530
+ * @internal this method is for internal use only and may be changed without notice
531
+ */
532
+ bulkShareForms(request) {
533
+ return __awaiter(this, void 0, void 0, function* () {
534
+ const _url = this.host + '/form/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime();
535
+ let headers = yield this.headers;
536
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
537
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
538
+ .then((doc) => doc.body.map((x) => new EntityBulkShareResult_1.EntityBulkShareResult(x, Form_1.Form)))
539
+ .catch((err) => this.handleError(err));
540
+ });
541
+ }
542
+ /**
543
+ * @internal this method is for internal use only and may be changed without notice
544
+ */
545
+ bulkShareFormsMinimal(request) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ const _url = this.host + '/form/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime();
548
+ let headers = yield this.headers;
549
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
550
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
551
+ .then((doc) => doc.body.map((x) => new MinimalEntityBulkShareResult_1.MinimalEntityBulkShareResult(x)))
552
+ .catch((err) => this.handleError(err));
553
+ });
462
554
  }
463
555
  }
464
556
  exports.IccFormApi = IccFormApi;