@medipass/web-sdk 11.49.4-feature-healthpoint-upload-endpoints.8 → 11.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/index.js +1 -1
  3. package/lib/resources/abr.js +1 -1
  4. package/lib/resources/accounts.js +1 -1
  5. package/lib/resources/actions.js +1 -1
  6. package/lib/resources/api-keys.js +1 -1
  7. package/lib/resources/applications.js +1 -1
  8. package/lib/resources/attachments.d.ts +1 -35
  9. package/lib/resources/attachments.js +1 -7
  10. package/lib/resources/auth.js +1 -1
  11. package/lib/resources/blacklist.js +1 -1
  12. package/lib/resources/bulk-submits.js +1 -1
  13. package/lib/resources/bulk-uploads.js +1 -1
  14. package/lib/resources/business-profiles.js +1 -1
  15. package/lib/resources/businesses.js +1 -1
  16. package/lib/resources/claim-items.js +1 -1
  17. package/lib/resources/devices.js +1 -1
  18. package/lib/resources/doc-accounts.js +1 -1
  19. package/lib/resources/documents.js +1 -1
  20. package/lib/resources/emails.js +1 -1
  21. package/lib/resources/filter-options.js +1 -1
  22. package/lib/resources/form-application-templates.js +1 -1
  23. package/lib/resources/form-applications.js +1 -1
  24. package/lib/resources/forms.js +1 -1
  25. package/lib/resources/funder-services.js +1 -1
  26. package/lib/resources/funder-settings.js +1 -1
  27. package/lib/resources/funder-values.js +1 -1
  28. package/lib/resources/funders.js +1 -1
  29. package/lib/resources/futures.js +1 -1
  30. package/lib/resources/health-fund-accounts.js +1 -1
  31. package/lib/resources/health-fund-settings.js +1 -1
  32. package/lib/resources/healthfunds.js +1 -1
  33. package/lib/resources/icditems.js +1 -1
  34. package/lib/resources/invoice-scans.js +1 -1
  35. package/lib/resources/jhcs.js +1 -1
  36. package/lib/resources/kyc.js +1 -1
  37. package/lib/resources/logs.js +1 -1
  38. package/lib/resources/members.js +1 -1
  39. package/lib/resources/message-mappings.js +1 -1
  40. package/lib/resources/minions.js +1 -1
  41. package/lib/resources/modalities.js +1 -1
  42. package/lib/resources/notes.js +1 -1
  43. package/lib/resources/onboarding-applications.js +1 -1
  44. package/lib/resources/onboarding-requests.js +1 -1
  45. package/lib/resources/ops.js +1 -1
  46. package/lib/resources/organisations.js +1 -1
  47. package/lib/resources/partners.js +1 -1
  48. package/lib/resources/patients.js +1 -1
  49. package/lib/resources/payments.js +1 -1
  50. package/lib/resources/pms.js +1 -1
  51. package/lib/resources/practice-profiles.js +1 -1
  52. package/lib/resources/practice-types.js +1 -1
  53. package/lib/resources/practices.js +1 -1
  54. package/lib/resources/products.js +1 -1
  55. package/lib/resources/professional-categories.js +1 -1
  56. package/lib/resources/provider-number-types.js +1 -1
  57. package/lib/resources/provider-registration-types.js +1 -1
  58. package/lib/resources/provider-requests.js +1 -1
  59. package/lib/resources/provider-types.js +1 -1
  60. package/lib/resources/ref-sources.js +1 -1
  61. package/lib/resources/risk.js +1 -1
  62. package/lib/resources/rnas.js +1 -1
  63. package/lib/resources/roles.js +1 -1
  64. package/lib/resources/self-checkout-sessions.js +1 -1
  65. package/lib/resources/services.js +1 -1
  66. package/lib/resources/settlements.js +1 -1
  67. package/lib/resources/sign-up.js +1 -1
  68. package/lib/resources/specialties.js +1 -1
  69. package/lib/resources/staff-profiles.js +1 -1
  70. package/lib/resources/staff.js +1 -1
  71. package/lib/resources/statistics.js +1 -1
  72. package/lib/resources/subscriptions.js +1 -1
  73. package/lib/resources/terminals.js +1 -1
  74. package/lib/resources/transaction-export.js +1 -1
  75. package/lib/resources/transactions.js +1 -1
  76. package/lib/resources/triggers.js +1 -1
  77. package/lib/resources/vendors.js +1 -1
  78. package/lib/resources/verify.js +1 -1
  79. package/lib/resources/workers.js +1 -1
  80. package/lib/resources/workflow-exceptions.js +1 -1
  81. package/lib/services/aws.d.ts +0 -10
  82. package/lib/services/aws.js +1 -2
  83. package/lib/services/version.js +1 -1
  84. package/lib/{staff-5e39f044.js → staff-e842c318.js} +61 -230
  85. package/lib/types/index.d.ts +2 -12
  86. package/lib/types/professional-categories.d.ts +0 -1
  87. package/lib/types/specialties.d.ts +0 -1
  88. package/lib/utils/application.js +1 -1
  89. package/lib/utils/professions.d.ts +3 -9
  90. package/lib/utils/professions.js +1 -1
  91. package/lib/utils/request.js +1 -1
  92. package/lib/utils/staff.d.ts +8 -12
  93. package/lib/utils/staff.js +1 -1
  94. package/package.json +3 -3
  95. package/lib/types/funder.d.ts +0 -10
  96. package/lib/types/funder.js +0 -2
  97. package/lib/types/practice.d.ts +0 -96
  98. package/lib/types/practice.js +0 -2
  99. package/lib/types/professional-category.d.ts +0 -6
  100. package/lib/types/professional-category.js +0 -2
  101. package/lib/types/provider-number-type.d.ts +0 -11
  102. package/lib/types/provider-number-type.js +0 -2
  103. package/lib/types/provider-registration-type.d.ts +0 -9
  104. package/lib/types/provider-registration-type.js +0 -2
  105. package/lib/types/provider-registration.d.ts +0 -19
  106. package/lib/types/provider-registration.js +0 -2
  107. package/lib/types/provider-set-item.d.ts +0 -51
  108. package/lib/types/provider-set-item.js +0 -2
  109. package/lib/types/specialty.d.ts +0 -7
  110. package/lib/types/specialty.js +0 -2
  111. package/lib/types/staff-member.d.ts +0 -50
  112. package/lib/types/staff-member.js +0 -2
  113. package/lib/types/virus-scan.d.ts +0 -13
  114. package/lib/types/virus-scan.js +0 -2
@@ -1798,15 +1798,6 @@ var pathGetS3SignedUrl = function pathGetS3SignedUrl(businessId, practiceId, sta
1798
1798
  var pathScanClaimFile = function pathScanClaimFile(businessId, practiceId, staffId) {
1799
1799
  return "/businesses/" + businessId + "/practices/" + practiceId + "/staff/" + staffId + "/attachments/virusscan";
1800
1800
  };
1801
- var pathScanFile = function pathScanFile(businessId) {
1802
- return "/businesses/" + businessId + "/attachments/virusscan";
1803
- };
1804
- var pathGetAttachmentUrl = function pathGetAttachmentUrl(businessId) {
1805
- return "/businesses/" + businessId + "/attachments/uploadurl";
1806
- };
1807
- var pathGetBusinessS3SignedUrl = function pathGetBusinessS3SignedUrl(businessId, s3SignedUrlId) {
1808
- return "/businesses/" + businessId + "/attachments/s3signedurls/" + s3SignedUrlId;
1809
- };
1810
1801
  /**
1811
1802
  * Get url to upload a file associated to a claim
1812
1803
  * @param {String} businessId - Business ID
@@ -1888,88 +1879,14 @@ var getS3SignedUrl = function getS3SignedUrl(businessId, practiceId, staffId, s3
1888
1879
  });
1889
1880
  };
1890
1881
 
1891
- /**
1892
- * Scan a file
1893
- * @param {String} businessId - Business ID
1894
- * @param {Object} body - Request body
1895
- * @param {Object} opts - Additional options
1896
- */
1897
- var scanFile = function scanFile(businessId, body, opts) {
1898
- if (opts === void 0) {
1899
- opts = {};
1900
- }
1901
-
1902
- doesParamExist.default({
1903
- businessId: businessId
1904
- }, opts.hyperMediaEndpoint);
1905
- return request(_objectSpread$5({}, opts, {
1906
- path: pathScanFile(businessId)
1907
- }), {
1908
- method: 'post',
1909
- data: body
1910
- });
1911
- };
1912
-
1913
- /**
1914
- * Get url to upload a file
1915
- * @param {String} businessId - Business ID
1916
- * @param {Object} query - Query
1917
- * @param {Object} opts - Additional options
1918
- */
1919
- var getAttachmentUrl = function getAttachmentUrl(businessId, query, opts) {
1920
- if (opts === void 0) {
1921
- opts = {};
1922
- }
1923
-
1924
- doesParamExist.default({
1925
- businessId: businessId
1926
- }, opts.hyperMediaEndpoint);
1927
- return request(_objectSpread$5({}, opts, {
1928
- path: pathGetAttachmentUrl(businessId)
1929
- }), {
1930
- method: 'get',
1931
- params: query
1932
- });
1933
- };
1934
- /**
1935
- * Get a business' s3 signed url
1936
- * @param {String} businessId - Business ID
1937
- * @param {String} s3SignedUrlId - Internal s3 signed url ID
1938
- * @param {Object} query - Request query
1939
- * @param {Object} opts - Additional options
1940
- */
1941
-
1942
- var getBusinessS3SignedUrl = function getBusinessS3SignedUrl(businessId, s3SignedUrlId, query, opts) {
1943
- if (opts === void 0) {
1944
- opts = {};
1945
- }
1946
-
1947
- doesParamExist.default({
1948
- businessId: businessId,
1949
- s3SignedUrlId: s3SignedUrlId
1950
- }, opts.hyperMediaEndpoint);
1951
- return request(_objectSpread$5({}, opts, {
1952
- path: pathGetBusinessS3SignedUrl(businessId, s3SignedUrlId)
1953
- }), {
1954
- method: 'get',
1955
- params: query
1956
- });
1957
- };
1958
-
1959
1882
  var attachments = /*#__PURE__*/Object.freeze({
1960
1883
  __proto__: null,
1961
1884
  pathGetClaimAttachmentUrl: pathGetClaimAttachmentUrl,
1962
1885
  pathGetS3SignedUrl: pathGetS3SignedUrl,
1963
1886
  pathScanClaimFile: pathScanClaimFile,
1964
- pathScanFile: pathScanFile,
1965
- pathGetAttachmentUrl: pathGetAttachmentUrl,
1966
- pathGetBusinessS3SignedUrl: pathGetBusinessS3SignedUrl,
1967
1887
  getClaimAttachmentUrl: getClaimAttachmentUrl,
1968
1888
  scanClaimFile: scanClaimFile,
1969
- getS3SignedUrl: getS3SignedUrl,
1970
- scanFile: scanFile,
1971
- getAttachmentUrl: getAttachmentUrl,
1972
- getBusinessS3SignedUrl: getBusinessS3SignedUrl
1889
+ getS3SignedUrl: getS3SignedUrl
1973
1890
  });
1974
1891
 
1975
1892
  function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -21425,95 +21342,6 @@ var uploadKycTrustDocumentToS3 = /*#__PURE__*/function () {
21425
21342
  return _ref8.apply(this, arguments);
21426
21343
  };
21427
21344
  }();
21428
- /**
21429
- * Upload attachment to S3
21430
- * @param {String} businessId - Business ID
21431
- * @param {String} healthFundId - Health fund ID
21432
- * @param {File} file - File
21433
- */
21434
-
21435
- var uploadAttachmentToS3 = /*#__PURE__*/function () {
21436
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(businessId, healthFundId, file, opts) {
21437
- var awsAxios, _yield$getAttachmentU, signedPost, s3Url, s3SignedUrlId, bodyFormData, key;
21438
-
21439
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
21440
- while (1) {
21441
- switch (_context9.prev = _context9.next) {
21442
- case 0:
21443
- awsAxios = axios.create();
21444
-
21445
- if (businessId) {
21446
- _context9.next = 3;
21447
- break;
21448
- }
21449
-
21450
- throw new paramError.default('businessId');
21451
-
21452
- case 3:
21453
- if (healthFundId) {
21454
- _context9.next = 5;
21455
- break;
21456
- }
21457
-
21458
- throw new paramError.default('healthFundId');
21459
-
21460
- case 5:
21461
- if (file) {
21462
- _context9.next = 7;
21463
- break;
21464
- }
21465
-
21466
- throw new paramError.default('file');
21467
-
21468
- case 7:
21469
- _context9.prev = 7;
21470
- _context9.next = 10;
21471
- return getAttachmentUrl(businessId, {
21472
- contentType: file.type,
21473
- fileName: file.name,
21474
- healthFundId: healthFundId,
21475
- contentLength: file.size
21476
- }, opts);
21477
-
21478
- case 10:
21479
- _yield$getAttachmentU = _context9.sent;
21480
- signedPost = _yield$getAttachmentU.signedPost;
21481
- s3Url = _yield$getAttachmentU.s3Url;
21482
- s3SignedUrlId = _yield$getAttachmentU.s3SignedUrlId;
21483
- // eslint-disable-next-line
21484
- bodyFormData = new FormData();
21485
-
21486
- for (key in signedPost.fields) {
21487
- bodyFormData.append(key, signedPost.fields[key]);
21488
- }
21489
-
21490
- bodyFormData.append('file', file);
21491
- _context9.next = 19;
21492
- return awsAxios.post(signedPost.url, bodyFormData);
21493
-
21494
- case 19:
21495
- return _context9.abrupt("return", {
21496
- s3Url: s3Url,
21497
- s3SignedUrlId: s3SignedUrlId
21498
- });
21499
-
21500
- case 22:
21501
- _context9.prev = 22;
21502
- _context9.t0 = _context9["catch"](7);
21503
- throw _context9.t0;
21504
-
21505
- case 25:
21506
- case "end":
21507
- return _context9.stop();
21508
- }
21509
- }
21510
- }, _callee9, null, [[7, 22]]);
21511
- }));
21512
-
21513
- return function uploadAttachmentToS3(_x30, _x31, _x32, _x33) {
21514
- return _ref9.apply(this, arguments);
21515
- };
21516
- }();
21517
21345
 
21518
21346
  var aws = /*#__PURE__*/Object.freeze({
21519
21347
  __proto__: null,
@@ -21524,8 +21352,7 @@ var aws = /*#__PURE__*/Object.freeze({
21524
21352
  uploadBusinessStaffMemberImageToS3: uploadBusinessStaffMemberImageToS3,
21525
21353
  uploadInvoiceScanToS3: uploadInvoiceScanToS3,
21526
21354
  uploadBulkUploadCSVToS3: uploadBulkUploadCSVToS3,
21527
- uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3,
21528
- uploadAttachmentToS3: uploadAttachmentToS3
21355
+ uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3
21529
21356
  });
21530
21357
 
21531
21358
  function ownKeys$1e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -21794,29 +21621,28 @@ var applicationUtils = /*#__PURE__*/Object.freeze({
21794
21621
  function ownKeys$1f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21795
21622
 
21796
21623
  function _objectSpread$1f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21624
+
21797
21625
  function parseProfessions(_x, _x2) {
21798
21626
  return _parseProfessions.apply(this, arguments);
21799
21627
  }
21800
21628
 
21801
21629
  function _parseProfessions() {
21802
- _parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(registration, _temp) {
21803
- var _professionalCategori, _specialtiesResponse$, _providerTypesRespons;
21804
-
21630
+ _parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(professions, _temp) {
21805
21631
  var _ref, providerRegistrationTypes, professionalCategoryIds, uniqueProfessionalCategoryIds, professionalCategoryIdsString, specialtyIdSets, specialtyIds, uniqueSpecialtyIds, specialtyIdsString, _yield$Promise$all, professionalCategoriesResponse, specialtiesResponse, providerTypesResponse, professionalCategoriesMap, specialtiesMap, providerRegistrationTypesMap, newProfessions;
21806
21632
 
21807
21633
  return _regeneratorRuntime.wrap(function _callee$(_context) {
21808
21634
  while (1) {
21809
21635
  switch (_context.prev = _context.next) {
21810
21636
  case 0:
21811
- _ref = _temp === void 0 ? {
21812
- providerRegistrationTypes: undefined
21813
- } : _temp, providerRegistrationTypes = _ref.providerRegistrationTypes;
21814
- professionalCategoryIds = registration == null ? void 0 : registration.map(function (registration) {
21637
+ _ref = _temp === void 0 ? {} : _temp, providerRegistrationTypes = _ref.providerRegistrationTypes;
21638
+ // @ts-expect-error TS(7006): Parameter 'registration' implicitly has an 'any' t... Remove this comment to see the full error message
21639
+ professionalCategoryIds = professions.map(function (registration) {
21815
21640
  return registration.professionalCategoryId;
21816
21641
  });
21817
21642
  uniqueProfessionalCategoryIds = _uniq(professionalCategoryIds).filter(Boolean);
21818
- professionalCategoryIdsString = uniqueProfessionalCategoryIds.join(',');
21819
- specialtyIdSets = registration == null ? void 0 : registration.map(function (registration) {
21643
+ professionalCategoryIdsString = uniqueProfessionalCategoryIds.join(','); // @ts-expect-error TS(7006): Parameter 'registration' implicitly has an 'any' t... Remove this comment to see the full error message
21644
+
21645
+ specialtyIdSets = professions.map(function (registration) {
21820
21646
  return registration.specialtyIds;
21821
21647
  });
21822
21648
  specialtyIds = _flatten(specialtyIdSets);
@@ -21824,9 +21650,11 @@ function _parseProfessions() {
21824
21650
  specialtyIdsString = uniqueSpecialtyIds.join(',');
21825
21651
  _context.next = 10;
21826
21652
  return Promise.all([professionalCategoryIdsString ? sdkClient.professionalCategories.getProfessionalCategories({
21653
+ // @ts-expect-error TS(2345): Argument of type '{ professionalCategoryIds: strin... Remove this comment to see the full error message
21827
21654
  professionalCategoryIds: professionalCategoryIdsString,
21828
21655
  limit: 99
21829
21656
  }) : undefined, specialtyIdsString ? sdkClient.specialties.getSpecialties({
21657
+ // @ts-expect-error TS(2345): Argument of type '{ specialtyIds: string; limit: n... Remove this comment to see the full error message
21830
21658
  specialtyIds: specialtyIdsString,
21831
21659
  limit: 99
21832
21660
  }) : undefined, providerRegistrationTypes ? providerRegistrationTypes : sdkClient.providerRegistrationTypes.getProviderRegistrationTypes({
@@ -21838,30 +21666,34 @@ function _parseProfessions() {
21838
21666
  professionalCategoriesResponse = _yield$Promise$all[0];
21839
21667
  specialtiesResponse = _yield$Promise$all[1];
21840
21668
  providerTypesResponse = _yield$Promise$all[2];
21841
- professionalCategoriesMap = professionalCategoriesResponse == null ? void 0 : (_professionalCategori = professionalCategoriesResponse.items) == null ? void 0 : _professionalCategori.reduce(function (currentProfessionalCategories, professionalCategory) {
21669
+ // @ts-expect-error TS(2349): This expression is not callable.
21670
+ professionalCategoriesMap = _get(professionalCategoriesResponse, 'items', []).reduce( // @ts-expect-error TS(7006): Parameter 'currentProfessionalCategories' implicit... Remove this comment to see the full error message
21671
+ function (currentProfessionalCategories, professionalCategory) {
21842
21672
  var _objectSpread2;
21843
21673
 
21844
21674
  return _objectSpread$1f({}, currentProfessionalCategories, (_objectSpread2 = {}, _objectSpread2[professionalCategory._id] = professionalCategory, _objectSpread2));
21845
- }, {});
21846
- specialtiesMap = specialtiesResponse == null ? void 0 : (_specialtiesResponse$ = specialtiesResponse.items) == null ? void 0 : _specialtiesResponse$.reduce(function (currentSpecialties, specialty) {
21675
+ }, {}); // @ts-expect-error TS(2349): This expression is not callable.
21676
+
21677
+ specialtiesMap = _get(specialtiesResponse, 'items', []).reduce( // @ts-expect-error TS(7006): Parameter 'currentSpecialties' implicitly has an '... Remove this comment to see the full error message
21678
+ function (currentSpecialties, professionalCategory) {
21847
21679
  var _objectSpread3;
21848
21680
 
21849
- return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[specialty._id] = specialty, _objectSpread3));
21681
+ return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[professionalCategory._id] = professionalCategory, _objectSpread3));
21850
21682
  }, {});
21851
- providerRegistrationTypesMap = providerTypesResponse == null ? void 0 : (_providerTypesRespons = providerTypesResponse.items) == null ? void 0 : _providerTypesRespons.reduce(function (currentProviderType, providerType) {
21683
+ providerRegistrationTypesMap = _get(providerTypesResponse, 'items', []).reduce( // @ts-expect-error TS(7006): Parameter 'currentProviderType' implicitly has an ... Remove this comment to see the full error message
21684
+ function (currentProviderType, providerType) {
21852
21685
  var _objectSpread4;
21853
21686
 
21854
21687
  return _objectSpread$1f({}, currentProviderType, (_objectSpread4 = {}, _objectSpread4[providerType._id] = providerType, _objectSpread4));
21855
- }, {});
21856
- newProfessions = registration == null ? void 0 : registration.map(function (registration) {
21857
- var _registration$special;
21688
+ }, {}); // @ts-expect-error TS(7006): Parameter 'registration' implicitly has an 'any' t... Remove this comment to see the full error message
21858
21689
 
21859
- var professionalCategory = professionalCategoriesMap == null ? void 0 : professionalCategoriesMap[registration.professionalCategoryId];
21860
- var specialties = registration == null ? void 0 : (_registration$special = registration.specialtyIds) == null ? void 0 : _registration$special.map(function (specialtyId) {
21861
- return specialtiesMap == null ? void 0 : specialtiesMap[specialtyId];
21862
- }); // @ts-expect-error
21690
+ newProfessions = professions.map(function (registration) {
21691
+ var professionalCategory = professionalCategoriesMap[registration.professionalCategoryId]; // @ts-expect-error TS(7006): Parameter 'specialtyId' implicitly has an 'any' ty... Remove this comment to see the full error message
21863
21692
 
21864
- var providerRegistrationType = providerRegistrationTypesMap[registration == null ? void 0 : registration.providerRegistrationTypeId];
21693
+ var specialties = registration.specialtyIds.map(function (specialtyId) {
21694
+ return specialtiesMap[specialtyId];
21695
+ });
21696
+ var providerRegistrationType = providerRegistrationTypesMap[registration.providerRegistrationTypeId];
21865
21697
  return {
21866
21698
  professionalCategory: professionalCategory,
21867
21699
  specialties: specialties,
@@ -22312,17 +22144,18 @@ function ownKeys$1h(object, enumerableOnly) { var keys = Object.keys(object); if
22312
22144
  function _objectSpread$1h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22313
22145
  function parseProviderSet(_x, _x2) {
22314
22146
  return _parseProviderSet.apply(this, arguments);
22315
- }
22147
+ } // @ts-expect-error TS(7006): Parameter 'providerRegistrations' implicitly has a... Remove this comment to see the full error message
22316
22148
 
22317
22149
  function _parseProviderSet() {
22318
- _parseProviderSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(providerSet, _ref) {
22319
- var businessId, funders, providerRegistrationTypes, _providerNumberTypes, _ref$parseProviderNum, parseProviderNumberType, fetchPractices, fetchProviderNumberTypes, _yield$Promise$all, fundersResponse, practicesResponse, providerRegistrations, providerNumberTypesResponse, fundersMap, practicesMap, providerNumberTypesMap, newProviderSet;
22150
+ _parseProviderSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3( // @ts-expect-error TS(7006): Parameter 'providerSet' implicitly has an 'any' ty... Remove this comment to see the full error message
22151
+ providerSet, _temp) {
22152
+ var _ref, businessId, funders, providerRegistrationTypes, _providerNumberTypes, _ref$parseProviderNum, parseProviderNumberType, fetchPractices, fetchProviderNumberTypes, _yield$Promise$all, fundersResponse, practicesResponse, providerRegistrations, providerNumberTypesResponse, fundersMap, practicesMap, providerNumberTypesMap, newProviderSet;
22320
22153
 
22321
22154
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
22322
22155
  while (1) {
22323
22156
  switch (_context3.prev = _context3.next) {
22324
22157
  case 0:
22325
- businessId = _ref.businessId, funders = _ref.funders, providerRegistrationTypes = _ref.providerRegistrationTypes, _providerNumberTypes = _ref.providerNumberTypes, _ref$parseProviderNum = _ref.parseProviderNumberType, parseProviderNumberType = _ref$parseProviderNum === void 0 ? false : _ref$parseProviderNum;
22158
+ _ref = _temp === void 0 ? {} : _temp, businessId = _ref.businessId, funders = _ref.funders, providerRegistrationTypes = _ref.providerRegistrationTypes, _providerNumberTypes = _ref.providerNumberTypes, _ref$parseProviderNum = _ref.parseProviderNumberType, parseProviderNumberType = _ref$parseProviderNum === void 0 ? false : _ref$parseProviderNum;
22326
22159
 
22327
22160
  fetchPractices = /*#__PURE__*/function () {
22328
22161
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
@@ -22331,19 +22164,21 @@ function _parseProviderSet() {
22331
22164
  while (1) {
22332
22165
  switch (_context.prev = _context.next) {
22333
22166
  case 0:
22334
- // @ts-expect-error
22335
- practiceIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
22336
- return providerData == null ? void 0 : providerData.practiceId;
22167
+ // @ts-expect-error TS(7006): Parameter 'providerData' implicitly has an 'any' t... Remove this comment to see the full error message
22168
+ practiceIds = providerSet.map(function (providerData) {
22169
+ return providerData.practiceId;
22337
22170
  });
22338
22171
  uniquePracticeIds = _uniq(practiceIds).filter(Boolean);
22339
22172
  practices = [];
22340
22173
  _context.next = 5;
22341
22174
  return Promise.all(uniquePracticeIds.map(function (practiceId) {
22342
- return sdkClient.practices.getBusinessPractice(businessId, practiceId).catch(function () {
22343
- return {
22344
- _id: practiceId
22345
- };
22346
- });
22175
+ return (// @ts-expect-error TS(2345): Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
22176
+ sdkClient.practices.getBusinessPractice(businessId, practiceId).catch(function () {
22177
+ return {
22178
+ _id: practiceId
22179
+ };
22180
+ })
22181
+ );
22347
22182
  }));
22348
22183
 
22349
22184
  case 5:
@@ -22378,14 +22213,16 @@ function _parseProviderSet() {
22378
22213
  return _context2.abrupt("return", _providerNumberTypes);
22379
22214
 
22380
22215
  case 2:
22381
- // @ts-expect-error
22382
- providerNumberTypeIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
22383
- return providerData == null ? void 0 : providerData.providerNumberTypeId;
22216
+ // @ts-expect-error TS(7006): Parameter 'providerData' implicitly has an 'any' t... Remove this comment to see the full error message
22217
+ providerNumberTypeIds = providerSet.map(function (providerData) {
22218
+ return providerData.providerNumberTypeId;
22384
22219
  });
22385
22220
  uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean);
22386
22221
  _context2.next = 6;
22387
22222
  return Promise.all(uniqueProviderNumberTypeIds.map(function (providerNumberTypeId) {
22388
- return sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId);
22223
+ return (// @ts-expect-error TS(2345): Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
22224
+ sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId)
22225
+ );
22389
22226
  }));
22390
22227
 
22391
22228
  case 6:
@@ -22417,7 +22254,8 @@ function _parseProviderSet() {
22417
22254
  practicesResponse = _yield$Promise$all[1];
22418
22255
  providerRegistrations = _yield$Promise$all[2];
22419
22256
  providerNumberTypesResponse = _yield$Promise$all[3];
22420
- fundersMap = fundersResponse.reduce(function (currentFunders, funder) {
22257
+ fundersMap = fundersResponse.reduce( // @ts-expect-error TS(7006): Parameter 'currentFunders' implicitly has an 'any'... Remove this comment to see the full error message
22258
+ function (currentFunders, funder) {
22421
22259
  var _objectSpread2;
22422
22260
 
22423
22261
  return _objectSpread$1h({}, currentFunders, (_objectSpread2 = {}, _objectSpread2[funder._id] = funder, _objectSpread2));
@@ -22427,19 +22265,19 @@ function _parseProviderSet() {
22427
22265
 
22428
22266
  return _objectSpread$1h({}, currentPractices, (_objectSpread3 = {}, _objectSpread3[practice._id] = practice, _objectSpread3));
22429
22267
  }, {});
22430
- providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce(function (currentProviderNumberTypes, providerNumberType) {
22268
+ providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce( // @ts-expect-error TS(7006): Parameter 'currentProviderNumberTypes' implicitly ... Remove this comment to see the full error message
22269
+ function (currentProviderNumberTypes, providerNumberType) {
22431
22270
  var _objectSpread4;
22432
22271
 
22433
22272
  return _objectSpread$1h({}, currentProviderNumberTypes, (_objectSpread4 = {}, _objectSpread4[providerNumberType._id] = providerNumberType, _objectSpread4));
22434
- }, {});
22435
- newProviderSet = providerSet == null ? void 0 : providerSet.map(function (providerData, i) {
22436
- return _objectSpread$1h({}, providerData, {}, providerRegistrations == null ? void 0 : providerRegistrations[i], {
22437
- // @ts-expect-error
22438
- practice: practicesMap[providerData == null ? void 0 : providerData.practiceId],
22439
- // @ts-expect-error
22440
- funder: fundersMap[providerData == null ? void 0 : providerData.funderId]
22273
+ }, {}); // @ts-expect-error TS(7006): Parameter 'providerData' implicitly has an 'any' t... Remove this comment to see the full error message
22274
+
22275
+ newProviderSet = providerSet.map(function (providerData, i) {
22276
+ return _objectSpread$1h({}, providerData, {}, providerRegistrations[i], {
22277
+ // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
22278
+ practice: practicesMap[providerData.practiceId],
22279
+ funder: fundersMap[providerData.funderId]
22441
22280
  }, parseProviderNumberType && {
22442
- // @ts-expect-error
22443
22281
  providerNumberType: providerNumberTypesMap == null ? void 0 : providerNumberTypesMap[providerData == null ? void 0 : providerData.providerNumberTypeId]
22444
22282
  });
22445
22283
  });
@@ -22711,7 +22549,6 @@ exports.getAction = getAction;
22711
22549
  exports.getActions = getActions;
22712
22550
  exports.getApplication = getApplication;
22713
22551
  exports.getApplications = getApplications;
22714
- exports.getAttachmentUrl = getAttachmentUrl;
22715
22552
  exports.getBlacklistedBankAccounts = getBlacklistedBankAccounts;
22716
22553
  exports.getBsbDetails = getBsbDetails;
22717
22554
  exports.getBulkUpload = getBulkUpload;
@@ -22780,7 +22617,6 @@ exports.getBusinessProducts = getBusinessProducts;
22780
22617
  exports.getBusinessProfessionalCategories = getBusinessProfessionalCategories;
22781
22618
  exports.getBusinessRNA = getBusinessRNA;
22782
22619
  exports.getBusinessRNAs = getBusinessRNAs;
22783
- exports.getBusinessS3SignedUrl = getBusinessS3SignedUrl;
22784
22620
  exports.getBusinessSalesClientToken = getBusinessSalesClientToken;
22785
22621
  exports.getBusinessService = getBusinessService;
22786
22622
  exports.getBusinessServiceStaffMembers = getBusinessServiceStaffMembers;
@@ -23030,8 +22866,6 @@ exports.pathFunderValues = pathFunderValues;
23030
22866
  exports.pathFunderValuesById = pathFunderValuesById;
23031
22867
  exports.pathFuture = pathFuture;
23032
22868
  exports.pathGetAbr = pathGetAbr;
23033
- exports.pathGetAttachmentUrl = pathGetAttachmentUrl;
23034
- exports.pathGetBusinessS3SignedUrl = pathGetBusinessS3SignedUrl;
23035
22869
  exports.pathGetClaimAttachmentUrl = pathGetClaimAttachmentUrl;
23036
22870
  exports.pathGetDraftProgressStatus = pathGetDraftProgressStatus;
23037
22871
  exports.pathGetHealthFundTransactionExport = pathGetHealthFundTransactionExport;
@@ -23098,7 +22932,6 @@ exports.pathRequestVerificationSupport = pathRequestVerificationSupport;
23098
22932
  exports.pathResetTerminal = pathResetTerminal;
23099
22933
  exports.pathResumeComplexVerification = pathResumeComplexVerification;
23100
22934
  exports.pathScanClaimFile = pathScanClaimFile;
23101
- exports.pathScanFile = pathScanFile;
23102
22935
  exports.pathSendReceipt = pathSendReceipt;
23103
22936
  exports.pathSendWorkerMessage = pathSendWorkerMessage;
23104
22937
  exports.pathSignUp = pathSignUp;
@@ -23172,7 +23005,6 @@ exports.saveDraft = saveDraft;
23172
23005
  exports.saveDraftEclipseInPatientInvoice = saveDraftEclipseInPatientInvoice;
23173
23006
  exports.saveDraftEclipseOverseasInvoice = saveDraftEclipseOverseasInvoice;
23174
23007
  exports.scanClaimFile = scanClaimFile;
23175
- exports.scanFile = scanFile;
23176
23008
  exports.scoreAndSaveTransaction = scoreAndSaveTransaction;
23177
23009
  exports.sdk = sdkClient;
23178
23010
  exports.sdkClient = sdkClient;
@@ -23265,7 +23097,6 @@ exports.updateService = updateService;
23265
23097
  exports.updateStaffProviderSetItem = updateStaffProviderSetItem;
23266
23098
  exports.updateTerminal = updateTerminal;
23267
23099
  exports.updateTransaction = updateTransaction;
23268
- exports.uploadAttachmentToS3 = uploadAttachmentToS3;
23269
23100
  exports.uploadBulkUploadCSVToS3 = uploadBulkUploadCSVToS3;
23270
23101
  exports.uploadBusinessPracticeImageToS3 = uploadBusinessPracticeImageToS3;
23271
23102
  exports.uploadBusinessStaffMemberImageToS3 = uploadBusinessStaffMemberImageToS3;
@@ -1,28 +1,18 @@
1
1
  import type { COUNTRY_CODES } from '../utils/regions';
2
2
  export * from './abr';
3
- export * from './blacklist-bank-account';
4
- export * from './business';
5
3
  export * from './device';
4
+ export * from './blacklist-bank-account';
6
5
  export * from './documents';
7
6
  export * from './filter-option';
8
7
  export * from './forms';
9
- export * from './funder';
10
8
  export * from './funder-value';
11
9
  export * from './message-mappings';
12
10
  export * from './notes';
13
- export * from './practice';
14
11
  export * from './products';
15
- export * from './provider-number-type';
16
- export * from './provider-registration';
17
- export * from './provider-registration-type';
18
- export * from './professional-category';
19
12
  export * from './professional-categories';
20
- export * from './provider-set-item';
21
13
  export * from './specialties';
22
- export * from './specialty';
23
- export * from './staff-member';
24
14
  export * from './subscriptions';
25
- export * from './virus-scan';
15
+ export * from './business';
26
16
  export declare type MedipassRequestOpts = {
27
17
  baseUrl?: string;
28
18
  hyperMediaEndpoint?: string | null | undefined;
@@ -2,7 +2,6 @@ import type { PaginationMeta, PaginatedQuery } from './index';
2
2
  /** START: Requests */
3
3
  export declare type GetProfessionalCategoriesQuery = PaginatedQuery & {
4
4
  searchText?: string;
5
- professionalCategoryIds?: string;
6
5
  };
7
6
  /** START: Requests */
8
7
  /** START: Responses */
@@ -2,7 +2,6 @@ import type { PaginationMeta, PaginatedQuery } from './index';
2
2
  /** START: Requests */
3
3
  export declare type GetSpecialtiesQuery = PaginatedQuery & {
4
4
  professionalCategoryId?: string;
5
- specialtyIds?: string;
6
5
  searchText?: string;
7
6
  };
8
7
  /** START: Requests */
@@ -14,7 +14,7 @@ require('lodash/forOwn');
14
14
  require('lodash/get');
15
15
  require('@medipass/utils/sentry');
16
16
  require('./get-axios-error.js');
17
- var request = require('../staff-5e39f044.js');
17
+ var request = require('../staff-e842c318.js');
18
18
  require('@babel/runtime/helpers/inheritsLoose');
19
19
  require('@babel/runtime/helpers/wrapNativeSuper');
20
20
  require('./param-error.js');
@@ -1,9 +1,3 @@
1
- import type { PaginatedResponse, ProviderRegistrationType, Specialty, ProfessionalCategory, ProviderSetItem, ProviderRegistration } from 'types';
2
- export declare type ParseProfessionsResponse = {
3
- professionalCategory: ProfessionalCategory | undefined;
4
- specialties: (Specialty | undefined)[];
5
- providerRegistrationType: ProviderRegistrationType;
6
- }[];
7
- export declare function parseProfessions(registration: ProviderSetItem[] | ProviderRegistration[], { providerRegistrationTypes }?: {
8
- providerRegistrationTypes?: PaginatedResponse<ProviderRegistrationType>;
9
- }): Promise<ParseProfessionsResponse>;
1
+ export declare function parseProfessions(professions: any, { providerRegistrationTypes }?: {
2
+ providerRegistrationTypes: any;
3
+ }): Promise<any>;
@@ -14,7 +14,7 @@ require('lodash/forOwn');
14
14
  require('lodash/get');
15
15
  require('@medipass/utils/sentry');
16
16
  require('./get-axios-error.js');
17
- var request = require('../staff-5e39f044.js');
17
+ var request = require('../staff-e842c318.js');
18
18
  require('@babel/runtime/helpers/inheritsLoose');
19
19
  require('@babel/runtime/helpers/wrapNativeSuper');
20
20
  require('./param-error.js');
@@ -14,7 +14,7 @@ require('lodash/forOwn');
14
14
  require('lodash/get');
15
15
  require('@medipass/utils/sentry');
16
16
  require('./get-axios-error.js');
17
- var request = require('../staff-5e39f044.js');
17
+ var request = require('../staff-e842c318.js');
18
18
  require('@babel/runtime/helpers/inheritsLoose');
19
19
  require('@babel/runtime/helpers/wrapNativeSuper');
20
20
  require('./param-error.js');
@@ -1,12 +1,8 @@
1
- import * as professionsUtils from './professions';
2
- import type { Funder, PaginatedResponse, StaffMember, ProviderRegistrationType, ProviderNumberType, ProviderSetItem, ProviderRegistration, ParsedProviderSetItem, ParsedProviderRegistration } from 'types';
3
- export declare type ParseProviderSetResponse = (ParsedProviderSetItem | ParsedProviderRegistration)[];
4
- export declare function parseProviderSet(providerSet: ProviderSetItem[] | ProviderRegistration[], { businessId, funders, providerRegistrationTypes, providerNumberTypes: _providerNumberTypes, parseProviderNumberType }: {
5
- businessId: string;
6
- funders?: Funder[];
7
- providerRegistrationTypes: PaginatedResponse<ProviderRegistrationType>;
8
- providerNumberTypes?: ProviderNumberType[];
9
- parseProviderNumberType?: boolean;
10
- }): Promise<ParseProviderSetResponse>;
11
- export declare type ParseProviderRegistrationResponse = ProviderRegistration[] & professionsUtils.ParseProfessionsResponse;
12
- export declare function parseProviderRegistrations(providerRegistrations: StaffMember['providerRegistrations'], opts?: {}): Promise<ParseProviderRegistrationResponse>;
1
+ export declare function parseProviderSet(providerSet: any, { businessId, funders, providerRegistrationTypes, providerNumberTypes: _providerNumberTypes, parseProviderNumberType }?: {
2
+ businessId: any;
3
+ funders: any;
4
+ providerRegistrationTypes: any;
5
+ providerNumberTypes: any;
6
+ parseProviderNumberType?: boolean | undefined;
7
+ }): Promise<any>;
8
+ export declare function parseProviderRegistrations(providerRegistrations: any, opts?: {}): Promise<any>;
@@ -14,7 +14,7 @@ require('lodash/forOwn');
14
14
  require('lodash/get');
15
15
  require('@medipass/utils/sentry');
16
16
  require('./get-axios-error.js');
17
- var request = require('../staff-5e39f044.js');
17
+ var request = require('../staff-e842c318.js');
18
18
  require('@babel/runtime/helpers/inheritsLoose');
19
19
  require('@babel/runtime/helpers/wrapNativeSuper');
20
20
  require('./param-error.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/web-sdk",
3
- "version": "11.49.4-feature-healthpoint-upload-endpoints.8",
3
+ "version": "11.50.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@babel/plugin-transform-runtime": "7.8.3",
48
- "@medipass/utils": "^11.74.2-feature-healthpoint-upload-endpoints.0",
48
+ "@medipass/utils": "^11.75.0",
49
49
  "@types/jest": "28.1.6",
50
50
  "@types/mocha": "9.1.1",
51
51
  "@types/node": "18.7.1",
@@ -57,5 +57,5 @@
57
57
  "resolutions": {
58
58
  "react-scripts/**/@typescript-eslint/eslint-plugin": "5.32.0"
59
59
  },
60
- "gitHead": "aee94251c93cddb3080631a8424451858231d0d1"
60
+ "gitHead": "3b1c8b0df99c41faa8216d21316a151a2d9ad8b7"
61
61
  }
@@ -1,10 +0,0 @@
1
- export declare type Funder = {
2
- code: string;
3
- created: string;
4
- displayName: string;
5
- fullName: string;
6
- modified: string;
7
- whitelistedProfessionalCategoryIds: Array<string>;
8
- providerSetFunderIdOverride?: string;
9
- _id: string;
10
- };
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-