@icure/api 8.8.0 → 8.8.2
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 +48 -0
- package/icc-api/api/IccAccesslogApi.js +100 -0
- package/icc-api/api/IccAccesslogApi.js.map +1 -1
- package/icc-api/api/IccAgendaApi.d.ts +25 -0
- package/icc-api/api/IccAgendaApi.js +49 -0
- package/icc-api/api/IccAgendaApi.js.map +1 -1
- package/icc-api/api/IccCalendarItemApi.d.ts +25 -0
- package/icc-api/api/IccCalendarItemApi.js +49 -0
- package/icc-api/api/IccCalendarItemApi.js.map +1 -1
- package/icc-api/api/IccCalendarItemTypeApi.d.ts +25 -0
- package/icc-api/api/IccCalendarItemTypeApi.js +49 -0
- package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
- package/icc-api/api/IccCodeApi.d.ts +25 -0
- package/icc-api/api/IccCodeApi.js +49 -0
- package/icc-api/api/IccCodeApi.js.map +1 -1
- package/icc-api/api/IccContactApi.d.ts +48 -0
- package/icc-api/api/IccContactApi.js +100 -0
- package/icc-api/api/IccContactApi.js.map +1 -1
- package/icc-api/api/IccDeviceApi.d.ts +48 -0
- package/icc-api/api/IccDeviceApi.js +100 -0
- package/icc-api/api/IccDeviceApi.js.map +1 -1
- package/icc-api/api/IccDocumentApi.d.ts +48 -0
- package/icc-api/api/IccDocumentApi.js +100 -0
- package/icc-api/api/IccDocumentApi.js.map +1 -1
- package/icc-api/api/IccFormApi.d.ts +48 -0
- package/icc-api/api/IccFormApi.js +101 -4
- package/icc-api/api/IccFormApi.js.map +1 -1
- package/icc-api/api/IccHcpartyApi.d.ts +48 -0
- package/icc-api/api/IccHcpartyApi.js +100 -0
- package/icc-api/api/IccHcpartyApi.js.map +1 -1
- package/icc-api/api/IccHelementApi.d.ts +48 -0
- package/icc-api/api/IccHelementApi.js +100 -0
- package/icc-api/api/IccHelementApi.js.map +1 -1
- package/icc-api/api/IccInsuranceApi.d.ts +50 -2
- package/icc-api/api/IccInsuranceApi.js +100 -0
- package/icc-api/api/IccInsuranceApi.js.map +1 -1
- package/icc-api/api/IccInvoiceApi.d.ts +48 -0
- package/icc-api/api/IccInvoiceApi.js +100 -0
- package/icc-api/api/IccInvoiceApi.js.map +1 -1
- package/icc-api/api/IccMessageApi.d.ts +48 -0
- package/icc-api/api/IccMessageApi.js +100 -0
- package/icc-api/api/IccMessageApi.js.map +1 -1
- package/icc-api/api/IccPatientApi.d.ts +48 -0
- package/icc-api/api/IccPatientApi.js +100 -0
- package/icc-api/api/IccPatientApi.js.map +1 -1
- package/icc-api/api/IccPlaceApi.d.ts +25 -0
- package/icc-api/api/IccPlaceApi.js +49 -0
- package/icc-api/api/IccPlaceApi.js.map +1 -1
- package/icc-api/api/IccReceiptApi.d.ts +25 -0
- package/icc-api/api/IccReceiptApi.js +49 -0
- package/icc-api/api/IccReceiptApi.js.map +1 -1
- package/icc-api/api/IccTopicApi.d.ts +48 -0
- package/icc-api/api/IccTopicApi.js +100 -0
- package/icc-api/api/IccTopicApi.js.map +1 -1
- package/icc-api/api/IccUserApi.d.ts +25 -0
- package/icc-api/api/IccUserApi.js +49 -0
- package/icc-api/api/IccUserApi.js.map +1 -1
- package/icc-api/model/ConflictResolutionRequest.d.ts +18 -0
- package/icc-api/model/ConflictResolutionRequest.js +17 -0
- package/icc-api/model/ConflictResolutionRequest.js.map +1 -0
- package/icc-api/model/ConflictResolutionResult.d.ts +22 -0
- package/icc-api/model/ConflictResolutionResult.js +24 -0
- package/icc-api/model/ConflictResolutionResult.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-accesslog-x-api.d.ts +31 -0
- package/icc-x-api/icc-accesslog-x-api.js +57 -0
- package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
- package/icc-x-api/icc-calendar-item-x-api.d.ts +15 -0
- package/icc-x-api/icc-calendar-item-x-api.js +28 -0
- package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
- package/icc-x-api/icc-contact-x-api.d.ts +31 -0
- package/icc-x-api/icc-contact-x-api.js +60 -1
- package/icc-x-api/icc-contact-x-api.js.map +1 -1
- package/icc-x-api/icc-document-x-api.d.ts +31 -0
- package/icc-x-api/icc-document-x-api.js +64 -0
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-form-x-api.d.ts +31 -0
- package/icc-x-api/icc-form-x-api.js +58 -0
- package/icc-x-api/icc-form-x-api.js.map +1 -1
- package/icc-x-api/icc-helement-x-api.d.ts +31 -0
- package/icc-x-api/icc-helement-x-api.js +57 -0
- package/icc-x-api/icc-helement-x-api.js.map +1 -1
- package/icc-x-api/icc-invoice-x-api.d.ts +31 -0
- package/icc-x-api/icc-invoice-x-api.js +58 -0
- package/icc-x-api/icc-invoice-x-api.js.map +1 -1
- package/icc-x-api/icc-message-x-api.d.ts +31 -0
- package/icc-x-api/icc-message-x-api.js +64 -0
- package/icc-x-api/icc-message-x-api.js.map +1 -1
- package/icc-x-api/icc-patient-x-api.d.ts +31 -0
- package/icc-x-api/icc-patient-x-api.js +57 -0
- package/icc-x-api/icc-patient-x-api.js.map +1 -1
- package/icc-x-api/icc-topic-x-api.d.ts +31 -0
- package/icc-x-api/icc-topic-x-api.js +58 -0
- package/icc-x-api/icc-topic-x-api.js.map +1 -1
- package/icc-x-api/utils/formatting-util.d.ts +10 -4
- package/icc-x-api/utils/formatting-util.js +47 -6
- package/icc-x-api/utils/formatting-util.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ const utils_1 = require("./utils");
|
|
|
20
20
|
var AccessLevelEnum = SecureDelegation_1.SecureDelegation.AccessLevelEnum;
|
|
21
21
|
const SecretIdUseOption_1 = require("./crypto/SecretIdUseOption");
|
|
22
22
|
const compression_utils_1 = require("./utils/compression-utils");
|
|
23
|
+
const collection_utils_1 = require("./utils/collection-utils");
|
|
23
24
|
// noinspection JSUnusedGlobalSymbols
|
|
24
25
|
class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
25
26
|
constructor(host, headers, crypto, authApi, dataOwnerApi, autofillAuthor, authenticationProvider = new AuthenticationProvider_1.NoAuthenticationProvider(), encryptedKeys = [], fetchImpl = typeof window !== 'undefined'
|
|
@@ -1155,6 +1156,69 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
1155
1156
|
deleteSecondaryAttachment(documentId, key, rev) {
|
|
1156
1157
|
throw new Error('Use withUser method');
|
|
1157
1158
|
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Like {@link getConflictsForEntity} but additionally decrypts the conflicting revisions.
|
|
1161
|
+
* @param user the current user (unused for documents, kept for API consistency).
|
|
1162
|
+
* @param entityId the id of the document to retrieve the conflicts for.
|
|
1163
|
+
* @return the decrypted conflicting revisions of the document.
|
|
1164
|
+
*/
|
|
1165
|
+
getConflictsForEntityWithUser(user, entityId) {
|
|
1166
|
+
return super
|
|
1167
|
+
.getConflictsForEntity(entityId)
|
|
1168
|
+
.then((ds) => this.decrypt(ds))
|
|
1169
|
+
.then((res) => res.map(({ entity }) => entity));
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Like {@link declareConflictWinner} but encrypts the winning revision before sending it and decrypts the saved
|
|
1173
|
+
* winner returned by the backend.
|
|
1174
|
+
* @param user the current user (unused for documents, kept for API consistency).
|
|
1175
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
1176
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
1177
|
+
*/
|
|
1178
|
+
declareConflictWinnerWithUser(user, request) {
|
|
1179
|
+
const _super = Object.create(null, {
|
|
1180
|
+
declareConflictWinner: { get: () => super.declareConflictWinner }
|
|
1181
|
+
});
|
|
1182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1183
|
+
const encrypted = (yield this.encrypt([(0, collection_utils_1.cloneDeep)(request.document)]))[0];
|
|
1184
|
+
const result = yield _super.declareConflictWinner.call(this, Object.assign(Object.assign({}, request), { document: encrypted }));
|
|
1185
|
+
if (result.document)
|
|
1186
|
+
result.document = (yield this.decrypt([result.document]))[0].entity;
|
|
1187
|
+
return result;
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Like {@link getConflictsForEntityWithUser} but targets the entity of the group with the given id.
|
|
1192
|
+
* @param user the current user (unused for documents, kept for API consistency).
|
|
1193
|
+
* @param groupId the id of the group the document belongs to.
|
|
1194
|
+
* @param entityId the id of the document to retrieve the conflicts for.
|
|
1195
|
+
* @return the decrypted conflicting revisions of the document.
|
|
1196
|
+
*/
|
|
1197
|
+
getConflictsForEntityInGroupWithUser(user, groupId, entityId) {
|
|
1198
|
+
return super
|
|
1199
|
+
.getConflictsForEntityInGroup(groupId, entityId)
|
|
1200
|
+
.then((ds) => this.decrypt(ds))
|
|
1201
|
+
.then((res) => res.map(({ entity }) => entity));
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Like {@link declareConflictWinnerWithUser} but targets the entity of the group with the given id.
|
|
1205
|
+
* @param user the current user (unused for documents, kept for API consistency).
|
|
1206
|
+
* @param groupId the id of the group the document belongs to.
|
|
1207
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
1208
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
1209
|
+
*/
|
|
1210
|
+
declareConflictWinnerInGroupWithUser(user, groupId, request) {
|
|
1211
|
+
const _super = Object.create(null, {
|
|
1212
|
+
declareConflictWinnerInGroup: { get: () => super.declareConflictWinnerInGroup }
|
|
1213
|
+
});
|
|
1214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1215
|
+
const encrypted = (yield this.encrypt([(0, collection_utils_1.cloneDeep)(request.document)]))[0];
|
|
1216
|
+
const result = yield _super.declareConflictWinnerInGroup.call(this, groupId, Object.assign(Object.assign({}, request), { document: encrypted }));
|
|
1217
|
+
if (result.document)
|
|
1218
|
+
result.document = (yield this.decrypt([result.document]))[0].entity;
|
|
1219
|
+
return result;
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1158
1222
|
}
|
|
1159
1223
|
exports.IccDocumentXApi = IccDocumentXApi;
|
|
1160
1224
|
//# sourceMappingURL=icc-document-x-api.js.map
|