oro-sdk 5.3.6 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -843,52 +843,53 @@ function _getImagesFromIndexDb() {
843
843
  }
844
844
  function populateWorkflowField(_x6, _x7) {
845
845
  return _populateWorkflowField.apply(this, arguments);
846
- } /**
847
- * Determine if a question is triggered by some answers
848
- *
849
- * We use the following logical combinations of rules:
850
- *
851
- * #### Single string
852
- *
853
- * ```
854
- * // Required: rule1
855
- * rules: rule1
856
- * ```
857
- *
858
- * #### Array of strings (AND is applied between statements):
859
- *
860
- * ```
861
- * // Required: rule1 AND rule2
862
- * rules: [ rule1, rule2 ]
863
- * ```
864
- *
865
- * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
866
- *
867
- * ```
868
- * // Required: rule1 OR rule2
869
- * rules: [
870
- * [ rule1 ],
871
- * [ rule2 ]
872
- * ]
873
- *
874
- * // Required: rule1 OR (rule2 AND rule3)
875
- * rules: [
876
- * [ rule1 ],
877
- * [ rule2, rule3 ]
878
- * ]
879
- *
880
- * // THIS IS FORBIDDEN
881
- * rules: [
882
- * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
883
- * [ rule2, rule3 ]
884
- * ]
885
- * ```
886
- *
887
- * @param triggers the triggering rules
888
- * @param answers the answers to check againts triggering rules
889
- * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
890
- * @throws an Error if triggers typing is wrong
891
- */
846
+ }
847
+ /**
848
+ * Determine if a question is triggered by some answers
849
+ *
850
+ * We use the following logical combinations of rules:
851
+ *
852
+ * #### Single string
853
+ *
854
+ * ```
855
+ * // Required: rule1
856
+ * rules: rule1
857
+ * ```
858
+ *
859
+ * #### Array of strings (AND is applied between statements):
860
+ *
861
+ * ```
862
+ * // Required: rule1 AND rule2
863
+ * rules: [ rule1, rule2 ]
864
+ * ```
865
+ *
866
+ * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
867
+ *
868
+ * ```
869
+ * // Required: rule1 OR rule2
870
+ * rules: [
871
+ * [ rule1 ],
872
+ * [ rule2 ]
873
+ * ]
874
+ *
875
+ * // Required: rule1 OR (rule2 AND rule3)
876
+ * rules: [
877
+ * [ rule1 ],
878
+ * [ rule2, rule3 ]
879
+ * ]
880
+ *
881
+ * // THIS IS FORBIDDEN
882
+ * rules: [
883
+ * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
884
+ * [ rule2, rule3 ]
885
+ * ]
886
+ * ```
887
+ *
888
+ * @param triggers the triggering rules
889
+ * @param answers the answers to check againts triggering rules
890
+ * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
891
+ * @throws an Error if triggers typing is wrong
892
+ */
892
893
  function _populateWorkflowField() {
893
894
  _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
894
895
  var answer, displayedAnswer;
@@ -1390,15 +1391,16 @@ function _registerPatient() {
1390
1391
  }
1391
1392
  function getOrCreatePatientLockbox(_x9) {
1392
1393
  return _getOrCreatePatientLockbox.apply(this, arguments);
1393
- } /**
1394
- * Store all patient related information into his/her lockbox
1395
- * @param consultationId The consultation id
1396
- * @param isoLanguage the prefered language of communication (ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)
1397
- * @param lockboxUuid the lockbox uuid to store data in
1398
- * @param workflow the workflow used to extract informations
1399
- * @param oroClient an oroClient instance
1400
- * @returns
1401
- */
1394
+ }
1395
+ /**
1396
+ * Store all patient related information into his/her lockbox
1397
+ * @param consultationId The consultation id
1398
+ * @param isoLanguage the prefered language of communication (ISO 639-3 https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)
1399
+ * @param lockboxUuid the lockbox uuid to store data in
1400
+ * @param workflow the workflow used to extract informations
1401
+ * @param oroClient an oroClient instance
1402
+ * @returns
1403
+ */
1402
1404
  function _getOrCreatePatientLockbox() {
1403
1405
  _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(oroClient) {
1404
1406
  var grants, lockboxResponse, tokens;
@@ -1497,15 +1499,16 @@ function _storePatientData() {
1497
1499
  }
1498
1500
  function storeImageAliases(_x15, _x16, _x17, _x18, _x19) {
1499
1501
  return _storeImageAliases.apply(this, arguments);
1500
- } /**
1501
- * Extracts the workflow MetadataCategory for Personal, ChildPersonal and OtherPersonal
1502
- * then stores it in the vault
1503
- *
1504
- * @param workflow
1505
- * @param lockboxUuid
1506
- * @param category
1507
- * @returns The data uuid
1508
- */
1502
+ }
1503
+ /**
1504
+ * Extracts the workflow MetadataCategory for Personal, ChildPersonal and OtherPersonal
1505
+ * then stores it in the vault
1506
+ *
1507
+ * @param workflow
1508
+ * @param lockboxUuid
1509
+ * @param category
1510
+ * @returns The data uuid
1511
+ */
1509
1512
  function _storeImageAliases() {
1510
1513
  _storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, lockboxUuid, workflow, oroClient, progress) {
1511
1514
  var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
@@ -1737,6 +1740,8 @@ var MAX_RETRIES$1 = 15;
1737
1740
  *
1738
1741
  * Creates a fake workflow in which the workflow data will reside
1739
1742
  *
1743
+ * @todo deprecate this function when using workflows and populating them from the app
1744
+ *
1740
1745
  * @param isTreatmentWorking the value from the `is treatment working` question
1741
1746
  * @param hasSideEffects the value from the `does the treatment have side effects` question
1742
1747
  * @param deliveryAddress the provided delivery address
@@ -1744,10 +1749,12 @@ var MAX_RETRIES$1 = 15;
1744
1749
  * @returns a workflow
1745
1750
  */
1746
1751
  function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, deliveryAddress, pharmacy) {
1747
- var _ref, _ref2, _selectedAnswers$push, _selectedAnswers$push2;
1748
- var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref), (_ref2 = {}, _ref2['hasSideEffects'] = hasSideEffects, _ref2)];
1749
- if (deliveryAddress) selectedAnswers.push((_selectedAnswers$push = {}, _selectedAnswers$push['deliveryAddress'] = deliveryAddress, _selectedAnswers$push));
1750
- if (pharmacy) selectedAnswers.push((_selectedAnswers$push2 = {}, _selectedAnswers$push2['pharmacy'] = JSON.stringify(pharmacy), _selectedAnswers$push2));
1752
+ var _ref, _extends2, _extends3;
1753
+ var selectedAnswers = [(_ref = {}, _ref['isTreatmentWorking'] = isTreatmentWorking, _ref['hasSideEffects'] = hasSideEffects, _ref)];
1754
+ // appends the delivery address to the first page of the answers if provided
1755
+ if (deliveryAddress) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends2 = {}, _extends2['deliveryAddress'] = deliveryAddress, _extends2));
1756
+ // appends the pharmacy to the first page of the answers if provided
1757
+ if (pharmacy) selectedAnswers[0] = _extends({}, selectedAnswers[0], (_extends3 = {}, _extends3['pharmacy'] = JSON.stringify(pharmacy), _extends3));
1751
1758
  return {
1752
1759
  id: '32573a20-6f1d-49be-9ad3-b87c58074979',
1753
1760
  createdAt: '2022-10-03T00:00:00.000Z',
@@ -1806,7 +1813,6 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
1806
1813
  kind: 'online-pharmacy-picker',
1807
1814
  label: 'Which pharmacy do you want the prescription sent to?',
1808
1815
  metaCategory: initApis.MetadataCategory.Refill,
1809
- minorLabel: ' (Optional)',
1810
1816
  summaryLabel: 'Your pharmacy'
1811
1817
  },
1812
1818
  youAddress: {
@@ -1826,43 +1832,48 @@ function getRefillAnswersAsWorkflow(isTreatmentWorking, hasSideEffects, delivery
1826
1832
  * @param populatedRefillWorkflow the refill workflow data
1827
1833
  * @param oroClient
1828
1834
  */
1829
- function createRefill(_x, _x2, _x3) {
1835
+ function createRefill(_x, _x2, _x3, _x4, _x5) {
1830
1836
  return _createRefill.apply(this, arguments);
1831
1837
  }
1832
1838
  function _createRefill() {
1833
- _createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient) {
1834
- var retry, errorsThrown, newConsult, lockboxUuid;
1839
+ _createRefill = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(consultRequest, populatedRefillWorkflow, oroClient, indexSearch, onProgress) {
1840
+ var retry, errorsThrown, newConsult, lockboxUuid, stepsTotalNum, currentStep, rawConsultationManifest, rawConsultation;
1835
1841
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1836
1842
  while (1) {
1837
1843
  switch (_context.prev = _context.next) {
1838
1844
  case 0:
1845
+ if (indexSearch === void 0) {
1846
+ indexSearch = true;
1847
+ }
1839
1848
  retry = MAX_RETRIES$1;
1840
1849
  errorsThrown = [];
1841
- case 2:
1850
+ newConsult = undefined;
1851
+ stepsTotalNum = 6;
1852
+ case 5:
1842
1853
  if (!(retry > 0)) {
1843
- _context.next = 28;
1854
+ _context.next = 54;
1844
1855
  break;
1845
1856
  }
1846
- _context.prev = 3;
1847
- if (newConsult) {
1848
- _context.next = 8;
1849
- break;
1850
- }
1851
- _context.next = 7;
1857
+ _context.prev = 6;
1858
+ currentStep = 0;
1859
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'create_consult');
1860
+ // Creating refill consult
1861
+ _context.next = 11;
1852
1862
  return getOrCreatePatientConsultationUuid(consultRequest, oroClient);
1853
- case 7:
1863
+ case 11:
1854
1864
  newConsult = _context.sent;
1855
- case 8:
1865
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'get_patient_grant');
1856
1866
  if (lockboxUuid) {
1857
- _context.next = 12;
1867
+ _context.next = 17;
1858
1868
  break;
1859
1869
  }
1860
- _context.next = 11;
1870
+ _context.next = 16;
1861
1871
  return oroClient.getGrants();
1862
- case 11:
1872
+ case 16:
1863
1873
  lockboxUuid = _context.sent[0].lockboxUuid;
1864
- case 12:
1865
- _context.next = 14;
1874
+ case 17:
1875
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'store_patient_data');
1876
+ _context.next = 20;
1866
1877
  return oroClient.getOrInsertJsonData(lockboxUuid, populatedRefillWorkflow, {
1867
1878
  category: initApis.MetadataCategory.Refill,
1868
1879
  documentType: initApis.DocumentType.PopulatedWorkflowData,
@@ -1870,39 +1881,95 @@ function _createRefill() {
1870
1881
  }, {}, {
1871
1882
  withNotification: true
1872
1883
  })["catch"](function (err) {
1873
- console.error('[SDK: prescription refill] Some errors happened during refill data upload', err);
1884
+ console.error('[SDK: prescription refill request] Some errors happened during refill data upload', err);
1874
1885
  errorsThrown.push(err);
1875
1886
  });
1876
- case 14:
1887
+ case 20:
1888
+ if (!indexSearch) {
1889
+ _context.next = 36;
1890
+ break;
1891
+ }
1892
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'fetching_parent_workflow_data');
1893
+ // raw workflow from parent consultation (contains first and last name of patient)
1894
+ _context.next = 24;
1895
+ return oroClient.getLockboxManifest(lockboxUuid, {
1896
+ category: initApis.MetadataCategory.Raw,
1897
+ consultationId: consultRequest.uuidParent
1898
+ }, false);
1899
+ case 24:
1900
+ rawConsultationManifest = _context.sent;
1901
+ if (!(rawConsultationManifest && rawConsultationManifest.length > 0)) {
1902
+ _context.next = 34;
1903
+ break;
1904
+ }
1905
+ _context.next = 28;
1906
+ return oroClient.getJsonData(lockboxUuid, rawConsultationManifest[0].dataUuid);
1907
+ case 28:
1908
+ rawConsultation = _context.sent;
1909
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'search_indexing');
1910
+ _context.next = 32;
1911
+ return buildConsultSearchIndex(newConsult, rawConsultation, oroClient)["catch"](function (err) {
1912
+ console.error('[SDK: prescription refill request] personal information not found or another error occured during search indexing', err);
1913
+ 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
1914
+ errorsThrown.push(err);
1915
+ });
1916
+ case 32:
1917
+ _context.next = 36;
1918
+ break;
1919
+ case 34:
1920
+ console.error('[SDK: prescription refill request] parent consultation\'s raw data not found');
1921
+ errorsThrown.push(Error('RawData Not Found'));
1922
+ case 36:
1877
1923
  if (!(errorsThrown.length > 0)) {
1878
- _context.next = 16;
1924
+ _context.next = 38;
1879
1925
  break;
1880
1926
  }
1881
1927
  throw errorsThrown;
1882
- case 16:
1883
- _context.next = 18;
1928
+ case 38:
1929
+ _context.next = 40;
1884
1930
  return oroClient.consultClient.updateConsultByUUID(newConsult.uuid, {
1885
1931
  statusMedical: initApis.MedicalStatus.New
1886
1932
  });
1887
- case 18:
1888
- _context.next = 25;
1889
- break;
1890
- case 20:
1891
- _context.prev = 20;
1892
- _context.t0 = _context["catch"](3);
1893
- console.error("[SDK] Error occured during refill: " + _context.t0 + ", retrying... Retries remaining: " + retry);
1933
+ case 40:
1934
+ // if we got through the complete flow, the registration succeeded
1935
+ if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
1936
+ _context.next = 43;
1937
+ return oroClient.cleanIndex();
1938
+ case 43:
1939
+ return _context.abrupt("break", 54);
1940
+ case 46:
1941
+ _context.prev = 46;
1942
+ _context.t0 = _context["catch"](6);
1943
+ console.error("[SDK] Error occured during prescription refill request: " + _context.t0 + ", retrying... Retries remaining: " + retry);
1894
1944
  errorsThrown = [];
1895
- return _context.abrupt("continue", 25);
1896
- case 25:
1945
+ return _context.abrupt("continue", 51);
1946
+ case 51:
1897
1947
  retry--;
1898
- _context.next = 2;
1948
+ _context.next = 5;
1899
1949
  break;
1900
- case 28:
1950
+ case 54:
1951
+ if (!(retry <= 0)) {
1952
+ _context.next = 57;
1953
+ break;
1954
+ }
1955
+ console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
1956
+ throw 'RegistrationFailed';
1957
+ case 57:
1958
+ if (newConsult) {
1959
+ _context.next = 60;
1960
+ break;
1961
+ }
1962
+ console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
1963
+ throw 'RegistrationFailed';
1964
+ case 60:
1965
+ console.log('Successfully Created refill');
1966
+ return _context.abrupt("return", newConsult);
1967
+ case 62:
1901
1968
  case "end":
1902
1969
  return _context.stop();
1903
1970
  }
1904
1971
  }
1905
- }, _callee, null, [[3, 20]]);
1972
+ }, _callee, null, [[6, 46]]);
1906
1973
  }));
1907
1974
  return _createRefill.apply(this, arguments);
1908
1975
  }
@@ -2001,17 +2068,19 @@ var OroClient = /*#__PURE__*/function () {
2001
2068
  return _cleanIndex.apply(this, arguments);
2002
2069
  }
2003
2070
  return cleanIndex;
2004
- }() /**
2005
- * Generates an RSA key pair and password payload (rsa private key encrypted with the password)
2006
- * Calls Guard to sign up with the email address, password, practice, legal and token data
2007
- *
2008
- * @param email
2009
- * @param password
2010
- * @param practice
2011
- * @param legal
2012
- * @param tokenData
2013
- * @returns
2014
- */;
2071
+ }()
2072
+ /**
2073
+ * Generates an RSA key pair and password payload (rsa private key encrypted with the password)
2074
+ * Calls Guard to sign up with the email address, password, practice, legal and token data
2075
+ *
2076
+ * @param email
2077
+ * @param password
2078
+ * @param practice
2079
+ * @param legal
2080
+ * @param tokenData
2081
+ * @returns
2082
+ */
2083
+ ;
2015
2084
  _proto.signUp =
2016
2085
  /*#__PURE__*/
2017
2086
  function () {
@@ -2059,11 +2128,13 @@ var OroClient = /*#__PURE__*/function () {
2059
2128
  return _signUp.apply(this, arguments);
2060
2129
  }
2061
2130
  return signUp;
2062
- }() /**
2063
- * Parse the given accessToken claims by calling guard whoami and update theidentity to set it's emailConfirmed flag
2064
- * @param accessToken
2065
- * @returns The identity related to confirmedEmail
2066
- */;
2131
+ }()
2132
+ /**
2133
+ * Parse the given accessToken claims by calling guard whoami and update theidentity to set it's emailConfirmed flag
2134
+ * @param accessToken
2135
+ * @returns The identity related to confirmedEmail
2136
+ */
2137
+ ;
2067
2138
  _proto.confirmEmail =
2068
2139
  /*#__PURE__*/
2069
2140
  function () {
@@ -2094,16 +2165,18 @@ var OroClient = /*#__PURE__*/function () {
2094
2165
  return _confirmEmail.apply(this, arguments);
2095
2166
  }
2096
2167
  return confirmEmail;
2097
- }() /**
2098
- * Calls Guard to sign in with the email address, password and one time password (if MFA is enabled)
2099
- * Then recover's the rsa private key from the recovery payload
2100
- *
2101
- * @param practiceUuid
2102
- * @param email
2103
- * @param password
2104
- * @param otp
2105
- * @returns the user identity
2106
- */;
2168
+ }()
2169
+ /**
2170
+ * Calls Guard to sign in with the email address, password and one time password (if MFA is enabled)
2171
+ * Then recover's the rsa private key from the recovery payload
2172
+ *
2173
+ * @param practiceUuid
2174
+ * @param email
2175
+ * @param password
2176
+ * @param otp
2177
+ * @returns the user identity
2178
+ */
2179
+ ;
2107
2180
  _proto.signIn =
2108
2181
  /*#__PURE__*/
2109
2182
  function () {
@@ -2145,10 +2218,12 @@ var OroClient = /*#__PURE__*/function () {
2145
2218
  return _signIn.apply(this, arguments);
2146
2219
  }
2147
2220
  return signIn;
2148
- }() /**
2149
- * Will attempt to recover an existing login session and set back
2150
- * the private key in scope
2151
- */;
2221
+ }()
2222
+ /**
2223
+ * Will attempt to recover an existing login session and set back
2224
+ * the private key in scope
2225
+ */
2226
+ ;
2152
2227
  _proto.resumeSession =
2153
2228
  /*#__PURE__*/
2154
2229
  function () {
@@ -2187,13 +2262,15 @@ var OroClient = /*#__PURE__*/function () {
2187
2262
  return _resumeSession.apply(this, arguments);
2188
2263
  }
2189
2264
  return resumeSession;
2190
- }() /**
2191
- * This function let's you encrypt locally an Object
2192
- * @param value the Object to encrypt
2193
- * @returns a LocalEncryptedData Object
2194
- * @throws IncompleteAuthentication if rsa is not set
2195
- * @calls authenticationCallback if rsa is not set
2196
- */;
2265
+ }()
2266
+ /**
2267
+ * This function let's you encrypt locally an Object
2268
+ * @param value the Object to encrypt
2269
+ * @returns a LocalEncryptedData Object
2270
+ * @throws IncompleteAuthentication if rsa is not set
2271
+ * @calls authenticationCallback if rsa is not set
2272
+ */
2273
+ ;
2197
2274
  _proto.localEncryptToJsonPayload = function localEncryptToJsonPayload(value) {
2198
2275
  if (!this.rsa) {
2199
2276
  if (this.authenticationCallback) {
@@ -2259,25 +2336,27 @@ var OroClient = /*#__PURE__*/function () {
2259
2336
  return _signOut.apply(this, arguments);
2260
2337
  }
2261
2338
  return signOut;
2262
- }() /**
2263
- * @name registerPatient
2264
- * @description The complete flow to register a patient
2265
- *
2266
- * Steps:
2267
- * 1. Create a consult (checks if payment has been done)
2268
- * 2. Creates a lockbox
2269
- * 3. Grants lockbox access to all practice personnel
2270
- * 4. Creates secure identification, medical, onboarding data
2271
- * 5. Generates and stores the rsa key pair and recovery payloads
2272
- *
2273
- * @param patientUuid
2274
- * @param consult
2275
- * @param workflow
2276
- * @param recoveryQA
2277
- * @param indexSearch create search index for the consultation if true
2278
- * @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
2279
- * @returns
2280
- */;
2339
+ }()
2340
+ /**
2341
+ * @name registerPatient
2342
+ * @description The complete flow to register a patient
2343
+ *
2344
+ * Steps:
2345
+ * 1. Create a consult (checks if payment has been done)
2346
+ * 2. Creates a lockbox
2347
+ * 3. Grants lockbox access to all practice personnel
2348
+ * 4. Creates secure identification, medical, onboarding data
2349
+ * 5. Generates and stores the rsa key pair and recovery payloads
2350
+ *
2351
+ * @param patientUuid
2352
+ * @param consult
2353
+ * @param workflow
2354
+ * @param recoveryQA
2355
+ * @param indexSearch create search index for the consultation if true
2356
+ * @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
2357
+ * @returns
2358
+ */
2359
+ ;
2281
2360
  _proto.registerPatient =
2282
2361
  /*#__PURE__*/
2283
2362
  function () {
@@ -2307,46 +2386,53 @@ var OroClient = /*#__PURE__*/function () {
2307
2386
  return _registerPatient2.apply(this, arguments);
2308
2387
  }
2309
2388
  return registerPatient$1;
2310
- }() /**
2311
- * Creates and stores all relevant refill data
2312
- * - New consultation is created
2313
- * - Stores refill workflow data in the lockbox
2314
- * - Updates the consult to new
2315
- *
2316
- * @param consult
2317
- * @param populatedRefillWorkflow
2318
- * @returns
2319
- */;
2389
+ }()
2390
+ /**
2391
+ * Creates and stores all relevant refill data
2392
+ * - New consultation is created
2393
+ * - Stores refill workflow data in the lockbox
2394
+ * - Updates the consult to new
2395
+ *
2396
+ * @param consult
2397
+ * @param populatedRefillWorkflow
2398
+ * @returns
2399
+ */
2400
+ ;
2320
2401
  _proto.createRefill =
2321
2402
  /*#__PURE__*/
2322
2403
  function () {
2323
- var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow) {
2404
+ var _createRefill2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consult, populatedRefillWorkflow, indexSearch, onProgress) {
2324
2405
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2325
2406
  while (1) {
2326
2407
  switch (_context8.prev = _context8.next) {
2327
2408
  case 0:
2409
+ if (indexSearch === void 0) {
2410
+ indexSearch = true;
2411
+ }
2328
2412
  if (this.rsa) {
2329
- _context8.next = 2;
2413
+ _context8.next = 3;
2330
2414
  break;
2331
2415
  }
2332
2416
  throw IncompleteAuthentication;
2333
- case 2:
2334
- return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this));
2335
2417
  case 3:
2418
+ return _context8.abrupt("return", createRefill(consult, populatedRefillWorkflow, this, indexSearch, onProgress));
2419
+ case 4:
2336
2420
  case "end":
2337
2421
  return _context8.stop();
2338
2422
  }
2339
2423
  }
2340
2424
  }, _callee8, this);
2341
2425
  }));
2342
- function createRefill$1(_x19, _x20) {
2426
+ function createRefill$1(_x19, _x20, _x21, _x22) {
2343
2427
  return _createRefill2.apply(this, arguments);
2344
2428
  }
2345
2429
  return createRefill$1;
2346
- }() /**
2347
- * Fetches all grants, and consultations that exist in each lockbox
2348
- * Then updates the index for the current user with the lockbox consult relationship
2349
- */;
2430
+ }()
2431
+ /**
2432
+ * Fetches all grants, and consultations that exist in each lockbox
2433
+ * Then updates the index for the current user with the lockbox consult relationship
2434
+ */
2435
+ ;
2350
2436
  _proto.forceUpdateIndexEntries =
2351
2437
  /*#__PURE__*/
2352
2438
  function () {
@@ -2398,7 +2484,7 @@ var OroClient = /*#__PURE__*/function () {
2398
2484
  }
2399
2485
  }, _callee9);
2400
2486
  }));
2401
- return function (_x21) {
2487
+ return function (_x23) {
2402
2488
  return _ref2.apply(this, arguments);
2403
2489
  };
2404
2490
  }())).then(function (consults) {
@@ -2422,12 +2508,14 @@ var OroClient = /*#__PURE__*/function () {
2422
2508
  return _forceUpdateIndexEntries.apply(this, arguments);
2423
2509
  }
2424
2510
  return forceUpdateIndexEntries;
2425
- }() /**
2426
- * Generates, encrypts and adds entries to vault index for a given index owner
2427
- *
2428
- * @param entries
2429
- * @param indexOwnerUuid
2430
- */;
2511
+ }()
2512
+ /**
2513
+ * Generates, encrypts and adds entries to vault index for a given index owner
2514
+ *
2515
+ * @param entries
2516
+ * @param indexOwnerUuid
2517
+ */
2518
+ ;
2431
2519
  _proto.vaultIndexAdd =
2432
2520
  /*#__PURE__*/
2433
2521
  function () {
@@ -2500,17 +2588,19 @@ var OroClient = /*#__PURE__*/function () {
2500
2588
  }
2501
2589
  }, _callee11, this);
2502
2590
  }));
2503
- function vaultIndexAdd(_x22, _x23) {
2591
+ function vaultIndexAdd(_x24, _x25) {
2504
2592
  return _vaultIndexAdd.apply(this, arguments);
2505
2593
  }
2506
2594
  return vaultIndexAdd;
2507
- }() /**
2508
- * @name grantLockbox
2509
- * @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
2510
- * @param granteeUuid
2511
- * @param lockboxUuid
2512
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2513
- */;
2595
+ }()
2596
+ /**
2597
+ * @name grantLockbox
2598
+ * @description Grants a lockbox by retrieving the shared secret of the lockbox and encrypting it with the grantees public key
2599
+ * @param granteeUuid
2600
+ * @param lockboxUuid
2601
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2602
+ */
2603
+ ;
2514
2604
  _proto.grantLockbox =
2515
2605
  /*#__PURE__*/
2516
2606
  function () {
@@ -2549,20 +2639,22 @@ var OroClient = /*#__PURE__*/function () {
2549
2639
  }
2550
2640
  }, _callee12, this);
2551
2641
  }));
2552
- function grantLockbox(_x24, _x25, _x26) {
2642
+ function grantLockbox(_x26, _x27, _x28) {
2553
2643
  return _grantLockbox.apply(this, arguments);
2554
2644
  }
2555
2645
  return grantLockbox;
2556
- }() /**
2557
- * @name createMessageData
2558
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a message string
2559
- * @param lockboxUuid
2560
- * @param message
2561
- * @param consultationId the consultation for which this message is sent
2562
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2563
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2564
- * @returns the data uuid
2565
- */;
2646
+ }()
2647
+ /**
2648
+ * @name createMessageData
2649
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a message string
2650
+ * @param lockboxUuid
2651
+ * @param message
2652
+ * @param consultationId the consultation for which this message is sent
2653
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2654
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2655
+ * @returns the data uuid
2656
+ */
2657
+ ;
2566
2658
  _proto.createMessageData =
2567
2659
  /*#__PURE__*/
2568
2660
  function () {
@@ -2611,20 +2703,22 @@ var OroClient = /*#__PURE__*/function () {
2611
2703
  }
2612
2704
  }, _callee13, this);
2613
2705
  }));
2614
- function createMessageData(_x27, _x28, _x29, _x30, _x31) {
2706
+ function createMessageData(_x29, _x30, _x31, _x32, _x33) {
2615
2707
  return _createMessageData.apply(this, arguments);
2616
2708
  }
2617
2709
  return createMessageData;
2618
- }() /**
2619
- * @name createMessageAttachmentData
2620
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2621
- * @param lockboxUuid
2622
- * @param data the file stored
2623
- * @param consultationId the consultation for which this message is sent
2624
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2625
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2626
- * @returns the data uuid
2627
- */;
2710
+ }()
2711
+ /**
2712
+ * @name createMessageAttachmentData
2713
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2714
+ * @param lockboxUuid
2715
+ * @param data the file stored
2716
+ * @param consultationId the consultation for which this message is sent
2717
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2718
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2719
+ * @returns the data uuid
2720
+ */
2721
+ ;
2628
2722
  _proto.createMessageAttachmentData =
2629
2723
  /*#__PURE__*/
2630
2724
  function () {
@@ -2686,22 +2780,24 @@ var OroClient = /*#__PURE__*/function () {
2686
2780
  }
2687
2781
  }, _callee14, this);
2688
2782
  }));
2689
- function createMessageAttachmentData(_x32, _x33, _x34, _x35, _x36) {
2783
+ function createMessageAttachmentData(_x34, _x35, _x36, _x37, _x38) {
2690
2784
  return _createMessageAttachmentData.apply(this, arguments);
2691
2785
  }
2692
2786
  return createMessageAttachmentData;
2693
- }() /**
2694
- * @name createAttachmentData
2695
- * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2696
- * @param lockboxUuid
2697
- * @param data the file stored
2698
- * @param consultationId the consultation for which this message is sent
2699
- * @param category the category for the attachment data
2700
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2701
- * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2702
- * @param withNotification if the insertion of data requires notification
2703
- * @returns the data uuid
2704
- */;
2787
+ }()
2788
+ /**
2789
+ * @name createAttachmentData
2790
+ * @description Creates a Base64 encrypted Payload to send and store in the vault from a file
2791
+ * @param lockboxUuid
2792
+ * @param data the file stored
2793
+ * @param consultationId the consultation for which this message is sent
2794
+ * @param category the category for the attachment data
2795
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2796
+ * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
2797
+ * @param withNotification if the insertion of data requires notification
2798
+ * @returns the data uuid
2799
+ */
2800
+ ;
2705
2801
  _proto.createConsultationAttachmentData =
2706
2802
  /*#__PURE__*/
2707
2803
  function () {
@@ -2755,22 +2851,24 @@ var OroClient = /*#__PURE__*/function () {
2755
2851
  }
2756
2852
  }, _callee15, this);
2757
2853
  }));
2758
- function createConsultationAttachmentData(_x37, _x38, _x39, _x40, _x41, _x42, _x43) {
2854
+ function createConsultationAttachmentData(_x39, _x40, _x41, _x42, _x43, _x44, _x45) {
2759
2855
  return _createConsultationAttachmentData.apply(this, arguments);
2760
2856
  }
2761
2857
  return createConsultationAttachmentData;
2762
- }() /**
2763
- * @name createJsonData
2764
- * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
2765
- * @param lockboxUuid
2766
- * @param data
2767
- * @param meta
2768
- * @param privateMeta the metadata that will be secured in the vault
2769
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2770
- * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2771
- * @param options if the insertion of data requires email notification
2772
- * @returns the data uuid
2773
- */;
2858
+ }()
2859
+ /**
2860
+ * @name createJsonData
2861
+ * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a JSON
2862
+ * @param lockboxUuid
2863
+ * @param data
2864
+ * @param meta
2865
+ * @param privateMeta the metadata that will be secured in the vault
2866
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2867
+ * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2868
+ * @param options if the insertion of data requires email notification
2869
+ * @returns the data uuid
2870
+ */
2871
+ ;
2774
2872
  _proto.createJsonData =
2775
2873
  /*#__PURE__*/
2776
2874
  function () {
@@ -2816,20 +2914,22 @@ var OroClient = /*#__PURE__*/function () {
2816
2914
  }
2817
2915
  }, _callee16, this);
2818
2916
  }));
2819
- function createJsonData(_x44, _x45, _x46, _x47, _x48, _x49, _x50) {
2917
+ function createJsonData(_x46, _x47, _x48, _x49, _x50, _x51, _x52) {
2820
2918
  return _createJsonData.apply(this, arguments);
2821
2919
  }
2822
2920
  return createJsonData;
2823
- }() /**
2824
- * Get or upsert a data in lockbox
2825
- * @param lockboxUuid the lockbox uuid
2826
- * @param data the data to insert
2827
- * @param publicMetadata the public Metadata
2828
- * @param privateMetadata the private Metadata
2829
- * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
2830
- * @param options if the insertion of data requires email notification
2831
- * @returns the data uuid
2832
- */;
2921
+ }()
2922
+ /**
2923
+ * Get or upsert a data in lockbox
2924
+ * @param lockboxUuid the lockbox uuid
2925
+ * @param data the data to insert
2926
+ * @param publicMetadata the public Metadata
2927
+ * @param privateMetadata the private Metadata
2928
+ * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
2929
+ * @param options if the insertion of data requires email notification
2930
+ * @returns the data uuid
2931
+ */
2932
+ ;
2833
2933
  _proto.getOrInsertJsonData =
2834
2934
  /*#__PURE__*/
2835
2935
  function () {
@@ -2874,22 +2974,24 @@ var OroClient = /*#__PURE__*/function () {
2874
2974
  }
2875
2975
  }, _callee17, this);
2876
2976
  }));
2877
- function getOrInsertJsonData(_x51, _x52, _x53, _x54, _x55) {
2977
+ function getOrInsertJsonData(_x53, _x54, _x55, _x56, _x57) {
2878
2978
  return _getOrInsertJsonData.apply(this, arguments);
2879
2979
  }
2880
2980
  return getOrInsertJsonData;
2881
- }() /**
2882
- * @name createBytesData
2883
- * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
2884
- * @param lockboxUuid
2885
- * @param data
2886
- * @param meta
2887
- * @param privateMeta the metadata that will be secured in the vault
2888
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2889
- * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2890
- * @param withNotification if the insertion of data requires notification
2891
- * @returns the data uuid
2892
- */;
2981
+ }()
2982
+ /**
2983
+ * @name createBytesData
2984
+ * @description Creates a Base64 encrypted Payload to send and store in the vault. With the data input as a Bytes
2985
+ * @param lockboxUuid
2986
+ * @param data
2987
+ * @param meta
2988
+ * @param privateMeta the metadata that will be secured in the vault
2989
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2990
+ * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
2991
+ * @param withNotification if the insertion of data requires notification
2992
+ * @returns the data uuid
2993
+ */
2994
+ ;
2893
2995
  _proto.createBytesData =
2894
2996
  /*#__PURE__*/
2895
2997
  function () {
@@ -2935,21 +3037,23 @@ var OroClient = /*#__PURE__*/function () {
2935
3037
  }
2936
3038
  }, _callee18, this);
2937
3039
  }));
2938
- function createBytesData(_x56, _x57, _x58, _x59, _x60, _x61, _x62) {
3040
+ function createBytesData(_x58, _x59, _x60, _x61, _x62, _x63, _x64) {
2939
3041
  return _createBytesData.apply(this, arguments);
2940
3042
  }
2941
3043
  return createBytesData;
2942
- }() /**
2943
- * @name getJsonData
2944
- * @description Fetches and decrypts the lockbox data with the cached shared secret.
2945
- * Decrypts the data to a valid JSON object. If this is impossible, the call to the WASM binary will fail
2946
- *
2947
- * @type T is the generic type specifying the return type object of the function
2948
- * @param lockboxUuid
2949
- * @param dataUuid
2950
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2951
- * @returns the data specified by the generic type <T>
2952
- */;
3044
+ }()
3045
+ /**
3046
+ * @name getJsonData
3047
+ * @description Fetches and decrypts the lockbox data with the cached shared secret.
3048
+ * Decrypts the data to a valid JSON object. If this is impossible, the call to the WASM binary will fail
3049
+ *
3050
+ * @type T is the generic type specifying the return type object of the function
3051
+ * @param lockboxUuid
3052
+ * @param dataUuid
3053
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3054
+ * @returns the data specified by the generic type <T>
3055
+ */
3056
+ ;
2953
3057
  _proto.getJsonData =
2954
3058
  /*#__PURE__*/
2955
3059
  function () {
@@ -2979,17 +3083,19 @@ var OroClient = /*#__PURE__*/function () {
2979
3083
  }
2980
3084
  }, _callee19, this);
2981
3085
  }));
2982
- function getJsonData(_x63, _x64, _x65) {
3086
+ function getJsonData(_x65, _x66, _x67) {
2983
3087
  return _getJsonData.apply(this, arguments);
2984
3088
  }
2985
3089
  return getJsonData;
2986
- }() /**
2987
- * @description Fetches and decrypts the lockbox data with the cached shared secret.
2988
- * @param lockboxUuid
2989
- * @param dataUuid
2990
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2991
- * @returns the bytes data
2992
- */;
3090
+ }()
3091
+ /**
3092
+ * @description Fetches and decrypts the lockbox data with the cached shared secret.
3093
+ * @param lockboxUuid
3094
+ * @param dataUuid
3095
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3096
+ * @returns the bytes data
3097
+ */
3098
+ ;
2993
3099
  _proto.getBytesData =
2994
3100
  /*#__PURE__*/
2995
3101
  function () {
@@ -3019,20 +3125,22 @@ var OroClient = /*#__PURE__*/function () {
3019
3125
  }
3020
3126
  }, _callee20, this);
3021
3127
  }));
3022
- function getBytesData(_x66, _x67, _x68) {
3128
+ function getBytesData(_x68, _x69, _x70) {
3023
3129
  return _getBytesData.apply(this, arguments);
3024
3130
  }
3025
3131
  return getBytesData;
3026
- }() /**
3027
- * @name getGrants
3028
- * @description Get all lockboxes granted to user with the applied filter
3029
- * @note this function returns cached grants and will not update unless the page is refreshed
3030
- * @todo some versions of lockboxes do not make use of lockbox metadata
3031
- * in this case, all lockboxes need to be filtered one-by-one to find the correct one
3032
- * Remove if this is no longer the case
3033
- * @param filter: the consultationId in which the grant exists
3034
- * @returns decrypted lockboxes granted to user
3035
- */;
3132
+ }()
3133
+ /**
3134
+ * @name getGrants
3135
+ * @description Get all lockboxes granted to user with the applied filter
3136
+ * @note this function returns cached grants and will not update unless the page is refreshed
3137
+ * @todo some versions of lockboxes do not make use of lockbox metadata
3138
+ * in this case, all lockboxes need to be filtered one-by-one to find the correct one
3139
+ * Remove if this is no longer the case
3140
+ * @param filter: the consultationId in which the grant exists
3141
+ * @returns decrypted lockboxes granted to user
3142
+ */
3143
+ ;
3036
3144
  _proto.getGrants =
3037
3145
  /*#__PURE__*/
3038
3146
  function () {
@@ -3128,15 +3236,17 @@ var OroClient = /*#__PURE__*/function () {
3128
3236
  }
3129
3237
  }, _callee21, this);
3130
3238
  }));
3131
- function getGrants(_x69) {
3239
+ function getGrants(_x71) {
3132
3240
  return _getGrants.apply(this, arguments);
3133
3241
  }
3134
3242
  return getGrants;
3135
- }() /**
3136
- * Fetches the role of the account that is logged in
3137
- *
3138
- * @returns the role based scopes defined by the whoami
3139
- */;
3243
+ }()
3244
+ /**
3245
+ * Fetches the role of the account that is logged in
3246
+ *
3247
+ * @returns the role based scopes defined by the whoami
3248
+ */
3249
+ ;
3140
3250
  _proto.getAccountRole =
3141
3251
  /*#__PURE__*/
3142
3252
  function () {
@@ -3160,13 +3270,15 @@ var OroClient = /*#__PURE__*/function () {
3160
3270
  return _getAccountRole.apply(this, arguments);
3161
3271
  }
3162
3272
  return getAccountRole;
3163
- }() /**
3164
- * @name getCachedSecretCryptor
3165
- * @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
3166
- * @param lockboxUuid
3167
- * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3168
- * @returns
3169
- */;
3273
+ }()
3274
+ /**
3275
+ * @name getCachedSecretCryptor
3276
+ * @description Retrieves the cached lockbox secret or fetches the secret from vault, then creates the symmetric cryptor and stores it in memory
3277
+ * @param lockboxUuid
3278
+ * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3279
+ * @returns
3280
+ */
3281
+ ;
3170
3282
  _proto.getCachedSecretCryptor =
3171
3283
  /*#__PURE__*/
3172
3284
  function () {
@@ -3209,19 +3321,21 @@ var OroClient = /*#__PURE__*/function () {
3209
3321
  }
3210
3322
  }, _callee23, this);
3211
3323
  }));
3212
- function getCachedSecretCryptor(_x70, _x71) {
3324
+ function getCachedSecretCryptor(_x72, _x73) {
3213
3325
  return _getCachedSecretCryptor.apply(this, arguments);
3214
3326
  }
3215
3327
  return getCachedSecretCryptor;
3216
- }() /**
3217
- * Retrieves the patient personal information associated to the `consultationId`
3218
- * The `consultationId` only helps to retrieve the patient lockboxes
3219
- * Note: it is possible to have several personal informations data
3220
- * @param consultationId The consultation Id
3221
- * @param category The personal MetadataCategory to fetch
3222
- * @param forceRefresh force data refresh (default to false)
3223
- * @returns the personal data
3224
- */;
3328
+ }()
3329
+ /**
3330
+ * Retrieves the patient personal information associated to the `consultationId`
3331
+ * The `consultationId` only helps to retrieve the patient lockboxes
3332
+ * Note: it is possible to have several personal informations data
3333
+ * @param consultationId The consultation Id
3334
+ * @param category The personal MetadataCategory to fetch
3335
+ * @param forceRefresh force data refresh (default to false)
3336
+ * @returns the personal data
3337
+ */
3338
+ ;
3225
3339
  _proto.getPersonalInformationsFromConsultId =
3226
3340
  /*#__PURE__*/
3227
3341
  function () {
@@ -3243,18 +3357,20 @@ var OroClient = /*#__PURE__*/function () {
3243
3357
  }
3244
3358
  }, _callee24, this);
3245
3359
  }));
3246
- function getPersonalInformationsFromConsultId(_x72, _x73, _x74) {
3360
+ function getPersonalInformationsFromConsultId(_x74, _x75, _x76) {
3247
3361
  return _getPersonalInformationsFromConsultId.apply(this, arguments);
3248
3362
  }
3249
3363
  return getPersonalInformationsFromConsultId;
3250
- }() /**
3251
- * Retrieves the patient medical data associated to the `consultationId`
3252
- * The `consultationId` only helps to retrieve the patient lockboxes
3253
- * Note: it is possible to have several medical data
3254
- * @param consultationId The consultation Id
3255
- * @param forceRefresh force data refresh (default to false)
3256
- * @returns the medical data
3257
- */;
3364
+ }()
3365
+ /**
3366
+ * Retrieves the patient medical data associated to the `consultationId`
3367
+ * The `consultationId` only helps to retrieve the patient lockboxes
3368
+ * Note: it is possible to have several medical data
3369
+ * @param consultationId The consultation Id
3370
+ * @param forceRefresh force data refresh (default to false)
3371
+ * @returns the medical data
3372
+ */
3373
+ ;
3258
3374
  _proto.getMedicalDataFromConsultId =
3259
3375
  /*#__PURE__*/
3260
3376
  function () {
@@ -3276,7 +3392,7 @@ var OroClient = /*#__PURE__*/function () {
3276
3392
  }
3277
3393
  }, _callee25, this);
3278
3394
  }));
3279
- function getMedicalDataFromConsultId(_x75, _x76) {
3395
+ function getMedicalDataFromConsultId(_x77, _x78) {
3280
3396
  return _getMedicalDataFromConsultId.apply(this, arguments);
3281
3397
  }
3282
3398
  return getMedicalDataFromConsultId;
@@ -3357,7 +3473,7 @@ var OroClient = /*#__PURE__*/function () {
3357
3473
  }
3358
3474
  }, _callee26);
3359
3475
  }));
3360
- return function (_x80) {
3476
+ return function (_x82) {
3361
3477
  return _ref3.apply(this, arguments);
3362
3478
  };
3363
3479
  }()));
@@ -3390,15 +3506,17 @@ var OroClient = /*#__PURE__*/function () {
3390
3506
  }
3391
3507
  }, _callee27, this);
3392
3508
  }));
3393
- function getMetaCategoryFromConsultId(_x77, _x78, _x79) {
3509
+ function getMetaCategoryFromConsultId(_x79, _x80, _x81) {
3394
3510
  return _getMetaCategoryFromConsultId.apply(this, arguments);
3395
3511
  }
3396
3512
  return getMetaCategoryFromConsultId;
3397
- }() /**
3398
- * @description retrieves the personal information stored in the first owned lockbox
3399
- * @param userId The user Id
3400
- * @returns the personal data
3401
- */;
3513
+ }()
3514
+ /**
3515
+ * @description retrieves the personal information stored in the first owned lockbox
3516
+ * @param userId The user Id
3517
+ * @returns the personal data
3518
+ */
3519
+ ;
3402
3520
  _proto.getPersonalInformations =
3403
3521
  /*#__PURE__*/
3404
3522
  function () {
@@ -3460,16 +3578,18 @@ var OroClient = /*#__PURE__*/function () {
3460
3578
  }
3461
3579
  }, _callee28, this);
3462
3580
  }));
3463
- function getPersonalInformations(_x81) {
3581
+ function getPersonalInformations(_x83) {
3464
3582
  return _getPersonalInformations.apply(this, arguments);
3465
3583
  }
3466
3584
  return getPersonalInformations;
3467
- }() /**
3468
- * Retrieves the grant associated to a consultationId
3469
- * @note returns the first grant only
3470
- * @param consultationId The consultationId
3471
- * @returns the grant
3472
- */;
3585
+ }()
3586
+ /**
3587
+ * Retrieves the grant associated to a consultationId
3588
+ * @note returns the first grant only
3589
+ * @param consultationId The consultationId
3590
+ * @returns the grant
3591
+ */
3592
+ ;
3473
3593
  _proto.getGrantFromConsultId =
3474
3594
  /*#__PURE__*/
3475
3595
  function () {
@@ -3499,15 +3619,17 @@ var OroClient = /*#__PURE__*/function () {
3499
3619
  }
3500
3620
  }, _callee29, this);
3501
3621
  }));
3502
- function getGrantFromConsultId(_x82) {
3622
+ function getGrantFromConsultId(_x84) {
3503
3623
  return _getGrantFromConsultId.apply(this, arguments);
3504
3624
  }
3505
3625
  return getGrantFromConsultId;
3506
- }() /**
3507
- * retrieves the identity associated to the `consultationId`
3508
- * @param consultationId The consultation Id
3509
- * @returns the identity
3510
- */;
3626
+ }()
3627
+ /**
3628
+ * retrieves the identity associated to the `consultationId`
3629
+ * @param consultationId The consultation Id
3630
+ * @returns the identity
3631
+ */
3632
+ ;
3511
3633
  _proto.getIdentityFromConsultId =
3512
3634
  /*#__PURE__*/
3513
3635
  function () {
@@ -3538,20 +3660,22 @@ var OroClient = /*#__PURE__*/function () {
3538
3660
  }
3539
3661
  }, _callee30, this);
3540
3662
  }));
3541
- function getIdentityFromConsultId(_x83) {
3663
+ function getIdentityFromConsultId(_x85) {
3542
3664
  return _getIdentityFromConsultId.apply(this, arguments);
3543
3665
  }
3544
3666
  return getIdentityFromConsultId;
3545
- }() /**
3546
- * retrieves the lockbox manifest for a given lockbox and add's its private metadata
3547
- * @note the lockbox manifest will retrieved the cached manifest first unless force refresh is enabled
3548
- * @param lockboxUuid
3549
- * @param filter
3550
- * @param expandPrivateMetadata
3551
- * @param lockboxOwnerUuid
3552
- * @param forceRefresh
3553
- * @returns the lockbox manifest
3554
- */;
3667
+ }()
3668
+ /**
3669
+ * retrieves the lockbox manifest for a given lockbox and add's its private metadata
3670
+ * @note the lockbox manifest will retrieved the cached manifest first unless force refresh is enabled
3671
+ * @param lockboxUuid
3672
+ * @param filter
3673
+ * @param expandPrivateMetadata
3674
+ * @param lockboxOwnerUuid
3675
+ * @param forceRefresh
3676
+ * @returns the lockbox manifest
3677
+ */
3678
+ ;
3555
3679
  _proto.getLockboxManifest =
3556
3680
  /*#__PURE__*/
3557
3681
  function () {
@@ -3605,7 +3729,7 @@ var OroClient = /*#__PURE__*/function () {
3605
3729
  }
3606
3730
  }, _callee31);
3607
3731
  }));
3608
- return function (_x89) {
3732
+ return function (_x91) {
3609
3733
  return _ref4.apply(this, arguments);
3610
3734
  };
3611
3735
  }())).then(function (manifest) {
@@ -3619,17 +3743,19 @@ var OroClient = /*#__PURE__*/function () {
3619
3743
  }
3620
3744
  }, _callee32, this);
3621
3745
  }));
3622
- function getLockboxManifest(_x84, _x85, _x86, _x87, _x88) {
3746
+ function getLockboxManifest(_x86, _x87, _x88, _x89, _x90) {
3623
3747
  return _getLockboxManifest.apply(this, arguments);
3624
3748
  }
3625
3749
  return getLockboxManifest;
3626
- }() /**
3627
- * @description Create or update the personal information and store it in the first owned lockbox
3628
- * @param identity The identity to use
3629
- * @param data The personal data to store
3630
- * @param dataUuid (optional) The dataUuid to update
3631
- * @returns
3632
- */;
3750
+ }()
3751
+ /**
3752
+ * @description Create or update the personal information and store it in the first owned lockbox
3753
+ * @param identity The identity to use
3754
+ * @param data The personal data to store
3755
+ * @param dataUuid (optional) The dataUuid to update
3756
+ * @returns
3757
+ */
3758
+ ;
3633
3759
  _proto.createPersonalInformations =
3634
3760
  /*#__PURE__*/
3635
3761
  function () {
@@ -3674,17 +3800,19 @@ var OroClient = /*#__PURE__*/function () {
3674
3800
  }
3675
3801
  }, _callee33, this);
3676
3802
  }));
3677
- function createPersonalInformations(_x90, _x91, _x92) {
3803
+ function createPersonalInformations(_x92, _x93, _x94) {
3678
3804
  return _createPersonalInformations.apply(this, arguments);
3679
3805
  }
3680
3806
  return createPersonalInformations;
3681
- }() /**
3682
- * Create or update user Preference
3683
- * @param identity
3684
- * @param preference
3685
- * @param dataUuid
3686
- * @returns
3687
- */;
3807
+ }()
3808
+ /**
3809
+ * Create or update user Preference
3810
+ * @param identity
3811
+ * @param preference
3812
+ * @param dataUuid
3813
+ * @returns
3814
+ */
3815
+ ;
3688
3816
  _proto.createUserPreference =
3689
3817
  /*#__PURE__*/
3690
3818
  function () {
@@ -3729,15 +3857,17 @@ var OroClient = /*#__PURE__*/function () {
3729
3857
  }
3730
3858
  }, _callee34, this);
3731
3859
  }));
3732
- function createUserPreference(_x93, _x94, _x95) {
3860
+ function createUserPreference(_x95, _x96, _x97) {
3733
3861
  return _createUserPreference.apply(this, arguments);
3734
3862
  }
3735
3863
  return createUserPreference;
3736
- }() /**
3737
- * retrieves the user preference from a grant
3738
- * @param grant The grant
3739
- * @returns the user preference
3740
- */;
3864
+ }()
3865
+ /**
3866
+ * retrieves the user preference from a grant
3867
+ * @param grant The grant
3868
+ * @returns the user preference
3869
+ */
3870
+ ;
3741
3871
  _proto.getDataFromGrant =
3742
3872
  /*#__PURE__*/
3743
3873
  function () {
@@ -3786,15 +3916,17 @@ var OroClient = /*#__PURE__*/function () {
3786
3916
  }
3787
3917
  }, _callee35, this);
3788
3918
  }));
3789
- function getDataFromGrant(_x96, _x97) {
3919
+ function getDataFromGrant(_x98, _x99) {
3790
3920
  return _getDataFromGrant.apply(this, arguments);
3791
3921
  }
3792
3922
  return getDataFromGrant;
3793
- }() /**
3794
- * retrieves the user preference from a consultation id
3795
- * @param consultationId The related consultationId
3796
- * @returns the user preference
3797
- */;
3923
+ }()
3924
+ /**
3925
+ * retrieves the user preference from a consultation id
3926
+ * @param consultationId The related consultationId
3927
+ * @returns the user preference
3928
+ */
3929
+ ;
3798
3930
  _proto.getUserPreferenceFromConsultId =
3799
3931
  /*#__PURE__*/
3800
3932
  function () {
@@ -3825,15 +3957,17 @@ var OroClient = /*#__PURE__*/function () {
3825
3957
  }
3826
3958
  }, _callee36, this);
3827
3959
  }));
3828
- function getUserPreferenceFromConsultId(_x98) {
3960
+ function getUserPreferenceFromConsultId(_x100) {
3829
3961
  return _getUserPreferenceFromConsultId.apply(this, arguments);
3830
3962
  }
3831
3963
  return getUserPreferenceFromConsultId;
3832
- }() /**
3833
- * retrieves the user preference stored in the first owned lockbox from identity
3834
- * @param identity The identity to use
3835
- * @returns the user preference
3836
- */;
3964
+ }()
3965
+ /**
3966
+ * retrieves the user preference stored in the first owned lockbox from identity
3967
+ * @param identity The identity to use
3968
+ * @returns the user preference
3969
+ */
3970
+ ;
3837
3971
  _proto.getUserPreference =
3838
3972
  /*#__PURE__*/
3839
3973
  function () {
@@ -3866,15 +4000,17 @@ var OroClient = /*#__PURE__*/function () {
3866
4000
  }
3867
4001
  }, _callee37, this);
3868
4002
  }));
3869
- function getUserPreference(_x99) {
4003
+ function getUserPreference(_x101) {
3870
4004
  return _getUserPreference.apply(this, arguments);
3871
4005
  }
3872
4006
  return getUserPreference;
3873
- }() /**
3874
- * retrieves the user preference from a consultation id
3875
- * @param consultationId The related consultationId
3876
- * @returns the user preference
3877
- */;
4007
+ }()
4008
+ /**
4009
+ * retrieves the user preference from a consultation id
4010
+ * @param consultationId The related consultationId
4011
+ * @returns the user preference
4012
+ */
4013
+ ;
3878
4014
  _proto.getRecoveryDataFromConsultId =
3879
4015
  /*#__PURE__*/
3880
4016
  function () {
@@ -3905,15 +4041,17 @@ var OroClient = /*#__PURE__*/function () {
3905
4041
  }
3906
4042
  }, _callee38, this);
3907
4043
  }));
3908
- function getRecoveryDataFromConsultId(_x100) {
4044
+ function getRecoveryDataFromConsultId(_x102) {
3909
4045
  return _getRecoveryDataFromConsultId.apply(this, arguments);
3910
4046
  }
3911
4047
  return getRecoveryDataFromConsultId;
3912
- }() /**
3913
- * retrieves the user preference stored in the first owned lockbox from identity
3914
- * @param identity The identity to use
3915
- * @returns the user preference
3916
- */;
4048
+ }()
4049
+ /**
4050
+ * retrieves the user preference stored in the first owned lockbox from identity
4051
+ * @param identity The identity to use
4052
+ * @returns the user preference
4053
+ */
4054
+ ;
3917
4055
  _proto.getRecoveryData =
3918
4056
  /*#__PURE__*/
3919
4057
  function () {
@@ -3946,20 +4084,22 @@ var OroClient = /*#__PURE__*/function () {
3946
4084
  }
3947
4085
  }, _callee39, this);
3948
4086
  }));
3949
- function getRecoveryData(_x101) {
4087
+ function getRecoveryData(_x103) {
3950
4088
  return _getRecoveryData.apply(this, arguments);
3951
4089
  }
3952
4090
  return getRecoveryData;
3953
- }() /**
3954
- * @name getAssignedConsultations
3955
- * @description finds all assigned or owned consultations for the logged user
3956
- * Steps:
3957
- * - Retrieves all granted lockboxes given to the logged user
3958
- * - for each lockbox, find all consultation ids
3959
- * - for each consultation id, retrieve the consult information
3960
- * @param practiceUuid the uuid of the practice to look consult into
3961
- * @returns the list of consults
3962
- */;
4091
+ }()
4092
+ /**
4093
+ * @name getAssignedConsultations
4094
+ * @description finds all assigned or owned consultations for the logged user
4095
+ * Steps:
4096
+ * - Retrieves all granted lockboxes given to the logged user
4097
+ * - for each lockbox, find all consultation ids
4098
+ * - for each consultation id, retrieve the consult information
4099
+ * @param practiceUuid the uuid of the practice to look consult into
4100
+ * @returns the list of consults
4101
+ */
4102
+ ;
3963
4103
  _proto.getAssignedConsultations =
3964
4104
  /*#__PURE__*/
3965
4105
  function () {
@@ -3995,7 +4135,7 @@ var OroClient = /*#__PURE__*/function () {
3995
4135
  }
3996
4136
  }, _callee40);
3997
4137
  }));
3998
- return function (_x103) {
4138
+ return function (_x105) {
3999
4139
  return _ref5.apply(this, arguments);
4000
4140
  };
4001
4141
  }())).then(function (promise) {
@@ -4013,15 +4153,17 @@ var OroClient = /*#__PURE__*/function () {
4013
4153
  }
4014
4154
  }, _callee41, this);
4015
4155
  }));
4016
- function getAssignedConsultations(_x102) {
4156
+ function getAssignedConsultations(_x104) {
4017
4157
  return _getAssignedConsultations.apply(this, arguments);
4018
4158
  }
4019
4159
  return getAssignedConsultations;
4020
- }() /**
4021
- * Gets the past consultations of the patient as well as his relatives if any
4022
- * @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
4023
- * @param practiceUuid
4024
- */;
4160
+ }()
4161
+ /**
4162
+ * Gets the past consultations of the patient as well as his relatives if any
4163
+ * @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
4164
+ * @param practiceUuid
4165
+ */
4166
+ ;
4025
4167
  _proto.getPastConsultationsFromConsultId =
4026
4168
  /*#__PURE__*/
4027
4169
  function () {
@@ -4075,7 +4217,7 @@ var OroClient = /*#__PURE__*/function () {
4075
4217
  }
4076
4218
  }, _callee42);
4077
4219
  }));
4078
- return function (_x106) {
4220
+ return function (_x108) {
4079
4221
  return _ref6.apply(this, arguments);
4080
4222
  };
4081
4223
  }()));
@@ -4088,16 +4230,18 @@ var OroClient = /*#__PURE__*/function () {
4088
4230
  }
4089
4231
  }, _callee43, this);
4090
4232
  }));
4091
- function getPastConsultationsFromConsultId(_x104, _x105) {
4233
+ function getPastConsultationsFromConsultId(_x106, _x107) {
4092
4234
  return _getPastConsultationsFromConsultId.apply(this, arguments);
4093
4235
  }
4094
4236
  return getPastConsultationsFromConsultId;
4095
- }() /**
4096
- * @name getPatientConsultationData
4097
- * @description retrieves the consultation data
4098
- * @param consultationId
4099
- * @returns
4100
- */;
4237
+ }()
4238
+ /**
4239
+ * @name getPatientConsultationData
4240
+ * @description retrieves the consultation data
4241
+ * @param consultationId
4242
+ * @returns
4243
+ */
4244
+ ;
4101
4245
  _proto.getPatientConsultationData =
4102
4246
  /*#__PURE__*/
4103
4247
  function () {
@@ -4139,15 +4283,17 @@ var OroClient = /*#__PURE__*/function () {
4139
4283
  }
4140
4284
  }, _callee44, this);
4141
4285
  }));
4142
- function getPatientConsultationData(_x107, _x108) {
4286
+ function getPatientConsultationData(_x109, _x110) {
4143
4287
  return _getPatientConsultationData.apply(this, arguments);
4144
4288
  }
4145
4289
  return getPatientConsultationData;
4146
- }() /**
4147
- * This function returns the patient prescriptions
4148
- * @param consultationId
4149
- * @returns
4150
- */;
4290
+ }()
4291
+ /**
4292
+ * This function returns the patient prescriptions
4293
+ * @param consultationId
4294
+ * @returns
4295
+ */
4296
+ ;
4151
4297
  _proto.getPatientPrescriptionsList =
4152
4298
  /*#__PURE__*/
4153
4299
  function () {
@@ -4167,15 +4313,17 @@ var OroClient = /*#__PURE__*/function () {
4167
4313
  }
4168
4314
  }, _callee45, this);
4169
4315
  }));
4170
- function getPatientPrescriptionsList(_x109) {
4316
+ function getPatientPrescriptionsList(_x111) {
4171
4317
  return _getPatientPrescriptionsList.apply(this, arguments);
4172
4318
  }
4173
4319
  return getPatientPrescriptionsList;
4174
- }() /**
4175
- * This function returns the patient results
4176
- * @param consultationId
4177
- * @returns
4178
- */;
4320
+ }()
4321
+ /**
4322
+ * This function returns the patient results
4323
+ * @param consultationId
4324
+ * @returns
4325
+ */
4326
+ ;
4179
4327
  _proto.getPatientResultsList =
4180
4328
  /*#__PURE__*/
4181
4329
  function () {
@@ -4195,15 +4343,17 @@ var OroClient = /*#__PURE__*/function () {
4195
4343
  }
4196
4344
  }, _callee46, this);
4197
4345
  }));
4198
- function getPatientResultsList(_x110) {
4346
+ function getPatientResultsList(_x112) {
4199
4347
  return _getPatientResultsList.apply(this, arguments);
4200
4348
  }
4201
4349
  return getPatientResultsList;
4202
- }() /**
4203
- * returns the patient treatment plan options
4204
- * @param consultationId
4205
- * @returns Document[] corresponding to the patient treatment plan options
4206
- */;
4350
+ }()
4351
+ /**
4352
+ * returns the patient treatment plan options
4353
+ * @param consultationId
4354
+ * @returns Document[] corresponding to the patient treatment plan options
4355
+ */
4356
+ ;
4207
4357
  _proto.getPatientTreatmentPlans =
4208
4358
  /*#__PURE__*/
4209
4359
  function () {
@@ -4223,16 +4373,18 @@ var OroClient = /*#__PURE__*/function () {
4223
4373
  }
4224
4374
  }, _callee47, this);
4225
4375
  }));
4226
- function getPatientTreatmentPlans(_x111) {
4376
+ function getPatientTreatmentPlans(_x113) {
4227
4377
  return _getPatientTreatmentPlans.apply(this, arguments);
4228
4378
  }
4229
4379
  return getPatientTreatmentPlans;
4230
- }() /**
4231
- * returns a specific patient treatment plan option
4232
- * @param consultationId
4233
- * @param treatmentPlanId
4234
- * @returns
4235
- */;
4380
+ }()
4381
+ /**
4382
+ * returns a specific patient treatment plan option
4383
+ * @param consultationId
4384
+ * @param treatmentPlanId
4385
+ * @returns
4386
+ */
4387
+ ;
4236
4388
  _proto.getPatientTreatmentPlanByUuid =
4237
4389
  /*#__PURE__*/
4238
4390
  function () {
@@ -4253,19 +4405,21 @@ var OroClient = /*#__PURE__*/function () {
4253
4405
  }
4254
4406
  }, _callee48, this);
4255
4407
  }));
4256
- function getPatientTreatmentPlanByUuid(_x112, _x113) {
4408
+ function getPatientTreatmentPlanByUuid(_x114, _x115) {
4257
4409
  return _getPatientTreatmentPlanByUuid.apply(this, arguments);
4258
4410
  }
4259
4411
  return getPatientTreatmentPlanByUuid;
4260
- }() /**
4261
- * @name getPatientDocumentsList
4262
- * @description applies the provided filter to the vault to only find those documents
4263
- * @param filters the applied filters (e.g. type of documents)
4264
- * @param expandPrivateMetadata whether or not, the private metadata needs to be retrieved
4265
- * (more computationally expensive)
4266
- * @param consultationId
4267
- * @returns the filtered document list
4268
- */;
4412
+ }()
4413
+ /**
4414
+ * @name getPatientDocumentsList
4415
+ * @description applies the provided filter to the vault to only find those documents
4416
+ * @param filters the applied filters (e.g. type of documents)
4417
+ * @param expandPrivateMetadata whether or not, the private metadata needs to be retrieved
4418
+ * (more computationally expensive)
4419
+ * @param consultationId
4420
+ * @returns the filtered document list
4421
+ */
4422
+ ;
4269
4423
  _proto.getPatientDocumentsList =
4270
4424
  /*#__PURE__*/
4271
4425
  function () {
@@ -4304,7 +4458,7 @@ var OroClient = /*#__PURE__*/function () {
4304
4458
  }
4305
4459
  }, _callee49);
4306
4460
  }));
4307
- return function (_x117) {
4461
+ return function (_x119) {
4308
4462
  return _ref7.apply(this, arguments);
4309
4463
  };
4310
4464
  }()));
@@ -4320,7 +4474,7 @@ var OroClient = /*#__PURE__*/function () {
4320
4474
  }
4321
4475
  }, _callee50, this);
4322
4476
  }));
4323
- function getPatientDocumentsList(_x114, _x115, _x116) {
4477
+ function getPatientDocumentsList(_x116, _x117, _x118) {
4324
4478
  return _getPatientDocumentsList.apply(this, arguments);
4325
4479
  }
4326
4480
  return getPatientDocumentsList;
@@ -4375,16 +4529,18 @@ var OroClient = /*#__PURE__*/function () {
4375
4529
  }
4376
4530
  }, _callee51, this);
4377
4531
  }));
4378
- function recoverPrivateKeyFromSecurityQuestions(_x118, _x119, _x120, _x121) {
4532
+ function recoverPrivateKeyFromSecurityQuestions(_x120, _x121, _x122, _x123) {
4379
4533
  return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
4380
4534
  }
4381
4535
  return recoverPrivateKeyFromSecurityQuestions;
4382
- }() /**
4383
- * @name recoverPrivateKeyFromPassword
4384
- * @description Recovers and sets the rsa private key from the password
4385
- * @param id
4386
- * @param password
4387
- */;
4536
+ }()
4537
+ /**
4538
+ * @name recoverPrivateKeyFromPassword
4539
+ * @description Recovers and sets the rsa private key from the password
4540
+ * @param id
4541
+ * @param password
4542
+ */
4543
+ ;
4388
4544
  _proto.recoverPrivateKeyFromPassword =
4389
4545
  /*#__PURE__*/
4390
4546
  function () {
@@ -4414,16 +4570,18 @@ var OroClient = /*#__PURE__*/function () {
4414
4570
  }
4415
4571
  }, _callee52, this);
4416
4572
  }));
4417
- function recoverPrivateKeyFromPassword(_x122, _x123) {
4573
+ function recoverPrivateKeyFromPassword(_x124, _x125) {
4418
4574
  return _recoverPrivateKeyFromPassword.apply(this, arguments);
4419
4575
  }
4420
4576
  return recoverPrivateKeyFromPassword;
4421
- }() /**
4422
- * @name recoverPrivateKeyFromMasterKey
4423
- * @description Recovers and sets the rsa private key from the master key
4424
- * @param id
4425
- * @param masterKey
4426
- */;
4577
+ }()
4578
+ /**
4579
+ * @name recoverPrivateKeyFromMasterKey
4580
+ * @description Recovers and sets the rsa private key from the master key
4581
+ * @param id
4582
+ * @param masterKey
4583
+ */
4584
+ ;
4427
4585
  _proto.recoverPrivateKeyFromMasterKey =
4428
4586
  /*#__PURE__*/
4429
4587
  function () {
@@ -4447,18 +4605,20 @@ var OroClient = /*#__PURE__*/function () {
4447
4605
  }
4448
4606
  }, _callee53, this);
4449
4607
  }));
4450
- function recoverPrivateKeyFromMasterKey(_x124, _x125) {
4608
+ function recoverPrivateKeyFromMasterKey(_x126, _x127) {
4451
4609
  return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
4452
4610
  }
4453
4611
  return recoverPrivateKeyFromMasterKey;
4454
- }() /**
4455
- * @description Generates and updates the security questions and answers payload using new recovery questions and answers
4456
- * 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!!!
4457
- * @param id
4458
- * @param recoverySecurityQuestions
4459
- * @param recoverySecurityAnswers
4460
- * @param threshold the number of answers needed to rebuild the secret
4461
- */;
4612
+ }()
4613
+ /**
4614
+ * @description Generates and updates the security questions and answers payload using new recovery questions and answers
4615
+ * 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!!!
4616
+ * @param id
4617
+ * @param recoverySecurityQuestions
4618
+ * @param recoverySecurityAnswers
4619
+ * @param threshold the number of answers needed to rebuild the secret
4620
+ */
4621
+ ;
4462
4622
  _proto.updateSecurityQuestions =
4463
4623
  /*#__PURE__*/
4464
4624
  function () {
@@ -4489,21 +4649,23 @@ var OroClient = /*#__PURE__*/function () {
4489
4649
  }
4490
4650
  }, _callee54, this);
4491
4651
  }));
4492
- function updateSecurityQuestions(_x126, _x127, _x128, _x129) {
4652
+ function updateSecurityQuestions(_x128, _x129, _x130, _x131) {
4493
4653
  return _updateSecurityQuestions.apply(this, arguments);
4494
4654
  }
4495
4655
  return updateSecurityQuestions;
4496
- }() /**
4497
- * @description Generates and stores the payload encrypted payload and updates the password itself (double hash)
4498
- * @important
4499
- * the recovery payload uses a singly hashed password and the password stored is doubly hashed so
4500
- * the stored password cannot derive the decryption key in the payload
4501
- * @note
4502
- * the old password must be provided when not performing an account recovery
4503
- * @param id
4504
- * @param newPassword
4505
- * @param oldPassword
4506
- */;
4656
+ }()
4657
+ /**
4658
+ * @description Generates and stores the payload encrypted payload and updates the password itself (double hash)
4659
+ * @important
4660
+ * the recovery payload uses a singly hashed password and the password stored is doubly hashed so
4661
+ * the stored password cannot derive the decryption key in the payload
4662
+ * @note
4663
+ * the old password must be provided when not performing an account recovery
4664
+ * @param id
4665
+ * @param newPassword
4666
+ * @param oldPassword
4667
+ */
4668
+ ;
4507
4669
  _proto.updatePassword =
4508
4670
  /*#__PURE__*/
4509
4671
  function () {
@@ -4543,18 +4705,20 @@ var OroClient = /*#__PURE__*/function () {
4543
4705
  }
4544
4706
  }, _callee55, this);
4545
4707
  }));
4546
- function updatePassword(_x130, _x131, _x132) {
4708
+ function updatePassword(_x132, _x133, _x134) {
4547
4709
  return _updatePassword.apply(this, arguments);
4548
4710
  }
4549
4711
  return updatePassword;
4550
- }() /**
4551
- * @description Generates and stores the master key encrypted payload
4552
- * Important
4553
- * 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!
4554
- * @param id
4555
- * @param masterKey
4556
- * @param lockboxUuid
4557
- */;
4712
+ }()
4713
+ /**
4714
+ * @description Generates and stores the master key encrypted payload
4715
+ * Important
4716
+ * 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!
4717
+ * @param id
4718
+ * @param masterKey
4719
+ * @param lockboxUuid
4720
+ */
4721
+ ;
4558
4722
  _proto.updateMasterKey =
4559
4723
  /*#__PURE__*/
4560
4724
  function () {
@@ -4597,7 +4761,7 @@ var OroClient = /*#__PURE__*/function () {
4597
4761
  }
4598
4762
  }, _callee56, this);
4599
4763
  }));
4600
- function updateMasterKey(_x133, _x134, _x135) {
4764
+ function updateMasterKey(_x135, _x136, _x137) {
4601
4765
  return _updateMasterKey.apply(this, arguments);
4602
4766
  }
4603
4767
  return updateMasterKey;