@icure/api 8.6.8 → 8.6.10
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.
- package/icc-api/api/IccFormApi.d.ts +13 -3
- package/icc-api/api/IccFormApi.js +35 -6
- package/icc-api/api/IccFormApi.js.map +1 -1
- package/icc-api/model/Tarification.d.ts +7 -0
- package/icc-api/model/Tarification.js +5 -0
- package/icc-api/model/Tarification.js.map +1 -1
- package/icc-x-api/index.d.ts +3 -2
- package/icc-x-api/index.js +4 -0
- package/icc-x-api/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -224,16 +224,18 @@ export declare class IccFormApi {
|
|
|
224
224
|
* @param groupId the id of the group
|
|
225
225
|
* @param userId the id of the user
|
|
226
226
|
* @param loadLayout whether to load the layout of the form templates
|
|
227
|
+
* @param raw whether to use raw mapping for the form templates
|
|
227
228
|
*/
|
|
228
|
-
getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean): Promise<Array<FormTemplate>>;
|
|
229
|
+
getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
|
|
229
230
|
/**
|
|
230
231
|
* Returns a list of form templates for the specified specialty in a group.
|
|
231
232
|
* @summary Get form templates by specialty in a group
|
|
232
233
|
* @param groupId the id of the group
|
|
233
234
|
* @param specialityCode the specialty code to filter templates by
|
|
234
235
|
* @param loadLayout whether to load the layout of the form templates
|
|
236
|
+
* @param raw whether to use raw mapping for the form templates
|
|
235
237
|
*/
|
|
236
|
-
getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean): Promise<Array<FormTemplate>>;
|
|
238
|
+
getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>>;
|
|
237
239
|
/**
|
|
238
240
|
* Returns an instance of created form template.
|
|
239
241
|
* @summary Create a form template in a group
|
|
@@ -286,8 +288,16 @@ export declare class IccFormApi {
|
|
|
286
288
|
* @summary Get form templates in a group by their ids
|
|
287
289
|
* @param groupId the id of the group
|
|
288
290
|
* @param formTemplateIds the list of form template ids
|
|
291
|
+
* @param raw whether to use raw mapping for the form templates
|
|
289
292
|
*/
|
|
290
|
-
getFormTemplatesInGroup(groupId: string, formTemplateIds: string[]): Promise<FormTemplate[]>;
|
|
293
|
+
getFormTemplatesInGroup(groupId: string, formTemplateIds: string[], raw?: boolean): Promise<FormTemplate[]>;
|
|
294
|
+
/**
|
|
295
|
+
* @summary Get a form template in a group
|
|
296
|
+
* @param groupId the id of the group
|
|
297
|
+
* @param formTemplateId the id of the form template
|
|
298
|
+
* @param raw whether to use raw mapping for the form template
|
|
299
|
+
*/
|
|
300
|
+
getFormTemplateInGroup(groupId: string, formTemplateId: string, raw?: boolean): Promise<FormTemplate>;
|
|
291
301
|
/**
|
|
292
302
|
* @summary Delete a batch of form templates in a group
|
|
293
303
|
* @param groupId the id of the group
|
|
@@ -547,15 +547,17 @@ class IccFormApi {
|
|
|
547
547
|
* @param groupId the id of the group
|
|
548
548
|
* @param userId the id of the user
|
|
549
549
|
* @param loadLayout whether to load the layout of the form templates
|
|
550
|
+
* @param raw whether to use raw mapping for the form templates
|
|
550
551
|
*/
|
|
551
|
-
getFormTemplatesByUserInGroup(groupId, userId, loadLayout) {
|
|
552
|
+
getFormTemplatesByUserInGroup(groupId, userId, loadLayout, raw) {
|
|
552
553
|
return __awaiter(this, void 0, void 0, function* () {
|
|
553
554
|
let _body = null;
|
|
554
555
|
const _url = this.host +
|
|
555
556
|
`/form/template/inGroup/${encodeURIComponent(String(groupId))}/byUser/${encodeURIComponent(String(userId))}` +
|
|
556
557
|
'?ts=' +
|
|
557
558
|
new Date().getTime() +
|
|
558
|
-
(loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '')
|
|
559
|
+
(loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
|
|
560
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
559
561
|
let headers = yield this.headers;
|
|
560
562
|
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
561
563
|
.then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
|
|
@@ -568,15 +570,17 @@ class IccFormApi {
|
|
|
568
570
|
* @param groupId the id of the group
|
|
569
571
|
* @param specialityCode the specialty code to filter templates by
|
|
570
572
|
* @param loadLayout whether to load the layout of the form templates
|
|
573
|
+
* @param raw whether to use raw mapping for the form templates
|
|
571
574
|
*/
|
|
572
|
-
getFormTemplatesBySpecialtyInGroup(groupId, specialityCode, loadLayout) {
|
|
575
|
+
getFormTemplatesBySpecialtyInGroup(groupId, specialityCode, loadLayout, raw) {
|
|
573
576
|
return __awaiter(this, void 0, void 0, function* () {
|
|
574
577
|
let _body = null;
|
|
575
578
|
const _url = this.host +
|
|
576
579
|
`/form/template/inGroup/${encodeURIComponent(String(groupId))}/bySpecialty/${encodeURIComponent(String(specialityCode))}` +
|
|
577
580
|
'?ts=' +
|
|
578
581
|
new Date().getTime() +
|
|
579
|
-
(loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '')
|
|
582
|
+
(loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +
|
|
583
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
580
584
|
let headers = yield this.headers;
|
|
581
585
|
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
582
586
|
.then((doc) => doc.body.map((it) => new FormTemplate_1.FormTemplate(it)))
|
|
@@ -719,10 +723,15 @@ class IccFormApi {
|
|
|
719
723
|
* @summary Get form templates in a group by their ids
|
|
720
724
|
* @param groupId the id of the group
|
|
721
725
|
* @param formTemplateIds the list of form template ids
|
|
726
|
+
* @param raw whether to use raw mapping for the form templates
|
|
722
727
|
*/
|
|
723
|
-
getFormTemplatesInGroup(groupId, formTemplateIds) {
|
|
728
|
+
getFormTemplatesInGroup(groupId, formTemplateIds, raw) {
|
|
724
729
|
return __awaiter(this, void 0, void 0, function* () {
|
|
725
|
-
const _url = this.host +
|
|
730
|
+
const _url = this.host +
|
|
731
|
+
`/form/template/inGroup/${encodeURIComponent(String(groupId))}/byIds` +
|
|
732
|
+
'?ts=' +
|
|
733
|
+
new Date().getTime() +
|
|
734
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
726
735
|
let headers = yield this.headers;
|
|
727
736
|
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
728
737
|
return XHR_1.XHR.sendCommand('POST', _url, headers, { ids: formTemplateIds }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
@@ -730,6 +739,26 @@ class IccFormApi {
|
|
|
730
739
|
.catch((err) => this.handleError(err));
|
|
731
740
|
});
|
|
732
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* @summary Get a form template in a group
|
|
744
|
+
* @param groupId the id of the group
|
|
745
|
+
* @param formTemplateId the id of the form template
|
|
746
|
+
* @param raw whether to use raw mapping for the form template
|
|
747
|
+
*/
|
|
748
|
+
getFormTemplateInGroup(groupId, formTemplateId, raw) {
|
|
749
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
750
|
+
let _body = null;
|
|
751
|
+
const _url = this.host +
|
|
752
|
+
`/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}` +
|
|
753
|
+
'?ts=' +
|
|
754
|
+
new Date().getTime() +
|
|
755
|
+
(raw ? '&raw=' + encodeURIComponent(String(raw)) : '');
|
|
756
|
+
let headers = yield this.headers;
|
|
757
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
758
|
+
.then((doc) => new FormTemplate_1.FormTemplate(doc.body))
|
|
759
|
+
.catch((err) => this.handleError(err));
|
|
760
|
+
});
|
|
761
|
+
}
|
|
733
762
|
/**
|
|
734
763
|
* @summary Delete a batch of form templates in a group
|
|
735
764
|
* @param groupId the id of the group
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IccFormApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccFormApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,0DAAsD;AACtD,wCAAoC;AACpC,wDAAoD;AACpD,kDAA8C;AAC9C,kDAA8C;AAE9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAI7F,MAAa,UAAU;IAMrB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IAC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E,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,2DAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAhzBD,gCAgzBC","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 { Delegation } from '../model/Delegation'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Form } from '../model/Form'\nimport { FormTemplate } from '../model/FormTemplate'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListForm } from '../model/PaginatedListForm'\n\nexport class IccFormApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Returns an instance of created form.\n * @summary Create a form with the current user\n * @param body\n */\n async createForm(body?: Form): Promise<Form> {\n const _url = this.host + `/form` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Create a form template with the current user\n * @param body\n */\n async createFormTemplate(body?: FormTemplate): Promise<FormTemplate> {\n const _url = this.host + `/form/template` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the created forms.\n * @summary Create a batch of forms\n * @param body\n */\n async createForms(body?: Array<Form>): Promise<Array<Form>> {\n const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Delete a form template\n * @param formTemplateId\n */\n async deleteFormTemplate(formTemplateId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete forms by batch.\n *\n * @param formIds a ListOfIds containing the ids of the Forms to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers related to the successfully deleted Forms.\n */\n async deleteForms(formIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/form/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n formIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single form by id.\n *\n * @param formId the id of the document to delete.\n * @return a Promise that will resolve in the DocIdentifier of the form.\n */\n async deleteForm(formId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/form/${encodeURIComponent(formId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all form templates for current user\n * @param loadLayout\n * @param raw\n */\n async findFormTemplates(loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all form templates\n * @param specialityCode\n * @param loadLayout\n */\n async findFormTemplatesBySpeciality(specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.\n * @summary List forms found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param healthElementId\n * @param planOfActionId\n * @param formTemplateId\n * @param body\n */\n async findFormsByHCPartyPatientForeignKeysUsingPost(\n hcPartyId: string,\n healthElementId?: string,\n planOfActionId?: string,\n formTemplateId?: string,\n body?: Array<string>\n ): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +\n (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +\n (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.\n * @summary List forms found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n * @param healthElementId\n * @param planOfActionId\n * @param formTemplateId\n */\n async findFormsByHCPartyPatientForeignKeys(\n hcPartyId: string,\n secretFKeys: string,\n healthElementId?: string,\n planOfActionId?: string,\n formTemplateId?: string\n ): Promise<Array<Form>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +\n (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +\n (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +\n (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List Form ids by data owner and a set of secret foreign key. The ids will be sorted by Form openingDate, in ascending or descending\n * order according to the specified parameter value.\n *\n * @param dataOwnerId the data owner id.\n * @param secretFKeys an array of secret foreign keys.\n * @param startDate a timestamp in epoch milliseconds. If undefined, all the form ids since the beginning of time will be returned.\n * @param endDate a timestamp in epoch milliseconds. If undefined, all the form ids until the end of time will be returned.\n * @param descending whether to return the ids ordered in ascending or descending order by Form openingDate\n * @return a promise that will resolve in an Array of Form ids.\n */\n async findFormIdsByDataOwnerPatientOpeningDate(\n dataOwnerId: string,\n secretFKeys: string[],\n startDate?: number,\n endDate?: number,\n descending?: boolean\n ): Promise<string[]> {\n const _url =\n this.host +\n `/form/byDataOwnerPatientOpeningDate?ts=${new Date().getTime()}` +\n '&dataOwnerId=' +\n encodeURIComponent(dataOwnerId) +\n (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +\n (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +\n (!!descending ? `&descending=${descending}` : '')\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n const body = new ListOfIds({ ids: secretFKeys })\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 * Keys must be delimited by coma\n * @deprecated use {@link findFormsDelegationsStubsByIds} instead.\n * @summary List form stubs found By Healthcare Party and secret foreign keys.\n * @param body\n * @param hcPartyId\n */\n async findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<IcureStub>> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys/delegations` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findFormsDelegationsStubsByIds} instead.\n * @summary List form stubs found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys/delegations` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List form stubs by form ids.\n */\n async findFormsDelegationsStubsByIds(formIds: string[]): Promise<Array<IcureStub>> {\n const _url = this.host + `/form/delegations`\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formIds }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Get a list of forms by ids\n * @param formId\n * @param hcPartyId\n */\n async getChildrenForms(formId: string, hcPartyId: string): Promise<Array<Form>> {\n let _body = null\n\n const _url =\n this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a form\n * @param formId\n */\n async getForm(formId: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets the most recent form with the given logicalUuid\n * @param logicalUuid\n */\n async getFormByLogicalUuid(logicalUuid: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets the most recent form with the given uniqueId\n * @param uniqueId\n */\n async getFormByUniqueId(uniqueId: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a form template by guid\n * @param formTemplateId\n * @param raw\n */\n async getFormTemplate(formTemplateId: string, raw?: boolean): Promise<FormTemplate> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/${encodeURIComponent(String(formTemplateId))}` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated This method behavior is not intuitive.\n * If there is any form template with author=currentUser and guid={@link formTemplateGuid} returns them, regardless of\n * {@link specialityCode}.\n * Else returns all form templates with specialty.code={@link specialityCode} and guid={@link formTemplateGuid}\n * regardless of the currentUser.\n */\n async getFormTemplatesByGuid(formTemplateGuid: string, specialityCode: string, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Get a list of forms by ids\n * @param body\n */\n async getForms(body?: ListOfIds): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all forms with given logicalUuid\n * @param logicalUuid\n */\n async getFormsByLogicalUuid(logicalUuid: string): Promise<Array<Form>> {\n let _body = null\n\n const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all forms by uniqueId\n * @param uniqueId\n */\n async getFormsByUniqueId(uniqueId: string): Promise<Array<Form>> {\n let _body = null\n\n const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified form.\n * @summary Modify a form\n * @param body\n */\n async modifyForm(body?: Form): Promise<Form> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified forms.\n * @summary Modify a batch of forms\n * @param body\n */\n async modifyForms(body?: Array<Form>): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Update a form template's layout\n * @param attachment\n * @param formTemplateId\n */\n async setTemplateAttachmentMulti(attachment: ArrayBuffer, formTemplateId: string): Promise<string> {\n let _body = null\n if (attachment && !_body) {\n const parts = Array.isArray(attachment) ? (attachment as any[]) : [attachment as ArrayBuffer]\n const _blob = new Blob(parts, { type: 'application/octet-stream' })\n _body = new FormData()\n _body.append('attachment', _blob)\n }\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'multipart/form-data'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Modify a form template with the current user\n * @param body\n * @param formTemplateId\n */\n async updateFormTemplate(formTemplateId: string, body?: FormTemplate): Promise<FormTemplate> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of form templates for the specified user in a group.\n * @summary Get form templates by user in a group\n * @param groupId the id of the group\n * @param userId the id of the user\n * @param loadLayout whether to load the layout of the form templates\n */\n async getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/byUser/${encodeURIComponent(String(userId))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of form templates for the specified specialty in a group.\n * @summary Get form templates by specialty in a group\n * @param groupId the id of the group\n * @param specialityCode the specialty code to filter templates by\n * @param loadLayout whether to load the layout of the form templates\n */\n async getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/bySpecialty/${encodeURIComponent(String(specialityCode))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Create a form template in a group\n * @param groupId the id of the group\n * @param body the form template to create\n */\n async createFormTemplateInGroup(groupId: string, body?: FormTemplate): Promise<FormTemplate> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a form template in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template to delete\n * @param rev the revision of the form template to delete\n */\n async deleteFormTemplateInGroup(groupId: string, formTemplateId: string, rev: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}?rev=${encodeURIComponent(String(rev))}` +\n '&ts=' +\n new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of modified form template.\n * @summary Modify a form template in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template to modify\n * @param body the form template with updated data\n */\n async updateFormTemplateInGroup(groupId: string, formTemplateId: string, body?: FormTemplate): Promise<FormTemplate> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Update a form template's layout in a group using multipart upload\n * @param groupId the id of the group\n * @param attachment the layout data\n * @param formTemplateId the id of the form template\n */\n async setTemplateAttachmentMultiInGroup(groupId: string, attachment: ArrayBuffer, formTemplateId: string): Promise<string> {\n let _body = null\n if (attachment && !_body) {\n const parts = Array.isArray(attachment) ? (attachment as any[]) : [attachment as ArrayBuffer]\n const _blob = new Blob(parts, { type: 'application/octet-stream' })\n _body = new FormData()\n _body.append('attachment', _blob)\n }\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'multipart/form-data'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Update a form template's layout in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template\n * @param payload the layout data as binary\n */\n async setTemplateAttachmentInGroup(groupId: string, formTemplateId: string, payload: ArrayBuffer): Promise<string> {\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}/attachment` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, payload, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Create a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplates the form templates to create\n */\n async createFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, formTemplates, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Modify a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplates the form templates to modify\n */\n async modifyFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, formTemplates, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Get form templates in a group by their ids\n * @param groupId the id of the group\n * @param formTemplateIds the list of form template ids\n */\n async getFormTemplatesInGroup(groupId: string, formTemplateIds: string[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIds }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async deleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/delete/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Undelete a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async undeleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/undelete/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Purge a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async purgeFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/purge/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareForms(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Form>[]> {\n const _url = this.host + '/form/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Form>(x, Form)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareFormsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/form/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new MinimalEntityBulkShareResult(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IccFormApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccFormApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,0DAAsD;AACtD,wCAAoC;AACpC,wDAAoD;AACpD,kDAA8C;AAC9C,kDAA8C;AAE9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAI7F,MAAa,UAAU;IAMrB,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACG,UAAU,CAAC,IAAW;;Y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,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,2DAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA/0BD,gCA+0BC","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 { Delegation } from '../model/Delegation'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { Form } from '../model/Form'\nimport { FormTemplate } from '../model/FormTemplate'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListForm } from '../model/PaginatedListForm'\n\nexport class IccFormApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Returns an instance of created form.\n * @summary Create a form with the current user\n * @param body\n */\n async createForm(body?: Form): Promise<Form> {\n const _url = this.host + `/form` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Create a form template with the current user\n * @param body\n */\n async createFormTemplate(body?: FormTemplate): Promise<FormTemplate> {\n const _url = this.host + `/form/template` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the created forms.\n * @summary Create a batch of forms\n * @param body\n */\n async createForms(body?: Array<Form>): Promise<Array<Form>> {\n const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Delete a form template\n * @param formTemplateId\n */\n async deleteFormTemplate(formTemplateId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete forms by batch.\n *\n * @param formIds a ListOfIds containing the ids of the Forms to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers related to the successfully deleted Forms.\n */\n async deleteForms(formIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/form/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n formIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single form by id.\n *\n * @param formId the id of the document to delete.\n * @return a Promise that will resolve in the DocIdentifier of the form.\n */\n async deleteForm(formId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/form/${encodeURIComponent(formId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all form templates for current user\n * @param loadLayout\n * @param raw\n */\n async findFormTemplates(loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all form templates\n * @param specialityCode\n * @param loadLayout\n */\n async findFormTemplatesBySpeciality(specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/bySpecialty/${encodeURIComponent(String(specialityCode))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.\n * @summary List forms found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param healthElementId\n * @param planOfActionId\n * @param formTemplateId\n * @param body\n */\n async findFormsByHCPartyPatientForeignKeysUsingPost(\n hcPartyId: string,\n healthElementId?: string,\n planOfActionId?: string,\n formTemplateId?: string,\n body?: Array<string>\n ): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +\n (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +\n (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by commas.\n * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead.\n * @summary List forms found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n * @param healthElementId\n * @param planOfActionId\n * @param formTemplateId\n */\n async findFormsByHCPartyPatientForeignKeys(\n hcPartyId: string,\n secretFKeys: string,\n healthElementId?: string,\n planOfActionId?: string,\n formTemplateId?: string\n ): Promise<Array<Form>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '') +\n (healthElementId ? '&healthElementId=' + encodeURIComponent(String(healthElementId)) : '') +\n (planOfActionId ? '&planOfActionId=' + encodeURIComponent(String(planOfActionId)) : '') +\n (formTemplateId ? '&formTemplateId=' + encodeURIComponent(String(formTemplateId)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List Form ids by data owner and a set of secret foreign key. The ids will be sorted by Form openingDate, in ascending or descending\n * order according to the specified parameter value.\n *\n * @param dataOwnerId the data owner id.\n * @param secretFKeys an array of secret foreign keys.\n * @param startDate a timestamp in epoch milliseconds. If undefined, all the form ids since the beginning of time will be returned.\n * @param endDate a timestamp in epoch milliseconds. If undefined, all the form ids until the end of time will be returned.\n * @param descending whether to return the ids ordered in ascending or descending order by Form openingDate\n * @return a promise that will resolve in an Array of Form ids.\n */\n async findFormIdsByDataOwnerPatientOpeningDate(\n dataOwnerId: string,\n secretFKeys: string[],\n startDate?: number,\n endDate?: number,\n descending?: boolean\n ): Promise<string[]> {\n const _url =\n this.host +\n `/form/byDataOwnerPatientOpeningDate?ts=${new Date().getTime()}` +\n '&dataOwnerId=' +\n encodeURIComponent(dataOwnerId) +\n (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +\n (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +\n (!!descending ? `&descending=${descending}` : '')\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n const body = new ListOfIds({ ids: secretFKeys })\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 * Keys must be delimited by coma\n * @deprecated use {@link findFormsDelegationsStubsByIds} instead.\n * @summary List form stubs found By Healthcare Party and secret foreign keys.\n * @param body\n * @param hcPartyId\n */\n async findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<IcureStub>> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys/delegations` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findFormsDelegationsStubsByIds} instead.\n * @summary List form stubs found By Healthcare Party and secret foreign keys.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/byHcPartySecretForeignKeys/delegations` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List form stubs by form ids.\n */\n async findFormsDelegationsStubsByIds(formIds: string[]): Promise<Array<IcureStub>> {\n const _url = this.host + `/form/delegations`\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formIds }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Get a list of forms by ids\n * @param formId\n * @param hcPartyId\n */\n async getChildrenForms(formId: string, hcPartyId: string): Promise<Array<Form>> {\n let _body = null\n\n const _url =\n this.host + `/form/childrenOf/${encodeURIComponent(String(formId))}/${encodeURIComponent(String(hcPartyId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a form\n * @param formId\n */\n async getForm(formId: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/${encodeURIComponent(String(formId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets the most recent form with the given logicalUuid\n * @param logicalUuid\n */\n async getFormByLogicalUuid(logicalUuid: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets the most recent form with the given uniqueId\n * @param uniqueId\n */\n async getFormByUniqueId(uniqueId: string): Promise<Form> {\n let _body = null\n\n const _url = this.host + `/form/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a form template by guid\n * @param formTemplateId\n * @param raw\n */\n async getFormTemplate(formTemplateId: string, raw?: boolean): Promise<FormTemplate> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/${encodeURIComponent(String(formTemplateId))}` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated This method behavior is not intuitive.\n * If there is any form template with author=currentUser and guid={@link formTemplateGuid} returns them, regardless of\n * {@link specialityCode}.\n * Else returns all form templates with specialty.code={@link specialityCode} and guid={@link formTemplateGuid}\n * regardless of the currentUser.\n */\n async getFormTemplatesByGuid(formTemplateGuid: string, specialityCode: string, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/${encodeURIComponent(String(specialityCode))}/guid/${encodeURIComponent(String(formTemplateGuid))}` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Get a list of forms by ids\n * @param body\n */\n async getForms(body?: ListOfIds): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all forms with given logicalUuid\n * @param logicalUuid\n */\n async getFormsByLogicalUuid(logicalUuid: string): Promise<Array<Form>> {\n let _body = null\n\n const _url = this.host + `/form/all/logicalUuid/${encodeURIComponent(String(logicalUuid))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all forms by uniqueId\n * @param uniqueId\n */\n async getFormsByUniqueId(uniqueId: string): Promise<Array<Form>> {\n let _body = null\n\n const _url = this.host + `/form/all/uniqueId/${encodeURIComponent(String(uniqueId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified form.\n * @summary Modify a form\n * @param body\n */\n async modifyForm(body?: Form): Promise<Form> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Form(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified forms.\n * @summary Modify a batch of forms\n * @param body\n */\n async modifyForms(body?: Array<Form>): Promise<Array<Form>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Form(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Update a form template's layout\n * @param attachment\n * @param formTemplateId\n */\n async setTemplateAttachmentMulti(attachment: ArrayBuffer, formTemplateId: string): Promise<string> {\n let _body = null\n if (attachment && !_body) {\n const parts = Array.isArray(attachment) ? (attachment as any[]) : [attachment as ArrayBuffer]\n const _blob = new Blob(parts, { type: 'application/octet-stream' })\n _body = new FormData()\n _body.append('attachment', _blob)\n }\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'multipart/form-data'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Modify a form template with the current user\n * @param body\n * @param formTemplateId\n */\n async updateFormTemplate(formTemplateId: string, body?: FormTemplate): Promise<FormTemplate> {\n let _body = null\n _body = body\n\n const _url = this.host + `/form/template/${encodeURIComponent(String(formTemplateId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of form templates for the specified user in a group.\n * @summary Get form templates by user in a group\n * @param groupId the id of the group\n * @param userId the id of the user\n * @param loadLayout whether to load the layout of the form templates\n * @param raw whether to use raw mapping for the form templates\n */\n async getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/byUser/${encodeURIComponent(String(userId))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of form templates for the specified specialty in a group.\n * @summary Get form templates by specialty in a group\n * @param groupId the id of the group\n * @param specialityCode the specialty code to filter templates by\n * @param loadLayout whether to load the layout of the form templates\n * @param raw whether to use raw mapping for the form templates\n */\n async getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise<Array<FormTemplate>> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/bySpecialty/${encodeURIComponent(String(specialityCode))}` +\n '?ts=' +\n new Date().getTime() +\n (loadLayout !== undefined ? '&loadLayout=' + encodeURIComponent(String(loadLayout)) : '') +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of created form template.\n * @summary Create a form template in a group\n * @param groupId the id of the group\n * @param body the form template to create\n */\n async createFormTemplateInGroup(groupId: string, body?: FormTemplate): Promise<FormTemplate> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a form template in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template to delete\n * @param rev the revision of the form template to delete\n */\n async deleteFormTemplateInGroup(groupId: string, formTemplateId: string, rev: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}?rev=${encodeURIComponent(String(rev))}` +\n '&ts=' +\n new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns an instance of modified form template.\n * @summary Modify a form template in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template to modify\n * @param body the form template with updated data\n */\n async updateFormTemplateInGroup(groupId: string, formTemplateId: string, body?: FormTemplate): Promise<FormTemplate> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Update a form template's layout in a group using multipart upload\n * @param groupId the id of the group\n * @param attachment the layout data\n * @param formTemplateId the id of the form template\n */\n async setTemplateAttachmentMultiInGroup(groupId: string, attachment: ArrayBuffer, formTemplateId: string): Promise<string> {\n let _body = null\n if (attachment && !_body) {\n const parts = Array.isArray(attachment) ? (attachment as any[]) : [attachment as ArrayBuffer]\n const _blob = new Blob(parts, { type: 'application/octet-stream' })\n _body = new FormData()\n _body.append('attachment', _blob)\n }\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}/attachment/multipart` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'multipart/form-data'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Update a form template's layout in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template\n * @param payload the layout data as binary\n */\n async setTemplateAttachmentInGroup(groupId: string, formTemplateId: string, payload: ArrayBuffer): Promise<string> {\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}/attachment` +\n '?ts=' +\n new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/octet-stream'))\n return XHR.sendCommand('PUT', _url, headers, payload, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Create a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplates the form templates to create\n */\n async createFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, formTemplates, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Modify a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplates the form templates to modify\n */\n async modifyFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, formTemplates, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Get form templates in a group by their ids\n * @param groupId the id of the group\n * @param formTemplateIds the list of form template ids\n * @param raw whether to use raw mapping for the form templates\n */\n async getFormTemplatesInGroup(groupId: string, formTemplateIds: string[], raw?: boolean): Promise<FormTemplate[]> {\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/byIds` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIds }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Get a form template in a group\n * @param groupId the id of the group\n * @param formTemplateId the id of the form template\n * @param raw whether to use raw mapping for the form template\n */\n async getFormTemplateInGroup(groupId: string, formTemplateId: string, raw?: boolean): Promise<FormTemplate> {\n let _body = null\n\n const _url =\n this.host +\n `/form/template/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(formTemplateId))}` +\n '?ts=' +\n new Date().getTime() +\n (raw ? '&raw=' + encodeURIComponent(String(raw)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new FormTemplate(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async deleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/delete/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Undelete a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async undeleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<FormTemplate[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/undelete/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new FormTemplate(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Purge a batch of form templates in a group\n * @param groupId the id of the group\n * @param formTemplateIdsAndRevs the list of form template ids and revisions\n */\n async purgeFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise<DocIdentifier[]> {\n const _url = this.host + `/form/template/inGroup/${encodeURIComponent(String(groupId))}/purge/batch` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, { ids: formTemplateIdsAndRevs }, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareForms(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Form>[]> {\n const _url = this.host + '/form/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Form>(x, Form)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareFormsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/form/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new MinimalEntityBulkShareResult(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -27,6 +27,7 @@ export declare class Tarification {
|
|
|
27
27
|
type?: string;
|
|
28
28
|
code?: string;
|
|
29
29
|
version?: string;
|
|
30
|
+
domain?: Tarification.DomainEnum;
|
|
30
31
|
author?: string;
|
|
31
32
|
regions?: Array<string>;
|
|
32
33
|
periodicity?: Array<Periodicity>;
|
|
@@ -57,6 +58,12 @@ export declare class Tarification {
|
|
|
57
58
|
ngroup?: string;
|
|
58
59
|
}
|
|
59
60
|
export declare namespace Tarification {
|
|
61
|
+
type DomainEnum = 'ambulatory' | 'hospital' | 'both';
|
|
62
|
+
const DomainEnum: {
|
|
63
|
+
Ambulatory: DomainEnum;
|
|
64
|
+
Hospital: DomainEnum;
|
|
65
|
+
Both: DomainEnum;
|
|
66
|
+
};
|
|
60
67
|
type FlagsEnum = 'male_only' | 'female_only' | 'deptkinesitherapy' | 'deptnursing' | 'deptgeneralpractice' | 'deptsocialworker' | 'deptpsychology' | 'deptadministrative' | 'deptdietetics' | 'deptspeechtherapy' | 'deptdentistry' | 'deptoccupationaltherapy' | 'depthealthcare' | 'deptgynecology' | 'deptpediatry' | 'deptalgology' | 'deptanatomopathology' | 'deptanesthesiology' | 'deptbacteriology' | 'deptcardiacsurgery' | 'deptcardiology' | 'deptchildandadolescentpsychiatry' | 'deptdermatology' | 'deptdiabetology' | 'deptemergency' | 'deptendocrinology' | 'deptgastroenterology' | 'deptgenetics' | 'deptgeriatry' | 'depthandsurgery' | 'depthematology' | 'deptinfectiousdisease' | 'deptintensivecare' | 'deptlaboratory' | 'deptmajorburns' | 'deptmaxillofacialsurgery' | 'deptmedicine' | 'deptmolecularbiology' | 'deptneonatalogy' | 'deptnephrology' | 'deptneurology' | 'deptneurosurgery' | 'deptnte' | 'deptnuclear' | 'deptnutritiondietetics' | 'deptobstetrics' | 'deptoncology' | 'deptophtalmology' | 'deptorthopedy' | 'deptpalliativecare' | 'deptpediatricintensivecare' | 'deptpediatricsurgery' | 'deptpharmacy' | 'deptphysicalmedecine' | 'deptphysiotherapy' | 'deptplasticandreparatorysurgery' | 'deptpneumology' | 'deptpodiatry' | 'deptpsychiatry' | 'deptradiology' | 'deptradiotherapy' | 'deptrevalidation' | 'deptrheumatology' | 'deptrhumatology' | 'deptsenology' | 'deptsocialservice' | 'deptsportsmedecine' | 'deptstomatology' | 'deptsurgery' | 'deptthoracicsurgery' | 'depttoxicology' | 'depttropicalmedecine' | 'depturology' | 'deptvascularsurgery' | 'deptvisceraldigestiveabdominalsurgery' | 'depttransplantsurgery' | 'deptpercutaneous' | 'deptchildbirth';
|
|
61
68
|
const FlagsEnum: {
|
|
62
69
|
MaleOnly: FlagsEnum;
|
|
@@ -8,6 +8,11 @@ class Tarification {
|
|
|
8
8
|
}
|
|
9
9
|
exports.Tarification = Tarification;
|
|
10
10
|
(function (Tarification) {
|
|
11
|
+
Tarification.DomainEnum = {
|
|
12
|
+
Ambulatory: 'ambulatory',
|
|
13
|
+
Hospital: 'hospital',
|
|
14
|
+
Both: 'both',
|
|
15
|
+
};
|
|
11
16
|
Tarification.FlagsEnum = {
|
|
12
17
|
MaleOnly: 'male_only',
|
|
13
18
|
FemaleOnly: 'female_only',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tarification.js","sourceRoot":"","sources":["../../../icc-api/model/Tarification.ts"],"names":[],"mappings":";;;AAeA,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CAiCF;AApCD,oCAoCC;AACD,WAAiB,YAAY;IAgFd,sBAAS,GAAG;QACvB,QAAQ,EAAE,WAAwB;QAClC,UAAU,EAAE,aAA0B;QACtC,iBAAiB,EAAE,mBAAgC;QACnD,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,gBAAgB,EAAE,kBAA+B;QACjD,cAAc,EAAE,gBAA6B;QAC7C,kBAAkB,EAAE,oBAAiC;QACrD,aAAa,EAAE,eAA4B;QAC3C,iBAAiB,EAAE,mBAAgC;QACnD,aAAa,EAAE,eAA4B;QAC3C,uBAAuB,EAAE,yBAAsC;QAC/D,cAAc,EAAE,gBAA6B;QAC7C,cAAc,EAAE,gBAA6B;QAC7C,YAAY,EAAE,cAA2B;QACzC,YAAY,EAAE,cAA2B;QACzC,oBAAoB,EAAE,sBAAmC;QACzD,kBAAkB,EAAE,oBAAiC;QACrD,gBAAgB,EAAE,kBAA+B;QACjD,kBAAkB,EAAE,oBAAiC;QACrD,cAAc,EAAE,gBAA6B;QAC7C,gCAAgC,EAAE,kCAA+C;Q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EAAE,oBAAiC;QACrD,eAAe,EAAE,iBAA8B;QAC/C,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,cAAc,EAAE,gBAA6B;QAC7C,oBAAoB,EAAE,sBAAmC;QACzD,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,qCAAqC,EAAE,uCAAoD;QAC3F,qBAAqB,EAAE,uBAAoC;QAC3D,gBAAgB,EAAE,kBAA+B;QACjD,cAAc,EAAE,gBAA6B;KAC9C,CAAA;AACH,CAAC,EAhKgB,YAAY,4BAAZ,YAAY,QAgK5B","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 { LetterValue } from './LetterValue'\nimport { Periodicity } from './Periodicity'\nimport { Valorisation } from './Valorisation'\n\nexport class Tarification {\n constructor(json: JSON | any) {\n Object.assign(this as Tarification, json)\n }\n\n id?: string\n rev?: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n label?: { [key: string]: string }\n context?: string\n type?: string\n code?: string\n version?: string\n author?: string\n regions?: Array<string>\n periodicity?: Array<Periodicity>\n level?: number\n links?: Array<string>\n qualifiedLinks?: { [key: string]: Array<string> }\n flags?: Array<Tarification.FlagsEnum>\n searchTerms?: { [key: string]: Array<string> }\n data?: string\n appendices?: { [key: string]: string }\n disabled?: boolean\n valorisations?: Array<Valorisation>\n category?: { [key: string]: string }\n consultationCode?: boolean\n hasRelatedCode?: boolean\n needsPrescriber?: boolean\n relatedCodes?: Array<string>\n nGroup?: string\n letterValues?: Array<LetterValue>\n ngroup?: string\n}\nexport namespace Tarification {\n export type FlagsEnum =\n | 'male_only'\n | 'female_only'\n | 'deptkinesitherapy'\n | 'deptnursing'\n | 'deptgeneralpractice'\n | 'deptsocialworker'\n | 'deptpsychology'\n | 'deptadministrative'\n | 'deptdietetics'\n | 'deptspeechtherapy'\n | 'deptdentistry'\n | 'deptoccupationaltherapy'\n | 'depthealthcare'\n | 'deptgynecology'\n | 'deptpediatry'\n | 'deptalgology'\n | 'deptanatomopathology'\n | 'deptanesthesiology'\n | 'deptbacteriology'\n | 'deptcardiacsurgery'\n | 'deptcardiology'\n | 'deptchildandadolescentpsychiatry'\n | 'deptdermatology'\n | 'deptdiabetology'\n | 'deptemergency'\n | 'deptendocrinology'\n | 'deptgastroenterology'\n | 'deptgenetics'\n | 'deptgeriatry'\n | 'depthandsurgery'\n | 'depthematology'\n | 'deptinfectiousdisease'\n | 'deptintensivecare'\n | 'deptlaboratory'\n | 'deptmajorburns'\n | 'deptmaxillofacialsurgery'\n | 'deptmedicine'\n | 'deptmolecularbiology'\n | 'deptneonatalogy'\n | 'deptnephrology'\n | 'deptneurology'\n | 'deptneurosurgery'\n | 'deptnte'\n | 'deptnuclear'\n | 'deptnutritiondietetics'\n | 'deptobstetrics'\n | 'deptoncology'\n | 'deptophtalmology'\n | 'deptorthopedy'\n | 'deptpalliativecare'\n | 'deptpediatricintensivecare'\n | 'deptpediatricsurgery'\n | 'deptpharmacy'\n | 'deptphysicalmedecine'\n | 'deptphysiotherapy'\n | 'deptplasticandreparatorysurgery'\n | 'deptpneumology'\n | 'deptpodiatry'\n | 'deptpsychiatry'\n | 'deptradiology'\n | 'deptradiotherapy'\n | 'deptrevalidation'\n | 'deptrheumatology'\n | 'deptrhumatology'\n | 'deptsenology'\n | 'deptsocialservice'\n | 'deptsportsmedecine'\n | 'deptstomatology'\n | 'deptsurgery'\n | 'deptthoracicsurgery'\n | 'depttoxicology'\n | 'depttropicalmedecine'\n | 'depturology'\n | 'deptvascularsurgery'\n | 'deptvisceraldigestiveabdominalsurgery'\n | 'depttransplantsurgery'\n | 'deptpercutaneous'\n | 'deptchildbirth'\n export const FlagsEnum = {\n MaleOnly: 'male_only' as FlagsEnum,\n FemaleOnly: 'female_only' as FlagsEnum,\n Deptkinesitherapy: 'deptkinesitherapy' as FlagsEnum,\n Deptnursing: 'deptnursing' as FlagsEnum,\n Deptgeneralpractice: 'deptgeneralpractice' as FlagsEnum,\n Deptsocialworker: 'deptsocialworker' as FlagsEnum,\n Deptpsychology: 'deptpsychology' as FlagsEnum,\n Deptadministrative: 'deptadministrative' as FlagsEnum,\n Deptdietetics: 'deptdietetics' as FlagsEnum,\n Deptspeechtherapy: 'deptspeechtherapy' as FlagsEnum,\n Deptdentistry: 'deptdentistry' as FlagsEnum,\n Deptoccupationaltherapy: 'deptoccupationaltherapy' as FlagsEnum,\n Depthealthcare: 'depthealthcare' as FlagsEnum,\n Deptgynecology: 'deptgynecology' as FlagsEnum,\n Deptpediatry: 'deptpediatry' as FlagsEnum,\n Deptalgology: 'deptalgology' as FlagsEnum,\n Deptanatomopathology: 'deptanatomopathology' as FlagsEnum,\n Deptanesthesiology: 'deptanesthesiology' as FlagsEnum,\n Deptbacteriology: 'deptbacteriology' as FlagsEnum,\n Deptcardiacsurgery: 'deptcardiacsurgery' as FlagsEnum,\n Deptcardiology: 'deptcardiology' as FlagsEnum,\n Deptchildandadolescentpsychiatry: 'deptchildandadolescentpsychiatry' as FlagsEnum,\n Deptdermatology: 'deptdermatology' as FlagsEnum,\n Deptdiabetology: 'deptdiabetology' as FlagsEnum,\n Deptemergency: 'deptemergency' as FlagsEnum,\n Deptendocrinology: 'deptendocrinology' as FlagsEnum,\n Deptgastroenterology: 'deptgastroenterology' as FlagsEnum,\n Deptgenetics: 'deptgenetics' as FlagsEnum,\n Deptgeriatry: 'deptgeriatry' as FlagsEnum,\n Depthandsurgery: 'depthandsurgery' as FlagsEnum,\n Depthematology: 'depthematology' as FlagsEnum,\n Deptinfectiousdisease: 'deptinfectiousdisease' as FlagsEnum,\n Deptintensivecare: 'deptintensivecare' as FlagsEnum,\n Deptlaboratory: 'deptlaboratory' as FlagsEnum,\n Deptmajorburns: 'deptmajorburns' as FlagsEnum,\n Deptmaxillofacialsurgery: 'deptmaxillofacialsurgery' as FlagsEnum,\n Deptmedicine: 'deptmedicine' as FlagsEnum,\n Deptmolecularbiology: 'deptmolecularbiology' as FlagsEnum,\n Deptneonatalogy: 'deptneonatalogy' as FlagsEnum,\n Deptnephrology: 'deptnephrology' as FlagsEnum,\n Deptneurology: 'deptneurology' as FlagsEnum,\n Deptneurosurgery: 'deptneurosurgery' as FlagsEnum,\n Deptnte: 'deptnte' as FlagsEnum,\n Deptnuclear: 'deptnuclear' as FlagsEnum,\n Deptnutritiondietetics: 'deptnutritiondietetics' as FlagsEnum,\n Deptobstetrics: 'deptobstetrics' as FlagsEnum,\n Deptoncology: 'deptoncology' as FlagsEnum,\n Deptophtalmology: 'deptophtalmology' as FlagsEnum,\n Deptorthopedy: 'deptorthopedy' as FlagsEnum,\n Deptpalliativecare: 'deptpalliativecare' as FlagsEnum,\n Deptpediatricintensivecare: 'deptpediatricintensivecare' as FlagsEnum,\n Deptpediatricsurgery: 'deptpediatricsurgery' as FlagsEnum,\n Deptpharmacy: 'deptpharmacy' as FlagsEnum,\n Deptphysicalmedecine: 'deptphysicalmedecine' as FlagsEnum,\n Deptphysiotherapy: 'deptphysiotherapy' as FlagsEnum,\n Deptplasticandreparatorysurgery: 'deptplasticandreparatorysurgery' as FlagsEnum,\n Deptpneumology: 'deptpneumology' as FlagsEnum,\n Deptpodiatry: 'deptpodiatry' as FlagsEnum,\n Deptpsychiatry: 'deptpsychiatry' as FlagsEnum,\n Deptradiology: 'deptradiology' as FlagsEnum,\n Deptradiotherapy: 'deptradiotherapy' as FlagsEnum,\n Deptrevalidation: 'deptrevalidation' as FlagsEnum,\n Deptrheumatology: 'deptrheumatology' as FlagsEnum,\n Deptrhumatology: 'deptrhumatology' as FlagsEnum,\n Deptsenology: 'deptsenology' as FlagsEnum,\n Deptsocialservice: 'deptsocialservice' as FlagsEnum,\n Deptsportsmedecine: 'deptsportsmedecine' as FlagsEnum,\n Deptstomatology: 'deptstomatology' as FlagsEnum,\n Deptsurgery: 'deptsurgery' as FlagsEnum,\n Deptthoracicsurgery: 'deptthoracicsurgery' as FlagsEnum,\n Depttoxicology: 'depttoxicology' as FlagsEnum,\n Depttropicalmedecine: 'depttropicalmedecine' as FlagsEnum,\n Depturology: 'depturology' as FlagsEnum,\n Deptvascularsurgery: 'deptvascularsurgery' as FlagsEnum,\n Deptvisceraldigestiveabdominalsurgery: 'deptvisceraldigestiveabdominalsurgery' as FlagsEnum,\n Depttransplantsurgery: 'depttransplantsurgery' as FlagsEnum,\n Deptpercutaneous: 'deptpercutaneous' as FlagsEnum,\n Deptchildbirth: 'deptchildbirth' as FlagsEnum,\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Tarification.js","sourceRoot":"","sources":["../../../icc-api/model/Tarification.ts"],"names":[],"mappings":";;;AAeA,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CAkCF;AArCD,oCAqCC;AACD,WAAiB,YAAY;IAEd,uBAAU,GAAG;QACxB,UAAU,EAAE,YAA0B;QACtC,QAAQ,EAAE,UAAwB;QAClC,IAAI,EAAE,MAAoB;KAC3B,CAAA;IAgFY,sBAAS,GAAG;QACvB,QAAQ,EAAE,WAAwB;QAClC,UAAU,EAAE,aAA0B;QACtC,iBAAiB,EAAE,mBAAgC;QACnD,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,gBAAgB,EAAE,kBAA+B;QACjD,cAAc,EAAE,gBAA6B;QAC7C,kBAAkB,EAAE,oBAAiC;QACrD,aAAa,EAAE,eAA4B;QAC3C,iBAAiB,EAAE,mBAAgC;QACnD,aAAa,EAAE,eAA4B;QAC3C,uBAAuB,EAAE,yBAAsC;QAC/D,cAAc,EAAE,gBAA6B;QAC7C,cAAc,EAAE,gBAA6B;QAC7C,YAAY,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;QAC7C,aAAa,EAAE,eAA4B;QAC3C,gBAAgB,EAAE,kBAA+B;QACjD,gBAAgB,EAAE,kBAA+B;QACjD,gBAAgB,EAAE,kBAA+B;QACjD,eAAe,EAAE,iBAA8B;QAC/C,YAAY,EAAE,cAA2B;QACzC,iBAAiB,EAAE,mBAAgC;QACnD,kBAAkB,EAAE,oBAAiC;QACrD,eAAe,EAAE,iBAA8B;QAC/C,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,cAAc,EAAE,gBAA6B;QAC7C,oBAAoB,EAAE,sBAAmC;QACzD,WAAW,EAAE,aAA0B;QACvC,mBAAmB,EAAE,qBAAkC;QACvD,qCAAqC,EAAE,uCAAoD;QAC3F,qBAAqB,EAAE,uBAAoC;QAC3D,gBAAgB,EAAE,kBAA+B;QACjD,cAAc,EAAE,gBAA6B;KAC9C,CAAA;AACH,CAAC,EAtKgB,YAAY,4BAAZ,YAAY,QAsK5B","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 { LetterValue } from './LetterValue'\nimport { Periodicity } from './Periodicity'\nimport { Valorisation } from './Valorisation'\n\nexport class Tarification {\n constructor(json: JSON | any) {\n Object.assign(this as Tarification, json)\n }\n\n id?: string\n rev?: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n label?: { [key: string]: string }\n context?: string\n type?: string\n code?: string\n version?: string\n domain?: Tarification.DomainEnum\n author?: string\n regions?: Array<string>\n periodicity?: Array<Periodicity>\n level?: number\n links?: Array<string>\n qualifiedLinks?: { [key: string]: Array<string> }\n flags?: Array<Tarification.FlagsEnum>\n searchTerms?: { [key: string]: Array<string> }\n data?: string\n appendices?: { [key: string]: string }\n disabled?: boolean\n valorisations?: Array<Valorisation>\n category?: { [key: string]: string }\n consultationCode?: boolean\n hasRelatedCode?: boolean\n needsPrescriber?: boolean\n relatedCodes?: Array<string>\n nGroup?: string\n letterValues?: Array<LetterValue>\n ngroup?: string\n}\nexport namespace Tarification {\n export type DomainEnum = 'ambulatory' | 'hospital' | 'both'\n export const DomainEnum = {\n Ambulatory: 'ambulatory' as DomainEnum,\n Hospital: 'hospital' as DomainEnum,\n Both: 'both' as DomainEnum,\n }\n export type FlagsEnum =\n | 'male_only'\n | 'female_only'\n | 'deptkinesitherapy'\n | 'deptnursing'\n | 'deptgeneralpractice'\n | 'deptsocialworker'\n | 'deptpsychology'\n | 'deptadministrative'\n | 'deptdietetics'\n | 'deptspeechtherapy'\n | 'deptdentistry'\n | 'deptoccupationaltherapy'\n | 'depthealthcare'\n | 'deptgynecology'\n | 'deptpediatry'\n | 'deptalgology'\n | 'deptanatomopathology'\n | 'deptanesthesiology'\n | 'deptbacteriology'\n | 'deptcardiacsurgery'\n | 'deptcardiology'\n | 'deptchildandadolescentpsychiatry'\n | 'deptdermatology'\n | 'deptdiabetology'\n | 'deptemergency'\n | 'deptendocrinology'\n | 'deptgastroenterology'\n | 'deptgenetics'\n | 'deptgeriatry'\n | 'depthandsurgery'\n | 'depthematology'\n | 'deptinfectiousdisease'\n | 'deptintensivecare'\n | 'deptlaboratory'\n | 'deptmajorburns'\n | 'deptmaxillofacialsurgery'\n | 'deptmedicine'\n | 'deptmolecularbiology'\n | 'deptneonatalogy'\n | 'deptnephrology'\n | 'deptneurology'\n | 'deptneurosurgery'\n | 'deptnte'\n | 'deptnuclear'\n | 'deptnutritiondietetics'\n | 'deptobstetrics'\n | 'deptoncology'\n | 'deptophtalmology'\n | 'deptorthopedy'\n | 'deptpalliativecare'\n | 'deptpediatricintensivecare'\n | 'deptpediatricsurgery'\n | 'deptpharmacy'\n | 'deptphysicalmedecine'\n | 'deptphysiotherapy'\n | 'deptplasticandreparatorysurgery'\n | 'deptpneumology'\n | 'deptpodiatry'\n | 'deptpsychiatry'\n | 'deptradiology'\n | 'deptradiotherapy'\n | 'deptrevalidation'\n | 'deptrheumatology'\n | 'deptrhumatology'\n | 'deptsenology'\n | 'deptsocialservice'\n | 'deptsportsmedecine'\n | 'deptstomatology'\n | 'deptsurgery'\n | 'deptthoracicsurgery'\n | 'depttoxicology'\n | 'depttropicalmedecine'\n | 'depturology'\n | 'deptvascularsurgery'\n | 'deptvisceraldigestiveabdominalsurgery'\n | 'depttransplantsurgery'\n | 'deptpercutaneous'\n | 'deptchildbirth'\n export const FlagsEnum = {\n MaleOnly: 'male_only' as FlagsEnum,\n FemaleOnly: 'female_only' as FlagsEnum,\n Deptkinesitherapy: 'deptkinesitherapy' as FlagsEnum,\n Deptnursing: 'deptnursing' as FlagsEnum,\n Deptgeneralpractice: 'deptgeneralpractice' as FlagsEnum,\n Deptsocialworker: 'deptsocialworker' as FlagsEnum,\n Deptpsychology: 'deptpsychology' as FlagsEnum,\n Deptadministrative: 'deptadministrative' as FlagsEnum,\n Deptdietetics: 'deptdietetics' as FlagsEnum,\n Deptspeechtherapy: 'deptspeechtherapy' as FlagsEnum,\n Deptdentistry: 'deptdentistry' as FlagsEnum,\n Deptoccupationaltherapy: 'deptoccupationaltherapy' as FlagsEnum,\n Depthealthcare: 'depthealthcare' as FlagsEnum,\n Deptgynecology: 'deptgynecology' as FlagsEnum,\n Deptpediatry: 'deptpediatry' as FlagsEnum,\n Deptalgology: 'deptalgology' as FlagsEnum,\n Deptanatomopathology: 'deptanatomopathology' as FlagsEnum,\n Deptanesthesiology: 'deptanesthesiology' as FlagsEnum,\n Deptbacteriology: 'deptbacteriology' as FlagsEnum,\n Deptcardiacsurgery: 'deptcardiacsurgery' as FlagsEnum,\n Deptcardiology: 'deptcardiology' as FlagsEnum,\n Deptchildandadolescentpsychiatry: 'deptchildandadolescentpsychiatry' as FlagsEnum,\n Deptdermatology: 'deptdermatology' as FlagsEnum,\n Deptdiabetology: 'deptdiabetology' as FlagsEnum,\n Deptemergency: 'deptemergency' as FlagsEnum,\n Deptendocrinology: 'deptendocrinology' as FlagsEnum,\n Deptgastroenterology: 'deptgastroenterology' as FlagsEnum,\n Deptgenetics: 'deptgenetics' as FlagsEnum,\n Deptgeriatry: 'deptgeriatry' as FlagsEnum,\n Depthandsurgery: 'depthandsurgery' as FlagsEnum,\n Depthematology: 'depthematology' as FlagsEnum,\n Deptinfectiousdisease: 'deptinfectiousdisease' as FlagsEnum,\n Deptintensivecare: 'deptintensivecare' as FlagsEnum,\n Deptlaboratory: 'deptlaboratory' as FlagsEnum,\n Deptmajorburns: 'deptmajorburns' as FlagsEnum,\n Deptmaxillofacialsurgery: 'deptmaxillofacialsurgery' as FlagsEnum,\n Deptmedicine: 'deptmedicine' as FlagsEnum,\n Deptmolecularbiology: 'deptmolecularbiology' as FlagsEnum,\n Deptneonatalogy: 'deptneonatalogy' as FlagsEnum,\n Deptnephrology: 'deptnephrology' as FlagsEnum,\n Deptneurology: 'deptneurology' as FlagsEnum,\n Deptneurosurgery: 'deptneurosurgery' as FlagsEnum,\n Deptnte: 'deptnte' as FlagsEnum,\n Deptnuclear: 'deptnuclear' as FlagsEnum,\n Deptnutritiondietetics: 'deptnutritiondietetics' as FlagsEnum,\n Deptobstetrics: 'deptobstetrics' as FlagsEnum,\n Deptoncology: 'deptoncology' as FlagsEnum,\n Deptophtalmology: 'deptophtalmology' as FlagsEnum,\n Deptorthopedy: 'deptorthopedy' as FlagsEnum,\n Deptpalliativecare: 'deptpalliativecare' as FlagsEnum,\n Deptpediatricintensivecare: 'deptpediatricintensivecare' as FlagsEnum,\n Deptpediatricsurgery: 'deptpediatricsurgery' as FlagsEnum,\n Deptpharmacy: 'deptpharmacy' as FlagsEnum,\n Deptphysicalmedecine: 'deptphysicalmedecine' as FlagsEnum,\n Deptphysiotherapy: 'deptphysiotherapy' as FlagsEnum,\n Deptplasticandreparatorysurgery: 'deptplasticandreparatorysurgery' as FlagsEnum,\n Deptpneumology: 'deptpneumology' as FlagsEnum,\n Deptpodiatry: 'deptpodiatry' as FlagsEnum,\n Deptpsychiatry: 'deptpsychiatry' as FlagsEnum,\n Deptradiology: 'deptradiology' as FlagsEnum,\n Deptradiotherapy: 'deptradiotherapy' as FlagsEnum,\n Deptrevalidation: 'deptrevalidation' as FlagsEnum,\n Deptrheumatology: 'deptrheumatology' as FlagsEnum,\n Deptrhumatology: 'deptrhumatology' as FlagsEnum,\n Deptsenology: 'deptsenology' as FlagsEnum,\n Deptsocialservice: 'deptsocialservice' as FlagsEnum,\n Deptsportsmedecine: 'deptsportsmedecine' as FlagsEnum,\n Deptstomatology: 'deptstomatology' as FlagsEnum,\n Deptsurgery: 'deptsurgery' as FlagsEnum,\n Deptthoracicsurgery: 'deptthoracicsurgery' as FlagsEnum,\n Depttoxicology: 'depttoxicology' as FlagsEnum,\n Depttropicalmedecine: 'depttropicalmedecine' as FlagsEnum,\n Depturology: 'depturology' as FlagsEnum,\n Deptvascularsurgery: 'deptvascularsurgery' as FlagsEnum,\n Deptvisceraldigestiveabdominalsurgery: 'deptvisceraldigestiveabdominalsurgery' as FlagsEnum,\n Depttransplantsurgery: 'depttransplantsurgery' as FlagsEnum,\n Deptpercutaneous: 'deptpercutaneous' as FlagsEnum,\n Deptchildbirth: 'deptchildbirth' as FlagsEnum,\n }\n}\n"]}
|
package/icc-x-api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IccAccesslogApi, IccAgendaApi, IccAnonymousAccessApi, IccAuthApi, IccBeefactApi, IccBeresultexportApi, IccBeresultimportApi, IccBesamv2Api, IccCalendarItemTypeApi, IccClassificationTemplateApi, IccEntityrefApi, IccEntitytemplateApi, IccFrontendmigrationApi, IccGroupApi, IccIcureApi, IccInsuranceApi, IccKeywordApi, IccMedexApi, IccMedicallocationApi, IccPatientApi, IccPermissionApi, IccPlaceApi, IccPubsubApi, IccReplicationApi, IccTarificationApi, IccTimeTableApi, IccTmpApi } from '../icc-api';
|
|
1
|
+
import { IccAccesslogApi, IccAgendaApi, IccAnonymousAccessApi, IccAuthApi, IccBeefactApi, IccBeresultexportApi, IccBeresultimportApi, IccBesamv2Api, IccCalendarItemTypeApi, IccClassificationTemplateApi, IccEntityrefApi, IccEntitytemplateApi, IccFormApi, IccFrontendmigrationApi, IccGroupApi, IccIcureApi, IccInsuranceApi, IccKeywordApi, IccMedexApi, IccMedicallocationApi, IccPatientApi, IccPermissionApi, IccPlaceApi, IccPubsubApi, IccReplicationApi, IccTarificationApi, IccTimeTableApi, IccTmpApi } from '../icc-api';
|
|
2
2
|
import { IccUserXApi } from './icc-user-x-api';
|
|
3
3
|
import { IccCryptoXApi } from './icc-crypto-x-api';
|
|
4
4
|
import { IccContactXApi } from './icc-contact-x-api';
|
|
@@ -75,6 +75,7 @@ export interface BasicApis {
|
|
|
75
75
|
readonly codeApi: IccCodeXApi;
|
|
76
76
|
readonly deviceApi: IccDeviceXApi;
|
|
77
77
|
readonly entityReferenceApi: IccEntityrefApi;
|
|
78
|
+
readonly formApi: IccFormApi;
|
|
78
79
|
readonly groupApi: IccGroupApi;
|
|
79
80
|
readonly healthcarePartyApi: IccHcpartyXApi;
|
|
80
81
|
readonly icureApi: IccIcureApi;
|
|
@@ -466,7 +467,7 @@ export interface IcureBasicApi extends BasicApis {
|
|
|
466
467
|
/**
|
|
467
468
|
* Get the information on groups that the current user can access and the current group that this api instance is working on.
|
|
468
469
|
* Note that the values you will get for `availableGroups` may differ from the values you would get if you call {@link IccUserApi.getMatchingUsers}
|
|
469
|
-
* on {@link
|
|
470
|
+
* on {@link userApi}, since the latter is specialised on the specific instance of the user in `currentGroup`.
|
|
470
471
|
* - `currentGroup`: the group that this api instance is working on, or undefined if the backend environment is not multi-group.
|
|
471
472
|
* - `availableGroups`: the list of groups that the current user can access with the provided secret. Empty if the backend environment is not
|
|
472
473
|
* multi-group.
|
package/icc-x-api/index.js
CHANGED
|
@@ -580,6 +580,10 @@ class IcureBasicApiImpl {
|
|
|
580
580
|
var _a;
|
|
581
581
|
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)));
|
|
582
582
|
}
|
|
583
|
+
get formApi() {
|
|
584
|
+
var _a;
|
|
585
|
+
return (_a = this._formApi) !== null && _a !== void 0 ? _a : (this._formApi = new icc_api_1.IccFormApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch));
|
|
586
|
+
}
|
|
583
587
|
get groupApi() {
|
|
584
588
|
var _a;
|
|
585
589
|
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));
|
package/icc-x-api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCA+BmB;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,qDAA8C;AAC9C,6EAAqE;AACrE,iEAAyD;AAGzD,iEAA6D;AAC7D,6DAAyD;AACzD,0EAKsC;AACtC,gEAAiF;AACjF,kFAA8E;AAC9E,qEAAiE;AACjE,6FAAyF;AACzF,sDAAkD;AAClD,8EAA0E;AAG1E,sEAAkE;AAClE,kEAA8D;AAC9D,sEAAkE;AAClE,+EAAuE;AACvE,0CAAwD;AACxD,sEAA+F;AAC/F,8EAA0E;AAC1E,mFAA+E;AAC/E,gFAA4E;AAC5E,sFAAkF;AAClF,0EAAsE;AACtE,gFAA4E;AAC5E,gGAA4F;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CAAC,EAC1F,MAAM,CACP,CAAA;QACH,CAAC;KAAA;IA3BqB,wBAAU,aA2B/B,CAAA;AACH,CAAC,EAhCgB,aAAa,6BAAb,aAAa,QAgC7B;AAED,SAAe,iBAAiB,CAAC,OAAmB;;QAClD,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAA;QACzC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,KAAK,IAAI,YAAY,IAAI,GAAG,IAAK,GAAW,CAAC,UAAU,KAAK,GAAG;gBAAE,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;;gBACzG,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;CAAA","sourcesContent":["import {\n IccAccesslogApi,\n IccAgendaApi,\n IccAnonymousAccessApi,\n IccApplicationsettingsApi,\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 IccTimeTableApi,\n IccTmpApi,\n IccUserApi,\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 { 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 EnsembleAuthenticationProvider,\n JwtAuthenticationProvider,\n NoAuthenticationProvider,\n} from './auth/AuthenticationProvider'\nimport { CryptoPrimitives, WebCryptoPrimitives } from './crypto/CryptoPrimitives'\nimport { UserEncryptionKeysManager } from './crypto/UserEncryptionKeysManager'\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 { ensureDelegationForSelf } from './crypto/utils'\nimport { initialiseExchangeDataManagerForCurrentDataOwner } from './crypto/ExchangeDataManager'\nimport { BaseExchangeDataManager } from './crypto/BaseExchangeDataManager'\nimport { IccExchangeDataApi } from '../icc-api/api/internal/IccExchangeDataApi'\nimport { AccessControlSecretUtils } from './crypto/AccessControlSecretUtils'\nimport { SecureDelegationsEncryption } from './crypto/SecureDelegationsEncryption'\nimport { ExtendedApisUtilsImpl } from './crypto/ExtendedApisUtilsImpl'\nimport { SecureDelegationsManager } from './crypto/SecureDelegationsManager'\nimport { AccessControlKeysHeadersProvider } from './crypto/AccessControlKeysHeadersProvider'\nimport { IccExchangeDataMapApi } from '../icc-api/api/internal/IccExchangeDataMapApi'\nimport { ExchangeDataMapManager } from './crypto/ExchangeDataMapManager'\nimport { IccDeviceXApi } from './icc-device-x-api'\nimport { IccBekmehrXApi } from './icc-bekmehr-x-api'\nimport { IccDoctemplateXApi } from './icc-doctemplate-x-api'\nimport { UserGroup } from '../icc-api/model/UserGroup'\nimport { IccTopicXApi } from './icc-topic-x-api'\nimport { IccRoleApi } from '../icc-api/api/IccRoleApi'\nimport { DataOwnerTypeEnum } from '../icc-api/model/DataOwnerTypeEnum'\nimport { DelegationsDeAnonymization } from './crypto/DelegationsDeAnonymization'\nimport { JwtBridgedAuthService } from './auth/JwtBridgedAuthService'\nimport { AuthSecretProvider, SmartAuthProvider, SmartAuthProviderInitialSecret } from './auth/SmartAuthProvider'\nimport { KeyPairRecoverer } from './crypto/KeyPairRecoverer'\nimport { IccRecoveryDataApi } from '../icc-api/api/internal/IccRecoveryDataApi'\nimport { RecoveryDataEncryption } from './crypto/RecoveryDataEncryption'\nimport { IccRecoveryXApi } from './icc-recovery-x-api'\nimport { getGroupOfJwt } from './auth/JwtUtils'\nimport { SecurityMetadataDecryptor } from './crypto/SecurityMetadataDecryptor'\nimport { IccApplicationSettingsXApi } from './icc-application-settings-x-api'\n\nexport * from './icc-accesslog-x-api'\nexport * from './icc-application-settings-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-receipt-x-api'\nexport * from './icc-data-owner-x-api'\nexport * from './icc-icure-maintenance-x-api'\nexport * from './icc-maintenance-task-x-api'\nexport * from './icc-recovery-x-api'\nexport * from './utils'\n\nexport * from './crypto/RSA'\nexport * from './crypto/CryptoPrimitives'\nexport * from './crypto/ShareMetadataBehaviour'\nexport * from './auth/AuthenticationProvider'\n\nexport { AuthSecretDetails, AuthSecretType, AuthSecretProvider, SmartAuthProviderInitialSecret } from './auth/SmartAuthProvider'\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'\nexport { NativeCryptoPrimitivesBridge } from './crypto/NativeCryptoPrimitivesBridge'\nexport { hexPublicKeysWithSha1Of, hexPublicKeysWithSha256Of, getShaVersionForKey } from './crypto/utils'\nexport { SecretIdUseOption } from './crypto/SecretIdUseOption'\n\nexport interface BasicApis {\n readonly accessLogApi: IccAccesslogApi\n readonly agendaApi: IccAgendaApi\n readonly authApi: IccAuthApi\n readonly codeApi: IccCodeXApi\n readonly deviceApi: IccDeviceXApi\n readonly entityReferenceApi: IccEntityrefApi\n readonly groupApi: IccGroupApi\n readonly healthcarePartyApi: IccHcpartyXApi\n readonly icureApi: IccIcureApi\n readonly insuranceApi: IccInsuranceApi\n readonly patientApi: IccPatientApi\n readonly permissionApi: IccPermissionApi\n readonly pricingApi: IccTarificationApi\n readonly roleApi: IccRoleApi\n readonly userApi: IccUserXApi\n}\nexport interface Apis extends BasicApis {\n readonly calendarItemTypeApi: IccCalendarItemTypeApi\n readonly medicalLocationApi: IccMedicallocationApi\n readonly cryptoApi: IccCryptoXApi\n readonly accessLogApi: IccAccesslogXApi\n readonly contactApi: IccContactXApi\n readonly formApi: IccFormXApi\n readonly invoiceApi: IccInvoiceXApi\n readonly documentApi: IccDocumentXApi\n readonly healthcareElementApi: IccHelementXApi\n readonly classificationApi: IccClassificationXApi\n readonly calendarItemApi: IccCalendarItemXApi\n readonly receiptApi: IccReceiptXApi\n readonly timetableApi: IccTimeTableApi\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: IccApplicationSettingsXApi\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 readonly topicApi: IccTopicXApi\n readonly recoveryApi: IccRecoveryXApi\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 automatically create maintenance tasks for requesting access back when a new key is generated at initialisation time.\n * Note that the maintenance task will be created only towards HCP data owners: if you want to create a maintenance task also to other types of data\n * owners you should disable this and call {@link IccIcureMaintenanceXApi.createMaintenanceTasksForNewKeypair} yourself.\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.\n * This functions will be called only if a user exists in at least 2 groups, and takes in input:\n * - the information on the groups the user can access (in no specific order)\n * - if the authentication method uses JWT also the current group id (undefined otherwise)\n * The function must return the id of one of the available 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[], currentGroupId?: string) => Promise<string>\n /**\n * Temporary value to support EHR Lite and MedTech api implementations.\n *\n * Currently, all hcps are able to access encrypted data shared with any of their parents, and on initialisation the api will verify that there is a\n * key pair available for the current user and for every parent of the user. If this option is set to true, the api will not load keys for the\n * parent users.\n *\n * This \"implicit data-sharing scheme\" (each parent HCP is essentially sharing data with all its children HCPs), however, may not be ideal for all\n * use cases, and it will be changed in future to be configurable in order to make it more general.\n * @default false, equivalent to previous behaviour.\n */\n readonly disableParentKeysInitialisation?: boolean\n /**\n * If true the Api will not use some endpoints that are available only in the latest versions of kraken lite.\n * Set it to true only for connecting to kraken-lite versions < 0.1.187\n */\n readonly useLiteCompatibilityMode?: boolean\n /**\n * Allows injecting exchange data similarly to {@link IccCryptoXApi.injectExchangeData} but directly on\n * initialization.\n * When possible, this solution should be preferred as it allows minimizing proliferation of exchange data under\n * certain circumstances.\n */\n readonly injectExchangeData?: {\n details: {\n exchangeDataId: string\n accessControlSecret: ArrayBuffer\n exchangeKey: ArrayBuffer\n sharedSignatureKey: ArrayBuffer\n verified: boolean\n }[]\n reEncryptWithOwnKeys: boolean\n }\n}\n\nnamespace IcureApiOptions {\n export namespace Defaults {\n export const entryKeysFactory = new DefaultStorageEntryKeysFactory()\n export const createMaintenanceTasksOnNewKey = true\n export const headers = {}\n }\n\n export class WithDefaults implements IcureApiOptions {\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 readonly disableParentKeysInitialisation: boolean\n readonly injectExchangeData: IcureApiOptions['injectExchangeData'] | undefined\n\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 ?? {}\n this.groupSelector = custom.groupSelector ?? ((groups) => Promise.resolve(groups[0].groupId!))\n this.disableParentKeysInitialisation = custom.disableParentKeysInitialisation ?? false\n this.injectExchangeData = custom.injectExchangeData\n }\n }\n}\n\n/**\n * Specifies which fields should be encrypted for each kind of encryptable entity.\n *\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 *\n * # Encrypted fields syntax\n *\n * ## Grammar\n *\n * The grammar for each encrypted field is the following:\n * ```\n * fieldName :=\n * regex([a-zA-Z_][a-zA-Z0-9_]+)\n * encryptedField :=\n * fieldName\n * | fieldName + (\".\" | \".*.\" | \"[].\") + encryptedField\n * ```\n *\n * This grammar allows you to specify the fields to encrypt for the object and recursively for nested objects.\n * - A string containing only a single `fieldName` will encrypt the field with the given name.\n * - A string starting with `fieldName.` allows to specify the encrypted fields of a nested object. The encrypted values of the\n * fields in the nested object will be saved in the nested object.\n * - A string starting with `fieldName.*.` treats `fieldName` as a map/dictionary data structure and allows to specify the encrypted fields of the\n * values of the map. Note that the values of the map must be objects as well. The encrypted content of each map value is stored in that value.\n * - A string starting with `fieldName[].` treats `fieldName` as an array and allows to specify the encrypted fields of the values of the array.\n * Note that the values of the array must be objects as well. The encrypted content of each array element is stored in that element.\n *\n * ## Example\n *\n * Consider the following object and encryption keys:\n * ```javascript\n * const obj = {\n * a: { x: 0, y: 1 },\n * b: \"hello\",\n * c: [ { public: \"a\", secret: \"b\" }, { public: \"c\", secret: \"d\" } ],\n * d: \"ok\",\n * e: {\n * info: \"something\",\n * private: \"secret\",\n * dataMap: {\n * \"en\": {\n * a: 1,\n * b: 2\n * },\n * \"fr\": {\n * a: 3,\n * b: 4\n * }\n * }\n * }\n * }\n * const encryptedFields = [\n * \"a\",\n * \"c[].secret\",\n * \"d\",\n * \"e.private\",\n * \"e.datamap.*.a\"\n * ]\n * ```\n * If you use them with the crypt method you will get the following result:\n * ```json\n * {\n * b: \"hello\",\n * c: [\n * { public: \"a\", encryptedSelf: 'encrypted+encoded { secret: \"b\" }' },\n * { public: \"c\", encryptedSelf: 'encrypted+encoded { secret: \"d\" }' }\n * ],\n * e: {\n * info: \"something\",\n * dataMap: {\n * \"en\": { b: 2, encryptedSelf: 'encrypted+encoded { a: 1 }' },\n * \"fr\": { b: 4, encryptedSelf: 'encrypted+encoded { a: 3 }' }\n * },\n * encryptedSelf: 'encrypted+encoded { private: \"secret\" }'\n * },\n * encryptedSelf: 'encrypted+encoded { a: { x: 0, y: 1 }, d: \"ok\" }'\n * }\n * ```\n *\n * ## Shortened representation\n *\n * You can also group encrypted fields having the same prefix by concatenating to the prefix the JSON representation of an array of all the postfixes.\n * For example the following encrypted fields:\n * ```javascript\n * const encryptedFields = [\"a.b.c.d.e.f1\", \"a.b.c.d.e.f2\", \"a.b.c.d.e.f3\", \"a.b.c.d.e.f4\"]\n * ```\n * can be shortened to\n * ```javascript\n * const encryptedFields = ['a.b.c.d.e.[\"f1\",\"f2\",\"f3\",\"f4\"]'] // Note the use of single quotes to avoid escaping the double quotes\n * ```\n * If you use the shortened representation you may need to escape nested json representations. In that case the use of `JSON.stringify` is\n * recommended.\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 /**\n * Fields to encrypt for entities of type {@link Contact}, excluding `services`. You can specify which fields of `services` should be encrypted\n * using {@link service}.\n * @default ['descr'] // encryption of `services` is managed through {@link service}\n */\n readonly contact?: string[]\n /**\n * Fields to encrypt for entities of type {@link Service}. Note that encryption of the `content` field and recursively contained `Services` through\n * `content.compoundValue` is automatically managed by the sdk, and you are not allowed to modify it.\n *\n * Note: any non-empty values for this field will break bi-directional data compatibility between v7 and previous: Contacts created with\n * v7 will not be read properly by previous versions. If you want\n * @default ['notes[].markdown'] // encryption of `content` is managed in a special way\n */\n readonly service?: string[]\n /**\n * Fields to encrypt for entities of type {@link HealthElement}\n * @default ['descr', 'note', 'notes[].markdown']\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', 'notes[].markdown']\n */\n readonly patient?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Message}\n * @default []\n */\n readonly message?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Topic}\n * @default ['description']\n */\n readonly topic?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Document}\n * @default []\n */\n readonly document?: string[]\n}\n\nexport namespace EncryptedFieldsConfig {\n export const Defaults = {\n accessLog: ['detail', 'objectId'],\n calendarItem: ['details', 'title', 'patientId'],\n contact: ['descr', 'notes[].markdown'],\n service: ['notes[].markdown'],\n healthElement: ['descr', 'note', 'notes[].markdown'],\n maintenanceTask: ['properties'],\n patient: ['note', 'notes[].markdown'],\n message: [],\n document: [],\n topic: ['description', 'linkedServices', 'linkedHealthElements'],\n }\n}\n\n/**\n * Details for the authentication of a user\n */\nexport type AuthenticationDetails =\n | {\n username: string\n password: string\n thirdPartyTokens?: { [thirdParty: string]: string }\n }\n | {\n icureTokens: { token: string; refreshToken: string }\n credentials?: { username: string; password: string }\n }\n | {\n thirdPartyTokens: { [thirdParty: string]: string }\n }\n | SmartAuthenticationDetails\n\n/**\n * Allows to perform authentication through an {@link AuthSecretProvider}.\n *\n * The iCure SDK can authenticate to the backend using different kinds of secrets, such as passwords, long-lived authentication tokens, and\n * short-lived authentication tokens generated through the message gateway. iCure associates to each kind of secret a certain security level, and for\n * some sensitive operations, depending on the configurations of the user and his group, some operations may require a secret of a certain security\n * level. For example, with the default configurations, in order to change his own email the user can't have logged in with a long-lived token, but he\n * needs to provide his current password or a short-lived token.\n *\n * By using this authentication option, the iCure SDK will automatically request and cache the secret from the {@link AuthSecretProvider} only when\n * needed, which should help to minimise the interaction with the user.\n *\n * Another advantage of using this authentication option over others is that in case all the cached tokens and secrets were to expire while performing\n * a request, instead of having the request fail the SDK will ask for a new secret from the {@link SmartAuthProvider} and the request will\n * automatically be retried with the new secret.\n *\n * You must provide the following information:\n * - secretProvider: the secret provider to use for authentication. Will handle interaction with the gui.\n *\n * You can also provide the following optional information, which may allow to reduce the requests for secrets initially:\n * - username: any kind of value that can identify the user (userId, groupId/userId, username, email, ...). More generic identifiers, valid\n * on multiple groups, allow for simpler group switching by using {@link IcureApi.switchGroup}.\n * This value, however, is mandatory if you want to use password or icure tokens.\n * - initialSecret: an initial secret (password, token, ...) that will be used to get new authentication tokens as needed. If it is expired it will be ignored.\n * - initialAuthToken: an initial authentication token used on each request. If it is expired it will be ignored.\n * - initialRefreshToken: an initial refresh token used to get new authentication tokens as needed. If it is expired it will be ignored.\n */\nexport type SmartAuthenticationDetails = {\n username?: string\n secretProvider: AuthSecretProvider\n initialSecret?: SmartAuthProviderInitialSecret\n initialAuthToken?: string\n initialRefreshToken?: 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 * - `currentGroup`: the group that this api instance is working on, or undefined if the backend environment is not multi-group.\n * - `availableGroups`: the list of groups that the current user can access with the provided secret. Empty if the backend environment is not\n * multi-group.\n */\n getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; 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}\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 | CryptoPrimitives = 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 authenticationProviderInfo = await initialiseAuthProviderWithGroupSelector(\n host,\n authenticationOptions,\n params.headers,\n fetchImpl,\n params.groupSelector\n )\n const cryptoInitInfo = await initialiseCryptoWithProvider(\n host,\n fetchImpl,\n authenticationProviderInfo.groupSpecificAuthenticationProvider,\n params,\n cryptoStrategies,\n crypto,\n options.useLiteCompatibilityMode ?? false\n )\n return new IcureApiImpl(\n cryptoInitInfo,\n host,\n authenticationProviderInfo.groupSpecificAuthenticationProvider,\n fetch,\n authenticationProviderInfo.grouplessUserApi,\n authenticationProviderInfo.matches,\n authenticationProviderInfo.matches.find((match) => match.groupId === authenticationProviderInfo.chosenGroupId),\n params,\n cryptoStrategies,\n options.useLiteCompatibilityMode ?? false\n )\n }\n}\n\nasync function getAuthenticationProvider(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n headers: { [headerName: string]: string },\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n) {\n let authenticationProvider: AuthenticationProvider\n if ('getIcureTokens' in authenticationOptions && 'switchGroup' in authenticationOptions && 'getAuthService' in authenticationOptions) {\n authenticationProvider = authenticationOptions\n } else if ('icureTokens' in authenticationOptions && !!authenticationOptions.icureTokens) {\n authenticationProvider = new JwtAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions?.credentials?.username,\n authenticationOptions?.credentials?.password,\n undefined,\n authenticationOptions.icureTokens\n )\n } else if (\n 'username' in authenticationOptions &&\n 'password' in authenticationOptions &&\n !!authenticationOptions.username &&\n !!authenticationOptions.password\n ) {\n authenticationProvider = new EnsembleAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.password,\n 3600,\n undefined,\n undefined,\n authenticationOptions.thirdPartyTokens\n )\n } else if ('thirdPartyTokens' in authenticationOptions && !!authenticationOptions.thirdPartyTokens) {\n authenticationProvider = new JwtAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n undefined,\n undefined,\n new JwtBridgedAuthService(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n undefined,\n undefined,\n authenticationOptions.thirdPartyTokens,\n undefined\n )\n )\n } else if ('secretProvider' in authenticationOptions) {\n authenticationProvider = await SmartAuthProvider.initialise(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.secretProvider,\n {\n initialSecret: authenticationOptions.initialSecret,\n initialAuthToken: authenticationOptions.initialAuthToken,\n initialRefreshToken: authenticationOptions.initialRefreshToken,\n }\n )\n } else {\n throw new Error('Invalid authentication options provided')\n }\n return authenticationProvider\n}\n\nasync function initialiseAuthProviderWithGroupSelector(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n headers: { [headerName: string]: string },\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n groupSelector: ((availableGroupsInfo: UserGroup[], currentGroupId?: string) => Promise<string>) | undefined\n) {\n let grouplessAuthenticationProvider = await getAuthenticationProvider(host, authenticationOptions, headers, fetchImpl)\n const grouplessUserApi = new IccUserApi(host, headers, grouplessAuthenticationProvider, fetchImpl)\n const matches = await getMatchesOrEmpty(grouplessUserApi)\n const tokens = await grouplessAuthenticationProvider.getIcureTokens()\n const currentGroupId = tokens ? getGroupOfJwt(tokens.token) : undefined\n const chosenGroupId = matches.length > 1 && !!groupSelector ? await groupSelector(matches, currentGroupId) : 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 /*\n * If the auth provider is initialized with credentials and jwt not switching the group will may cause issues:\n * 1. The default group for the user is group A\n * 2. The user logs in to group B -> the provider is switched\n * 3. The user refreshes the page -> a new instance of the api with initial iCure tokens is created\n * 4. The refresh token is expired / the user needs to do a high security operation -> a new login is done .If we did\n * not switch the provider here the login would default to group A, potentially causing a lot of issues...\n */\n const groupSpecificAuthenticationProvider = !!chosenGroupId\n ? await grouplessAuthenticationProvider.switchGroup(chosenGroupId, matches)\n : grouplessAuthenticationProvider\n return {\n groupSpecificAuthenticationProvider,\n // No need for a groupless user api on a group-specific smart auth provider\n grouplessUserApi: groupSpecificAuthenticationProvider instanceof SmartAuthProvider ? undefined : grouplessUserApi,\n matches,\n chosenGroupId,\n }\n}\n\n// Apis which are used during crypto api initialisation, to avoid re-instantiating them later\ntype CryptoInitialisationInfo = {\n cryptoApi: IccCryptoXApi\n healthcarePartyApi: IccHcpartyXApi\n deviceApi: IccDeviceXApi\n // no patient api since it is base\n dataOwnerApi: IccDataOwnerXApi\n userApi: IccUserXApi\n icureMaintenanceTaskApi: IccIcureMaintenanceXApi\n maintenanceTaskApi: IccMaintenanceTaskXApi\n headers: { [headerName: string]: string }\n dataOwnerRequiresAnonymousDelegation: boolean\n recoveryApi: IccRecoveryXApi\n}\n\nconst REQUEST_AUTOFIX_ANONYMITY_HEADER = 'Icure-Request-Autofix-Anonymity'\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 | CryptoPrimitives,\n useLiteCompatibilityMode: boolean\n): Promise<CryptoInitialisationInfo> {\n const initialDataOwnerStub = await new IccDataOwnerXApi(\n host,\n params.headers,\n groupSpecificAuthenticationProvider,\n fetchImpl\n ).getCurrentDataOwnerStub()\n const dataOwnerRequiresAnonymousDelegation = cryptoStrategies.dataOwnerRequiresAnonymousDelegation(initialDataOwnerStub)\n let updatedHeaders = params.headers\n if (!Object.keys(updatedHeaders).includes(REQUEST_AUTOFIX_ANONYMITY_HEADER)) {\n if (initialDataOwnerStub.type == DataOwnerTypeEnum.Patient || initialDataOwnerStub.type == DataOwnerTypeEnum.Device) {\n if (!dataOwnerRequiresAnonymousDelegation) {\n updatedHeaders = { ...updatedHeaders, [REQUEST_AUTOFIX_ANONYMITY_HEADER]: 'false' }\n }\n } else {\n if (dataOwnerRequiresAnonymousDelegation) {\n updatedHeaders = { ...updatedHeaders, [REQUEST_AUTOFIX_ANONYMITY_HEADER]: 'true' }\n }\n }\n }\n\n const authApi = new IccAuthApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const userApi = new IccUserXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, authApi, fetchImpl)\n const healthcarePartyApi = new IccHcpartyXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, authApi, fetchImpl)\n const deviceApi = new IccDeviceXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, userApi, authApi, fetchImpl)\n const basePatientApi = new IccPatientApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const dataOwnerApi = new IccDataOwnerXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const exchangeDataApi = new IccExchangeDataApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const baseRecoveryDataApi = new IccRecoveryDataApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n // Crypto initialisation\n const icureStorage = new IcureStorageFacade(params.keyStorage, params.storage, params.entryKeysFactory)\n const cryptoPrimitives = 'AES' in crypto && 'RSA' in crypto && 'HMAC' in crypto ? crypto : new WebCryptoPrimitives(crypto)\n const baseExchangeKeysManager = new BaseExchangeKeysManager(cryptoPrimitives, dataOwnerApi, healthcarePartyApi, basePatientApi, deviceApi)\n const baseExchangeDataManager = new BaseExchangeDataManager(\n exchangeDataApi,\n dataOwnerApi,\n cryptoPrimitives,\n dataOwnerRequiresAnonymousDelegation,\n useLiteCompatibilityMode\n )\n const keyRecovery = new KeyRecovery(cryptoPrimitives, dataOwnerApi, baseExchangeKeysManager, baseExchangeDataManager)\n const recoveryDataEncryption = new RecoveryDataEncryption(cryptoPrimitives, baseRecoveryDataApi)\n const keyPairRecoverer = new KeyPairRecoverer(recoveryDataEncryption)\n const userEncryptionKeysManager = new UserEncryptionKeysManager(\n cryptoPrimitives,\n dataOwnerApi,\n icureStorage,\n keyRecovery,\n cryptoStrategies,\n !params.disableParentKeysInitialisation,\n keyPairRecoverer,\n dataOwnerRequiresAnonymousDelegation\n )\n const newKey = await userEncryptionKeysManager.initialiseKeys()\n await new TransferKeysManager(cryptoPrimitives, baseExchangeDataManager, dataOwnerApi, userEncryptionKeysManager, icureStorage).updateTransferKeys(\n await dataOwnerApi.getCurrentDataOwnerStub()\n )\n // TODO customise cache size?\n const exchangeKeysManager = new ExchangeKeysManager(userEncryptionKeysManager, baseExchangeKeysManager, dataOwnerApi)\n const accessControlSecretUtils = new AccessControlSecretUtils(cryptoPrimitives)\n const exchangeDataManager = await initialiseExchangeDataManagerForCurrentDataOwner(\n baseExchangeDataManager,\n userEncryptionKeysManager,\n accessControlSecretUtils,\n cryptoStrategies,\n dataOwnerApi,\n cryptoPrimitives,\n !params.disableParentKeysInitialisation\n )\n if (params.injectExchangeData != null && params.injectExchangeData.details.length > 0) {\n await exchangeDataManager.injectDecryptedExchangeData(params.injectExchangeData.details, params.injectExchangeData.reEncryptWithOwnKeys)\n }\n const exchangeDataMapManager = new ExchangeDataMapManager(\n new IccExchangeDataMapApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n )\n const secureDelegationsEncryption = new SecureDelegationsEncryption(userEncryptionKeysManager, cryptoPrimitives)\n const secureDelegationsSecurityMetadataEncryption = new SecurityMetadataDecryptor(\n exchangeKeysManager,\n cryptoPrimitives,\n exchangeDataManager,\n exchangeDataMapManager,\n secureDelegationsEncryption,\n dataOwnerApi\n )\n const xApiUtils = new ExtendedApisUtilsImpl(\n cryptoPrimitives,\n dataOwnerApi,\n secureDelegationsSecurityMetadataEncryption,\n new SecureDelegationsManager(\n exchangeDataManager,\n exchangeDataMapManager,\n secureDelegationsEncryption,\n accessControlSecretUtils,\n userEncryptionKeysManager,\n cryptoPrimitives,\n dataOwnerApi,\n cryptoStrategies,\n dataOwnerRequiresAnonymousDelegation\n ),\n userApi,\n !params.disableParentKeysInitialisation\n )\n const shamirManager = new ShamirKeysManager(cryptoPrimitives, dataOwnerApi, userEncryptionKeysManager, exchangeDataManager)\n if (userEncryptionKeysManager.getSelfVerifiedKeys().length > 0) {\n await ensureDelegationForSelf(dataOwnerApi, xApiUtils, basePatientApi, cryptoPrimitives)\n }\n const accessControlKeysHeadersProvider = new AccessControlKeysHeadersProvider(exchangeDataManager)\n const delegationsDeAnonymisation = new DelegationsDeAnonymization(\n dataOwnerApi,\n secureDelegationsSecurityMetadataEncryption,\n xApiUtils,\n cryptoPrimitives,\n accessControlSecretUtils,\n host,\n updatedHeaders,\n groupSpecificAuthenticationProvider,\n fetchImpl,\n accessControlKeysHeadersProvider\n )\n const cryptoApi = new IccCryptoXApi(\n exchangeKeysManager,\n cryptoPrimitives,\n userEncryptionKeysManager,\n dataOwnerApi,\n xApiUtils,\n shamirManager,\n params.storage,\n params.keyStorage,\n exchangeDataManager,\n accessControlKeysHeadersProvider,\n delegationsDeAnonymisation\n )\n const maintenanceTaskApi = new IccMaintenanceTaskXApi(\n host,\n updatedHeaders,\n cryptoApi,\n healthcarePartyApi,\n dataOwnerApi,\n userApi,\n authApi,\n !dataOwnerRequiresAnonymousDelegation,\n params.encryptedFieldsConfig.maintenanceTask ?? EncryptedFieldsConfig.Defaults.maintenanceTask,\n groupSpecificAuthenticationProvider,\n fetchImpl\n )\n const icureMaintenanceTaskApi = new IccIcureMaintenanceXApi(cryptoApi, maintenanceTaskApi, dataOwnerApi, exchangeDataApi)\n\n if (newKey && params.createMaintenanceTasksOnNewKey) {\n await icureMaintenanceTaskApi.createMaintenanceTasksForNewKeypair(await userApi.getCurrentUser(), newKey.newKeyPair)\n }\n return {\n cryptoApi,\n userApi,\n healthcarePartyApi,\n deviceApi,\n maintenanceTaskApi,\n dataOwnerApi,\n icureMaintenanceTaskApi,\n headers: updatedHeaders,\n dataOwnerRequiresAnonymousDelegation,\n recoveryApi: new IccRecoveryXApi(\n baseRecoveryDataApi,\n recoveryDataEncryption,\n userEncryptionKeysManager,\n dataOwnerApi,\n cryptoPrimitives,\n exchangeDataManager\n ),\n }\n}\n\nclass IcureApiImpl implements IcureApi {\n private latestGroupsRequest: Promise<UserGroup[]>\n\n constructor(\n private readonly cryptoInitInfos: CryptoInitialisationInfo,\n private readonly host: string,\n private readonly groupSpecificAuthenticationProvider: AuthenticationProvider,\n private readonly fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n private readonly grouplessUserApi: IccUserApi | undefined,\n latestMatches: UserGroup[],\n private readonly currentGroupInfo: UserGroup | undefined,\n private readonly params: IcureApiOptions.WithDefaults,\n private readonly cryptoStrategies: CryptoStrategies,\n private readonly useLiteCompatibilityMode: boolean\n ) {\n this.latestGroupsRequest = Promise.resolve(latestMatches)\n }\n\n private _pricingApi: IccTarificationApi | undefined\n\n get pricingApi(): IccTarificationApi {\n return (\n this._pricingApi ??\n (this._pricingApi = new IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _authApi: IccAuthApi | undefined\n\n get recoveryApi(): IccRecoveryXApi {\n return this.cryptoInitInfos.recoveryApi\n }\n\n get authApi(): IccAuthApi {\n return (\n this._authApi ?? (this._authApi = new IccAuthApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _codeApi: IccCodeXApi | undefined\n\n get codeApi(): IccCodeXApi {\n return (\n this._codeApi ??\n (this._codeApi = new IccCodeXApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _calendarItemTypeApi: IccCalendarItemTypeApi | undefined\n\n get calendarItemTypeApi(): IccCalendarItemTypeApi {\n return (\n this._calendarItemTypeApi ??\n (this._calendarItemTypeApi = new IccCalendarItemTypeApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _medicalLocationApi: IccMedicallocationApi | undefined\n\n get medicalLocationApi(): IccMedicallocationApi {\n return (\n this._medicalLocationApi ??\n (this._medicalLocationApi = new IccMedicallocationApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _roleApi: IccRoleApi | undefined\n\n get roleApi(): IccRoleApi {\n return this._roleApi ?? (this._roleApi = new IccRoleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n\n private _entityReferenceApi: IccEntityrefApi | undefined\n\n get entityReferenceApi(): IccEntityrefApi {\n return (\n this._entityReferenceApi ??\n (this._entityReferenceApi = new IccEntityrefApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _permissionApi: IccPermissionApi | undefined\n\n get permissionApi(): IccPermissionApi {\n return (\n this._permissionApi ??\n (this._permissionApi = new IccPermissionApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _accessLogApi: IccAccesslogXApi | undefined\n\n get accessLogApi(): IccAccesslogXApi {\n return (\n this._accessLogApi ??\n (this._accessLogApi = new IccAccesslogXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.accessLog ?? EncryptedFieldsConfig.Defaults.accessLog,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _agendaApi: IccAgendaApi | undefined\n\n get agendaApi(): IccAgendaApi {\n return (\n this._agendaApi ??\n (this._agendaApi = new IccAgendaApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _contactApi: IccContactXApi | undefined\n\n get contactApi(): IccContactXApi {\n return (\n this._contactApi ??\n (this._contactApi = new IccContactXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch,\n this.params.encryptedFieldsConfig.contact ?? EncryptedFieldsConfig.Defaults.contact,\n this.params.encryptedFieldsConfig.service ?? EncryptedFieldsConfig.Defaults.service\n ))\n )\n }\n\n private _formApi: IccFormXApi | undefined\n\n get formApi(): IccFormXApi {\n return (\n this._formApi ??\n (this._formApi = new IccFormXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _groupApi: IccGroupApi | undefined\n\n get groupApi(): IccGroupApi {\n return (\n this._groupApi ??\n (this._groupApi = new IccGroupApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _invoiceApi: IccInvoiceXApi | undefined\n\n get invoiceApi(): IccInvoiceXApi {\n return (\n this._invoiceApi ??\n (this._invoiceApi = new IccInvoiceXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.entityReferenceApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _insuranceApi: IccInsuranceApi | undefined\n\n get insuranceApi(): IccInsuranceApi {\n return (\n this._insuranceApi ??\n (this._insuranceApi = new IccInsuranceApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _documentApi: IccDocumentXApi | undefined\n\n get documentApi(): IccDocumentXApi {\n return (\n this._documentApi ??\n (this._documentApi = new IccDocumentXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.authApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.document ?? EncryptedFieldsConfig.Defaults.document,\n this.fetch\n ))\n )\n }\n\n private _healthcareElementApi: IccHelementXApi | undefined\n\n get healthcareElementApi(): IccHelementXApi {\n return (\n this._healthcareElementApi ??\n (this._healthcareElementApi = new IccHelementXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.healthElement ?? EncryptedFieldsConfig.Defaults.healthElement,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _classificationApi: IccClassificationXApi | undefined\n\n get classificationApi(): IccClassificationXApi {\n return (\n this._classificationApi ??\n (this._classificationApi = new IccClassificationXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _calendarItemApi: IccCalendarItemXApi | undefined\n\n get calendarItemApi(): IccCalendarItemXApi {\n return (\n this._calendarItemApi ??\n (this._calendarItemApi = new IccCalendarItemXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.calendarItem ?? EncryptedFieldsConfig.Defaults.calendarItem,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _receiptApi: IccReceiptXApi | undefined\n\n get receiptApi(): IccReceiptXApi {\n return (\n this._receiptApi ??\n (this._receiptApi = new IccReceiptXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _timetableApi: IccTimeTableApi | undefined\n\n get timetableApi(): IccTimeTableApi {\n return (\n this._timetableApi ??\n (this._timetableApi = new IccTimeTableApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _patientApi: IccPatientXApi | undefined\n\n get patientApi(): IccPatientXApi {\n return (\n this._patientApi ??\n (this._patientApi = new IccPatientXApi(\n this.host,\n this.cryptoInitInfos.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.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.patient ?? EncryptedFieldsConfig.Defaults.patient,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _messageApi: IccMessageXApi | undefined\n\n get messageApi(): IccMessageXApi {\n return (\n this._messageApi ??\n (this._messageApi = new IccMessageXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.message ?? EncryptedFieldsConfig.Defaults.message,\n this.fetch\n ))\n )\n }\n\n private _topicApi: IccTopicXApi | undefined\n\n get topicApi(): IccTopicXApi {\n return (\n this._topicApi ??\n (this._topicApi = new IccTopicXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.topic ?? EncryptedFieldsConfig.Defaults.topic,\n this.fetch\n ))\n )\n }\n\n private _anonymousAccessApi: IccAnonymousAccessApi | undefined\n\n get anonymousAccessApi(): IccAnonymousAccessApi {\n return (\n this._anonymousAccessApi ??\n (this._anonymousAccessApi = new IccAnonymousAccessApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _applicationSettingsApi: IccApplicationSettingsXApi | undefined\n\n get applicationSettingsApi(): IccApplicationSettingsXApi {\n return (\n this._applicationSettingsApi ??\n (this._applicationSettingsApi = new IccApplicationSettingsXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoInitInfos.cryptoApi,\n this.cryptoInitInfos.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n ['encryptedSettings'],\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _bekmehrApi: IccBekmehrXApi | undefined\n\n get bekmehrApi(): IccBekmehrXApi {\n return (\n this._bekmehrApi ??\n (this._bekmehrApi = new IccBekmehrXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.contactApi,\n this.healthcareElementApi,\n this.documentApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _beefactApi: IccBeefactApi | undefined\n\n get beefactApi(): IccBeefactApi {\n return (\n this._beefactApi ??\n (this._beefactApi = new IccBeefactApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _beresultexportApi: IccBeresultexportApi | undefined\n\n get beresultexportApi(): IccBeresultexportApi {\n return (\n this._beresultexportApi ??\n (this._beresultexportApi = new IccBeresultexportApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _beresultimportApi: IccBeresultimportApi | undefined\n\n get beresultimportApi(): IccBeresultimportApi {\n return (\n this._beresultimportApi ??\n (this._beresultimportApi = new IccBeresultimportApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _besamv2Api: IccBesamv2Api | undefined\n\n get besamv2Api(): IccBesamv2Api {\n return (\n this._besamv2Api ??\n (this._besamv2Api = new IccBesamv2Api(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _classificationTemplateApi: IccClassificationTemplateApi | undefined\n\n get classificationTemplateApi(): IccClassificationTemplateApi {\n return (\n this._classificationTemplateApi ??\n (this._classificationTemplateApi = new IccClassificationTemplateApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _doctemplateApi: IccDoctemplateXApi | undefined\n\n get doctemplateApi(): IccDoctemplateXApi {\n return (\n this._doctemplateApi ??\n (this._doctemplateApi = new IccDoctemplateXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _entitytemplateApi: IccEntitytemplateApi | undefined\n\n get entitytemplateApi(): IccEntitytemplateApi {\n return (\n this._entitytemplateApi ??\n (this._entitytemplateApi = new IccEntitytemplateApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _frontendmigrationApi: IccFrontendmigrationApi | undefined\n\n get frontendmigrationApi(): IccFrontendmigrationApi {\n return (\n this._frontendmigrationApi ??\n (this._frontendmigrationApi = new IccFrontendmigrationApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _icureApi: IccIcureApi | undefined\n\n get icureApi(): IccIcureApi {\n return (\n this._icureApi ??\n (this._icureApi = new IccIcureApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _keywordApi: IccKeywordApi | undefined\n\n get keywordApi(): IccKeywordApi {\n return (\n this._keywordApi ??\n (this._keywordApi = new IccKeywordApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _medexApi: IccMedexApi | undefined\n\n get medexApi(): IccMedexApi {\n return (\n this._medexApi ??\n (this._medexApi = new IccMedexApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _placeApi: IccPlaceApi | undefined\n\n get placeApi(): IccPlaceApi {\n return (\n this._placeApi ??\n (this._placeApi = new IccPlaceApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _pubsubApi: IccPubsubApi | undefined\n\n get pubsubApi(): IccPubsubApi {\n return (\n this._pubsubApi ??\n (this._pubsubApi = new IccPubsubApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _replicationApi: IccReplicationApi | undefined\n\n get replicationApi(): IccReplicationApi {\n return (\n this._replicationApi ??\n (this._replicationApi = new IccReplicationApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _tarificationApi: IccTarificationApi | undefined\n\n get tarificationApi(): IccTarificationApi {\n return (\n this._tarificationApi ??\n (this._tarificationApi = new IccTarificationApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _tmpApi: IccTmpApi | undefined\n\n get tmpApi(): IccTmpApi {\n return (\n this._tmpApi ?? (this._tmpApi = new IccTmpApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get cryptoApi(): IccCryptoXApi {\n return this.cryptoInitInfos.cryptoApi\n }\n\n get dataOwnerApi(): IccDataOwnerXApi {\n return this.cryptoInitInfos.dataOwnerApi\n }\n\n get deviceApi(): IccDeviceXApi {\n return this.cryptoInitInfos.deviceApi\n }\n\n get healthcarePartyApi(): IccHcpartyXApi {\n return this.cryptoInitInfos.healthcarePartyApi\n }\n\n get icureMaintenanceTaskApi(): IccIcureMaintenanceXApi {\n return this.cryptoInitInfos.icureMaintenanceTaskApi\n }\n\n get maintenanceTaskApi(): IccMaintenanceTaskXApi {\n return this.cryptoInitInfos.maintenanceTaskApi\n }\n\n get userApi(): IccUserXApi {\n return this.cryptoInitInfos.userApi\n }\n\n async getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; availableGroups: UserGroup[] }> {\n this.latestGroupsRequest = (this.grouplessUserApi ?? this.userApi).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 cryptoInitInfos = await initialiseCryptoWithProvider(\n this.host,\n this.fetch,\n switchedProvider,\n this.params,\n this.cryptoStrategies,\n this.cryptoApi.primitives,\n this.useLiteCompatibilityMode\n )\n return new IcureApiImpl(\n cryptoInitInfos,\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 this.useLiteCompatibilityMode\n )\n }\n}\n\nexport interface IcureBasicApi extends BasicApis {\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 * - `currentGroup`: the group that this api instance is working on, or undefined if the backend environment is not multi-group.\n * - `availableGroups`: the list of groups that the current user can access with the provided secret. Empty if the backend environment is not\n * multi-group.\n */\n getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; 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<IcureBasicApi>\n}\n\nclass IcureBasicApiImpl implements IcureBasicApi {\n private latestGroupsRequest: Promise<UserGroup[]>\n private _accessLogApi: IccAccesslogApi | undefined\n private _agendaApi: IccAgendaApi | undefined\n private _authApi: IccAuthApi | undefined\n private _codeApi: IccCodeXApi | undefined\n private _deviceApi: IccDeviceXApi | undefined\n private _entityReferenceApi: IccEntityrefApi | undefined\n private _groupApi: IccGroupApi | undefined\n private _healthcarePartyApi: IccHcpartyXApi | undefined\n private _icureApi: IccIcureApi | undefined\n private _insuranceApi: IccInsuranceApi | undefined\n private _permissionApi: IccPermissionApi | undefined\n private _userApi: IccUserXApi | undefined\n private _patientApi: IccPatientApi | undefined\n private _pricingApi: IccTarificationApi | undefined\n private _roleApi: IccRoleApi | undefined\n\n get accessLogApi(): IccAccesslogApi {\n return (\n this._accessLogApi ?? (this._accessLogApi = new IccAccesslogApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get pricingApi(): IccTarificationApi {\n return (\n this._pricingApi ??\n (this._pricingApi = new IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get icureApi(): IccIcureApi {\n return (\n this._icureApi ?? (this._icureApi = new IccIcureApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, 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 authApi(): IccAuthApi {\n return this._authApi ?? (this._authApi = new IccAuthApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\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 deviceApi(): IccDeviceXApi {\n return (\n this._deviceApi ??\n (this._deviceApi = new IccDeviceXApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.userApi,\n this.authApi,\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 groupApi(): IccGroupApi {\n return this._groupApi ?? (this._groupApi = new IccGroupApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n get healthcarePartyApi(): IccHcpartyXApi {\n return (\n this._healthcarePartyApi ??\n (this._healthcarePartyApi = new IccHcpartyXApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.authApi,\n this.fetch\n ))\n )\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 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 userApi(): IccUserXApi {\n return (\n this._userApi ??\n (this._userApi = new IccUserXApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.authApi, this.fetch))\n )\n }\n\n async getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; availableGroups: UserGroup[] }> {\n if (!this.currentGroupInfo) return { currentGroup: undefined, availableGroups: [] }\n this.latestGroupsRequest = (this.grouplessUserApi ?? this.userApi).getMatchingUsers()\n return { currentGroup: this.currentGroupInfo, availableGroups: await this.latestGroupsRequest }\n }\n\n get patientApi(): IccPatientApi {\n return (\n this._patientApi ?? (this._patientApi = new IccPatientApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get roleApi(): IccRoleApi {\n return this._roleApi ?? (this._roleApi = new IccRoleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n\n async switchGroup(newGroupId: string): Promise<IcureBasicApi> {\n if (!this.currentGroupInfo) throw new Error('Cannot switch group: the backend environment does not support multiple groups.')\n const availableGroups = await this.latestGroupsRequest\n const switchedProvider = await this.groupSpecificAuthenticationProvider.switchGroup(newGroupId, availableGroups)\n return new IcureBasicApiImpl(\n this.host,\n switchedProvider,\n this.fetch,\n this.grouplessUserApi,\n availableGroups,\n availableGroups.find((x) => x.groupId === newGroupId)!,\n this.params\n )\n }\n\n constructor(\n private readonly host: string,\n private readonly groupSpecificAuthenticationProvider: AuthenticationProvider,\n private readonly fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n private readonly grouplessUserApi: IccUserApi | undefined,\n latestMatches: UserGroup[],\n private readonly currentGroupInfo: UserGroup | undefined,\n private readonly params: IcureBasicApiOptions.WithDefaults\n ) {\n this.latestGroupsRequest = Promise.resolve(latestMatches)\n }\n}\n\nexport interface IcureBasicApiOptions {\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 * 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.\n * This functions will be called only if a user exists in at least 2 groups, and takes in input:\n * - the information on the groups the user can access (in no specific order)\n * - if the authentication method uses JWT also the current group id (undefined otherwise)\n * The function must return the id of one of the available 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[], currentGroupId?: string) => Promise<string>\n}\n\nnamespace IcureBasicApiOptions {\n export namespace Defaults {\n export const headers = {}\n }\n export class WithDefaults implements IcureBasicApiOptions {\n constructor(custom: IcureBasicApiOptions) {\n this.headers = custom.headers ?? Defaults.headers\n this.groupSelector = custom.groupSelector ?? ((groups) => Promise.resolve(groups[0].groupId!))\n }\n\n readonly headers: { [headerName: string]: string }\n readonly groupSelector: (availableGroupsInfo: UserGroup[]) => Promise<string>\n }\n}\n\nexport namespace IcureBasicApi {\n /**\n * Initialises a new instance of the iCure API.\n */\n export async function initialise(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\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: IcureBasicApiOptions = {}\n ): Promise<IcureBasicApi> {\n const params = new IcureBasicApiOptions.WithDefaults(options)\n const authProviderInfo = await initialiseAuthProviderWithGroupSelector(\n host,\n authenticationOptions,\n params.headers ?? {},\n fetchImpl,\n params.groupSelector\n )\n return new IcureBasicApiImpl(\n host,\n authProviderInfo.groupSpecificAuthenticationProvider,\n fetch,\n authProviderInfo.grouplessUserApi,\n authProviderInfo.matches,\n authProviderInfo.matches.find((match) => match.groupId === authProviderInfo.chosenGroupId),\n params\n )\n }\n}\n\nasync function getMatchesOrEmpty(userApi: IccUserApi): Promise<UserGroup[]> {\n try {\n return await userApi.getMatchingUsers()\n } catch (err) {\n if (err instanceof Error && 'statusCode' in err && (err as any).statusCode === 404) return Promise.resolve([])\n else return Promise.reject(err)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-x-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAgCmB;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,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\n IccAuthApi,\n IccBeefactApi,\n IccBeresultexportApi,\n IccBeresultimportApi,\n IccBesamv2Api,\n IccCalendarItemTypeApi,\n IccClassificationTemplateApi,\n IccEntityrefApi,\n IccEntitytemplateApi,\n IccFormApi,\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 IccTimeTableApi,\n IccTmpApi,\n IccUserApi,\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 { 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 EnsembleAuthenticationProvider,\n JwtAuthenticationProvider,\n NoAuthenticationProvider,\n} from './auth/AuthenticationProvider'\nimport { CryptoPrimitives, WebCryptoPrimitives } from './crypto/CryptoPrimitives'\nimport { UserEncryptionKeysManager } from './crypto/UserEncryptionKeysManager'\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 { ensureDelegationForSelf } from './crypto/utils'\nimport { initialiseExchangeDataManagerForCurrentDataOwner } from './crypto/ExchangeDataManager'\nimport { BaseExchangeDataManager } from './crypto/BaseExchangeDataManager'\nimport { IccExchangeDataApi } from '../icc-api/api/internal/IccExchangeDataApi'\nimport { AccessControlSecretUtils } from './crypto/AccessControlSecretUtils'\nimport { SecureDelegationsEncryption } from './crypto/SecureDelegationsEncryption'\nimport { ExtendedApisUtilsImpl } from './crypto/ExtendedApisUtilsImpl'\nimport { SecureDelegationsManager } from './crypto/SecureDelegationsManager'\nimport { AccessControlKeysHeadersProvider } from './crypto/AccessControlKeysHeadersProvider'\nimport { IccExchangeDataMapApi } from '../icc-api/api/internal/IccExchangeDataMapApi'\nimport { ExchangeDataMapManager } from './crypto/ExchangeDataMapManager'\nimport { IccDeviceXApi } from './icc-device-x-api'\nimport { IccBekmehrXApi } from './icc-bekmehr-x-api'\nimport { IccDoctemplateXApi } from './icc-doctemplate-x-api'\nimport { UserGroup } from '../icc-api/model/UserGroup'\nimport { IccTopicXApi } from './icc-topic-x-api'\nimport { IccRoleApi } from '../icc-api/api/IccRoleApi'\nimport { DataOwnerTypeEnum } from '../icc-api/model/DataOwnerTypeEnum'\nimport { DelegationsDeAnonymization } from './crypto/DelegationsDeAnonymization'\nimport { JwtBridgedAuthService } from './auth/JwtBridgedAuthService'\nimport { AuthSecretProvider, SmartAuthProvider, SmartAuthProviderInitialSecret } from './auth/SmartAuthProvider'\nimport { KeyPairRecoverer } from './crypto/KeyPairRecoverer'\nimport { IccRecoveryDataApi } from '../icc-api/api/internal/IccRecoveryDataApi'\nimport { RecoveryDataEncryption } from './crypto/RecoveryDataEncryption'\nimport { IccRecoveryXApi } from './icc-recovery-x-api'\nimport { getGroupOfJwt } from './auth/JwtUtils'\nimport { SecurityMetadataDecryptor } from './crypto/SecurityMetadataDecryptor'\nimport { IccApplicationSettingsXApi } from './icc-application-settings-x-api'\n\nexport * from './icc-accesslog-x-api'\nexport * from './icc-application-settings-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-receipt-x-api'\nexport * from './icc-data-owner-x-api'\nexport * from './icc-icure-maintenance-x-api'\nexport * from './icc-maintenance-task-x-api'\nexport * from './icc-recovery-x-api'\nexport * from './utils'\n\nexport * from './crypto/RSA'\nexport * from './crypto/CryptoPrimitives'\nexport * from './crypto/ShareMetadataBehaviour'\nexport * from './auth/AuthenticationProvider'\n\nexport { AuthSecretDetails, AuthSecretType, AuthSecretProvider, SmartAuthProviderInitialSecret } from './auth/SmartAuthProvider'\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'\nexport { NativeCryptoPrimitivesBridge } from './crypto/NativeCryptoPrimitivesBridge'\nexport { hexPublicKeysWithSha1Of, hexPublicKeysWithSha256Of, getShaVersionForKey } from './crypto/utils'\nexport { SecretIdUseOption } from './crypto/SecretIdUseOption'\n\nexport interface BasicApis {\n readonly accessLogApi: IccAccesslogApi\n readonly agendaApi: IccAgendaApi\n readonly authApi: IccAuthApi\n readonly codeApi: IccCodeXApi\n readonly deviceApi: IccDeviceXApi\n readonly entityReferenceApi: IccEntityrefApi\n readonly formApi: IccFormApi\n readonly groupApi: IccGroupApi\n readonly healthcarePartyApi: IccHcpartyXApi\n readonly icureApi: IccIcureApi\n readonly insuranceApi: IccInsuranceApi\n readonly patientApi: IccPatientApi\n readonly permissionApi: IccPermissionApi\n readonly pricingApi: IccTarificationApi\n readonly roleApi: IccRoleApi\n readonly userApi: IccUserXApi\n}\nexport interface Apis extends BasicApis {\n readonly calendarItemTypeApi: IccCalendarItemTypeApi\n readonly medicalLocationApi: IccMedicallocationApi\n readonly cryptoApi: IccCryptoXApi\n readonly accessLogApi: IccAccesslogXApi\n readonly contactApi: IccContactXApi\n readonly formApi: IccFormXApi\n readonly invoiceApi: IccInvoiceXApi\n readonly documentApi: IccDocumentXApi\n readonly healthcareElementApi: IccHelementXApi\n readonly classificationApi: IccClassificationXApi\n readonly calendarItemApi: IccCalendarItemXApi\n readonly receiptApi: IccReceiptXApi\n readonly timetableApi: IccTimeTableApi\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: IccApplicationSettingsXApi\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 readonly topicApi: IccTopicXApi\n readonly recoveryApi: IccRecoveryXApi\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 automatically create maintenance tasks for requesting access back when a new key is generated at initialisation time.\n * Note that the maintenance task will be created only towards HCP data owners: if you want to create a maintenance task also to other types of data\n * owners you should disable this and call {@link IccIcureMaintenanceXApi.createMaintenanceTasksForNewKeypair} yourself.\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.\n * This functions will be called only if a user exists in at least 2 groups, and takes in input:\n * - the information on the groups the user can access (in no specific order)\n * - if the authentication method uses JWT also the current group id (undefined otherwise)\n * The function must return the id of one of the available 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[], currentGroupId?: string) => Promise<string>\n /**\n * Temporary value to support EHR Lite and MedTech api implementations.\n *\n * Currently, all hcps are able to access encrypted data shared with any of their parents, and on initialisation the api will verify that there is a\n * key pair available for the current user and for every parent of the user. If this option is set to true, the api will not load keys for the\n * parent users.\n *\n * This \"implicit data-sharing scheme\" (each parent HCP is essentially sharing data with all its children HCPs), however, may not be ideal for all\n * use cases, and it will be changed in future to be configurable in order to make it more general.\n * @default false, equivalent to previous behaviour.\n */\n readonly disableParentKeysInitialisation?: boolean\n /**\n * If true the Api will not use some endpoints that are available only in the latest versions of kraken lite.\n * Set it to true only for connecting to kraken-lite versions < 0.1.187\n */\n readonly useLiteCompatibilityMode?: boolean\n /**\n * Allows injecting exchange data similarly to {@link IccCryptoXApi.injectExchangeData} but directly on\n * initialization.\n * When possible, this solution should be preferred as it allows minimizing proliferation of exchange data under\n * certain circumstances.\n */\n readonly injectExchangeData?: {\n details: {\n exchangeDataId: string\n accessControlSecret: ArrayBuffer\n exchangeKey: ArrayBuffer\n sharedSignatureKey: ArrayBuffer\n verified: boolean\n }[]\n reEncryptWithOwnKeys: boolean\n }\n}\n\nnamespace IcureApiOptions {\n export namespace Defaults {\n export const entryKeysFactory = new DefaultStorageEntryKeysFactory()\n export const createMaintenanceTasksOnNewKey = true\n export const headers = {}\n }\n\n export class WithDefaults implements IcureApiOptions {\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 readonly disableParentKeysInitialisation: boolean\n readonly injectExchangeData: IcureApiOptions['injectExchangeData'] | undefined\n\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 ?? {}\n this.groupSelector = custom.groupSelector ?? ((groups) => Promise.resolve(groups[0].groupId!))\n this.disableParentKeysInitialisation = custom.disableParentKeysInitialisation ?? false\n this.injectExchangeData = custom.injectExchangeData\n }\n }\n}\n\n/**\n * Specifies which fields should be encrypted for each kind of encryptable entity.\n *\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 *\n * # Encrypted fields syntax\n *\n * ## Grammar\n *\n * The grammar for each encrypted field is the following:\n * ```\n * fieldName :=\n * regex([a-zA-Z_][a-zA-Z0-9_]+)\n * encryptedField :=\n * fieldName\n * | fieldName + (\".\" | \".*.\" | \"[].\") + encryptedField\n * ```\n *\n * This grammar allows you to specify the fields to encrypt for the object and recursively for nested objects.\n * - A string containing only a single `fieldName` will encrypt the field with the given name.\n * - A string starting with `fieldName.` allows to specify the encrypted fields of a nested object. The encrypted values of the\n * fields in the nested object will be saved in the nested object.\n * - A string starting with `fieldName.*.` treats `fieldName` as a map/dictionary data structure and allows to specify the encrypted fields of the\n * values of the map. Note that the values of the map must be objects as well. The encrypted content of each map value is stored in that value.\n * - A string starting with `fieldName[].` treats `fieldName` as an array and allows to specify the encrypted fields of the values of the array.\n * Note that the values of the array must be objects as well. The encrypted content of each array element is stored in that element.\n *\n * ## Example\n *\n * Consider the following object and encryption keys:\n * ```javascript\n * const obj = {\n * a: { x: 0, y: 1 },\n * b: \"hello\",\n * c: [ { public: \"a\", secret: \"b\" }, { public: \"c\", secret: \"d\" } ],\n * d: \"ok\",\n * e: {\n * info: \"something\",\n * private: \"secret\",\n * dataMap: {\n * \"en\": {\n * a: 1,\n * b: 2\n * },\n * \"fr\": {\n * a: 3,\n * b: 4\n * }\n * }\n * }\n * }\n * const encryptedFields = [\n * \"a\",\n * \"c[].secret\",\n * \"d\",\n * \"e.private\",\n * \"e.datamap.*.a\"\n * ]\n * ```\n * If you use them with the crypt method you will get the following result:\n * ```json\n * {\n * b: \"hello\",\n * c: [\n * { public: \"a\", encryptedSelf: 'encrypted+encoded { secret: \"b\" }' },\n * { public: \"c\", encryptedSelf: 'encrypted+encoded { secret: \"d\" }' }\n * ],\n * e: {\n * info: \"something\",\n * dataMap: {\n * \"en\": { b: 2, encryptedSelf: 'encrypted+encoded { a: 1 }' },\n * \"fr\": { b: 4, encryptedSelf: 'encrypted+encoded { a: 3 }' }\n * },\n * encryptedSelf: 'encrypted+encoded { private: \"secret\" }'\n * },\n * encryptedSelf: 'encrypted+encoded { a: { x: 0, y: 1 }, d: \"ok\" }'\n * }\n * ```\n *\n * ## Shortened representation\n *\n * You can also group encrypted fields having the same prefix by concatenating to the prefix the JSON representation of an array of all the postfixes.\n * For example the following encrypted fields:\n * ```javascript\n * const encryptedFields = [\"a.b.c.d.e.f1\", \"a.b.c.d.e.f2\", \"a.b.c.d.e.f3\", \"a.b.c.d.e.f4\"]\n * ```\n * can be shortened to\n * ```javascript\n * const encryptedFields = ['a.b.c.d.e.[\"f1\",\"f2\",\"f3\",\"f4\"]'] // Note the use of single quotes to avoid escaping the double quotes\n * ```\n * If you use the shortened representation you may need to escape nested json representations. In that case the use of `JSON.stringify` is\n * recommended.\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 /**\n * Fields to encrypt for entities of type {@link Contact}, excluding `services`. You can specify which fields of `services` should be encrypted\n * using {@link service}.\n * @default ['descr'] // encryption of `services` is managed through {@link service}\n */\n readonly contact?: string[]\n /**\n * Fields to encrypt for entities of type {@link Service}. Note that encryption of the `content` field and recursively contained `Services` through\n * `content.compoundValue` is automatically managed by the sdk, and you are not allowed to modify it.\n *\n * Note: any non-empty values for this field will break bi-directional data compatibility between v7 and previous: Contacts created with\n * v7 will not be read properly by previous versions. If you want\n * @default ['notes[].markdown'] // encryption of `content` is managed in a special way\n */\n readonly service?: string[]\n /**\n * Fields to encrypt for entities of type {@link HealthElement}\n * @default ['descr', 'note', 'notes[].markdown']\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', 'notes[].markdown']\n */\n readonly patient?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Message}\n * @default []\n */\n readonly message?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Topic}\n * @default ['description']\n */\n readonly topic?: string[]\n\n /**\n * Fields to encrypt for entities of type {@link Document}\n * @default []\n */\n readonly document?: string[]\n}\n\nexport namespace EncryptedFieldsConfig {\n export const Defaults = {\n accessLog: ['detail', 'objectId'],\n calendarItem: ['details', 'title', 'patientId'],\n contact: ['descr', 'notes[].markdown'],\n service: ['notes[].markdown'],\n healthElement: ['descr', 'note', 'notes[].markdown'],\n maintenanceTask: ['properties'],\n patient: ['note', 'notes[].markdown'],\n message: [],\n document: [],\n topic: ['description', 'linkedServices', 'linkedHealthElements'],\n }\n}\n\n/**\n * Details for the authentication of a user\n */\nexport type AuthenticationDetails =\n | {\n username: string\n password: string\n thirdPartyTokens?: { [thirdParty: string]: string }\n }\n | {\n icureTokens: { token: string; refreshToken: string }\n credentials?: { username: string; password: string }\n }\n | {\n thirdPartyTokens: { [thirdParty: string]: string }\n }\n | SmartAuthenticationDetails\n\n/**\n * Allows to perform authentication through an {@link AuthSecretProvider}.\n *\n * The iCure SDK can authenticate to the backend using different kinds of secrets, such as passwords, long-lived authentication tokens, and\n * short-lived authentication tokens generated through the message gateway. iCure associates to each kind of secret a certain security level, and for\n * some sensitive operations, depending on the configurations of the user and his group, some operations may require a secret of a certain security\n * level. For example, with the default configurations, in order to change his own email the user can't have logged in with a long-lived token, but he\n * needs to provide his current password or a short-lived token.\n *\n * By using this authentication option, the iCure SDK will automatically request and cache the secret from the {@link AuthSecretProvider} only when\n * needed, which should help to minimise the interaction with the user.\n *\n * Another advantage of using this authentication option over others is that in case all the cached tokens and secrets were to expire while performing\n * a request, instead of having the request fail the SDK will ask for a new secret from the {@link SmartAuthProvider} and the request will\n * automatically be retried with the new secret.\n *\n * You must provide the following information:\n * - secretProvider: the secret provider to use for authentication. Will handle interaction with the gui.\n *\n * You can also provide the following optional information, which may allow to reduce the requests for secrets initially:\n * - username: any kind of value that can identify the user (userId, groupId/userId, username, email, ...). More generic identifiers, valid\n * on multiple groups, allow for simpler group switching by using {@link IcureApi.switchGroup}.\n * This value, however, is mandatory if you want to use password or icure tokens.\n * - initialSecret: an initial secret (password, token, ...) that will be used to get new authentication tokens as needed. If it is expired it will be ignored.\n * - initialAuthToken: an initial authentication token used on each request. If it is expired it will be ignored.\n * - initialRefreshToken: an initial refresh token used to get new authentication tokens as needed. If it is expired it will be ignored.\n */\nexport type SmartAuthenticationDetails = {\n username?: string\n secretProvider: AuthSecretProvider\n initialSecret?: SmartAuthProviderInitialSecret\n initialAuthToken?: string\n initialRefreshToken?: 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 * - `currentGroup`: the group that this api instance is working on, or undefined if the backend environment is not multi-group.\n * - `availableGroups`: the list of groups that the current user can access with the provided secret. Empty if the backend environment is not\n * multi-group.\n */\n getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; 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}\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 | CryptoPrimitives = 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 authenticationProviderInfo = await initialiseAuthProviderWithGroupSelector(\n host,\n authenticationOptions,\n params.headers,\n fetchImpl,\n params.groupSelector\n )\n const cryptoInitInfo = await initialiseCryptoWithProvider(\n host,\n fetchImpl,\n authenticationProviderInfo.groupSpecificAuthenticationProvider,\n params,\n cryptoStrategies,\n crypto,\n options.useLiteCompatibilityMode ?? false\n )\n return new IcureApiImpl(\n cryptoInitInfo,\n host,\n authenticationProviderInfo.groupSpecificAuthenticationProvider,\n fetch,\n authenticationProviderInfo.grouplessUserApi,\n authenticationProviderInfo.matches,\n authenticationProviderInfo.matches.find((match) => match.groupId === authenticationProviderInfo.chosenGroupId),\n params,\n cryptoStrategies,\n options.useLiteCompatibilityMode ?? false\n )\n }\n}\n\nasync function getAuthenticationProvider(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n headers: { [headerName: string]: string },\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n) {\n let authenticationProvider: AuthenticationProvider\n if ('getIcureTokens' in authenticationOptions && 'switchGroup' in authenticationOptions && 'getAuthService' in authenticationOptions) {\n authenticationProvider = authenticationOptions\n } else if ('icureTokens' in authenticationOptions && !!authenticationOptions.icureTokens) {\n authenticationProvider = new JwtAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions?.credentials?.username,\n authenticationOptions?.credentials?.password,\n undefined,\n authenticationOptions.icureTokens\n )\n } else if (\n 'username' in authenticationOptions &&\n 'password' in authenticationOptions &&\n !!authenticationOptions.username &&\n !!authenticationOptions.password\n ) {\n authenticationProvider = new EnsembleAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.password,\n 3600,\n undefined,\n undefined,\n authenticationOptions.thirdPartyTokens\n )\n } else if ('thirdPartyTokens' in authenticationOptions && !!authenticationOptions.thirdPartyTokens) {\n authenticationProvider = new JwtAuthenticationProvider(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n undefined,\n undefined,\n new JwtBridgedAuthService(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n undefined,\n undefined,\n authenticationOptions.thirdPartyTokens,\n undefined\n )\n )\n } else if ('secretProvider' in authenticationOptions) {\n authenticationProvider = await SmartAuthProvider.initialise(\n new IccAuthApi(host, headers, new NoAuthenticationProvider(), fetchImpl),\n authenticationOptions.username,\n authenticationOptions.secretProvider,\n {\n initialSecret: authenticationOptions.initialSecret,\n initialAuthToken: authenticationOptions.initialAuthToken,\n initialRefreshToken: authenticationOptions.initialRefreshToken,\n }\n )\n } else {\n throw new Error('Invalid authentication options provided')\n }\n return authenticationProvider\n}\n\nasync function initialiseAuthProviderWithGroupSelector(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\n headers: { [headerName: string]: string },\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n groupSelector: ((availableGroupsInfo: UserGroup[], currentGroupId?: string) => Promise<string>) | undefined\n) {\n let grouplessAuthenticationProvider = await getAuthenticationProvider(host, authenticationOptions, headers, fetchImpl)\n const grouplessUserApi = new IccUserApi(host, headers, grouplessAuthenticationProvider, fetchImpl)\n const matches = await getMatchesOrEmpty(grouplessUserApi)\n const tokens = await grouplessAuthenticationProvider.getIcureTokens()\n const currentGroupId = tokens ? getGroupOfJwt(tokens.token) : undefined\n const chosenGroupId = matches.length > 1 && !!groupSelector ? await groupSelector(matches, currentGroupId) : 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 /*\n * If the auth provider is initialized with credentials and jwt not switching the group will may cause issues:\n * 1. The default group for the user is group A\n * 2. The user logs in to group B -> the provider is switched\n * 3. The user refreshes the page -> a new instance of the api with initial iCure tokens is created\n * 4. The refresh token is expired / the user needs to do a high security operation -> a new login is done .If we did\n * not switch the provider here the login would default to group A, potentially causing a lot of issues...\n */\n const groupSpecificAuthenticationProvider = !!chosenGroupId\n ? await grouplessAuthenticationProvider.switchGroup(chosenGroupId, matches)\n : grouplessAuthenticationProvider\n return {\n groupSpecificAuthenticationProvider,\n // No need for a groupless user api on a group-specific smart auth provider\n grouplessUserApi: groupSpecificAuthenticationProvider instanceof SmartAuthProvider ? undefined : grouplessUserApi,\n matches,\n chosenGroupId,\n }\n}\n\n// Apis which are used during crypto api initialisation, to avoid re-instantiating them later\ntype CryptoInitialisationInfo = {\n cryptoApi: IccCryptoXApi\n healthcarePartyApi: IccHcpartyXApi\n deviceApi: IccDeviceXApi\n // no patient api since it is base\n dataOwnerApi: IccDataOwnerXApi\n userApi: IccUserXApi\n icureMaintenanceTaskApi: IccIcureMaintenanceXApi\n maintenanceTaskApi: IccMaintenanceTaskXApi\n headers: { [headerName: string]: string }\n dataOwnerRequiresAnonymousDelegation: boolean\n recoveryApi: IccRecoveryXApi\n}\n\nconst REQUEST_AUTOFIX_ANONYMITY_HEADER = 'Icure-Request-Autofix-Anonymity'\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 | CryptoPrimitives,\n useLiteCompatibilityMode: boolean\n): Promise<CryptoInitialisationInfo> {\n const initialDataOwnerStub = await new IccDataOwnerXApi(\n host,\n params.headers,\n groupSpecificAuthenticationProvider,\n fetchImpl\n ).getCurrentDataOwnerStub()\n const dataOwnerRequiresAnonymousDelegation = cryptoStrategies.dataOwnerRequiresAnonymousDelegation(initialDataOwnerStub)\n let updatedHeaders = params.headers\n if (!Object.keys(updatedHeaders).includes(REQUEST_AUTOFIX_ANONYMITY_HEADER)) {\n if (initialDataOwnerStub.type == DataOwnerTypeEnum.Patient || initialDataOwnerStub.type == DataOwnerTypeEnum.Device) {\n if (!dataOwnerRequiresAnonymousDelegation) {\n updatedHeaders = { ...updatedHeaders, [REQUEST_AUTOFIX_ANONYMITY_HEADER]: 'false' }\n }\n } else {\n if (dataOwnerRequiresAnonymousDelegation) {\n updatedHeaders = { ...updatedHeaders, [REQUEST_AUTOFIX_ANONYMITY_HEADER]: 'true' }\n }\n }\n }\n\n const authApi = new IccAuthApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const userApi = new IccUserXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, authApi, fetchImpl)\n const healthcarePartyApi = new IccHcpartyXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, authApi, fetchImpl)\n const deviceApi = new IccDeviceXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, userApi, authApi, fetchImpl)\n const basePatientApi = new IccPatientApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const dataOwnerApi = new IccDataOwnerXApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const exchangeDataApi = new IccExchangeDataApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n const baseRecoveryDataApi = new IccRecoveryDataApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n // Crypto initialisation\n const icureStorage = new IcureStorageFacade(params.keyStorage, params.storage, params.entryKeysFactory)\n const cryptoPrimitives = 'AES' in crypto && 'RSA' in crypto && 'HMAC' in crypto ? crypto : new WebCryptoPrimitives(crypto)\n const baseExchangeKeysManager = new BaseExchangeKeysManager(cryptoPrimitives, dataOwnerApi, healthcarePartyApi, basePatientApi, deviceApi)\n const baseExchangeDataManager = new BaseExchangeDataManager(\n exchangeDataApi,\n dataOwnerApi,\n cryptoPrimitives,\n dataOwnerRequiresAnonymousDelegation,\n useLiteCompatibilityMode\n )\n const keyRecovery = new KeyRecovery(cryptoPrimitives, dataOwnerApi, baseExchangeKeysManager, baseExchangeDataManager)\n const recoveryDataEncryption = new RecoveryDataEncryption(cryptoPrimitives, baseRecoveryDataApi)\n const keyPairRecoverer = new KeyPairRecoverer(recoveryDataEncryption)\n const userEncryptionKeysManager = new UserEncryptionKeysManager(\n cryptoPrimitives,\n dataOwnerApi,\n icureStorage,\n keyRecovery,\n cryptoStrategies,\n !params.disableParentKeysInitialisation,\n keyPairRecoverer,\n dataOwnerRequiresAnonymousDelegation\n )\n const newKey = await userEncryptionKeysManager.initialiseKeys()\n await new TransferKeysManager(cryptoPrimitives, baseExchangeDataManager, dataOwnerApi, userEncryptionKeysManager, icureStorage).updateTransferKeys(\n await dataOwnerApi.getCurrentDataOwnerStub()\n )\n // TODO customise cache size?\n const exchangeKeysManager = new ExchangeKeysManager(userEncryptionKeysManager, baseExchangeKeysManager, dataOwnerApi)\n const accessControlSecretUtils = new AccessControlSecretUtils(cryptoPrimitives)\n const exchangeDataManager = await initialiseExchangeDataManagerForCurrentDataOwner(\n baseExchangeDataManager,\n userEncryptionKeysManager,\n accessControlSecretUtils,\n cryptoStrategies,\n dataOwnerApi,\n cryptoPrimitives,\n !params.disableParentKeysInitialisation\n )\n if (params.injectExchangeData != null && params.injectExchangeData.details.length > 0) {\n await exchangeDataManager.injectDecryptedExchangeData(params.injectExchangeData.details, params.injectExchangeData.reEncryptWithOwnKeys)\n }\n const exchangeDataMapManager = new ExchangeDataMapManager(\n new IccExchangeDataMapApi(host, updatedHeaders, groupSpecificAuthenticationProvider, fetchImpl)\n )\n const secureDelegationsEncryption = new SecureDelegationsEncryption(userEncryptionKeysManager, cryptoPrimitives)\n const secureDelegationsSecurityMetadataEncryption = new SecurityMetadataDecryptor(\n exchangeKeysManager,\n cryptoPrimitives,\n exchangeDataManager,\n exchangeDataMapManager,\n secureDelegationsEncryption,\n dataOwnerApi\n )\n const xApiUtils = new ExtendedApisUtilsImpl(\n cryptoPrimitives,\n dataOwnerApi,\n secureDelegationsSecurityMetadataEncryption,\n new SecureDelegationsManager(\n exchangeDataManager,\n exchangeDataMapManager,\n secureDelegationsEncryption,\n accessControlSecretUtils,\n userEncryptionKeysManager,\n cryptoPrimitives,\n dataOwnerApi,\n cryptoStrategies,\n dataOwnerRequiresAnonymousDelegation\n ),\n userApi,\n !params.disableParentKeysInitialisation\n )\n const shamirManager = new ShamirKeysManager(cryptoPrimitives, dataOwnerApi, userEncryptionKeysManager, exchangeDataManager)\n if (userEncryptionKeysManager.getSelfVerifiedKeys().length > 0) {\n await ensureDelegationForSelf(dataOwnerApi, xApiUtils, basePatientApi, cryptoPrimitives)\n }\n const accessControlKeysHeadersProvider = new AccessControlKeysHeadersProvider(exchangeDataManager)\n const delegationsDeAnonymisation = new DelegationsDeAnonymization(\n dataOwnerApi,\n secureDelegationsSecurityMetadataEncryption,\n xApiUtils,\n cryptoPrimitives,\n accessControlSecretUtils,\n host,\n updatedHeaders,\n groupSpecificAuthenticationProvider,\n fetchImpl,\n accessControlKeysHeadersProvider\n )\n const cryptoApi = new IccCryptoXApi(\n exchangeKeysManager,\n cryptoPrimitives,\n userEncryptionKeysManager,\n dataOwnerApi,\n xApiUtils,\n shamirManager,\n params.storage,\n params.keyStorage,\n exchangeDataManager,\n accessControlKeysHeadersProvider,\n delegationsDeAnonymisation\n )\n const maintenanceTaskApi = new IccMaintenanceTaskXApi(\n host,\n updatedHeaders,\n cryptoApi,\n healthcarePartyApi,\n dataOwnerApi,\n userApi,\n authApi,\n !dataOwnerRequiresAnonymousDelegation,\n params.encryptedFieldsConfig.maintenanceTask ?? EncryptedFieldsConfig.Defaults.maintenanceTask,\n groupSpecificAuthenticationProvider,\n fetchImpl\n )\n const icureMaintenanceTaskApi = new IccIcureMaintenanceXApi(cryptoApi, maintenanceTaskApi, dataOwnerApi, exchangeDataApi)\n\n if (newKey && params.createMaintenanceTasksOnNewKey) {\n await icureMaintenanceTaskApi.createMaintenanceTasksForNewKeypair(await userApi.getCurrentUser(), newKey.newKeyPair)\n }\n return {\n cryptoApi,\n userApi,\n healthcarePartyApi,\n deviceApi,\n maintenanceTaskApi,\n dataOwnerApi,\n icureMaintenanceTaskApi,\n headers: updatedHeaders,\n dataOwnerRequiresAnonymousDelegation,\n recoveryApi: new IccRecoveryXApi(\n baseRecoveryDataApi,\n recoveryDataEncryption,\n userEncryptionKeysManager,\n dataOwnerApi,\n cryptoPrimitives,\n exchangeDataManager\n ),\n }\n}\n\nclass IcureApiImpl implements IcureApi {\n private latestGroupsRequest: Promise<UserGroup[]>\n\n constructor(\n private readonly cryptoInitInfos: CryptoInitialisationInfo,\n private readonly host: string,\n private readonly groupSpecificAuthenticationProvider: AuthenticationProvider,\n private readonly fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n private readonly grouplessUserApi: IccUserApi | undefined,\n latestMatches: UserGroup[],\n private readonly currentGroupInfo: UserGroup | undefined,\n private readonly params: IcureApiOptions.WithDefaults,\n private readonly cryptoStrategies: CryptoStrategies,\n private readonly useLiteCompatibilityMode: boolean\n ) {\n this.latestGroupsRequest = Promise.resolve(latestMatches)\n }\n\n private _pricingApi: IccTarificationApi | undefined\n\n get pricingApi(): IccTarificationApi {\n return (\n this._pricingApi ??\n (this._pricingApi = new IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _authApi: IccAuthApi | undefined\n\n get recoveryApi(): IccRecoveryXApi {\n return this.cryptoInitInfos.recoveryApi\n }\n\n get authApi(): IccAuthApi {\n return (\n this._authApi ?? (this._authApi = new IccAuthApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _codeApi: IccCodeXApi | undefined\n\n get codeApi(): IccCodeXApi {\n return (\n this._codeApi ??\n (this._codeApi = new IccCodeXApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _calendarItemTypeApi: IccCalendarItemTypeApi | undefined\n\n get calendarItemTypeApi(): IccCalendarItemTypeApi {\n return (\n this._calendarItemTypeApi ??\n (this._calendarItemTypeApi = new IccCalendarItemTypeApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _medicalLocationApi: IccMedicallocationApi | undefined\n\n get medicalLocationApi(): IccMedicallocationApi {\n return (\n this._medicalLocationApi ??\n (this._medicalLocationApi = new IccMedicallocationApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _roleApi: IccRoleApi | undefined\n\n get roleApi(): IccRoleApi {\n return this._roleApi ?? (this._roleApi = new IccRoleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n\n private _entityReferenceApi: IccEntityrefApi | undefined\n\n get entityReferenceApi(): IccEntityrefApi {\n return (\n this._entityReferenceApi ??\n (this._entityReferenceApi = new IccEntityrefApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _permissionApi: IccPermissionApi | undefined\n\n get permissionApi(): IccPermissionApi {\n return (\n this._permissionApi ??\n (this._permissionApi = new IccPermissionApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _accessLogApi: IccAccesslogXApi | undefined\n\n get accessLogApi(): IccAccesslogXApi {\n return (\n this._accessLogApi ??\n (this._accessLogApi = new IccAccesslogXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.accessLog ?? EncryptedFieldsConfig.Defaults.accessLog,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _agendaApi: IccAgendaApi | undefined\n\n get agendaApi(): IccAgendaApi {\n return (\n this._agendaApi ??\n (this._agendaApi = new IccAgendaApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _contactApi: IccContactXApi | undefined\n\n get contactApi(): IccContactXApi {\n return (\n this._contactApi ??\n (this._contactApi = new IccContactXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch,\n this.params.encryptedFieldsConfig.contact ?? EncryptedFieldsConfig.Defaults.contact,\n this.params.encryptedFieldsConfig.service ?? EncryptedFieldsConfig.Defaults.service\n ))\n )\n }\n\n private _formApi: IccFormXApi | undefined\n\n get formApi(): IccFormXApi {\n return (\n this._formApi ??\n (this._formApi = new IccFormXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _groupApi: IccGroupApi | undefined\n\n get groupApi(): IccGroupApi {\n return (\n this._groupApi ??\n (this._groupApi = new IccGroupApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _invoiceApi: IccInvoiceXApi | undefined\n\n get invoiceApi(): IccInvoiceXApi {\n return (\n this._invoiceApi ??\n (this._invoiceApi = new IccInvoiceXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.entityReferenceApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _insuranceApi: IccInsuranceApi | undefined\n\n get insuranceApi(): IccInsuranceApi {\n return (\n this._insuranceApi ??\n (this._insuranceApi = new IccInsuranceApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _documentApi: IccDocumentXApi | undefined\n\n get documentApi(): IccDocumentXApi {\n return (\n this._documentApi ??\n (this._documentApi = new IccDocumentXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.authApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.document ?? EncryptedFieldsConfig.Defaults.document,\n this.fetch\n ))\n )\n }\n\n private _healthcareElementApi: IccHelementXApi | undefined\n\n get healthcareElementApi(): IccHelementXApi {\n return (\n this._healthcareElementApi ??\n (this._healthcareElementApi = new IccHelementXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.healthElement ?? EncryptedFieldsConfig.Defaults.healthElement,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _classificationApi: IccClassificationXApi | undefined\n\n get classificationApi(): IccClassificationXApi {\n return (\n this._classificationApi ??\n (this._classificationApi = new IccClassificationXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _calendarItemApi: IccCalendarItemXApi | undefined\n\n get calendarItemApi(): IccCalendarItemXApi {\n return (\n this._calendarItemApi ??\n (this._calendarItemApi = new IccCalendarItemXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.calendarItem ?? EncryptedFieldsConfig.Defaults.calendarItem,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _receiptApi: IccReceiptXApi | undefined\n\n get receiptApi(): IccReceiptXApi {\n return (\n this._receiptApi ??\n (this._receiptApi = new IccReceiptXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _timetableApi: IccTimeTableApi | undefined\n\n get timetableApi(): IccTimeTableApi {\n return (\n this._timetableApi ??\n (this._timetableApi = new IccTimeTableApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _patientApi: IccPatientXApi | undefined\n\n get patientApi(): IccPatientXApi {\n return (\n this._patientApi ??\n (this._patientApi = new IccPatientXApi(\n this.host,\n this.cryptoInitInfos.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.userApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.params.encryptedFieldsConfig.patient ?? EncryptedFieldsConfig.Defaults.patient,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _messageApi: IccMessageXApi | undefined\n\n get messageApi(): IccMessageXApi {\n return (\n this._messageApi ??\n (this._messageApi = new IccMessageXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.message ?? EncryptedFieldsConfig.Defaults.message,\n this.fetch\n ))\n )\n }\n\n private _topicApi: IccTopicXApi | undefined\n\n get topicApi(): IccTopicXApi {\n return (\n this._topicApi ??\n (this._topicApi = new IccTopicXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.dataOwnerApi,\n this.authApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n this.groupSpecificAuthenticationProvider,\n this.params.encryptedFieldsConfig.topic ?? EncryptedFieldsConfig.Defaults.topic,\n this.fetch\n ))\n )\n }\n\n private _anonymousAccessApi: IccAnonymousAccessApi | undefined\n\n get anonymousAccessApi(): IccAnonymousAccessApi {\n return (\n this._anonymousAccessApi ??\n (this._anonymousAccessApi = new IccAnonymousAccessApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _applicationSettingsApi: IccApplicationSettingsXApi | undefined\n\n get applicationSettingsApi(): IccApplicationSettingsXApi {\n return (\n this._applicationSettingsApi ??\n (this._applicationSettingsApi = new IccApplicationSettingsXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoInitInfos.cryptoApi,\n this.cryptoInitInfos.dataOwnerApi,\n !this.cryptoInitInfos.dataOwnerRequiresAnonymousDelegation,\n ['encryptedSettings'],\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _bekmehrApi: IccBekmehrXApi | undefined\n\n get bekmehrApi(): IccBekmehrXApi {\n return (\n this._bekmehrApi ??\n (this._bekmehrApi = new IccBekmehrXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.contactApi,\n this.healthcareElementApi,\n this.documentApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _beefactApi: IccBeefactApi | undefined\n\n get beefactApi(): IccBeefactApi {\n return (\n this._beefactApi ??\n (this._beefactApi = new IccBeefactApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _beresultexportApi: IccBeresultexportApi | undefined\n\n get beresultexportApi(): IccBeresultexportApi {\n return (\n this._beresultexportApi ??\n (this._beresultexportApi = new IccBeresultexportApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _beresultimportApi: IccBeresultimportApi | undefined\n\n get beresultimportApi(): IccBeresultimportApi {\n return (\n this._beresultimportApi ??\n (this._beresultimportApi = new IccBeresultimportApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _besamv2Api: IccBesamv2Api | undefined\n\n get besamv2Api(): IccBesamv2Api {\n return (\n this._besamv2Api ??\n (this._besamv2Api = new IccBesamv2Api(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _classificationTemplateApi: IccClassificationTemplateApi | undefined\n\n get classificationTemplateApi(): IccClassificationTemplateApi {\n return (\n this._classificationTemplateApi ??\n (this._classificationTemplateApi = new IccClassificationTemplateApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _doctemplateApi: IccDoctemplateXApi | undefined\n\n get doctemplateApi(): IccDoctemplateXApi {\n return (\n this._doctemplateApi ??\n (this._doctemplateApi = new IccDoctemplateXApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.cryptoApi,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _entitytemplateApi: IccEntitytemplateApi | undefined\n\n get entitytemplateApi(): IccEntitytemplateApi {\n return (\n this._entitytemplateApi ??\n (this._entitytemplateApi = new IccEntitytemplateApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _frontendmigrationApi: IccFrontendmigrationApi | undefined\n\n get frontendmigrationApi(): IccFrontendmigrationApi {\n return (\n this._frontendmigrationApi ??\n (this._frontendmigrationApi = new IccFrontendmigrationApi(\n this.host,\n this.cryptoInitInfos.headers,\n this.groupSpecificAuthenticationProvider,\n this.fetch\n ))\n )\n }\n\n private _icureApi: IccIcureApi | undefined\n\n get icureApi(): IccIcureApi {\n return (\n this._icureApi ??\n (this._icureApi = new IccIcureApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _keywordApi: IccKeywordApi | undefined\n\n get keywordApi(): IccKeywordApi {\n return (\n this._keywordApi ??\n (this._keywordApi = new IccKeywordApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _medexApi: IccMedexApi | undefined\n\n get medexApi(): IccMedexApi {\n return (\n this._medexApi ??\n (this._medexApi = new IccMedexApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _placeApi: IccPlaceApi | undefined\n\n get placeApi(): IccPlaceApi {\n return (\n this._placeApi ??\n (this._placeApi = new IccPlaceApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _pubsubApi: IccPubsubApi | undefined\n\n get pubsubApi(): IccPubsubApi {\n return (\n this._pubsubApi ??\n (this._pubsubApi = new IccPubsubApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _replicationApi: IccReplicationApi | undefined\n\n get replicationApi(): IccReplicationApi {\n return (\n this._replicationApi ??\n (this._replicationApi = new IccReplicationApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _tarificationApi: IccTarificationApi | undefined\n\n get tarificationApi(): IccTarificationApi {\n return (\n this._tarificationApi ??\n (this._tarificationApi = new IccTarificationApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n private _tmpApi: IccTmpApi | undefined\n\n get tmpApi(): IccTmpApi {\n return (\n this._tmpApi ?? (this._tmpApi = new IccTmpApi(this.host, this.cryptoInitInfos.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get cryptoApi(): IccCryptoXApi {\n return this.cryptoInitInfos.cryptoApi\n }\n\n get dataOwnerApi(): IccDataOwnerXApi {\n return this.cryptoInitInfos.dataOwnerApi\n }\n\n get deviceApi(): IccDeviceXApi {\n return this.cryptoInitInfos.deviceApi\n }\n\n get healthcarePartyApi(): IccHcpartyXApi {\n return this.cryptoInitInfos.healthcarePartyApi\n }\n\n get icureMaintenanceTaskApi(): IccIcureMaintenanceXApi {\n return this.cryptoInitInfos.icureMaintenanceTaskApi\n }\n\n get maintenanceTaskApi(): IccMaintenanceTaskXApi {\n return this.cryptoInitInfos.maintenanceTaskApi\n }\n\n get userApi(): IccUserXApi {\n return this.cryptoInitInfos.userApi\n }\n\n async getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; availableGroups: UserGroup[] }> {\n this.latestGroupsRequest = (this.grouplessUserApi ?? this.userApi).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 cryptoInitInfos = await initialiseCryptoWithProvider(\n this.host,\n this.fetch,\n switchedProvider,\n this.params,\n this.cryptoStrategies,\n this.cryptoApi.primitives,\n this.useLiteCompatibilityMode\n )\n return new IcureApiImpl(\n cryptoInitInfos,\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 this.useLiteCompatibilityMode\n )\n }\n}\n\nexport interface IcureBasicApi extends BasicApis {\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 userApi}, since the latter is specialised on the specific instance of the user in `currentGroup`.\n * - `currentGroup`: the group that this api instance is working on, or undefined if the backend environment is not multi-group.\n * - `availableGroups`: the list of groups that the current user can access with the provided secret. Empty if the backend environment is not\n * multi-group.\n */\n getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; 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<IcureBasicApi>\n}\n\nclass IcureBasicApiImpl implements IcureBasicApi {\n private latestGroupsRequest: Promise<UserGroup[]>\n private _accessLogApi: IccAccesslogApi | undefined\n private _agendaApi: IccAgendaApi | undefined\n private _authApi: IccAuthApi | undefined\n private _codeApi: IccCodeXApi | undefined\n private _deviceApi: IccDeviceXApi | undefined\n private _entityReferenceApi: IccEntityrefApi | undefined\n private _formApi: IccFormApi | undefined\n private _groupApi: IccGroupApi | undefined\n private _healthcarePartyApi: IccHcpartyXApi | undefined\n private _icureApi: IccIcureApi | undefined\n private _insuranceApi: IccInsuranceApi | undefined\n private _permissionApi: IccPermissionApi | undefined\n private _userApi: IccUserXApi | undefined\n private _patientApi: IccPatientApi | undefined\n private _pricingApi: IccTarificationApi | undefined\n private _roleApi: IccRoleApi | undefined\n\n get accessLogApi(): IccAccesslogApi {\n return (\n this._accessLogApi ?? (this._accessLogApi = new IccAccesslogApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get pricingApi(): IccTarificationApi {\n return (\n this._pricingApi ??\n (this._pricingApi = new IccTarificationApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get icureApi(): IccIcureApi {\n return (\n this._icureApi ?? (this._icureApi = new IccIcureApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, 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 authApi(): IccAuthApi {\n return this._authApi ?? (this._authApi = new IccAuthApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\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 deviceApi(): IccDeviceXApi {\n return (\n this._deviceApi ??\n (this._deviceApi = new IccDeviceXApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.userApi,\n this.authApi,\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 formApi(): IccFormApi {\n return this._formApi ?? (this._formApi = new IccFormApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\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 healthcarePartyApi(): IccHcpartyXApi {\n return (\n this._healthcarePartyApi ??\n (this._healthcarePartyApi = new IccHcpartyXApi(\n this.host,\n this.params.headers,\n this.groupSpecificAuthenticationProvider,\n this.authApi,\n this.fetch\n ))\n )\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 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 userApi(): IccUserXApi {\n return (\n this._userApi ??\n (this._userApi = new IccUserXApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.authApi, this.fetch))\n )\n }\n\n async getGroupsInfo(): Promise<{ currentGroup: UserGroup | undefined; availableGroups: UserGroup[] }> {\n if (!this.currentGroupInfo) return { currentGroup: undefined, availableGroups: [] }\n this.latestGroupsRequest = (this.grouplessUserApi ?? this.userApi).getMatchingUsers()\n return { currentGroup: this.currentGroupInfo, availableGroups: await this.latestGroupsRequest }\n }\n\n get patientApi(): IccPatientApi {\n return (\n this._patientApi ?? (this._patientApi = new IccPatientApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n )\n }\n\n get roleApi(): IccRoleApi {\n return this._roleApi ?? (this._roleApi = new IccRoleApi(this.host, this.params.headers, this.groupSpecificAuthenticationProvider, this.fetch))\n }\n\n async switchGroup(newGroupId: string): Promise<IcureBasicApi> {\n if (!this.currentGroupInfo) throw new Error('Cannot switch group: the backend environment does not support multiple groups.')\n const availableGroups = await this.latestGroupsRequest\n const switchedProvider = await this.groupSpecificAuthenticationProvider.switchGroup(newGroupId, availableGroups)\n return new IcureBasicApiImpl(\n this.host,\n switchedProvider,\n this.fetch,\n this.grouplessUserApi,\n availableGroups,\n availableGroups.find((x) => x.groupId === newGroupId)!,\n this.params\n )\n }\n\n constructor(\n private readonly host: string,\n private readonly groupSpecificAuthenticationProvider: AuthenticationProvider,\n private readonly fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>,\n private readonly grouplessUserApi: IccUserApi | undefined,\n latestMatches: UserGroup[],\n private readonly currentGroupInfo: UserGroup | undefined,\n private readonly params: IcureBasicApiOptions.WithDefaults\n ) {\n this.latestGroupsRequest = Promise.resolve(latestMatches)\n }\n}\n\nexport interface IcureBasicApiOptions {\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 * 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.\n * This functions will be called only if a user exists in at least 2 groups, and takes in input:\n * - the information on the groups the user can access (in no specific order)\n * - if the authentication method uses JWT also the current group id (undefined otherwise)\n * The function must return the id of one of the available 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[], currentGroupId?: string) => Promise<string>\n}\n\nnamespace IcureBasicApiOptions {\n export namespace Defaults {\n export const headers = {}\n }\n export class WithDefaults implements IcureBasicApiOptions {\n constructor(custom: IcureBasicApiOptions) {\n this.headers = custom.headers ?? Defaults.headers\n this.groupSelector = custom.groupSelector ?? ((groups) => Promise.resolve(groups[0].groupId!))\n }\n\n readonly headers: { [headerName: string]: string }\n readonly groupSelector: (availableGroupsInfo: UserGroup[]) => Promise<string>\n }\n}\n\nexport namespace IcureBasicApi {\n /**\n * Initialises a new instance of the iCure API.\n */\n export async function initialise(\n host: string,\n authenticationOptions: AuthenticationDetails | AuthenticationProvider,\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: IcureBasicApiOptions = {}\n ): Promise<IcureBasicApi> {\n const params = new IcureBasicApiOptions.WithDefaults(options)\n const authProviderInfo = await initialiseAuthProviderWithGroupSelector(\n host,\n authenticationOptions,\n params.headers ?? {},\n fetchImpl,\n params.groupSelector\n )\n return new IcureBasicApiImpl(\n host,\n authProviderInfo.groupSpecificAuthenticationProvider,\n fetch,\n authProviderInfo.grouplessUserApi,\n authProviderInfo.matches,\n authProviderInfo.matches.find((match) => match.groupId === authProviderInfo.chosenGroupId),\n params\n )\n }\n}\n\nasync function getMatchesOrEmpty(userApi: IccUserApi): Promise<UserGroup[]> {\n try {\n return await userApi.getMatchingUsers()\n } catch (err) {\n if (err instanceof Error && 'statusCode' in err && (err as any).statusCode === 404) return Promise.resolve([])\n else return Promise.reject(err)\n }\n}\n"]}
|