@icure/api 8.8.0 → 8.8.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 +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/package.json +1 -1
|
@@ -497,4 +497,35 @@ export declare class IccContactXApi extends IccContactApi implements EncryptedEn
|
|
|
497
497
|
* @return a promise that completes when the metadata is created/updated
|
|
498
498
|
*/
|
|
499
499
|
createDelegationDeAnonymizationMetadata(entity: Contact, delegates: string[]): Promise<void>;
|
|
500
|
+
/**
|
|
501
|
+
* Like {@link getConflictsForEntity} but additionally decrypts the conflicting revisions for the given user.
|
|
502
|
+
* @param user the current user, used to determine the data owner that will decrypt the entities.
|
|
503
|
+
* @param entityId the id of the contact to retrieve the conflicts for.
|
|
504
|
+
* @return the decrypted conflicting revisions of the contact.
|
|
505
|
+
*/
|
|
506
|
+
getConflictsForEntityWithUser(user: models.User, entityId: string): Promise<Array<models.Contact>>;
|
|
507
|
+
/**
|
|
508
|
+
* Like {@link declareConflictWinner} but encrypts the winning revision before sending it and decrypts the saved
|
|
509
|
+
* winner returned by the backend.
|
|
510
|
+
* @param user the current user, used to determine the data owner that will encrypt/decrypt the entity.
|
|
511
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
512
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
513
|
+
*/
|
|
514
|
+
declareConflictWinnerWithUser(user: models.User, request: models.ConflictResolutionRequest<models.Contact>): Promise<models.ConflictResolutionResult<models.Contact>>;
|
|
515
|
+
/**
|
|
516
|
+
* Like {@link getConflictsForEntityWithUser} but targets the entity of the group with the given id.
|
|
517
|
+
* @param user the current user, used to determine the data owner that will decrypt the entities.
|
|
518
|
+
* @param groupId the id of the group the contact belongs to.
|
|
519
|
+
* @param entityId the id of the contact to retrieve the conflicts for.
|
|
520
|
+
* @return the decrypted conflicting revisions of the contact.
|
|
521
|
+
*/
|
|
522
|
+
getConflictsForEntityInGroupWithUser(user: models.User, groupId: string, entityId: string): Promise<Array<models.Contact>>;
|
|
523
|
+
/**
|
|
524
|
+
* Like {@link declareConflictWinnerWithUser} but targets the entity of the group with the given id.
|
|
525
|
+
* @param user the current user, used to determine the data owner that will encrypt/decrypt the entity.
|
|
526
|
+
* @param groupId the id of the group the contact belongs to.
|
|
527
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
528
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
529
|
+
*/
|
|
530
|
+
declareConflictWinnerInGroupWithUser(user: models.User, groupId: string, request: models.ConflictResolutionRequest<models.Contact>): Promise<models.ConflictResolutionResult<models.Contact>>;
|
|
500
531
|
}
|
|
@@ -501,7 +501,9 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
501
501
|
let latestService;
|
|
502
502
|
ctcs.forEach((c) => {
|
|
503
503
|
const s = c.services.find((it) => svcId === it.id);
|
|
504
|
-
if (s &&
|
|
504
|
+
if (s &&
|
|
505
|
+
(!latestService ||
|
|
506
|
+
(0, date_fns_1.isAfter)((0, date_fns_1.parse)('' + s.valueDate, 'yyyyMMddHHmmss', new Date()), (0, date_fns_1.parse)('' + latestService.valueDate, 'yyyyMMddHHmmss', new Date())))) {
|
|
505
507
|
latestContact = c;
|
|
506
508
|
latestService = s;
|
|
507
509
|
}
|
|
@@ -1070,6 +1072,63 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
1070
1072
|
createDelegationDeAnonymizationMetadata(entity, delegates) {
|
|
1071
1073
|
return this.crypto.delegationsDeAnonymization.createOrUpdateDeAnonymizationInfo({ entity, type: utils_1.EntityWithDelegationTypeName.Contact }, delegates);
|
|
1072
1074
|
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Like {@link getConflictsForEntity} but additionally decrypts the conflicting revisions for the given user.
|
|
1077
|
+
* @param user the current user, used to determine the data owner that will decrypt the entities.
|
|
1078
|
+
* @param entityId the id of the contact to retrieve the conflicts for.
|
|
1079
|
+
* @return the decrypted conflicting revisions of the contact.
|
|
1080
|
+
*/
|
|
1081
|
+
getConflictsForEntityWithUser(user, entityId) {
|
|
1082
|
+
return super.getConflictsForEntity(entityId).then((cs) => this.decrypt(this.dataOwnerApi.getDataOwnerIdOf(user), cs));
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Like {@link declareConflictWinner} but encrypts the winning revision before sending it and decrypts the saved
|
|
1086
|
+
* winner returned by the backend.
|
|
1087
|
+
* @param user the current user, used to determine the data owner that will encrypt/decrypt the entity.
|
|
1088
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
1089
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
1090
|
+
*/
|
|
1091
|
+
declareConflictWinnerWithUser(user, request) {
|
|
1092
|
+
const _super = Object.create(null, {
|
|
1093
|
+
declareConflictWinner: { get: () => super.declareConflictWinner }
|
|
1094
|
+
});
|
|
1095
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1096
|
+
const encrypted = (yield this.encrypt(user, [(0, collection_utils_1.cloneDeep)(request.document)]))[0];
|
|
1097
|
+
const result = yield _super.declareConflictWinner.call(this, Object.assign(Object.assign({}, request), { document: encrypted }));
|
|
1098
|
+
if (result.document)
|
|
1099
|
+
result.document = (yield this.decrypt(this.dataOwnerApi.getDataOwnerIdOf(user), [result.document]))[0];
|
|
1100
|
+
return result;
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Like {@link getConflictsForEntityWithUser} but targets the entity of the group with the given id.
|
|
1105
|
+
* @param user the current user, used to determine the data owner that will decrypt the entities.
|
|
1106
|
+
* @param groupId the id of the group the contact belongs to.
|
|
1107
|
+
* @param entityId the id of the contact to retrieve the conflicts for.
|
|
1108
|
+
* @return the decrypted conflicting revisions of the contact.
|
|
1109
|
+
*/
|
|
1110
|
+
getConflictsForEntityInGroupWithUser(user, groupId, entityId) {
|
|
1111
|
+
return super.getConflictsForEntityInGroup(groupId, entityId).then((cs) => this.decrypt(this.dataOwnerApi.getDataOwnerIdOf(user), cs));
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Like {@link declareConflictWinnerWithUser} but targets the entity of the group with the given id.
|
|
1115
|
+
* @param user the current user, used to determine the data owner that will encrypt/decrypt the entity.
|
|
1116
|
+
* @param groupId the id of the group the contact belongs to.
|
|
1117
|
+
* @param request the {@link models.ConflictResolutionRequest} carrying the (decrypted) winning revision and the conflicts to purge.
|
|
1118
|
+
* @return the {@link models.ConflictResolutionResult} with the decrypted saved winner and the conflicts that are still unresolved.
|
|
1119
|
+
*/
|
|
1120
|
+
declareConflictWinnerInGroupWithUser(user, groupId, request) {
|
|
1121
|
+
const _super = Object.create(null, {
|
|
1122
|
+
declareConflictWinnerInGroup: { get: () => super.declareConflictWinnerInGroup }
|
|
1123
|
+
});
|
|
1124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1125
|
+
const encrypted = (yield this.encrypt(user, [(0, collection_utils_1.cloneDeep)(request.document)]))[0];
|
|
1126
|
+
const result = yield _super.declareConflictWinnerInGroup.call(this, groupId, Object.assign(Object.assign({}, request), { document: encrypted }));
|
|
1127
|
+
if (result.document)
|
|
1128
|
+
result.document = (yield this.decrypt(this.dataOwnerApi.getDataOwnerIdOf(user), [result.document]))[0];
|
|
1129
|
+
return result;
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1073
1132
|
}
|
|
1074
1133
|
exports.IccContactXApi = IccContactXApi;
|
|
1075
1134
|
//# sourceMappingURL=icc-contact-x-api.js.map
|