@icure/api 7.0.0-beta.3 → 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 (171) 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.js +2 -1
  39. package/icc-api/api/IccDataownerApi.js.map +1 -1
  40. package/icc-api/api/IccDeviceApi.js +2 -1
  41. package/icc-api/api/IccDeviceApi.js.map +1 -1
  42. package/icc-api/api/IccDoctemplateApi.js +2 -1
  43. package/icc-api/api/IccDoctemplateApi.js.map +1 -1
  44. package/icc-api/api/IccDocumentApi.js +2 -1
  45. package/icc-api/api/IccDocumentApi.js.map +1 -1
  46. package/icc-api/api/IccDocumentTemplateApi.js +2 -1
  47. package/icc-api/api/IccDocumentTemplateApi.js.map +1 -1
  48. package/icc-api/api/IccEntityrefApi.js +2 -1
  49. package/icc-api/api/IccEntityrefApi.js.map +1 -1
  50. package/icc-api/api/IccEntitytemplateApi.js +2 -1
  51. package/icc-api/api/IccEntitytemplateApi.js.map +1 -1
  52. package/icc-api/api/IccFormApi.js +2 -1
  53. package/icc-api/api/IccFormApi.js.map +1 -1
  54. package/icc-api/api/IccFrontendmigrationApi.js +2 -1
  55. package/icc-api/api/IccFrontendmigrationApi.js.map +1 -1
  56. package/icc-api/api/IccGroupApi.d.ts +6 -0
  57. package/icc-api/api/IccGroupApi.js +15 -1
  58. package/icc-api/api/IccGroupApi.js.map +1 -1
  59. package/icc-api/api/IccHcpartyApi.js +2 -1
  60. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  61. package/icc-api/api/IccHelementApi.js +2 -1
  62. package/icc-api/api/IccHelementApi.js.map +1 -1
  63. package/icc-api/api/IccIcureApi.js +2 -1
  64. package/icc-api/api/IccIcureApi.js.map +1 -1
  65. package/icc-api/api/IccInsuranceApi.js +2 -1
  66. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  67. package/icc-api/api/IccInvoiceApi.js +2 -1
  68. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  69. package/icc-api/api/IccKeywordApi.js +2 -1
  70. package/icc-api/api/IccKeywordApi.js.map +1 -1
  71. package/icc-api/api/IccMaintenanceTaskApi.js +2 -1
  72. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  73. package/icc-api/api/IccMedexApi.js +2 -1
  74. package/icc-api/api/IccMedexApi.js.map +1 -1
  75. package/icc-api/api/IccMedicallocationApi.js +2 -1
  76. package/icc-api/api/IccMedicallocationApi.js.map +1 -1
  77. package/icc-api/api/IccMessageApi.js +2 -1
  78. package/icc-api/api/IccMessageApi.js.map +1 -1
  79. package/icc-api/api/IccPatientApi.js +2 -1
  80. package/icc-api/api/IccPatientApi.js.map +1 -1
  81. package/icc-api/api/IccPermissionApi.js +2 -1
  82. package/icc-api/api/IccPermissionApi.js.map +1 -1
  83. package/icc-api/api/IccPlaceApi.js +2 -1
  84. package/icc-api/api/IccPlaceApi.js.map +1 -1
  85. package/icc-api/api/IccPubsubApi.js +2 -1
  86. package/icc-api/api/IccPubsubApi.js.map +1 -1
  87. package/icc-api/api/IccReceiptApi.js +2 -1
  88. package/icc-api/api/IccReceiptApi.js.map +1 -1
  89. package/icc-api/api/IccReplicationApi.js +2 -1
  90. package/icc-api/api/IccReplicationApi.js.map +1 -1
  91. package/icc-api/api/IccRestApiPath.d.ts +1 -0
  92. package/icc-api/api/IccRestApiPath.js +10 -0
  93. package/icc-api/api/IccRestApiPath.js.map +1 -0
  94. package/icc-api/api/IccTarificationApi.js +2 -1
  95. package/icc-api/api/IccTarificationApi.js.map +1 -1
  96. package/icc-api/api/IccTimeTableApi.js +2 -1
  97. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  98. package/icc-api/api/IccTmpApi.js +2 -1
  99. package/icc-api/api/IccTmpApi.js.map +1 -1
  100. package/icc-api/api/IccUserApi.js +2 -1
  101. package/icc-api/api/IccUserApi.js.map +1 -1
  102. package/icc-api/index.d.ts +0 -1
  103. package/icc-api/index.js +0 -1
  104. package/icc-api/index.js.map +1 -1
  105. package/icc-api/model/AuthenticationToken.d.ts +1 -0
  106. package/icc-api/model/AuthenticationToken.js.map +1 -1
  107. package/icc-api/model/FlatRateTarification.d.ts +4 -1
  108. package/icc-api/model/FlatRateTarification.js +3 -0
  109. package/icc-api/model/FlatRateTarification.js.map +1 -1
  110. package/icc-api/model/UserGroup.d.ts +1 -0
  111. package/icc-api/model/UserGroup.js.map +1 -1
  112. package/icc-x-api/auth/AuthenticationProvider.d.ts +67 -6
  113. package/icc-x-api/auth/AuthenticationProvider.js +100 -7
  114. package/icc-x-api/auth/AuthenticationProvider.js.map +1 -1
  115. package/icc-x-api/auth/EnsembleAuthService.d.ts +7 -2
  116. package/icc-x-api/auth/EnsembleAuthService.js +9 -0
  117. package/icc-x-api/auth/EnsembleAuthService.js.map +1 -1
  118. package/icc-x-api/auth/JwtAuthService.d.ts +10 -5
  119. package/icc-x-api/auth/JwtAuthService.js +22 -26
  120. package/icc-x-api/auth/JwtAuthService.js.map +1 -1
  121. package/icc-x-api/auth/JwtBridgedAuthService.d.ts +27 -0
  122. package/icc-x-api/auth/JwtBridgedAuthService.js +131 -0
  123. package/icc-x-api/auth/JwtBridgedAuthService.js.map +1 -0
  124. package/icc-x-api/crypto/EntitiesEncryption.d.ts +3 -3
  125. package/icc-x-api/crypto/EntitiesEncryption.js +7 -5
  126. package/icc-x-api/crypto/EntitiesEncryption.js.map +1 -1
  127. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.d.ts +1 -0
  128. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.js.map +1 -1
  129. package/icc-x-api/icc-accesslog-x-api.d.ts +2 -2
  130. package/icc-x-api/icc-accesslog-x-api.js +9 -4
  131. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  132. package/icc-x-api/icc-calendar-item-x-api.js +9 -4
  133. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  134. package/icc-x-api/icc-classification-x-api.js +7 -2
  135. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  136. package/icc-x-api/icc-contact-x-api.d.ts +1 -0
  137. package/icc-x-api/icc-contact-x-api.js +16 -4
  138. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  139. package/icc-x-api/icc-data-owner-x-api.d.ts +1 -1
  140. package/icc-x-api/icc-data-owner-x-api.js.map +1 -1
  141. package/icc-x-api/icc-document-x-api.js +7 -2
  142. package/icc-x-api/icc-document-x-api.js.map +1 -1
  143. package/icc-x-api/icc-form-x-api.js +7 -2
  144. package/icc-x-api/icc-form-x-api.js.map +1 -1
  145. package/icc-x-api/icc-helement-x-api.js +7 -2
  146. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  147. package/icc-x-api/icc-icure-maintenance-x-api.js +4 -4
  148. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  149. package/icc-x-api/icc-invoice-x-api.js +7 -2
  150. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  151. package/icc-x-api/icc-maintenance-task-x-api.js +6 -1
  152. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  153. package/icc-x-api/icc-message-x-api.js +7 -2
  154. package/icc-x-api/icc-message-x-api.js.map +1 -1
  155. package/icc-x-api/icc-patient-x-api.d.ts +4 -1
  156. package/icc-x-api/icc-patient-x-api.js +8 -7
  157. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  158. package/icc-x-api/icc-receipt-x-api.js +6 -1
  159. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  160. package/icc-x-api/icc-time-table-x-api.js +6 -1
  161. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  162. package/icc-x-api/index.d.ts +178 -35
  163. package/icc-x-api/index.js +302 -79
  164. package/icc-x-api/index.js.map +1 -1
  165. package/icc-x-api/maintenance/KeyPairUpdateRequest.d.ts +12 -9
  166. package/icc-x-api/maintenance/KeyPairUpdateRequest.js +11 -17
  167. package/icc-x-api/maintenance/KeyPairUpdateRequest.js.map +1 -1
  168. package/package.json +1 -1
  169. package/icc-api/api/IccBemikronoApi.d.ts +0 -81
  170. package/icc-api/api/IccBemikronoApi.js +0 -162
  171. package/icc-api/api/IccBemikronoApi.js.map +0 -1
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  });
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.BasicApis = exports.Api = exports.KeyStorageImpl = exports.LocalStorageImpl = void 0;
26
+ exports.BasicApis = exports.IcureApi = exports.EncryptedFieldsConfig = exports.KeyStorageImpl = exports.LocalStorageImpl = void 0;
27
27
  const icc_api_1 = require("../icc-api");
28
28
  const icc_user_x_api_1 = require("./icc-user-x-api");
29
29
  const icc_crypto_x_api_1 = require("./icc-crypto-x-api");
@@ -40,7 +40,7 @@ const icc_message_x_api_1 = require("./icc-message-x-api");
40
40
  const icc_receipt_x_api_1 = require("./icc-receipt-x-api");
41
41
  const icc_accesslog_x_api_1 = require("./icc-accesslog-x-api");
42
42
  const icc_time_table_x_api_1 = require("./icc-time-table-x-api");
43
- const IccDeviceApi_1 = require("../icc-api/api/IccDeviceApi");
43
+ const icc_api_2 = require("../icc-api");
44
44
  const icc_code_x_api_1 = require("./icc-code-x-api");
45
45
  const icc_maintenance_task_x_api_1 = require("./icc-maintenance-task-x-api");
46
46
  const icc_data_owner_x_api_1 = require("./icc-data-owner-x-api");
@@ -61,6 +61,8 @@ const EntitiesEncryption_1 = require("./crypto/EntitiesEncryption");
61
61
  const ConfidentialEntities_1 = require("./crypto/ConfidentialEntities");
62
62
  const utils_1 = require("./crypto/utils");
63
63
  const CryptoActorStub_1 = require("../icc-api/model/CryptoActorStub");
64
+ const icc_bekmehr_x_api_1 = require("./icc-bekmehr-x-api");
65
+ const icc_doctemplate_x_api_1 = require("./icc-doctemplate-x-api");
64
66
  __exportStar(require("./icc-accesslog-x-api"), exports);
65
67
  __exportStar(require("./icc-bekmehr-x-api"), exports);
66
68
  __exportStar(require("./icc-calendar-item-x-api"), exports);
@@ -84,42 +86,82 @@ var LocalStorageImpl_2 = require("./storage/LocalStorageImpl");
84
86
  Object.defineProperty(exports, "LocalStorageImpl", { enumerable: true, get: function () { return LocalStorageImpl_2.LocalStorageImpl; } });
85
87
  var KeyStorageImpl_2 = require("./storage/KeyStorageImpl");
86
88
  Object.defineProperty(exports, "KeyStorageImpl", { enumerable: true, get: function () { return KeyStorageImpl_2.KeyStorageImpl; } });
87
- class NamedApiParametersWithDefault {
88
- constructor(custom) {
89
- var _a, _b, _c, _d, _e;
90
- this.entryKeysFactory = (_a = custom.entryKeysFactory) !== null && _a !== void 0 ? _a : new DefaultStorageEntryKeysFactory_1.DefaultStorageEntryKeysFactory();
91
- this.createMaintenanceTasksOnNewKey = (_b = custom.createMaintenanceTasksOnNewKey) !== null && _b !== void 0 ? _b : false;
92
- this.storage = (_c = custom.storage) !== null && _c !== void 0 ? _c : new LocalStorageImpl_1.LocalStorageImpl();
93
- this.keyStorage = (_d = custom.keyStorage) !== null && _d !== void 0 ? _d : new KeyStorageImpl_1.KeyStorageImpl(this.storage);
94
- this.headers = (_e = custom.headers) !== null && _e !== void 0 ? _e : {};
89
+ var IcureApiOptions;
90
+ (function (IcureApiOptions) {
91
+ let Defaults;
92
+ (function (Defaults) {
93
+ Defaults.entryKeysFactory = new DefaultStorageEntryKeysFactory_1.DefaultStorageEntryKeysFactory();
94
+ Defaults.createMaintenanceTasksOnNewKey = true;
95
+ Defaults.headers = {};
96
+ })(Defaults = IcureApiOptions.Defaults || (IcureApiOptions.Defaults = {}));
97
+ class WithDefaults {
98
+ constructor(custom) {
99
+ var _a, _b, _c, _d, _e, _f, _g;
100
+ this.entryKeysFactory = (_a = custom.entryKeysFactory) !== null && _a !== void 0 ? _a : Defaults.entryKeysFactory;
101
+ this.createMaintenanceTasksOnNewKey = (_b = custom.createMaintenanceTasksOnNewKey) !== null && _b !== void 0 ? _b : Defaults.createMaintenanceTasksOnNewKey;
102
+ this.storage = (_c = custom.storage) !== null && _c !== void 0 ? _c : new LocalStorageImpl_1.LocalStorageImpl();
103
+ this.keyStorage = (_d = custom.keyStorage) !== null && _d !== void 0 ? _d : new KeyStorageImpl_1.KeyStorageImpl(this.storage);
104
+ this.headers = (_e = custom.headers) !== null && _e !== void 0 ? _e : Defaults.headers;
105
+ this.encryptedFieldsConfig = (_f = custom.encryptedFieldsConfig) !== null && _f !== void 0 ? _f : EncryptedFieldsConfig.Defaults;
106
+ this.groupSelector = (_g = custom.groupSelector) !== null && _g !== void 0 ? _g : ((groups) => Promise.resolve(groups[0].groupId));
107
+ }
95
108
  }
96
- }
97
- const Api = function (host, authenticationOptions, cryptoStrategies, crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : {}, fetchImpl = typeof window !== 'undefined'
98
- ? window.fetch
99
- : typeof self !== 'undefined'
100
- ? self.fetch
101
- : fetch, options = {}) {
109
+ IcureApiOptions.WithDefaults = WithDefaults;
110
+ })(IcureApiOptions || (IcureApiOptions = {}));
111
+ var EncryptedFieldsConfig;
112
+ (function (EncryptedFieldsConfig) {
113
+ EncryptedFieldsConfig.Defaults = {
114
+ accessLog: ['detail', 'objectId'],
115
+ calendarItem: ['details', 'title', 'patientId'],
116
+ // TODO contact
117
+ healthElement: ['descr', 'note'],
118
+ maintenanceTask: ['properties'],
119
+ patient: ['note'],
120
+ };
121
+ })(EncryptedFieldsConfig = exports.EncryptedFieldsConfig || (exports.EncryptedFieldsConfig = {}));
122
+ var IcureApi;
123
+ (function (IcureApi) {
124
+ /**
125
+ * Initialises a new instance of the iCure API.
126
+ */
127
+ function initialise(host, authenticationOptions, cryptoStrategies, crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : {}, fetchImpl = typeof window !== 'undefined'
128
+ ? window.fetch
129
+ : typeof self !== 'undefined'
130
+ ? self.fetch
131
+ : fetch, options = {}) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const params = new IcureApiOptions.WithDefaults(options);
134
+ let grouplessAuthenticationProvider;
135
+ if ('username' in authenticationOptions && 'password' in authenticationOptions) {
136
+ grouplessAuthenticationProvider = new AuthenticationProvider_1.EnsembleAuthenticationProvider(new icc_api_1.IccAuthApi(host, params.headers, new AuthenticationProvider_1.NoAuthenticationProvider(), fetchImpl), authenticationOptions.username, authenticationOptions.password, 3600, undefined, undefined, authenticationOptions.thirdPartyTokens);
137
+ }
138
+ else if ('icureTokens' in authenticationOptions) {
139
+ grouplessAuthenticationProvider = new AuthenticationProvider_1.JwtAuthenticationProvider(new icc_api_1.IccAuthApi(host, {}, new AuthenticationProvider_1.NoAuthenticationProvider(), fetchImpl), undefined, undefined, undefined, authenticationOptions.icureTokens);
140
+ }
141
+ else {
142
+ grouplessAuthenticationProvider = authenticationOptions;
143
+ }
144
+ const grouplessUserApi = new icc_user_x_api_1.IccUserXApi(host, params.headers, grouplessAuthenticationProvider, fetchImpl);
145
+ const matches = yield grouplessUserApi.getMatchingUsers();
146
+ const chosenGroupId = matches.length > 1 ? yield params.groupSelector(matches) : matches[0].groupId;
147
+ /*TODO
148
+ * 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
149
+ * probably linked to replication of the user in the fallback database.
150
+ */
151
+ const groupSpecificAuthenticationProvider = matches.length > 1 ? yield grouplessAuthenticationProvider.switchGroup(chosenGroupId, matches) : grouplessAuthenticationProvider;
152
+ const cryptoApis = yield initialiseCryptoWithProvider(host, fetchImpl, groupSpecificAuthenticationProvider, params, cryptoStrategies, crypto);
153
+ return new IcureApiImpl(cryptoApis, host, groupSpecificAuthenticationProvider, fetch, grouplessUserApi, matches, matches.find((match) => match.groupId === chosenGroupId), params, cryptoStrategies);
154
+ });
155
+ }
156
+ IcureApi.initialise = initialise;
157
+ })(IcureApi = exports.IcureApi || (exports.IcureApi = {}));
158
+ function initialiseCryptoWithProvider(host, fetchImpl, groupSpecificAuthenticationProvider, params, cryptoStrategies, crypto) {
159
+ var _a, _b;
102
160
  return __awaiter(this, void 0, void 0, function* () {
103
- const params = new NamedApiParametersWithDefault(options);
104
- let authenticationProvider;
105
- if ('username' in authenticationOptions && 'password' in authenticationOptions) {
106
- authenticationProvider = authenticationOptions.forceBasic
107
- ? new AuthenticationProvider_1.BasicAuthenticationProvider(authenticationOptions.username, authenticationOptions.password)
108
- : new AuthenticationProvider_1.EnsembleAuthenticationProvider(new icc_api_1.IccAuthApi(host, params.headers, new AuthenticationProvider_1.NoAuthenticationProvider(), fetchImpl), authenticationOptions.username, authenticationOptions.password);
109
- }
110
- else {
111
- authenticationProvider = authenticationOptions;
112
- }
113
- // Here I instantiate a separate instance of the AuthApi that can call also login-protected methods (logout)
114
- const authApi = new icc_api_1.IccAuthApi(host, params.headers, authenticationProvider, fetchImpl);
115
- const codeApi = new icc_code_x_api_1.IccCodeXApi(host, params.headers, authenticationProvider, fetchImpl);
116
- const entityReferenceApi = new icc_api_1.IccEntityrefApi(host, params.headers, authenticationProvider, fetchImpl);
117
- const userApi = new icc_user_x_api_1.IccUserXApi(host, params.headers, authenticationProvider, fetchImpl);
118
- const permissionApi = new icc_api_1.IccPermissionApi(host, params.headers, authenticationProvider, fetchImpl);
119
- const healthcarePartyApi = new icc_hcparty_x_api_1.IccHcpartyXApi(host, params.headers, authenticationProvider, fetchImpl);
120
- const deviceApi = new IccDeviceApi_1.IccDeviceApi(host, params.headers, authenticationProvider, fetchImpl);
121
- const basePatientApi = new icc_api_1.IccPatientApi(host, params.headers, authenticationProvider, fetchImpl);
122
- const dataOwnerApi = new icc_data_owner_x_api_1.IccDataOwnerXApi(host, params.headers, authenticationProvider, fetchImpl);
161
+ const healthcarePartyApi = new icc_hcparty_x_api_1.IccHcpartyXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl);
162
+ const deviceApi = new icc_api_2.IccDeviceApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl);
163
+ const basePatientApi = new icc_api_1.IccPatientApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl);
164
+ const dataOwnerApi = new icc_data_owner_x_api_1.IccDataOwnerXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl);
123
165
  // Crypto initialisation
124
166
  const icureStorage = new IcureStorageFacade_1.IcureStorageFacade(params.keyStorage, params.storage, params.entryKeysFactory);
125
167
  const cryptoPrimitives = new CryptoPrimitives_1.CryptoPrimitives(crypto);
@@ -135,61 +177,240 @@ const Api = function (host, authenticationOptions, cryptoStrategies, crypto = ty
135
177
  const confidentialEntitites = new ConfidentialEntities_1.ConfidentialEntities(entitiesEncryption, cryptoPrimitives, dataOwnerApi);
136
178
  yield (0, utils_1.ensureDelegationForSelf)(dataOwnerApi, entitiesEncryption, cryptoPrimitives, basePatientApi);
137
179
  const cryptoApi = new icc_crypto_x_api_1.IccCryptoXApi(exchangeKeysManager, cryptoPrimitives, keyManager, dataOwnerApi, entitiesEncryption, shamirManager, params.storage, params.keyStorage, icureStorage, healthcarePartyApi, confidentialEntitites);
138
- const accessLogApi = new icc_accesslog_x_api_1.IccAccesslogXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
139
- const agendaApi = new icc_api_1.IccAgendaApi(host, params.headers, authenticationProvider, fetchImpl);
140
- const contactApi = new icc_contact_x_api_1.IccContactXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
141
- const formApi = new icc_form_x_api_1.IccFormXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
142
- const groupApi = new icc_api_1.IccGroupApi(host, params.headers, authenticationProvider);
143
- const medicalLocationApi = new icc_api_1.IccMedicallocationApi(host, params.headers, authenticationProvider);
144
- const calendarItemTypeApi = new icc_api_1.IccCalendarItemTypeApi(host, params.headers, authenticationProvider);
145
- const invoiceApi = new icc_invoice_x_api_1.IccInvoiceXApi(host, params.headers, cryptoApi, entityReferenceApi, dataOwnerApi, authenticationProvider, fetchImpl);
146
- const insuranceApi = new icc_api_1.IccInsuranceApi(host, params.headers, authenticationProvider, fetchImpl);
147
- const documentApi = new icc_document_x_api_1.IccDocumentXApi(host, params.headers, cryptoApi, authApi, dataOwnerApi, authenticationProvider, fetchImpl);
148
- const healthcareElementApi = new icc_helement_x_api_1.IccHelementXApi(host, params.headers, cryptoApi, dataOwnerApi, ['descr', 'note'], authenticationProvider, fetchImpl);
149
- const classificationApi = new icc_classification_x_api_1.IccClassificationXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
150
- const calendarItemApi = new icc_calendar_item_x_api_1.IccCalendarItemXApi(host, params.headers, cryptoApi, dataOwnerApi, ['details', 'title', 'patientId'], authenticationProvider, fetchImpl);
151
- const receiptApi = new icc_receipt_x_api_1.IccReceiptXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
152
- const timetableApi = new icc_time_table_x_api_1.IccTimeTableXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
153
- const patientApi = new icc_patient_x_api_1.IccPatientXApi(host, params.headers, cryptoApi, contactApi, formApi, healthcareElementApi, invoiceApi, documentApi, healthcarePartyApi, classificationApi, dataOwnerApi, calendarItemApi, ['note'], authenticationProvider, fetchImpl);
154
- const messageApi = new icc_message_x_api_1.IccMessageXApi(host, params.headers, cryptoApi, dataOwnerApi, authenticationProvider, fetchImpl);
155
- const maintenanceTaskApi = new icc_maintenance_task_x_api_1.IccMaintenanceTaskXApi(host, params.headers, cryptoApi, healthcarePartyApi, dataOwnerApi, ['properties'], authenticationProvider, fetchImpl);
180
+ const maintenanceTaskApi = new icc_maintenance_task_x_api_1.IccMaintenanceTaskXApi(host, params.headers, cryptoApi, healthcarePartyApi, dataOwnerApi, (_b = (_a = params.encryptedFieldsConfig) === null || _a === void 0 ? void 0 : _a.maintenanceTask) !== null && _b !== void 0 ? _b : EncryptedFieldsConfig.Defaults.maintenanceTask, groupSpecificAuthenticationProvider, fetchImpl);
156
181
  const icureMaintenanceTaskApi = new icc_icure_maintenance_x_api_1.IccIcureMaintenanceXApi(cryptoApi, maintenanceTaskApi, dataOwnerApi);
182
+ const userApi = new icc_user_x_api_1.IccUserXApi(host, params.headers, groupSpecificAuthenticationProvider, fetchImpl);
157
183
  if (newKey && params.createMaintenanceTasksOnNewKey) {
158
184
  yield icureMaintenanceTaskApi.createMaintenanceTasksForNewKeypair(yield userApi.getCurrentUser(), newKey.newKeyPair);
159
185
  }
160
186
  return {
161
187
  cryptoApi,
162
- authApi,
163
- codeApi,
164
- calendarItemTypeApi,
165
- medicalLocationApi,
166
- userApi,
167
- permissionApi,
168
- patientApi,
169
188
  healthcarePartyApi,
170
189
  deviceApi,
171
- accessLogApi,
172
- contactApi,
173
- healthcareElementApi,
174
- documentApi,
175
- formApi,
176
- invoiceApi,
177
- insuranceApi,
178
- messageApi,
179
- entityReferenceApi,
180
- receiptApi,
181
- agendaApi,
182
- calendarItemApi,
183
- classificationApi,
184
- timetableApi,
185
- groupApi,
186
- maintenanceTaskApi,
187
190
  dataOwnerApi,
191
+ userApi,
188
192
  icureMaintenanceTaskApi,
193
+ maintenanceTaskApi,
189
194
  };
190
195
  });
191
- };
192
- exports.Api = Api;
196
+ }
197
+ class IcureApiImpl {
198
+ get cryptoApi() {
199
+ return this.cryptoInitApis.cryptoApi;
200
+ }
201
+ get dataOwnerApi() {
202
+ return this.cryptoInitApis.dataOwnerApi;
203
+ }
204
+ get accessLogApi() {
205
+ var _a, _b;
206
+ return ((_a = this._accessLogApi) !== null && _a !== void 0 ? _a : (this._accessLogApi = new icc_accesslog_x_api_1.IccAccesslogXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, (_b = this.params.encryptedFieldsConfig.accessLog) !== null && _b !== void 0 ? _b : EncryptedFieldsConfig.Defaults.accessLog, this.groupSpecificAuthenticationProvider, this.fetch)));
207
+ }
208
+ get agendaApi() {
209
+ var _a;
210
+ return ((_a = this._agendaApi) !== null && _a !== void 0 ? _a : (this._agendaApi = new icc_api_1.IccAgendaApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
211
+ }
212
+ get anonymousAccessApi() {
213
+ var _a;
214
+ return ((_a = this._anonymousAccessApi) !== null && _a !== void 0 ? _a : (this._anonymousAccessApi = new icc_api_1.IccAnonymousAccessApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
215
+ }
216
+ get applicationSettingsApi() {
217
+ var _a;
218
+ return ((_a = this._applicationSettingsApi) !== null && _a !== void 0 ? _a : (this._applicationSettingsApi = new icc_api_1.IccApplicationsettingsApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
219
+ }
220
+ get articleApi() {
221
+ var _a;
222
+ return ((_a = this._articleApi) !== null && _a !== void 0 ? _a : (this._articleApi = new icc_api_1.IccArticleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
223
+ }
224
+ get authApi() {
225
+ var _a;
226
+ return (_a = this._authApi) !== null && _a !== void 0 ? _a : (this._authApi = new icc_api_1.IccAuthApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
227
+ }
228
+ get beefactApi() {
229
+ var _a;
230
+ return ((_a = this._beefactApi) !== null && _a !== void 0 ? _a : (this._beefactApi = new icc_api_1.IccBeefactApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
231
+ }
232
+ get bekmehrApi() {
233
+ var _a;
234
+ return ((_a = this._bekmehrApi) !== null && _a !== void 0 ? _a : (this._bekmehrApi = new icc_bekmehr_x_api_1.IccBekmehrXApi(this.host, this.params.headers, this.authApi, this.contactApi, this.healthcareElementApi, this.documentApi, this.groupSpecificAuthenticationProvider, this.fetch)));
235
+ }
236
+ get beresultexportApi() {
237
+ var _a;
238
+ return ((_a = this._beresultexportApi) !== null && _a !== void 0 ? _a : (this._beresultexportApi = new icc_api_1.IccBeresultexportApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
239
+ }
240
+ get beresultimportApi() {
241
+ var _a;
242
+ return ((_a = this._beresultimportApi) !== null && _a !== void 0 ? _a : (this._beresultimportApi = new icc_api_1.IccBeresultimportApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
243
+ }
244
+ get besamv2Api() {
245
+ var _a;
246
+ return ((_a = this._besamv2Api) !== null && _a !== void 0 ? _a : (this._besamv2Api = new icc_api_1.IccBesamv2Api(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
247
+ }
248
+ get calendarItemApi() {
249
+ var _a, _b;
250
+ return ((_a = this._calendarItemApi) !== null && _a !== void 0 ? _a : (this._calendarItemApi = new icc_calendar_item_x_api_1.IccCalendarItemXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, (_b = this.params.encryptedFieldsConfig.calendarItem) !== null && _b !== void 0 ? _b : EncryptedFieldsConfig.Defaults.calendarItem, this.groupSpecificAuthenticationProvider, this.fetch)));
251
+ }
252
+ get calendarItemTypeApi() {
253
+ var _a;
254
+ return ((_a = this._calendarItemTypeApi) !== null && _a !== void 0 ? _a : (this._calendarItemTypeApi = new icc_api_1.IccCalendarItemTypeApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
255
+ }
256
+ get classificationApi() {
257
+ var _a;
258
+ return ((_a = this._classificationApi) !== null && _a !== void 0 ? _a : (this._classificationApi = new icc_classification_x_api_1.IccClassificationXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
259
+ }
260
+ get classificationTemplateApi() {
261
+ var _a;
262
+ return ((_a = this._classificationTemplateApi) !== null && _a !== void 0 ? _a : (this._classificationTemplateApi = new icc_api_1.IccClassificationTemplateApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
263
+ }
264
+ get codeApi() {
265
+ var _a;
266
+ return (_a = this._codeApi) !== null && _a !== void 0 ? _a : (this._codeApi = new icc_code_x_api_1.IccCodeXApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
267
+ }
268
+ get contactApi() {
269
+ var _a;
270
+ return ((_a = this._contactApi) !== null && _a !== void 0 ? _a : (this._contactApi = new icc_contact_x_api_1.IccContactXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
271
+ }
272
+ get deviceApi() {
273
+ return this.cryptoInitApis.deviceApi;
274
+ }
275
+ get doctemplateApi() {
276
+ var _a;
277
+ return ((_a = this._doctemplateApi) !== null && _a !== void 0 ? _a : (this._doctemplateApi = new icc_doctemplate_x_api_1.IccDoctemplateXApi(this.host, this.params.headers, this.cryptoApi, this.groupSpecificAuthenticationProvider, this.fetch)));
278
+ }
279
+ get documentApi() {
280
+ var _a;
281
+ return ((_a = this._documentApi) !== null && _a !== void 0 ? _a : (this._documentApi = new icc_document_x_api_1.IccDocumentXApi(this.host, this.params.headers, this.cryptoApi, this.authApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
282
+ }
283
+ get entityReferenceApi() {
284
+ var _a;
285
+ return ((_a = this._entityReferenceApi) !== null && _a !== void 0 ? _a : (this._entityReferenceApi = new icc_api_1.IccEntityrefApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
286
+ }
287
+ get entitytemplateApi() {
288
+ var _a;
289
+ return ((_a = this._entitytemplateApi) !== null && _a !== void 0 ? _a : (this._entitytemplateApi = new icc_api_1.IccEntitytemplateApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
290
+ }
291
+ get formApi() {
292
+ var _a;
293
+ return ((_a = this._formApi) !== null && _a !== void 0 ? _a : (this._formApi = new icc_form_x_api_1.IccFormXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
294
+ }
295
+ get frontendmigrationApi() {
296
+ var _a;
297
+ return ((_a = this._frontendmigrationApi) !== null && _a !== void 0 ? _a : (this._frontendmigrationApi = new icc_api_1.IccFrontendmigrationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
298
+ }
299
+ get groupApi() {
300
+ var _a;
301
+ return (_a = this._groupApi) !== null && _a !== void 0 ? _a : (this._groupApi = new icc_api_1.IccGroupApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
302
+ }
303
+ get healthcareElementApi() {
304
+ var _a, _b;
305
+ return ((_a = this._healthcareElementApi) !== null && _a !== void 0 ? _a : (this._healthcareElementApi = new icc_helement_x_api_1.IccHelementXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, (_b = this.params.encryptedFieldsConfig.healthElement) !== null && _b !== void 0 ? _b : EncryptedFieldsConfig.Defaults.healthElement, this.groupSpecificAuthenticationProvider, this.fetch)));
306
+ }
307
+ get healthcarePartyApi() {
308
+ return this.cryptoInitApis.healthcarePartyApi;
309
+ }
310
+ get icureApi() {
311
+ var _a;
312
+ return (_a = this._icureApi) !== null && _a !== void 0 ? _a : (this._icureApi = new icc_api_1.IccIcureApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
313
+ }
314
+ get icureMaintenanceTaskApi() {
315
+ return this.cryptoInitApis.icureMaintenanceTaskApi;
316
+ }
317
+ get insuranceApi() {
318
+ var _a;
319
+ return ((_a = this._insuranceApi) !== null && _a !== void 0 ? _a : (this._insuranceApi = new icc_api_1.IccInsuranceApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
320
+ }
321
+ get invoiceApi() {
322
+ var _a;
323
+ return ((_a = this._invoiceApi) !== null && _a !== void 0 ? _a : (this._invoiceApi = new icc_invoice_x_api_1.IccInvoiceXApi(this.host, this.params.headers, this.cryptoApi, this.entityReferenceApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
324
+ }
325
+ get keywordApi() {
326
+ var _a;
327
+ return ((_a = this._keywordApi) !== null && _a !== void 0 ? _a : (this._keywordApi = new icc_api_1.IccKeywordApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
328
+ }
329
+ get maintenanceTaskApi() {
330
+ return this.cryptoInitApis.maintenanceTaskApi;
331
+ }
332
+ get medexApi() {
333
+ var _a;
334
+ return (_a = this._medexApi) !== null && _a !== void 0 ? _a : (this._medexApi = new icc_api_1.IccMedexApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
335
+ }
336
+ get medicalLocationApi() {
337
+ var _a;
338
+ return ((_a = this._medicalLocationApi) !== null && _a !== void 0 ? _a : (this._medicalLocationApi = new icc_api_1.IccMedicallocationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
339
+ }
340
+ get messageApi() {
341
+ var _a;
342
+ return ((_a = this._messageApi) !== null && _a !== void 0 ? _a : (this._messageApi = new icc_message_x_api_1.IccMessageXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
343
+ }
344
+ get patientApi() {
345
+ var _a, _b;
346
+ return ((_a = this._patientApi) !== null && _a !== void 0 ? _a : (this._patientApi = new icc_patient_x_api_1.IccPatientXApi(this.host, this.params.headers, this.cryptoApi, this.contactApi, this.formApi, this.healthcareElementApi, this.invoiceApi, this.documentApi, this.healthcarePartyApi, this.classificationApi, this.dataOwnerApi, this.calendarItemApi, (_b = this.params.encryptedFieldsConfig.patient) !== null && _b !== void 0 ? _b : EncryptedFieldsConfig.Defaults.patient, this.groupSpecificAuthenticationProvider, this.fetch)));
347
+ }
348
+ get permissionApi() {
349
+ var _a;
350
+ return ((_a = this._permissionApi) !== null && _a !== void 0 ? _a : (this._permissionApi = new icc_api_1.IccPermissionApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
351
+ }
352
+ get placeApi() {
353
+ var _a;
354
+ return (_a = this._placeApi) !== null && _a !== void 0 ? _a : (this._placeApi = new icc_api_1.IccPlaceApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
355
+ }
356
+ get pubsubApi() {
357
+ var _a;
358
+ return ((_a = this._pubsubApi) !== null && _a !== void 0 ? _a : (this._pubsubApi = new icc_api_1.IccPubsubApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
359
+ }
360
+ get receiptApi() {
361
+ var _a;
362
+ return ((_a = this._receiptApi) !== null && _a !== void 0 ? _a : (this._receiptApi = new icc_receipt_x_api_1.IccReceiptXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
363
+ }
364
+ get replicationApi() {
365
+ var _a;
366
+ return ((_a = this._replicationApi) !== null && _a !== void 0 ? _a : (this._replicationApi = new icc_api_1.IccReplicationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
367
+ }
368
+ get tarificationApi() {
369
+ var _a;
370
+ return ((_a = this._tarificationApi) !== null && _a !== void 0 ? _a : (this._tarificationApi = new icc_api_1.IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch)));
371
+ }
372
+ get timetableApi() {
373
+ var _a;
374
+ return ((_a = this._timetableApi) !== null && _a !== void 0 ? _a : (this._timetableApi = new icc_time_table_x_api_1.IccTimeTableXApi(this.host, this.params.headers, this.cryptoApi, this.dataOwnerApi, this.groupSpecificAuthenticationProvider, this.fetch)));
375
+ }
376
+ get tmpApi() {
377
+ var _a;
378
+ return (_a = this._tmpApi) !== null && _a !== void 0 ? _a : (this._tmpApi = new icc_api_1.IccTmpApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
379
+ }
380
+ get userApi() {
381
+ return this.cryptoInitApis.userApi;
382
+ }
383
+ constructor(cryptoInitApis, host, groupSpecificAuthenticationProvider, fetch, grouplessUserApi, latestMatches, currentGroupInfo, params, cryptoStrategies) {
384
+ this.cryptoInitApis = cryptoInitApis;
385
+ this.host = host;
386
+ this.groupSpecificAuthenticationProvider = groupSpecificAuthenticationProvider;
387
+ this.fetch = fetch;
388
+ this.grouplessUserApi = grouplessUserApi;
389
+ this.latestMatches = latestMatches;
390
+ this.currentGroupInfo = currentGroupInfo;
391
+ this.params = params;
392
+ this.cryptoStrategies = cryptoStrategies;
393
+ this.latestGroupsRequest = Promise.resolve(latestMatches);
394
+ }
395
+ getGroupsInfo() {
396
+ return __awaiter(this, void 0, void 0, function* () {
397
+ this.latestGroupsRequest = this.grouplessUserApi.getMatchingUsers();
398
+ return { currentGroup: this.currentGroupInfo, availableGroups: yield this.latestGroupsRequest };
399
+ });
400
+ }
401
+ switchGroup(newGroupId) {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ const availableGroups = yield this.latestGroupsRequest;
404
+ const switchedProvider = yield this.groupSpecificAuthenticationProvider.switchGroup(newGroupId, availableGroups);
405
+ const cryptoInitApis = yield initialiseCryptoWithProvider(this.host, this.fetch, switchedProvider, this.params, this.cryptoStrategies, this.cryptoApi.primitives.crypto);
406
+ return new IcureApiImpl(cryptoInitApis, this.host, switchedProvider, this.fetch, this.grouplessUserApi, availableGroups, availableGroups.find((x) => x.groupId === newGroupId), this.params, this.cryptoStrategies);
407
+ });
408
+ }
409
+ }
410
+ /**
411
+ * @experimental This function still needs development and will be changed
412
+ * Build apis which do not need crypto and can be used by non-data-owner users
413
+ */
193
414
  const BasicApis = function (host, username, password, crypto = typeof window !== 'undefined' ? window.crypto : typeof self !== 'undefined' ? self.crypto : {}, fetchImpl = typeof window !== 'undefined'
194
415
  ? window.fetch
195
416
  : typeof self !== 'undefined'
@@ -208,6 +429,7 @@ const BasicApis = function (host, username, password, crypto = typeof window !==
208
429
  const agendaApi = new icc_api_1.IccAgendaApi(host, headers, authenticationProvider, fetchImpl);
209
430
  const groupApi = new icc_api_1.IccGroupApi(host, headers, authenticationProvider);
210
431
  const insuranceApi = new icc_api_1.IccInsuranceApi(host, headers, authenticationProvider, fetchImpl);
432
+ const healthcarePartyApi = new icc_hcparty_x_api_1.IccHcpartyXApi(host, headers, authenticationProvider, fetchImpl);
211
433
  return {
212
434
  authApi,
213
435
  codeApi,
@@ -217,6 +439,7 @@ const BasicApis = function (host, username, password, crypto = typeof window !==
217
439
  entityReferenceApi,
218
440
  agendaApi,
219
441
  groupApi,
442
+ healthcarePartyApi,
220
443
  };
221
444
  });
222
445
  };