@icure/api 8.6.18 → 8.7.0

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 (328) hide show
  1. package/icc-api/api/IccDocumentApi.d.ts +10 -2
  2. package/icc-api/api/IccDocumentApi.js +22 -4
  3. package/icc-api/api/IccDocumentApi.js.map +1 -1
  4. package/icc-api/api/IccReceiptApi.d.ts +17 -0
  5. package/icc-api/api/IccReceiptApi.js +52 -0
  6. package/icc-api/api/IccReceiptApi.js.map +1 -1
  7. package/icc-api/model/DataAttachment.d.ts +22 -0
  8. package/icc-api/model/DataAttachment.js.map +1 -1
  9. package/icc-api/model/Document.d.ts +6 -0
  10. package/icc-api/model/Document.js.map +1 -1
  11. package/icc-api/model/Receipt.d.ts +6 -0
  12. package/icc-api/model/Receipt.js.map +1 -1
  13. package/icc-x-api/crypto/BaseExchangeDataManager.js +2 -2
  14. package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -1
  15. package/icc-x-api/crypto/ExchangeDataManager.js +3 -3
  16. package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -1
  17. package/icc-x-api/crypto/ExtendedApisUtils.d.ts +1 -1
  18. package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -1
  19. package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +1 -1
  20. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +8 -2
  21. package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -1
  22. package/icc-x-api/crypto/RecoveryDataEncryption.js.map +1 -1
  23. package/icc-x-api/icc-accesslog-x-api.js +7 -7
  24. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  25. package/icc-x-api/icc-calendar-item-x-api.js +7 -7
  26. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  27. package/icc-x-api/icc-classification-x-api.js +4 -5
  28. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  29. package/icc-x-api/icc-code-x-api.d.ts +2 -2
  30. package/icc-x-api/icc-code-x-api.js +3 -33
  31. package/icc-x-api/icc-code-x-api.js.map +1 -1
  32. package/icc-x-api/icc-contact-x-api.js +20 -33
  33. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  34. package/icc-x-api/icc-doctemplate-x-api.js.map +1 -1
  35. package/icc-x-api/icc-document-x-api.d.ts +8 -7
  36. package/icc-x-api/icc-document-x-api.js +64 -22
  37. package/icc-x-api/icc-document-x-api.js.map +1 -1
  38. package/icc-x-api/icc-form-x-api.js +3 -4
  39. package/icc-x-api/icc-form-x-api.js.map +1 -1
  40. package/icc-x-api/icc-helement-x-api.js +11 -11
  41. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  42. package/icc-x-api/icc-invoice-x-api.js +3 -4
  43. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  44. package/icc-x-api/icc-maintenance-task-x-api.js +3 -3
  45. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  46. package/icc-x-api/icc-patient-x-api.js +29 -29
  47. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  48. package/icc-x-api/icc-receipt-x-api.d.ts +40 -0
  49. package/icc-x-api/icc-receipt-x-api.js +79 -1
  50. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  51. package/icc-x-api/icc-topic-x-api.js.map +1 -1
  52. package/icc-x-api/index.js +1 -1
  53. package/icc-x-api/index.js.map +1 -1
  54. package/icc-x-api/utils/code-util.d.ts +23 -0
  55. package/icc-x-api/utils/code-util.js +39 -2
  56. package/icc-x-api/utils/code-util.js.map +1 -1
  57. package/icc-x-api/utils/collection-utils.d.ts +13 -0
  58. package/icc-x-api/utils/collection-utils.js +69 -0
  59. package/icc-x-api/utils/collection-utils.js.map +1 -1
  60. package/icc-x-api/utils/compression-utils.d.ts +28 -0
  61. package/icc-x-api/utils/compression-utils.js +106 -0
  62. package/icc-x-api/utils/compression-utils.js.map +1 -0
  63. package/icc-x-api/utils/crypto-utils.js +7 -7
  64. package/icc-x-api/utils/crypto-utils.js.map +1 -1
  65. package/icc-x-api/utils/formatting-util.d.ts +1 -3
  66. package/icc-x-api/utils/formatting-util.js +15 -17
  67. package/icc-x-api/utils/formatting-util.js.map +1 -1
  68. package/icc-x-api/utils/hcp-util.js +2 -3
  69. package/icc-x-api/utils/hcp-util.js.map +1 -1
  70. package/icc-x-api/utils/insurability-util.js +10 -8
  71. package/icc-x-api/utils/insurability-util.js.map +1 -1
  72. package/icc-x-api/utils/lzma-wasm.d.ts +6 -0
  73. package/icc-x-api/utils/lzma-wasm.js +81 -0
  74. package/icc-x-api/utils/lzma-wasm.js.map +1 -0
  75. package/icc-x-api/utils/mutex.d.ts +12 -0
  76. package/icc-x-api/utils/mutex.js +26 -0
  77. package/icc-x-api/utils/mutex.js.map +1 -0
  78. package/icc-x-api/utils/websocket.js +7 -7
  79. package/icc-x-api/utils/websocket.js.map +1 -1
  80. package/icc-x-api/wasm/lzma/lzma.js +2 -0
  81. package/icc-x-api/wasm/lzma/lzma.wasm +0 -0
  82. package/package.json +2 -11
  83. package/icc-x-api/utils/uuid-encoder.d.ts +0 -44
  84. package/icc-x-api/utils/uuid-encoder.js +0 -114
  85. package/icc-x-api/utils/uuid-encoder.js.map +0 -1
  86. package/test/icc-api/api/IccAgendaApi.d.ts +0 -1
  87. package/test/icc-api/api/IccAgendaApi.js +0 -64
  88. package/test/icc-api/api/IccAgendaApi.js.map +0 -1
  89. package/test/icc-api/api/IccAnonymousAccessApi.d.ts +0 -1
  90. package/test/icc-api/api/IccAnonymousAccessApi.js +0 -58
  91. package/test/icc-api/api/IccAnonymousAccessApi.js.map +0 -1
  92. package/test/icc-api/api/IccCalendarItemApi.d.ts +0 -1
  93. package/test/icc-api/api/IccCalendarItemApi.js +0 -67
  94. package/test/icc-api/api/IccCalendarItemApi.js.map +0 -1
  95. package/test/icc-api/api/IccCalendarItemTypeApi.d.ts +0 -1
  96. package/test/icc-api/api/IccCalendarItemTypeApi.js +0 -96
  97. package/test/icc-api/api/IccCalendarItemTypeApi.js.map +0 -1
  98. package/test/icc-api/api/IccCodeApi.d.ts +0 -1
  99. package/test/icc-api/api/IccCodeApi.js +0 -38
  100. package/test/icc-api/api/IccCodeApi.js.map +0 -1
  101. package/test/icc-api/api/IccDocumentApi.d.ts +0 -1
  102. package/test/icc-api/api/IccDocumentApi.js +0 -199
  103. package/test/icc-api/api/IccDocumentApi.js.map +0 -1
  104. package/test/icc-api/api/IccGroupApi.d.ts +0 -1
  105. package/test/icc-api/api/IccGroupApi.js +0 -50
  106. package/test/icc-api/api/IccGroupApi.js.map +0 -1
  107. package/test/icc-api/api/IccKeywordApi.d.ts +0 -1
  108. package/test/icc-api/api/IccKeywordApi.js +0 -64
  109. package/test/icc-api/api/IccKeywordApi.js.map +0 -1
  110. package/test/icc-api/api/IccMedicalLocationApi.d.ts +0 -1
  111. package/test/icc-api/api/IccMedicalLocationApi.js +0 -64
  112. package/test/icc-api/api/IccMedicalLocationApi.js.map +0 -1
  113. package/test/icc-api/api/IccPlaceApi.d.ts +0 -1
  114. package/test/icc-api/api/IccPlaceApi.js +0 -64
  115. package/test/icc-api/api/IccPlaceApi.js.map +0 -1
  116. package/test/icc-api/api/IccRecoveryDataApi.d.ts +0 -1
  117. package/test/icc-api/api/IccRecoveryDataApi.js +0 -95
  118. package/test/icc-api/api/IccRecoveryDataApi.js.map +0 -1
  119. package/test/icc-api/api/IccRoleApi.d.ts +0 -1
  120. package/test/icc-api/api/IccRoleApi.js +0 -34
  121. package/test/icc-api/api/IccRoleApi.js.map +0 -1
  122. package/test/icc-api/api/IccUserApi.d.ts +0 -1
  123. package/test/icc-api/api/IccUserApi.js +0 -96
  124. package/test/icc-api/api/IccUserApi.js.map +0 -1
  125. package/test/icc-api/e2e/IccCalendarItemApi.d.ts +0 -1
  126. package/test/icc-api/e2e/IccCalendarItemApi.js +0 -46
  127. package/test/icc-api/e2e/IccCalendarItemApi.js.map +0 -1
  128. package/test/icc-api/model/modelHelpersTest.d.ts +0 -1
  129. package/test/icc-api/model/modelHelpersTest.js +0 -45
  130. package/test/icc-api/model/modelHelpersTest.js.map +0 -1
  131. package/test/icc-x-api/auth/group-switch-test.d.ts +0 -1
  132. package/test/icc-x-api/auth/group-switch-test.js +0 -81
  133. package/test/icc-x-api/auth/group-switch-test.js.map +0 -1
  134. package/test/icc-x-api/auth/jwt-concurrency-test.d.ts +0 -2
  135. package/test/icc-x-api/auth/jwt-concurrency-test.js +0 -112
  136. package/test/icc-x-api/auth/jwt-concurrency-test.js.map +0 -1
  137. package/test/icc-x-api/auth/jwt-provider-test.d.ts +0 -1
  138. package/test/icc-x-api/auth/jwt-provider-test.js +0 -197
  139. package/test/icc-x-api/auth/jwt-provider-test.js.map +0 -1
  140. package/test/icc-x-api/auth/smart-auth-provider-test.d.ts +0 -1
  141. package/test/icc-x-api/auth/smart-auth-provider-test.js +0 -224
  142. package/test/icc-x-api/auth/smart-auth-provider-test.js.map +0 -1
  143. package/test/icc-x-api/autofix-anonymity-test.d.ts +0 -1
  144. package/test/icc-x-api/autofix-anonymity-test.js +0 -122
  145. package/test/icc-x-api/autofix-anonymity-test.js.map +0 -1
  146. package/test/icc-x-api/confidential-entities-test.d.ts +0 -1
  147. package/test/icc-x-api/confidential-entities-test.js +0 -168
  148. package/test/icc-x-api/confidential-entities-test.js.map +0 -1
  149. package/test/icc-x-api/crud/comprehensive-crud-test.d.ts +0 -1
  150. package/test/icc-x-api/crud/comprehensive-crud-test.js +0 -276
  151. package/test/icc-x-api/crud/comprehensive-crud-test.js.map +0 -1
  152. package/test/icc-x-api/crud/entities-crud-test-interface.d.ts +0 -16
  153. package/test/icc-x-api/crud/entities-crud-test-interface.js +0 -408
  154. package/test/icc-x-api/crud/entities-crud-test-interface.js.map +0 -1
  155. package/test/icc-x-api/crypto/anonymous-delegations-test.d.ts +0 -1
  156. package/test/icc-x-api/crypto/anonymous-delegations-test.js +0 -587
  157. package/test/icc-x-api/crypto/anonymous-delegations-test.js.map +0 -1
  158. package/test/icc-x-api/crypto/concurrency.d.ts +0 -1
  159. package/test/icc-x-api/crypto/concurrency.js +0 -35
  160. package/test/icc-x-api/crypto/concurrency.js.map +0 -1
  161. package/test/icc-x-api/crypto/crypto-utils.d.ts +0 -1
  162. package/test/icc-x-api/crypto/crypto-utils.js +0 -79
  163. package/test/icc-x-api/crypto/crypto-utils.js.map +0 -1
  164. package/test/icc-x-api/crypto/cryptoTest.d.ts +0 -2
  165. package/test/icc-x-api/crypto/cryptoTest.js +0 -402
  166. package/test/icc-x-api/crypto/cryptoTest.js.map +0 -1
  167. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.d.ts +0 -1
  168. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js +0 -166
  169. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js.map +0 -1
  170. package/test/icc-x-api/crypto/exchange-data-manager-test.d.ts +0 -1
  171. package/test/icc-x-api/crypto/exchange-data-manager-test.js +0 -674
  172. package/test/icc-x-api/crypto/exchange-data-manager-test.js.map +0 -1
  173. package/test/icc-x-api/crypto/full-crypto-test.d.ts +0 -1
  174. package/test/icc-x-api/crypto/full-crypto-test.js +0 -454
  175. package/test/icc-x-api/crypto/full-crypto-test.js.map +0 -1
  176. package/test/icc-x-api/crypto/legacy-metadata-migration-test.d.ts +0 -1
  177. package/test/icc-x-api/crypto/legacy-metadata-migration-test.js +0 -379
  178. package/test/icc-x-api/crypto/legacy-metadata-migration-test.js.map +0 -1
  179. package/test/icc-x-api/crypto/secure-delegations-manager-test.d.ts +0 -1
  180. package/test/icc-x-api/crypto/secure-delegations-manager-test.js +0 -278
  181. package/test/icc-x-api/crypto/secure-delegations-manager-test.js.map +0 -1
  182. package/test/icc-x-api/crypto/shamir.d.ts +0 -2
  183. package/test/icc-x-api/crypto/shamir.js +0 -167
  184. package/test/icc-x-api/crypto/shamir.js.map +0 -1
  185. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.d.ts +0 -1
  186. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js +0 -71
  187. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js.map +0 -1
  188. package/test/icc-x-api/crypto/soft-deleted-data-owners.d.ts +0 -2
  189. package/test/icc-x-api/crypto/soft-deleted-data-owners.js +0 -113
  190. package/test/icc-x-api/crypto/soft-deleted-data-owners.js.map +0 -1
  191. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.d.ts +0 -1
  192. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js +0 -246
  193. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js.map +0 -1
  194. package/test/icc-x-api/entity-with-attachments-api-test.d.ts +0 -1
  195. package/test/icc-x-api/entity-with-attachments-api-test.js +0 -142
  196. package/test/icc-x-api/entity-with-attachments-api-test.js.map +0 -1
  197. package/test/icc-x-api/filters/filters.d.ts +0 -1
  198. package/test/icc-x-api/filters/filters.js +0 -49
  199. package/test/icc-x-api/filters/filters.js.map +0 -1
  200. package/test/icc-x-api/filters/healthelement.d.ts +0 -1
  201. package/test/icc-x-api/filters/healthelement.js +0 -333
  202. package/test/icc-x-api/filters/healthelement.js.map +0 -1
  203. package/test/icc-x-api/icc-accesslog-x-api.d.ts +0 -1
  204. package/test/icc-x-api/icc-accesslog-x-api.js +0 -106
  205. package/test/icc-x-api/icc-accesslog-x-api.js.map +0 -1
  206. package/test/icc-x-api/icc-application-settings-x-api.d.ts +0 -1
  207. package/test/icc-x-api/icc-application-settings-x-api.js +0 -91
  208. package/test/icc-x-api/icc-application-settings-x-api.js.map +0 -1
  209. package/test/icc-x-api/icc-auth-api.d.ts +0 -1
  210. package/test/icc-x-api/icc-auth-api.js +0 -47
  211. package/test/icc-x-api/icc-auth-api.js.map +0 -1
  212. package/test/icc-x-api/icc-calendar-item-x-api.d.ts +0 -1
  213. package/test/icc-x-api/icc-calendar-item-x-api.js +0 -150
  214. package/test/icc-x-api/icc-calendar-item-x-api.js.map +0 -1
  215. package/test/icc-x-api/icc-contact-x-api.d.ts +0 -1
  216. package/test/icc-x-api/icc-contact-x-api.js +0 -355
  217. package/test/icc-x-api/icc-contact-x-api.js.map +0 -1
  218. package/test/icc-x-api/icc-document-x-api.d.ts +0 -1
  219. package/test/icc-x-api/icc-document-x-api.js +0 -76
  220. package/test/icc-x-api/icc-document-x-api.js.map +0 -1
  221. package/test/icc-x-api/icc-form-x-api.d.ts +0 -1
  222. package/test/icc-x-api/icc-form-x-api.js +0 -413
  223. package/test/icc-x-api/icc-form-x-api.js.map +0 -1
  224. package/test/icc-x-api/icc-hcparty-x-api-test.d.ts +0 -1
  225. package/test/icc-x-api/icc-hcparty-x-api-test.js +0 -43
  226. package/test/icc-x-api/icc-hcparty-x-api-test.js.map +0 -1
  227. package/test/icc-x-api/icc-helement-x-api-test.d.ts +0 -1
  228. package/test/icc-x-api/icc-helement-x-api-test.js +0 -155
  229. package/test/icc-x-api/icc-helement-x-api-test.js.map +0 -1
  230. package/test/icc-x-api/icc-invoice-x-api.d.ts +0 -1
  231. package/test/icc-x-api/icc-invoice-x-api.js +0 -99
  232. package/test/icc-x-api/icc-invoice-x-api.js.map +0 -1
  233. package/test/icc-x-api/icc-maintenance-task-x-api-test.d.ts +0 -1
  234. package/test/icc-x-api/icc-maintenance-task-x-api-test.js +0 -222
  235. package/test/icc-x-api/icc-maintenance-task-x-api-test.js.map +0 -1
  236. package/test/icc-x-api/icc-message-x-api.d.ts +0 -1
  237. package/test/icc-x-api/icc-message-x-api.js +0 -54
  238. package/test/icc-x-api/icc-message-x-api.js.map +0 -1
  239. package/test/icc-x-api/icc-patient-x-api-test.d.ts +0 -1
  240. package/test/icc-x-api/icc-patient-x-api-test.js +0 -165
  241. package/test/icc-x-api/icc-patient-x-api-test.js.map +0 -1
  242. package/test/icc-x-api/icc-recovery-x-api.d.ts +0 -1
  243. package/test/icc-x-api/icc-recovery-x-api.js +0 -175
  244. package/test/icc-x-api/icc-recovery-x-api.js.map +0 -1
  245. package/test/icc-x-api/icc-topic-x-api.d.ts +0 -1
  246. package/test/icc-x-api/icc-topic-x-api.js +0 -269
  247. package/test/icc-x-api/icc-topic-x-api.js.map +0 -1
  248. package/test/icc-x-api/icc-user-x-api-test.d.ts +0 -1
  249. package/test/icc-x-api/icc-user-x-api-test.js +0 -99
  250. package/test/icc-x-api/icc-user-x-api-test.js.map +0 -1
  251. package/test/icc-x-api/keyless-api.d.ts +0 -1
  252. package/test/icc-x-api/keyless-api.js +0 -125
  253. package/test/icc-x-api/keyless-api.js.map +0 -1
  254. package/test/icc-x-api/patient-user.d.ts +0 -2
  255. package/test/icc-x-api/patient-user.js +0 -103
  256. package/test/icc-x-api/patient-user.js.map +0 -1
  257. package/test/icc-x-api/storage/storage.d.ts +0 -1
  258. package/test/icc-x-api/storage/storage.js +0 -48
  259. package/test/icc-x-api/storage/storage.js.map +0 -1
  260. package/test/icc-x-api/test-api-no-parent.d.ts +0 -1
  261. package/test/icc-x-api/test-api-no-parent.js +0 -79
  262. package/test/icc-x-api/test-api-no-parent.js.map +0 -1
  263. package/test/icc-x-api/test-legacy-data-support.d.ts +0 -1
  264. package/test/icc-x-api/test-legacy-data-support.js +0 -375
  265. package/test/icc-x-api/test-legacy-data-support.js.map +0 -1
  266. package/test/icc-x-api/utils/graph-test.d.ts +0 -1
  267. package/test/icc-x-api/utils/graph-test.js +0 -54
  268. package/test/icc-x-api/utils/graph-test.js.map +0 -1
  269. package/test/icc-x-api/utils/lru-temporised-async-cache-test.d.ts +0 -1
  270. package/test/icc-x-api/utils/lru-temporised-async-cache-test.js +0 -364
  271. package/test/icc-x-api/utils/lru-temporised-async-cache-test.js.map +0 -1
  272. package/test/support/CSM-185.d.ts +0 -1
  273. package/test/support/CSM-185.js +0 -124
  274. package/test/support/CSM-185.js.map +0 -1
  275. package/test/support/CSM-243.d.ts +0 -1
  276. package/test/support/CSM-243.js +0 -120
  277. package/test/support/CSM-243.js.map +0 -1
  278. package/test/support/CSM-543.d.ts +0 -1
  279. package/test/support/CSM-543.js +0 -164
  280. package/test/support/CSM-543.js.map +0 -1
  281. package/test/support/CSM-729.d.ts +0 -1
  282. package/test/support/CSM-729.js +0 -225
  283. package/test/support/CSM-729.js.map +0 -1
  284. package/test/support/CSM-87.d.ts +0 -0
  285. package/test/support/CSM-87.js +0 -21
  286. package/test/support/CSM-87.js.map +0 -1
  287. package/test/support/CSM-93.d.ts +0 -1
  288. package/test/support/CSM-93.js +0 -112
  289. package/test/support/CSM-93.js.map +0 -1
  290. package/test/utils/FakeDataOwnerApi.d.ts +0 -32
  291. package/test/utils/FakeDataOwnerApi.js +0 -136
  292. package/test/utils/FakeDataOwnerApi.js.map +0 -1
  293. package/test/utils/FakeEncryptionKeysManager.d.ts +0 -36
  294. package/test/utils/FakeEncryptionKeysManager.js +0 -98
  295. package/test/utils/FakeEncryptionKeysManager.js.map +0 -1
  296. package/test/utils/FakeExchangeDataApi.d.ts +0 -32
  297. package/test/utils/FakeExchangeDataApi.js +0 -92
  298. package/test/utils/FakeExchangeDataApi.js.map +0 -1
  299. package/test/utils/FakeExchangeDataManager.d.ts +0 -48
  300. package/test/utils/FakeExchangeDataManager.js +0 -82
  301. package/test/utils/FakeExchangeDataManager.js.map +0 -1
  302. package/test/utils/FakeExchangeDataMapManager.d.ts +0 -12
  303. package/test/utils/FakeExchangeDataMapManager.js +0 -38
  304. package/test/utils/FakeExchangeDataMapManager.js.map +0 -1
  305. package/test/utils/FakeGenericApi.d.ts +0 -16
  306. package/test/utils/FakeGenericApi.js +0 -65
  307. package/test/utils/FakeGenericApi.js.map +0 -1
  308. package/test/utils/KeylessCryptoStrategies.d.ts +0 -23
  309. package/test/utils/KeylessCryptoStrategies.js +0 -26
  310. package/test/utils/KeylessCryptoStrategies.js.map +0 -1
  311. package/test/utils/TestApi.d.ts +0 -3
  312. package/test/utils/TestApi.js +0 -30
  313. package/test/utils/TestApi.js.map +0 -1
  314. package/test/utils/TestCollectionUtils.d.ts +0 -1
  315. package/test/utils/TestCollectionUtils.js +0 -109
  316. package/test/utils/TestCollectionUtils.js.map +0 -1
  317. package/test/utils/TestCryptoStrategies.d.ts +0 -42
  318. package/test/utils/TestCryptoStrategies.js +0 -80
  319. package/test/utils/TestCryptoStrategies.js.map +0 -1
  320. package/test/utils/TestStorage.d.ts +0 -23
  321. package/test/utils/TestStorage.js +0 -61
  322. package/test/utils/TestStorage.js.map +0 -1
  323. package/test/utils/roles.d.ts +0 -14
  324. package/test/utils/roles.js +0 -345
  325. package/test/utils/roles.js.map +0 -1
  326. package/test/utils/test_utils.d.ts +0 -87
  327. package/test/utils/test_utils.js +0 -452
  328. package/test/utils/test_utils.js.map +0 -1
@@ -1,408 +0,0 @@
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
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.entities = void 0;
13
- const crypto_1 = require("crypto");
14
- const ListOfIds_1 = require("../../../icc-api/model/ListOfIds");
15
- const Agenda_1 = require("../../../icc-api/model/Agenda");
16
- const CalendarItemType_1 = require("../../../icc-api/model/CalendarItemType");
17
- const ClassificationTemplate_1 = require("../../../icc-api/model/ClassificationTemplate");
18
- const Device_1 = require("../../../icc-api/model/Device");
19
- const HealthcareParty_1 = require("../../../icc-api/model/HealthcareParty");
20
- const Insurance_1 = require("../../../icc-api/model/Insurance");
21
- const Invoice_1 = require("../../../icc-api/model/Invoice");
22
- const Keyword_1 = require("../../../icc-api/model/Keyword");
23
- const MedicalLocation_1 = require("../../../icc-api/model/MedicalLocation");
24
- const Place_1 = require("../../../icc-api/model/Place");
25
- const TimeTable_1 = require("../../../icc-api/model/TimeTable");
26
- exports.entities = {
27
- AccessLog: {
28
- encryptable: true,
29
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
30
- const currentUser = yield api.userApi.getCurrentUser();
31
- const accessLog = yield api.accessLogApi.newInstance(currentUser, patient, { detail: (0, crypto_1.randomUUID)() });
32
- return api.accessLogApi.createAccessLogWithUser(currentUser, accessLog);
33
- }),
34
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
35
- var _a, _b;
36
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
37
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
38
- if (!delegateId) {
39
- throw new Error('Cannot share with non data owner user');
40
- }
41
- return delegatorApi.accessLogApi.shareWith(delegateId, entity);
42
- }),
43
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.accessLogApi.deleteAccessLogs(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
44
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.accessLogApi.deleteAccessLog(id.id); }),
45
- },
46
- Agenda: {
47
- skipDenied: true,
48
- encryptable: false,
49
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.agendaApi.createAgenda(new Agenda_1.Agenda({ id: (0, crypto_1.randomUUID)(), name: (0, crypto_1.randomUUID)() })); }),
50
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
51
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.agendaApi.deleteAgendas(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
52
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.agendaApi.deleteAgenda(id.id); }),
53
- },
54
- CalendarItem: {
55
- encryptable: true,
56
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
57
- const currentUser = yield api.userApi.getCurrentUser();
58
- const item = yield api.calendarItemApi.newInstance(currentUser, { title: (0, crypto_1.randomUUID)() });
59
- return api.calendarItemApi.createCalendarItemWithHcParty(currentUser, item);
60
- }),
61
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
62
- var _a, _b;
63
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
64
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
65
- if (!delegateId) {
66
- throw new Error('Cannot share with non data owner user');
67
- }
68
- return delegatorApi.calendarItemApi.shareWith(delegateId, entity);
69
- }),
70
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.calendarItemApi.deleteCalendarItems(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
71
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.calendarItemApi.deleteCalendarItem(id.id); }),
72
- },
73
- CalendarItemType: {
74
- skipDenied: true,
75
- encryptable: false,
76
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.calendarItemTypeApi.createCalendarItemType(new CalendarItemType_1.CalendarItemType({ id: (0, crypto_1.randomUUID)(), color: (0, crypto_1.randomUUID)() })); }),
77
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
78
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.calendarItemTypeApi.deleteCalendarItemTypes(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
79
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
80
- return api.calendarItemTypeApi.deleteCalendarItemTypes(new ListOfIds_1.ListOfIds({ ids: [id.id] })).then((r) => {
81
- if (r.length === 0)
82
- throw Error('No element deleted');
83
- else
84
- return r[0];
85
- });
86
- }),
87
- },
88
- Classification: {
89
- encryptable: true,
90
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
91
- const currentUser = yield api.userApi.getCurrentUser();
92
- const item = yield api.classificationApi.newInstance(currentUser, patient, { label: (0, crypto_1.randomUUID)() });
93
- return api.classificationApi.createClassification(item);
94
- }),
95
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
96
- var _a, _b;
97
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
98
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
99
- if (!delegateId) {
100
- throw new Error('Cannot share with non data owner user');
101
- }
102
- return delegatorApi.classificationApi.shareWith(delegateId, entity);
103
- }),
104
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.classificationApi.deleteClassifications(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
105
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.classificationApi.deleteClassification(id.id); }),
106
- },
107
- ClassificationTemplate: {
108
- encryptable: false,
109
- skipDenied: true,
110
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.classificationTemplateApi.createClassificationTemplate(new ClassificationTemplate_1.ClassificationTemplate({ id: (0, crypto_1.randomUUID)(), label: (0, crypto_1.randomUUID)() })); }),
111
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
112
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.classificationTemplateApi.deleteClassificationTemplates(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
113
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.classificationTemplateApi.deleteClassificationTemplate(id.id); }),
114
- },
115
- Contact: {
116
- encryptable: true,
117
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
118
- const currentUser = yield api.userApi.getCurrentUser();
119
- const item = yield api.contactApi.newInstance(currentUser, patient, { descr: (0, crypto_1.randomUUID)() });
120
- return (yield api.contactApi.createContactWithUser(currentUser, item));
121
- }),
122
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
123
- var _a, _b;
124
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
125
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
126
- if (!delegateId) {
127
- throw new Error('Cannot share with non data owner user');
128
- }
129
- return delegatorApi.contactApi.shareWith(delegateId, entity);
130
- }),
131
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.contactApi.deleteContacts(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
132
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.contactApi.deleteContact(id.id); }),
133
- },
134
- Device: {
135
- encryptable: false,
136
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.deviceApi.createDevice(new Device_1.Device({ id: (0, crypto_1.randomUUID)(), name: (0, crypto_1.randomUUID)() })); }),
137
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
138
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.deviceApi.deleteDevices(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
139
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.deviceApi.deleteDevice(id.id); }),
140
- },
141
- Document: {
142
- encryptable: true,
143
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
144
- const currentUser = yield api.userApi.getCurrentUser();
145
- const item = yield api.documentApi.newInstance(currentUser, patient, { name: (0, crypto_1.randomUUID)() });
146
- return api.documentApi.createDocument(item);
147
- }),
148
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
149
- var _a, _b;
150
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
151
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
152
- if (!delegateId) {
153
- throw new Error('Cannot share with non data owner user');
154
- }
155
- return delegatorApi.documentApi.shareWith(delegateId, entity);
156
- }),
157
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.documentApi.deleteDocuments(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
158
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.documentApi.deleteDocument(id.id); }),
159
- },
160
- Form: {
161
- encryptable: true,
162
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
163
- const currentUser = yield api.userApi.getCurrentUser();
164
- const item = yield api.formApi.newInstance(currentUser, patient, { uniqueId: (0, crypto_1.randomUUID)() });
165
- return api.formApi.createForm(item);
166
- }),
167
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
168
- var _a, _b;
169
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
170
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
171
- if (!delegateId) {
172
- throw new Error('Cannot share with non data owner user');
173
- }
174
- return delegatorApi.formApi.shareWith(delegateId, entity);
175
- }),
176
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.formApi.deleteForms(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
177
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.formApi.deleteForm(id.id); }),
178
- },
179
- HealthcareParty: {
180
- encryptable: false,
181
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcarePartyApi.createHealthcareParty(new HealthcareParty_1.HealthcareParty({ id: (0, crypto_1.randomUUID)(), name: (0, crypto_1.randomUUID)() })); }),
182
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
183
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcarePartyApi.deleteHealthcareParties(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
184
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcarePartyApi.deleteHealthcareParty(id.id); }),
185
- },
186
- HealthcarePartyInGroup: {
187
- encryptable: false,
188
- cloudOnly: true,
189
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcarePartyApi.createHealthcareParty(new HealthcareParty_1.HealthcareParty({ id: (0, crypto_1.randomUUID)(), name: (0, crypto_1.randomUUID)() })); }),
190
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
191
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () {
192
- const currentUser = yield api.userApi.getCurrentUser();
193
- return api.healthcarePartyApi.deleteHealthcarePartiesInGroup(currentUser.groupId, new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) }));
194
- }),
195
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
196
- const currentUser = yield api.userApi.getCurrentUser();
197
- return api.healthcarePartyApi.deleteHealthcarePartyInGroup(currentUser.groupId, id.id);
198
- }),
199
- },
200
- HealthcareElement: {
201
- encryptable: true,
202
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
203
- const currentUser = yield api.userApi.getCurrentUser();
204
- const item = yield api.healthcareElementApi.newInstance(currentUser, patient, { descr: (0, crypto_1.randomUUID)() });
205
- return api.healthcareElementApi.createHealthElementWithUser(currentUser, item);
206
- }),
207
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
208
- var _a, _b;
209
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
210
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
211
- if (!delegateId) {
212
- throw new Error('Cannot share with non data owner user');
213
- }
214
- return delegatorApi.healthcareElementApi.shareWith(delegateId, entity);
215
- }),
216
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcareElementApi.deleteHealthElements(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
217
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.healthcareElementApi.deleteHealthElement(id.id); }),
218
- },
219
- Insurance: {
220
- encryptable: false,
221
- skipDenied: true,
222
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.insuranceApi.createInsurance(new Insurance_1.Insurance({ id: (0, crypto_1.randomUUID)(), code: (0, crypto_1.randomUUID)() })); }),
223
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
224
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () {
225
- const ret = [];
226
- for (const id of ids) {
227
- const result = yield api.insuranceApi.deleteInsurance(id.id);
228
- ret.push(result);
229
- }
230
- return ret;
231
- }),
232
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.insuranceApi.deleteInsurance(id.id); }),
233
- },
234
- Invoice: {
235
- encryptable: false,
236
- skipDenied: true,
237
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.invoiceApi.createInvoice(new Invoice_1.Invoice({ id: (0, crypto_1.randomUUID)(), recipientId: (0, crypto_1.randomUUID)() })); }),
238
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
239
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () {
240
- const ret = [];
241
- for (const id of ids) {
242
- const result = yield api.invoiceApi.deleteInvoice(id.id);
243
- ret.push(result);
244
- }
245
- return ret;
246
- }),
247
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.invoiceApi.deleteInvoice(id.id); }),
248
- },
249
- Keyword: {
250
- encryptable: false,
251
- skipDenied: true,
252
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.keywordApi.createKeyword(new Keyword_1.Keyword({ id: (0, crypto_1.randomUUID)(), value: (0, crypto_1.randomUUID)() })); }),
253
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
254
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.keywordApi.deleteKeywords(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
255
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
256
- return api.keywordApi.deleteKeywords(new ListOfIds_1.ListOfIds({ ids: [id.id] })).then((r) => {
257
- if (r.length === 0)
258
- throw new Error('No keyword deleted');
259
- else
260
- return r[0];
261
- });
262
- }),
263
- },
264
- MaintenanceTask: {
265
- encryptable: true,
266
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
267
- const currentUser = yield api.userApi.getCurrentUser();
268
- const item = yield api.maintenanceTaskApi.newInstance(currentUser, {});
269
- return (yield api.maintenanceTaskApi.createMaintenanceTaskWithUser(currentUser, item));
270
- }),
271
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
272
- var _a, _b;
273
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
274
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
275
- if (!delegateId) {
276
- throw new Error('Cannot share with non data owner user');
277
- }
278
- return delegatorApi.maintenanceTaskApi.shareWith(delegateId, entity);
279
- }),
280
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () {
281
- const currentUser = yield api.userApi.getCurrentUser();
282
- return api.maintenanceTaskApi.deleteMaintenanceTasksWithUser(currentUser, new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) }));
283
- }),
284
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
285
- const currentUser = yield api.userApi.getCurrentUser();
286
- return api.maintenanceTaskApi.deleteMaintenanceTaskWithUser(currentUser, id.id);
287
- }),
288
- },
289
- MedicalLocation: {
290
- encryptable: false,
291
- skipDenied: true,
292
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.medicalLocationApi.createMedicalLocation(new MedicalLocation_1.MedicalLocation({ id: (0, crypto_1.randomUUID)(), nihii: (0, crypto_1.randomUUID)() })); }),
293
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
294
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.medicalLocationApi.deleteMedicalLocations(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
295
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
296
- return api.medicalLocationApi.deleteMedicalLocations(new ListOfIds_1.ListOfIds({ ids: [id.id] })).then((r) => {
297
- if (r.length === 0)
298
- throw new Error('No medical location deleted');
299
- else
300
- return r[0];
301
- });
302
- }),
303
- },
304
- Message: {
305
- encryptable: true,
306
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
307
- const currentUser = yield api.userApi.getCurrentUser();
308
- const item = yield api.messageApi.newInstance(currentUser, {});
309
- return api.messageApi.createMessage(item);
310
- }),
311
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
312
- var _a, _b;
313
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
314
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
315
- if (!delegateId) {
316
- throw new Error('Cannot share with non data owner user');
317
- }
318
- return delegatorApi.messageApi.shareWith(delegateId, entity, []);
319
- }),
320
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.messageApi.deleteMessages(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
321
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.messageApi.deleteMessage(id.id); }),
322
- },
323
- Patient: {
324
- encryptable: true,
325
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
326
- const currentUser = yield api.userApi.getCurrentUser();
327
- const item = yield api.patientApi.newInstance(currentUser, {});
328
- return api.patientApi.createPatientWithUser(currentUser, item);
329
- }),
330
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
331
- var _a, _b;
332
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
333
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
334
- if (!delegateId) {
335
- throw new Error('Cannot share with non data owner user');
336
- }
337
- return delegatorApi.patientApi.shareWith(delegateId, entity, []);
338
- }),
339
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.patientApi.deletePatients(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
340
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.patientApi.deletePatient(id.id); }),
341
- },
342
- Place: {
343
- encryptable: false,
344
- skipDenied: true,
345
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () { return api.placeApi.createPlace(new Place_1.Place({ id: (0, crypto_1.randomUUID)(), name: (0, crypto_1.randomUUID)() })); }),
346
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
347
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.placeApi.deletePlaces(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
348
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () {
349
- return api.placeApi.deletePlaces(new ListOfIds_1.ListOfIds({ ids: [id.id] })).then((r) => {
350
- if (r.length === 0)
351
- throw new Error('No place deleted');
352
- else
353
- return r[0];
354
- });
355
- }),
356
- },
357
- Receipt: {
358
- encryptable: true,
359
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
360
- const currentUser = yield api.userApi.getCurrentUser();
361
- const item = yield api.receiptApi.newInstance(currentUser, {});
362
- return api.receiptApi.createReceipt(item);
363
- }),
364
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
365
- var _a, _b;
366
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
367
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
368
- if (!delegateId) {
369
- throw new Error('Cannot share with non data owner user');
370
- }
371
- return delegatorApi.receiptApi.shareWith(delegateId, entity);
372
- }),
373
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.receiptApi.deleteReceipts(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
374
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.receiptApi.deleteReceipt(id.id); }),
375
- },
376
- TimeTable: {
377
- encryptable: false,
378
- create: (api, _) => __awaiter(void 0, void 0, void 0, function* () {
379
- const currentUser = yield api.userApi.getCurrentUser();
380
- const item = new TimeTable_1.TimeTable({});
381
- return api.timetableApi.createTimeTable(item);
382
- }),
383
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
384
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.timetableApi.deleteTimeTables(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
385
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.timetableApi.deleteTimeTable(id.id); }),
386
- },
387
- Topic: {
388
- encryptable: true,
389
- cloudOnly: true,
390
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
391
- const currentUser = yield api.userApi.getCurrentUser();
392
- const item = yield api.topicApi.newInstance(currentUser, patient);
393
- return api.topicApi.createTopic(item);
394
- }),
395
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
396
- var _a, _b;
397
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
398
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
399
- if (!delegateId) {
400
- throw new Error('Cannot share with non data owner user');
401
- }
402
- return delegatorApi.topicApi.shareWith(delegateId, entity);
403
- }),
404
- deleteMany: (api, ids) => __awaiter(void 0, void 0, void 0, function* () { return api.topicApi.deleteTopics(new ListOfIds_1.ListOfIds({ ids: ids.map((it) => it.id) })); }),
405
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.topicApi.deleteTopic(id.id); }),
406
- },
407
- };
408
- //# sourceMappingURL=entities-crud-test-interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entities-crud-test-interface.js","sourceRoot":"","sources":["../../../../test/icc-x-api/crud/entities-crud-test-interface.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mCAAmC;AAInC,gEAA4D;AAE5D,0DAAsD;AAGtD,8EAA0E;AAE1E,0FAAsF;AAEtF,0DAAsD;AAGtD,4EAAwE;AAExE,gEAA4D;AAC5D,4DAAwD;AACxD,4DAAwD;AAExD,4EAAwE;AAExE,wDAAoD;AAEpD,gEAA4D;AAa/C,QAAA,QAAQ,GAAqC;IACxD,SAAS,EAAE;QACT,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,CAAO,GAAa,EAAE,OAAgB,EAAE,EAAE;YAChD,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAA;YACtD,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,IAAA,mBAAU,GAAE,EAAE,CAAC,CAAA;YACpG,OAAO,GAAG,CAAC,YAAY,CAAC,uBAAuB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;QACzE,CAAC,CAA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,CAAA;YACtD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;YACjE,OAAO,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACvC,CAAC,CAAA;QACD,KAAK,EAAE,CAAO,YAAsB,EAAE,WAAqB,EAAE,MAAW,EAAE,EAAE;;YAC1E,MAAM,YAAY,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,cAAc,EAAE,CAAA;YAC/D,MAAM,UAAU,GAAG,MAAA,MAAA,YAAY,CAAC,iBAAiB,mCAAI,YAAY,CAAC,SAAS,mCAAI,YAAY,CAAC,QAAQ,CAAA;YACpG,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;YAC1D,CAAC;YACD,OAAO,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,MAAe,CAAC,CAAA;QACrE,CAAC,CAAA;QACD,UAAU,EAAE,CAAO,GAAa,EAAE,GAAgB,EAAE,EAAE,kDAAC,OAAA,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,qBAAS,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAG,CAAC,EAAE,CAAC,CAAC,CAAA,GAAA;QACjI,MAAM,EAAE,CAAO,GAAa,EAAE,EAAa,EAAE,EAAE,kDAAC,OAAA,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,EAAG,CAAC,CAAA,GAAA;KACjF;CACF,CAAA","sourcesContent":["import { IcureApi } from '../../../icc-x-api'\nimport { randomUUID } from 'crypto'\nimport { Patient } from '../../../icc-api/model/Patient'\nimport { IdWithRev } from '../../../icc-api/model/IdWithRev'\nimport { AccessLog } from '../../../icc-api/model/AccessLog'\nimport { ListOfIds } from '../../../icc-api/model/ListOfIds'\nimport { DocIdentifier } from '../../../icc-api/model/DocIdentifier'\nimport { Agenda } from '../../../icc-api/model/Agenda'\nimport { Article } from '../../../icc-api/model/Article'\nimport { CalendarItem } from '../../../icc-api/model/CalendarItem'\nimport { CalendarItemType } from '../../../icc-api/model/CalendarItemType'\nimport { Classification } from '../../../icc-api/model/Classification'\nimport { ClassificationTemplate } from '../../../icc-api/model/ClassificationTemplate'\nimport { Contact } from '../../../icc-api/model/Contact'\nimport { Device } from '../../../icc-api/model/Device'\nimport { Document } from '../../../icc-api/model/Document'\nimport { Form } from '../../../icc-api/model/Form'\nimport { HealthcareParty } from '../../../icc-api/model/HealthcareParty'\nimport { HealthElement } from '../../../icc-api/model/HealthElement'\nimport { Insurance } from '../../../icc-api/model/Insurance'\nimport { Invoice } from '../../../icc-api/model/Invoice'\nimport { Keyword } from '../../../icc-api/model/Keyword'\nimport { MaintenanceTask } from '../../../icc-api/model/MaintenanceTask'\nimport { MedicalLocation } from '../../../icc-api/model/MedicalLocation'\nimport { Message } from '../../../icc-api/model/Message'\nimport { Place } from '../../../icc-api/model/Place'\nimport { Receipt } from '../../../icc-api/model/Receipt'\nimport { TimeTable } from '../../../icc-api/model/TimeTable'\nimport { Topic } from '../../../icc-api/model/Topic'\n\nexport interface CRUDInterface {\n encryptable: boolean\n skipDenied?: boolean\n cloudOnly?: boolean\n create(api: IcureApi, patient: Patient): Promise<IdWithRev>\n share(delegatorApi: IcureApi, delegateApi: IcureApi, entity: any): Promise<IdWithRev>\n deleteMany(api: IcureApi, ids: IdWithRev[]): Promise<Array<DocIdentifier>>\n delete(api: IcureApi, id: IdWithRev): Promise<DocIdentifier>\n}\n\nexport const entities: { [key: string]: CRUDInterface } = {\n AccessLog: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const accessLog = await api.accessLogApi.newInstance(currentUser, patient, { detail: randomUUID() })\n return api.accessLogApi.createAccessLogWithUser(currentUser, accessLog)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.accessLogApi.shareWith(delegateId, entity as AccessLog)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.accessLogApi.deleteAccessLogs(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.accessLogApi.deleteAccessLog(id.id!),\n },\n Agenda: {\n skipDenied: true,\n encryptable: false,\n create: async (api: IcureApi, _: Patient) => api.agendaApi.createAgenda(new Agenda({ id: randomUUID(), name: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.agendaApi.deleteAgendas(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.agendaApi.deleteAgenda(id.id!),\n },\n CalendarItem: {\n encryptable: true,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.calendarItemApi.newInstance(currentUser, { title: randomUUID() })\n return api.calendarItemApi.createCalendarItemWithHcParty(currentUser, item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.calendarItemApi.shareWith(delegateId, entity as CalendarItem)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.calendarItemApi.deleteCalendarItems(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.calendarItemApi.deleteCalendarItem(id.id!),\n },\n CalendarItemType: {\n skipDenied: true,\n encryptable: false,\n create: async (api: IcureApi, _: Patient) =>\n api.calendarItemTypeApi.createCalendarItemType(new CalendarItemType({ id: randomUUID(), color: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.calendarItemTypeApi.deleteCalendarItemTypes(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) =>\n api.calendarItemTypeApi.deleteCalendarItemTypes(new ListOfIds({ ids: [id.id!] })).then((r) => {\n if (r.length === 0) throw Error('No element deleted')\n else return r[0]\n }),\n },\n Classification: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.classificationApi.newInstance(currentUser, patient, { label: randomUUID() })\n return api.classificationApi.createClassification(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.classificationApi.shareWith(delegateId, entity as Classification)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.classificationApi.deleteClassifications(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.classificationApi.deleteClassification(id.id!),\n },\n ClassificationTemplate: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) =>\n api.classificationTemplateApi.createClassificationTemplate(new ClassificationTemplate({ id: randomUUID(), label: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.classificationTemplateApi.deleteClassificationTemplates(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.classificationTemplateApi.deleteClassificationTemplate(id.id!),\n },\n Contact: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.contactApi.newInstance(currentUser, patient, { descr: randomUUID() })\n return (await api.contactApi.createContactWithUser(currentUser, item))!\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.contactApi.shareWith(delegateId, entity as Contact)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.contactApi.deleteContacts(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.contactApi.deleteContact(id.id!),\n },\n Device: {\n encryptable: false,\n create: async (api: IcureApi, _: Patient) => api.deviceApi.createDevice(new Device({ id: randomUUID(), name: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.deviceApi.deleteDevices(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.deviceApi.deleteDevice(id.id!),\n },\n Document: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.documentApi.newInstance(currentUser, patient, { name: randomUUID() })\n return api.documentApi.createDocument(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.documentApi.shareWith(delegateId, entity as Document)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.documentApi.deleteDocuments(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.documentApi.deleteDocument(id.id!),\n },\n Form: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.formApi.newInstance(currentUser, patient, { uniqueId: randomUUID() })\n return api.formApi.createForm(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.formApi.shareWith(delegateId, entity as Form)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.formApi.deleteForms(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.formApi.deleteForm(id.id!),\n },\n HealthcareParty: {\n encryptable: false,\n create: async (api: IcureApi, _: Patient) =>\n api.healthcarePartyApi.createHealthcareParty(new HealthcareParty({ id: randomUUID(), name: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.healthcarePartyApi.deleteHealthcareParties(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.healthcarePartyApi.deleteHealthcareParty(id.id!),\n },\n HealthcarePartyInGroup: {\n encryptable: false,\n cloudOnly: true,\n create: async (api: IcureApi, _: Patient) =>\n api.healthcarePartyApi.createHealthcareParty(new HealthcareParty({ id: randomUUID(), name: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => {\n const currentUser = await api.userApi.getCurrentUser()\n return api.healthcarePartyApi.deleteHealthcarePartiesInGroup(currentUser.groupId!, new ListOfIds({ ids: ids.map((it) => it.id!) }))\n },\n delete: async (api: IcureApi, id: IdWithRev) => {\n const currentUser = await api.userApi.getCurrentUser()\n return api.healthcarePartyApi.deleteHealthcarePartyInGroup(currentUser.groupId!, id.id!)\n },\n },\n HealthcareElement: {\n encryptable: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.healthcareElementApi.newInstance(currentUser, patient, { descr: randomUUID() })\n return api.healthcareElementApi.createHealthElementWithUser(currentUser, item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.healthcareElementApi.shareWith(delegateId, entity as HealthElement)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.healthcareElementApi.deleteHealthElements(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.healthcareElementApi.deleteHealthElement(id.id!),\n },\n Insurance: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) => api.insuranceApi.createInsurance(new Insurance({ id: randomUUID(), code: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => {\n const ret: DocIdentifier[] = []\n for (const id of ids) {\n const result = await api.insuranceApi.deleteInsurance(id.id!)\n ret.push(result)\n }\n return ret\n },\n delete: async (api: IcureApi, id: IdWithRev) => api.insuranceApi.deleteInsurance(id.id!),\n },\n Invoice: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) => api.invoiceApi.createInvoice(new Invoice({ id: randomUUID(), recipientId: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => {\n const ret: DocIdentifier[] = []\n for (const id of ids) {\n const result = await api.invoiceApi.deleteInvoice(id.id!)\n ret.push(result)\n }\n return ret\n },\n delete: async (api: IcureApi, id: IdWithRev) => api.invoiceApi.deleteInvoice(id.id!),\n },\n Keyword: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) => api.keywordApi.createKeyword(new Keyword({ id: randomUUID(), value: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.keywordApi.deleteKeywords(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) =>\n api.keywordApi.deleteKeywords(new ListOfIds({ ids: [id.id!] })).then((r) => {\n if (r.length === 0) throw new Error('No keyword deleted')\n else return r[0]\n }),\n },\n MaintenanceTask: {\n encryptable: true,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.maintenanceTaskApi.newInstance(currentUser, {})\n return (await api.maintenanceTaskApi.createMaintenanceTaskWithUser(currentUser, item))!\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.maintenanceTaskApi.shareWith(delegateId, entity as MaintenanceTask)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => {\n const currentUser = await api.userApi.getCurrentUser()\n return api.maintenanceTaskApi.deleteMaintenanceTasksWithUser(currentUser, new ListOfIds({ ids: ids.map((it) => it.id!) }))\n },\n delete: async (api: IcureApi, id: IdWithRev) => {\n const currentUser = await api.userApi.getCurrentUser()\n return api.maintenanceTaskApi.deleteMaintenanceTaskWithUser(currentUser, id.id!)\n },\n },\n MedicalLocation: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) =>\n api.medicalLocationApi.createMedicalLocation(new MedicalLocation({ id: randomUUID(), nihii: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) =>\n api.medicalLocationApi.deleteMedicalLocations(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) =>\n api.medicalLocationApi.deleteMedicalLocations(new ListOfIds({ ids: [id.id!] })).then((r) => {\n if (r.length === 0) throw new Error('No medical location deleted')\n else return r[0]\n }),\n },\n Message: {\n encryptable: true,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.messageApi.newInstance(currentUser, {})\n return api.messageApi.createMessage(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.messageApi.shareWith(delegateId, entity as Message, [])\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.messageApi.deleteMessages(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.messageApi.deleteMessage(id.id!),\n },\n Patient: {\n encryptable: true,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.patientApi.newInstance(currentUser, {})\n return api.patientApi.createPatientWithUser(currentUser, item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.patientApi.shareWith(delegateId, entity as Patient, [])\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.patientApi.deletePatients(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.patientApi.deletePatient(id.id!),\n },\n Place: {\n encryptable: false,\n skipDenied: true,\n create: async (api: IcureApi, _: Patient) => api.placeApi.createPlace(new Place({ id: randomUUID(), name: randomUUID() })),\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.placeApi.deletePlaces(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) =>\n api.placeApi.deletePlaces(new ListOfIds({ ids: [id.id!] })).then((r) => {\n if (r.length === 0) throw new Error('No place deleted')\n else return r[0]\n }),\n },\n Receipt: {\n encryptable: true,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.receiptApi.newInstance(currentUser, {})\n return api.receiptApi.createReceipt(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.receiptApi.shareWith(delegateId, entity as Receipt)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.receiptApi.deleteReceipts(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.receiptApi.deleteReceipt(id.id!),\n },\n TimeTable: {\n encryptable: false,\n create: async (api: IcureApi, _: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = new TimeTable({})\n return api.timetableApi.createTimeTable(item)\n },\n share: async (_: IcureApi, __: IcureApi, entity: any) => entity,\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.timetableApi.deleteTimeTables(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.timetableApi.deleteTimeTable(id.id!),\n },\n Topic: {\n encryptable: true,\n cloudOnly: true,\n create: async (api: IcureApi, patient: Patient) => {\n const currentUser = await api.userApi.getCurrentUser()\n const item = await api.topicApi.newInstance(currentUser, patient)\n return api.topicApi.createTopic(item)\n },\n share: async (delegatorApi: IcureApi, delegateApi: IcureApi, entity: any) => {\n const delegateUser = await delegateApi.userApi.getCurrentUser()\n const delegateId = delegateUser.healthcarePartyId ?? delegateUser.patientId ?? delegateUser.deviceId\n if (!delegateId) {\n throw new Error('Cannot share with non data owner user')\n }\n return delegatorApi.topicApi.shareWith(delegateId, entity as Topic)\n },\n deleteMany: async (api: IcureApi, ids: IdWithRev[]) => api.topicApi.deleteTopics(new ListOfIds({ ids: ids.map((it) => it.id!) })),\n delete: async (api: IcureApi, id: IdWithRev) => api.topicApi.deleteTopic(id.id!),\n },\n}\n"]}
@@ -1 +0,0 @@
1
- import 'isomorphic-fetch';