@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
@@ -157,8 +157,12 @@ export declare class IccDocumentApi {
157
157
  * overrides existing values.
158
158
  * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type
159
159
  * for the attachment. Defaults is false
160
+ * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.
161
+ * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether
162
+ * re-compression with newer algorithms should be attempted on read.
163
+ * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.
160
164
  */
161
- setMainDocumentAttachment(documentId: string, documentRev: string, body: Object, utis?: Array<string>, dataIsEncrypted?: boolean): Promise<Document>;
165
+ setMainDocumentAttachment(documentId: string, documentRev: string, body: Object, utis?: Array<string>, dataIsEncrypted?: boolean, compressionAlgorithm?: string, triedCompressionAlgorithmsVersion?: string, realDataSize?: number): Promise<Document>;
162
166
  /**
163
167
  * @deprecated use setMainDocumentAttachment instead
164
168
  */
@@ -182,9 +186,13 @@ export declare class IccDocumentApi {
182
186
  * @param utis an array of UTIs for the attachment. If provided and non-empty overrides existing values.
183
187
  * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type
184
188
  * for the attachment. Defaults is false
189
+ * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.
190
+ * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether
191
+ * re-compression with newer algorithms should be attempted on read.
192
+ * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.
185
193
  * @return the updated document
186
194
  */
187
- setSecondaryAttachment(documentId: string, key: string, rev: string, attachment: Object, utis?: Array<string>, dataIsEncrypted?: boolean): Promise<Document>;
195
+ setSecondaryAttachment(documentId: string, key: string, rev: string, attachment: Object, utis?: Array<string>, dataIsEncrypted?: boolean, compressionAlgorithm?: string, triedCompressionAlgorithmsVersion?: string, realDataSize?: number): Promise<Document>;
188
196
  /**
189
197
  * Get the secondary attachment with the provided key for a document
190
198
  * @summary Retrieve a secondary attachment of a document
@@ -365,8 +365,12 @@ class IccDocumentApi {
365
365
  * overrides existing values.
366
366
  * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type
367
367
  * for the attachment. Defaults is false
368
+ * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.
369
+ * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether
370
+ * re-compression with newer algorithms should be attempted on read.
371
+ * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.
368
372
  */
369
- setMainDocumentAttachment(documentId, documentRev, body, utis, dataIsEncrypted) {
373
+ setMainDocumentAttachment(documentId, documentRev, body, utis, dataIsEncrypted, compressionAlgorithm, triedCompressionAlgorithmsVersion, realDataSize) {
370
374
  return __awaiter(this, void 0, void 0, function* () {
371
375
  if (!documentRev)
372
376
  throw new Error('Document rev is required');
@@ -378,7 +382,12 @@ class IccDocumentApi {
378
382
  '&rev=' +
379
383
  encodeURIComponent(String(documentRev)) +
380
384
  (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +
381
- (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '');
385
+ (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '') +
386
+ (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +
387
+ (triedCompressionAlgorithmsVersion
388
+ ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))
389
+ : '') +
390
+ (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '');
382
391
  let headers = yield this.headers;
383
392
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/octet-stream'));
384
393
  return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
@@ -430,9 +439,13 @@ class IccDocumentApi {
430
439
  * @param utis an array of UTIs for the attachment. If provided and non-empty overrides existing values.
431
440
  * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type
432
441
  * for the attachment. Defaults is false
442
+ * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.
443
+ * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether
444
+ * re-compression with newer algorithms should be attempted on read.
445
+ * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.
433
446
  * @return the updated document
434
447
  */
435
- setSecondaryAttachment(documentId, key, rev, attachment, utis, dataIsEncrypted) {
448
+ setSecondaryAttachment(documentId, key, rev, attachment, utis, dataIsEncrypted, compressionAlgorithm, triedCompressionAlgorithmsVersion, realDataSize) {
436
449
  return __awaiter(this, void 0, void 0, function* () {
437
450
  const _url = this.host +
438
451
  `/document/` +
@@ -443,7 +456,12 @@ class IccDocumentApi {
443
456
  new Date().getTime() +
444
457
  (rev ? '&rev=' + encodeURIComponent(String(rev)) : '') +
445
458
  (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +
446
- (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '');
459
+ (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '') +
460
+ (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +
461
+ (triedCompressionAlgorithmsVersion
462
+ ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))
463
+ : '') +
464
+ (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '');
447
465
  let headers = yield this.headers;
448
466
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/octet-stream'));
449
467
  return XHR_1.XHR.sendCommand('PUT', _url, headers, attachment, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
@@ -1 +1 @@
1
- {"version":3,"file":"IccDocumentApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccDocumentApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,gDAA4C;AAE5C,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAE/E,0EAAsE;AAItE,MAAa,cAAc;IAMzB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,G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iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Document } from '../model/Document'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListDocument } from '../model/PaginatedListDocument'\nimport { AbstractFilterDocument } from '../model/AbstractFilterDocument'\nimport { TimingInfo } from '../model/TimingInfo'\n\nexport class IccDocumentApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Creates a document and returns an instance of created document afterward\n * @summary Create a document\n * @param body\n */\n async createDocument(body?: Document): Promise<Document> {\n const _url = this.host + `/document` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deletes a document's attachment and returns the modified document instance afterward\n * @summary Delete a document's attachment\n * @param documentId\n */\n async deleteAttachment(documentId: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of documents and returns the list of deleted document ids.\n *\n * @param documentIds a ListOfIds containing the ids of the documents to delete.\n * @return a Promise that will resolve in an array of DocIdentifier of the successfully deleted documents.\n */\n async deleteDocuments(documentIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/document/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n documentIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single document by id.\n *\n * @param documentId the id of the document to delete.\n * @return a DocIdentifier of the document.\n */\n async deleteDocument(documentId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/document/${encodeURIComponent(documentId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Purges a single document, also purging any attachment linked to it.\n *\n * @param document the document to purge.\n * @return a DocIdentifier of the document.\n */\n async purgeDocument(document: Document): Promise<DocIdentifier> {\n if (document.id == null || document.rev == null) {\n throw new Error('Cannot purge document with null id or rev')\n }\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/document/purge/${encodeURIComponent(document.id)}?ts=${new Date().getTime()}&rev=${encodeURIComponent(document.rev)}`,\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @summary List documents found By type, By Healthcare Party and secret foreign keys.\n * @param documentTypeCode\n * @param hcPartyId\n * @param secretFKeys\n */\n async findByTypeHCPartyMessageSecretFKeys(documentTypeCode: string, hcPartyId: string, secretFKeys: string[]): Promise<Array<Document>> {\n const body = new ListOfIds({ ids: secretFKeys })\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (documentTypeCode ? '&documentTypeCode=' + encodeURIComponent(String(documentTypeCode)) : '') +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @summary List documents found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findDocumentsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string[]): Promise<Array<Document>> {\n const body = new ListOfIds({ ids: secretFKeys })\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List documents found By Healthcare Party and a single secret foreign key with pagination.\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @param hcPartyId the healthcare party id.\n * @param secretFKey the secret foreign key.\n * @param startKey the startKey provided by the previous page or undefined for the first page.\n * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.\n * @param limit the number of elements that the page should contain.\n * @return a promise that will resolve in a PaginatedListDocument.\n */\n async findDocumentsByHCPartyPatientForeignKey(\n hcPartyId: string,\n secretFKey: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListDocument> {\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKey?ts=${new Date().getTime()}` +\n `&hcPartyId=${encodeURIComponent(hcPartyId)}` +\n `&secretFKey=${encodeURIComponent(secretFKey)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n const headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListDocument(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async findDocumentIdsByDataOwnerSecretForeignKey(\n dataOwnerId: string,\n secretForeignKeys: string[],\n startDate?: number,\n endDate?: number,\n descending?: boolean\n ): Promise<string[]> {\n const _url =\n this.host +\n `/document/byDataOwnerPatientCreated?ts=${new Date().getTime()}` +\n `&dataOwnerId=${encodeURIComponent(dataOwnerId)}` +\n (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +\n (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +\n (!!descending ? `&descending=${descending}` : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: secretForeignKeys }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @summary List documents with no delegation\n * @param limit\n */\n async findWithoutDelegation(limit?: number): Promise<Array<Document>> {\n let _body = null\n\n const _url = this.host + `/document/woDelegation` + '?ts=' + new Date().getTime() + (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the document corresponding to the identifier passed in the request\n * @summary Get a document\n * @param documentId\n */\n async getDocument(documentId: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use getMainDocumentAttachment instead\n */\n async getDocumentAttachment(documentId: string, attachmentId: string, enckeys?: string, fileName?: string): Promise<ArrayBuffer> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n return this.getMainDocumentAttachment(documentId)\n }\n\n /**\n * Get the main attachment of a document\n * @param documentId id of the document\n * @return the content of the main attachment for the document (if any)\n */\n async getMainDocumentAttachment(documentId: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get the main attachment of a document forcing usage of `application/octet-stream` in Content-Type\n * @param documentId id of the document\n * @return the content of the main attachment for the document (if any)\n */\n async getRawMainDocumentAttachment(documentId: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, 'application/octet-stream', this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the first document corresponding to the externalUuid passed in the request\n * @summary Get a document\n * @param externalUuid\n */\n async getDocumentByExternalUuid(externalUuid: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/externaluuid/${encodeURIComponent(String(externalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of document corresponding to the identifiers passed in the body\n * @summary Get a batch of document\n * @param body\n */\n async getDocuments(body?: ListOfIds): Promise<Array<Document>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of document corresponding to the externalUuid passed in the request\n * @summary Get all documents with externalUuid\n * @param externalUuid\n */\n async getDocumentsByExternalUuid(externalUuid: string): Promise<Array<Document>> {\n let _body = null\n\n const _url = this.host + `/document/externaluuid/${encodeURIComponent(String(externalUuid))}/all` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Updates the document and returns an instance of the modified document afterward\n * @summary Update a document\n * @param body\n */\n async modifyDocument(body?: Document): Promise<Document> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified documents.\n * @summary Update a batch of documents\n * @param body\n */\n async modifyDocuments(body?: Array<Document>): Promise<Array<Document>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Creates or updates a main attachment for a document and returns the modified document instance afterward\n * @param documentId id of the document\n * @param documentRev revision of the document\n * @param body content of the attachment (must be compatible with XHR body)\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type\n * for the attachment. Defaults is false\n */\n async setMainDocumentAttachment(\n documentId: string,\n documentRev: string,\n body: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean\n ): Promise<Document> {\n if (!documentRev) throw new Error('Document rev is required')\n let _body = body\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/attachment` +\n '?ts=' +\n new Date().getTime() +\n '&rev=' +\n encodeURIComponent(String(documentRev)) +\n (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +\n (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachmentBody(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n if (!body) {\n throw new Error('body is now required.')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, body, utis)\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachment(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n if (!body) {\n throw new Error('body is now required.')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, body, utis)\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachmentMulti(attachment: ArrayBuffer, documentRev: string, documentId: string, enckeys?: null): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, attachment)\n }\n\n /**\n * Creates or updates a secondary attachment for a document and returns the modified document instance afterward\n * @summary Creates or modifies a secondary attachment for a document\n * @param documentId id of the document to update\n * @param key Key of the secondary attachment to update\n * @param rev Revision of the latest known version of the document. If the revision does not match the current version of the document the method\n * will fail with CONFLICT status\n * @param attachment\n * @param utis an array of UTIs for the attachment. If provided and non-empty overrides existing values.\n * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type\n * for the attachment. Defaults is false\n * @return the updated document\n */\n async setSecondaryAttachment(\n documentId: string,\n key: string,\n rev: string,\n attachment: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean\n ): Promise<Document> {\n const _url =\n this.host +\n `/document/` +\n encodeURIComponent(String(documentId)) +\n '/secondaryAttachments/' +\n encodeURIComponent(String(key)) +\n '?ts=' +\n new Date().getTime() +\n (rev ? '&rev=' + encodeURIComponent(String(rev)) : '') +\n (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +\n (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, attachment, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get the secondary attachment with the provided key for a document\n * @summary Retrieve a secondary attachment of a document\n * @param documentId id of the document\n * @param key Key of the secondary attachment to retrieve\n * @param fileName\n * @return the content of the attachment\n */\n async getSecondaryAttachment(documentId: string, key: string, fileName?: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/secondaryAttachments/${encodeURIComponent(String(key))}` +\n '?ts=' +\n new Date().getTime() +\n (fileName ? '&fileName=' + encodeURIComponent(String(fileName)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deletes a document's attachment and returns the modified document instance afterward\n * @summary Delete a document's attachment\n * @param documentId id of the document\n * @param key Key of the secondary attachment to delete\n * @param rev Revision of the latest known version of the document. If the revision does not match the current version of the document the method will fail with CONFLICT status\n * @return the updated document\n */\n async deleteSecondaryAttachment(documentId: string, key: string, rev: string): Promise<Document> {\n let _body = null\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/secondaryAttachments/${encodeURIComponent(String(key))}` +\n '?ts=' +\n new Date().getTime() +\n (rev ? '&rev=' + encodeURIComponent(String(rev)) : '')\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n // TODO single request multi-attachment update\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareDocument(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Document>[]> {\n const _url = this.host + '/document/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Document>(x, Document)))\n .catch((err) => this.handleError(err))\n }\n\n matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: false): Promise<Array<string>>\n matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: true): Promise<Array<string> & TimingInfo>\n async matchDocumentsBy(body?: AbstractFilterDocument, collectTiming: boolean = false): Promise<Array<string>> {\n const _url = this.host + `/document/match` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService(), undefined, false, collectTiming ? ['x-filter-timing-*'] : [])\n .then((doc) => Object.assign((doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))), collectTiming ? { responseHeaders: doc.responseHeaders } : {}))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccDocumentApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccDocumentApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,gDAA4C;AAE5C,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAE/E,0EAAsE;AAItE,MAAa,cAAc;IAMzB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU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AAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;iBACvL,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;iBAClK,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAjkBD,wCAikBC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Document } from '../model/Document'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListDocument } from '../model/PaginatedListDocument'\nimport { AbstractFilterDocument } from '../model/AbstractFilterDocument'\nimport { TimingInfo } from '../model/TimingInfo'\n\nexport class IccDocumentApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Creates a document and returns an instance of created document afterward\n * @summary Create a document\n * @param body\n */\n async createDocument(body?: Document): Promise<Document> {\n const _url = this.host + `/document` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deletes a document's attachment and returns the modified document instance afterward\n * @summary Delete a document's attachment\n * @param documentId\n */\n async deleteAttachment(documentId: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of documents and returns the list of deleted document ids.\n *\n * @param documentIds a ListOfIds containing the ids of the documents to delete.\n * @return a Promise that will resolve in an array of DocIdentifier of the successfully deleted documents.\n */\n async deleteDocuments(documentIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/document/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n documentIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single document by id.\n *\n * @param documentId the id of the document to delete.\n * @return a DocIdentifier of the document.\n */\n async deleteDocument(documentId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/document/${encodeURIComponent(documentId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Purges a single document, also purging any attachment linked to it.\n *\n * @param document the document to purge.\n * @return a DocIdentifier of the document.\n */\n async purgeDocument(document: Document): Promise<DocIdentifier> {\n if (document.id == null || document.rev == null) {\n throw new Error('Cannot purge document with null id or rev')\n }\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/document/purge/${encodeURIComponent(document.id)}?ts=${new Date().getTime()}&rev=${encodeURIComponent(document.rev)}`,\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @summary List documents found By type, By Healthcare Party and secret foreign keys.\n * @param documentTypeCode\n * @param hcPartyId\n * @param secretFKeys\n */\n async findByTypeHCPartyMessageSecretFKeys(documentTypeCode: string, hcPartyId: string, secretFKeys: string[]): Promise<Array<Document>> {\n const body = new ListOfIds({ ids: secretFKeys })\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (documentTypeCode ? '&documentTypeCode=' + encodeURIComponent(String(documentTypeCode)) : '') +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @summary List documents found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findDocumentsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string[]): Promise<Array<Document>> {\n const body = new ListOfIds({ ids: secretFKeys })\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List documents found By Healthcare Party and a single secret foreign key with pagination.\n * @deprecated use {@link findDocumentIdsByDataOwnerSecretForeignKey} instead.\n * @param hcPartyId the healthcare party id.\n * @param secretFKey the secret foreign key.\n * @param startKey the startKey provided by the previous page or undefined for the first page.\n * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.\n * @param limit the number of elements that the page should contain.\n * @return a promise that will resolve in a PaginatedListDocument.\n */\n async findDocumentsByHCPartyPatientForeignKey(\n hcPartyId: string,\n secretFKey: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListDocument> {\n const _url =\n this.host +\n `/document/byHcPartySecretForeignKey?ts=${new Date().getTime()}` +\n `&hcPartyId=${encodeURIComponent(hcPartyId)}` +\n `&secretFKey=${encodeURIComponent(secretFKey)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n const headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListDocument(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async findDocumentIdsByDataOwnerSecretForeignKey(\n dataOwnerId: string,\n secretForeignKeys: string[],\n startDate?: number,\n endDate?: number,\n descending?: boolean\n ): Promise<string[]> {\n const _url =\n this.host +\n `/document/byDataOwnerPatientCreated?ts=${new Date().getTime()}` +\n `&dataOwnerId=${encodeURIComponent(dataOwnerId)}` +\n (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +\n (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +\n (!!descending ? `&descending=${descending}` : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: secretForeignKeys }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @summary List documents with no delegation\n * @param limit\n */\n async findWithoutDelegation(limit?: number): Promise<Array<Document>> {\n let _body = null\n\n const _url = this.host + `/document/woDelegation` + '?ts=' + new Date().getTime() + (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the document corresponding to the identifier passed in the request\n * @summary Get a document\n * @param documentId\n */\n async getDocument(documentId: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use getMainDocumentAttachment instead\n */\n async getDocumentAttachment(documentId: string, attachmentId: string, enckeys?: string, fileName?: string): Promise<ArrayBuffer> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n return this.getMainDocumentAttachment(documentId)\n }\n\n /**\n * Get the main attachment of a document\n * @param documentId id of the document\n * @return the content of the main attachment for the document (if any)\n */\n async getMainDocumentAttachment(documentId: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get the main attachment of a document forcing usage of `application/octet-stream` in Content-Type\n * @param documentId id of the document\n * @return the content of the main attachment for the document (if any)\n */\n async getRawMainDocumentAttachment(documentId: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url = this.host + `/document/${encodeURIComponent(String(documentId))}/attachment` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, 'application/octet-stream', this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the first document corresponding to the externalUuid passed in the request\n * @summary Get a document\n * @param externalUuid\n */\n async getDocumentByExternalUuid(externalUuid: string): Promise<Document> {\n let _body = null\n\n const _url = this.host + `/document/externaluuid/${encodeURIComponent(String(externalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of document corresponding to the identifiers passed in the body\n * @summary Get a batch of document\n * @param body\n */\n async getDocuments(body?: ListOfIds): Promise<Array<Document>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of document corresponding to the externalUuid passed in the request\n * @summary Get all documents with externalUuid\n * @param externalUuid\n */\n async getDocumentsByExternalUuid(externalUuid: string): Promise<Array<Document>> {\n let _body = null\n\n const _url = this.host + `/document/externaluuid/${encodeURIComponent(String(externalUuid))}/all` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Updates the document and returns an instance of the modified document afterward\n * @summary Update a document\n * @param body\n */\n async modifyDocument(body?: Document): Promise<Document> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified documents.\n * @summary Update a batch of documents\n * @param body\n */\n async modifyDocuments(body?: Array<Document>): Promise<Array<Document>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/document/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Document(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Creates or updates a main attachment for a document and returns the modified document instance afterward\n * @param documentId id of the document\n * @param documentRev revision of the document\n * @param body content of the attachment (must be compatible with XHR body)\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type\n * for the attachment. Defaults is false\n * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.\n * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether\n * re-compression with newer algorithms should be attempted on read.\n * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.\n */\n async setMainDocumentAttachment(\n documentId: string,\n documentRev: string,\n body: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean,\n compressionAlgorithm?: string,\n triedCompressionAlgorithmsVersion?: string,\n realDataSize?: number\n ): Promise<Document> {\n if (!documentRev) throw new Error('Document rev is required')\n let _body = body\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/attachment` +\n '?ts=' +\n new Date().getTime() +\n '&rev=' +\n encodeURIComponent(String(documentRev)) +\n (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +\n (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '') +\n (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +\n (triedCompressionAlgorithmsVersion\n ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))\n : '') +\n (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachmentBody(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n if (!body) {\n throw new Error('body is now required.')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, body, utis)\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachment(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n if (!body) {\n throw new Error('body is now required.')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, body, utis)\n }\n\n /**\n * @deprecated use setMainDocumentAttachment instead\n */\n setDocumentAttachmentMulti(attachment: ArrayBuffer, documentRev: string, documentId: string, enckeys?: null): Promise<Document> {\n if (enckeys) {\n throw new Error('Server-side encryption of attachment is not allowed anymore')\n }\n return this.setMainDocumentAttachment(documentId, documentRev, attachment)\n }\n\n /**\n * Creates or updates a secondary attachment for a document and returns the modified document instance afterward\n * @summary Creates or modifies a secondary attachment for a document\n * @param documentId id of the document to update\n * @param key Key of the secondary attachment to update\n * @param rev Revision of the latest known version of the document. If the revision does not match the current version of the document the method\n * will fail with CONFLICT status\n * @param attachment\n * @param utis an array of UTIs for the attachment. If provided and non-empty overrides existing values.\n * @param dataIsEncrypted set this to true if the body you provided is containing encrypted data. This helps to have the appropriate content type\n * for the attachment. Defaults is false\n * @param compressionAlgorithm the client-side compression algorithm used on the data, if any (e.g. 'lzma'). Null/undefined if no compression was applied.\n * @param triedCompressionAlgorithmsVersion a version string indicating which compression algorithms were tried by the SDK, used to decide whether\n * re-compression with newer algorithms should be attempted on read.\n * @param realDataSize the size in bytes of the original data before compression and encryption, used for informational purposes.\n * @return the updated document\n */\n async setSecondaryAttachment(\n documentId: string,\n key: string,\n rev: string,\n attachment: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean,\n compressionAlgorithm?: string,\n triedCompressionAlgorithmsVersion?: string,\n realDataSize?: number\n ): Promise<Document> {\n const _url =\n this.host +\n `/document/` +\n encodeURIComponent(String(documentId)) +\n '/secondaryAttachments/' +\n encodeURIComponent(String(key)) +\n '?ts=' +\n new Date().getTime() +\n (rev ? '&rev=' + encodeURIComponent(String(rev)) : '') +\n (utis ? utis.map((x) => '&utis=' + encodeURIComponent(String(x))).join('') : '') +\n (dataIsEncrypted ? '&encrypted=' + encodeURIComponent(String(dataIsEncrypted)) : '') +\n (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +\n (triedCompressionAlgorithmsVersion\n ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))\n : '') +\n (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, attachment, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get the secondary attachment with the provided key for a document\n * @summary Retrieve a secondary attachment of a document\n * @param documentId id of the document\n * @param key Key of the secondary attachment to retrieve\n * @param fileName\n * @return the content of the attachment\n */\n async getSecondaryAttachment(documentId: string, key: string, fileName?: string): Promise<ArrayBuffer> {\n let _body = null\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/secondaryAttachments/${encodeURIComponent(String(key))}` +\n '?ts=' +\n new Date().getTime() +\n (fileName ? '&fileName=' + encodeURIComponent(String(fileName)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deletes a document's attachment and returns the modified document instance afterward\n * @summary Delete a document's attachment\n * @param documentId id of the document\n * @param key Key of the secondary attachment to delete\n * @param rev Revision of the latest known version of the document. If the revision does not match the current version of the document the method will fail with CONFLICT status\n * @return the updated document\n */\n async deleteSecondaryAttachment(documentId: string, key: string, rev: string): Promise<Document> {\n let _body = null\n\n const _url =\n this.host +\n `/document/${encodeURIComponent(String(documentId))}/secondaryAttachments/${encodeURIComponent(String(key))}` +\n '?ts=' +\n new Date().getTime() +\n (rev ? '&rev=' + encodeURIComponent(String(rev)) : '')\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Document(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n // TODO single request multi-attachment update\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareDocument(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Document>[]> {\n const _url = this.host + '/document/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Document>(x, Document)))\n .catch((err) => this.handleError(err))\n }\n\n matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: false): Promise<Array<string>>\n matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: true): Promise<Array<string> & TimingInfo>\n async matchDocumentsBy(body?: AbstractFilterDocument, collectTiming: boolean = false): Promise<Array<string>> {\n const _url = this.host + `/document/match` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService(), undefined, false, collectTiming ? ['x-filter-timing-*'] : [])\n .then((doc) => Object.assign((doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))), collectTiming ? { responseHeaders: doc.responseHeaders } : {}))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -83,6 +83,23 @@ export declare class IccReceiptApi {
83
83
  * @param body content of the attachment, already encrypted
84
84
  */
85
85
  setReceiptAttachmentForBlobType(receiptId: string, receiptRev: string, blobType: string, body: ArrayBuffer): Promise<Receipt>;
86
+ /**
87
+ * @summary Creates a receipt's data attachment with compression metadata
88
+ * @param receiptId id of a receipt
89
+ * @param blobType receipt blob type
90
+ * @param rev revision of the receipt
91
+ * @param body content of the attachment
92
+ * @param compressionAlgorithm the compression algorithm used on the client side, if any
93
+ * @param triedCompressionAlgorithmsVersion a version string for the compression algorithms tried
94
+ * @param realDataSize the real size of the data after decryption and decompression
95
+ */
96
+ setReceiptDataAttachment(receiptId: string, blobType: string, rev: string, body: ArrayBuffer, compressionAlgorithm?: string, triedCompressionAlgorithmsVersion?: string, realDataSize?: number): Promise<Receipt>;
97
+ /**
98
+ * @summary Get a receipt's attachment by blob type
99
+ * @param receiptId id of the receipt
100
+ * @param blobType the blob type of the attachment to retrieve
101
+ */
102
+ getReceiptAttachmentByBlobType(receiptId: string, blobType: string): Promise<ArrayBuffer>;
86
103
  /**
87
104
  * @internal this method is for internal use only and may be changed without notice
88
105
  */
@@ -194,6 +194,58 @@ class IccReceiptApi {
194
194
  .catch((err) => this.handleError(err));
195
195
  });
196
196
  }
197
+ /**
198
+ * @summary Creates a receipt's data attachment with compression metadata
199
+ * @param receiptId id of a receipt
200
+ * @param blobType receipt blob type
201
+ * @param rev revision of the receipt
202
+ * @param body content of the attachment
203
+ * @param compressionAlgorithm the compression algorithm used on the client side, if any
204
+ * @param triedCompressionAlgorithmsVersion a version string for the compression algorithms tried
205
+ * @param realDataSize the real size of the data after decryption and decompression
206
+ */
207
+ setReceiptDataAttachment(receiptId, blobType, rev, body, compressionAlgorithm, triedCompressionAlgorithmsVersion, realDataSize) {
208
+ return __awaiter(this, void 0, void 0, function* () {
209
+ if (!rev)
210
+ throw new Error('Receipt rev is required');
211
+ const _url = this.host +
212
+ `/receipt/${encodeURIComponent(String(receiptId))}/dataattachment/${encodeURIComponent(String(blobType))}` +
213
+ '?ts=' +
214
+ new Date().getTime() +
215
+ '&rev=' +
216
+ encodeURIComponent(String(rev)) +
217
+ (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +
218
+ (triedCompressionAlgorithmsVersion
219
+ ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))
220
+ : '') +
221
+ (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '');
222
+ let headers = yield this.headers;
223
+ headers = headers
224
+ .filter((h) => h.header !== 'Content-Type' && h.header !== 'Content-Length')
225
+ .concat(new XHR_1.XHR.Header('Content-Type', 'application/octet-stream'))
226
+ .concat(new XHR_1.XHR.Header('Content-Length', String(body.byteLength)));
227
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
228
+ .then((doc) => new Receipt_1.Receipt(doc.body))
229
+ .catch((err) => this.handleError(err));
230
+ });
231
+ }
232
+ /**
233
+ * @summary Get a receipt's attachment by blob type
234
+ * @param receiptId id of the receipt
235
+ * @param blobType the blob type of the attachment to retrieve
236
+ */
237
+ getReceiptAttachmentByBlobType(receiptId, blobType) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ const _url = this.host +
240
+ `/receipt/${encodeURIComponent(String(receiptId))}/attachment/ofType/${encodeURIComponent(String(blobType))}` +
241
+ '?ts=' +
242
+ new Date().getTime();
243
+ let headers = yield this.headers;
244
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
245
+ .then((doc) => doc.body)
246
+ .catch((err) => this.handleError(err));
247
+ });
248
+ }
197
249
  /**
198
250
  * @internal this method is for internal use only and may be changed without notice
199
251
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IccReceiptApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccReceiptApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,8CAA0C;AAC1C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAI/E,MAAa,aAAa;IAMxB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,C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AC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,6CAAqB,CAAU,CAAC,EAAE,iBAAO,CAAC,CAAC,CAAC;iBACnG,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA9MD,sCA8MC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Receipt } from '../model/Receipt'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\n\nexport class IccReceiptApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n *\n * @summary Creates a receipt\n * @param body\n */\n async createReceipt(body?: Receipt): Promise<Receipt> {\n const _url = this.host + `/receipt` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of receipts.\n *\n * @param receiptIds a ListOfIds containing the ids of the receipts to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted receipts.\n */\n async deleteReceipts(receiptIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/receipt/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n receiptIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single receipt by id.\n *\n * @param receiptId the id of the receipt to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted receipt.\n */\n async deleteReceipt(receiptId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/receipt/${encodeURIComponent(receiptId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a receipt\n * @param receiptId\n */\n async getReceipt(receiptId: string): Promise<Receipt> {\n let _body = null\n\n const _url = this.host + `/receipt/${encodeURIComponent(String(receiptId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get an attachment\n * @param receiptId\n * @param attachmentId\n * @param enckeys\n */\n async getReceiptAttachment(receiptId: string, attachmentId: string, enckeys?: null): Promise<ArrayBuffer> {\n if (enckeys) {\n throw new Error('Server-side encryption is not supported anymore.')\n }\n let _body = null\n\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/attachment/${encodeURIComponent(String(attachmentId))}` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a receipt\n * @param ref\n */\n async listByReference(ref: string): Promise<Array<Receipt>> {\n let _body = null\n\n const _url = this.host + `/receipt/byRef/${encodeURIComponent(String(ref))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Receipt(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Updates a receipt\n * @param body\n */\n async modifyReceipt(body?: Receipt): Promise<Receipt> {\n let _body = null\n _body = body\n\n const _url = this.host + `/receipt` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use setReceiptAttachmentForBlobType instead\n */\n async setReceiptAttachment(receiptId: string, receiptRev: string, blobType: string, enckeys?: null, body?: ArrayBuffer): Promise<Receipt> {\n if (enckeys) {\n throw new Error('Server-side encryption is not supported anymore.')\n }\n if (!body) {\n throw new Error('Attachment content is requred')\n }\n return this.setReceiptAttachmentForBlobType(receiptId, receiptRev, blobType, body)\n }\n\n /**\n * @summary Creates a receipt's attachment\n * @param receiptId id of a receipt\n * @param receiptRev rev of the receipt\n * @param blobType receipt blob type\n * @param body content of the attachment, already encrypted\n */\n async setReceiptAttachmentForBlobType(receiptId: string, receiptRev: string, blobType: string, body: ArrayBuffer): Promise<Receipt> {\n if (!receiptRev) throw new Error('Receipt rev is required')\n\n let _body = body\n\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/attachment/${encodeURIComponent(String(blobType))}` +\n '?ts=' +\n new Date().getTime() +\n '&rev=' +\n receiptRev\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareReceipt(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Receipt>[]> {\n const _url = this.host + '/receipt/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Receipt>(x, Receipt)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccReceiptApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccReceiptApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,8CAA0C;AAC1C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAI/E,MAAa,aAAa;IAMxB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,C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AAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA1QD,sCA0QC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Receipt } from '../model/Receipt'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\n\nexport class IccReceiptApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n *\n * @summary Creates a receipt\n * @param body\n */\n async createReceipt(body?: Receipt): Promise<Receipt> {\n const _url = this.host + `/receipt` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of receipts.\n *\n * @param receiptIds a ListOfIds containing the ids of the receipts to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted receipts.\n */\n async deleteReceipts(receiptIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/receipt/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n receiptIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single receipt by id.\n *\n * @param receiptId the id of the receipt to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted receipt.\n */\n async deleteReceipt(receiptId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/receipt/${encodeURIComponent(receiptId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a receipt\n * @param receiptId\n */\n async getReceipt(receiptId: string): Promise<Receipt> {\n let _body = null\n\n const _url = this.host + `/receipt/${encodeURIComponent(String(receiptId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get an attachment\n * @param receiptId\n * @param attachmentId\n * @param enckeys\n */\n async getReceiptAttachment(receiptId: string, attachmentId: string, enckeys?: null): Promise<ArrayBuffer> {\n if (enckeys) {\n throw new Error('Server-side encryption is not supported anymore.')\n }\n let _body = null\n\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/attachment/${encodeURIComponent(String(attachmentId))}` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a receipt\n * @param ref\n */\n async listByReference(ref: string): Promise<Array<Receipt>> {\n let _body = null\n\n const _url = this.host + `/receipt/byRef/${encodeURIComponent(String(ref))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Receipt(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Updates a receipt\n * @param body\n */\n async modifyReceipt(body?: Receipt): Promise<Receipt> {\n let _body = null\n _body = body\n\n const _url = this.host + `/receipt` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use setReceiptAttachmentForBlobType instead\n */\n async setReceiptAttachment(receiptId: string, receiptRev: string, blobType: string, enckeys?: null, body?: ArrayBuffer): Promise<Receipt> {\n if (enckeys) {\n throw new Error('Server-side encryption is not supported anymore.')\n }\n if (!body) {\n throw new Error('Attachment content is requred')\n }\n return this.setReceiptAttachmentForBlobType(receiptId, receiptRev, blobType, body)\n }\n\n /**\n * @summary Creates a receipt's attachment\n * @param receiptId id of a receipt\n * @param receiptRev rev of the receipt\n * @param blobType receipt blob type\n * @param body content of the attachment, already encrypted\n */\n async setReceiptAttachmentForBlobType(receiptId: string, receiptRev: string, blobType: string, body: ArrayBuffer): Promise<Receipt> {\n if (!receiptRev) throw new Error('Receipt rev is required')\n\n let _body = body\n\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/attachment/${encodeURIComponent(String(blobType))}` +\n '?ts=' +\n new Date().getTime() +\n '&rev=' +\n receiptRev\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Creates a receipt's data attachment with compression metadata\n * @param receiptId id of a receipt\n * @param blobType receipt blob type\n * @param rev revision of the receipt\n * @param body content of the attachment\n * @param compressionAlgorithm the compression algorithm used on the client side, if any\n * @param triedCompressionAlgorithmsVersion a version string for the compression algorithms tried\n * @param realDataSize the real size of the data after decryption and decompression\n */\n async setReceiptDataAttachment(\n receiptId: string,\n blobType: string,\n rev: string,\n body: ArrayBuffer,\n compressionAlgorithm?: string,\n triedCompressionAlgorithmsVersion?: string,\n realDataSize?: number\n ): Promise<Receipt> {\n if (!rev) throw new Error('Receipt rev is required')\n\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/dataattachment/${encodeURIComponent(String(blobType))}` +\n '?ts=' +\n new Date().getTime() +\n '&rev=' +\n encodeURIComponent(String(rev)) +\n (compressionAlgorithm ? '&compressionAlgorithm=' + encodeURIComponent(String(compressionAlgorithm)) : '') +\n (triedCompressionAlgorithmsVersion\n ? '&triedCompressionAlgorithmsVersion=' + encodeURIComponent(String(triedCompressionAlgorithmsVersion))\n : '') +\n (realDataSize != null ? '&realDataSize=' + encodeURIComponent(String(realDataSize)) : '')\n let headers = await this.headers\n headers = headers\n .filter((h) => h.header !== 'Content-Type' && h.header !== 'Content-Length')\n .concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n .concat(new XHR.Header('Content-Length', String(body.byteLength)))\n return XHR.sendCommand('PUT', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Receipt(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Get a receipt's attachment by blob type\n * @param receiptId id of the receipt\n * @param blobType the blob type of the attachment to retrieve\n */\n async getReceiptAttachmentByBlobType(receiptId: string, blobType: string): Promise<ArrayBuffer> {\n const _url =\n this.host +\n `/receipt/${encodeURIComponent(String(receiptId))}/attachment/ofType/${encodeURIComponent(String(blobType))}` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareReceipt(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Receipt>[]> {\n const _url = this.host + '/receipt/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Receipt>(x, Receipt)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -27,4 +27,26 @@ export declare class DataAttachment {
27
27
  * This is an array to allow representing a priority, but each UTI must be unique.
28
28
  */
29
29
  utis?: Array<string>;
30
+ /**
31
+ * Algorithm used on the CLIENT SIDE to compress the data attachment.
32
+ * Null means that the document was not compressed because the tried algorithms could not actually compress the data
33
+ * (because for example it was an already compressed format) or no algorithms were tried.
34
+ */
35
+ compressionAlgorithm?: string;
36
+ /**
37
+ * A string used by the SDK to mark which compression algorithms were tried.
38
+ * Null means that no compression algorithms were tried.
39
+ * If an SDK reads some data that is not compressed, if this value indicates that the data was created with an older
40
+ * version of the SDK then the SDK may try to use any newly available algorithms to compress the data.
41
+ */
42
+ triedCompressionAlgorithmsVersion?: string;
43
+ /**
44
+ * Value computed by the backend, the actual size of the data stored for the attachment, in bytes.
45
+ */
46
+ storedDataSize?: number;
47
+ /**
48
+ * Value provided by the client, the real size of the data after it has been decrypted and decompressed, in bytes.
49
+ * This value is not used or verified by the backend.
50
+ */
51
+ realDataSize?: number;
30
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DataAttachment.js","sourceRoot":"","sources":["../../../icc-api/model/DataAttachment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH;;GAEG;AACH,MAAa,cAAc;IACzB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAsB,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;CAeF;AAlBD,wCAkBC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\n\n/**\n * Represent an attachment holding some additional data for an entity.\n */\nexport class DataAttachment {\n constructor(json: JSON | any) {\n Object.assign(this as DataAttachment, json)\n }\n\n /**\n * Id of the attachment, if stored as a couchdb attachment\n */\n couchDbAttachmentId?: string\n /**\n * Id of the attachment, if stored using the object storage service\n */\n objectStoreAttachmentId?: string\n /**\n * The Uniform Type Identifiers (https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE) of the attachment.\n * This is an array to allow representing a priority, but each UTI must be unique.\n */\n utis?: Array<string>\n}\n"]}
1
+ {"version":3,"file":"DataAttachment.js","sourceRoot":"","sources":["../../../icc-api/model/DataAttachment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH;;GAEG;AACH,MAAa,cAAc;IACzB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAsB,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;CAqCF;AAxCD,wCAwCC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\n\n/**\n * Represent an attachment holding some additional data for an entity.\n */\nexport class DataAttachment {\n constructor(json: JSON | any) {\n Object.assign(this as DataAttachment, json)\n }\n\n /**\n * Id of the attachment, if stored as a couchdb attachment\n */\n couchDbAttachmentId?: string\n /**\n * Id of the attachment, if stored using the object storage service\n */\n objectStoreAttachmentId?: string\n /**\n * The Uniform Type Identifiers (https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE) of the attachment.\n * This is an array to allow representing a priority, but each UTI must be unique.\n */\n utis?: Array<string>\n /**\n * Algorithm used on the CLIENT SIDE to compress the data attachment.\n * Null means that the document was not compressed because the tried algorithms could not actually compress the data\n * (because for example it was an already compressed format) or no algorithms were tried.\n */\n compressionAlgorithm?: string\n /**\n * A string used by the SDK to mark which compression algorithms were tried.\n * Null means that no compression algorithms were tried.\n * If an SDK reads some data that is not compressed, if this value indicates that the data was created with an older\n * version of the SDK then the SDK may try to use any newly available algorithms to compress the data.\n */\n triedCompressionAlgorithmsVersion?: string\n /**\n * Value computed by the backend, the actual size of the data stored for the attachment, in bytes.\n */\n storedDataSize?: number\n /**\n * Value provided by the client, the real size of the data after it has been decrypted and decompressed, in bytes.\n * This value is not used or verified by the backend.\n */\n realDataSize?: number\n}\n"]}
@@ -120,6 +120,12 @@ export declare class Document {
120
120
  * Extra Uniform Type Identifiers for the main attachment
121
121
  */
122
122
  otherUtis?: Array<string>;
123
+ mainAttachmentStoredDataSize?: number;
124
+ extraMainAttachmentInfo?: {
125
+ compressionAlgorithm?: string;
126
+ triedCompressionAlgorithmsVersion?: string;
127
+ realDataSize?: number;
128
+ };
123
129
  /**
124
130
  * Secondary attachments for this document
125
131
  */