@icure/api 7.1.13 → 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 (337) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +23 -1
  2. package/icc-api/api/IccAccesslogApi.js +154 -84
  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 +28 -5
  26. package/icc-api/api/IccFormApi.js +328 -222
  27. package/icc-api/api/IccFormApi.js.map +1 -1
  28. package/icc-api/api/IccGroupApi.d.ts +40 -7
  29. package/icc-api/api/IccGroupApi.js +91 -16
  30. package/icc-api/api/IccGroupApi.js.map +1 -1
  31. package/icc-api/api/IccHelementApi.d.ts +21 -1
  32. package/icc-api/api/IccHelementApi.js +207 -137
  33. package/icc-api/api/IccHelementApi.js.map +1 -1
  34. package/icc-api/api/IccInvoiceApi.d.ts +21 -1
  35. package/icc-api/api/IccInvoiceApi.js +404 -298
  36. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  37. package/icc-api/api/IccMaintenanceTaskApi.d.ts +12 -1
  38. package/icc-api/api/IccMaintenanceTaskApi.js +79 -43
  39. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  40. package/icc-api/api/IccMessageApi.d.ts +12 -1
  41. package/icc-api/api/IccMessageApi.js +257 -191
  42. package/icc-api/api/IccMessageApi.js.map +1 -1
  43. package/icc-api/api/IccPatientApi.d.ts +12 -1
  44. package/icc-api/api/IccPatientApi.js +447 -351
  45. package/icc-api/api/IccPatientApi.js.map +1 -1
  46. package/icc-api/api/IccReceiptApi.d.ts +22 -8
  47. package/icc-api/api/IccReceiptApi.js +121 -64
  48. package/icc-api/api/IccReceiptApi.js.map +1 -1
  49. package/icc-api/api/IccRestApiPath.js +1 -1
  50. package/icc-api/api/IccRestApiPath.js.map +1 -1
  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/XHR.js +1 -1
  55. package/icc-api/api/XHR.js.map +1 -1
  56. package/icc-api/index.d.ts +1 -0
  57. package/icc-api/index.js +1 -0
  58. package/icc-api/index.js.map +1 -1
  59. package/icc-api/model/AccessLog.d.ts +4 -0
  60. package/icc-api/model/AccessLog.js +1 -0
  61. package/icc-api/model/AccessLog.js.map +1 -1
  62. package/icc-api/model/Article.d.ts +4 -0
  63. package/icc-api/model/Article.js +1 -0
  64. package/icc-api/model/Article.js.map +1 -1
  65. package/icc-api/model/CalendarItem.d.ts +6 -1
  66. package/icc-api/model/CalendarItem.js +1 -0
  67. package/icc-api/model/CalendarItem.js.map +1 -1
  68. package/icc-api/model/Classification.d.ts +4 -0
  69. package/icc-api/model/Classification.js +1 -0
  70. package/icc-api/model/Classification.js.map +1 -1
  71. package/icc-api/model/ClassificationTemplate.d.ts +2 -0
  72. package/icc-api/model/ClassificationTemplate.js.map +1 -1
  73. package/icc-api/model/Contact.d.ts +4 -0
  74. package/icc-api/model/Contact.js +1 -0
  75. package/icc-api/model/Contact.js.map +1 -1
  76. package/icc-api/model/Device.d.ts +4 -4
  77. package/icc-api/model/Device.js.map +1 -1
  78. package/icc-api/model/Document.d.ts +4 -0
  79. package/icc-api/model/Document.js +1 -0
  80. package/icc-api/model/Document.js.map +1 -1
  81. package/icc-api/model/ExchangeData.d.ts +61 -0
  82. package/icc-api/model/ExchangeData.js +12 -0
  83. package/icc-api/model/ExchangeData.js.map +1 -0
  84. package/icc-api/model/ExchangeDataMap.d.ts +21 -0
  85. package/icc-api/model/ExchangeDataMap.js +10 -0
  86. package/icc-api/model/ExchangeDataMap.js.map +1 -0
  87. package/icc-api/model/ExchangeDataMapCreationBatch.d.ts +13 -0
  88. package/icc-api/model/ExchangeDataMapCreationBatch.js +10 -0
  89. package/icc-api/model/ExchangeDataMapCreationBatch.js.map +1 -0
  90. package/icc-api/model/Form.d.ts +4 -0
  91. package/icc-api/model/Form.js +1 -0
  92. package/icc-api/model/Form.js.map +1 -1
  93. package/icc-api/model/FormTemplate.d.ts +2 -1
  94. package/icc-api/model/FormTemplate.js +2 -1
  95. package/icc-api/model/FormTemplate.js.map +1 -1
  96. package/icc-api/model/Group.d.ts +7 -0
  97. package/icc-api/model/Group.js.map +1 -1
  98. package/icc-api/model/GroupDatabasesInfo.d.ts +1 -0
  99. package/icc-api/model/GroupDatabasesInfo.js.map +1 -1
  100. package/icc-api/model/HealthElement.d.ts +4 -0
  101. package/icc-api/model/HealthElement.js +1 -0
  102. package/icc-api/model/HealthElement.js.map +1 -1
  103. package/icc-api/model/HealthcareParty.d.ts +2 -2
  104. package/icc-api/model/HealthcareParty.js.map +1 -1
  105. package/icc-api/model/IcureStub.d.ts +2 -0
  106. package/icc-api/model/IcureStub.js.map +1 -1
  107. package/icc-api/model/Invoice.d.ts +4 -0
  108. package/icc-api/model/Invoice.js +1 -0
  109. package/icc-api/model/Invoice.js.map +1 -1
  110. package/icc-api/model/MaintenanceTask.d.ts +4 -0
  111. package/icc-api/model/MaintenanceTask.js +1 -0
  112. package/icc-api/model/MaintenanceTask.js.map +1 -1
  113. package/icc-api/model/Message.d.ts +4 -0
  114. package/icc-api/model/Message.js +1 -0
  115. package/icc-api/model/Message.js.map +1 -1
  116. package/icc-api/model/OperationToken.d.ts +18 -0
  117. package/icc-api/model/OperationToken.js +21 -0
  118. package/icc-api/model/OperationToken.js.map +1 -0
  119. package/icc-api/model/PaginatedListExchangeData.d.ts +9 -0
  120. package/icc-api/model/PaginatedListExchangeData.js +10 -0
  121. package/icc-api/model/PaginatedListExchangeData.js.map +1 -0
  122. package/icc-api/model/Patient.d.ts +6 -2
  123. package/icc-api/model/Patient.js +1 -0
  124. package/icc-api/model/Patient.js.map +1 -1
  125. package/icc-api/model/PatientByHcPartyGenderEducationProfession.d.ts +31 -0
  126. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js +32 -0
  127. package/icc-api/model/PatientByHcPartyGenderEducationProfession.js.map +1 -0
  128. package/icc-api/model/Receipt.d.ts +4 -0
  129. package/icc-api/model/Receipt.js +1 -0
  130. package/icc-api/model/Receipt.js.map +1 -1
  131. package/icc-api/model/SecureDelegation.d.ts +52 -0
  132. package/icc-api/model/SecureDelegation.js +16 -0
  133. package/icc-api/model/SecureDelegation.js.map +1 -0
  134. package/icc-api/model/SecurityMetadata.d.ts +33 -0
  135. package/icc-api/model/SecurityMetadata.js +13 -0
  136. package/icc-api/model/SecurityMetadata.js.map +1 -0
  137. package/icc-api/model/Service.d.ts +2 -0
  138. package/icc-api/model/Service.js.map +1 -1
  139. package/icc-api/model/TimeTable.d.ts +4 -0
  140. package/icc-api/model/TimeTable.js +1 -0
  141. package/icc-api/model/TimeTable.js.map +1 -1
  142. package/icc-api/model/models.d.ts +20 -39
  143. package/icc-api/model/models.js +15 -37
  144. package/icc-api/model/models.js.map +1 -1
  145. package/icc-api/model/requests/EntityBulkShareResult.d.ts +28 -0
  146. package/icc-api/model/requests/EntityBulkShareResult.js +16 -0
  147. package/icc-api/model/requests/EntityBulkShareResult.js.map +1 -0
  148. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.d.ts +10 -0
  149. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js +17 -0
  150. package/icc-api/model/requests/EntityShareOrMetadataUpdateRequest.js.map +1 -0
  151. package/icc-api/model/requests/EntityShareRequest.d.ts +110 -0
  152. package/icc-api/model/requests/EntityShareRequest.js +63 -0
  153. package/icc-api/model/requests/EntityShareRequest.js.map +1 -0
  154. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.d.ts +54 -0
  155. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js +24 -0
  156. package/icc-api/model/requests/EntitySharedMetadataUpdateRequest.js.map +1 -0
  157. package/icc-api/model/requests/MinimalEntityBulkShareResult.d.ts +23 -0
  158. package/icc-api/model/requests/MinimalEntityBulkShareResult.js +13 -0
  159. package/icc-api/model/requests/MinimalEntityBulkShareResult.js.map +1 -0
  160. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.d.ts +21 -0
  161. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js +14 -0
  162. package/icc-api/model/requests/RejectedShareOrMetadataUpdateRequest.js.map +1 -0
  163. package/icc-x-api/basexapi/EncryptedEntityXApi.d.ts +3 -2
  164. package/icc-x-api/basexapi/EncryptedEntityXApi.js.map +1 -1
  165. package/icc-x-api/crypto/AES.js +1 -1
  166. package/icc-x-api/crypto/AES.js.map +1 -1
  167. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.d.ts +16 -0
  168. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js +41 -0
  169. package/icc-x-api/crypto/AccessControlKeysHeadersProvider.js.map +1 -0
  170. package/icc-x-api/crypto/AccessControlSecretUtils.d.ts +42 -0
  171. package/icc-x-api/crypto/AccessControlSecretUtils.js +86 -0
  172. package/icc-x-api/crypto/AccessControlSecretUtils.js.map +1 -0
  173. package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +146 -0
  174. package/icc-x-api/crypto/BaseExchangeDataManager.js +342 -0
  175. package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -0
  176. package/icc-x-api/crypto/BaseExchangeKeysManager.d.ts +0 -18
  177. package/icc-x-api/crypto/BaseExchangeKeysManager.js +11 -85
  178. package/icc-x-api/crypto/BaseExchangeKeysManager.js.map +1 -1
  179. package/icc-x-api/crypto/ConfidentialEntities.d.ts +26 -16
  180. package/icc-x-api/crypto/ConfidentialEntities.js +30 -17
  181. package/icc-x-api/crypto/ConfidentialEntities.js.map +1 -1
  182. package/icc-x-api/crypto/CryptoStrategies.d.ts +8 -1
  183. package/icc-x-api/crypto/CryptoStrategies.js.map +1 -1
  184. package/icc-x-api/crypto/ExchangeDataManager.d.ts +95 -0
  185. package/icc-x-api/crypto/ExchangeDataManager.js +493 -0
  186. package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -0
  187. package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +32 -0
  188. package/icc-x-api/crypto/ExchangeDataMapManager.js +70 -0
  189. package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -0
  190. package/icc-x-api/crypto/ExchangeKeysManager.d.ts +4 -16
  191. package/icc-x-api/crypto/ExchangeKeysManager.js +4 -62
  192. package/icc-x-api/crypto/ExchangeKeysManager.js.map +1 -1
  193. package/icc-x-api/crypto/ExtendedApisUtils.d.ts +336 -0
  194. package/icc-x-api/crypto/ExtendedApisUtils.js +3 -0
  195. package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -0
  196. package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +181 -0
  197. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +562 -0
  198. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -0
  199. package/icc-x-api/crypto/KeyRecovery.d.ts +5 -2
  200. package/icc-x-api/crypto/KeyRecovery.js +59 -29
  201. package/icc-x-api/crypto/KeyRecovery.js.map +1 -1
  202. package/icc-x-api/crypto/LegacyCryptoStrategies.d.ts +7 -2
  203. package/icc-x-api/crypto/LegacyCryptoStrategies.js +8 -1
  204. package/icc-x-api/crypto/LegacyCryptoStrategies.js.map +1 -1
  205. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.d.ts +39 -0
  206. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js +150 -0
  207. package/icc-x-api/crypto/LegacyDelegationSecurityMetadataDecryptor.js.map +1 -0
  208. package/icc-x-api/crypto/RSA.d.ts +34 -8
  209. package/icc-x-api/crypto/RSA.js +80 -13
  210. package/icc-x-api/crypto/RSA.js.map +1 -1
  211. package/icc-x-api/crypto/SecureDelegationsEncryption.d.ts +54 -0
  212. package/icc-x-api/crypto/SecureDelegationsEncryption.js +178 -0
  213. package/icc-x-api/crypto/SecureDelegationsEncryption.js.map +1 -0
  214. package/icc-x-api/crypto/SecureDelegationsManager.d.ts +66 -0
  215. package/icc-x-api/crypto/SecureDelegationsManager.js +261 -0
  216. package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -0
  217. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.d.ts +37 -0
  218. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js +294 -0
  219. package/icc-x-api/crypto/SecureDelegationsSecurityMetadataDecryptor.js.map +1 -0
  220. package/icc-x-api/crypto/SecurityMetadataDecryptor.d.ts +114 -0
  221. package/icc-x-api/crypto/SecurityMetadataDecryptor.js +98 -0
  222. package/icc-x-api/crypto/SecurityMetadataDecryptor.js.map +1 -0
  223. package/icc-x-api/crypto/ShamirKeysManager.d.ts +5 -5
  224. package/icc-x-api/crypto/ShamirKeysManager.js +6 -9
  225. package/icc-x-api/crypto/ShamirKeysManager.js.map +1 -1
  226. package/icc-x-api/crypto/TransferKeysManager.d.ts +8 -6
  227. package/icc-x-api/crypto/TransferKeysManager.js +75 -52
  228. package/icc-x-api/crypto/TransferKeysManager.js.map +1 -1
  229. package/icc-x-api/crypto/{KeyManager.d.ts → UserEncryptionKeysManager.d.ts} +4 -6
  230. package/icc-x-api/crypto/{KeyManager.js → UserEncryptionKeysManager.js} +43 -23
  231. package/icc-x-api/crypto/UserEncryptionKeysManager.js.map +1 -0
  232. package/icc-x-api/crypto/UserSignatureKeysManager.d.ts +26 -0
  233. package/icc-x-api/crypto/UserSignatureKeysManager.js +74 -0
  234. package/icc-x-api/crypto/UserSignatureKeysManager.js.map +1 -0
  235. package/icc-x-api/crypto/utils.d.ts +61 -11
  236. package/icc-x-api/crypto/utils.js +113 -44
  237. package/icc-x-api/crypto/utils.js.map +1 -1
  238. package/icc-x-api/filters/filters.js.map +1 -1
  239. package/icc-x-api/icc-accesslog-x-api.d.ts +46 -11
  240. package/icc-x-api/icc-accesslog-x-api.js +75 -42
  241. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  242. package/icc-x-api/icc-calendar-item-x-api.d.ts +50 -14
  243. package/icc-x-api/icc-calendar-item-x-api.js +99 -49
  244. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  245. package/icc-x-api/icc-classification-x-api.d.ts +44 -9
  246. package/icc-x-api/icc-classification-x-api.js +56 -31
  247. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  248. package/icc-x-api/icc-contact-x-api.d.ts +56 -32
  249. package/icc-x-api/icc-contact-x-api.js +95 -64
  250. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  251. package/icc-x-api/icc-crypto-x-api.d.ts +28 -334
  252. package/icc-x-api/icc-crypto-x-api.js +41 -765
  253. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  254. package/icc-x-api/icc-data-owner-x-api.d.ts +20 -8
  255. package/icc-x-api/icc-data-owner-x-api.js +31 -10
  256. package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
  257. package/icc-x-api/icc-document-x-api.d.ts +48 -11
  258. package/icc-x-api/icc-document-x-api.js +111 -64
  259. package/icc-x-api/icc-document-x-api.js.map +1 -1
  260. package/icc-x-api/icc-form-x-api.d.ts +45 -10
  261. package/icc-x-api/icc-form-x-api.js +65 -35
  262. package/icc-x-api/icc-form-x-api.js.map +1 -1
  263. package/icc-x-api/icc-hcparty-x-api.d.ts +2 -2
  264. package/icc-x-api/icc-hcparty-x-api.js +3 -3
  265. package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
  266. package/icc-x-api/icc-helement-x-api.d.ts +55 -18
  267. package/icc-x-api/icc-helement-x-api.js +76 -41
  268. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  269. package/icc-x-api/icc-icure-maintenance-x-api.d.ts +7 -2
  270. package/icc-x-api/icc-icure-maintenance-x-api.js +38 -27
  271. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  272. package/icc-x-api/icc-invoice-x-api.d.ts +50 -15
  273. package/icc-x-api/icc-invoice-x-api.js +63 -33
  274. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  275. package/icc-x-api/icc-maintenance-task-x-api.d.ts +53 -21
  276. package/icc-x-api/icc-maintenance-task-x-api.js +72 -35
  277. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  278. package/icc-x-api/icc-message-x-api.d.ts +53 -15
  279. package/icc-x-api/icc-message-x-api.js +65 -36
  280. package/icc-x-api/icc-message-x-api.js.map +1 -1
  281. package/icc-x-api/icc-patient-x-api.d.ts +84 -29
  282. package/icc-x-api/icc-patient-x-api.js +313 -378
  283. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  284. package/icc-x-api/icc-receipt-x-api.d.ts +44 -12
  285. package/icc-x-api/icc-receipt-x-api.js +67 -35
  286. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  287. package/icc-x-api/icc-time-table-x-api.d.ts +43 -12
  288. package/icc-x-api/icc-time-table-x-api.js +56 -26
  289. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  290. package/icc-x-api/icc-user-x-api.d.ts +2 -2
  291. package/icc-x-api/icc-user-x-api.js +3 -3
  292. package/icc-x-api/icc-user-x-api.js.map +1 -1
  293. package/icc-x-api/index.d.ts +4 -2
  294. package/icc-x-api/index.js +154 -135
  295. package/icc-x-api/index.js.map +1 -1
  296. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.d.ts +2 -0
  297. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js +9 -2
  298. package/icc-x-api/storage/DefaultStorageEntryKeysFactory.js.map +1 -1
  299. package/icc-x-api/storage/IcureStorageFacade.d.ts +23 -2
  300. package/icc-x-api/storage/IcureStorageFacade.js +36 -2
  301. package/icc-x-api/storage/IcureStorageFacade.js.map +1 -1
  302. package/icc-x-api/storage/KeyStorageFacade.d.ts +12 -0
  303. package/icc-x-api/storage/KeyStorageFacade.js.map +1 -1
  304. package/icc-x-api/storage/KeyStorageImpl.d.ts +2 -0
  305. package/icc-x-api/storage/KeyStorageImpl.js +10 -0
  306. package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
  307. package/icc-x-api/storage/StorageEntryKeysFactory.d.ts +14 -1
  308. package/icc-x-api/storage/StorageEntryKeysFactory.js.map +1 -1
  309. package/icc-x-api/utils/EntityWithDelegationTypeName.d.ts +32 -0
  310. package/icc-x-api/utils/EntityWithDelegationTypeName.js +75 -0
  311. package/icc-x-api/utils/EntityWithDelegationTypeName.js.map +1 -0
  312. package/icc-x-api/utils/ShareResult.d.ts +74 -0
  313. package/icc-x-api/utils/ShareResult.js +61 -0
  314. package/icc-x-api/utils/ShareResult.js.map +1 -0
  315. package/icc-x-api/utils/binary-utils.d.ts +1 -0
  316. package/icc-x-api/utils/binary-utils.js +8 -1
  317. package/icc-x-api/utils/binary-utils.js.map +1 -1
  318. package/icc-x-api/utils/collection-utils.d.ts +5 -0
  319. package/icc-x-api/utils/collection-utils.js +26 -1
  320. package/icc-x-api/utils/collection-utils.js.map +1 -1
  321. package/icc-x-api/utils/crypto-utils.d.ts +4 -3
  322. package/icc-x-api/utils/crypto-utils.js +5 -4
  323. package/icc-x-api/utils/crypto-utils.js.map +1 -1
  324. package/icc-x-api/utils/lru-temporised-async-cache.d.ts +26 -3
  325. package/icc-x-api/utils/lru-temporised-async-cache.js +75 -15
  326. package/icc-x-api/utils/lru-temporised-async-cache.js.map +1 -1
  327. package/icc-x-api/utils/websocket.d.ts +10 -10
  328. package/icc-x-api/utils/websocket.js +18 -9
  329. package/icc-x-api/utils/websocket.js.map +1 -1
  330. package/index.d.ts +1 -1
  331. package/index.js +3 -1
  332. package/index.js.map +1 -1
  333. package/package.json +2 -3
  334. package/icc-x-api/crypto/EntitiesEncryption.d.ts +0 -275
  335. package/icc-x-api/crypto/EntitiesEncryption.js +0 -734
  336. package/icc-x-api/crypto/EntitiesEncryption.js.map +0 -1
  337. 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,25 +118,35 @@ 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
  *
108
132
  * @summary Gets all form templates for current user
109
133
  * @param loadLayout
134
+ * @param raw
110
135
  */
111
- findFormTemplates(loadLayout) {
112
- let _body = null;
113
- const _url = this.host + `/form/template` + '?ts=' + new Date().getTime() + (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '');
114
- let headers = this.headers;
115
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
116
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
117
- .catch((err) => this.handleError(err));
136
+ findFormTemplates(loadLayout, raw) {
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
+ });
118
150
  }
119
151
  /**
120
152
  *
@@ -122,17 +154,20 @@ class IccFormApi {
122
154
  * @param specialityCode
123
155
  * @param loadLayout
124
156
  */
125
- findFormTemplatesBySpeciality(specialityCode, loadLayout) {
126
- let _body = null;
127
- const _url = this.host +
128
- `/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +
129
- '?ts=' +
130
- new Date().getTime() +
131
- (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '');
132
- let headers = this.headers;
133
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
134
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
135
- .catch((err) => this.handleError(err));
157
+ findFormTemplatesBySpeciality(specialityCode, loadLayout, raw) {
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
+ });
136
171
  }
137
172
  /**
138
173
  * Keys must be delimited by coma
@@ -144,21 +179,23 @@ class IccFormApi {
144
179
  * @param body
145
180
  */
146
181
  findFormsByHCPartyPatientForeignKeysUsingPost(hcPartyId, healthElementId, planOfActionId, formTemplateId, body) {
147
- let _body = null;
148
- _body = body;
149
- const _url = this.host +
150
- `/form/byHcPartySecretForeignKeys` +
151
- '?ts=' +
152
- new Date().getTime() +
153
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
154
- (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
155
- (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
156
- (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
157
- let headers = this.headers;
158
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
159
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
160
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
161
- .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
+ });
162
199
  }
163
200
  /**
164
201
  * Keys must be delimited by coma
@@ -170,20 +207,22 @@ class IccFormApi {
170
207
  * @param formTemplateId
171
208
  */
172
209
  findFormsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys, healthElementId, planOfActionId, formTemplateId) {
173
- let _body = null;
174
- const _url = this.host +
175
- `/form/byHcPartySecretForeignKeys` +
176
- '?ts=' +
177
- new Date().getTime() +
178
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
179
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
180
- (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +
181
- (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +
182
- (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '');
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 Form_1.Form(it)))
186
- .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
+ });
187
226
  }
188
227
  /**
189
228
  * Keys must be delimited by coma
@@ -192,18 +231,20 @@ class IccFormApi {
192
231
  * @param hcPartyId
193
232
  */
194
233
  findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
195
- let _body = null;
196
- _body = body;
197
- const _url = this.host +
198
- `/form/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));
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
+ });
207
248
  }
208
249
  /**
209
250
  *
@@ -212,17 +253,19 @@ class IccFormApi {
212
253
  * @param secretFKeys
213
254
  */
214
255
  findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
215
- let _body = null;
216
- const _url = this.host +
217
- `/form/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));
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
+ });
226
269
  }
227
270
  /**
228
271
  * Keys must be delimited by coma
@@ -231,12 +274,14 @@ class IccFormApi {
231
274
  * @param hcPartyId
232
275
  */
233
276
  getChildrenForms(formId, hcPartyId) {
234
- let _body = null;
235
- const _url = this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime();
236
- let headers = this.headers;
237
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
238
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
239
- .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
+ });
240
285
  }
241
286
  /**
242
287
  *
@@ -244,12 +289,14 @@ class IccFormApi {
244
289
  * @param formId
245
290
  */
246
291
  getForm(formId) {
247
- let _body = null;
248
- const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
249
- let headers = this.headers;
250
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
251
- .then((doc) => new Form_1.Form(doc.body))
252
- .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
+ });
253
300
  }
254
301
  /**
255
302
  *
@@ -257,12 +304,14 @@ class IccFormApi {
257
304
  * @param logicalUuid
258
305
  */
259
306
  getFormByLogicalUuid(logicalUuid) {
260
- let _body = null;
261
- const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
262
- let headers = this.headers;
263
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
264
- .then((doc) => new Form_1.Form(doc.body))
265
- .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
+ });
266
315
  }
267
316
  /**
268
317
  *
@@ -270,42 +319,55 @@ class IccFormApi {
270
319
  * @param uniqueId
271
320
  */
272
321
  getFormByUniqueId(uniqueId) {
273
- let _body = null;
274
- const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
275
- let headers = this.headers;
276
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
277
- .then((doc) => new Form_1.Form(doc.body))
278
- .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
+ });
279
330
  }
280
331
  /**
281
332
  *
282
333
  * @summary Gets a form template by guid
283
334
  * @param formTemplateId
335
+ * @param raw
284
336
  */
285
- getFormTemplate(formTemplateId) {
286
- let _body = null;
287
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
288
- let headers = this.headers;
289
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
290
- .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
291
- .catch((err) => this.handleError(err));
337
+ getFormTemplate(formTemplateId, raw) {
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
+ });
292
350
  }
293
351
  /**
294
352
  *
295
353
  * @summary Gets a form template
296
354
  * @param formTemplateGuid
297
355
  * @param specialityCode
356
+ * @param raw
298
357
  */
299
- getFormTemplatesByGuid(formTemplateGuid, specialityCode) {
300
- let _body = null;
301
- const _url = this.host +
302
- `/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +
303
- '?ts=' +
304
- new Date().getTime();
305
- let headers = this.headers;
306
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
307
- .then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
308
- .catch((err) => this.handleError(err));
358
+ getFormTemplatesByGuid(formTemplateGuid, specialityCode, raw) {
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
+ });
309
371
  }
310
372
  /**
311
373
  * Keys must be delimited by coma
@@ -313,14 +375,16 @@ class IccFormApi {
313
375
  * @param body
314
376
  */
315
377
  getForms(body) {
316
- let _body = null;
317
- _body = body;
318
- const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime();
319
- let headers = this.headers;
320
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
321
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
322
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
323
- .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
+ });
324
388
  }
325
389
  /**
326
390
  *
@@ -328,12 +392,14 @@ class IccFormApi {
328
392
  * @param logicalUuid
329
393
  */
330
394
  getFormsByLogicalUuid(logicalUuid) {
331
- let _body = null;
332
- const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime();
333
- let headers = this.headers;
334
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
335
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
336
- .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
+ });
337
403
  }
338
404
  /**
339
405
  *
@@ -341,12 +407,14 @@ class IccFormApi {
341
407
  * @param uniqueId
342
408
  */
343
409
  getFormsByUniqueId(uniqueId) {
344
- let _body = null;
345
- const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime();
346
- let headers = this.headers;
347
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
348
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
349
- .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
+ });
350
418
  }
351
419
  /**
352
420
  * Returns the modified form.
@@ -354,14 +422,16 @@ class IccFormApi {
354
422
  * @param body
355
423
  */
356
424
  modifyForm(body) {
357
- let _body = null;
358
- _body = body;
359
- const _url = this.host + `/form` + '?ts=' + new Date().getTime();
360
- let headers = this.headers;
361
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
362
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
363
- .then((doc) => new Form_1.Form(doc.body))
364
- .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
+ });
365
435
  }
366
436
  /**
367
437
  * Returns the modified forms.
@@ -369,14 +439,16 @@ class IccFormApi {
369
439
  * @param body
370
440
  */
371
441
  modifyForms(body) {
372
- let _body = null;
373
- _body = body;
374
- const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime();
375
- let headers = this.headers;
376
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
377
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
378
- .then((doc) => doc.body.map((it) => new Form_1.Form(it)))
379
- .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
+ });
380
452
  }
381
453
  /**
382
454
  * It delegates a form to a healthcare party. Returns the form with the new delegations.
@@ -385,14 +457,16 @@ class IccFormApi {
385
457
  * @param formId
386
458
  */
387
459
  newFormDelegations(formId, body) {
388
- let _body = null;
389
- _body = body;
390
- const _url = this.host + `/form/delegate/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime();
391
- let headers = this.headers;
392
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
393
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
394
- .then((doc) => new Form_1.Form(doc.body))
395
- .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
+ });
396
470
  }
397
471
  /**
398
472
  * Keys must be delimited by coma
@@ -400,14 +474,16 @@ class IccFormApi {
400
474
  * @param body
401
475
  */
402
476
  setFormsDelegations(body) {
403
- let _body = null;
404
- _body = body;
405
- const _url = this.host + `/form/delegations` + '?ts=' + new Date().getTime();
406
- let headers = this.headers;
407
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
408
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
409
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
410
- .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
+ });
411
487
  }
412
488
  /**
413
489
  *
@@ -416,19 +492,21 @@ class IccFormApi {
416
492
  * @param formTemplateId
417
493
  */
418
494
  setTemplateAttachmentMulti(attachment, formTemplateId) {
419
- let _body = null;
420
- if (attachment && !_body) {
421
- const parts = Array.isArray(attachment) ? attachment : [attachment];
422
- const _blob = new Blob(parts, { type: 'application/octet-stream' });
423
- _body = new FormData();
424
- _body.append('attachment', _blob);
425
- }
426
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime();
427
- let headers = this.headers;
428
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'multipart/form-data'));
429
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
430
- .then((doc) => JSON.parse(JSON.stringify(doc.body)))
431
- .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
+ });
432
510
  }
433
511
  /**
434
512
  * Returns an instance of created form template.
@@ -437,14 +515,42 @@ class IccFormApi {
437
515
  * @param formTemplateId
438
516
  */
439
517
  updateFormTemplate(formTemplateId, body) {
440
- let _body = null;
441
- _body = body;
442
- const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime();
443
- let headers = this.headers;
444
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
445
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
446
- .then((doc) => new FormTemplate_1.FormTemplate(doc.body))
447
- .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
+ });
448
554
  }
449
555
  }
450
556
  exports.IccFormApi = IccFormApi;