@icure/api 7.0.0-beta.2 → 7.0.0-beta.4

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 (217) hide show
  1. package/icc-api/api/IccAccesslogApi.js +2 -1
  2. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  3. package/icc-api/api/IccAgendaApi.js +2 -1
  4. package/icc-api/api/IccAgendaApi.js.map +1 -1
  5. package/icc-api/api/IccAnonymousAccessApi.js +2 -1
  6. package/icc-api/api/IccAnonymousAccessApi.js.map +1 -1
  7. package/icc-api/api/IccApplicationsettingsApi.js +2 -1
  8. package/icc-api/api/IccApplicationsettingsApi.js.map +1 -1
  9. package/icc-api/api/IccArticleApi.js +2 -1
  10. package/icc-api/api/IccArticleApi.js.map +1 -1
  11. package/icc-api/api/IccAuthApi.d.ts +23 -0
  12. package/icc-api/api/IccAuthApi.js +59 -2
  13. package/icc-api/api/IccAuthApi.js.map +1 -1
  14. package/icc-api/api/IccBeefactApi.js +2 -1
  15. package/icc-api/api/IccBeefactApi.js.map +1 -1
  16. package/icc-api/api/IccBekmehrApi.js +2 -1
  17. package/icc-api/api/IccBekmehrApi.js.map +1 -1
  18. package/icc-api/api/IccBeresultexportApi.js +2 -1
  19. package/icc-api/api/IccBeresultexportApi.js.map +1 -1
  20. package/icc-api/api/IccBeresultimportApi.js +2 -1
  21. package/icc-api/api/IccBeresultimportApi.js.map +1 -1
  22. package/icc-api/api/IccBesamv2Api.d.ts +6 -0
  23. package/icc-api/api/IccBesamv2Api.js +15 -1
  24. package/icc-api/api/IccBesamv2Api.js.map +1 -1
  25. package/icc-api/api/IccCalendarItemApi.js +2 -1
  26. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  27. package/icc-api/api/IccCalendarItemTypeApi.js +2 -1
  28. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  29. package/icc-api/api/IccClassificationApi.js +2 -1
  30. package/icc-api/api/IccClassificationApi.js.map +1 -1
  31. package/icc-api/api/IccClassificationTemplateApi.js +2 -1
  32. package/icc-api/api/IccClassificationTemplateApi.js.map +1 -1
  33. package/icc-api/api/IccCodeApi.js +2 -1
  34. package/icc-api/api/IccCodeApi.js.map +1 -1
  35. package/icc-api/api/IccContactApi.d.ts +6 -0
  36. package/icc-api/api/IccContactApi.js +26 -1
  37. package/icc-api/api/IccContactApi.js.map +1 -1
  38. package/icc-api/api/IccDataownerApi.d.ts +13 -2
  39. package/icc-api/api/IccDataownerApi.js +32 -5
  40. package/icc-api/api/IccDataownerApi.js.map +1 -1
  41. package/icc-api/api/IccDeviceApi.js +2 -1
  42. package/icc-api/api/IccDeviceApi.js.map +1 -1
  43. package/icc-api/api/IccDoctemplateApi.js +2 -1
  44. package/icc-api/api/IccDoctemplateApi.js.map +1 -1
  45. package/icc-api/api/IccDocumentApi.js +2 -1
  46. package/icc-api/api/IccDocumentApi.js.map +1 -1
  47. package/icc-api/api/IccDocumentTemplateApi.js +2 -1
  48. package/icc-api/api/IccDocumentTemplateApi.js.map +1 -1
  49. package/icc-api/api/IccEntityrefApi.js +2 -1
  50. package/icc-api/api/IccEntityrefApi.js.map +1 -1
  51. package/icc-api/api/IccEntitytemplateApi.js +2 -1
  52. package/icc-api/api/IccEntitytemplateApi.js.map +1 -1
  53. package/icc-api/api/IccFormApi.js +2 -1
  54. package/icc-api/api/IccFormApi.js.map +1 -1
  55. package/icc-api/api/IccFrontendmigrationApi.js +2 -1
  56. package/icc-api/api/IccFrontendmigrationApi.js.map +1 -1
  57. package/icc-api/api/IccGroupApi.d.ts +6 -0
  58. package/icc-api/api/IccGroupApi.js +15 -1
  59. package/icc-api/api/IccGroupApi.js.map +1 -1
  60. package/icc-api/api/IccHcpartyApi.js +2 -1
  61. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  62. package/icc-api/api/IccHelementApi.js +2 -1
  63. package/icc-api/api/IccHelementApi.js.map +1 -1
  64. package/icc-api/api/IccIcureApi.js +2 -1
  65. package/icc-api/api/IccIcureApi.js.map +1 -1
  66. package/icc-api/api/IccInsuranceApi.js +2 -1
  67. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  68. package/icc-api/api/IccInvoiceApi.js +2 -1
  69. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  70. package/icc-api/api/IccKeywordApi.js +2 -1
  71. package/icc-api/api/IccKeywordApi.js.map +1 -1
  72. package/icc-api/api/IccMaintenanceTaskApi.js +2 -1
  73. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  74. package/icc-api/api/IccMedexApi.js +2 -1
  75. package/icc-api/api/IccMedexApi.js.map +1 -1
  76. package/icc-api/api/IccMedicallocationApi.js +2 -1
  77. package/icc-api/api/IccMedicallocationApi.js.map +1 -1
  78. package/icc-api/api/IccMessageApi.js +2 -1
  79. package/icc-api/api/IccMessageApi.js.map +1 -1
  80. package/icc-api/api/IccPatientApi.js +2 -1
  81. package/icc-api/api/IccPatientApi.js.map +1 -1
  82. package/icc-api/api/IccPermissionApi.js +2 -1
  83. package/icc-api/api/IccPermissionApi.js.map +1 -1
  84. package/icc-api/api/IccPlaceApi.js +2 -1
  85. package/icc-api/api/IccPlaceApi.js.map +1 -1
  86. package/icc-api/api/IccPubsubApi.js +2 -1
  87. package/icc-api/api/IccPubsubApi.js.map +1 -1
  88. package/icc-api/api/IccReceiptApi.js +2 -1
  89. package/icc-api/api/IccReceiptApi.js.map +1 -1
  90. package/icc-api/api/IccReplicationApi.js +2 -1
  91. package/icc-api/api/IccReplicationApi.js.map +1 -1
  92. package/icc-api/api/IccRestApiPath.d.ts +1 -0
  93. package/icc-api/api/IccRestApiPath.js +10 -0
  94. package/icc-api/api/IccRestApiPath.js.map +1 -0
  95. package/icc-api/api/IccTarificationApi.js +2 -1
  96. package/icc-api/api/IccTarificationApi.js.map +1 -1
  97. package/icc-api/api/IccTimeTableApi.js +2 -1
  98. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  99. package/icc-api/api/IccTmpApi.js +2 -1
  100. package/icc-api/api/IccTmpApi.js.map +1 -1
  101. package/icc-api/api/IccUserApi.js +2 -1
  102. package/icc-api/api/IccUserApi.js.map +1 -1
  103. package/icc-api/index.d.ts +0 -1
  104. package/icc-api/index.js +0 -1
  105. package/icc-api/index.js.map +1 -1
  106. package/icc-api/model/AuthenticationToken.d.ts +1 -0
  107. package/icc-api/model/AuthenticationToken.js.map +1 -1
  108. package/icc-api/model/CryptoActorStub.d.ts +55 -0
  109. package/icc-api/model/CryptoActorStub.js +35 -0
  110. package/icc-api/model/CryptoActorStub.js.map +1 -0
  111. package/icc-api/model/DataOwnerTypeEnum.d.ts +8 -0
  112. package/icc-api/model/DataOwnerTypeEnum.js +13 -0
  113. package/icc-api/model/DataOwnerTypeEnum.js.map +1 -0
  114. package/icc-api/model/DataOwnerWithType.d.ts +16 -3
  115. package/icc-api/model/DataOwnerWithType.js +22 -7
  116. package/icc-api/model/DataOwnerWithType.js.map +1 -1
  117. package/icc-api/model/Device.d.ts +4 -0
  118. package/icc-api/model/Device.js.map +1 -1
  119. package/icc-api/model/FlatRateTarification.d.ts +4 -1
  120. package/icc-api/model/FlatRateTarification.js +3 -0
  121. package/icc-api/model/FlatRateTarification.js.map +1 -1
  122. package/icc-api/model/HealthcareParty.d.ts +4 -0
  123. package/icc-api/model/HealthcareParty.js.map +1 -1
  124. package/icc-api/model/Patient.d.ts +4 -0
  125. package/icc-api/model/Patient.js.map +1 -1
  126. package/icc-api/model/UserGroup.d.ts +1 -0
  127. package/icc-api/model/UserGroup.js.map +1 -1
  128. package/icc-x-api/auth/AuthenticationProvider.d.ts +67 -6
  129. package/icc-x-api/auth/AuthenticationProvider.js +100 -7
  130. package/icc-x-api/auth/AuthenticationProvider.js.map +1 -1
  131. package/icc-x-api/auth/EnsembleAuthService.d.ts +7 -2
  132. package/icc-x-api/auth/EnsembleAuthService.js +9 -0
  133. package/icc-x-api/auth/EnsembleAuthService.js.map +1 -1
  134. package/icc-x-api/auth/JwtAuthService.d.ts +10 -5
  135. package/icc-x-api/auth/JwtAuthService.js +22 -26
  136. package/icc-x-api/auth/JwtAuthService.js.map +1 -1
  137. package/icc-x-api/auth/JwtBridgedAuthService.d.ts +27 -0
  138. package/icc-x-api/auth/JwtBridgedAuthService.js +131 -0
  139. package/icc-x-api/auth/JwtBridgedAuthService.js.map +1 -0
  140. package/icc-x-api/crypto/AES.js +9 -1
  141. package/icc-x-api/crypto/AES.js.map +1 -1
  142. package/icc-x-api/crypto/BaseExchangeKeysManager.d.ts +4 -2
  143. package/icc-x-api/crypto/BaseExchangeKeysManager.js +32 -31
  144. package/icc-x-api/crypto/BaseExchangeKeysManager.js.map +1 -1
  145. package/icc-x-api/crypto/CryptoStrategies.d.ts +5 -4
  146. package/icc-x-api/crypto/CryptoStrategies.js.map +1 -1
  147. package/icc-x-api/crypto/EntitiesEncryption.d.ts +3 -3
  148. package/icc-x-api/crypto/EntitiesEncryption.js +9 -7
  149. package/icc-x-api/crypto/EntitiesEncryption.js.map +1 -1
  150. package/icc-x-api/crypto/ExchangeKeysManager.d.ts +3 -2
  151. package/icc-x-api/crypto/ExchangeKeysManager.js +3 -3
  152. package/icc-x-api/crypto/ExchangeKeysManager.js.map +1 -1
  153. package/icc-x-api/crypto/KeyManager.js +4 -4
  154. package/icc-x-api/crypto/KeyManager.js.map +1 -1
  155. package/icc-x-api/crypto/KeyRecovery.d.ts +2 -1
  156. package/icc-x-api/crypto/KeyRecovery.js.map +1 -1
  157. package/icc-x-api/crypto/LegacyCryptoStrategies.d.ts +5 -4
  158. package/icc-x-api/crypto/LegacyCryptoStrategies.js +1 -1
  159. package/icc-x-api/crypto/LegacyCryptoStrategies.js.map +1 -1
  160. package/icc-x-api/crypto/ShamirKeysManager.d.ts +4 -3
  161. package/icc-x-api/crypto/ShamirKeysManager.js +8 -7
  162. package/icc-x-api/crypto/ShamirKeysManager.js.map +1 -1
  163. package/icc-x-api/crypto/TransferKeysManager.d.ts +3 -2
  164. package/icc-x-api/crypto/TransferKeysManager.js +6 -6
  165. package/icc-x-api/crypto/TransferKeysManager.js.map +1 -1
  166. package/icc-x-api/crypto/utils.d.ts +7 -6
  167. package/icc-x-api/crypto/utils.js +4 -7
  168. package/icc-x-api/crypto/utils.js.map +1 -1
  169. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.d.ts +1 -0
  170. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.js.map +1 -1
  171. package/icc-x-api/icc-accesslog-x-api.d.ts +2 -2
  172. package/icc-x-api/icc-accesslog-x-api.js +9 -4
  173. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  174. package/icc-x-api/icc-calendar-item-x-api.js +11 -3
  175. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  176. package/icc-x-api/icc-classification-x-api.js +7 -2
  177. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  178. package/icc-x-api/icc-contact-x-api.d.ts +1 -0
  179. package/icc-x-api/icc-contact-x-api.js +16 -4
  180. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  181. package/icc-x-api/icc-crypto-x-api.d.ts +6 -6
  182. package/icc-x-api/icc-crypto-x-api.js +4 -4
  183. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  184. package/icc-x-api/icc-data-owner-x-api.d.ts +21 -52
  185. package/icc-x-api/icc-data-owner-x-api.js +36 -68
  186. package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
  187. package/icc-x-api/icc-document-x-api.js +7 -2
  188. package/icc-x-api/icc-document-x-api.js.map +1 -1
  189. package/icc-x-api/icc-form-x-api.js +7 -2
  190. package/icc-x-api/icc-form-x-api.js.map +1 -1
  191. package/icc-x-api/icc-helement-x-api.js +7 -2
  192. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  193. package/icc-x-api/icc-icure-maintenance-x-api.js +8 -8
  194. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  195. package/icc-x-api/icc-invoice-x-api.js +7 -2
  196. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  197. package/icc-x-api/icc-maintenance-task-x-api.js +6 -1
  198. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  199. package/icc-x-api/icc-message-x-api.js +7 -2
  200. package/icc-x-api/icc-message-x-api.js.map +1 -1
  201. package/icc-x-api/icc-patient-x-api.d.ts +4 -1
  202. package/icc-x-api/icc-patient-x-api.js +8 -7
  203. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  204. package/icc-x-api/icc-receipt-x-api.js +6 -1
  205. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  206. package/icc-x-api/icc-time-table-x-api.js +6 -1
  207. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  208. package/icc-x-api/index.d.ts +178 -35
  209. package/icc-x-api/index.js +305 -81
  210. package/icc-x-api/index.js.map +1 -1
  211. package/icc-x-api/maintenance/KeyPairUpdateRequest.d.ts +12 -9
  212. package/icc-x-api/maintenance/KeyPairUpdateRequest.js +11 -17
  213. package/icc-x-api/maintenance/KeyPairUpdateRequest.js.map +1 -1
  214. package/package.json +1 -1
  215. package/icc-api/api/IccBemikronoApi.d.ts +0 -81
  216. package/icc-api/api/IccBemikronoApi.js +0 -162
  217. package/icc-api/api/IccBemikronoApi.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAUmB;AACnB,qDAA8C;AAC9C,yDAAkD;AAClD,2DAAoD;AACpD,2DAAoD;AACpD,6DAAsD;AACtD,2DAAoD;AACpD,qDAA8C;AAC9C,6DAAsD;AACtD,yEAAkE;AAClE,uEAA+D;AAC/D,2DAAoD;AACpD,2DAAoD;AACpD,2DAAoD;AACpD,+DAAwD;AACxD,iEAAyD;AACzD,8DAA0D;AAC1D,qDAA8C;AAC9C,6EAAqE;AACrE,iEAAyD;AAGzD,iEAA6D;AAC7D,6DAAyD;AACzD,0EAKsC;AACtC,gEAA4D;AAC5D,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AS,CAAC,CAAA;QAEhF,MAAM,OAAO,GAAG,IAAI,4BAAW,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QACjF,MAAM,kBAAkB,GAAG,IAAI,yBAAe,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAChG,MAAM,OAAO,GAAG,IAAI,4BAAW,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QACjF,MAAM,aAAa,GAAG,IAAI,0BAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAC5F,MAAM,SAAS,GAAG,IAAI,sBAAY,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QACpF,MAAM,QAAQ,GAAG,IAAI,qBAAW,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAA;QACvE,MAAM,YAAY,GAAG,IAAI,yBAAe,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAE1F,OAAO;YACL,OAAO;YACP,OAAO;YACP,OAAO;YACP,aAAa;YACb,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,QAAQ;SACT,CAAA;IACH,CAAC;CAAA,CAAA;AApCY,QAAA,SAAS,aAoCrB","sourcesContent":["import {\n IccAgendaApi,\n IccAuthApi,\n IccCalendarItemTypeApi,\n IccEntityrefApi,\n IccGroupApi,\n IccInsuranceApi,\n IccMedicallocationApi,\n IccPatientApi,\n IccPermissionApi,\n} from '../icc-api'\nimport { IccUserXApi } from './icc-user-x-api'\nimport { IccCryptoXApi } from './icc-crypto-x-api'\nimport { IccContactXApi } from './icc-contact-x-api'\nimport { IccInvoiceXApi } from './icc-invoice-x-api'\nimport { IccDocumentXApi } from './icc-document-x-api'\nimport { IccHcpartyXApi } from './icc-hcparty-x-api'\nimport { IccFormXApi } from './icc-form-x-api'\nimport { IccHelementXApi } from './icc-helement-x-api'\nimport { IccClassificationXApi } from './icc-classification-x-api'\nimport { IccCalendarItemXApi } from './icc-calendar-item-x-api'\nimport { IccPatientXApi } from './icc-patient-x-api'\nimport { IccMessageXApi } from './icc-message-x-api'\nimport { IccReceiptXApi } from './icc-receipt-x-api'\nimport { IccAccesslogXApi } from './icc-accesslog-x-api'\nimport { IccTimeTableXApi } from './icc-time-table-x-api'\nimport { IccDeviceApi } from '../icc-api/api/IccDeviceApi'\nimport { IccCodeXApi } from './icc-code-x-api'\nimport { IccMaintenanceTaskXApi } from './icc-maintenance-task-x-api'\nimport { IccDataOwnerXApi } from './icc-data-owner-x-api'\nimport { StorageFacade } from './storage/StorageFacade'\nimport { KeyStorageFacade } from './storage/KeyStorageFacade'\nimport { LocalStorageImpl } from './storage/LocalStorageImpl'\nimport { KeyStorageImpl } from './storage/KeyStorageImpl'\nimport {\n AuthenticationProvider,\n BasicAuthenticationProvider,\n EnsembleAuthenticationProvider,\n NoAuthenticationProvider,\n} from './auth/AuthenticationProvider'\nimport { CryptoPrimitives } from './crypto/CryptoPrimitives'\nimport { KeyManager } from './crypto/KeyManager'\nimport { IcureStorageFacade } from './storage/IcureStorageFacade'\nimport { DefaultStorageEntryKeysFactory } from './storage/DefaultStorageEntryKeysFactory'\nimport { KeyRecovery } from './crypto/KeyRecovery'\nimport { BaseExchangeKeysManager } from './crypto/BaseExchangeKeysManager'\nimport { StorageEntryKeysFactory } from './storage/StorageEntryKeysFactory'\nimport { CryptoStrategies } from './crypto/CryptoStrategies'\nimport { ExchangeKeysManager } from './crypto/ExchangeKeysManager'\nimport { ShamirKeysManager } from './crypto/ShamirKeysManager'\nimport { TransferKeysManager } from './crypto/TransferKeysManager'\nimport { IccIcureMaintenanceXApi } from './icc-icure-maintenance-x-api'\nimport { EntitiesEncryption } from './crypto/EntitiesEncryption'\nimport { ConfidentialEntities } from './crypto/ConfidentialEntities'\nimport { ensureDelegationForSelf } from './crypto/utils'\n\nexport * from './icc-accesslog-x-api'\nexport * from './icc-bekmehr-x-api'\nexport * from './icc-calendar-item-x-api'\nexport * from './icc-classification-x-api'\nexport * from './icc-code-x-api'\nexport * from './icc-contact-x-api'\nexport * from './icc-crypto-x-api'\nexport * from './icc-doctemplate-x-api'\nexport * from './icc-document-x-api'\nexport * from './icc-form-x-api'\nexport * from './icc-hcparty-x-api'\nexport * from './icc-helement-x-api'\nexport * from './icc-invoice-x-api'\nexport * from './icc-message-x-api'\nexport * from './icc-patient-x-api'\nexport * from './icc-user-x-api'\nexport * from './icc-time-table-x-api'\nexport * from './icc-receipt-x-api'\nexport * from './utils'\nexport { KeyStorageFacade } from './storage/KeyStorageFacade'\nexport { LocalStorageImpl } from './storage/LocalStorageImpl'\nexport { StorageFacade } from './storage/StorageFacade'\nexport { KeyStorageImpl } from './storage/KeyStorageImpl'\n\nexport interface Apis {\n authApi: IccAuthApi\n codeApi: IccCodeXApi\n calendarItemTypeApi: IccCalendarItemTypeApi\n medicalLocationApi: IccMedicallocationApi\n entityReferenceApi: IccEntityrefApi\n userApi: IccUserXApi\n permissionApi: IccPermissionApi\n healthcarePartyApi: IccHcpartyXApi\n deviceApi: IccDeviceApi\n cryptoApi: IccCryptoXApi\n accessLogApi: IccAccesslogXApi\n agendaApi: IccAgendaApi\n contactApi: IccContactXApi\n formApi: IccFormXApi\n groupApi: IccGroupApi\n invoiceApi: IccInvoiceXApi\n insuranceApi: IccInsuranceApi\n documentApi: IccDocumentXApi\n healthcareElementApi: IccHelementXApi\n classificationApi: IccClassificationXApi\n calendarItemApi: IccCalendarItemXApi\n receiptApi: IccReceiptXApi\n timetableApi: IccTimeTableXApi\n patientApi: IccPatientXApi\n messageApi: IccMessageXApi\n maintenanceTaskApi: IccMaintenanceTaskXApi\n dataOwnerApi: IccDataOwnerXApi\n icureMaintenanceTaskApi: IccIcureMaintenanceXApi\n}\n\nexport type ApiOptions = {\n readonly entryKeysFactory?: StorageEntryKeysFactory\n readonly createMaintenanceTasksOnNewKey?: boolean\n readonly storage?: StorageFacade<string>\n readonly keyStorage?: KeyStorageFacade\n readonly headers?: { [headerName: string]: string }\n}\n\nclass NamedApiParametersWithDefault implements ApiOptions {\n constructor(custom: ApiOptions) {\n this.entryKeysFactory = custom.entryKeysFactory ?? new DefaultStorageEntryKeysFactory()\n this.createMaintenanceTasksOnNewKey = custom.createMaintenanceTasksOnNewKey ?? false\n this.storage = custom.storage ?? new LocalStorageImpl()\n this.keyStorage = custom.keyStorage ?? new KeyStorageImpl(this.storage)\n this.headers = custom.headers ?? {}\n }\n\n readonly entryKeysFactory: StorageEntryKeysFactory\n readonly createMaintenanceTasksOnNewKey: boolean\n readonly storage: StorageFacade<string>\n readonly keyStorage: KeyStorageFacade\n readonly headers: { [headerName: string]: string }\n}\n\nexport type AuthenticationDetails = {\n username: string\n password: string\n forceBasic?: boolean // default false\n}\n\nexport const Api = async function (\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n cryptoStrategies: CryptoStrategies,\n crypto: Crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : ({} as Crypto),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch,\n options: ApiOptions = {}\n): Promise<Apis> {\n const params = new NamedApiParametersWithDefault(options)\n let authenticationProvider: AuthenticationProvider\n if ('username' in authenticationOptions && 'password' in authenticationOptions) {\n authenticationProvider = authenticationOptions.forceBasic\n ? new BasicAuthenticationProvider(authenticationOptions.username, authenticationOptions.password)\n : new EnsembleAuthenticationProvider(\n new IccAuthApi(host, params.headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.password\n )\n } else {\n authenticationProvider = authenticationOptions\n }\n\n // Here I instantiate a separate instance of the AuthApi that can call also login-protected methods (logout)\n const authApi = new IccAuthApi(host, params.headers, authenticationProvider, fetchImpl)\n const codeApi = new IccCodeXApi(host, params.headers, authenticationProvider, fetchImpl)\n const entityReferenceApi = new IccEntityrefApi(host, params.headers, authenticationProvider, fetchImpl)\n const userApi = new IccUserXApi(host, params.headers, authenticationProvider, fetchImpl)\n const permissionApi = new IccPermissionApi(host, params.headers, authenticationProvider, fetchImpl)\n const healthcarePartyApi = new IccHcpartyXApi(host, params.headers, authenticationProvider, fetchImpl)\n const deviceApi = new IccDeviceApi(host, params.headers, authenticationProvider, fetchImpl)\n const basePatientApi = new IccPatientApi(host, params.headers, authenticationProvider, fetchImpl)\n const dataOwnerApi = new IccDataOwnerXApi(userApi, healthcarePartyApi, basePatientApi, deviceApi)\n // Crypto initialisation\n const icureStorage = new IcureStorageFacade(params.keyStorage, params.storage, params.entryKeysFactory)\n const cryptoPrimitives = new CryptoPrimitives(crypto)\n const baseExchangeKeysManager = new BaseExchangeKeysManager(cryptoPrimitives, dataOwnerApi, healthcarePartyApi, basePatientApi, deviceApi)\n const keyRecovery = new KeyRecovery(cryptoPrimitives, baseExchangeKeysManager, dataOwnerApi)\n const keyManager = new KeyManager(cryptoPrimitives, dataOwnerApi, icureStorage, keyRecovery, baseExchangeKeysManager, cryptoStrategies)\n const newKey = await keyManager.initialiseKeys()\n await new TransferKeysManager(cryptoPrimitives, baseExchangeKeysManager, dataOwnerApi, keyManager, icureStorage).updateTransferKeys(\n await dataOwnerApi.getCurrentDataOwner()\n )\n // TODO customise cache size?\n const exchangeKeysManager = new ExchangeKeysManager(\n 100,\n 500,\n 60000,\n 600000,\n cryptoStrategies,\n cryptoPrimitives,\n keyManager,\n baseExchangeKeysManager,\n dataOwnerApi,\n icureStorage\n )\n const entitiesEncryption = new EntitiesEncryption(cryptoPrimitives, dataOwnerApi, exchangeKeysManager)\n const shamirManager = new ShamirKeysManager(cryptoPrimitives, dataOwnerApi, keyManager, exchangeKeysManager)\n const confidentialEntitites = new ConfidentialEntities(entitiesEncryption, cryptoPrimitives, dataOwnerApi)\n await ensureDelegationForSelf(dataOwnerApi, entitiesEncryption, cryptoPrimitives)\n const cryptoApi = new IccCryptoXApi(\n exchangeKeysManager,\n cryptoPrimitives,\n keyManager,\n dataOwnerApi,\n entitiesEncryption,\n shamirManager,\n params.storage,\n params.keyStorage,\n icureStorage,\n healthcarePartyApi,\n confidentialEntitites\n )\n const accessLogApi = new IccAccesslogXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const agendaApi = new IccAgendaApi(host, params.headers, authenticationProvider, fetchImpl)\n const contactApi = new IccContactXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const formApi = new IccFormXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const groupApi = new IccGroupApi(host, params.headers, authenticationProvider)\n const medicalLocationApi = new IccMedicallocationApi(host, params.headers, authenticationProvider)\n const calendarItemTypeApi = new IccCalendarItemTypeApi(host, params.headers, authenticationProvider)\n const invoiceApi = new IccInvoiceXApi(host, params.headers, cryptoApi, entityReferenceApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const insuranceApi = new IccInsuranceApi(host, params.headers, authenticationProvider, fetchImpl)\n const documentApi = new IccDocumentXApi(host, params.headers, cryptoApi, authApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const healthcareElementApi = new IccHelementXApi(\n host,\n params.headers,\n cryptoApi,\n dataOwnerApi,\n ['descr', 'note'],\n authenticationProvider,\n fetchImpl\n )\n const classificationApi = new IccClassificationXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const calendarItemApi = new IccCalendarItemXApi(\n host,\n params.headers,\n cryptoApi,\n dataOwnerApi,\n ['details', 'title', 'patientId'],\n authenticationProvider,\n fetchImpl\n )\n const receiptApi = new IccReceiptXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const timetableApi = new IccTimeTableXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const patientApi = new IccPatientXApi(\n host,\n params.headers,\n cryptoApi,\n contactApi,\n formApi,\n healthcareElementApi,\n invoiceApi,\n documentApi,\n healthcarePartyApi,\n classificationApi,\n dataOwnerApi,\n calendarItemApi,\n ['note'],\n authenticationProvider,\n fetchImpl\n )\n const messageApi = new IccMessageXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl)\n const maintenanceTaskApi = new IccMaintenanceTaskXApi(\n host,\n params.headers,\n cryptoApi,\n healthcarePartyApi,\n dataOwnerApi,\n ['properties'],\n authenticationProvider,\n fetchImpl\n )\n const icureMaintenanceTaskApi = new IccIcureMaintenanceXApi(cryptoApi, maintenanceTaskApi, dataOwnerApi)\n\n if (newKey && params.createMaintenanceTasksOnNewKey) {\n await icureMaintenanceTaskApi.createMaintenanceTasksForNewKeypair(await userApi.getCurrentUser(), newKey.newKeyPair)\n }\n return {\n cryptoApi,\n authApi,\n codeApi,\n calendarItemTypeApi,\n medicalLocationApi,\n userApi,\n permissionApi,\n patientApi,\n healthcarePartyApi,\n deviceApi,\n accessLogApi,\n contactApi,\n healthcareElementApi,\n documentApi,\n formApi,\n invoiceApi,\n insuranceApi,\n messageApi,\n entityReferenceApi,\n receiptApi,\n agendaApi,\n calendarItemApi,\n classificationApi,\n timetableApi,\n groupApi,\n maintenanceTaskApi,\n dataOwnerApi,\n icureMaintenanceTaskApi,\n }\n}\n\nexport const BasicApis = async function (\n host: string,\n username: string,\n password: string,\n crypto: Crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : ({} as Crypto),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch,\n forceBasic: boolean = false\n) {\n const headers = {}\n const authenticationProvider = forceBasic\n ? new BasicAuthenticationProvider(username, password)\n : new EnsembleAuthenticationProvider(new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl), username, password)\n const authApi = new IccAuthApi(host, headers, authenticationProvider, fetchImpl)\n\n const codeApi = new IccCodeXApi(host, headers, authenticationProvider, fetchImpl)\n const entityReferenceApi = new IccEntityrefApi(host, headers, authenticationProvider, fetchImpl)\n const userApi = new IccUserXApi(host, headers, authenticationProvider, fetchImpl)\n const permissionApi = new IccPermissionApi(host, headers, authenticationProvider, fetchImpl)\n const agendaApi = new IccAgendaApi(host, headers, authenticationProvider, fetchImpl)\n const groupApi = new IccGroupApi(host, headers, authenticationProvider)\n const insuranceApi = new IccInsuranceApi(host, headers, authenticationProvider, fetchImpl)\n\n return {\n authApi,\n codeApi,\n userApi,\n permissionApi,\n insuranceApi,\n entityReferenceApi,\n agendaApi,\n groupApi,\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCA6BmB;AACnB,qDAA8C;AAC9C,yDAAkD;AAClD,2DAAoD;AACpD,2DAAoD;AACpD,6DAAsD;AACtD,2DAAoD;AACpD,qDAA8C;AAC9C,6DAAsD;AACtD,yEAAkE;AAClE,uEAA+D;AAC/D,2DAAoD;AACpD,2DAAoD;AACpD,2DAAoD;AACpD,+DAAwD;AACxD,iEAAyD;AACzD,wCAAyC;AACzC,qDAA8C;AAC9C,6EAAqE;AACrE,iEAAyD;AAGzD,iEAA6D;AAC7D,6DAAyD;AACzD,0EAMsC;AACtC,gEAA4D;AAC5D,oDAAgD;AAChD,qEAAiE;AACjE,6FAAyF;AACzF,sDAAkD;AAClD,8EAA0E;AAG1E,sEAAkE;AAClE,kEAA8D;AAC9D,sEAAkE;AAClE,+EAAuE;AACvE,oEAAgE;AAChE,wEAAoE;AACpE,0CAAwD;AACxD,sEAA0E;AAC1E,2DAAoD;AACpD,mEAA4D;AAG5D,wDAAqC;AACrC,sDAAmC;AACnC,4DAAyC;AACzC,6DAA0C;AAC1C,mDAAgC;AAChC,sDAAmC;AACnC,qDAAkC;AAClC,0DA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AAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAC1F,MAAM,kBAAkB,GAAG,IAAI,kCAAc,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAE/F,OAAO;YACL,OAAO;YACP,OAAO;YACP,OAAO;YACP,aAAa;YACb,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,QAAQ;YACR,kBAAkB;SACnB,CAAA;IACH,CAAC;CAAA,CAAA;AAtCY,QAAA,SAAS,aAsCrB","sourcesContent":["import {\n IccAgendaApi,\n IccAnonymousAccessApi,\n IccApplicationsettingsApi,\n IccArticleApi,\n IccAuthApi,\n IccBeefactApi,\n IccBeresultexportApi,\n IccBeresultimportApi,\n IccBesamv2Api,\n IccCalendarItemTypeApi,\n IccClassificationTemplateApi,\n IccEntityrefApi,\n IccEntitytemplateApi,\n IccFrontendmigrationApi,\n IccGroupApi,\n IccIcureApi,\n IccInsuranceApi,\n IccKeywordApi,\n IccMedexApi,\n IccMedicallocationApi,\n IccPatientApi,\n IccPermissionApi,\n IccPlaceApi,\n IccPubsubApi,\n IccReplicationApi,\n IccTarificationApi,\n IccTmpApi,\n OAuthThirdParty,\n} from '../icc-api'\nimport { IccUserXApi } from './icc-user-x-api'\nimport { IccCryptoXApi } from './icc-crypto-x-api'\nimport { IccContactXApi } from './icc-contact-x-api'\nimport { IccInvoiceXApi } from './icc-invoice-x-api'\nimport { IccDocumentXApi } from './icc-document-x-api'\nimport { IccHcpartyXApi } from './icc-hcparty-x-api'\nimport { IccFormXApi } from './icc-form-x-api'\nimport { IccHelementXApi } from './icc-helement-x-api'\nimport { IccClassificationXApi } from './icc-classification-x-api'\nimport { IccCalendarItemXApi } from './icc-calendar-item-x-api'\nimport { IccPatientXApi } from './icc-patient-x-api'\nimport { IccMessageXApi } from './icc-message-x-api'\nimport { IccReceiptXApi } from './icc-receipt-x-api'\nimport { IccAccesslogXApi } from './icc-accesslog-x-api'\nimport { IccTimeTableXApi } from './icc-time-table-x-api'\nimport { IccDeviceApi } from '../icc-api'\nimport { IccCodeXApi } from './icc-code-x-api'\nimport { IccMaintenanceTaskXApi } from './icc-maintenance-task-x-api'\nimport { IccDataOwnerXApi } from './icc-data-owner-x-api'\nimport { StorageFacade } from './storage/StorageFacade'\nimport { KeyStorageFacade } from './storage/KeyStorageFacade'\nimport { LocalStorageImpl } from './storage/LocalStorageImpl'\nimport { KeyStorageImpl } from './storage/KeyStorageImpl'\nimport {\n AuthenticationProvider,\n BasicAuthenticationProvider,\n EnsembleAuthenticationProvider,\n JwtAuthenticationProvider,\n NoAuthenticationProvider,\n} from './auth/AuthenticationProvider'\nimport { CryptoPrimitives } from './crypto/CryptoPrimitives'\nimport { KeyManager } from './crypto/KeyManager'\nimport { IcureStorageFacade } from './storage/IcureStorageFacade'\nimport { DefaultStorageEntryKeysFactory } from './storage/DefaultStorageEntryKeysFactory'\nimport { KeyRecovery } from './crypto/KeyRecovery'\nimport { BaseExchangeKeysManager } from './crypto/BaseExchangeKeysManager'\nimport { StorageEntryKeysFactory } from './storage/StorageEntryKeysFactory'\nimport { CryptoStrategies } from './crypto/CryptoStrategies'\nimport { ExchangeKeysManager } from './crypto/ExchangeKeysManager'\nimport { ShamirKeysManager } from './crypto/ShamirKeysManager'\nimport { TransferKeysManager } from './crypto/TransferKeysManager'\nimport { IccIcureMaintenanceXApi } from './icc-icure-maintenance-x-api'\nimport { EntitiesEncryption } from './crypto/EntitiesEncryption'\nimport { ConfidentialEntities } from './crypto/ConfidentialEntities'\nimport { ensureDelegationForSelf } from './crypto/utils'\nimport { CryptoActorStubWithType } from '../icc-api/model/CryptoActorStub'\nimport { IccBekmehrXApi } from './icc-bekmehr-x-api'\nimport { IccDoctemplateXApi } from './icc-doctemplate-x-api'\nimport { UserGroup } from '../icc-api/model/UserGroup'\n\nexport * from './icc-accesslog-x-api'\nexport * from './icc-bekmehr-x-api'\nexport * from './icc-calendar-item-x-api'\nexport * from './icc-classification-x-api'\nexport * from './icc-code-x-api'\nexport * from './icc-contact-x-api'\nexport * from './icc-crypto-x-api'\nexport * from './icc-doctemplate-x-api'\nexport * from './icc-document-x-api'\nexport * from './icc-form-x-api'\nexport * from './icc-hcparty-x-api'\nexport * from './icc-helement-x-api'\nexport * from './icc-invoice-x-api'\nexport * from './icc-message-x-api'\nexport * from './icc-patient-x-api'\nexport * from './icc-user-x-api'\nexport * from './icc-time-table-x-api'\nexport * from './icc-receipt-x-api'\nexport * from './utils'\nexport { KeyStorageFacade } from './storage/KeyStorageFacade'\nexport { LocalStorageImpl } from './storage/LocalStorageImpl'\nexport { StorageFacade } from './storage/StorageFacade'\nexport { KeyStorageImpl } from './storage/KeyStorageImpl'\nexport { CryptoStrategies } from './crypto/CryptoStrategies'\n\nexport interface Apis {\n readonly authApi: IccAuthApi\n readonly codeApi: IccCodeXApi\n readonly calendarItemTypeApi: IccCalendarItemTypeApi\n readonly medicalLocationApi: IccMedicallocationApi\n readonly entityReferenceApi: IccEntityrefApi\n readonly userApi: IccUserXApi\n readonly permissionApi: IccPermissionApi\n readonly healthcarePartyApi: IccHcpartyXApi\n readonly deviceApi: IccDeviceApi\n readonly cryptoApi: IccCryptoXApi\n readonly accessLogApi: IccAccesslogXApi\n readonly agendaApi: IccAgendaApi\n readonly contactApi: IccContactXApi\n readonly formApi: IccFormXApi\n readonly groupApi: IccGroupApi\n readonly invoiceApi: IccInvoiceXApi\n readonly insuranceApi: IccInsuranceApi\n readonly documentApi: IccDocumentXApi\n readonly healthcareElementApi: IccHelementXApi\n readonly classificationApi: IccClassificationXApi\n readonly calendarItemApi: IccCalendarItemXApi\n readonly receiptApi: IccReceiptXApi\n readonly timetableApi: IccTimeTableXApi\n readonly patientApi: IccPatientXApi\n readonly messageApi: IccMessageXApi\n readonly maintenanceTaskApi: IccMaintenanceTaskXApi\n readonly dataOwnerApi: IccDataOwnerXApi\n readonly icureMaintenanceTaskApi: IccIcureMaintenanceXApi\n readonly anonymousAccessApi: IccAnonymousAccessApi\n readonly applicationSettingsApi: IccApplicationsettingsApi\n readonly articleApi: IccArticleApi\n readonly bekmehrApi: IccBekmehrXApi\n readonly beefactApi: IccBeefactApi\n readonly beresultexportApi: IccBeresultexportApi\n readonly beresultimportApi: IccBeresultimportApi\n readonly besamv2Api: IccBesamv2Api\n readonly classificationTemplateApi: IccClassificationTemplateApi\n readonly doctemplateApi: IccDoctemplateXApi\n readonly entitytemplateApi: IccEntitytemplateApi\n readonly frontendmigrationApi: IccFrontendmigrationApi\n readonly icureApi: IccIcureApi\n readonly keywordApi: IccKeywordApi\n readonly medexApi: IccMedexApi\n readonly placeApi: IccPlaceApi\n readonly pubsubApi: IccPubsubApi\n readonly replicationApi: IccReplicationApi\n readonly tarificationApi: IccTarificationApi\n readonly tmpApi: IccTmpApi\n}\n\n/**\n * Allows to customise the behaviour of the iCure API by providing various optional parameters.\n */\nexport interface IcureApiOptions {\n /**\n * Specifies how iCure can store string values (e.g. json). In production this should be persistent storage.\n * @default the browser's localStorage.\n */\n readonly storage?: StorageFacade<string>\n /**\n * Specifies how iCure can store cryptographic keys. Preferably this should be some ad-hoc storage key storage.\n * @default stores the json of the jwk representation of the key in {@link storage}.\n */\n readonly keyStorage?: KeyStorageFacade\n /**\n * Specifies where iCure should store his data within the {@link storage} and {@link keyStorage}.\n * @default {@link DefaultStorageEntryKeysFactory}\n */\n readonly entryKeysFactory?: StorageEntryKeysFactory\n /**\n * Specifies if iCure should create maintenance tasks for requesting access back when a new key is generated at initialisation time.\n * @default true\n */\n readonly createMaintenanceTasksOnNewKey?: boolean\n /**\n * Additional headers to use on each request made by the iCure api.\n * @default no additional headers\n */\n readonly headers?: { [headerName: string]: string }\n /**\n * Specifies which fields should be encrypted for each kind of encryptable entity. You should make sure that every application in your environment\n * specifies the same values for this configuration.\n * @default see documentation for {@link EncryptedFieldsConfig}\n */\n readonly encryptedFieldsConfig?: EncryptedFieldsConfig\n /**\n * Each user may exist in multiple groups, but an instance of {@link IcureApi} is specialised for a single group. This function allows you to decide\n * the group to use for a given user. This functions will be called only if a user exists in at least 2 groups, takes in input the information on\n * the groups the user can access (in no specific order) and must return the id of one of these groups.\n * @default takes the first group provided. The group chosen by this method may vary between different instantiations of the {@link IcureApi} even\n * if for the same user and if the groups available for the user do not change.\n */\n readonly groupSelector?: (availableGroupsInfo: UserGroup[]) => Promise<string>\n}\nnamespace IcureApiOptions {\n export namespace Defaults {\n export const entryKeysFactory = new DefaultStorageEntryKeysFactory()\n export const createMaintenanceTasksOnNewKey = true\n export const headers = {}\n }\n export class WithDefaults implements IcureApiOptions {\n constructor(custom: IcureApiOptions) {\n this.entryKeysFactory = custom.entryKeysFactory ?? Defaults.entryKeysFactory\n this.createMaintenanceTasksOnNewKey = custom.createMaintenanceTasksOnNewKey ?? Defaults.createMaintenanceTasksOnNewKey\n this.storage = custom.storage ?? new LocalStorageImpl()\n this.keyStorage = custom.keyStorage ?? new KeyStorageImpl(this.storage)\n this.headers = custom.headers ?? Defaults.headers\n this.encryptedFieldsConfig = custom.encryptedFieldsConfig ?? EncryptedFieldsConfig.Defaults\n this.groupSelector = custom.groupSelector ?? ((groups) => Promise.resolve(groups[0].groupId!))\n }\n\n readonly entryKeysFactory: StorageEntryKeysFactory\n readonly createMaintenanceTasksOnNewKey: boolean\n readonly storage: StorageFacade<string>\n readonly keyStorage: KeyStorageFacade\n readonly headers: { [headerName: string]: string }\n readonly encryptedFieldsConfig: EncryptedFieldsConfig\n readonly groupSelector: (availableGroupsInfo: UserGroup[]) => Promise<string>\n }\n}\n\n/**\n * Specifies which fields should be encrypted for each kind of encryptable entity.\n * Note that any value you specify here overrides the default values. For example if you specify `['medicalLocationId']` for `healthElement` the\n * fields `['descr', 'note']` which are usually encrypted by default will no longer be encrypted. If you want to add fields to the default values\n * you can use {@link EncryptedFieldsConfig.Defaults}, for example `[...EncryptedFieldsConfig.Defaults.healthElement, 'medicalLocationId'].\n */\nexport interface EncryptedFieldsConfig {\n /**\n * Fields to encrypt for entities of type {@link AccessLog}\n * @default ['detail', 'objectId']\n */\n readonly accessLog?: string[]\n /**\n * Fields to encrypt for entities of type {@link CalendarItem}\n * @default ['details', 'title', 'patientId']\n */\n readonly calendarItem?: string[]\n /*TODO\n * configuration not yet supported for contact; automatically applies to descr and content of services\n */\n // readonly contact?: string[]\n /**\n * Fields to encrypt for entities of type {@link HealthElement}\n * @default ['descr', 'note']\n */\n readonly healthElement?: string[]\n /**\n * Fields to encrypt for entities of type {@link MaintenanceTask}\n * @default ['properties']\n */\n readonly maintenanceTask?: string[]\n /**\n * Fields to encrypt for entities of type {@link Patient}\n * @default ['note']\n */\n readonly patient?: string[]\n}\nexport namespace EncryptedFieldsConfig {\n export const Defaults = {\n accessLog: ['detail', 'objectId'],\n calendarItem: ['details', 'title', 'patientId'],\n // TODO contact\n healthElement: ['descr', 'note'],\n maintenanceTask: ['properties'],\n patient: ['note'],\n }\n}\n\n/**\n * Details for the authentication of a user\n */\nexport type AuthenticationDetails = {\n username: string\n password: string\n forceBasic?: boolean // default false\n icureTokens?: { token: string; refreshToken: string }\n thirdPartyTokens?: { [thirdParty: string]: string }\n}\n\n/**\n * Main entry point for the iCure API. Provides entity-specific sub-apis and some general methods which are not related to a specific entity.\n */\nexport interface IcureApi extends Apis {\n /**\n * Get the information on groups that the current user can access and the current group that this api instance is working on.\n * Note that the values you will get for `availableGroups` may differ from the values you would get if you call {@link IccUserApi.getMatchingUsers}\n * on {@link Apis.userApi}, since the latter is specialised on the specific instance of the user in `currentGroup`.\n */\n getGroupsInfo(): Promise<{ currentGroup: UserGroup; availableGroups: UserGroup[] }>\n\n /**\n * Switches the api to allow the user to work on a different group.\n * @param newGroupId the id of the group to switch to.\n * @return a new api for the specified group.\n */\n switchGroup(newGroupId: string): Promise<IcureApi>\n}\nexport namespace IcureApi {\n /**\n * Initialises a new instance of the iCure API.\n */\n export async function initialise(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n cryptoStrategies: CryptoStrategies,\n crypto: Crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : ({} as Crypto),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch,\n options: IcureApiOptions = {}\n ): Promise<IcureApi> {\n const params = new IcureApiOptions.WithDefaults(options)\n let grouplessAuthenticationProvider: AuthenticationProvider\n if ('username' in authenticationOptions && 'password' in authenticationOptions) {\n grouplessAuthenticationProvider = new EnsembleAuthenticationProvider(\n new IccAuthApi(host, params.headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.password,\n 3600,\n undefined,\n undefined,\n authenticationOptions.thirdPartyTokens\n )\n } else if ('icureTokens' in authenticationOptions) {\n grouplessAuthenticationProvider = new JwtAuthenticationProvider(\n new IccAuthApi(host, {}, new NoAuthenticationProvider(), fetchImpl),\n undefined,\n undefined,\n undefined,\n (authenticationOptions as unknown as AuthenticationDetails).icureTokens!\n )\n } else {\n grouplessAuthenticationProvider = authenticationOptions\n }\n const grouplessUserApi = new IccUserXApi(host, params.headers, grouplessAuthenticationProvider, fetchImpl)\n const matches = await grouplessUserApi.getMatchingUsers()\n const chosenGroupId = matches.length > 1 ? await params.groupSelector(matches) : matches[0].groupId!\n /*TODO\n * On new very new users switching the authentication provider to a specific group may fail and block the user for too many requests. This is\n * probably linked to replication of the user in the fallback database.\n */\n const groupSpecificAuthenticationProvider =\n matches.length > 1 ? await grouplessAuthenticationProvider.switchGroup(chosenGroupId, matches) : grouplessAuthenticationProvider\n const cryptoApis = await initialiseCryptoWithProvider(host, fetchImpl, groupSpecificAuthenticationProvider, params, cryptoStrategies, crypto)\n return new IcureApiImpl(\n cryptoApis,\n host,\n groupSpecificAuthenticationProvider,\n fetch,\n grouplessUserApi,\n matches,\n matches.find((match) => match.groupId === chosenGroupId)!,\n params,\n cryptoStrategies\n )\n }\n}\n\n// Apis which are used during crypto api initialisation, to avoid re-instantiating them later\ntype CryptoInitialisationApis = {\n cryptoApi: IccCryptoXApi\n healthcarePartyApi: IccHcpartyXApi\n deviceApi: IccDeviceApi\n // no patient api since it is base\n dataOwnerApi: IccDataOwnerXApi\n userApi: IccUserXApi\n icureMaintenanceTaskApi: IccIcureMaintenanceXApi\n maintenanceTaskApi: IccMaintenanceTaskXApi\n}\n\nasync function initialiseCryptoWithProvider(\n host: string,\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n groupSpecificAuthenticationProvider: AuthenticationProvider,\n params: IcureApiOptions.WithDefaults,\n cryptoStrategies: CryptoStrategies,\n crypto: Crypto\n): Promise<CryptoInitialisationApis> {\n const healthcarePartyApi = new IccHcpartyXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl)\n const deviceApi = new IccDeviceApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl)\n const basePatientApi = new IccPatientApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl)\n const dataOwnerApi = new IccDataOwnerXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl)\n // Crypto initialisation\n const icureStorage = new IcureStorageFacade(params.keyStorage, params.storage, params.entryKeysFactory)\n const cryptoPrimitives = new CryptoPrimitives(crypto)\n const baseExchangeKeysManager = new BaseExchangeKeysManager(cryptoPrimitives, dataOwnerApi, healthcarePartyApi, basePatientApi, deviceApi)\n const keyRecovery = new KeyRecovery(cryptoPrimitives, baseExchangeKeysManager, dataOwnerApi)\n const keyManager = new KeyManager(cryptoPrimitives, dataOwnerApi, icureStorage, keyRecovery, baseExchangeKeysManager, cryptoStrategies)\n const newKey = await keyManager.initialiseKeys()\n await new TransferKeysManager(cryptoPrimitives, baseExchangeKeysManager, dataOwnerApi, keyManager, icureStorage).updateTransferKeys(\n CryptoActorStubWithType.fromDataOwner(await dataOwnerApi.getCurrentDataOwner())\n )\n // TODO customise cache size?\n const exchangeKeysManager = new ExchangeKeysManager(\n 100,\n 500,\n 60000,\n 600000,\n cryptoStrategies,\n cryptoPrimitives,\n keyManager,\n baseExchangeKeysManager,\n dataOwnerApi,\n icureStorage\n )\n const entitiesEncryption = new EntitiesEncryption(cryptoPrimitives, dataOwnerApi, exchangeKeysManager)\n const shamirManager = new ShamirKeysManager(cryptoPrimitives, dataOwnerApi, keyManager, exchangeKeysManager)\n const confidentialEntitites = new ConfidentialEntities(entitiesEncryption, cryptoPrimitives, dataOwnerApi)\n await ensureDelegationForSelf(dataOwnerApi, entitiesEncryption, cryptoPrimitives, basePatientApi)\n const cryptoApi = new IccCryptoXApi(\n exchangeKeysManager,\n cryptoPrimitives,\n keyManager,\n dataOwnerApi,\n entitiesEncryption,\n shamirManager,\n params.storage,\n params.keyStorage,\n icureStorage,\n healthcarePartyApi,\n confidentialEntitites\n )\n const maintenanceTaskApi = new IccMaintenanceTaskXApi(\n host,\n params.headers,\n cryptoApi,\n healthcarePartyApi,\n dataOwnerApi,\n params.encryptedFieldsConfig?.maintenanceTask ?? EncryptedFieldsConfig.Defaults.maintenanceTask,\n groupSpecificAuthenticationProvider,\n fetchImpl\n )\n const icureMaintenanceTaskApi = new IccIcureMaintenanceXApi(cryptoApi, maintenanceTaskApi, dataOwnerApi)\n const userApi = new IccUserXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl)\n if (newKey && params.createMaintenanceTasksOnNewKey) {\n await icureMaintenanceTaskApi.createMaintenanceTasksForNewKeypair(await userApi.getCurrentUser(), newKey.newKeyPair)\n }\n return {\n cryptoApi,\n healthcarePartyApi,\n deviceApi,\n dataOwnerApi,\n userApi,\n icureMaintenanceTaskApi,\n maintenanceTaskApi,\n }\n}\n\nclass IcureApiImpl implements IcureApi {\n private latestGroupsRequest: Promise<UserGroup[]>\n private _authApi: IccAuthApi | undefined\n private _codeApi: IccCodeXApi | undefined\n private _calendarItemTypeApi: IccCalendarItemTypeApi | undefined\n private _medicalLocationApi: IccMedicallocationApi | undefined\n private _entityReferenceApi: IccEntityrefApi | undefined\n private _permissionApi: IccPermissionApi | undefined\n private _accessLogApi: IccAccesslogXApi | undefined\n private _agendaApi: IccAgendaApi | undefined\n private _contactApi: IccContactXApi | undefined\n private _formApi: IccFormXApi | undefined\n private _groupApi: IccGroupApi | undefined\n private _invoiceApi: IccInvoiceXApi | undefined\n private _insuranceApi: IccInsuranceApi | undefined\n private _documentApi: IccDocumentXApi | undefined\n private _healthcareElementApi: IccHelementXApi | undefined\n private _classificationApi: IccClassificationXApi | undefined\n private _calendarItemApi: IccCalendarItemXApi | undefined\n private _receiptApi: IccReceiptXApi | undefined\n private _timetableApi: IccTimeTableXApi | undefined\n private _patientApi: IccPatientXApi | undefined\n private _messageApi: IccMessageXApi | undefined\n private _anonymousAccessApi: IccAnonymousAccessApi | undefined\n private _applicationSettingsApi: IccApplicationsettingsApi | undefined\n private _articleApi: IccArticleApi | undefined\n private _bekmehrApi: IccBekmehrXApi | undefined\n private _beefactApi: IccBeefactApi | undefined\n private _beresultexportApi: IccBeresultexportApi | undefined\n private _beresultimportApi: IccBeresultimportApi | undefined\n private _besamv2Api: IccBesamv2Api | undefined\n private _classificationTemplateApi: IccClassificationTemplateApi | undefined\n private _doctemplateApi: IccDoctemplateXApi | undefined\n private _entitytemplateApi: IccEntitytemplateApi | undefined\n private _frontendmigrationApi: IccFrontendmigrationApi | undefined\n private _icureApi: IccIcureApi | undefined\n private _keywordApi: IccKeywordApi | undefined\n private _medexApi: IccMedexApi | undefined\n private _placeApi: IccPlaceApi | undefined\n private _pubsubApi: IccPubsubApi | undefined\n private _replicationApi: IccReplicationApi | undefined\n private _tarificationApi: IccTarificationApi | undefined\n private _tmpApi: IccTmpApi | undefined\n\n get cryptoApi(): IccCryptoXApi {\n return this.cryptoInitApis.cryptoApi\n }\n\n get dataOwnerApi(): IccDataOwnerXApi {\n return this.cryptoInitApis.dataOwnerApi\n }\n\n get accessLogApi(): IccAccesslogXApi {\n return (\n this._accessLogApi ??\n (this._accessLogApi = new IccAccesslogXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.params.encryptedFieldsConfig.accessLog ?? EncryptedFieldsConfig.Defaults.accessLog,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get agendaApi(): IccAgendaApi {\n return (\n this._agendaApi ?? (this._agendaApi = new IccAgendaApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get anonymousAccessApi(): IccAnonymousAccessApi {\n return (\n this._anonymousAccessApi ??\n (this._anonymousAccessApi = new IccAnonymousAccessApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get applicationSettingsApi(): IccApplicationsettingsApi {\n return (\n this._applicationSettingsApi ??\n (this._applicationSettingsApi = new IccApplicationsettingsApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get articleApi(): IccArticleApi {\n return (\n this._articleApi ?? (this._articleApi = new IccArticleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get authApi(): IccAuthApi {\n return this._authApi ?? (this._authApi = new IccAuthApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get beefactApi(): IccBeefactApi {\n return (\n this._beefactApi ?? (this._beefactApi = new IccBeefactApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get bekmehrApi(): IccBekmehrXApi {\n return (\n this._bekmehrApi ??\n (this._bekmehrApi = new IccBekmehrXApi(\n this.host,\n this.params.headers,\n this.authApi,\n this.contactApi,\n this.healthcareElementApi,\n this.documentApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get beresultexportApi(): IccBeresultexportApi {\n return (\n this._beresultexportApi ??\n (this._beresultexportApi = new IccBeresultexportApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get beresultimportApi(): IccBeresultimportApi {\n return (\n this._beresultimportApi ??\n (this._beresultimportApi = new IccBeresultimportApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get besamv2Api(): IccBesamv2Api {\n return (\n this._besamv2Api ?? (this._besamv2Api = new IccBesamv2Api(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get calendarItemApi(): IccCalendarItemXApi {\n return (\n this._calendarItemApi ??\n (this._calendarItemApi = new IccCalendarItemXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.params.encryptedFieldsConfig.calendarItem ?? EncryptedFieldsConfig.Defaults.calendarItem,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get calendarItemTypeApi(): IccCalendarItemTypeApi {\n return (\n this._calendarItemTypeApi ??\n (this._calendarItemTypeApi = new IccCalendarItemTypeApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get classificationApi(): IccClassificationXApi {\n return (\n this._classificationApi ??\n (this._classificationApi = new IccClassificationXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get classificationTemplateApi(): IccClassificationTemplateApi {\n return (\n this._classificationTemplateApi ??\n (this._classificationTemplateApi = new IccClassificationTemplateApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get codeApi(): IccCodeXApi {\n return this._codeApi ?? (this._codeApi = new IccCodeXApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get contactApi(): IccContactXApi {\n return (\n this._contactApi ??\n (this._contactApi = new IccContactXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get deviceApi(): IccDeviceApi {\n return this.cryptoInitApis.deviceApi\n }\n get doctemplateApi(): IccDoctemplateXApi {\n return (\n this._doctemplateApi ??\n (this._doctemplateApi = new IccDoctemplateXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get documentApi(): IccDocumentXApi {\n return (\n this._documentApi ??\n (this._documentApi = new IccDocumentXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.authApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get entityReferenceApi(): IccEntityrefApi {\n return (\n this._entityReferenceApi ??\n (this._entityReferenceApi = new IccEntityrefApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get entitytemplateApi(): IccEntitytemplateApi {\n return (\n this._entitytemplateApi ??\n (this._entitytemplateApi = new IccEntitytemplateApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get formApi(): IccFormXApi {\n return (\n this._formApi ??\n (this._formApi = new IccFormXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get frontendmigrationApi(): IccFrontendmigrationApi {\n return (\n this._frontendmigrationApi ??\n (this._frontendmigrationApi = new IccFrontendmigrationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get groupApi(): IccGroupApi {\n return this._groupApi ?? (this._groupApi = new IccGroupApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get healthcareElementApi(): IccHelementXApi {\n return (\n this._healthcareElementApi ??\n (this._healthcareElementApi = new IccHelementXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.params.encryptedFieldsConfig.healthElement ?? EncryptedFieldsConfig.Defaults.healthElement,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get healthcarePartyApi(): IccHcpartyXApi {\n return this.cryptoInitApis.healthcarePartyApi\n }\n get icureApi(): IccIcureApi {\n return this._icureApi ?? (this._icureApi = new IccIcureApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get icureMaintenanceTaskApi(): IccIcureMaintenanceXApi {\n return this.cryptoInitApis.icureMaintenanceTaskApi\n }\n get insuranceApi(): IccInsuranceApi {\n return (\n this._insuranceApi ??\n (this._insuranceApi = new IccInsuranceApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get invoiceApi(): IccInvoiceXApi {\n return (\n this._invoiceApi ??\n (this._invoiceApi = new IccInvoiceXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.entityReferenceApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get keywordApi(): IccKeywordApi {\n return (\n this._keywordApi ?? (this._keywordApi = new IccKeywordApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get maintenanceTaskApi(): IccMaintenanceTaskXApi {\n return this.cryptoInitApis.maintenanceTaskApi\n }\n get medexApi(): IccMedexApi {\n return this._medexApi ?? (this._medexApi = new IccMedexApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get medicalLocationApi(): IccMedicallocationApi {\n return (\n this._medicalLocationApi ??\n (this._medicalLocationApi = new IccMedicallocationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get messageApi(): IccMessageXApi {\n return (\n this._messageApi ??\n (this._messageApi = new IccMessageXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get patientApi(): IccPatientXApi {\n return (\n this._patientApi ??\n (this._patientApi = new IccPatientXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.contactApi,\n this.formApi,\n this.healthcareElementApi,\n this.invoiceApi,\n this.documentApi,\n this.healthcarePartyApi,\n this.classificationApi,\n this.dataOwnerApi,\n this.calendarItemApi,\n this.params.encryptedFieldsConfig.patient ?? EncryptedFieldsConfig.Defaults.patient,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get permissionApi(): IccPermissionApi {\n return (\n this._permissionApi ??\n (this._permissionApi = new IccPermissionApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get placeApi(): IccPlaceApi {\n return this._placeApi ?? (this._placeApi = new IccPlaceApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get pubsubApi(): IccPubsubApi {\n return (\n this._pubsubApi ?? (this._pubsubApi = new IccPubsubApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get receiptApi(): IccReceiptXApi {\n return (\n this._receiptApi ??\n (this._receiptApi = new IccReceiptXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get replicationApi(): IccReplicationApi {\n return (\n this._replicationApi ??\n (this._replicationApi = new IccReplicationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get tarificationApi(): IccTarificationApi {\n return (\n this._tarificationApi ??\n (this._tarificationApi = new IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n get timetableApi(): IccTimeTableXApi {\n return (\n this._timetableApi ??\n (this._timetableApi = new IccTimeTableXApi(\n this.host,\n this.params.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n get tmpApi(): IccTmpApi {\n return this._tmpApi ?? (this._tmpApi = new IccTmpApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get userApi(): IccUserXApi {\n return this.cryptoInitApis.userApi\n }\n\n constructor(\n private readonly cryptoInitApis: CryptoInitialisationApis,\n private readonly host: string,\n private readonly groupSpecificAuthenticationProvider: AuthenticationProvider,\n private readonly fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n private readonly grouplessUserApi: IccUserXApi,\n private readonly latestMatches: UserGroup[],\n private readonly currentGroupInfo: UserGroup,\n private readonly params: IcureApiOptions.WithDefaults,\n private readonly cryptoStrategies: CryptoStrategies\n ) {\n this.latestGroupsRequest = Promise.resolve(latestMatches)\n }\n\n async getGroupsInfo(): Promise<{ currentGroup: UserGroup; availableGroups: UserGroup[] }> {\n this.latestGroupsRequest = this.grouplessUserApi.getMatchingUsers()\n return { currentGroup: this.currentGroupInfo, availableGroups: await this.latestGroupsRequest }\n }\n\n async switchGroup(newGroupId: string): Promise<IcureApi> {\n const availableGroups = await this.latestGroupsRequest\n const switchedProvider = await this.groupSpecificAuthenticationProvider.switchGroup(newGroupId, availableGroups)\n const cryptoInitApis = await initialiseCryptoWithProvider(\n this.host,\n this.fetch,\n switchedProvider,\n this.params,\n this.cryptoStrategies,\n this.cryptoApi.primitives.crypto\n )\n return new IcureApiImpl(\n cryptoInitApis,\n this.host,\n switchedProvider,\n this.fetch,\n this.grouplessUserApi,\n availableGroups,\n availableGroups.find((x) => x.groupId === newGroupId)!,\n this.params,\n this.cryptoStrategies\n )\n }\n}\n\n/**\n * @experimental This function still needs development and will be changed\n * Build apis which do not need crypto and can be used by non-data-owner users\n */\nexport const BasicApis = async function (\n host: string,\n username: string,\n password: string,\n crypto: Crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : ({} as Crypto),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch,\n forceBasic: boolean = false\n) {\n const headers = {}\n const authenticationProvider = forceBasic\n ? new BasicAuthenticationProvider(username, password)\n : new EnsembleAuthenticationProvider(new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl), username, password)\n const authApi = new IccAuthApi(host, headers, authenticationProvider, fetchImpl)\n\n const codeApi = new IccCodeXApi(host, headers, authenticationProvider, fetchImpl)\n const entityReferenceApi = new IccEntityrefApi(host, headers, authenticationProvider, fetchImpl)\n const userApi = new IccUserXApi(host, headers, authenticationProvider, fetchImpl)\n const permissionApi = new IccPermissionApi(host, headers, authenticationProvider, fetchImpl)\n const agendaApi = new IccAgendaApi(host, headers, authenticationProvider, fetchImpl)\n const groupApi = new IccGroupApi(host, headers, authenticationProvider)\n const insuranceApi = new IccInsuranceApi(host, headers, authenticationProvider, fetchImpl)\n const healthcarePartyApi = new IccHcpartyXApi(host, headers, authenticationProvider, fetchImpl)\n\n return {\n authApi,\n codeApi,\n userApi,\n permissionApi,\n insuranceApi,\n entityReferenceApi,\n agendaApi,\n groupApi,\n healthcarePartyApi,\n }\n}\n"]}
@@ -2,22 +2,25 @@
2
2
  * Represents a request to update aes exchange keys following the creation of a new key pair for a data owner.
3
3
  */
4
4
  import { MaintenanceTask } from '../../icc-api/model/MaintenanceTask';
5
- export declare class KeyPairUpdateRequest {
5
+ export interface KeyPairUpdateRequest {
6
6
  /**
7
- * @internal this field is intended for internal use only and may be changed in future without notice
7
+ * New public key of the data owner, in hex-encoded spki format.
8
8
  */
9
- readonly originalTask: MaintenanceTask;
10
- private readonly _concernedDataOwnerId;
11
- private readonly _newPublicKey;
9
+ readonly newPublicKey: string;
12
10
  /**
13
11
  * Id of the data owner which created a new key pair and wants to regain access to his exchange keys.
14
12
  */
15
- get concernedDataOwnerId(): string;
13
+ readonly concernedDataOwnerId: string;
16
14
  /**
17
- * New public key of the data owner, in hex-encoded spki format.
15
+ * @internal this field is intended for internal use only and may be changed in future without notice
16
+ */
17
+ readonly originalTask?: MaintenanceTask;
18
+ }
19
+ export declare namespace KeyPairUpdateRequest {
20
+ /**
21
+ * Create a key pair update request from a maintenance task.
18
22
  */
19
- get newPublicKey(): string;
20
- constructor(task: MaintenanceTask);
23
+ function fromMaintenanceTask(task: MaintenanceTask): KeyPairUpdateRequest;
21
24
  }
22
25
  export declare namespace KeyPairUpdateRequest {
23
26
  /**
@@ -5,23 +5,14 @@ exports.KeyPairUpdateRequest = void 0;
5
5
  * Represents a request to update aes exchange keys following the creation of a new key pair for a data owner.
6
6
  */
7
7
  const MaintenanceTask_1 = require("../../icc-api/model/MaintenanceTask");
8
- class KeyPairUpdateRequest {
9
- /**
10
- * Id of the data owner which created a new key pair and wants to regain access to his exchange keys.
11
- */
12
- get concernedDataOwnerId() {
13
- return this._concernedDataOwnerId;
14
- }
8
+ var KeyPairUpdateRequest;
9
+ (function (KeyPairUpdateRequest) {
15
10
  /**
16
- * New public key of the data owner, in hex-encoded spki format.
11
+ * Create a key pair update request from a maintenance task.
17
12
  */
18
- get newPublicKey() {
19
- return this._newPublicKey;
20
- }
21
- constructor(task) {
13
+ function fromMaintenanceTask(task) {
22
14
  if (task.taskType !== KeyPairUpdateRequest.TASK_TYPE)
23
15
  throw new Error(`Key pair update tasks should have task type ${KeyPairUpdateRequest.TASK_TYPE}, but got task with type ${task.taskType}`);
24
- this.originalTask = task;
25
16
  function findStringProp(propId) {
26
17
  var _a, _b, _c;
27
18
  const prop = (_a = task.properties) === null || _a === void 0 ? void 0 : _a.find((x) => x.id === propId);
@@ -32,11 +23,14 @@ class KeyPairUpdateRequest {
32
23
  throw new Error(`Invalid value ${(_c = prop.typedValue) === null || _c === void 0 ? void 0 : _c.stringValue} for property ${propId} for KeyPairUpdateRequest. ${JSON.stringify(task)}`);
33
24
  return propValue;
34
25
  }
35
- this._concernedDataOwnerId = findStringProp(KeyPairUpdateRequest.OWNER_ID_PROP_ID);
36
- this._newPublicKey = findStringProp(KeyPairUpdateRequest.OWNER_PUB_PROP_ID);
26
+ return {
27
+ concernedDataOwnerId: findStringProp(KeyPairUpdateRequest.OWNER_ID_PROP_ID),
28
+ newPublicKey: findStringProp(KeyPairUpdateRequest.OWNER_PUB_PROP_ID),
29
+ originalTask: task,
30
+ };
37
31
  }
38
- }
39
- exports.KeyPairUpdateRequest = KeyPairUpdateRequest;
32
+ KeyPairUpdateRequest.fromMaintenanceTask = fromMaintenanceTask;
33
+ })(KeyPairUpdateRequest = exports.KeyPairUpdateRequest || (exports.KeyPairUpdateRequest = {}));
40
34
  (function (KeyPairUpdateRequest) {
41
35
  /**
42
36
  * @internal this field is intended for internal use only and may be changed in future without notice
@@ -1 +1 @@
1
- {"version":3,"file":"KeyPairUpdateRequest.js","sourceRoot":"","sources":["../../../icc-x-api/maintenance/KeyPairUpdateRequest.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yEAAqE;AAGrE,MAAa,oBAAoB;IAQ/B;;OAEG;IACH,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,qBAAqB,CAAA;IACnC,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAA;IAC3B,CAAC;IAED,YAAY,IAAqB;QAC/B,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,SAAS;YAClD,MAAM,IAAI,KAAK,CAAC,+CAA+C,oBAAoB,CAAC,SAAS,4BAA4B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC3I,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QAExB,SAAS,cAAc,CAAC,MAAc;;YACpC,MAAM,IAAI,GAA6B,MAAA,IAAI,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,CAAA;YACpF,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,MAAM,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAClI,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CAAA;YAC9C,IAAI,CAAC,SAAS;gBACZ,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,iBAAiB,MAAM,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAC3I,OAAO,SAAS,CAAA;QAClB,CAAC;QAED,IAAI,CAAC,qBAAqB,GAAG,cAAc,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;QAClF,IAAI,CAAC,aAAa,GAAG,cAAc,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;IAC7E,CAAC;CACF;AAvCD,oDAuCC;AACD,WAAiB,oBAAoB;IACnC;;OAEG;IACU,qCAAgB,GAAG,sBAAsB,CAAA;IACtD;;OAEG;IACU,sCAAiB,GAAG,0BAA0B,CAAA;IAC3D;;OAEG;IACU,8BAAS,GAAG,iCAAe,CAAC,YAAY,CAAC,aAAa,CAAA;AACrE,CAAC,EAbgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAapC","sourcesContent":["/**\n * Represents a request to update aes exchange keys following the creation of a new key pair for a data owner.\n */\nimport { MaintenanceTask } from '../../icc-api/model/MaintenanceTask'\nimport { PropertyStub } from '../../icc-api/model/PropertyStub'\n\nexport class KeyPairUpdateRequest {\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n readonly originalTask: MaintenanceTask\n private readonly _concernedDataOwnerId: string\n private readonly _newPublicKey: string\n\n /**\n * Id of the data owner which created a new key pair and wants to regain access to his exchange keys.\n */\n get concernedDataOwnerId(): string {\n return this._concernedDataOwnerId\n }\n\n /**\n * New public key of the data owner, in hex-encoded spki format.\n */\n get newPublicKey(): string {\n return this._newPublicKey\n }\n\n constructor(task: MaintenanceTask) {\n if (task.taskType !== KeyPairUpdateRequest.TASK_TYPE)\n throw new Error(`Key pair update tasks should have task type ${KeyPairUpdateRequest.TASK_TYPE}, but got task with type ${task.taskType}`)\n this.originalTask = task\n\n function findStringProp(propId: string): string {\n const prop: PropertyStub | undefined = task.properties?.find((x) => x.id === propId)\n if (!prop) throw new Error(`Task is missing required string property ${propId} for KeyPairUpdateRequest. ${JSON.stringify(task)}`)\n const propValue = prop.typedValue?.stringValue\n if (!propValue)\n throw new Error(`Invalid value ${prop.typedValue?.stringValue} for property ${propId} for KeyPairUpdateRequest. ${JSON.stringify(task)}`)\n return propValue\n }\n\n this._concernedDataOwnerId = findStringProp(KeyPairUpdateRequest.OWNER_ID_PROP_ID)\n this._newPublicKey = findStringProp(KeyPairUpdateRequest.OWNER_PUB_PROP_ID)\n }\n}\nexport namespace KeyPairUpdateRequest {\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const OWNER_ID_PROP_ID = 'dataOwnerConcernedId'\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const OWNER_PUB_PROP_ID = 'dataOwnerConcernedPubKey'\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const TASK_TYPE = MaintenanceTask.TaskTypeEnum.KeyPairUpdate\n}\n"]}
1
+ {"version":3,"file":"KeyPairUpdateRequest.js","sourceRoot":"","sources":["../../../icc-x-api/maintenance/KeyPairUpdateRequest.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yEAAqE;AAoBrE,IAAiB,oBAAoB,CAuBpC;AAvBD,WAAiB,oBAAoB;IACnC;;OAEG;IACH,SAAgB,mBAAmB,CAAC,IAAqB;QACvD,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,SAAS;YAClD,MAAM,IAAI,KAAK,CAAC,+CAA+C,oBAAoB,CAAC,SAAS,4BAA4B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QAE3I,SAAS,cAAc,CAAC,MAAc;;YACpC,MAAM,IAAI,GAA6B,MAAA,IAAI,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,CAAA;YACpF,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,MAAM,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAClI,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CAAA;YAC9C,IAAI,CAAC,SAAS;gBACZ,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,iBAAiB,MAAM,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAC3I,OAAO,SAAS,CAAA;QAClB,CAAC;QAED,OAAO;YACL,oBAAoB,EAAE,cAAc,CAAC,oBAAoB,CAAC,gBAAgB,CAAC;YAC3E,YAAY,EAAE,cAAc,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;YACpE,YAAY,EAAE,IAAI;SACnB,CAAA;IACH,CAAC;IAlBe,wCAAmB,sBAkBlC,CAAA;AACH,CAAC,EAvBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAuBpC;AAED,WAAiB,oBAAoB;IACnC;;OAEG;IACU,qCAAgB,GAAG,sBAAsB,CAAA;IACtD;;OAEG;IACU,sCAAiB,GAAG,0BAA0B,CAAA;IAC3D;;OAEG;IACU,8BAAS,GAAG,iCAAe,CAAC,YAAY,CAAC,aAAa,CAAA;AACrE,CAAC,EAbgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAapC","sourcesContent":["/**\n * Represents a request to update aes exchange keys following the creation of a new key pair for a data owner.\n */\nimport { MaintenanceTask } from '../../icc-api/model/MaintenanceTask'\nimport { PropertyStub } from '../../icc-api/model/PropertyStub'\n\nexport interface KeyPairUpdateRequest {\n /**\n * New public key of the data owner, in hex-encoded spki format.\n */\n readonly newPublicKey: string\n\n /**\n * Id of the data owner which created a new key pair and wants to regain access to his exchange keys.\n */\n readonly concernedDataOwnerId: string\n\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n readonly originalTask?: MaintenanceTask\n}\n\nexport namespace KeyPairUpdateRequest {\n /**\n * Create a key pair update request from a maintenance task.\n */\n export function fromMaintenanceTask(task: MaintenanceTask): KeyPairUpdateRequest {\n if (task.taskType !== KeyPairUpdateRequest.TASK_TYPE)\n throw new Error(`Key pair update tasks should have task type ${KeyPairUpdateRequest.TASK_TYPE}, but got task with type ${task.taskType}`)\n\n function findStringProp(propId: string): string {\n const prop: PropertyStub | undefined = task.properties?.find((x) => x.id === propId)\n if (!prop) throw new Error(`Task is missing required string property ${propId} for KeyPairUpdateRequest. ${JSON.stringify(task)}`)\n const propValue = prop.typedValue?.stringValue\n if (!propValue)\n throw new Error(`Invalid value ${prop.typedValue?.stringValue} for property ${propId} for KeyPairUpdateRequest. ${JSON.stringify(task)}`)\n return propValue\n }\n\n return {\n concernedDataOwnerId: findStringProp(KeyPairUpdateRequest.OWNER_ID_PROP_ID),\n newPublicKey: findStringProp(KeyPairUpdateRequest.OWNER_PUB_PROP_ID),\n originalTask: task,\n }\n }\n}\n\nexport namespace KeyPairUpdateRequest {\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const OWNER_ID_PROP_ID = 'dataOwnerConcernedId'\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const OWNER_PUB_PROP_ID = 'dataOwnerConcernedPubKey'\n /**\n * @internal this field is intended for internal use only and may be changed in future without notice\n */\n export const TASK_TYPE = MaintenanceTask.TaskTypeEnum.KeyPairUpdate\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/api",
3
- "version": "7.0.0-beta.2",
3
+ "version": "7.0.0-beta.4",
4
4
  "description": "Typescript version of iCure standalone API client",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,81 +0,0 @@
1
- /**
2
- * iCure Data Stack API Documentation
3
- * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- *
8
- * NOTE: This class is auto generated by the swagger code generator program.
9
- * https://github.com/swagger-api/swagger-codegen.git
10
- * Do not edit the class manually.
11
- */
12
- import { XHR } from './XHR';
13
- import { Appointment } from '../model/Appointment';
14
- import { AppointmentImport } from '../model/AppointmentImport';
15
- import { EmailOrSmsMessage } from '../model/EmailOrSmsMessage';
16
- import { MikronoAppointmentTypeRest } from '../model/MikronoAppointmentTypeRest';
17
- import { MikronoCredentials } from '../model/MikronoCredentials';
18
- import { Unit } from '../model/Unit';
19
- import { User } from '../model/User';
20
- import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
21
- export declare class IccBemikronoApi {
22
- host: string;
23
- headers: Array<XHR.Header>;
24
- authenticationProvider: AuthenticationProvider;
25
- fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
26
- constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
27
- setHeaders(h: Array<XHR.Header>): void;
28
- handleError(e: XHR.XHRError): never;
29
- /**
30
- *
31
- * @summary Get appointments for patient
32
- * @param calendarDate
33
- */
34
- appointmentsByDate(calendarDate: number): Promise<Array<Appointment>>;
35
- /**
36
- *
37
- * @summary Get appointments for patient
38
- * @param patientId
39
- * @param from
40
- * @param to
41
- */
42
- appointmentsByPatient(patientId: string, from?: number, to?: number): Promise<Array<Appointment>>;
43
- /**
44
- *
45
- * @param body
46
- */
47
- createAppointmentTypes(body?: Array<MikronoAppointmentTypeRest>): Promise<Array<MikronoAppointmentTypeRest>>;
48
- /**
49
- *
50
- * @summary Create appointments for owner
51
- * @param body
52
- */
53
- createAppointments(body?: Array<AppointmentImport>): Promise<Array<string>>;
54
- /**
55
- *
56
- * @summary Notify of an appointment change
57
- * @param appointmentId
58
- * @param action
59
- */
60
- notify(appointmentId: string, action: string): Promise<any | Boolean>;
61
- /**
62
- *
63
- * @summary Set credentials for provided user
64
- * @param body
65
- * @param userId
66
- */
67
- register(userId: string, body?: MikronoCredentials): Promise<User>;
68
- /**
69
- *
70
- * @summary Send message using mikrono from logged user
71
- * @param body
72
- */
73
- sendMessage(body?: EmailOrSmsMessage): Promise<Unit>;
74
- /**
75
- *
76
- * @summary Set credentials for provided user
77
- * @param body
78
- * @param userId
79
- */
80
- setUserCredentials(userId: string, body?: MikronoCredentials): Promise<User>;
81
- }
@@ -1,162 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IccBemikronoApi = void 0;
4
- /**
5
- * iCure Data Stack API Documentation
6
- * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
7
- *
8
- * OpenAPI spec version: v1
9
- *
10
- *
11
- * NOTE: This class is auto generated by the swagger code generator program.
12
- * https://github.com/swagger-api/swagger-codegen.git
13
- * Do not edit the class manually.
14
- */
15
- const XHR_1 = require("./XHR");
16
- const Appointment_1 = require("../model/Appointment");
17
- const MikronoAppointmentTypeRest_1 = require("../model/MikronoAppointmentTypeRest");
18
- const Unit_1 = require("../model/Unit");
19
- const User_1 = require("../model/User");
20
- const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
21
- class IccBemikronoApi {
22
- constructor(host, headers, authenticationProvider, fetchImpl) {
23
- this.host = host;
24
- this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
25
- this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new AuthenticationProvider_1.NoAuthenticationProvider();
26
- this.fetchImpl = fetchImpl;
27
- }
28
- setHeaders(h) {
29
- this.headers = h;
30
- }
31
- handleError(e) {
32
- throw e;
33
- }
34
- /**
35
- *
36
- * @summary Get appointments for patient
37
- * @param calendarDate
38
- */
39
- appointmentsByDate(calendarDate) {
40
- let _body = null;
41
- const _url = this.host + `/be_mikrono/appointments/byDate/${encodeURIComponent(String(calendarDate))}` + '?ts=' + new Date().getTime();
42
- let headers = this.headers;
43
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
44
- .then((doc) => doc.body.map((it) => new Appointment_1.Appointment(it)))
45
- .catch((err) => this.handleError(err));
46
- }
47
- /**
48
- *
49
- * @summary Get appointments for patient
50
- * @param patientId
51
- * @param from
52
- * @param to
53
- */
54
- appointmentsByPatient(patientId, from, to) {
55
- let _body = null;
56
- const _url = this.host +
57
- `/be_mikrono/appointments/byPatient/${encodeURIComponent(String(patientId))}` +
58
- '?ts=' +
59
- new Date().getTime() +
60
- (from ? '&from=' + encodeURIComponent(String(from)) : '') +
61
- (to ? '&to=' + encodeURIComponent(String(to)) : '');
62
- let headers = this.headers;
63
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
64
- .then((doc) => doc.body.map((it) => new Appointment_1.Appointment(it)))
65
- .catch((err) => this.handleError(err));
66
- }
67
- /**
68
- *
69
- * @param body
70
- */
71
- createAppointmentTypes(body) {
72
- let _body = null;
73
- _body = body;
74
- const _url = this.host + `/be_mikrono/appointmentTypes` + '?ts=' + new Date().getTime();
75
- let headers = this.headers;
76
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
77
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
78
- .then((doc) => doc.body.map((it) => new MikronoAppointmentTypeRest_1.MikronoAppointmentTypeRest(it)))
79
- .catch((err) => this.handleError(err));
80
- }
81
- /**
82
- *
83
- * @summary Create appointments for owner
84
- * @param body
85
- */
86
- createAppointments(body) {
87
- let _body = null;
88
- _body = body;
89
- const _url = this.host + `/be_mikrono/appointments` + '?ts=' + new Date().getTime();
90
- let headers = this.headers;
91
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
92
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
93
- .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
94
- .catch((err) => this.handleError(err));
95
- }
96
- /**
97
- *
98
- * @summary Notify of an appointment change
99
- * @param appointmentId
100
- * @param action
101
- */
102
- notify(appointmentId, action) {
103
- let _body = null;
104
- const _url = this.host +
105
- `/be_mikrono/notify/${encodeURIComponent(String(appointmentId))}/${encodeURIComponent(String(action))}` +
106
- '?ts=' +
107
- new Date().getTime();
108
- let headers = this.headers;
109
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
110
- .then((doc) => true)
111
- .catch((err) => this.handleError(err));
112
- }
113
- /**
114
- *
115
- * @summary Set credentials for provided user
116
- * @param body
117
- * @param userId
118
- */
119
- register(userId, body) {
120
- let _body = null;
121
- _body = body;
122
- const _url = this.host + `/be_mikrono/user/${encodeURIComponent(String(userId))}/register` + '?ts=' + new Date().getTime();
123
- let headers = this.headers;
124
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
125
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
126
- .then((doc) => new User_1.User(doc.body))
127
- .catch((err) => this.handleError(err));
128
- }
129
- /**
130
- *
131
- * @summary Send message using mikrono from logged user
132
- * @param body
133
- */
134
- sendMessage(body) {
135
- let _body = null;
136
- _body = body;
137
- const _url = this.host + `/be_mikrono/sendMessage` + '?ts=' + new Date().getTime();
138
- let headers = this.headers;
139
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
140
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
141
- .then((doc) => new Unit_1.Unit(doc.body))
142
- .catch((err) => this.handleError(err));
143
- }
144
- /**
145
- *
146
- * @summary Set credentials for provided user
147
- * @param body
148
- * @param userId
149
- */
150
- setUserCredentials(userId, body) {
151
- let _body = null;
152
- _body = body;
153
- const _url = this.host + `/be_mikrono/user/${encodeURIComponent(String(userId))}/credentials` + '?ts=' + new Date().getTime();
154
- let headers = this.headers;
155
- headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
156
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
157
- .then((doc) => new User_1.User(doc.body))
158
- .catch((err) => this.handleError(err));
159
- }
160
- }
161
- exports.IccBemikronoApi = IccBemikronoApi;
162
- //# sourceMappingURL=IccBemikronoApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IccBemikronoApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccBemikronoApi.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,sDAAkD;AAGlD,oFAAgF;AAEhF,wCAAoC;AACpC,wCAAoC;AACpC,wFAA8G;AAE9G,MAAa,eAAe;IAM1B,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,OAAO,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;QAC7E,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,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,YAAoB;QACrC,IAAI,KAAK,GAAG,IAAI,CAAA;QAEhB,MAAM,IAAI,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AI,EAAE,CAAC,OAAO,EAAE,CAAA;QAC7H,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,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;QACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;aACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,WAAI,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;aACzC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAzKD,0CAyKC","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 { Appointment } from '../model/Appointment'\nimport { AppointmentImport } from '../model/AppointmentImport'\nimport { EmailOrSmsMessage } from '../model/EmailOrSmsMessage'\nimport { MikronoAppointmentTypeRest } from '../model/MikronoAppointmentTypeRest'\nimport { MikronoCredentials } from '../model/MikronoCredentials'\nimport { Unit } from '../model/Unit'\nimport { User } from '../model/User'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\n\nexport class IccBemikronoApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = 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 Get appointments for patient\n * @param calendarDate\n */\n appointmentsByDate(calendarDate: number): Promise<Array<Appointment>> {\n let _body = null\n\n const _url = this.host + `/be_mikrono/appointments/byDate/${encodeURIComponent(String(calendarDate))}` + '?ts=' + new Date().getTime()\n let headers = 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 Appointment(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get appointments for patient\n * @param patientId\n * @param from\n * @param to\n */\n appointmentsByPatient(patientId: string, from?: number, to?: number): Promise<Array<Appointment>> {\n let _body = null\n\n const _url =\n this.host +\n `/be_mikrono/appointments/byPatient/${encodeURIComponent(String(patientId))}` +\n '?ts=' +\n new Date().getTime() +\n (from ? '&from=' + encodeURIComponent(String(from)) : '') +\n (to ? '&to=' + encodeURIComponent(String(to)) : '')\n let headers = 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 Appointment(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @param body\n */\n createAppointmentTypes(body?: Array<MikronoAppointmentTypeRest>): Promise<Array<MikronoAppointmentTypeRest>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/be_mikrono/appointmentTypes` + '?ts=' + new Date().getTime()\n let headers = 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 MikronoAppointmentTypeRest(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Create appointments for owner\n * @param body\n */\n createAppointments(body?: Array<AppointmentImport>): Promise<Array<string>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/be_mikrono/appointments` + '?ts=' + new Date().getTime()\n let headers = 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) => JSON.parse(JSON.stringify(it))))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Notify of an appointment change\n * @param appointmentId\n * @param action\n */\n notify(appointmentId: string, action: string): Promise<any | Boolean> {\n let _body = null\n\n const _url =\n this.host +\n `/be_mikrono/notify/${encodeURIComponent(String(appointmentId))}/${encodeURIComponent(String(action))}` +\n '?ts=' +\n new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => true)\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Set credentials for provided user\n * @param body\n * @param userId\n */\n register(userId: string, body?: MikronoCredentials): Promise<User> {\n let _body = null\n _body = body\n\n const _url = this.host + `/be_mikrono/user/${encodeURIComponent(String(userId))}/register` + '?ts=' + new Date().getTime()\n let headers = 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 User(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Send message using mikrono from logged user\n * @param body\n */\n sendMessage(body?: EmailOrSmsMessage): Promise<Unit> {\n let _body = null\n _body = body\n\n const _url = this.host + `/be_mikrono/sendMessage` + '?ts=' + new Date().getTime()\n let headers = 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 Unit(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Set credentials for provided user\n * @param body\n * @param userId\n */\n setUserCredentials(userId: string, body?: MikronoCredentials): Promise<User> {\n let _body = null\n _body = body\n\n const _url = this.host + `/be_mikrono/user/${encodeURIComponent(String(userId))}/credentials` + '?ts=' + new Date().getTime()\n let headers = 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 User(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}