@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.
Files changed (93) hide show
  1. package/icc-api/api/IccDocumentApi.d.ts +6 -4
  2. package/icc-api/api/IccDocumentApi.js +8 -5
  3. package/icc-api/api/IccDocumentApi.js.map +1 -1
  4. package/icc-api/model/Address.d.ts +6 -0
  5. package/icc-api/model/Address.js.map +1 -1
  6. package/icc-api/model/Annotation.d.ts +18 -0
  7. package/icc-api/model/Annotation.js.map +1 -1
  8. package/icc-api/model/Connection.d.ts +16 -0
  9. package/icc-api/model/Connection.js +38 -0
  10. package/icc-api/model/Connection.js.map +1 -0
  11. package/icc-api/model/Content.js +1 -1
  12. package/icc-api/model/Content.js.map +1 -1
  13. package/icc-api/model/CryptoActorStub.d.ts +5 -0
  14. package/icc-api/model/CryptoActorStub.js +1 -0
  15. package/icc-api/model/CryptoActorStub.js.map +1 -1
  16. package/icc-api/model/Delegation.d.ts +3 -0
  17. package/icc-api/model/Delegation.js.map +1 -1
  18. package/icc-api/model/HealthElement.d.ts +6 -0
  19. package/icc-api/model/HealthElement.js.map +1 -1
  20. package/icc-api/model/HealthcareParty.js +1 -1
  21. package/icc-api/model/HealthcareParty.js.map +1 -1
  22. package/icc-api/model/ISO639_1.d.ts +8 -0
  23. package/icc-api/model/ISO639_1.js +3 -0
  24. package/icc-api/model/ISO639_1.js.map +1 -0
  25. package/icc-api/model/Patient.d.ts +7 -0
  26. package/icc-api/model/Patient.js +1 -1
  27. package/icc-api/model/Patient.js.map +1 -1
  28. package/icc-api/model/models.d.ts +2 -0
  29. package/icc-api/model/models.js +1 -0
  30. package/icc-api/model/models.js.map +1 -1
  31. package/icc-x-api/crypto/EntitiesEncryption.d.ts +2 -1
  32. package/icc-x-api/crypto/EntitiesEncryption.js +13 -11
  33. package/icc-x-api/crypto/EntitiesEncryption.js.map +1 -1
  34. package/icc-x-api/filters/filters.d.ts +4 -0
  35. package/icc-x-api/filters/filters.js +4 -0
  36. package/icc-x-api/filters/filters.js.map +1 -1
  37. package/icc-x-api/icc-accesslog-x-api.d.ts +1 -1
  38. package/icc-x-api/icc-accesslog-x-api.js +9 -21
  39. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  40. package/icc-x-api/icc-calendar-item-x-api.d.ts +1 -1
  41. package/icc-x-api/icc-calendar-item-x-api.js +9 -18
  42. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  43. package/icc-x-api/icc-classification-x-api.js +6 -17
  44. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  45. package/icc-x-api/icc-contact-x-api.d.ts +30 -2
  46. package/icc-x-api/icc-contact-x-api.js +82 -96
  47. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  48. package/icc-x-api/icc-device-x-api.d.ts +17 -0
  49. package/icc-x-api/icc-device-x-api.js +35 -0
  50. package/icc-x-api/icc-device-x-api.js.map +1 -0
  51. package/icc-x-api/icc-doctemplate-x-api.js +2 -13
  52. package/icc-x-api/icc-doctemplate-x-api.js.map +1 -1
  53. package/icc-x-api/icc-document-x-api.d.ts +12 -4
  54. package/icc-x-api/icc-document-x-api.js +22 -23
  55. package/icc-x-api/icc-document-x-api.js.map +1 -1
  56. package/icc-x-api/icc-form-x-api.js +6 -15
  57. package/icc-x-api/icc-form-x-api.js.map +1 -1
  58. package/icc-x-api/icc-hcparty-x-api.d.ts +9 -2
  59. package/icc-x-api/icc-hcparty-x-api.js +9 -1
  60. package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
  61. package/icc-x-api/icc-helement-x-api.d.ts +12 -3
  62. package/icc-x-api/icc-helement-x-api.js +19 -19
  63. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  64. package/icc-x-api/icc-invoice-x-api.js +6 -17
  65. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  66. package/icc-x-api/icc-maintenance-task-x-api.d.ts +12 -2
  67. package/icc-x-api/icc-maintenance-task-x-api.js +17 -13
  68. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  69. package/icc-x-api/icc-message-x-api.js +6 -16
  70. package/icc-x-api/icc-message-x-api.js.map +1 -1
  71. package/icc-x-api/icc-patient-x-api.d.ts +12 -3
  72. package/icc-x-api/icc-patient-x-api.js +21 -18
  73. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  74. package/icc-x-api/icc-receipt-x-api.js +5 -15
  75. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  76. package/icc-x-api/icc-time-table-x-api.js +5 -15
  77. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  78. package/icc-x-api/icc-user-x-api.d.ts +10 -1
  79. package/icc-x-api/icc-user-x-api.js +8 -1
  80. package/icc-x-api/icc-user-x-api.js.map +1 -1
  81. package/icc-x-api/index.d.ts +110 -4
  82. package/icc-x-api/index.js +17 -15
  83. package/icc-x-api/index.js.map +1 -1
  84. package/icc-x-api/utils/crypto-utils.d.ts +140 -11
  85. package/icc-x-api/utils/crypto-utils.js +285 -36
  86. package/icc-x-api/utils/crypto-utils.js.map +1 -1
  87. package/icc-x-api/utils/index.d.ts +1 -0
  88. package/icc-x-api/utils/index.js +1 -0
  89. package/icc-x-api/utils/index.js.map +1 -1
  90. package/icc-x-api/utils/websocket.d.ts +61 -0
  91. package/icc-x-api/utils/websocket.js +351 -0
  92. package/icc-x-api/utils/websocket.js.map +1 -0
  93. 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
- constructor(host, headers, crypto, dataOwnerApi, authenticationProvider = new AuthenticationProvider_1.NoAuthenticationProvider(), fetchImpl = typeof window !== 'undefined'
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(_.extend({
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 = (_a = options.preferredSfk) !== null && _a !== void 0 ? _a : (!!options.confidential
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((_b = options.additionalDelegates) !== null && _b !== void 0 ? _b : {}),
78
- ...(options.confidential ? [] : [...((_d = (_c = user.autoDelegations) === null || _c === void 0 ? void 0 : _c.all) !== null && _d !== void 0 ? _d : []), ...((_f = (_e = user.autoDelegations) === null || _e === void 0 ? void 0 : _e.medicalInformation) !== null && _f !== void 0 ? _f : [])]),
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 (!svc.content) {
272
- return svc;
273
- }
274
- if (Object.values(svc.content).every((c) => c.compoundValue &&
275
- !c.stringValue &&
276
- !c.documentId &&
277
- !c.measureValue &&
278
- !c.medicationValue &&
279
- (c.booleanValue === null || c.booleanValue === undefined) &&
280
- (c.numberValue === null || c.numberValue === undefined) &&
281
- !c.instantValue &&
282
- !c.fuzzyDateValue &&
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].compoundValue = yield this.encryptServices(key, rawKey, p[1].compoundValue);
300
+ return [p[0], Object.assign(Object.assign({}, p[1]), { compoundValue: yield this.encryptServices(key, rawKey, p[1].compoundValue) })];
288
301
  }
289
- return p;
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
- svc.encryptedSelf = (0, binary_utils_1.b2a)((0, binary_utils_1.ua2string)(yield this.crypto.primitives.AES.encrypt(key, (0, binary_utils_1.utf8_2ua)(JSON.stringify({ content: svc.content })), rawKey)));
294
- delete svc.content;
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 = yield this.encryptServices(encryptionKey.key, encryptionKey.raw, ctc.services || []);
311
- initialisedCtc.encryptedSelf = (0, binary_utils_1.b2a)((0, binary_utils_1.ua2string)(yield this.crypto.primitives.AES.encrypt(encryptionKey.key, (0, binary_utils_1.utf8_2ua)(JSON.stringify({ descr: ctc.descr })), encryptionKey.raw)));
312
- delete initialisedCtc.descr;
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
- ctc.services = yield this.decryptServices(hcpartyId, ctc.services || [], keys);
324
- if (ctc.encryptedSelf) {
325
- try {
326
- const json = yield this.crypto.entities.tryDecryptJson(keys, (0, binary_utils_1.string2ua)((0, binary_utils_1.a2b)(ctc.encryptedSelf)), false);
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
- if (svc.encryptedContent) {
347
- try {
348
- const json = yield this.crypto.entities.tryDecryptJson(keys, (0, binary_utils_1.string2ua)((0, binary_utils_1.a2b)(svc.encryptedContent)), true);
349
- if (json) {
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