@icure/api 8.11.0 → 8.13.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 (302) hide show
  1. package/icc-api/api/IccUserApi.d.ts +1 -1
  2. package/icc-api/api/IccUserApi.js +2 -2
  3. package/icc-api/api/IccUserApi.js.map +1 -1
  4. package/icc-api/model/HealthElement.d.ts +11 -0
  5. package/icc-api/model/HealthElement.js.map +1 -1
  6. package/icc-api/model/HealthElementAsserter.d.ts +33 -0
  7. package/icc-api/model/HealthElementAsserter.js +28 -0
  8. package/icc-api/model/HealthElementAsserter.js.map +1 -0
  9. package/icc-api/model/HealthElementQualifiedLink.d.ts +31 -0
  10. package/icc-api/model/HealthElementQualifiedLink.js +26 -0
  11. package/icc-api/model/HealthElementQualifiedLink.js.map +1 -0
  12. package/icc-api/model/models.d.ts +2 -0
  13. package/icc-api/model/models.js +2 -0
  14. package/icc-api/model/models.js.map +1 -1
  15. package/icc-x-api/filters/HealthElementByAssociationIdFilter.d.ts +23 -0
  16. package/icc-x-api/filters/HealthElementByAssociationIdFilter.js +30 -0
  17. package/icc-x-api/filters/HealthElementByAssociationIdFilter.js.map +1 -0
  18. package/icc-x-api/filters/HealthElementByQualifiedLinkFilter.d.ts +24 -0
  19. package/icc-x-api/filters/HealthElementByQualifiedLinkFilter.js +30 -0
  20. package/icc-x-api/filters/HealthElementByQualifiedLinkFilter.js.map +1 -0
  21. package/icc-x-api/filters/filters.d.ts +2 -0
  22. package/icc-x-api/filters/filters.js +2 -0
  23. package/icc-x-api/filters/filters.js.map +1 -1
  24. package/icc-x-api/index.js +1 -1
  25. package/icc-x-api/index.js.map +1 -1
  26. package/package.json +1 -1
  27. package/test/benchmarks/lzma-benchmark.spec.d.ts +0 -1
  28. package/test/benchmarks/lzma-benchmark.spec.js +0 -131
  29. package/test/benchmarks/lzma-benchmark.spec.js.map +0 -1
  30. package/test/benchmarks/lzma-compat.spec.d.ts +0 -1
  31. package/test/benchmarks/lzma-compat.spec.js +0 -187
  32. package/test/benchmarks/lzma-compat.spec.js.map +0 -1
  33. package/test/benchmarks/playwright.config.d.ts +0 -2
  34. package/test/benchmarks/playwright.config.js +0 -18
  35. package/test/benchmarks/playwright.config.js.map +0 -1
  36. package/test/icc-api/api/IccAgendaApi.d.ts +0 -1
  37. package/test/icc-api/api/IccAgendaApi.js +0 -64
  38. package/test/icc-api/api/IccAgendaApi.js.map +0 -1
  39. package/test/icc-api/api/IccAnonymousAccessApi.d.ts +0 -1
  40. package/test/icc-api/api/IccAnonymousAccessApi.js +0 -58
  41. package/test/icc-api/api/IccAnonymousAccessApi.js.map +0 -1
  42. package/test/icc-api/api/IccCalendarItemApi.d.ts +0 -1
  43. package/test/icc-api/api/IccCalendarItemApi.js +0 -67
  44. package/test/icc-api/api/IccCalendarItemApi.js.map +0 -1
  45. package/test/icc-api/api/IccCalendarItemTypeApi.d.ts +0 -1
  46. package/test/icc-api/api/IccCalendarItemTypeApi.js +0 -96
  47. package/test/icc-api/api/IccCalendarItemTypeApi.js.map +0 -1
  48. package/test/icc-api/api/IccCodeApi.d.ts +0 -1
  49. package/test/icc-api/api/IccCodeApi.js +0 -38
  50. package/test/icc-api/api/IccCodeApi.js.map +0 -1
  51. package/test/icc-api/api/IccDocumentApi.d.ts +0 -1
  52. package/test/icc-api/api/IccDocumentApi.js +0 -199
  53. package/test/icc-api/api/IccDocumentApi.js.map +0 -1
  54. package/test/icc-api/api/IccGroupApi.d.ts +0 -1
  55. package/test/icc-api/api/IccGroupApi.js +0 -50
  56. package/test/icc-api/api/IccGroupApi.js.map +0 -1
  57. package/test/icc-api/api/IccKeywordApi.d.ts +0 -1
  58. package/test/icc-api/api/IccKeywordApi.js +0 -64
  59. package/test/icc-api/api/IccKeywordApi.js.map +0 -1
  60. package/test/icc-api/api/IccMedicalLocationApi.d.ts +0 -1
  61. package/test/icc-api/api/IccMedicalLocationApi.js +0 -64
  62. package/test/icc-api/api/IccMedicalLocationApi.js.map +0 -1
  63. package/test/icc-api/api/IccPlaceApi.d.ts +0 -1
  64. package/test/icc-api/api/IccPlaceApi.js +0 -64
  65. package/test/icc-api/api/IccPlaceApi.js.map +0 -1
  66. package/test/icc-api/api/IccRecoveryDataApi.d.ts +0 -1
  67. package/test/icc-api/api/IccRecoveryDataApi.js +0 -95
  68. package/test/icc-api/api/IccRecoveryDataApi.js.map +0 -1
  69. package/test/icc-api/api/IccRoleApi.d.ts +0 -1
  70. package/test/icc-api/api/IccRoleApi.js +0 -34
  71. package/test/icc-api/api/IccRoleApi.js.map +0 -1
  72. package/test/icc-api/api/IccUserApi.d.ts +0 -1
  73. package/test/icc-api/api/IccUserApi.js +0 -96
  74. package/test/icc-api/api/IccUserApi.js.map +0 -1
  75. package/test/icc-api/e2e/IccCalendarItemApi.d.ts +0 -1
  76. package/test/icc-api/e2e/IccCalendarItemApi.js +0 -46
  77. package/test/icc-api/e2e/IccCalendarItemApi.js.map +0 -1
  78. package/test/icc-api/model/modelHelpersTest.d.ts +0 -1
  79. package/test/icc-api/model/modelHelpersTest.js +0 -45
  80. package/test/icc-api/model/modelHelpersTest.js.map +0 -1
  81. package/test/icc-x-api/auth/group-switch-test.d.ts +0 -1
  82. package/test/icc-x-api/auth/group-switch-test.js +0 -81
  83. package/test/icc-x-api/auth/group-switch-test.js.map +0 -1
  84. package/test/icc-x-api/auth/jwt-concurrency-test.d.ts +0 -2
  85. package/test/icc-x-api/auth/jwt-concurrency-test.js +0 -112
  86. package/test/icc-x-api/auth/jwt-concurrency-test.js.map +0 -1
  87. package/test/icc-x-api/auth/jwt-provider-test.d.ts +0 -1
  88. package/test/icc-x-api/auth/jwt-provider-test.js +0 -197
  89. package/test/icc-x-api/auth/jwt-provider-test.js.map +0 -1
  90. package/test/icc-x-api/auth/smart-auth-provider-test.d.ts +0 -1
  91. package/test/icc-x-api/auth/smart-auth-provider-test.js +0 -224
  92. package/test/icc-x-api/auth/smart-auth-provider-test.js.map +0 -1
  93. package/test/icc-x-api/autofix-anonymity-test.d.ts +0 -1
  94. package/test/icc-x-api/autofix-anonymity-test.js +0 -122
  95. package/test/icc-x-api/autofix-anonymity-test.js.map +0 -1
  96. package/test/icc-x-api/confidential-entities-test.d.ts +0 -1
  97. package/test/icc-x-api/confidential-entities-test.js +0 -168
  98. package/test/icc-x-api/confidential-entities-test.js.map +0 -1
  99. package/test/icc-x-api/crud/comprehensive-crud-test.d.ts +0 -1
  100. package/test/icc-x-api/crud/comprehensive-crud-test.js +0 -276
  101. package/test/icc-x-api/crud/comprehensive-crud-test.js.map +0 -1
  102. package/test/icc-x-api/crud/entities-crud-test-interface.d.ts +0 -16
  103. package/test/icc-x-api/crud/entities-crud-test-interface.js +0 -407
  104. package/test/icc-x-api/crud/entities-crud-test-interface.js.map +0 -1
  105. package/test/icc-x-api/crypto/anonymous-delegations-test.d.ts +0 -1
  106. package/test/icc-x-api/crypto/anonymous-delegations-test.js +0 -587
  107. package/test/icc-x-api/crypto/anonymous-delegations-test.js.map +0 -1
  108. package/test/icc-x-api/crypto/concurrency.d.ts +0 -1
  109. package/test/icc-x-api/crypto/concurrency.js +0 -35
  110. package/test/icc-x-api/crypto/concurrency.js.map +0 -1
  111. package/test/icc-x-api/crypto/crypto-utils.d.ts +0 -1
  112. package/test/icc-x-api/crypto/crypto-utils.js +0 -79
  113. package/test/icc-x-api/crypto/crypto-utils.js.map +0 -1
  114. package/test/icc-x-api/crypto/cryptoTest.d.ts +0 -2
  115. package/test/icc-x-api/crypto/cryptoTest.js +0 -402
  116. package/test/icc-x-api/crypto/cryptoTest.js.map +0 -1
  117. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.d.ts +0 -1
  118. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js +0 -166
  119. package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js.map +0 -1
  120. package/test/icc-x-api/crypto/exchange-data-manager-test.d.ts +0 -1
  121. package/test/icc-x-api/crypto/exchange-data-manager-test.js +0 -674
  122. package/test/icc-x-api/crypto/exchange-data-manager-test.js.map +0 -1
  123. package/test/icc-x-api/crypto/full-crypto-test.d.ts +0 -1
  124. package/test/icc-x-api/crypto/full-crypto-test.js +0 -454
  125. package/test/icc-x-api/crypto/full-crypto-test.js.map +0 -1
  126. package/test/icc-x-api/crypto/legacy-metadata-migration-test.d.ts +0 -1
  127. package/test/icc-x-api/crypto/legacy-metadata-migration-test.js +0 -379
  128. package/test/icc-x-api/crypto/legacy-metadata-migration-test.js.map +0 -1
  129. package/test/icc-x-api/crypto/secure-delegations-manager-test.d.ts +0 -1
  130. package/test/icc-x-api/crypto/secure-delegations-manager-test.js +0 -278
  131. package/test/icc-x-api/crypto/secure-delegations-manager-test.js.map +0 -1
  132. package/test/icc-x-api/crypto/shamir.d.ts +0 -2
  133. package/test/icc-x-api/crypto/shamir.js +0 -167
  134. package/test/icc-x-api/crypto/shamir.js.map +0 -1
  135. package/test/icc-x-api/crypto/share-deduplication-test.d.ts +0 -1
  136. package/test/icc-x-api/crypto/share-deduplication-test.js +0 -250
  137. package/test/icc-x-api/crypto/share-deduplication-test.js.map +0 -1
  138. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.d.ts +0 -1
  139. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js +0 -71
  140. package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js.map +0 -1
  141. package/test/icc-x-api/crypto/soft-deleted-data-owners.d.ts +0 -2
  142. package/test/icc-x-api/crypto/soft-deleted-data-owners.js +0 -113
  143. package/test/icc-x-api/crypto/soft-deleted-data-owners.js.map +0 -1
  144. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.d.ts +0 -1
  145. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js +0 -246
  146. package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js.map +0 -1
  147. package/test/icc-x-api/entity-with-attachments-api-test.d.ts +0 -1
  148. package/test/icc-x-api/entity-with-attachments-api-test.js +0 -142
  149. package/test/icc-x-api/entity-with-attachments-api-test.js.map +0 -1
  150. package/test/icc-x-api/filters/filters.d.ts +0 -1
  151. package/test/icc-x-api/filters/filters.js +0 -49
  152. package/test/icc-x-api/filters/filters.js.map +0 -1
  153. package/test/icc-x-api/filters/healthelement.d.ts +0 -1
  154. package/test/icc-x-api/filters/healthelement.js +0 -333
  155. package/test/icc-x-api/filters/healthelement.js.map +0 -1
  156. package/test/icc-x-api/icc-accesslog-x-api.d.ts +0 -1
  157. package/test/icc-x-api/icc-accesslog-x-api.js +0 -106
  158. package/test/icc-x-api/icc-accesslog-x-api.js.map +0 -1
  159. package/test/icc-x-api/icc-application-settings-x-api.d.ts +0 -1
  160. package/test/icc-x-api/icc-application-settings-x-api.js +0 -91
  161. package/test/icc-x-api/icc-application-settings-x-api.js.map +0 -1
  162. package/test/icc-x-api/icc-auth-api.d.ts +0 -1
  163. package/test/icc-x-api/icc-auth-api.js +0 -47
  164. package/test/icc-x-api/icc-auth-api.js.map +0 -1
  165. package/test/icc-x-api/icc-calendar-item-x-api.d.ts +0 -1
  166. package/test/icc-x-api/icc-calendar-item-x-api.js +0 -150
  167. package/test/icc-x-api/icc-calendar-item-x-api.js.map +0 -1
  168. package/test/icc-x-api/icc-code-x-api-test.d.ts +0 -1
  169. package/test/icc-x-api/icc-code-x-api-test.js +0 -74
  170. package/test/icc-x-api/icc-code-x-api-test.js.map +0 -1
  171. package/test/icc-x-api/icc-contact-x-api.d.ts +0 -1
  172. package/test/icc-x-api/icc-contact-x-api.js +0 -355
  173. package/test/icc-x-api/icc-contact-x-api.js.map +0 -1
  174. package/test/icc-x-api/icc-document-x-api.d.ts +0 -1
  175. package/test/icc-x-api/icc-document-x-api.js +0 -76
  176. package/test/icc-x-api/icc-document-x-api.js.map +0 -1
  177. package/test/icc-x-api/icc-form-x-api.d.ts +0 -1
  178. package/test/icc-x-api/icc-form-x-api.js +0 -413
  179. package/test/icc-x-api/icc-form-x-api.js.map +0 -1
  180. package/test/icc-x-api/icc-hcparty-x-api-test.d.ts +0 -1
  181. package/test/icc-x-api/icc-hcparty-x-api-test.js +0 -43
  182. package/test/icc-x-api/icc-hcparty-x-api-test.js.map +0 -1
  183. package/test/icc-x-api/icc-helement-x-api-test.d.ts +0 -1
  184. package/test/icc-x-api/icc-helement-x-api-test.js +0 -155
  185. package/test/icc-x-api/icc-helement-x-api-test.js.map +0 -1
  186. package/test/icc-x-api/icc-invoice-x-api.d.ts +0 -1
  187. package/test/icc-x-api/icc-invoice-x-api.js +0 -99
  188. package/test/icc-x-api/icc-invoice-x-api.js.map +0 -1
  189. package/test/icc-x-api/icc-maintenance-task-x-api-test.d.ts +0 -1
  190. package/test/icc-x-api/icc-maintenance-task-x-api-test.js +0 -222
  191. package/test/icc-x-api/icc-maintenance-task-x-api-test.js.map +0 -1
  192. package/test/icc-x-api/icc-message-x-api.d.ts +0 -1
  193. package/test/icc-x-api/icc-message-x-api.js +0 -54
  194. package/test/icc-x-api/icc-message-x-api.js.map +0 -1
  195. package/test/icc-x-api/icc-patient-x-api-test.d.ts +0 -1
  196. package/test/icc-x-api/icc-patient-x-api-test.js +0 -209
  197. package/test/icc-x-api/icc-patient-x-api-test.js.map +0 -1
  198. package/test/icc-x-api/icc-recovery-x-api.d.ts +0 -1
  199. package/test/icc-x-api/icc-recovery-x-api.js +0 -175
  200. package/test/icc-x-api/icc-recovery-x-api.js.map +0 -1
  201. package/test/icc-x-api/icc-topic-x-api.d.ts +0 -1
  202. package/test/icc-x-api/icc-topic-x-api.js +0 -269
  203. package/test/icc-x-api/icc-topic-x-api.js.map +0 -1
  204. package/test/icc-x-api/icc-user-x-api-test.d.ts +0 -1
  205. package/test/icc-x-api/icc-user-x-api-test.js +0 -99
  206. package/test/icc-x-api/icc-user-x-api-test.js.map +0 -1
  207. package/test/icc-x-api/keyless-api.d.ts +0 -1
  208. package/test/icc-x-api/keyless-api.js +0 -125
  209. package/test/icc-x-api/keyless-api.js.map +0 -1
  210. package/test/icc-x-api/patient-user.d.ts +0 -2
  211. package/test/icc-x-api/patient-user.js +0 -103
  212. package/test/icc-x-api/patient-user.js.map +0 -1
  213. package/test/icc-x-api/storage/storage.d.ts +0 -1
  214. package/test/icc-x-api/storage/storage.js +0 -48
  215. package/test/icc-x-api/storage/storage.js.map +0 -1
  216. package/test/icc-x-api/test-api-no-parent.d.ts +0 -1
  217. package/test/icc-x-api/test-api-no-parent.js +0 -79
  218. package/test/icc-x-api/test-api-no-parent.js.map +0 -1
  219. package/test/icc-x-api/test-legacy-data-support.d.ts +0 -1
  220. package/test/icc-x-api/test-legacy-data-support.js +0 -375
  221. package/test/icc-x-api/test-legacy-data-support.js.map +0 -1
  222. package/test/icc-x-api/utils/date-encode-test.d.ts +0 -1
  223. package/test/icc-x-api/utils/date-encode-test.js +0 -150
  224. package/test/icc-x-api/utils/date-encode-test.js.map +0 -1
  225. package/test/icc-x-api/utils/graph-test.d.ts +0 -1
  226. package/test/icc-x-api/utils/graph-test.js +0 -54
  227. package/test/icc-x-api/utils/graph-test.js.map +0 -1
  228. package/test/icc-x-api/utils/lru-temporised-async-cache-test.d.ts +0 -1
  229. package/test/icc-x-api/utils/lru-temporised-async-cache-test.js +0 -364
  230. package/test/icc-x-api/utils/lru-temporised-async-cache-test.js.map +0 -1
  231. package/test/icc-x-api/utils/lzma-benchmark-test.d.ts +0 -1
  232. package/test/icc-x-api/utils/lzma-benchmark-test.js +0 -132
  233. package/test/icc-x-api/utils/lzma-benchmark-test.js.map +0 -1
  234. package/test/icc-x-api/utils/lzma-compat-test.d.ts +0 -1
  235. package/test/icc-x-api/utils/lzma-compat-test.js +0 -218
  236. package/test/icc-x-api/utils/lzma-compat-test.js.map +0 -1
  237. package/test/icc-x-api/utils/mutex-test.d.ts +0 -1
  238. package/test/icc-x-api/utils/mutex-test.js +0 -114
  239. package/test/icc-x-api/utils/mutex-test.js.map +0 -1
  240. package/test/icc-x-api/utils/to-moment-test.d.ts +0 -1
  241. package/test/icc-x-api/utils/to-moment-test.js +0 -110
  242. package/test/icc-x-api/utils/to-moment-test.js.map +0 -1
  243. package/test/support/CSM-185.d.ts +0 -1
  244. package/test/support/CSM-185.js +0 -124
  245. package/test/support/CSM-185.js.map +0 -1
  246. package/test/support/CSM-243.d.ts +0 -1
  247. package/test/support/CSM-243.js +0 -120
  248. package/test/support/CSM-243.js.map +0 -1
  249. package/test/support/CSM-543.d.ts +0 -1
  250. package/test/support/CSM-543.js +0 -164
  251. package/test/support/CSM-543.js.map +0 -1
  252. package/test/support/CSM-729.d.ts +0 -1
  253. package/test/support/CSM-729.js +0 -225
  254. package/test/support/CSM-729.js.map +0 -1
  255. package/test/support/CSM-814.d.ts +0 -1
  256. package/test/support/CSM-814.js +0 -475
  257. package/test/support/CSM-814.js.map +0 -1
  258. package/test/support/CSM-87.d.ts +0 -0
  259. package/test/support/CSM-87.js +0 -21
  260. package/test/support/CSM-87.js.map +0 -1
  261. package/test/support/CSM-93.d.ts +0 -1
  262. package/test/support/CSM-93.js +0 -112
  263. package/test/support/CSM-93.js.map +0 -1
  264. package/test/utils/FakeDataOwnerApi.d.ts +0 -32
  265. package/test/utils/FakeDataOwnerApi.js +0 -136
  266. package/test/utils/FakeDataOwnerApi.js.map +0 -1
  267. package/test/utils/FakeEncryptionKeysManager.d.ts +0 -36
  268. package/test/utils/FakeEncryptionKeysManager.js +0 -97
  269. package/test/utils/FakeEncryptionKeysManager.js.map +0 -1
  270. package/test/utils/FakeExchangeDataApi.d.ts +0 -32
  271. package/test/utils/FakeExchangeDataApi.js +0 -92
  272. package/test/utils/FakeExchangeDataApi.js.map +0 -1
  273. package/test/utils/FakeExchangeDataManager.d.ts +0 -48
  274. package/test/utils/FakeExchangeDataManager.js +0 -82
  275. package/test/utils/FakeExchangeDataManager.js.map +0 -1
  276. package/test/utils/FakeExchangeDataMapManager.d.ts +0 -12
  277. package/test/utils/FakeExchangeDataMapManager.js +0 -38
  278. package/test/utils/FakeExchangeDataMapManager.js.map +0 -1
  279. package/test/utils/FakeGenericApi.d.ts +0 -16
  280. package/test/utils/FakeGenericApi.js +0 -65
  281. package/test/utils/FakeGenericApi.js.map +0 -1
  282. package/test/utils/KeylessCryptoStrategies.d.ts +0 -23
  283. package/test/utils/KeylessCryptoStrategies.js +0 -26
  284. package/test/utils/KeylessCryptoStrategies.js.map +0 -1
  285. package/test/utils/TestApi.d.ts +0 -3
  286. package/test/utils/TestApi.js +0 -30
  287. package/test/utils/TestApi.js.map +0 -1
  288. package/test/utils/TestCollectionUtils.d.ts +0 -1
  289. package/test/utils/TestCollectionUtils.js +0 -310
  290. package/test/utils/TestCollectionUtils.js.map +0 -1
  291. package/test/utils/TestCryptoStrategies.d.ts +0 -42
  292. package/test/utils/TestCryptoStrategies.js +0 -80
  293. package/test/utils/TestCryptoStrategies.js.map +0 -1
  294. package/test/utils/TestStorage.d.ts +0 -23
  295. package/test/utils/TestStorage.js +0 -61
  296. package/test/utils/TestStorage.js.map +0 -1
  297. package/test/utils/roles.d.ts +0 -14
  298. package/test/utils/roles.js +0 -345
  299. package/test/utils/roles.js.map +0 -1
  300. package/test/utils/test_utils.d.ts +0 -87
  301. package/test/utils/test_utils.js +0 -452
  302. package/test/utils/test_utils.js.map +0 -1
@@ -1,407 +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 item = new TimeTable_1.TimeTable({ id: (0, crypto_1.randomUUID)() });
380
- return api.timetableApi.createTimeTable(item);
381
- }),
382
- share: (_, __, entity) => __awaiter(void 0, void 0, void 0, function* () { return entity; }),
383
- 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) })); }),
384
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.timetableApi.deleteTimeTable(id.id); }),
385
- },
386
- Topic: {
387
- encryptable: true,
388
- cloudOnly: true,
389
- create: (api, patient) => __awaiter(void 0, void 0, void 0, function* () {
390
- const currentUser = yield api.userApi.getCurrentUser();
391
- const item = yield api.topicApi.newInstance(currentUser, patient);
392
- return api.topicApi.createTopic(item);
393
- }),
394
- share: (delegatorApi, delegateApi, entity) => __awaiter(void 0, void 0, void 0, function* () {
395
- var _a, _b;
396
- const delegateUser = yield delegateApi.userApi.getCurrentUser();
397
- const delegateId = (_b = (_a = delegateUser.healthcarePartyId) !== null && _a !== void 0 ? _a : delegateUser.patientId) !== null && _b !== void 0 ? _b : delegateUser.deviceId;
398
- if (!delegateId) {
399
- throw new Error('Cannot share with non data owner user');
400
- }
401
- return delegatorApi.topicApi.shareWith(delegateId, entity);
402
- }),
403
- 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) })); }),
404
- delete: (api, id) => __awaiter(void 0, void 0, void 0, function* () { return api.topicApi.deleteTopic(id.id); }),
405
- },
406
- };
407
- //# 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,GAA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AAE,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 item = new TimeTable({ id: randomUUID() })\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';