@icure/api 8.8.6 → 8.9.1
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/IccAccesslogApi.d.ts +20 -0
- package/icc-api/api/IccAccesslogApi.js +41 -0
- package/icc-api/api/IccAccesslogApi.js.map +1 -1
- package/icc-api/api/IccAgendaApi.d.ts +20 -0
- package/icc-api/api/IccAgendaApi.js +41 -0
- package/icc-api/api/IccAgendaApi.js.map +1 -1
- package/icc-api/api/IccCalendarItemApi.d.ts +20 -0
- package/icc-api/api/IccCalendarItemApi.js +41 -0
- package/icc-api/api/IccCalendarItemApi.js.map +1 -1
- package/icc-api/api/IccCalendarItemTypeApi.d.ts +20 -0
- package/icc-api/api/IccCalendarItemTypeApi.js +41 -0
- package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
- package/icc-api/api/IccCodeApi.d.ts +20 -0
- package/icc-api/api/IccCodeApi.js +41 -0
- package/icc-api/api/IccCodeApi.js.map +1 -1
- package/icc-api/api/IccContactApi.d.ts +20 -0
- package/icc-api/api/IccContactApi.js +41 -0
- package/icc-api/api/IccContactApi.js.map +1 -1
- package/icc-api/api/IccDeviceApi.d.ts +20 -0
- package/icc-api/api/IccDeviceApi.js +41 -0
- package/icc-api/api/IccDeviceApi.js.map +1 -1
- package/icc-api/api/IccDocumentApi.d.ts +20 -0
- package/icc-api/api/IccDocumentApi.js +41 -0
- package/icc-api/api/IccDocumentApi.js.map +1 -1
- package/icc-api/api/IccFormApi.d.ts +20 -0
- package/icc-api/api/IccFormApi.js +41 -0
- package/icc-api/api/IccFormApi.js.map +1 -1
- package/icc-api/api/IccHcpartyApi.d.ts +20 -0
- package/icc-api/api/IccHcpartyApi.js +41 -0
- package/icc-api/api/IccHcpartyApi.js.map +1 -1
- package/icc-api/api/IccHelementApi.d.ts +20 -0
- package/icc-api/api/IccHelementApi.js +41 -0
- package/icc-api/api/IccHelementApi.js.map +1 -1
- package/icc-api/api/IccInsuranceApi.d.ts +20 -0
- package/icc-api/api/IccInsuranceApi.js +41 -0
- package/icc-api/api/IccInsuranceApi.js.map +1 -1
- package/icc-api/api/IccInvoiceApi.d.ts +20 -0
- package/icc-api/api/IccInvoiceApi.js +41 -0
- package/icc-api/api/IccInvoiceApi.js.map +1 -1
- package/icc-api/api/IccMessageApi.d.ts +20 -0
- package/icc-api/api/IccMessageApi.js +41 -0
- package/icc-api/api/IccMessageApi.js.map +1 -1
- package/icc-api/api/IccPatientApi.d.ts +20 -0
- package/icc-api/api/IccPatientApi.js +41 -0
- package/icc-api/api/IccPatientApi.js.map +1 -1
- package/icc-api/api/IccPlaceApi.d.ts +20 -0
- package/icc-api/api/IccPlaceApi.js +41 -0
- package/icc-api/api/IccPlaceApi.js.map +1 -1
- package/icc-api/api/IccReceiptApi.d.ts +20 -0
- package/icc-api/api/IccReceiptApi.js +42 -1
- package/icc-api/api/IccReceiptApi.js.map +1 -1
- package/icc-api/api/IccTopicApi.d.ts +20 -0
- package/icc-api/api/IccTopicApi.js +41 -0
- package/icc-api/api/IccTopicApi.js.map +1 -1
- package/icc-api/api/IccUserApi.d.ts +20 -0
- package/icc-api/api/IccUserApi.js +41 -0
- package/icc-api/api/IccUserApi.js.map +1 -1
- package/icc-api/model/ConflictResolutionStrategy.d.ts +17 -0
- package/icc-api/model/ConflictResolutionStrategy.js +22 -0
- package/icc-api/model/ConflictResolutionStrategy.js.map +1 -0
- package/icc-api/model/MergeResult.d.ts +33 -0
- package/icc-api/model/MergeResult.js +27 -0
- package/icc-api/model/MergeResult.js.map +1 -0
- package/icc-api/model/models.d.ts +2 -0
- package/icc-api/model/models.js +2 -0
- package/icc-api/model/models.js.map +1 -1
- package/icc-x-api/icc-document-x-api.js +12 -8
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-receipt-x-api.js +6 -8
- package/icc-x-api/icc-receipt-x-api.js.map +1 -1
- package/icc-x-api/utils/compression-utils.js +3 -7
- package/icc-x-api/utils/compression-utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ import { AbstractFilterInsurance } from '../model/AbstractFilterInsurance';
|
|
|
19
19
|
import { TimingInfo } from '../model/TimingInfo';
|
|
20
20
|
import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest';
|
|
21
21
|
import { ConflictResolutionResult } from '../model/ConflictResolutionResult';
|
|
22
|
+
import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy';
|
|
23
|
+
import { MergeResult } from '../model/MergeResult';
|
|
22
24
|
export declare class IccInsuranceApi {
|
|
23
25
|
host: string;
|
|
24
26
|
headers: Array<XHR.Header>;
|
|
@@ -132,4 +134,22 @@ export declare class IccInsuranceApi {
|
|
|
132
134
|
* @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
|
|
133
135
|
*/
|
|
134
136
|
declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Insurance>): Promise<ConflictResolutionResult<Insurance>>;
|
|
137
|
+
/**
|
|
138
|
+
* Automatically resolves the conflicting revisions of the insurances with the given ids, according to the provided
|
|
139
|
+
* {@link ConflictResolutionStrategy}.
|
|
140
|
+
* @summary Automatically solve the conflicts of the insurances with the given ids.
|
|
141
|
+
* @param entityIds the ids of the insurances to solve the conflicts for.
|
|
142
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
143
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
144
|
+
*/
|
|
145
|
+
autoSolveConflicts(entityIds: Array<string>, strategy?: ConflictResolutionStrategy): Promise<Array<MergeResult>>;
|
|
146
|
+
/**
|
|
147
|
+
* Like {@link autoSolveConflicts} but targets the entities of the group with the given id.
|
|
148
|
+
* @summary Automatically solve the conflicts of the insurances with the given ids, in the given group.
|
|
149
|
+
* @param groupId the id of the group to look into.
|
|
150
|
+
* @param entityIds the ids of the insurances to solve the conflicts for.
|
|
151
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
152
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
153
|
+
*/
|
|
154
|
+
autoSolveConflictsInGroup(groupId: string, entityIds: Array<string>, strategy?: ConflictResolutionStrategy): Promise<Array<MergeResult>>;
|
|
135
155
|
}
|
|
@@ -29,6 +29,8 @@ const IccRestApiPath_1 = require("./IccRestApiPath");
|
|
|
29
29
|
const PaginatedListInsurance_1 = require("../model/PaginatedListInsurance");
|
|
30
30
|
const Insurance_1 = require("../model/Insurance");
|
|
31
31
|
const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
|
|
32
|
+
const ConflictResolutionStrategy_1 = require("../model/ConflictResolutionStrategy");
|
|
33
|
+
const MergeResult_1 = require("../model/MergeResult");
|
|
32
34
|
class IccInsuranceApi {
|
|
33
35
|
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
34
36
|
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
@@ -306,6 +308,45 @@ class IccInsuranceApi {
|
|
|
306
308
|
.catch((err) => this.handleError(err));
|
|
307
309
|
});
|
|
308
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Automatically resolves the conflicting revisions of the insurances with the given ids, according to the provided
|
|
313
|
+
* {@link ConflictResolutionStrategy}.
|
|
314
|
+
* @summary Automatically solve the conflicts of the insurances with the given ids.
|
|
315
|
+
* @param entityIds the ids of the insurances to solve the conflicts for.
|
|
316
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
317
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
318
|
+
*/
|
|
319
|
+
autoSolveConflicts(entityIds_1) {
|
|
320
|
+
return __awaiter(this, arguments, void 0, function* (entityIds, strategy = ConflictResolutionStrategy_1.ConflictResolutionStrategy.FullMergeability) {
|
|
321
|
+
const _url = this.host + `/insurance/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` + '&ts=' + new Date().getTime();
|
|
322
|
+
let headers = yield this.headers;
|
|
323
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
324
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
325
|
+
.then((doc) => doc.body.map((it) => new MergeResult_1.MergeResult(it)))
|
|
326
|
+
.catch((err) => this.handleError(err));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Like {@link autoSolveConflicts} but targets the entities of the group with the given id.
|
|
331
|
+
* @summary Automatically solve the conflicts of the insurances with the given ids, in the given group.
|
|
332
|
+
* @param groupId the id of the group to look into.
|
|
333
|
+
* @param entityIds the ids of the insurances to solve the conflicts for.
|
|
334
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
335
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
336
|
+
*/
|
|
337
|
+
autoSolveConflictsInGroup(groupId_1, entityIds_1) {
|
|
338
|
+
return __awaiter(this, arguments, void 0, function* (groupId, entityIds, strategy = ConflictResolutionStrategy_1.ConflictResolutionStrategy.FullMergeability) {
|
|
339
|
+
const _url = this.host +
|
|
340
|
+
`/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` +
|
|
341
|
+
'&ts=' +
|
|
342
|
+
new Date().getTime();
|
|
343
|
+
let headers = yield this.headers;
|
|
344
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
345
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
346
|
+
.then((doc) => doc.body.map((it) => new MergeResult_1.MergeResult(it)))
|
|
347
|
+
.catch((err) => this.handleError(err));
|
|
348
|
+
});
|
|
349
|
+
}
|
|
309
350
|
}
|
|
310
351
|
exports.IccInsuranceApi = IccInsuranceApi;
|
|
311
352
|
//# sourceMappingURL=IccInsuranceApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IccInsuranceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccInsuranceApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AACjD,4EAAwE;AACxE,kDAA8C;AAI9C,gFAA4E;AAE5E,MAAa,eAAe;IAM1B,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACG,eAAe,CAAC,IAAgB;;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACrE,IAAI,OAAO,GAA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,IAA0C;;YAC5F,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,sBAAsB,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,mBAAmB,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACrI,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;YAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mDAAwB,CAAY,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,qBAAS,CAAC,CAAC,CAAC,CAAC,CAAC;iBACzF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAxTD,0CAwTC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { PaginatedListInsurance } from '../model/PaginatedListInsurance'\nimport { Insurance } from '../model/Insurance'\nimport { AbstractFilterInsurance } from '../model/AbstractFilterInsurance'\nimport { TimingInfo } from '../model/TimingInfo'\nimport { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'\nimport { ConflictResolutionResult } from '../model/ConflictResolutionResult'\n\nexport class IccInsuranceApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n *\n * @summary Creates an insurance\n * @param body\n */\n async createInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Deletes an insurance\n * @param insuranceId\n */\n async deleteInsurance(insuranceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(insuranceId)}` + '?ts=' + new Date().getTime()\n let headers = 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 *\n * @summary Gets an insurance\n * @param insuranceId\n */\n async getInsurance(insuranceId: string): Promise<Insurance> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(String(insuranceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets insurances by id\n * @param body\n */\n async getInsurances(body?: ListOfIds): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceCode\n */\n async listInsurancesByCode(insuranceCode: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byCode/${encodeURIComponent(String(insuranceCode))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceName\n */\n async listInsurancesByName(insuranceName: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byName/${encodeURIComponent(String(insuranceName))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an insurance\n * @param body\n */\n async modifyInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n getAllInsurances(startDocumentId?: string, limit?: number): Promise<PaginatedListInsurance> {\n let _body = null\n\n const _url =\n this.host +\n `/insurance?ts=` +\n new Date().getTime() +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${encodeURIComponent(limit)}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListInsurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n modifyInsurancesInGroup(groupId: string, insurances?: Array<Insurance>): Promise<Array<Insurance>> {\n let _body = null\n _body = insurances\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n createInsurancesInGroup(groupId: string, insurances?: Array<Insurance>): Promise<Array<Insurance>> {\n let _body = null\n _body = insurances\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get a list of insurances by ids/keys.\n * @summary Gets a list of insurances by ids\n * @param insuranceIds\n */\n async getInsurancesInGroup(groupId: string, insuranceIds: string[]): Promise<Array<Insurance>> {\n const body = new ListOfIds({ ids: insuranceIds })\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get ids of code matching the provided filter for the current user (HcParty)\n * @param body\n * @param collectTiming if true, include server-side filter timing information in the response\n */\n matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: false): Promise<Array<string>>\n matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: true): Promise<Array<string> & TimingInfo>\n async matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming: boolean = false): Promise<Array<string>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/match` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n _url,\n headers,\n _body,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService(),\n undefined,\n false,\n collectTiming ? ['x-filter-timing-*'] : []\n )\n .then((doc) =>\n Object.assign(\n (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))),\n collectTiming ? { responseHeaders: doc.responseHeaders } : {}\n )\n )\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves the ids of all the insurances that currently have conflicting revisions and therefore need to\n * be resolved.\n * @summary List the ids of the insurances that have conflicts.\n * @return the ids of the insurances with unresolved conflicts.\n */\n async getConflictingEntitiesIds(): Promise<Array<string>> {\n const _url = this.host + `/insurance/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves all the conflicting revisions of the insurance with the given id (the current revision is not\n * included). The returned entities are still encrypted.\n * @summary Get the conflicting revisions of an insurance.\n * @param entityId the id of the insurance to retrieve the conflicts for.\n * @return the conflicting revisions of the insurance.\n */\n async getConflictsForEntity(entityId: string): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/conflicts/of?entityId=${encodeURIComponent(String(entityId))}` + '&ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Resolves a conflict by declaring which revision of the insurance should be kept as winner and which\n * conflicting revisions should be purged. The provided document must already be encrypted.\n * @summary Declare the winning revision of a conflicting insurance.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinner(body: ConflictResolutionRequest<Insurance>): Promise<ConflictResolutionResult<Insurance>> {\n const _url = this.host + `/insurance/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Insurance>(doc.body, (x) => new Insurance(x)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id.\n * @summary List the ids of the insurances that have conflicts, in the given group.\n * @param groupId the id of the group to look into.\n * @return the ids of the insurances with unresolved conflicts in the group.\n */\n async getConflictingEntitiesIdsInGroup(groupId: string): Promise<Array<string>> {\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictsForEntity} but targets the entity of the group with the given id.\n * @summary Get the conflicting revisions of an insurance, in the given group.\n * @param groupId the id of the group the insurance belongs to.\n * @param entityId the id of the insurance to retrieve the conflicts for.\n * @return the conflicting revisions of the insurance.\n */\n async getConflictsForEntityInGroup(groupId: string, entityId: string): Promise<Array<Insurance>> {\n const _url =\n this.host +\n `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/of?entityId=${encodeURIComponent(String(entityId))}` +\n '&ts=' +\n new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link declareConflictWinner} but targets the entity of the group with the given id.\n * @summary Declare the winning revision of a conflicting insurance, in the given group.\n * @param groupId the id of the group the insurance belongs to.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Insurance>): Promise<ConflictResolutionResult<Insurance>> {\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Insurance>(doc.body, (x) => new Insurance(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IccInsuranceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccInsuranceApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AACjD,4EAAwE;AACxE,kDAA8C;AAI9C,gFAA4E;AAC5E,oFAAgF;AAChF,sDAAkD;AAElD,MAAa,eAAe;IAM1B,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IA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AC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC9H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,yBAAW,CAAC,EAAE,CAAC,CAAC,CAAC;iBACzE,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AArWD,0CAqWC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { PaginatedListInsurance } from '../model/PaginatedListInsurance'\nimport { Insurance } from '../model/Insurance'\nimport { AbstractFilterInsurance } from '../model/AbstractFilterInsurance'\nimport { TimingInfo } from '../model/TimingInfo'\nimport { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'\nimport { ConflictResolutionResult } from '../model/ConflictResolutionResult'\nimport { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'\nimport { MergeResult } from '../model/MergeResult'\n\nexport class IccInsuranceApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n *\n * @summary Creates an insurance\n * @param body\n */\n async createInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Deletes an insurance\n * @param insuranceId\n */\n async deleteInsurance(insuranceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(insuranceId)}` + '?ts=' + new Date().getTime()\n let headers = 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 *\n * @summary Gets an insurance\n * @param insuranceId\n */\n async getInsurance(insuranceId: string): Promise<Insurance> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(String(insuranceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets insurances by id\n * @param body\n */\n async getInsurances(body?: ListOfIds): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceCode\n */\n async listInsurancesByCode(insuranceCode: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byCode/${encodeURIComponent(String(insuranceCode))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceName\n */\n async listInsurancesByName(insuranceName: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byName/${encodeURIComponent(String(insuranceName))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an insurance\n * @param body\n */\n async modifyInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n getAllInsurances(startDocumentId?: string, limit?: number): Promise<PaginatedListInsurance> {\n let _body = null\n\n const _url =\n this.host +\n `/insurance?ts=` +\n new Date().getTime() +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${encodeURIComponent(limit)}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListInsurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n modifyInsurancesInGroup(groupId: string, insurances?: Array<Insurance>): Promise<Array<Insurance>> {\n let _body = null\n _body = insurances\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n createInsurancesInGroup(groupId: string, insurances?: Array<Insurance>): Promise<Array<Insurance>> {\n let _body = null\n _body = insurances\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get a list of insurances by ids/keys.\n * @summary Gets a list of insurances by ids\n * @param insuranceIds\n */\n async getInsurancesInGroup(groupId: string, insuranceIds: string[]): Promise<Array<Insurance>> {\n const body = new ListOfIds({ ids: insuranceIds })\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get ids of code matching the provided filter for the current user (HcParty)\n * @param body\n * @param collectTiming if true, include server-side filter timing information in the response\n */\n matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: false): Promise<Array<string>>\n matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: true): Promise<Array<string> & TimingInfo>\n async matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming: boolean = false): Promise<Array<string>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/match` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n _url,\n headers,\n _body,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService(),\n undefined,\n false,\n collectTiming ? ['x-filter-timing-*'] : []\n )\n .then((doc) =>\n Object.assign(\n (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))),\n collectTiming ? { responseHeaders: doc.responseHeaders } : {}\n )\n )\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves the ids of all the insurances that currently have conflicting revisions and therefore need to\n * be resolved.\n * @summary List the ids of the insurances that have conflicts.\n * @return the ids of the insurances with unresolved conflicts.\n */\n async getConflictingEntitiesIds(): Promise<Array<string>> {\n const _url = this.host + `/insurance/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves all the conflicting revisions of the insurance with the given id (the current revision is not\n * included). The returned entities are still encrypted.\n * @summary Get the conflicting revisions of an insurance.\n * @param entityId the id of the insurance to retrieve the conflicts for.\n * @return the conflicting revisions of the insurance.\n */\n async getConflictsForEntity(entityId: string): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/conflicts/of?entityId=${encodeURIComponent(String(entityId))}` + '&ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Resolves a conflict by declaring which revision of the insurance should be kept as winner and which\n * conflicting revisions should be purged. The provided document must already be encrypted.\n * @summary Declare the winning revision of a conflicting insurance.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinner(body: ConflictResolutionRequest<Insurance>): Promise<ConflictResolutionResult<Insurance>> {\n const _url = this.host + `/insurance/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Insurance>(doc.body, (x) => new Insurance(x)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id.\n * @summary List the ids of the insurances that have conflicts, in the given group.\n * @param groupId the id of the group to look into.\n * @return the ids of the insurances with unresolved conflicts in the group.\n */\n async getConflictingEntitiesIdsInGroup(groupId: string): Promise<Array<string>> {\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictsForEntity} but targets the entity of the group with the given id.\n * @summary Get the conflicting revisions of an insurance, in the given group.\n * @param groupId the id of the group the insurance belongs to.\n * @param entityId the id of the insurance to retrieve the conflicts for.\n * @return the conflicting revisions of the insurance.\n */\n async getConflictsForEntityInGroup(groupId: string, entityId: string): Promise<Array<Insurance>> {\n const _url =\n this.host +\n `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/of?entityId=${encodeURIComponent(String(entityId))}` +\n '&ts=' +\n new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link declareConflictWinner} but targets the entity of the group with the given id.\n * @summary Declare the winning revision of a conflicting insurance, in the given group.\n * @param groupId the id of the group the insurance belongs to.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Insurance>): Promise<ConflictResolutionResult<Insurance>> {\n const _url = this.host + `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Insurance>(doc.body, (x) => new Insurance(x)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Automatically resolves the conflicting revisions of the insurances with the given ids, according to the provided\n * {@link ConflictResolutionStrategy}.\n * @summary Automatically solve the conflicts of the insurances with the given ids.\n * @param entityIds the ids of the insurances to solve the conflicts for.\n * @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.\n * @return the {@link MergeResult} of the conflict resolution for each requested entity.\n */\n async autoSolveConflicts(\n entityIds: Array<string>,\n strategy: ConflictResolutionStrategy = ConflictResolutionStrategy.FullMergeability\n ): Promise<Array<MergeResult>> {\n const _url = this.host + `/insurance/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` + '&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, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new MergeResult(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link autoSolveConflicts} but targets the entities of the group with the given id.\n * @summary Automatically solve the conflicts of the insurances with the given ids, in the given group.\n * @param groupId the id of the group to look into.\n * @param entityIds the ids of the insurances to solve the conflicts for.\n * @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.\n * @return the {@link MergeResult} of the conflict resolution for each requested entity.\n */\n async autoSolveConflictsInGroup(\n groupId: string,\n entityIds: Array<string>,\n strategy: ConflictResolutionStrategy = ConflictResolutionStrategy.FullMergeability\n ): Promise<Array<MergeResult>> {\n const _url =\n this.host +\n `/insurance/inGroup/${encodeURIComponent(String(groupId))}/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` +\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('POST', _url, headers, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new MergeResult(it)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -25,6 +25,8 @@ import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUp
|
|
|
25
25
|
import { TimingInfo } from '../model/TimingInfo';
|
|
26
26
|
import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest';
|
|
27
27
|
import { ConflictResolutionResult } from '../model/ConflictResolutionResult';
|
|
28
|
+
import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy';
|
|
29
|
+
import { MergeResult } from '../model/MergeResult';
|
|
28
30
|
export declare class IccInvoiceApi {
|
|
29
31
|
host: string;
|
|
30
32
|
_headers: Array<XHR.Header>;
|
|
@@ -334,4 +336,22 @@ export declare class IccInvoiceApi {
|
|
|
334
336
|
* @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
|
|
335
337
|
*/
|
|
336
338
|
declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Invoice>): Promise<ConflictResolutionResult<Invoice>>;
|
|
339
|
+
/**
|
|
340
|
+
* Automatically resolves the conflicting revisions of the invoices with the given ids, according to the provided
|
|
341
|
+
* {@link ConflictResolutionStrategy}.
|
|
342
|
+
* @summary Automatically solve the conflicts of the invoices with the given ids.
|
|
343
|
+
* @param entityIds the ids of the invoices to solve the conflicts for.
|
|
344
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
345
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
346
|
+
*/
|
|
347
|
+
autoSolveConflicts(entityIds: Array<string>, strategy?: ConflictResolutionStrategy): Promise<Array<MergeResult>>;
|
|
348
|
+
/**
|
|
349
|
+
* Like {@link autoSolveConflicts} but targets the entities of the group with the given id.
|
|
350
|
+
* @summary Automatically solve the conflicts of the invoices with the given ids, in the given group.
|
|
351
|
+
* @param groupId the id of the group to look into.
|
|
352
|
+
* @param entityIds the ids of the invoices to solve the conflicts for.
|
|
353
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
354
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
355
|
+
*/
|
|
356
|
+
autoSolveConflictsInGroup(groupId: string, entityIds: Array<string>, strategy?: ConflictResolutionStrategy): Promise<Array<MergeResult>>;
|
|
337
357
|
}
|
|
@@ -33,6 +33,8 @@ const IccRestApiPath_1 = require("./IccRestApiPath");
|
|
|
33
33
|
const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
|
|
34
34
|
const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
|
|
35
35
|
const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
|
|
36
|
+
const ConflictResolutionStrategy_1 = require("../model/ConflictResolutionStrategy");
|
|
37
|
+
const MergeResult_1 = require("../model/MergeResult");
|
|
36
38
|
class IccInvoiceApi {
|
|
37
39
|
get headers() {
|
|
38
40
|
return Promise.resolve(this._headers);
|
|
@@ -815,6 +817,45 @@ class IccInvoiceApi {
|
|
|
815
817
|
.catch((err) => this.handleError(err));
|
|
816
818
|
});
|
|
817
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* Automatically resolves the conflicting revisions of the invoices with the given ids, according to the provided
|
|
822
|
+
* {@link ConflictResolutionStrategy}.
|
|
823
|
+
* @summary Automatically solve the conflicts of the invoices with the given ids.
|
|
824
|
+
* @param entityIds the ids of the invoices to solve the conflicts for.
|
|
825
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
826
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
827
|
+
*/
|
|
828
|
+
autoSolveConflicts(entityIds_1) {
|
|
829
|
+
return __awaiter(this, arguments, void 0, function* (entityIds, strategy = ConflictResolutionStrategy_1.ConflictResolutionStrategy.FullMergeability) {
|
|
830
|
+
const _url = this.host + `/invoice/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` + '&ts=' + new Date().getTime();
|
|
831
|
+
let headers = yield this.headers;
|
|
832
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
833
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
834
|
+
.then((doc) => doc.body.map((it) => new MergeResult_1.MergeResult(it)))
|
|
835
|
+
.catch((err) => this.handleError(err));
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Like {@link autoSolveConflicts} but targets the entities of the group with the given id.
|
|
840
|
+
* @summary Automatically solve the conflicts of the invoices with the given ids, in the given group.
|
|
841
|
+
* @param groupId the id of the group to look into.
|
|
842
|
+
* @param entityIds the ids of the invoices to solve the conflicts for.
|
|
843
|
+
* @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`.
|
|
844
|
+
* @return the {@link MergeResult} of the conflict resolution for each requested entity.
|
|
845
|
+
*/
|
|
846
|
+
autoSolveConflictsInGroup(groupId_1, entityIds_1) {
|
|
847
|
+
return __awaiter(this, arguments, void 0, function* (groupId, entityIds, strategy = ConflictResolutionStrategy_1.ConflictResolutionStrategy.FullMergeability) {
|
|
848
|
+
const _url = this.host +
|
|
849
|
+
`/invoice/inGroup/${encodeURIComponent(String(groupId))}/conflicts/solve?strategy=${encodeURIComponent(String(strategy))}` +
|
|
850
|
+
'&ts=' +
|
|
851
|
+
new Date().getTime();
|
|
852
|
+
let headers = yield this.headers;
|
|
853
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
854
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, entityIds, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
855
|
+
.then((doc) => doc.body.map((it) => new MergeResult_1.MergeResult(it)))
|
|
856
|
+
.catch((err) => this.handleError(err));
|
|
857
|
+
});
|
|
858
|
+
}
|
|
818
859
|
}
|
|
819
860
|
exports.IccInvoiceApi = IccInvoiceApi;
|
|
820
861
|
//# sourceMappingURL=IccInvoiceApi.js.map
|