oro-sdk 5.3.6 → 5.5.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.
@@ -839,52 +839,53 @@ function _getImagesFromIndexDb() {
839
839
  }
840
840
  function populateWorkflowField(_x6, _x7) {
841
841
  return _populateWorkflowField.apply(this, arguments);
842
- } /**
843
- * Determine if a question is triggered by some answers
844
- *
845
- * We use the following logical combinations of rules:
846
- *
847
- * #### Single string
848
- *
849
- * ```
850
- * // Required: rule1
851
- * rules: rule1
852
- * ```
853
- *
854
- * #### Array of strings (AND is applied between statements):
855
- *
856
- * ```
857
- * // Required: rule1 AND rule2
858
- * rules: [ rule1, rule2 ]
859
- * ```
860
- *
861
- * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
862
- *
863
- * ```
864
- * // Required: rule1 OR rule2
865
- * rules: [
866
- * [ rule1 ],
867
- * [ rule2 ]
868
- * ]
869
- *
870
- * // Required: rule1 OR (rule2 AND rule3)
871
- * rules: [
872
- * [ rule1 ],
873
- * [ rule2, rule3 ]
874
- * ]
875
- *
876
- * // THIS IS FORBIDDEN
877
- * rules: [
878
- * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
879
- * [ rule2, rule3 ]
880
- * ]
881
- * ```
882
- *
883
- * @param triggers the triggering rules
884
- * @param answers the answers to check againts triggering rules
885
- * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
886
- * @throws an Error if triggers typing is wrong
887
- */
842
+ }
843
+ /**
844
+ * Determine if a question is triggered by some answers
845
+ *
846
+ * We use the following logical combinations of rules:
847
+ *
848
+ * #### Single string
849
+ *
850
+ * ```
851
+ * // Required: rule1
852
+ * rules: rule1
853
+ * ```
854
+ *
855
+ * #### Array of strings (AND is applied between statements):
856
+ *
857
+ * ```
858
+ * // Required: rule1 AND rule2
859
+ * rules: [ rule1, rule2 ]
860
+ * ```
861
+ *
862
+ * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
863
+ *
864
+ * ```
865
+ * // Required: rule1 OR rule2
866
+ * rules: [
867
+ * [ rule1 ],
868
+ * [ rule2 ]
869
+ * ]
870
+ *
871
+ * // Required: rule1 OR (rule2 AND rule3)
872
+ * rules: [
873
+ * [ rule1 ],
874
+ * [ rule2, rule3 ]
875
+ * ]
876
+ *
877
+ * // THIS IS FORBIDDEN
878
+ * rules: [
879
+ * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
880
+ * [ rule2, rule3 ]
881
+ * ]
882
+ * ```
883
+ *
884
+ * @param triggers the triggering rules
885
+ * @param answers the answers to check againts triggering rules
886
+ * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
887
+ * @throws an Error if triggers typing is wrong
888
+ */
888
889
  function _populateWorkflowField() {
889
890
  _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
890
891
  var answer, displayedAnswer;
@@ -1386,15 +1387,16 @@ function _registerPatient() {
1386
1387
  }
1387
1388
  function getOrCreatePatientLockbox(_x9) {
1388
1389
  return _getOrCreatePatientLockbox.apply(this, arguments);
1389
- } /**
1390
- * Store all patient related information into his/her lockbox
1391
- * @param consultationId The consultation id
1392
- * @param isoLanguage the prefered language of communication (ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)
1393
- * @param lockboxUuid the lockbox uuid to store data in
1394
- * @param workflow the workflow used to extract informations
1395
- * @param oroClient an oroClient instance
1396
- * @returns
1397
- */
1390
+ }
1391
+ /**
1392
+ * Store all patient related information into his/her lockbox
1393
+ * @param consultationId The consultation id
1394
+ * @param isoLanguage the prefered language of communication (ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)
1395
+ * @param lockboxUuid the lockbox uuid to store data in
1396
+ * @param workflow the workflow used to extract informations
1397
+ * @param oroClient an oroClient instance
1398
+ * @returns
1399
+ */
1398
1400
  function _getOrCreatePatientLockbox() {
1399
1401
  _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(oroClient) {
1400
1402
  var grants, lockboxResponse, tokens;
@@ -1493,15 +1495,16 @@ function _storePatientData() {
1493
1495
  }
1494
1496
  function storeImageAliases(_x15, _x16, _x17, _x18, _x19) {
1495
1497
  return _storeImageAliases.apply(this, arguments);
1496
- } /**
1497
- * Extracts the workflow MetadataCategory for Personal, ChildPersonal and OtherPersonal
1498
- * then stores it in the vault
1499
- *
1500
- * @param workflow
1501
- * @param lockboxUuid
1502
- * @param category
1503
- * @returns The data uuid
1504
- */
1498
+ }
1499
+ /**
1500
+ * Extracts the workflow MetadataCategory for Personal, ChildPersonal and OtherPersonal
1501
+ * then stores it in the vault
1502
+ *
1503
+ * @param workflow
1504
+ * @param lockboxUuid
1505
+ * @param category
1506
+ * @returns The data uuid
1507
+ */
1505
1508
  function _storeImageAliases() {
1506
1509
  _storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, lockboxUuid, workflow, oroClient, progress) {
1507
1510
  var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
@@ -1733,6 +1736,8 @@ var MAX_RETRIES$1 = 15;
1733
1736
  *
1734
1737
  * Creates a fake workflow in which the workflow data will reside
1735
1738
  *
1739
+ * @todo deprecate this function when using workflows and populating them from the app
1740
+ *
1736
1741
  * @param isTreatmentWorking the value from the `is treatment working` question
1737
1742
  * @param hasSideEffects the value from the `does the treatment have side effects` question
1738
1743
  * @param deliveryAddress the provided delivery address
@@ -1740,10 +1745,12 @@ var MAX_RETRIES$1 = 15;
1740
1745
  * @returns a workflow
1741
1746
  */
1742
1747
  function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, deliveryAddress, pharmacy) {
1743
- var _ref, _ref2, _selectedAnswers$push, _selectedAnswers$push2;
1744
- var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref), (_ref2 = {}, _ref2['hasSideEffects'] = hasSideEffects, _ref2)];
1745
- if (deliveryAddress) selectedAnswers.push((_selectedAnswers$push = {}, _selectedAnswers$push['deliveryAddress'] = deliveryAddress, _selectedAnswers$push));
1746
- if (pharmacy) selectedAnswers.push((_selectedAnswers$push2 = {}, _selectedAnswers$push2['pharmacy'] = JSON.stringify(pharmacy), _selectedAnswers$push2));
1748
+ var _ref, _extends2, _extends3;
1749
+ var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref['hasSideEffects'] = hasSideEffects, _ref)];
1750
+ // appends the delivery address to the first page of the answers if provided
1751
+ if (deliveryAddress) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends2 = {}, _extends2['deliveryAddress'] = deliveryAddress, _extends2));
1752
+ // appends the pharmacy to the first page of the answers if provided
1753
+ if (pharmacy) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends3 = {}, _extends3['pharmacy'] = JSON.stringify(pharmacy), _extends3));
1747
1754
  return {
1748
1755
  id: '32573a20-6f1d-49be-9ad3-b87c58074979',
1749
1756
  createdAt: '2022-10-03T00:00:00.000Z',
@@ -1802,7 +1809,6 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
1802
1809
  kind: 'online-pharmacy-picker',
1803
1810
  label: 'Which pharmacy do you want the prescription sent to?',
1804
1811
  metaCategory: MetadataCategory.Refill,
1805
- minorLabel: ' (Optional)',
1806
1812
  summaryLabel: 'Your pharmacy'
1807
1813
  },
1808
1814
  youAddress: {
@@ -1822,43 +1828,48 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
1822
1828
  * @param populatedRefillWorkflow the refill workflow data
1823
1829
  * @param oroClient
1824
1830
  */
1825
- function createRefill(_x, _x2, _x3) {
1831
+ function createRefill(_x, _x2, _x3, _x4, _x5) {
1826
1832
  return _createRefill.apply(this, arguments);
1827
1833
  }
1828
1834
  function _createRefill() {
1829
- _createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient) {
1830
- var retry, errorsThrown, newConsult, lockboxUuid;
1835
+ _createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient, indexSearch, onProgress) {
1836
+ var retry, errorsThrown, newConsult, lockboxUuid, stepsTotalNum, currentStep, rawConsultationManifest, rawConsultation;
1831
1837
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1832
1838
  while (1) {
1833
1839
  switch (_context.prev = _context.next) {
1834
1840
  case 0:
1841
+ if (indexSearch === void 0) {
1842
+ indexSearch = true;
1843
+ }
1835
1844
  retry = MAX_RETRIES$1;
1836
1845
  errorsThrown = [];
1837
- case 2:
1846
+ newConsult = undefined;
1847
+ stepsTotalNum = 6;
1848
+ case 5:
1838
1849
  if (!(retry > 0)) {
1839
- _context.next = 28;
1850
+ _context.next = 54;
1840
1851
  break;
1841
1852
  }
1842
- _context.prev = 3;
1843
- if (newConsult) {
1844
- _context.next = 8;
1845
- break;
1846
- }
1847
- _context.next = 7;
1853
+ _context.prev = 6;
1854
+ currentStep = 0;
1855
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'create_consult');
1856
+ // Creating refill consult
1857
+ _context.next = 11;
1848
1858
  return getOrCreatePatientConsultationUuid(consultRequest, oroClient);
1849
- case 7:
1859
+ case 11:
1850
1860
  newConsult = _context.sent;
1851
- case 8:
1861
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'get_patient_grant');
1852
1862
  if (lockboxUuid) {
1853
- _context.next = 12;
1863
+ _context.next = 17;
1854
1864
  break;
1855
1865
  }
1856
- _context.next = 11;
1866
+ _context.next = 16;
1857
1867
  return oroClient.getGrants();
1858
- case 11:
1868
+ case 16:
1859
1869
  lockboxUuid = _context.sent[0].lockboxUuid;
1860
- case 12:
1861
- _context.next = 14;
1870
+ case 17:
1871
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'store_patient_data');
1872
+ _context.next = 20;
1862
1873
  return oroClient.getOrInsertJsonData(lockboxUuid, populatedRefillWorkflow, {
1863
1874
  category: MetadataCategory.Refill,
1864
1875
  documentType: DocumentType.PopulatedWorkflowData,
@@ -1866,39 +1877,95 @@ function _createRefill() {
1866
1877
  }, {}, {
1867
1878
  withNotification: true
1868
1879
  })["catch"](function (err) {
1869
- console.error('[SDK: prescription refill] Some errors happened during refill data upload', err);
1880
+ console.error('[SDK: prescription refill request] Some errors happened during refill data upload', err);
1870
1881
  errorsThrown.push(err);
1871
1882
  });
1872
- case 14:
1883
+ case 20:
1884
+ if (!indexSearch) {
1885
+ _context.next = 36;
1886
+ break;
1887
+ }
1888
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'fetching_parent_workflow_data');
1889
+ // raw workflow from parent consultation (contains first and last name of patient)
1890
+ _context.next = 24;
1891
+ return oroClient.getLockboxManifest(lockboxUuid, {
1892
+ category: MetadataCategory.Raw,
1893
+ consultationId: consultRequest.uuidParent
1894
+ }, false);
1895
+ case 24:
1896
+ rawConsultationManifest = _context.sent;
1897
+ if (!(rawConsultationManifest && rawConsultationManifest.length > 0)) {
1898
+ _context.next = 34;
1899
+ break;
1900
+ }
1901
+ _context.next = 28;
1902
+ return oroClient.getJsonData(lockboxUuid, rawConsultationManifest[0].dataUuid);
1903
+ case 28:
1904
+ rawConsultation = _context.sent;
1905
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'search_indexing');
1906
+ _context.next = 32;
1907
+ return buildConsultSearchIndex(newConsult, rawConsultation, oroClient)["catch"](function (err) {
1908
+ console.error('[SDK: prescription refill request] personal information not found or another error occured during search indexing', err);
1909
+ if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1910
+ errorsThrown.push(err);
1911
+ });
1912
+ case 32:
1913
+ _context.next = 36;
1914
+ break;
1915
+ case 34:
1916
+ console.error('[SDK: prescription refill request] parent consultation\'s raw data not found');
1917
+ errorsThrown.push(Error('RawData Not Found'));
1918
+ case 36:
1873
1919
  if (!(errorsThrown.length > 0)) {
1874
- _context.next = 16;
1920
+ _context.next = 38;
1875
1921
  break;
1876
1922
  }
1877
1923
  throw errorsThrown;
1878
- case 16:
1879
- _context.next = 18;
1924
+ case 38:
1925
+ _context.next = 40;
1880
1926
  return oroClient.consultClient.updateConsultByUUID(newConsult.uuid, {
1881
1927
  statusMedical: MedicalStatus.New
1882
1928
  });
1883
- case 18:
1884
- _context.next = 25;
1885
- break;
1886
- case 20:
1887
- _context.prev = 20;
1888
- _context.t0 = _context["catch"](3);
1889
- console.error("[SDK] Error occured during refill: " + _context.t0 + ", retrying... Retries remaining: " + retry);
1929
+ case 40:
1930
+ // if we got through the complete flow, the registration succeeded
1931
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
1932
+ _context.next = 43;
1933
+ return oroClient.cleanIndex();
1934
+ case 43:
1935
+ return _context.abrupt("break", 54);
1936
+ case 46:
1937
+ _context.prev = 46;
1938
+ _context.t0 = _context["catch"](6);
1939
+ console.error("[SDK] Error occured during prescription refill request: " + _context.t0 + ", retrying... Retries remaining: " + retry);
1890
1940
  errorsThrown = [];
1891
- return _context.abrupt("continue", 25);
1892
- case 25:
1941
+ return _context.abrupt("continue", 51);
1942
+ case 51:
1893
1943
  retry--;
1894
- _context.next = 2;
1944
+ _context.next = 5;
1895
1945
  break;
1896
- case 28:
1946
+ case 54:
1947
+ if (!(retry <= 0)) {
1948
+ _context.next = 57;
1949
+ break;
1950
+ }
1951
+ console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
1952
+ throw 'RegistrationFailed';
1953
+ case 57:
1954
+ if (newConsult) {
1955
+ _context.next = 60;
1956
+ break;
1957
+ }
1958
+ console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
1959
+ throw 'RegistrationFailed';
1960
+ case 60:
1961
+ console.log('Successfully Created refill');
1962
+ return _context.abrupt("return", newConsult);
1963
+ case 62:
1897
1964
  case "end":
1898
1965
  return _context.stop();
1899
1966
  }
1900
1967
  }
1901
- }, _callee, null, [[3, 20]]);
1968
+ }, _callee, null, [[6, 46]]);
1902
1969
  }));
1903
1970
  return _createRefill.apply(this, arguments);
1904
1971
  }
@@ -1997,17 +2064,19 @@ var OroClient = /*#__PURE__*/function () {
1997
2064
  return _cleanIndex.apply(this, arguments);
1998
2065
  }
1999
2066
  return cleanIndex;
2000
- }() /**
2001
- * Generates an RSA key pair and password payload (rsa private key encrypted with the password)
2002
- * Calls Guard to sign up with the email address, password, practice, legal and token data
2003
- *
2004
- * @param email
2005
- * @param password
2006
- * @param practice
2007
- * @param legal
2008
- * @param tokenData
2009
- * @returns
2010
- */;
2067
+ }()
2068
+ /**
2069
+ * Generates an RSA key pair and password payload (rsa private key encrypted with the password)
2070
+ * Calls Guard to sign up with the email address, password, practice, legal and token data
2071
+ *
2072
+ * @param email
2073
+ * @param password
2074
+ * @param practice
2075
+ * @param legal
2076
+ * @param tokenData
2077
+ * @returns
2078
+ */
2079
+ ;
2011
2080
  _proto.signUp =
2012
2081
  /*#__PURE__*/
2013
2082
  function () {
@@ -2055,11 +2124,13 @@ var OroClient = /*#__PURE__*/function () {
2055
2124
  return _signUp.apply(this, arguments);
2056
2125
  }
2057
2126
  return signUp;
2058
- }() /**
2059
- * Parse the given accessToken claims by calling guard whoami and update theidentity to set it's emailConfirmed flag
2060
- * @param accessToken
2061
- * @returns The identity related to confirmedEmail
2062
- */;
2127
+ }()
2128
+ /**
2129
+ * Parse the given accessToken claims by calling guard whoami and update theidentity to set it's emailConfirmed flag
2130
+ * @param accessToken
2131
+ * @returns The identity related to confirmedEmail
2132
+ */
2133
+ ;
2063
2134
  _proto.confirmEmail =
2064
2135
  /*#__PURE__*/
2065
2136
  function () {
@@ -2090,16 +2161,18 @@ var OroClient = /*#__PURE__*/function () {
2090
2161
  return _confirmEmail.apply(this, arguments);
2091
2162
  }
2092
2163
  return confirmEmail;
2093
- }() /**
2094
- * Calls Guard to sign in with the email address, password and one time password (if MFA is enabled)
2095
- * Then recover's the rsa private key from the recovery payload
2096
- *
2097
- * @param practiceUuid
2098
- * @param email
2099
- * @param password
2100
- * @param otp
2101
- * @returns the user identity
2102
- */;
2164
+ }()
2165
+ /**
2166
+ * Calls Guard to sign in with the email address, password and one time password (if MFA is enabled)
2167
+ * Then recover's the rsa private key from the recovery payload
2168
+ *
2169
+ * @param practiceUuid
2170
+ * @param email
2171
+ * @param password
2172
+ * @param otp
2173
+ * @returns the user identity
2174
+ */
2175
+ ;
2103
2176
  _proto.signIn =
2104
2177
  /*#__PURE__*/
2105
2178
  function () {
@@ -2141,10 +2214,12 @@ var OroClient = /*#__PURE__*/function () {
2141
2214
  return _signIn.apply(this, arguments);
2142
2215
  }
2143
2216
  return signIn;
2144
- }() /**
2145
- * Will attempt to recover an existing login session and set back
2146
- * the private key in scope
2147
- */;
2217
+ }()
2218
+ /**
2219
+ * Will attempt to recover an existing login session and set back
2220
+ * the private key in scope
2221
+ */
2222
+ ;
2148
2223
  _proto.resumeSession =
2149
2224
  /*#__PURE__*/
2150
2225
  function () {
@@ -2183,13 +2258,15 @@ var OroClient = /*#__PURE__*/function () {
2183
2258
  return _resumeSession.apply(this, arguments);
2184
2259
  }
2185
2260
  return resumeSession;
2186
- }() /**
2187
- * This function let's you encrypt locally an Object
2188
- * @param value the Object to encrypt
2189
- * @returns a LocalEncryptedData Object
2190
- * @throws IncompleteAuthentication if rsa is not set
2191
- * @calls authenticationCallback if rsa is not set
2192
- */;
2261
+ }()
2262
+ /**
2263
+ * This function let's you encrypt locally an Object
2264
+ * @param value the Object to encrypt
2265
+ * @returns a LocalEncryptedData Object
2266
+ * @throws IncompleteAuthentication if rsa is not set
2267
+ * @calls authenticationCallback if rsa is not set
2268
+ */
2269
+ ;
2193
2270
  _proto.localEncryptToJsonPayload = function localEncryptToJsonPayload(value) {
2194
2271
  if (!this.rsa) {
2195
2272
  if (this.authenticationCallback) {
@@ -2255,25 +2332,27 @@ var OroClient = /*#__PURE__*/function () {
2255
2332
  return _signOut.apply(this, arguments);
2256
2333
  }
2257
2334
  return signOut;
2258
- }() /**
2259
- * @name registerPatient
2260
- * @description The complete flow to register a patient
2261
- *
2262
- * Steps:
2263
- * 1. Create a consult (checks if payment has been done)
2264
- * 2. Creates a lockbox
2265
- * 3. Grants lockbox access to all practice personnel
2266
- * 4. Creates secure identification, medical, onboarding data
2267
- * 5. Generates and stores the rsa key pair and recovery payloads
2268
- *
2269
- * @param patientUuid
2270
- * @param consult
2271
- * @param workflow
2272
- * @param recoveryQA
2273
- * @param indexSearch create search index for the consultation if true
2274
- * @param onProgress callback that is called whenever a new step of patient registration is executed. Note: progress ranges from 0 to 1, and descriptionKey is a description of the progress as a key so the app would use it to translate the description
2275
- * @returns
2276
- */;
2335
+ }()
2336
+ /**
2337
+ * @name registerPatient
2338
+ * @description The complete flow to register a patient
2339
+ *
2340
+ * Steps:
2341
+ * 1. Create a consult (checks if payment has been done)
2342
+ * 2. Creates a lockbox
2343
+ * 3. Grants lockbox access to all practice personnel
2344
+ * 4. Creates secure identification, medical, onboarding data
2345
+ * 5. Generates and stores the rsa key pair and recovery payloads
2346
+ *
2347
+ * @param patientUuid
2348
+ * @param consult
2349
+ * @param workflow
2350
+ * @param recoveryQA
2351
+ * @param indexSearch create search index for the consultation if true
2352
+ * @param onProgress callback that is called whenever a new step of patient registration is executed. Note: progress ranges from 0 to 1, and descriptionKey is a description of the progress as a key so the app would use it to translate the description
2353
+ * @returns
2354
+ */
2355
+ ;
2277
2356
  _proto.registerPatient =
2278
2357
  /*#__PURE__*/
2279
2358
  function () {
@@ -2303,46 +2382,53 @@ var OroClient = /*#__PURE__*/function () {
2303
2382
  return _registerPatient2.apply(this, arguments);
2304
2383
  }
2305
2384
  return registerPatient$1;
2306
- }() /**
2307
- * Creates and stores all relevant refill data
2308
- * - New consultation is created
2309
- * - Stores refill workflow data in the lockbox
2310
- * - Updates the consult to new
2311
- *
2312
- * @param consult
2313
- * @param populatedRefillWorkflow
2314
- * @returns
2315
- */;
2385
+ }()
2386
+ /**
2387
+ * Creates and stores all relevant refill data
2388
+ * - New consultation is created
2389
+ * - Stores refill workflow data in the lockbox
2390
+ * - Updates the consult to new
2391
+ *
2392
+ * @param consult
2393
+ * @param populatedRefillWorkflow
2394
+ * @returns
2395
+ */
2396
+ ;
2316
2397
  _proto.createRefill =
2317
2398
  /*#__PURE__*/
2318
2399
  function () {
2319
- var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow) {
2400
+ var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow, indexSearch, onProgress) {
2320
2401
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2321
2402
  while (1) {
2322
2403
  switch (_context8.prev = _context8.next) {
2323
2404
  case 0:
2405
+ if (indexSearch === void 0) {
2406
+ indexSearch = true;
2407
+ }
2324
2408
  if (this.rsa) {
2325
- _context8.next = 2;
2409
+ _context8.next = 3;
2326
2410
  break;
2327
2411
  }
2328
2412
  throw IncompleteAuthentication;
2329
- case 2:
2330
- return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this));
2331
2413
  case 3:
2414
+ return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this, indexSearch, onProgress));
2415
+ case 4:
2332
2416
  case "end":
2333
2417
  return _context8.stop();
2334
2418
  }
2335
2419
  }
2336
2420
  }, _callee8, this);
2337
2421
  }));
2338
- function createRefill$1(_x19, _x20) {
2422
+ function createRefill$1(_x19, _x20, _x21, _x22) {
2339
2423
  return _createRefill2.apply(this, arguments);
2340
2424
  }
2341
2425
  return createRefill$1;
2342
- }() /**
2343
- * Fetches all grants, and consultations that exist in each lockbox
2344
- * Then updates the index for the current user with the lockbox consult relationship
2345
- */;
2426
+ }()
2427
+ /**
2428
+ * Fetches all grants, and consultations that exist in each lockbox
2429
+ * Then updates the index for the current user with the lockbox consult relationship
2430
+ */
2431
+ ;
2346
2432
  _proto.forceUpdateIndexEntries =
2347
2433
  /*#__PURE__*/
2348
2434
  function () {
@@ -2394,7 +2480,7 @@ var OroClient = /*#__PURE__*/function () {
2394
2480
  }
2395
2481
  }, _callee9);
2396
2482
  }));
2397
- return function (_x21) {
2483
+ return function (_x23) {
2398
2484
  return _ref2.apply(this, arguments);
2399
2485
  };
2400
2486
  }())).then(function (consults) {
@@ -2418,12 +2504,14 @@ var OroClient = /*#__PURE__*/function () {
2418
2504
  return _forceUpdateIndexEntries.apply(this, arguments);
2419
2505
  }
2420
2506
  return forceUpdateIndexEntries;
2421
- }() /**
2422
- * Generates, encrypts and adds entries to vault index for a given index owner
2423
- *
2424
- * @param entries
2425
- * @param indexOwnerUuid
2426
- */;
2507
+ }()
2508
+ /**
2509
+ * Generates, encrypts and adds entries to vault index for a given index owner
2510
+ *
2511
+ * @param entries
2512
+ * @param indexOwnerUuid
2513
+ */
2514
+ ;
2427
2515
  _proto.vaultIndexAdd =
2428
2516
  /*#__PURE__*/
2429
2517
  function () {
@@ -2496,17 +2584,19 @@ var OroClient = /*#__PURE__*/function () {
2496
2584
  }
2497
2585
  }, _callee11, this);
2498
2586
  }));
2499
- function vaultIndexAdd(_x22, _x23) {
2587
+ function vaultIndexAdd(_x24, _x25) {
2500
2588
  return _vaultIndexAdd.apply(this, arguments);
2501
2589
  }
2502
2590
  return vaultIndexAdd;
2503
- }() /**
2504
- * @name grantLockbox
2505
- * @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
2506
- * @param granteeUuid
2507
- * @param lockboxUuid
2508
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2509
- */;
2591
+ }()
2592
+ /**
2593
+ * @name grantLockbox
2594
+ * @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
2595
+ * @param granteeUuid
2596
+ * @param lockboxUuid
2597
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2598
+ */
2599
+ ;
2510
2600
  _proto.grantLockbox =
2511
2601
  /*#__PURE__*/
2512
2602
  function () {
@@ -2545,20 +2635,22 @@ var OroClient = /*#__PURE__*/function () {
2545
2635
  }
2546
2636
  }, _callee12, this);
2547
2637
  }));
2548
- function grantLockbox(_x24, _x25, _x26) {
2638
+ function grantLockbox(_x26, _x27, _x28) {
2549
2639
  return _grantLockbox.apply(this, arguments);
2550
2640
  }
2551
2641
  return grantLockbox;
2552
- }() /**
2553
- * @name createMessageData
2554
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a message string
2555
- * @param lockboxUuid
2556
- * @param message
2557
- * @param consultationId the consultation for which this message is sent
2558
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2559
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2560
- * @returns the data uuid
2561
- */;
2642
+ }()
2643
+ /**
2644
+ * @name createMessageData
2645
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a message string
2646
+ * @param lockboxUuid
2647
+ * @param message
2648
+ * @param consultationId the consultation for which this message is sent
2649
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2650
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2651
+ * @returns the data uuid
2652
+ */
2653
+ ;
2562
2654
  _proto.createMessageData =
2563
2655
  /*#__PURE__*/
2564
2656
  function () {
@@ -2607,20 +2699,22 @@ var OroClient = /*#__PURE__*/function () {
2607
2699
  }
2608
2700
  }, _callee13, this);
2609
2701
  }));
2610
- function createMessageData(_x27, _x28, _x29, _x30, _x31) {
2702
+ function createMessageData(_x29, _x30, _x31, _x32, _x33) {
2611
2703
  return _createMessageData.apply(this, arguments);
2612
2704
  }
2613
2705
  return createMessageData;
2614
- }() /**
2615
- * @name createMessageAttachmentData
2616
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2617
- * @param lockboxUuid
2618
- * @param data the file stored
2619
- * @param consultationId the consultation for which this message is sent
2620
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2621
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2622
- * @returns the data uuid
2623
- */;
2706
+ }()
2707
+ /**
2708
+ * @name createMessageAttachmentData
2709
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2710
+ * @param lockboxUuid
2711
+ * @param data the file stored
2712
+ * @param consultationId the consultation for which this message is sent
2713
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2714
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2715
+ * @returns the data uuid
2716
+ */
2717
+ ;
2624
2718
  _proto.createMessageAttachmentData =
2625
2719
  /*#__PURE__*/
2626
2720
  function () {
@@ -2682,22 +2776,24 @@ var OroClient = /*#__PURE__*/function () {
2682
2776
  }
2683
2777
  }, _callee14, this);
2684
2778
  }));
2685
- function createMessageAttachmentData(_x32, _x33, _x34, _x35, _x36) {
2779
+ function createMessageAttachmentData(_x34, _x35, _x36, _x37, _x38) {
2686
2780
  return _createMessageAttachmentData.apply(this, arguments);
2687
2781
  }
2688
2782
  return createMessageAttachmentData;
2689
- }() /**
2690
- * @name createAttachmentData
2691
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2692
- * @param lockboxUuid
2693
- * @param data the file stored
2694
- * @param consultationId the consultation for which this message is sent
2695
- * @param category the category for the attachment data
2696
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2697
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2698
- * @param withNotification if the insertion of data requires notification
2699
- * @returns the data uuid
2700
- */;
2783
+ }()
2784
+ /**
2785
+ * @name createAttachmentData
2786
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2787
+ * @param lockboxUuid
2788
+ * @param data the file stored
2789
+ * @param consultationId the consultation for which this message is sent
2790
+ * @param category the category for the attachment data
2791
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2792
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2793
+ * @param withNotification if the insertion of data requires notification
2794
+ * @returns the data uuid
2795
+ */
2796
+ ;
2701
2797
  _proto.createConsultationAttachmentData =
2702
2798
  /*#__PURE__*/
2703
2799
  function () {
@@ -2751,22 +2847,24 @@ var OroClient = /*#__PURE__*/function () {
2751
2847
  }
2752
2848
  }, _callee15, this);
2753
2849
  }));
2754
- function createConsultationAttachmentData(_x37, _x38, _x39, _x40, _x41, _x42, _x43) {
2850
+ function createConsultationAttachmentData(_x39, _x40, _x41, _x42, _x43, _x44, _x45) {
2755
2851
  return _createConsultationAttachmentData.apply(this, arguments);
2756
2852
  }
2757
2853
  return createConsultationAttachmentData;
2758
- }() /**
2759
- * @name createJsonData
2760
- * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
2761
- * @param lockboxUuid
2762
- * @param data
2763
- * @param meta
2764
- * @param privateMeta the metadata that will be secured in the vault
2765
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2766
- * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2767
- * @param options if the insertion of data requires email notification
2768
- * @returns the data uuid
2769
- */;
2854
+ }()
2855
+ /**
2856
+ * @name createJsonData
2857
+ * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
2858
+ * @param lockboxUuid
2859
+ * @param data
2860
+ * @param meta
2861
+ * @param privateMeta the metadata that will be secured in the vault
2862
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2863
+ * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2864
+ * @param options if the insertion of data requires email notification
2865
+ * @returns the data uuid
2866
+ */
2867
+ ;
2770
2868
  _proto.createJsonData =
2771
2869
  /*#__PURE__*/
2772
2870
  function () {
@@ -2812,20 +2910,22 @@ var OroClient = /*#__PURE__*/function () {
2812
2910
  }
2813
2911
  }, _callee16, this);
2814
2912
  }));
2815
- function createJsonData(_x44, _x45, _x46, _x47, _x48, _x49, _x50) {
2913
+ function createJsonData(_x46, _x47, _x48, _x49, _x50, _x51, _x52) {
2816
2914
  return _createJsonData.apply(this, arguments);
2817
2915
  }
2818
2916
  return createJsonData;
2819
- }() /**
2820
- * Get or upsert a data in lockbox
2821
- * @param lockboxUuid the lockbox uuid
2822
- * @param data the data to insert
2823
- * @param publicMetadata the public Metadata
2824
- * @param privateMetadata the private Metadata
2825
- * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
2826
- * @param options if the insertion of data requires email notification
2827
- * @returns the data uuid
2828
- */;
2917
+ }()
2918
+ /**
2919
+ * Get or upsert a data in lockbox
2920
+ * @param lockboxUuid the lockbox uuid
2921
+ * @param data the data to insert
2922
+ * @param publicMetadata the public Metadata
2923
+ * @param privateMetadata the private Metadata
2924
+ * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
2925
+ * @param options if the insertion of data requires email notification
2926
+ * @returns the data uuid
2927
+ */
2928
+ ;
2829
2929
  _proto.getOrInsertJsonData =
2830
2930
  /*#__PURE__*/
2831
2931
  function () {
@@ -2870,22 +2970,24 @@ var OroClient = /*#__PURE__*/function () {
2870
2970
  }
2871
2971
  }, _callee17, this);
2872
2972
  }));
2873
- function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55) {
2973
+ function getOrInsertJsonData(_x53, _x54, _x55, _x56, _x57) {
2874
2974
  return _getOrInsertJsonData.apply(this, arguments);
2875
2975
  }
2876
2976
  return getOrInsertJsonData;
2877
- }() /**
2878
- * @name createBytesData
2879
- * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
2880
- * @param lockboxUuid
2881
- * @param data
2882
- * @param meta
2883
- * @param privateMeta the metadata that will be secured in the vault
2884
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2885
- * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2886
- * @param withNotification if the insertion of data requires notification
2887
- * @returns the data uuid
2888
- */;
2977
+ }()
2978
+ /**
2979
+ * @name createBytesData
2980
+ * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
2981
+ * @param lockboxUuid
2982
+ * @param data
2983
+ * @param meta
2984
+ * @param privateMeta the metadata that will be secured in the vault
2985
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2986
+ * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2987
+ * @param withNotification if the insertion of data requires notification
2988
+ * @returns the data uuid
2989
+ */
2990
+ ;
2889
2991
  _proto.createBytesData =
2890
2992
  /*#__PURE__*/
2891
2993
  function () {
@@ -2931,21 +3033,23 @@ var OroClient = /*#__PURE__*/function () {
2931
3033
  }
2932
3034
  }, _callee18, this);
2933
3035
  }));
2934
- function createBytesData(_x56, _x57, _x58, _x59, _x60, _x61, _x62) {
3036
+ function createBytesData(_x58, _x59, _x60, _x61, _x62, _x63, _x64) {
2935
3037
  return _createBytesData.apply(this, arguments);
2936
3038
  }
2937
3039
  return createBytesData;
2938
- }() /**
2939
- * @name getJsonData
2940
- * @description Fetches and decrypts the lockbox data with the cached shared secret.
2941
- * Decrypts the data to a valid JSON object. If this is impossible, the call to the WASM binary will fail
2942
- *
2943
- * @type T is the generic type specifying the return type object of the function
2944
- * @param lockboxUuid
2945
- * @param dataUuid
2946
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2947
- * @returns the data specified by the generic type <T>
2948
- */;
3040
+ }()
3041
+ /**
3042
+ * @name getJsonData
3043
+ * @description Fetches and decrypts the lockbox data with the cached shared secret.
3044
+ * Decrypts the data to a valid JSON object. If this is impossible, the call to the WASM binary will fail
3045
+ *
3046
+ * @type T is the generic type specifying the return type object of the function
3047
+ * @param lockboxUuid
3048
+ * @param dataUuid
3049
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3050
+ * @returns the data specified by the generic type <T>
3051
+ */
3052
+ ;
2949
3053
  _proto.getJsonData =
2950
3054
  /*#__PURE__*/
2951
3055
  function () {
@@ -2975,17 +3079,19 @@ var OroClient = /*#__PURE__*/function () {
2975
3079
  }
2976
3080
  }, _callee19, this);
2977
3081
  }));
2978
- function getJsonData(_x63, _x64, _x65) {
3082
+ function getJsonData(_x65, _x66, _x67) {
2979
3083
  return _getJsonData.apply(this, arguments);
2980
3084
  }
2981
3085
  return getJsonData;
2982
- }() /**
2983
- * @description Fetches and decrypts the lockbox data with the cached shared secret.
2984
- * @param lockboxUuid
2985
- * @param dataUuid
2986
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2987
- * @returns the bytes data
2988
- */;
3086
+ }()
3087
+ /**
3088
+ * @description Fetches and decrypts the lockbox data with the cached shared secret.
3089
+ * @param lockboxUuid
3090
+ * @param dataUuid
3091
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3092
+ * @returns the bytes data
3093
+ */
3094
+ ;
2989
3095
  _proto.getBytesData =
2990
3096
  /*#__PURE__*/
2991
3097
  function () {
@@ -3015,20 +3121,22 @@ var OroClient = /*#__PURE__*/function () {
3015
3121
  }
3016
3122
  }, _callee20, this);
3017
3123
  }));
3018
- function getBytesData(_x66, _x67, _x68) {
3124
+ function getBytesData(_x68, _x69, _x70) {
3019
3125
  return _getBytesData.apply(this, arguments);
3020
3126
  }
3021
3127
  return getBytesData;
3022
- }() /**
3023
- * @name getGrants
3024
- * @description Get all lockboxes granted to user with the applied filter
3025
- * @note this function returns cached grants and will not update unless the page is refreshed
3026
- * @todo some versions of lockboxes do not make use of lockbox metadata
3027
- * in this case, all lockboxes need to be filtered one-by-one to find the correct one
3028
- * Remove if this is no longer the case
3029
- * @param filter: the consultationId in which the grant exists
3030
- * @returns decrypted lockboxes granted to user
3031
- */;
3128
+ }()
3129
+ /**
3130
+ * @name getGrants
3131
+ * @description Get all lockboxes granted to user with the applied filter
3132
+ * @note this function returns cached grants and will not update unless the page is refreshed
3133
+ * @todo some versions of lockboxes do not make use of lockbox metadata
3134
+ * in this case, all lockboxes need to be filtered one-by-one to find the correct one
3135
+ * Remove if this is no longer the case
3136
+ * @param filter: the consultationId in which the grant exists
3137
+ * @returns decrypted lockboxes granted to user
3138
+ */
3139
+ ;
3032
3140
  _proto.getGrants =
3033
3141
  /*#__PURE__*/
3034
3142
  function () {
@@ -3124,15 +3232,17 @@ var OroClient = /*#__PURE__*/function () {
3124
3232
  }
3125
3233
  }, _callee21, this);
3126
3234
  }));
3127
- function getGrants(_x69) {
3235
+ function getGrants(_x71) {
3128
3236
  return _getGrants.apply(this, arguments);
3129
3237
  }
3130
3238
  return getGrants;
3131
- }() /**
3132
- * Fetches the role of the account that is logged in
3133
- *
3134
- * @returns the role based scopes defined by the whoami
3135
- */;
3239
+ }()
3240
+ /**
3241
+ * Fetches the role of the account that is logged in
3242
+ *
3243
+ * @returns the role based scopes defined by the whoami
3244
+ */
3245
+ ;
3136
3246
  _proto.getAccountRole =
3137
3247
  /*#__PURE__*/
3138
3248
  function () {
@@ -3156,13 +3266,15 @@ var OroClient = /*#__PURE__*/function () {
3156
3266
  return _getAccountRole.apply(this, arguments);
3157
3267
  }
3158
3268
  return getAccountRole;
3159
- }() /**
3160
- * @name getCachedSecretCryptor
3161
- * @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
3162
- * @param lockboxUuid
3163
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3164
- * @returns
3165
- */;
3269
+ }()
3270
+ /**
3271
+ * @name getCachedSecretCryptor
3272
+ * @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
3273
+ * @param lockboxUuid
3274
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3275
+ * @returns
3276
+ */
3277
+ ;
3166
3278
  _proto.getCachedSecretCryptor =
3167
3279
  /*#__PURE__*/
3168
3280
  function () {
@@ -3205,19 +3317,21 @@ var OroClient = /*#__PURE__*/function () {
3205
3317
  }
3206
3318
  }, _callee23, this);
3207
3319
  }));
3208
- function getCachedSecretCryptor(_x70, _x71) {
3320
+ function getCachedSecretCryptor(_x72, _x73) {
3209
3321
  return _getCachedSecretCryptor.apply(this, arguments);
3210
3322
  }
3211
3323
  return getCachedSecretCryptor;
3212
- }() /**
3213
- * Retrieves the patient personal information associated to the `consultationId`
3214
- * The `consultationId` only helps to retrieve the patient lockboxes
3215
- * Note: it is possible to have several personal informations data
3216
- * @param consultationId The consultation Id
3217
- * @param category The personal MetadataCategory to fetch
3218
- * @param forceRefresh force data refresh (default to false)
3219
- * @returns the personal data
3220
- */;
3324
+ }()
3325
+ /**
3326
+ * Retrieves the patient personal information associated to the `consultationId`
3327
+ * The `consultationId` only helps to retrieve the patient lockboxes
3328
+ * Note: it is possible to have several personal informations data
3329
+ * @param consultationId The consultation Id
3330
+ * @param category The personal MetadataCategory to fetch
3331
+ * @param forceRefresh force data refresh (default to false)
3332
+ * @returns the personal data
3333
+ */
3334
+ ;
3221
3335
  _proto.getPersonalInformationsFromConsultId =
3222
3336
  /*#__PURE__*/
3223
3337
  function () {
@@ -3239,18 +3353,20 @@ var OroClient = /*#__PURE__*/function () {
3239
3353
  }
3240
3354
  }, _callee24, this);
3241
3355
  }));
3242
- function getPersonalInformationsFromConsultId(_x72, _x73, _x74) {
3356
+ function getPersonalInformationsFromConsultId(_x74, _x75, _x76) {
3243
3357
  return _getPersonalInformationsFromConsultId.apply(this, arguments);
3244
3358
  }
3245
3359
  return getPersonalInformationsFromConsultId;
3246
- }() /**
3247
- * Retrieves the patient medical data associated to the `consultationId`
3248
- * The `consultationId` only helps to retrieve the patient lockboxes
3249
- * Note: it is possible to have several medical data
3250
- * @param consultationId The consultation Id
3251
- * @param forceRefresh force data refresh (default to false)
3252
- * @returns the medical data
3253
- */;
3360
+ }()
3361
+ /**
3362
+ * Retrieves the patient medical data associated to the `consultationId`
3363
+ * The `consultationId` only helps to retrieve the patient lockboxes
3364
+ * Note: it is possible to have several medical data
3365
+ * @param consultationId The consultation Id
3366
+ * @param forceRefresh force data refresh (default to false)
3367
+ * @returns the medical data
3368
+ */
3369
+ ;
3254
3370
  _proto.getMedicalDataFromConsultId =
3255
3371
  /*#__PURE__*/
3256
3372
  function () {
@@ -3272,7 +3388,7 @@ var OroClient = /*#__PURE__*/function () {
3272
3388
  }
3273
3389
  }, _callee25, this);
3274
3390
  }));
3275
- function getMedicalDataFromConsultId(_x75, _x76) {
3391
+ function getMedicalDataFromConsultId(_x77, _x78) {
3276
3392
  return _getMedicalDataFromConsultId.apply(this, arguments);
3277
3393
  }
3278
3394
  return getMedicalDataFromConsultId;
@@ -3353,7 +3469,7 @@ var OroClient = /*#__PURE__*/function () {
3353
3469
  }
3354
3470
  }, _callee26);
3355
3471
  }));
3356
- return function (_x80) {
3472
+ return function (_x82) {
3357
3473
  return _ref3.apply(this, arguments);
3358
3474
  };
3359
3475
  }()));
@@ -3386,15 +3502,17 @@ var OroClient = /*#__PURE__*/function () {
3386
3502
  }
3387
3503
  }, _callee27, this);
3388
3504
  }));
3389
- function getMetaCategoryFromConsultId(_x77, _x78, _x79) {
3505
+ function getMetaCategoryFromConsultId(_x79, _x80, _x81) {
3390
3506
  return _getMetaCategoryFromConsultId.apply(this, arguments);
3391
3507
  }
3392
3508
  return getMetaCategoryFromConsultId;
3393
- }() /**
3394
- * @description retrieves the personal information stored in the first owned lockbox
3395
- * @param userId The user Id
3396
- * @returns the personal data
3397
- */;
3509
+ }()
3510
+ /**
3511
+ * @description retrieves the personal information stored in the first owned lockbox
3512
+ * @param userId The user Id
3513
+ * @returns the personal data
3514
+ */
3515
+ ;
3398
3516
  _proto.getPersonalInformations =
3399
3517
  /*#__PURE__*/
3400
3518
  function () {
@@ -3456,16 +3574,18 @@ var OroClient = /*#__PURE__*/function () {
3456
3574
  }
3457
3575
  }, _callee28, this);
3458
3576
  }));
3459
- function getPersonalInformations(_x81) {
3577
+ function getPersonalInformations(_x83) {
3460
3578
  return _getPersonalInformations.apply(this, arguments);
3461
3579
  }
3462
3580
  return getPersonalInformations;
3463
- }() /**
3464
- * Retrieves the grant associated to a consultationId
3465
- * @note returns the first grant only
3466
- * @param consultationId The consultationId
3467
- * @returns the grant
3468
- */;
3581
+ }()
3582
+ /**
3583
+ * Retrieves the grant associated to a consultationId
3584
+ * @note returns the first grant only
3585
+ * @param consultationId The consultationId
3586
+ * @returns the grant
3587
+ */
3588
+ ;
3469
3589
  _proto.getGrantFromConsultId =
3470
3590
  /*#__PURE__*/
3471
3591
  function () {
@@ -3495,15 +3615,17 @@ var OroClient = /*#__PURE__*/function () {
3495
3615
  }
3496
3616
  }, _callee29, this);
3497
3617
  }));
3498
- function getGrantFromConsultId(_x82) {
3618
+ function getGrantFromConsultId(_x84) {
3499
3619
  return _getGrantFromConsultId.apply(this, arguments);
3500
3620
  }
3501
3621
  return getGrantFromConsultId;
3502
- }() /**
3503
- * retrieves the identity associated to the `consultationId`
3504
- * @param consultationId The consultation Id
3505
- * @returns the identity
3506
- */;
3622
+ }()
3623
+ /**
3624
+ * retrieves the identity associated to the `consultationId`
3625
+ * @param consultationId The consultation Id
3626
+ * @returns the identity
3627
+ */
3628
+ ;
3507
3629
  _proto.getIdentityFromConsultId =
3508
3630
  /*#__PURE__*/
3509
3631
  function () {
@@ -3534,20 +3656,22 @@ var OroClient = /*#__PURE__*/function () {
3534
3656
  }
3535
3657
  }, _callee30, this);
3536
3658
  }));
3537
- function getIdentityFromConsultId(_x83) {
3659
+ function getIdentityFromConsultId(_x85) {
3538
3660
  return _getIdentityFromConsultId.apply(this, arguments);
3539
3661
  }
3540
3662
  return getIdentityFromConsultId;
3541
- }() /**
3542
- * retrieves the lockbox manifest for a given lockbox and add's its private metadata
3543
- * @note the lockbox manifest will retrieved the cached manifest first unless force refresh is enabled
3544
- * @param lockboxUuid
3545
- * @param filter
3546
- * @param expandPrivateMetadata
3547
- * @param lockboxOwnerUuid
3548
- * @param forceRefresh
3549
- * @returns the lockbox manifest
3550
- */;
3663
+ }()
3664
+ /**
3665
+ * retrieves the lockbox manifest for a given lockbox and add's its private metadata
3666
+ * @note the lockbox manifest will retrieved the cached manifest first unless force refresh is enabled
3667
+ * @param lockboxUuid
3668
+ * @param filter
3669
+ * @param expandPrivateMetadata
3670
+ * @param lockboxOwnerUuid
3671
+ * @param forceRefresh
3672
+ * @returns the lockbox manifest
3673
+ */
3674
+ ;
3551
3675
  _proto.getLockboxManifest =
3552
3676
  /*#__PURE__*/
3553
3677
  function () {
@@ -3601,7 +3725,7 @@ var OroClient = /*#__PURE__*/function () {
3601
3725
  }
3602
3726
  }, _callee31);
3603
3727
  }));
3604
- return function (_x89) {
3728
+ return function (_x91) {
3605
3729
  return _ref4.apply(this, arguments);
3606
3730
  };
3607
3731
  }())).then(function (manifest) {
@@ -3615,17 +3739,19 @@ var OroClient = /*#__PURE__*/function () {
3615
3739
  }
3616
3740
  }, _callee32, this);
3617
3741
  }));
3618
- function getLockboxManifest(_x84, _x85, _x86, _x87, _x88) {
3742
+ function getLockboxManifest(_x86, _x87, _x88, _x89, _x90) {
3619
3743
  return _getLockboxManifest.apply(this, arguments);
3620
3744
  }
3621
3745
  return getLockboxManifest;
3622
- }() /**
3623
- * @description Create or update the personal information and store it in the first owned lockbox
3624
- * @param identity The identity to use
3625
- * @param data The personal data to store
3626
- * @param dataUuid (optional) The dataUuid to update
3627
- * @returns
3628
- */;
3746
+ }()
3747
+ /**
3748
+ * @description Create or update the personal information and store it in the first owned lockbox
3749
+ * @param identity The identity to use
3750
+ * @param data The personal data to store
3751
+ * @param dataUuid (optional) The dataUuid to update
3752
+ * @returns
3753
+ */
3754
+ ;
3629
3755
  _proto.createPersonalInformations =
3630
3756
  /*#__PURE__*/
3631
3757
  function () {
@@ -3670,17 +3796,19 @@ var OroClient = /*#__PURE__*/function () {
3670
3796
  }
3671
3797
  }, _callee33, this);
3672
3798
  }));
3673
- function createPersonalInformations(_x90, _x91, _x92) {
3799
+ function createPersonalInformations(_x92, _x93, _x94) {
3674
3800
  return _createPersonalInformations.apply(this, arguments);
3675
3801
  }
3676
3802
  return createPersonalInformations;
3677
- }() /**
3678
- * Create or update user Preference
3679
- * @param identity
3680
- * @param preference
3681
- * @param dataUuid
3682
- * @returns
3683
- */;
3803
+ }()
3804
+ /**
3805
+ * Create or update user Preference
3806
+ * @param identity
3807
+ * @param preference
3808
+ * @param dataUuid
3809
+ * @returns
3810
+ */
3811
+ ;
3684
3812
  _proto.createUserPreference =
3685
3813
  /*#__PURE__*/
3686
3814
  function () {
@@ -3725,15 +3853,17 @@ var OroClient = /*#__PURE__*/function () {
3725
3853
  }
3726
3854
  }, _callee34, this);
3727
3855
  }));
3728
- function createUserPreference(_x93, _x94, _x95) {
3856
+ function createUserPreference(_x95, _x96, _x97) {
3729
3857
  return _createUserPreference.apply(this, arguments);
3730
3858
  }
3731
3859
  return createUserPreference;
3732
- }() /**
3733
- * retrieves the user preference from a grant
3734
- * @param grant The grant
3735
- * @returns the user preference
3736
- */;
3860
+ }()
3861
+ /**
3862
+ * retrieves the user preference from a grant
3863
+ * @param grant The grant
3864
+ * @returns the user preference
3865
+ */
3866
+ ;
3737
3867
  _proto.getDataFromGrant =
3738
3868
  /*#__PURE__*/
3739
3869
  function () {
@@ -3782,15 +3912,17 @@ var OroClient = /*#__PURE__*/function () {
3782
3912
  }
3783
3913
  }, _callee35, this);
3784
3914
  }));
3785
- function getDataFromGrant(_x96, _x97) {
3915
+ function getDataFromGrant(_x98, _x99) {
3786
3916
  return _getDataFromGrant.apply(this, arguments);
3787
3917
  }
3788
3918
  return getDataFromGrant;
3789
- }() /**
3790
- * retrieves the user preference from a consultation id
3791
- * @param consultationId The related consultationId
3792
- * @returns the user preference
3793
- */;
3919
+ }()
3920
+ /**
3921
+ * retrieves the user preference from a consultation id
3922
+ * @param consultationId The related consultationId
3923
+ * @returns the user preference
3924
+ */
3925
+ ;
3794
3926
  _proto.getUserPreferenceFromConsultId =
3795
3927
  /*#__PURE__*/
3796
3928
  function () {
@@ -3821,15 +3953,17 @@ var OroClient = /*#__PURE__*/function () {
3821
3953
  }
3822
3954
  }, _callee36, this);
3823
3955
  }));
3824
- function getUserPreferenceFromConsultId(_x98) {
3956
+ function getUserPreferenceFromConsultId(_x100) {
3825
3957
  return _getUserPreferenceFromConsultId.apply(this, arguments);
3826
3958
  }
3827
3959
  return getUserPreferenceFromConsultId;
3828
- }() /**
3829
- * retrieves the user preference stored in the first owned lockbox from identity
3830
- * @param identity The identity to use
3831
- * @returns the user preference
3832
- */;
3960
+ }()
3961
+ /**
3962
+ * retrieves the user preference stored in the first owned lockbox from identity
3963
+ * @param identity The identity to use
3964
+ * @returns the user preference
3965
+ */
3966
+ ;
3833
3967
  _proto.getUserPreference =
3834
3968
  /*#__PURE__*/
3835
3969
  function () {
@@ -3862,15 +3996,17 @@ var OroClient = /*#__PURE__*/function () {
3862
3996
  }
3863
3997
  }, _callee37, this);
3864
3998
  }));
3865
- function getUserPreference(_x99) {
3999
+ function getUserPreference(_x101) {
3866
4000
  return _getUserPreference.apply(this, arguments);
3867
4001
  }
3868
4002
  return getUserPreference;
3869
- }() /**
3870
- * retrieves the user preference from a consultation id
3871
- * @param consultationId The related consultationId
3872
- * @returns the user preference
3873
- */;
4003
+ }()
4004
+ /**
4005
+ * retrieves the user preference from a consultation id
4006
+ * @param consultationId The related consultationId
4007
+ * @returns the user preference
4008
+ */
4009
+ ;
3874
4010
  _proto.getRecoveryDataFromConsultId =
3875
4011
  /*#__PURE__*/
3876
4012
  function () {
@@ -3901,15 +4037,17 @@ var OroClient = /*#__PURE__*/function () {
3901
4037
  }
3902
4038
  }, _callee38, this);
3903
4039
  }));
3904
- function getRecoveryDataFromConsultId(_x100) {
4040
+ function getRecoveryDataFromConsultId(_x102) {
3905
4041
  return _getRecoveryDataFromConsultId.apply(this, arguments);
3906
4042
  }
3907
4043
  return getRecoveryDataFromConsultId;
3908
- }() /**
3909
- * retrieves the user preference stored in the first owned lockbox from identity
3910
- * @param identity The identity to use
3911
- * @returns the user preference
3912
- */;
4044
+ }()
4045
+ /**
4046
+ * retrieves the user preference stored in the first owned lockbox from identity
4047
+ * @param identity The identity to use
4048
+ * @returns the user preference
4049
+ */
4050
+ ;
3913
4051
  _proto.getRecoveryData =
3914
4052
  /*#__PURE__*/
3915
4053
  function () {
@@ -3942,20 +4080,22 @@ var OroClient = /*#__PURE__*/function () {
3942
4080
  }
3943
4081
  }, _callee39, this);
3944
4082
  }));
3945
- function getRecoveryData(_x101) {
4083
+ function getRecoveryData(_x103) {
3946
4084
  return _getRecoveryData.apply(this, arguments);
3947
4085
  }
3948
4086
  return getRecoveryData;
3949
- }() /**
3950
- * @name getAssignedConsultations
3951
- * @description finds all assigned or owned consultations for the logged user
3952
- * Steps:
3953
- * - Retrieves all granted lockboxes given to the logged user
3954
- * - for each lockbox, find all consultation ids
3955
- * - for each consultation id, retrieve the consult information
3956
- * @param practiceUuid the uuid of the practice to look consult into
3957
- * @returns the list of consults
3958
- */;
4087
+ }()
4088
+ /**
4089
+ * @name getAssignedConsultations
4090
+ * @description finds all assigned or owned consultations for the logged user
4091
+ * Steps:
4092
+ * - Retrieves all granted lockboxes given to the logged user
4093
+ * - for each lockbox, find all consultation ids
4094
+ * - for each consultation id, retrieve the consult information
4095
+ * @param practiceUuid the uuid of the practice to look consult into
4096
+ * @returns the list of consults
4097
+ */
4098
+ ;
3959
4099
  _proto.getAssignedConsultations =
3960
4100
  /*#__PURE__*/
3961
4101
  function () {
@@ -3991,7 +4131,7 @@ var OroClient = /*#__PURE__*/function () {
3991
4131
  }
3992
4132
  }, _callee40);
3993
4133
  }));
3994
- return function (_x103) {
4134
+ return function (_x105) {
3995
4135
  return _ref5.apply(this, arguments);
3996
4136
  };
3997
4137
  }())).then(function (promise) {
@@ -4009,15 +4149,17 @@ var OroClient = /*#__PURE__*/function () {
4009
4149
  }
4010
4150
  }, _callee41, this);
4011
4151
  }));
4012
- function getAssignedConsultations(_x102) {
4152
+ function getAssignedConsultations(_x104) {
4013
4153
  return _getAssignedConsultations.apply(this, arguments);
4014
4154
  }
4015
4155
  return getAssignedConsultations;
4016
- }() /**
4017
- * Gets the past consultations of the patient as well as his relatives if any
4018
- * @param consultationId any consultation uuid from which we will fetch all the other consultations of the same patient as the owner of this consultation id
4019
- * @param practiceUuid
4020
- */;
4156
+ }()
4157
+ /**
4158
+ * Gets the past consultations of the patient as well as his relatives if any
4159
+ * @param consultationId any consultation uuid from which we will fetch all the other consultations of the same patient as the owner of this consultation id
4160
+ * @param practiceUuid
4161
+ */
4162
+ ;
4021
4163
  _proto.getPastConsultationsFromConsultId =
4022
4164
  /*#__PURE__*/
4023
4165
  function () {
@@ -4071,7 +4213,7 @@ var OroClient = /*#__PURE__*/function () {
4071
4213
  }
4072
4214
  }, _callee42);
4073
4215
  }));
4074
- return function (_x106) {
4216
+ return function (_x108) {
4075
4217
  return _ref6.apply(this, arguments);
4076
4218
  };
4077
4219
  }()));
@@ -4084,16 +4226,18 @@ var OroClient = /*#__PURE__*/function () {
4084
4226
  }
4085
4227
  }, _callee43, this);
4086
4228
  }));
4087
- function getPastConsultationsFromConsultId(_x104, _x105) {
4229
+ function getPastConsultationsFromConsultId(_x106, _x107) {
4088
4230
  return _getPastConsultationsFromConsultId.apply(this, arguments);
4089
4231
  }
4090
4232
  return getPastConsultationsFromConsultId;
4091
- }() /**
4092
- * @name getPatientConsultationData
4093
- * @description retrieves the consultation data
4094
- * @param consultationId
4095
- * @returns
4096
- */;
4233
+ }()
4234
+ /**
4235
+ * @name getPatientConsultationData
4236
+ * @description retrieves the consultation data
4237
+ * @param consultationId
4238
+ * @returns
4239
+ */
4240
+ ;
4097
4241
  _proto.getPatientConsultationData =
4098
4242
  /*#__PURE__*/
4099
4243
  function () {
@@ -4135,15 +4279,17 @@ var OroClient = /*#__PURE__*/function () {
4135
4279
  }
4136
4280
  }, _callee44, this);
4137
4281
  }));
4138
- function getPatientConsultationData(_x107, _x108) {
4282
+ function getPatientConsultationData(_x109, _x110) {
4139
4283
  return _getPatientConsultationData.apply(this, arguments);
4140
4284
  }
4141
4285
  return getPatientConsultationData;
4142
- }() /**
4143
- * This function returns the patient prescriptions
4144
- * @param consultationId
4145
- * @returns
4146
- */;
4286
+ }()
4287
+ /**
4288
+ * This function returns the patient prescriptions
4289
+ * @param consultationId
4290
+ * @returns
4291
+ */
4292
+ ;
4147
4293
  _proto.getPatientPrescriptionsList =
4148
4294
  /*#__PURE__*/
4149
4295
  function () {
@@ -4163,15 +4309,17 @@ var OroClient = /*#__PURE__*/function () {
4163
4309
  }
4164
4310
  }, _callee45, this);
4165
4311
  }));
4166
- function getPatientPrescriptionsList(_x109) {
4312
+ function getPatientPrescriptionsList(_x111) {
4167
4313
  return _getPatientPrescriptionsList.apply(this, arguments);
4168
4314
  }
4169
4315
  return getPatientPrescriptionsList;
4170
- }() /**
4171
- * This function returns the patient results
4172
- * @param consultationId
4173
- * @returns
4174
- */;
4316
+ }()
4317
+ /**
4318
+ * This function returns the patient results
4319
+ * @param consultationId
4320
+ * @returns
4321
+ */
4322
+ ;
4175
4323
  _proto.getPatientResultsList =
4176
4324
  /*#__PURE__*/
4177
4325
  function () {
@@ -4191,15 +4339,17 @@ var OroClient = /*#__PURE__*/function () {
4191
4339
  }
4192
4340
  }, _callee46, this);
4193
4341
  }));
4194
- function getPatientResultsList(_x110) {
4342
+ function getPatientResultsList(_x112) {
4195
4343
  return _getPatientResultsList.apply(this, arguments);
4196
4344
  }
4197
4345
  return getPatientResultsList;
4198
- }() /**
4199
- * returns the patient treatment plan options
4200
- * @param consultationId
4201
- * @returns Document[] corresponding to the patient treatment plan options
4202
- */;
4346
+ }()
4347
+ /**
4348
+ * returns the patient treatment plan options
4349
+ * @param consultationId
4350
+ * @returns Document[] corresponding to the patient treatment plan options
4351
+ */
4352
+ ;
4203
4353
  _proto.getPatientTreatmentPlans =
4204
4354
  /*#__PURE__*/
4205
4355
  function () {
@@ -4219,16 +4369,18 @@ var OroClient = /*#__PURE__*/function () {
4219
4369
  }
4220
4370
  }, _callee47, this);
4221
4371
  }));
4222
- function getPatientTreatmentPlans(_x111) {
4372
+ function getPatientTreatmentPlans(_x113) {
4223
4373
  return _getPatientTreatmentPlans.apply(this, arguments);
4224
4374
  }
4225
4375
  return getPatientTreatmentPlans;
4226
- }() /**
4227
- * returns a specific patient treatment plan option
4228
- * @param consultationId
4229
- * @param treatmentPlanId
4230
- * @returns
4231
- */;
4376
+ }()
4377
+ /**
4378
+ * returns a specific patient treatment plan option
4379
+ * @param consultationId
4380
+ * @param treatmentPlanId
4381
+ * @returns
4382
+ */
4383
+ ;
4232
4384
  _proto.getPatientTreatmentPlanByUuid =
4233
4385
  /*#__PURE__*/
4234
4386
  function () {
@@ -4249,19 +4401,21 @@ var OroClient = /*#__PURE__*/function () {
4249
4401
  }
4250
4402
  }, _callee48, this);
4251
4403
  }));
4252
- function getPatientTreatmentPlanByUuid(_x112, _x113) {
4404
+ function getPatientTreatmentPlanByUuid(_x114, _x115) {
4253
4405
  return _getPatientTreatmentPlanByUuid.apply(this, arguments);
4254
4406
  }
4255
4407
  return getPatientTreatmentPlanByUuid;
4256
- }() /**
4257
- * @name getPatientDocumentsList
4258
- * @description applies the provided filter to the vault to only find those documents
4259
- * @param filters the applied filters (e.g. type of documents)
4260
- * @param expandPrivateMetadata whether or not, the private metadata needs to be retrieved
4261
- * (more computationally expensive)
4262
- * @param consultationId
4263
- * @returns the filtered document list
4264
- */;
4408
+ }()
4409
+ /**
4410
+ * @name getPatientDocumentsList
4411
+ * @description applies the provided filter to the vault to only find those documents
4412
+ * @param filters the applied filters (e.g. type of documents)
4413
+ * @param expandPrivateMetadata whether or not, the private metadata needs to be retrieved
4414
+ * (more computationally expensive)
4415
+ * @param consultationId
4416
+ * @returns the filtered document list
4417
+ */
4418
+ ;
4265
4419
  _proto.getPatientDocumentsList =
4266
4420
  /*#__PURE__*/
4267
4421
  function () {
@@ -4300,7 +4454,7 @@ var OroClient = /*#__PURE__*/function () {
4300
4454
  }
4301
4455
  }, _callee49);
4302
4456
  }));
4303
- return function (_x117) {
4457
+ return function (_x119) {
4304
4458
  return _ref7.apply(this, arguments);
4305
4459
  };
4306
4460
  }()));
@@ -4316,7 +4470,7 @@ var OroClient = /*#__PURE__*/function () {
4316
4470
  }
4317
4471
  }, _callee50, this);
4318
4472
  }));
4319
- function getPatientDocumentsList(_x114, _x115, _x116) {
4473
+ function getPatientDocumentsList(_x116, _x117, _x118) {
4320
4474
  return _getPatientDocumentsList.apply(this, arguments);
4321
4475
  }
4322
4476
  return getPatientDocumentsList;
@@ -4371,16 +4525,18 @@ var OroClient = /*#__PURE__*/function () {
4371
4525
  }
4372
4526
  }, _callee51, this);
4373
4527
  }));
4374
- function recoverPrivateKeyFromSecurityQuestions(_x118, _x119, _x120, _x121) {
4528
+ function recoverPrivateKeyFromSecurityQuestions(_x120, _x121, _x122, _x123) {
4375
4529
  return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
4376
4530
  }
4377
4531
  return recoverPrivateKeyFromSecurityQuestions;
4378
- }() /**
4379
- * @name recoverPrivateKeyFromPassword
4380
- * @description Recovers and sets the rsa private key from the password
4381
- * @param id
4382
- * @param password
4383
- */;
4532
+ }()
4533
+ /**
4534
+ * @name recoverPrivateKeyFromPassword
4535
+ * @description Recovers and sets the rsa private key from the password
4536
+ * @param id
4537
+ * @param password
4538
+ */
4539
+ ;
4384
4540
  _proto.recoverPrivateKeyFromPassword =
4385
4541
  /*#__PURE__*/
4386
4542
  function () {
@@ -4410,16 +4566,18 @@ var OroClient = /*#__PURE__*/function () {
4410
4566
  }
4411
4567
  }, _callee52, this);
4412
4568
  }));
4413
- function recoverPrivateKeyFromPassword(_x122, _x123) {
4569
+ function recoverPrivateKeyFromPassword(_x124, _x125) {
4414
4570
  return _recoverPrivateKeyFromPassword.apply(this, arguments);
4415
4571
  }
4416
4572
  return recoverPrivateKeyFromPassword;
4417
- }() /**
4418
- * @name recoverPrivateKeyFromMasterKey
4419
- * @description Recovers and sets the rsa private key from the master key
4420
- * @param id
4421
- * @param masterKey
4422
- */;
4573
+ }()
4574
+ /**
4575
+ * @name recoverPrivateKeyFromMasterKey
4576
+ * @description Recovers and sets the rsa private key from the master key
4577
+ * @param id
4578
+ * @param masterKey
4579
+ */
4580
+ ;
4423
4581
  _proto.recoverPrivateKeyFromMasterKey =
4424
4582
  /*#__PURE__*/
4425
4583
  function () {
@@ -4443,18 +4601,20 @@ var OroClient = /*#__PURE__*/function () {
4443
4601
  }
4444
4602
  }, _callee53, this);
4445
4603
  }));
4446
- function recoverPrivateKeyFromMasterKey(_x124, _x125) {
4604
+ function recoverPrivateKeyFromMasterKey(_x126, _x127) {
4447
4605
  return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
4448
4606
  }
4449
4607
  return recoverPrivateKeyFromMasterKey;
4450
- }() /**
4451
- * @description Generates and updates the security questions and answers payload using new recovery questions and answers
4452
- * Important: Since the security questions generate a payload for the private key, they will never be stored on the device as they must remain secret!!!
4453
- * @param id
4454
- * @param recoverySecurityQuestions
4455
- * @param recoverySecurityAnswers
4456
- * @param threshold the number of answers needed to rebuild the secret
4457
- */;
4608
+ }()
4609
+ /**
4610
+ * @description Generates and updates the security questions and answers payload using new recovery questions and answers
4611
+ * Important: Since the security questions generate a payload for the private key, they will never be stored on the device as they must remain secret!!!
4612
+ * @param id
4613
+ * @param recoverySecurityQuestions
4614
+ * @param recoverySecurityAnswers
4615
+ * @param threshold the number of answers needed to rebuild the secret
4616
+ */
4617
+ ;
4458
4618
  _proto.updateSecurityQuestions =
4459
4619
  /*#__PURE__*/
4460
4620
  function () {
@@ -4485,21 +4645,23 @@ var OroClient = /*#__PURE__*/function () {
4485
4645
  }
4486
4646
  }, _callee54, this);
4487
4647
  }));
4488
- function updateSecurityQuestions(_x126, _x127, _x128, _x129) {
4648
+ function updateSecurityQuestions(_x128, _x129, _x130, _x131) {
4489
4649
  return _updateSecurityQuestions.apply(this, arguments);
4490
4650
  }
4491
4651
  return updateSecurityQuestions;
4492
- }() /**
4493
- * @description Generates and stores the payload encrypted payload and updates the password itself (double hash)
4494
- * @important
4495
- * the recovery payload uses a singly hashed password and the password stored is doubly hashed so
4496
- * the stored password cannot derive the decryption key in the payload
4497
- * @note
4498
- * the old password must be provided when not performing an account recovery
4499
- * @param id
4500
- * @param newPassword
4501
- * @param oldPassword
4502
- */;
4652
+ }()
4653
+ /**
4654
+ * @description Generates and stores the payload encrypted payload and updates the password itself (double hash)
4655
+ * @important
4656
+ * the recovery payload uses a singly hashed password and the password stored is doubly hashed so
4657
+ * the stored password cannot derive the decryption key in the payload
4658
+ * @note
4659
+ * the old password must be provided when not performing an account recovery
4660
+ * @param id
4661
+ * @param newPassword
4662
+ * @param oldPassword
4663
+ */
4664
+ ;
4503
4665
  _proto.updatePassword =
4504
4666
  /*#__PURE__*/
4505
4667
  function () {
@@ -4539,18 +4701,20 @@ var OroClient = /*#__PURE__*/function () {
4539
4701
  }
4540
4702
  }, _callee55, this);
4541
4703
  }));
4542
- function updatePassword(_x130, _x131, _x132) {
4704
+ function updatePassword(_x132, _x133, _x134) {
4543
4705
  return _updatePassword.apply(this, arguments);
4544
4706
  }
4545
4707
  return updatePassword;
4546
- }() /**
4547
- * @description Generates and stores the master key encrypted payload
4548
- * Important
4549
- * Since the master key is used to generate a payload for the private key, it will never be stored on the device as it must remain secret!
4550
- * @param id
4551
- * @param masterKey
4552
- * @param lockboxUuid
4553
- */;
4708
+ }()
4709
+ /**
4710
+ * @description Generates and stores the master key encrypted payload
4711
+ * Important
4712
+ * Since the master key is used to generate a payload for the private key, it will never be stored on the device as it must remain secret!
4713
+ * @param id
4714
+ * @param masterKey
4715
+ * @param lockboxUuid
4716
+ */
4717
+ ;
4554
4718
  _proto.updateMasterKey =
4555
4719
  /*#__PURE__*/
4556
4720
  function () {
@@ -4593,7 +4757,7 @@ var OroClient = /*#__PURE__*/function () {
4593
4757
  }
4594
4758
  }, _callee56, this);
4595
4759
  }));
4596
- function updateMasterKey(_x133, _x134, _x135) {
4760
+ function updateMasterKey(_x135, _x136, _x137) {
4597
4761
  return _updateMasterKey.apply(this, arguments);
4598
4762
  }
4599
4763
  return updateMasterKey;