@icure/api 7.0.0-beta.4 → 7.1.0
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/IccDocumentApi.d.ts +6 -4
- package/icc-api/api/IccDocumentApi.js +8 -5
- package/icc-api/api/IccDocumentApi.js.map +1 -1
- package/icc-api/model/Address.d.ts +6 -0
- package/icc-api/model/Address.js.map +1 -1
- package/icc-api/model/Annotation.d.ts +18 -0
- package/icc-api/model/Annotation.js.map +1 -1
- package/icc-api/model/Connection.d.ts +16 -0
- package/icc-api/model/Connection.js +38 -0
- package/icc-api/model/Connection.js.map +1 -0
- package/icc-api/model/Content.js +1 -1
- package/icc-api/model/Content.js.map +1 -1
- package/icc-api/model/CryptoActorStub.d.ts +5 -0
- package/icc-api/model/CryptoActorStub.js +1 -0
- package/icc-api/model/CryptoActorStub.js.map +1 -1
- package/icc-api/model/Delegation.d.ts +3 -0
- package/icc-api/model/Delegation.js.map +1 -1
- package/icc-api/model/HealthElement.d.ts +6 -0
- package/icc-api/model/HealthElement.js.map +1 -1
- package/icc-api/model/HealthcareParty.js +1 -1
- package/icc-api/model/HealthcareParty.js.map +1 -1
- package/icc-api/model/ISO639_1.d.ts +8 -0
- package/icc-api/model/ISO639_1.js +3 -0
- package/icc-api/model/ISO639_1.js.map +1 -0
- package/icc-api/model/Patient.d.ts +7 -0
- package/icc-api/model/Patient.js +1 -1
- package/icc-api/model/Patient.js.map +1 -1
- package/icc-api/model/models.d.ts +2 -0
- package/icc-api/model/models.js +1 -0
- package/icc-api/model/models.js.map +1 -1
- package/icc-x-api/crypto/EntitiesEncryption.d.ts +2 -1
- package/icc-x-api/crypto/EntitiesEncryption.js +13 -11
- package/icc-x-api/crypto/EntitiesEncryption.js.map +1 -1
- package/icc-x-api/filters/filters.d.ts +4 -0
- package/icc-x-api/filters/filters.js +4 -0
- package/icc-x-api/filters/filters.js.map +1 -1
- package/icc-x-api/icc-accesslog-x-api.d.ts +1 -1
- package/icc-x-api/icc-accesslog-x-api.js +9 -21
- package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
- package/icc-x-api/icc-calendar-item-x-api.d.ts +1 -1
- package/icc-x-api/icc-calendar-item-x-api.js +9 -18
- package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
- package/icc-x-api/icc-classification-x-api.js +6 -17
- package/icc-x-api/icc-classification-x-api.js.map +1 -1
- package/icc-x-api/icc-contact-x-api.d.ts +30 -2
- package/icc-x-api/icc-contact-x-api.js +82 -96
- package/icc-x-api/icc-contact-x-api.js.map +1 -1
- package/icc-x-api/icc-device-x-api.d.ts +17 -0
- package/icc-x-api/icc-device-x-api.js +35 -0
- package/icc-x-api/icc-device-x-api.js.map +1 -0
- package/icc-x-api/icc-doctemplate-x-api.js +2 -13
- package/icc-x-api/icc-doctemplate-x-api.js.map +1 -1
- package/icc-x-api/icc-document-x-api.d.ts +12 -4
- package/icc-x-api/icc-document-x-api.js +22 -23
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-form-x-api.js +6 -15
- package/icc-x-api/icc-form-x-api.js.map +1 -1
- package/icc-x-api/icc-hcparty-x-api.d.ts +9 -2
- package/icc-x-api/icc-hcparty-x-api.js +9 -1
- package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
- package/icc-x-api/icc-helement-x-api.d.ts +12 -3
- package/icc-x-api/icc-helement-x-api.js +19 -19
- package/icc-x-api/icc-helement-x-api.js.map +1 -1
- package/icc-x-api/icc-invoice-x-api.js +6 -17
- package/icc-x-api/icc-invoice-x-api.js.map +1 -1
- package/icc-x-api/icc-maintenance-task-x-api.d.ts +12 -2
- package/icc-x-api/icc-maintenance-task-x-api.js +17 -13
- package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
- package/icc-x-api/icc-message-x-api.js +6 -16
- package/icc-x-api/icc-message-x-api.js.map +1 -1
- package/icc-x-api/icc-patient-x-api.d.ts +12 -3
- package/icc-x-api/icc-patient-x-api.js +21 -18
- package/icc-x-api/icc-patient-x-api.js.map +1 -1
- package/icc-x-api/icc-receipt-x-api.js +5 -15
- package/icc-x-api/icc-receipt-x-api.js.map +1 -1
- package/icc-x-api/icc-time-table-x-api.js +5 -15
- package/icc-x-api/icc-time-table-x-api.js.map +1 -1
- package/icc-x-api/icc-user-x-api.d.ts +10 -1
- package/icc-x-api/icc-user-x-api.js +8 -1
- package/icc-x-api/icc-user-x-api.js.map +1 -1
- package/icc-x-api/index.d.ts +110 -4
- package/icc-x-api/index.js +17 -15
- package/icc-x-api/index.js.map +1 -1
- package/icc-x-api/utils/crypto-utils.d.ts +140 -11
- package/icc-x-api/utils/crypto-utils.js +285 -36
- package/icc-x-api/utils/crypto-utils.js.map +1 -1
- package/icc-x-api/utils/index.d.ts +1 -0
- package/icc-x-api/utils/index.js +1 -0
- package/icc-x-api/utils/index.js.map +1 -1
- package/icc-x-api/utils/websocket.d.ts +61 -0
- package/icc-x-api/utils/websocket.js +351 -0
- package/icc-x-api/utils/websocket.js.map +1 -0
- package/package.json +5 -2
|
@@ -20,16 +20,44 @@ const binary_utils_1 = require("./utils/binary-utils");
|
|
|
20
20
|
const ServiceByIdsFilter_1 = require("./filters/ServiceByIdsFilter");
|
|
21
21
|
const utils_1 = require("./utils");
|
|
22
22
|
const AuthenticationProvider_1 = require("./auth/AuthenticationProvider");
|
|
23
|
+
const websocket_1 = require("./utils/websocket");
|
|
24
|
+
const Connection_1 = require("../icc-api/model/Connection");
|
|
23
25
|
class IccContactXApi extends icc_api_1.IccContactApi {
|
|
24
|
-
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param host
|
|
29
|
+
* @param headers
|
|
30
|
+
* @param crypto
|
|
31
|
+
* @param dataOwnerApi
|
|
32
|
+
* @param authenticationProvider
|
|
33
|
+
* @param fetchImpl
|
|
34
|
+
* @param contactEncryptedKeys custom encrypted fields for Contact. Note that to customise the encryption of contained services (`services` field),
|
|
35
|
+
* you need to use the serviceEncryptedKeys parameter.
|
|
36
|
+
* @param serviceEncryptedKeys custom encrypted fields for Service. Note that you can't customise encryption of the `content` field
|
|
37
|
+
*/
|
|
38
|
+
constructor(host, headers, crypto, dataOwnerApi, userApi, authApi, authenticationProvider = new AuthenticationProvider_1.NoAuthenticationProvider(), fetchImpl = typeof window !== 'undefined'
|
|
25
39
|
? window.fetch
|
|
26
40
|
: typeof self !== 'undefined'
|
|
27
41
|
? self.fetch
|
|
28
|
-
: fetch) {
|
|
42
|
+
: fetch, contactEncryptedKeys = ['descr'], serviceEncryptedKeys = []) {
|
|
29
43
|
super(host, headers, authenticationProvider, fetchImpl);
|
|
30
44
|
this.i18n = contact_i18n_1.default;
|
|
45
|
+
if (contactEncryptedKeys.some((key) => key.startsWith('services'))) {
|
|
46
|
+
throw new Error("You can't customise encryption of the `services` field of Contact. Use the serviceEncryptedKeys parameter instead.");
|
|
47
|
+
}
|
|
48
|
+
if (serviceEncryptedKeys.some((key) => key.startsWith('content'))) {
|
|
49
|
+
throw new Error("You can't customise encryption of the `content` of a Service. The content values for services is automatically encrypted.");
|
|
50
|
+
}
|
|
31
51
|
this.crypto = crypto;
|
|
32
52
|
this.dataOwnerApi = dataOwnerApi;
|
|
53
|
+
this.userApi = userApi;
|
|
54
|
+
this.authApi = authApi;
|
|
55
|
+
this.contactEncryptedFields = (0, utils_1.parseEncryptedFields)(contactEncryptedKeys, 'Contact.');
|
|
56
|
+
const customServiceEncryptedFields = (0, utils_1.parseEncryptedFields)(serviceEncryptedKeys, 'Service.');
|
|
57
|
+
if (serviceEncryptedKeys.length > 0) {
|
|
58
|
+
this.serviceEncryptedFieldsNoContent = customServiceEncryptedFields;
|
|
59
|
+
}
|
|
60
|
+
this.serviceEncryptedFieldsWithContent = Object.assign(Object.assign({}, customServiceEncryptedFields), { topLevelFields: [...customServiceEncryptedFields.topLevelFields, { fieldName: 'content', fieldPath: 'Service.content' }] });
|
|
33
61
|
}
|
|
34
62
|
/**
|
|
35
63
|
* Creates a new instance of contact with initialised encryption metadata (not in the database).
|
|
@@ -49,33 +77,20 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
49
77
|
* @return a new instance of contact.
|
|
50
78
|
*/
|
|
51
79
|
newInstance(user, patient, c, options = {}) {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f;
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
53
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const contact = new models.Contact(
|
|
55
|
-
id: this.crypto.primitives.randomUuid(),
|
|
56
|
-
_type: 'org.taktik.icure.entities.Contact',
|
|
57
|
-
created: new Date().getTime(),
|
|
58
|
-
modified: new Date().getTime(),
|
|
59
|
-
responsible: this.dataOwnerApi.getDataOwnerIdOf(user),
|
|
60
|
-
author: user.id,
|
|
61
|
-
codes: [],
|
|
62
|
-
tags: [],
|
|
63
|
-
groupId: this.crypto.primitives.randomUuid(),
|
|
64
|
-
subContacts: [],
|
|
65
|
-
services: [],
|
|
66
|
-
openingDate: parseInt(moment().format('YYYYMMDDHHmmss')),
|
|
67
|
-
}, c || {}));
|
|
82
|
+
const contact = new models.Contact(Object.assign(Object.assign({}, (c !== null && c !== void 0 ? c : {})), { _type: 'org.taktik.icure.entities.Contact', id: (_a = c === null || c === void 0 ? void 0 : c.id) !== null && _a !== void 0 ? _a : this.crypto.primitives.randomUuid(), created: (_b = c === null || c === void 0 ? void 0 : c.created) !== null && _b !== void 0 ? _b : new Date().getTime(), modified: (_c = c === null || c === void 0 ? void 0 : c.modified) !== null && _c !== void 0 ? _c : new Date().getTime(), responsible: (_d = c === null || c === void 0 ? void 0 : c.responsible) !== null && _d !== void 0 ? _d : this.dataOwnerApi.getDataOwnerIdOf(user), author: (_e = c === null || c === void 0 ? void 0 : c.author) !== null && _e !== void 0 ? _e : user.id, codes: (_f = c === null || c === void 0 ? void 0 : c.codes) !== null && _f !== void 0 ? _f : [], tags: (_g = c === null || c === void 0 ? void 0 : c.tags) !== null && _g !== void 0 ? _g : [], groupId: (_h = c === null || c === void 0 ? void 0 : c.groupId) !== null && _h !== void 0 ? _h : this.crypto.primitives.randomUuid(), subContacts: (_j = c === null || c === void 0 ? void 0 : c.subContacts) !== null && _j !== void 0 ? _j : [], services: (_k = c === null || c === void 0 ? void 0 : c.services) !== null && _k !== void 0 ? _k : [], openingDate: (_l = c === null || c === void 0 ? void 0 : c.openingDate) !== null && _l !== void 0 ? _l : parseInt(moment().format('YYYYMMDDHHmmss')) }));
|
|
68
83
|
const ownerId = this.dataOwnerApi.getDataOwnerIdOf(user);
|
|
69
84
|
if (ownerId !== (yield this.dataOwnerApi.getCurrentDataOwnerId()))
|
|
70
85
|
throw new Error('Can only initialise entities as current data owner.');
|
|
71
|
-
const sfk = (
|
|
86
|
+
const sfk = (_m = options.preferredSfk) !== null && _m !== void 0 ? _m : (!!options.confidential
|
|
72
87
|
? yield this.crypto.confidential.getConfidentialSecretId(patient)
|
|
73
88
|
: yield this.crypto.confidential.getAnySecretIdSharedWithParents(patient));
|
|
74
89
|
if (!sfk)
|
|
75
90
|
throw new Error(`Couldn't find any sfk of parent patient ${patient.id} for confidential=${!!options.confidential}`);
|
|
76
91
|
const extraDelegations = [
|
|
77
|
-
...Object.keys((
|
|
78
|
-
...(options.confidential ? [] : [...((
|
|
92
|
+
...Object.keys((_o = options.additionalDelegates) !== null && _o !== void 0 ? _o : {}),
|
|
93
|
+
...(options.confidential ? [] : [...((_q = (_p = user.autoDelegations) === null || _p === void 0 ? void 0 : _p.all) !== null && _q !== void 0 ? _q : []), ...((_s = (_r = user.autoDelegations) === null || _r === void 0 ? void 0 : _r.medicalInformation) !== null && _s !== void 0 ? _s : [])]),
|
|
79
94
|
];
|
|
80
95
|
const initialisationInfo = yield this.crypto.entities.entityWithInitialisedEncryptedMetadata(contact, patient.id, sfk, true, extraDelegations);
|
|
81
96
|
return new models.Contact(initialisationInfo.updatedEntity);
|
|
@@ -268,32 +283,37 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
268
283
|
}
|
|
269
284
|
encryptServices(key, rawKey, services) {
|
|
270
285
|
return Promise.all(services.map((svc) => __awaiter(this, void 0, void 0, function* () {
|
|
271
|
-
if (
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
!c.binaryValue)) {
|
|
284
|
-
svc.content = _.fromPairs(yield Promise.all(_.toPairs(svc.content).map((p) => __awaiter(this, void 0, void 0, function* () {
|
|
286
|
+
if (svc.content &&
|
|
287
|
+
Object.values(svc.content).every((c) => c.compoundValue &&
|
|
288
|
+
!c.stringValue &&
|
|
289
|
+
!c.documentId &&
|
|
290
|
+
!c.measureValue &&
|
|
291
|
+
!c.medicationValue &&
|
|
292
|
+
(c.booleanValue === null || c.booleanValue === undefined) &&
|
|
293
|
+
(c.numberValue === null || c.numberValue === undefined) &&
|
|
294
|
+
!c.instantValue &&
|
|
295
|
+
!c.fuzzyDateValue &&
|
|
296
|
+
!c.binaryValue)) {
|
|
297
|
+
const recursivelyEncryptedContent = Object.fromEntries(yield Promise.all(Object.entries(svc.content).map((p) => __awaiter(this, void 0, void 0, function* () {
|
|
285
298
|
var _a;
|
|
286
299
|
if ((_a = p[1].compoundValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
287
|
-
p[1]
|
|
300
|
+
return [p[0], Object.assign(Object.assign({}, p[1]), { compoundValue: yield this.encryptServices(key, rawKey, p[1].compoundValue) })];
|
|
288
301
|
}
|
|
289
|
-
|
|
302
|
+
else
|
|
303
|
+
return p;
|
|
290
304
|
}))));
|
|
305
|
+
const copyWithEncryptedContent = Object.assign(Object.assign({}, svc), { content: recursivelyEncryptedContent });
|
|
306
|
+
return this.serviceEncryptedFieldsNoContent
|
|
307
|
+
? (0, utils_1.encryptObject)(copyWithEncryptedContent, (obj) => {
|
|
308
|
+
return this.crypto.primitives.AES.encrypt(key, (0, binary_utils_1.utf8_2ua)(JSON.stringify(obj)), rawKey);
|
|
309
|
+
}, this.serviceEncryptedFieldsNoContent, 'service')
|
|
310
|
+
: copyWithEncryptedContent;
|
|
291
311
|
}
|
|
292
312
|
else {
|
|
293
|
-
|
|
294
|
-
|
|
313
|
+
return (0, utils_1.encryptObject)(svc, (obj) => {
|
|
314
|
+
return this.crypto.primitives.AES.encrypt(key, (0, binary_utils_1.utf8_2ua)(JSON.stringify(obj)), rawKey);
|
|
315
|
+
}, this.serviceEncryptedFieldsWithContent, 'service');
|
|
295
316
|
}
|
|
296
|
-
return svc;
|
|
297
317
|
})));
|
|
298
318
|
}
|
|
299
319
|
encrypt(user, ctcs) {
|
|
@@ -307,10 +327,9 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
307
327
|
? ctc
|
|
308
328
|
: (_a = (yield this.crypto.entities.ensureEncryptionKeysInitialised(ctc))) !== null && _a !== void 0 ? _a : ctc;
|
|
309
329
|
const encryptionKey = yield this.crypto.entities.importFirstValidKey(yield this.crypto.entities.encryptionKeysOf(ctc, hcpartyId), ctc.id);
|
|
310
|
-
initialisedCtc.services
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return initialisedCtc;
|
|
330
|
+
return new models_1.Contact(yield (0, utils_1.encryptObject)(Object.assign(Object.assign({}, initialisedCtc), { services: initialisedCtc.services ? yield this.encryptServices(encryptionKey.key, encryptionKey.raw, initialisedCtc.services) : [] }), (obj) => {
|
|
331
|
+
return this.crypto.primitives.AES.encrypt(encryptionKey.key, (0, binary_utils_1.utf8_2ua)(JSON.stringify(obj)), encryptionKey.raw);
|
|
332
|
+
}, this.contactEncryptedFields, 'contact'));
|
|
314
333
|
})));
|
|
315
334
|
}
|
|
316
335
|
decrypt(hcpartyId, ctcs) {
|
|
@@ -320,22 +339,10 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
320
339
|
console.log('Cannot decrypt contact', ctc.id);
|
|
321
340
|
return ctc;
|
|
322
341
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
if (json) {
|
|
328
|
-
_.assign(ctc, json);
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
console.log('Cannot decrypt ctc: no valid key could produce valid json', ctc.id);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
catch (e) {
|
|
335
|
-
console.log('Failed to decrypt ctc', ctc.id, e);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return ctc;
|
|
342
|
+
return new models_1.Contact(yield (0, utils_1.decryptObject)(ctc, (encrypted) => __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
var _a;
|
|
344
|
+
return (_a = (yield this.crypto.entities.tryDecryptJson(keys, encrypted, false))) !== null && _a !== void 0 ? _a : {};
|
|
345
|
+
})));
|
|
339
346
|
})));
|
|
340
347
|
}
|
|
341
348
|
decryptServices(hcpartyId, svcs, keys) {
|
|
@@ -343,43 +350,10 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
343
350
|
if (!keys) {
|
|
344
351
|
keys = yield this.crypto.entities.importAllValidKeys(yield this.crypto.entities.encryptionKeysOf(svc, hcpartyId));
|
|
345
352
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
Object.assign(svc, { content: json });
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
console.log('Cannot decrypt service: no valid key could produce valid json', svc.id);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
catch (e) {
|
|
357
|
-
console.log('Cannot decrypt service', svc.id, e);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
else if (svc.encryptedSelf) {
|
|
361
|
-
try {
|
|
362
|
-
const json = yield this.crypto.entities.tryDecryptJson(keys, (0, binary_utils_1.string2ua)((0, binary_utils_1.a2b)(svc.encryptedSelf)), true);
|
|
363
|
-
if (json) {
|
|
364
|
-
Object.assign(svc, json);
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
console.log('Cannot decrypt service: no valid key could produce valid json', svc.id);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
catch (e) {
|
|
371
|
-
console.log('Cannot decrypt service', svc.id, e);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
svc.content = _.fromPairs(yield Promise.all(_.toPairs(svc.content).map((p) => __awaiter(this, void 0, void 0, function* () {
|
|
376
|
-
if (p[1].compoundValue) {
|
|
377
|
-
p[1].compoundValue = yield this.decryptServices(hcpartyId, p[1].compoundValue, keys);
|
|
378
|
-
}
|
|
379
|
-
return p;
|
|
380
|
-
}))));
|
|
381
|
-
}
|
|
382
|
-
return svc;
|
|
353
|
+
return new models_1.Contact(yield (0, utils_1.decryptObject)(svc, (encrypted) => __awaiter(this, void 0, void 0, function* () {
|
|
354
|
+
var _a;
|
|
355
|
+
return (_a = (yield this.crypto.entities.tryDecryptJson(keys, encrypted, false))) !== null && _a !== void 0 ? _a : {};
|
|
356
|
+
})));
|
|
383
357
|
})));
|
|
384
358
|
}
|
|
385
359
|
contactOfService(ctcs, svcId) {
|
|
@@ -804,6 +778,18 @@ class IccContactXApi extends icc_api_1.IccContactApi {
|
|
|
804
778
|
return yield this.crypto.entities.encryptionKeysOf(entity);
|
|
805
779
|
});
|
|
806
780
|
}
|
|
781
|
+
subscribeToServiceEvents(eventTypes, filter, eventFired, options = {}) {
|
|
782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
783
|
+
const currentUser = yield this.userApi.getCurrentUser();
|
|
784
|
+
return (0, websocket_1.subscribeToEntityEvents)(this.host, this.authApi, 'Service', eventTypes, filter, eventFired, options, (encrypted) => __awaiter(this, void 0, void 0, function* () { return (yield this.decryptServices(currentUser.healthcarePartyId, [encrypted]))[0]; })).then((ws) => new Connection_1.ConnectionImpl(ws));
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
subscribeToContactEvents(eventTypes, filter, eventFired, options = {}) {
|
|
788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
789
|
+
const currentUser = yield this.userApi.getCurrentUser();
|
|
790
|
+
return (0, websocket_1.subscribeToEntityEvents)(this.host, this.authApi, 'Contact', eventTypes, filter, eventFired, options, (encrypted) => __awaiter(this, void 0, void 0, function* () { return (yield this.decryptServices(currentUser.healthcarePartyId, [encrypted]))[0]; })).then((ws) => new Connection_1.ConnectionImpl(ws));
|
|
791
|
+
});
|
|
792
|
+
}
|
|
807
793
|
}
|
|
808
794
|
exports.IccContactXApi = IccContactXApi;
|
|
809
795
|
//# sourceMappingURL=icc-contact-x-api.js.map
|