@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
@@ -32,10 +32,15 @@ const PaginatedListService_1 = require("../model/PaginatedListService");
32
32
  const Service_1 = require("../model/Service");
33
33
  const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
34
34
  const IccRestApiPath_1 = require("./IccRestApiPath");
35
+ const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
36
+ const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
35
37
  class IccContactApi {
38
+ get headers() {
39
+ return Promise.resolve(this._headers);
40
+ }
36
41
  constructor(host, headers, authenticationProvider, fetchImpl) {
37
42
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
38
- this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
43
+ this._headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
39
44
  this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
40
45
  this.fetchImpl = fetchImpl;
41
46
  }
@@ -49,17 +54,19 @@ class IccContactApi {
49
54
  * @param secretFKeys
50
55
  */
51
56
  closeForHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
52
- let _body = null;
53
- const _url = this.host +
54
- `/contact/byHcPartySecretForeignKeys/close` +
55
- '?ts=' +
56
- new Date().getTime() +
57
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
58
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
59
- let headers = this.headers;
60
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
61
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
62
- .catch((err) => this.handleError(err));
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ let _body = null;
59
+ const _url = this.host +
60
+ `/contact/byHcPartySecretForeignKeys/close` +
61
+ '?ts=' +
62
+ new Date().getTime() +
63
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
64
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
65
+ let headers = yield this.headers;
66
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
67
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
68
+ .catch((err) => this.handleError(err));
69
+ });
63
70
  }
64
71
  /**
65
72
  * Creates a contact with the current user and returns an instance of created contact afterward.
@@ -67,14 +74,16 @@ class IccContactApi {
67
74
  * @param body
68
75
  */
69
76
  createContact(body) {
70
- let _body = null;
71
- _body = body;
72
- const _url = this.host + `/contact` + '?ts=' + new Date().getTime();
73
- let headers = this.headers;
74
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
75
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
76
- .then((doc) => new Contact_1.Contact(doc.body))
77
- .catch((err) => this.handleError(err));
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ let _body = null;
79
+ _body = body;
80
+ const _url = this.host + `/contact` + '?ts=' + new Date().getTime();
81
+ let headers = yield this.headers;
82
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
83
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
84
+ .then((doc) => new Contact_1.Contact(doc.body))
85
+ .catch((err) => this.handleError(err));
86
+ });
78
87
  }
79
88
  /**
80
89
  * Returns the modified contacts.
@@ -82,14 +91,16 @@ class IccContactApi {
82
91
  * @param body
83
92
  */
84
93
  createContacts(body) {
85
- let _body = null;
86
- _body = body;
87
- const _url = this.host + `/contact/batch` + '?ts=' + new Date().getTime();
88
- let headers = this.headers;
89
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
90
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
91
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
92
- .catch((err) => this.handleError(err));
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ let _body = null;
96
+ _body = body;
97
+ const _url = this.host + `/contact/batch` + '?ts=' + new Date().getTime();
98
+ let headers = yield this.headers;
99
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
100
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
101
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
102
+ .catch((err) => this.handleError(err));
103
+ });
93
104
  }
94
105
  /**
95
106
  * Response is a set containing the ID's of deleted contacts.
@@ -97,12 +108,14 @@ class IccContactApi {
97
108
  * @param contactIds
98
109
  */
99
110
  deleteContacts(contactIds) {
100
- let _body = null;
101
- const _url = this.host + `/contact/${encodeURIComponent(String(contactIds))}` + '?ts=' + new Date().getTime();
102
- let headers = this.headers;
103
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
104
- .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
105
- .catch((err) => this.handleError(err));
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ let _body = null;
113
+ const _url = this.host + `/contact/${encodeURIComponent(String(contactIds))}` + '?ts=' + new Date().getTime();
114
+ let headers = yield this.headers;
115
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
116
+ .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
117
+ .catch((err) => this.handleError(err));
118
+ });
106
119
  }
107
120
  /**
108
121
  * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
@@ -112,19 +125,21 @@ class IccContactApi {
112
125
  * @param limit Number of rows
113
126
  */
114
127
  filterContactsBy(startDocumentId, limit, body) {
115
- let _body = null;
116
- _body = body;
117
- const _url = this.host +
118
- `/contact/filter` +
119
- '?ts=' +
120
- new Date().getTime() +
121
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
122
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
123
- let headers = this.headers;
124
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
125
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
126
- .then((doc) => new PaginatedListContact_1.PaginatedListContact(doc.body))
127
- .catch((err) => this.handleError(err));
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ let _body = null;
130
+ _body = body;
131
+ const _url = this.host +
132
+ `/contact/filter` +
133
+ '?ts=' +
134
+ new Date().getTime() +
135
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
136
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
137
+ let headers = yield this.headers;
138
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
139
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
140
+ .then((doc) => new PaginatedListContact_1.PaginatedListContact(doc.body))
141
+ .catch((err) => this.handleError(err));
142
+ });
128
143
  }
129
144
  /**
130
145
  * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
@@ -134,19 +149,21 @@ class IccContactApi {
134
149
  * @param limit Number of rows
135
150
  */
136
151
  filterServicesBy(startDocumentId, limit, body) {
137
- let _body = null;
138
- _body = body;
139
- const _url = this.host +
140
- `/contact/service/filter` +
141
- '?ts=' +
142
- new Date().getTime() +
143
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
144
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
145
- let headers = this.headers;
146
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
147
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
148
- .then((doc) => new PaginatedListService_1.PaginatedListService(doc.body))
149
- .catch((err) => this.handleError(err));
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ let _body = null;
154
+ _body = body;
155
+ const _url = this.host +
156
+ `/contact/service/filter` +
157
+ '?ts=' +
158
+ new Date().getTime() +
159
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
160
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
161
+ let headers = yield this.headers;
162
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
163
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
164
+ .then((doc) => new PaginatedListService_1.PaginatedListService(doc.body))
165
+ .catch((err) => this.handleError(err));
166
+ });
150
167
  }
151
168
  /**
152
169
  *
@@ -155,17 +172,19 @@ class IccContactApi {
155
172
  * @param formId
156
173
  */
157
174
  findByHCPartyFormId(hcPartyId, formId) {
158
- let _body = null;
159
- const _url = this.host +
160
- `/contact/byHcPartyFormId` +
161
- '?ts=' +
162
- new Date().getTime() +
163
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
164
- (formId ? '&formId=' + encodeURIComponent(String(formId)) : '');
165
- let headers = this.headers;
166
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
167
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
168
- .catch((err) => this.handleError(err));
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ let _body = null;
177
+ const _url = this.host +
178
+ `/contact/byHcPartyFormId` +
179
+ '?ts=' +
180
+ new Date().getTime() +
181
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
182
+ (formId ? '&formId=' + encodeURIComponent(String(formId)) : '');
183
+ let headers = yield 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 Contact_1.Contact(it)))
186
+ .catch((err) => this.handleError(err));
187
+ });
169
188
  }
170
189
  /**
171
190
  *
@@ -174,18 +193,20 @@ class IccContactApi {
174
193
  * @param hcPartyId
175
194
  */
176
195
  findByHCPartyFormIds(hcPartyId, body) {
177
- let _body = null;
178
- _body = body;
179
- const _url = this.host +
180
- `/contact/byHcPartyFormIds` +
181
- '?ts=' +
182
- new Date().getTime() +
183
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
184
- let headers = this.headers;
185
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
186
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
187
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
188
- .catch((err) => this.handleError(err));
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ let _body = null;
198
+ _body = body;
199
+ const _url = this.host +
200
+ `/contact/byHcPartyFormIds` +
201
+ '?ts=' +
202
+ new Date().getTime() +
203
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
204
+ let headers = yield this.headers;
205
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
206
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
207
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
208
+ .catch((err) => this.handleError(err));
209
+ });
189
210
  }
190
211
  /**
191
212
  * Keys must be delimited by coma
@@ -196,20 +217,22 @@ class IccContactApi {
196
217
  @param body
197
218
  */
198
219
  findByHCPartyPatientSecretFKeysUsingPost(hcPartyId, planOfActionsIds, skipClosedContacts, body) {
199
- let _body = null;
200
- _body = body;
201
- const _url = this.host +
202
- `/contact/byHcPartySecretForeignKeys` +
203
- '?ts=' +
204
- new Date().getTime() +
205
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
206
- (planOfActionsIds ? '&planOfActionsIds=' + encodeURIComponent(String(planOfActionsIds)) : '') +
207
- (skipClosedContacts ? '&skipClosedContacts=' + encodeURIComponent(String(skipClosedContacts)) : '');
208
- let headers = this.headers;
209
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
210
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
211
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
212
- .catch((err) => this.handleError(err));
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ let _body = null;
222
+ _body = body;
223
+ const _url = this.host +
224
+ `/contact/byHcPartySecretForeignKeys` +
225
+ '?ts=' +
226
+ new Date().getTime() +
227
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
228
+ (planOfActionsIds ? '&planOfActionsIds=' + encodeURIComponent(String(planOfActionsIds)) : '') +
229
+ (skipClosedContacts ? '&skipClosedContacts=' + encodeURIComponent(String(skipClosedContacts)) : '');
230
+ let headers = yield this.headers;
231
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
232
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
233
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
234
+ .catch((err) => this.handleError(err));
235
+ });
213
236
  }
214
237
  /**
215
238
  * Keys must be delimited by coma
@@ -220,19 +243,21 @@ class IccContactApi {
220
243
  * @param skipClosedContacts
221
244
  */
222
245
  findByHCPartyPatientSecretFKeys(hcPartyId, secretFKeys, planOfActionsIds, skipClosedContacts) {
223
- let _body = null;
224
- const _url = this.host +
225
- `/contact/byHcPartySecretForeignKeys` +
226
- '?ts=' +
227
- new Date().getTime() +
228
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
229
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
230
- (planOfActionsIds ? '&planOfActionsIds=' + encodeURIComponent(String(planOfActionsIds)) : '') +
231
- (skipClosedContacts ? '&skipClosedContacts=' + encodeURIComponent(String(skipClosedContacts)) : '');
232
- let headers = this.headers;
233
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
234
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
235
- .catch((err) => this.handleError(err));
246
+ return __awaiter(this, void 0, void 0, function* () {
247
+ let _body = null;
248
+ const _url = this.host +
249
+ `/contact/byHcPartySecretForeignKeys` +
250
+ '?ts=' +
251
+ new Date().getTime() +
252
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
253
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +
254
+ (planOfActionsIds ? '&planOfActionsIds=' + encodeURIComponent(String(planOfActionsIds)) : '') +
255
+ (skipClosedContacts ? '&skipClosedContacts=' + encodeURIComponent(String(skipClosedContacts)) : '');
256
+ let headers = yield this.headers;
257
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
258
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
259
+ .catch((err) => this.handleError(err));
260
+ });
236
261
  }
237
262
  /**
238
263
  *
@@ -241,17 +266,19 @@ class IccContactApi {
241
266
  * @param serviceId
242
267
  */
243
268
  findByHCPartyServiceId(hcPartyId, serviceId) {
244
- let _body = null;
245
- const _url = this.host +
246
- `/contact/byHcPartyServiceId` +
247
- '?ts=' +
248
- new Date().getTime() +
249
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
250
- (serviceId ? '&serviceId=' + encodeURIComponent(String(serviceId)) : '');
251
- let headers = this.headers;
252
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
253
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
254
- .catch((err) => this.handleError(err));
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ let _body = null;
271
+ const _url = this.host +
272
+ `/contact/byHcPartyServiceId` +
273
+ '?ts=' +
274
+ new Date().getTime() +
275
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
276
+ (serviceId ? '&serviceId=' + encodeURIComponent(String(serviceId)) : '');
277
+ let headers = yield this.headers;
278
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
279
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
280
+ .catch((err) => this.handleError(err));
281
+ });
255
282
  }
256
283
  /**
257
284
  *
@@ -259,16 +286,18 @@ class IccContactApi {
259
286
  * @param externalId
260
287
  */
261
288
  findContactsByExternalId(externalId) {
262
- let _body = null;
263
- const _url = this.host +
264
- `/contact/byExternalId` +
265
- '?ts=' +
266
- new Date().getTime() +
267
- (externalId ? '&externalId=' + encodeURIComponent(String(externalId)) : '');
268
- let headers = this.headers;
269
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
270
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
271
- .catch((err) => this.handleError(err));
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ let _body = null;
291
+ const _url = this.host +
292
+ `/contact/byExternalId` +
293
+ '?ts=' +
294
+ new Date().getTime() +
295
+ (externalId ? '&externalId=' + encodeURIComponent(String(externalId)) : '');
296
+ let headers = yield this.headers;
297
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
298
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
299
+ .catch((err) => this.handleError(err));
300
+ });
272
301
  }
273
302
  /**
274
303
  *
@@ -277,18 +306,20 @@ class IccContactApi {
277
306
  * @param hcPartyId
278
307
  */
279
308
  findContactsByHCPartyPatientForeignKeys(hcPartyId, body) {
280
- let _body = null;
281
- _body = body;
282
- const _url = this.host +
283
- `/contact/byHcPartyPatientForeignKeys` +
284
- '?ts=' +
285
- new Date().getTime() +
286
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
287
- let headers = this.headers;
288
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
289
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
290
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
291
- .catch((err) => this.handleError(err));
309
+ return __awaiter(this, void 0, void 0, function* () {
310
+ let _body = null;
311
+ _body = body;
312
+ const _url = this.host +
313
+ `/contact/byHcPartyPatientForeignKeys` +
314
+ '?ts=' +
315
+ new Date().getTime() +
316
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
317
+ let headers = yield this.headers;
318
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
319
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
320
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
321
+ .catch((err) => this.handleError(err));
322
+ });
292
323
  }
293
324
  /**
294
325
  * Keys must be delimited by coma
@@ -297,18 +328,20 @@ class IccContactApi {
297
328
  * @param hcPartyId
298
329
  */
299
330
  findContactsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId, body) {
300
- let _body = null;
301
- _body = body;
302
- const _url = this.host +
303
- `/contact/byHcPartySecretForeignKeys/delegations` +
304
- '?ts=' +
305
- new Date().getTime() +
306
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
307
- let headers = this.headers;
308
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
309
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
310
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
311
- .catch((err) => this.handleError(err));
331
+ return __awaiter(this, void 0, void 0, function* () {
332
+ let _body = null;
333
+ _body = body;
334
+ const _url = this.host +
335
+ `/contact/byHcPartySecretForeignKeys/delegations` +
336
+ '?ts=' +
337
+ new Date().getTime() +
338
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
339
+ let headers = yield this.headers;
340
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
341
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
342
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
343
+ .catch((err) => this.handleError(err));
344
+ });
312
345
  }
313
346
  /**
314
347
  *
@@ -317,17 +350,19 @@ class IccContactApi {
317
350
  * @param secretFKeys
318
351
  */
319
352
  findContactsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys) {
320
- let _body = null;
321
- const _url = this.host +
322
- `/contact/byHcPartySecretForeignKeys/delegations` +
323
- '?ts=' +
324
- new Date().getTime() +
325
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
326
- (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
327
- let headers = this.headers;
328
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
329
- .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
330
- .catch((err) => this.handleError(err));
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ let _body = null;
355
+ const _url = this.host +
356
+ `/contact/byHcPartySecretForeignKeys/delegations` +
357
+ '?ts=' +
358
+ new Date().getTime() +
359
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +
360
+ (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '');
361
+ let headers = yield this.headers;
362
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
363
+ .then((doc) => doc.body.map((it) => new IcureStub_1.IcureStub(it)))
364
+ .catch((err) => this.handleError(err));
365
+ });
331
366
  }
332
367
  /**
333
368
  * Gets a contact based on its id
@@ -335,12 +370,14 @@ class IccContactApi {
335
370
  * @param contactId
336
371
  */
337
372
  getContact(contactId) {
338
- let _body = null;
339
- const _url = this.host + `/contact/${encodeURIComponent(String(contactId))}` + '?ts=' + new Date().getTime();
340
- let headers = this.headers;
341
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
342
- .then((doc) => new Contact_1.Contact(doc.body))
343
- .catch((err) => this.handleError(err));
373
+ return __awaiter(this, void 0, void 0, function* () {
374
+ let _body = null;
375
+ const _url = this.host + `/contact/${encodeURIComponent(String(contactId))}` + '?ts=' + new Date().getTime();
376
+ let headers = yield this.headers;
377
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
378
+ .then((doc) => new Contact_1.Contact(doc.body))
379
+ .catch((err) => this.handleError(err));
380
+ });
344
381
  }
345
382
  /**
346
383
  * Gets a service based on its id
@@ -351,7 +388,7 @@ class IccContactApi {
351
388
  return __awaiter(this, void 0, void 0, function* () {
352
389
  let _body = null;
353
390
  const _url = this.host + `/contact/service/${encodeURIComponent(String(serviceId))}` + '?ts=' + new Date().getTime();
354
- let headers = this.headers;
391
+ let headers = yield this.headers;
355
392
  return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
356
393
  .then((doc) => new Service_1.Service(doc.body))
357
394
  .catch((err) => this.handleError(err));
@@ -363,26 +400,30 @@ class IccContactApi {
363
400
  * @param body
364
401
  */
365
402
  getContacts(body) {
366
- let _body = null;
367
- _body = body;
368
- const _url = this.host + `/contact/byIds` + '?ts=' + new Date().getTime();
369
- let headers = this.headers;
370
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
371
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
372
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
373
- .catch((err) => this.handleError(err));
403
+ return __awaiter(this, void 0, void 0, function* () {
404
+ let _body = null;
405
+ _body = body;
406
+ const _url = this.host + `/contact/byIds` + '?ts=' + new Date().getTime();
407
+ let headers = yield this.headers;
408
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
409
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
410
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
411
+ .catch((err) => this.handleError(err));
412
+ });
374
413
  }
375
414
  /**
376
415
  *
377
416
  * @summary Get an empty content
378
417
  */
379
418
  getEmptyContent() {
380
- let _body = null;
381
- const _url = this.host + `/contact/service/content/empty` + '?ts=' + new Date().getTime();
382
- let headers = this.headers;
383
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
384
- .then((doc) => new Content_1.Content(doc.body))
385
- .catch((err) => this.handleError(err));
419
+ return __awaiter(this, void 0, void 0, function* () {
420
+ let _body = null;
421
+ const _url = this.host + `/contact/service/content/empty` + '?ts=' + new Date().getTime();
422
+ let headers = yield this.headers;
423
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
424
+ .then((doc) => new Content_1.Content(doc.body))
425
+ .catch((err) => this.handleError(err));
426
+ });
386
427
  }
387
428
  /**
388
429
  *
@@ -391,15 +432,17 @@ class IccContactApi {
391
432
  * @param minOccurences
392
433
  */
393
434
  getServiceCodesOccurences(codeType, minOccurences) {
394
- let _body = null;
395
- const _url = this.host +
396
- `/contact/service/codes/${encodeURIComponent(String(codeType))}/${encodeURIComponent(String(minOccurences))}` +
397
- '?ts=' +
398
- new Date().getTime();
399
- let headers = this.headers;
400
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
401
- .then((doc) => doc.body.map((it) => new LabelledOccurence_1.LabelledOccurence(it)))
402
- .catch((err) => this.handleError(err));
435
+ return __awaiter(this, void 0, void 0, function* () {
436
+ let _body = null;
437
+ const _url = this.host +
438
+ `/contact/service/codes/${encodeURIComponent(String(codeType))}/${encodeURIComponent(String(minOccurences))}` +
439
+ '?ts=' +
440
+ new Date().getTime();
441
+ let headers = yield this.headers;
442
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
443
+ .then((doc) => doc.body.map((it) => new LabelledOccurence_1.LabelledOccurence(it)))
444
+ .catch((err) => this.handleError(err));
445
+ });
403
446
  }
404
447
  /**
405
448
  * Returns a list of contacts.
@@ -411,20 +454,22 @@ class IccContactApi {
411
454
  * @param limit Number of rows
412
455
  */
413
456
  listContactsByOpeningDate(startKey, endKey, hcpartyid, startDocumentId, limit) {
414
- let _body = null;
415
- const _url = this.host +
416
- `/contact/byOpeningDate` +
417
- '?ts=' +
418
- new Date().getTime() +
419
- (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
420
- (endKey ? '&endKey=' + encodeURIComponent(String(endKey)) : '') +
421
- (hcpartyid ? '&hcpartyid=' + encodeURIComponent(String(hcpartyid)) : '') +
422
- (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
423
- (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
424
- let headers = this.headers;
425
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
426
- .then((doc) => new PaginatedListContact_1.PaginatedListContact(doc.body))
427
- .catch((err) => this.handleError(err));
457
+ return __awaiter(this, void 0, void 0, function* () {
458
+ let _body = null;
459
+ const _url = this.host +
460
+ `/contact/byOpeningDate` +
461
+ '?ts=' +
462
+ new Date().getTime() +
463
+ (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +
464
+ (endKey ? '&endKey=' + encodeURIComponent(String(endKey)) : '') +
465
+ (hcpartyid ? '&hcpartyid=' + encodeURIComponent(String(hcpartyid)) : '') +
466
+ (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
467
+ (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
468
+ let headers = yield this.headers;
469
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
470
+ .then((doc) => new PaginatedListContact_1.PaginatedListContact(doc.body))
471
+ .catch((err) => this.handleError(err));
472
+ });
428
473
  }
429
474
  /**
430
475
  * Returns a list of services
@@ -432,14 +477,16 @@ class IccContactApi {
432
477
  * @param body
433
478
  */
434
479
  listServices(body) {
435
- let _body = null;
436
- _body = body;
437
- const _url = this.host + `/contact/service/byIds` + '?ts=' + new Date().getTime();
438
- let headers = this.headers;
439
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
440
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
441
- .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
442
- .catch((err) => this.handleError(err));
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ let _body = null;
482
+ _body = body;
483
+ const _url = this.host + `/contact/service/byIds` + '?ts=' + new Date().getTime();
484
+ let headers = yield this.headers;
485
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
486
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
487
+ .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
488
+ .catch((err) => this.handleError(err));
489
+ });
443
490
  }
444
491
  /**
445
492
  * Returns a list of services
@@ -447,16 +494,18 @@ class IccContactApi {
447
494
  * @param associationId
448
495
  */
449
496
  listServicesByAssociationId(associationId) {
450
- let _body = null;
451
- const _url = this.host +
452
- `/contact/service/associationId` +
453
- '?ts=' +
454
- new Date().getTime() +
455
- (associationId ? '&associationId=' + encodeURIComponent(String(associationId)) : '');
456
- let headers = this.headers;
457
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
458
- .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
459
- .catch((err) => this.handleError(err));
497
+ return __awaiter(this, void 0, void 0, function* () {
498
+ let _body = null;
499
+ const _url = this.host +
500
+ `/contact/service/associationId` +
501
+ '?ts=' +
502
+ new Date().getTime() +
503
+ (associationId ? '&associationId=' + encodeURIComponent(String(associationId)) : '');
504
+ let headers = yield this.headers;
505
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
506
+ .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
507
+ .catch((err) => this.handleError(err));
508
+ });
460
509
  }
461
510
  /**
462
511
  * Returns the list of services linked to the provided health element id
@@ -465,16 +514,18 @@ class IccContactApi {
465
514
  * @param hcPartyId hcPartyId
466
515
  */
467
516
  listServicesByHealthElementId(healthElementId, hcPartyId) {
468
- let _body = null;
469
- const _url = this.host +
470
- `/contact/service/healthElementId/${encodeURIComponent(String(healthElementId))}` +
471
- '?ts=' +
472
- new Date().getTime() +
473
- (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
474
- let headers = this.headers;
475
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
476
- .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
477
- .catch((err) => this.handleError(err));
517
+ return __awaiter(this, void 0, void 0, function* () {
518
+ let _body = null;
519
+ const _url = this.host +
520
+ `/contact/service/healthElementId/${encodeURIComponent(String(healthElementId))}` +
521
+ '?ts=' +
522
+ new Date().getTime() +
523
+ (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '');
524
+ let headers = yield this.headers;
525
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
526
+ .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
527
+ .catch((err) => this.handleError(err));
528
+ });
478
529
  }
479
530
  /**
480
531
  * Returns a list of services
@@ -483,14 +534,16 @@ class IccContactApi {
483
534
  * @param linkType The type of the link
484
535
  */
485
536
  listServicesLinkedTo(linkType, body) {
486
- let _body = null;
487
- _body = body;
488
- const _url = this.host + `/contact/service/linkedTo` + '?ts=' + new Date().getTime() + (linkType ? '&linkType=' + encodeURIComponent(String(linkType)) : '');
489
- let headers = this.headers;
490
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
491
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
492
- .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
493
- .catch((err) => this.handleError(err));
537
+ return __awaiter(this, void 0, void 0, function* () {
538
+ let _body = null;
539
+ _body = body;
540
+ const _url = this.host + `/contact/service/linkedTo` + '?ts=' + new Date().getTime() + (linkType ? '&linkType=' + encodeURIComponent(String(linkType)) : '');
541
+ let headers = yield this.headers;
542
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
543
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
544
+ .then((doc) => doc.body.map((it) => new Service_1.Service(it)))
545
+ .catch((err) => this.handleError(err));
546
+ });
494
547
  }
495
548
  /**
496
549
  *
@@ -498,14 +551,16 @@ class IccContactApi {
498
551
  * @param body
499
552
  */
500
553
  matchContactsBy(body) {
501
- let _body = null;
502
- _body = body;
503
- const _url = this.host + `/contact/match` + '?ts=' + new Date().getTime();
504
- let headers = this.headers;
505
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
506
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
507
- .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
508
- .catch((err) => this.handleError(err));
554
+ return __awaiter(this, void 0, void 0, function* () {
555
+ let _body = null;
556
+ _body = body;
557
+ const _url = this.host + `/contact/match` + '?ts=' + new Date().getTime();
558
+ let headers = yield this.headers;
559
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
560
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
561
+ .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
562
+ .catch((err) => this.handleError(err));
563
+ });
509
564
  }
510
565
  /**
511
566
  *
@@ -513,14 +568,16 @@ class IccContactApi {
513
568
  * @param body
514
569
  */
515
570
  matchServicesBy(body) {
516
- let _body = null;
517
- _body = body;
518
- const _url = this.host + `/contact/service/match` + '?ts=' + new Date().getTime();
519
- let headers = this.headers;
520
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
521
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
522
- .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
523
- .catch((err) => this.handleError(err));
571
+ return __awaiter(this, void 0, void 0, function* () {
572
+ let _body = null;
573
+ _body = body;
574
+ const _url = this.host + `/contact/service/match` + '?ts=' + new Date().getTime();
575
+ let headers = yield this.headers;
576
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
577
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
578
+ .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
579
+ .catch((err) => this.handleError(err));
580
+ });
524
581
  }
525
582
  /**
526
583
  * Returns the modified contact.
@@ -528,14 +585,16 @@ class IccContactApi {
528
585
  * @param body
529
586
  */
530
587
  modifyContact(body) {
531
- let _body = null;
532
- _body = body;
533
- const _url = this.host + `/contact` + '?ts=' + new Date().getTime();
534
- let headers = this.headers;
535
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
536
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
537
- .then((doc) => new Contact_1.Contact(doc.body))
538
- .catch((err) => this.handleError(err));
588
+ return __awaiter(this, void 0, void 0, function* () {
589
+ let _body = null;
590
+ _body = body;
591
+ const _url = this.host + `/contact` + '?ts=' + new Date().getTime();
592
+ let headers = yield this.headers;
593
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
594
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
595
+ .then((doc) => new Contact_1.Contact(doc.body))
596
+ .catch((err) => this.handleError(err));
597
+ });
539
598
  }
540
599
  /**
541
600
  * Returns the modified contacts.
@@ -543,14 +602,16 @@ class IccContactApi {
543
602
  * @param body
544
603
  */
545
604
  modifyContacts(body) {
546
- let _body = null;
547
- _body = body;
548
- const _url = this.host + `/contact/batch` + '?ts=' + new Date().getTime();
549
- let headers = this.headers;
550
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
551
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
552
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
553
- .catch((err) => this.handleError(err));
605
+ return __awaiter(this, void 0, void 0, function* () {
606
+ let _body = null;
607
+ _body = body;
608
+ const _url = this.host + `/contact/batch` + '?ts=' + new Date().getTime();
609
+ let headers = yield this.headers;
610
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
611
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
612
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
613
+ .catch((err) => this.handleError(err));
614
+ });
554
615
  }
555
616
  /**
556
617
  * It delegates a contact to a healthcare party (By current healthcare party). Returns the contact with new delegations.
@@ -559,14 +620,16 @@ class IccContactApi {
559
620
  * @param contactId
560
621
  */
561
622
  newContactDelegations(contactId, body) {
562
- let _body = null;
563
- _body = body;
564
- const _url = this.host + `/contact/${encodeURIComponent(String(contactId))}/delegate` + '?ts=' + new Date().getTime();
565
- let headers = this.headers;
566
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
567
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
568
- .then((doc) => new Contact_1.Contact(doc.body))
569
- .catch((err) => this.handleError(err));
623
+ return __awaiter(this, void 0, void 0, function* () {
624
+ let _body = null;
625
+ _body = body;
626
+ const _url = this.host + `/contact/${encodeURIComponent(String(contactId))}/delegate` + '?ts=' + new Date().getTime();
627
+ let headers = yield this.headers;
628
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
629
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
630
+ .then((doc) => new Contact_1.Contact(doc.body))
631
+ .catch((err) => this.handleError(err));
632
+ });
570
633
  }
571
634
  /**
572
635
  * Keys must be delimited by coma
@@ -574,14 +637,42 @@ class IccContactApi {
574
637
  * @param body
575
638
  */
576
639
  setContactsDelegations(body) {
577
- let _body = null;
578
- _body = body;
579
- const _url = this.host + `/contact/delegations` + '?ts=' + new Date().getTime();
580
- let headers = this.headers;
581
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
582
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
583
- .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
584
- .catch((err) => this.handleError(err));
640
+ return __awaiter(this, void 0, void 0, function* () {
641
+ let _body = null;
642
+ _body = body;
643
+ const _url = this.host + `/contact/delegations` + '?ts=' + new Date().getTime();
644
+ let headers = yield this.headers;
645
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
646
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
647
+ .then((doc) => doc.body.map((it) => new Contact_1.Contact(it)))
648
+ .catch((err) => this.handleError(err));
649
+ });
650
+ }
651
+ /**
652
+ * @internal this method is for internal use only and may be changed without notice
653
+ */
654
+ bulkShareContacts(request) {
655
+ return __awaiter(this, void 0, void 0, function* () {
656
+ const _url = this.host + '/contact/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime();
657
+ let headers = yield this.headers;
658
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
659
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
660
+ .then((doc) => doc.body.map((x) => new EntityBulkShareResult_1.EntityBulkShareResult(x, Contact_1.Contact)))
661
+ .catch((err) => this.handleError(err));
662
+ });
663
+ }
664
+ /**
665
+ * @internal this method is for internal use only and may be changed without notice
666
+ */
667
+ bulkShareContactsMinimal(request) {
668
+ return __awaiter(this, void 0, void 0, function* () {
669
+ const _url = this.host + '/contact/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime();
670
+ let headers = yield this.headers;
671
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
672
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
673
+ .then((doc) => doc.body.map((x) => new MinimalEntityBulkShareResult_1.MinimalEntityBulkShareResult(x)))
674
+ .catch((err) => this.handleError(err));
675
+ });
585
676
  }
586
677
  }
587
678
  exports.IccContactApi = IccContactApi;