@medipass/web-sdk 11.49.4-feature-strict-mode.0 → 11.50.1-feature-healthpoint-upload-endpoints.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/index.js +1 -1
- package/lib/resources/abr.js +1 -1
- package/lib/resources/accounts.js +1 -1
- package/lib/resources/actions.js +1 -1
- package/lib/resources/api-keys.js +1 -1
- package/lib/resources/applications.js +1 -1
- package/lib/resources/attachments.d.ts +35 -1
- package/lib/resources/attachments.js +7 -1
- package/lib/resources/auth.js +1 -1
- package/lib/resources/blacklist.js +1 -1
- package/lib/resources/bulk-submits.js +1 -1
- package/lib/resources/bulk-uploads.js +1 -1
- package/lib/resources/business-profiles.js +1 -1
- package/lib/resources/businesses.js +1 -1
- package/lib/resources/claim-items.js +1 -1
- package/lib/resources/devices.js +1 -1
- package/lib/resources/doc-accounts.js +1 -1
- package/lib/resources/documents.js +1 -1
- package/lib/resources/emails.js +1 -1
- package/lib/resources/filter-options.js +1 -1
- package/lib/resources/form-application-templates.js +1 -1
- package/lib/resources/form-applications.js +1 -1
- package/lib/resources/forms.js +1 -1
- package/lib/resources/funder-services.js +1 -1
- package/lib/resources/funder-settings.js +1 -1
- package/lib/resources/funder-values.js +1 -1
- package/lib/resources/funders.js +1 -1
- package/lib/resources/futures.js +1 -1
- package/lib/resources/health-fund-accounts.js +1 -1
- package/lib/resources/health-fund-settings.js +1 -1
- package/lib/resources/healthfunds.js +1 -1
- package/lib/resources/icditems.js +1 -1
- package/lib/resources/invoice-scans.js +1 -1
- package/lib/resources/jhcs.js +1 -1
- package/lib/resources/kyc.js +1 -1
- package/lib/resources/logs.js +1 -1
- package/lib/resources/members.js +1 -1
- package/lib/resources/message-mappings.js +1 -1
- package/lib/resources/minions.js +1 -1
- package/lib/resources/modalities.js +1 -1
- package/lib/resources/notes.js +1 -1
- package/lib/resources/onboarding-applications.js +1 -1
- package/lib/resources/onboarding-requests.js +1 -1
- package/lib/resources/ops.js +1 -1
- package/lib/resources/organisations.js +1 -1
- package/lib/resources/partners.js +1 -1
- package/lib/resources/patients.js +1 -1
- package/lib/resources/payments.js +1 -1
- package/lib/resources/pms.js +1 -1
- package/lib/resources/practice-profiles.js +1 -1
- package/lib/resources/practice-types.js +1 -1
- package/lib/resources/practices.js +1 -1
- package/lib/resources/products.js +1 -1
- package/lib/resources/professional-categories.js +1 -1
- package/lib/resources/provider-number-types.js +1 -1
- package/lib/resources/provider-registration-types.js +1 -1
- package/lib/resources/provider-requests.js +1 -1
- package/lib/resources/provider-types.js +1 -1
- package/lib/resources/ref-sources.js +1 -1
- package/lib/resources/risk.js +1 -1
- package/lib/resources/rnas.js +1 -1
- package/lib/resources/roles.js +1 -1
- package/lib/resources/self-checkout-sessions.js +1 -1
- package/lib/resources/services.js +1 -1
- package/lib/resources/settlements.js +1 -1
- package/lib/resources/sign-up.js +1 -1
- package/lib/resources/specialties.js +1 -1
- package/lib/resources/staff-profiles.js +1 -1
- package/lib/resources/staff.js +1 -1
- package/lib/resources/statistics.js +1 -1
- package/lib/resources/subscriptions.js +1 -1
- package/lib/resources/terminals.js +1 -1
- package/lib/resources/transaction-export.js +1 -1
- package/lib/resources/transactions.js +1 -1
- package/lib/resources/triggers.js +1 -1
- package/lib/resources/vendors.js +1 -1
- package/lib/resources/verify.js +1 -1
- package/lib/resources/workers.js +1 -1
- package/lib/resources/workflow-exceptions.js +1 -1
- package/lib/services/aws.d.ts +10 -0
- package/lib/services/aws.js +2 -1
- package/lib/services/version.js +1 -1
- package/lib/{staff-e842c318.js → staff-1637edec.js} +228 -58
- package/lib/types/funder.d.ts +10 -0
- package/lib/types/funder.js +2 -0
- package/lib/types/index.d.ts +12 -2
- package/lib/types/practice.d.ts +96 -0
- package/lib/types/practice.js +2 -0
- package/lib/types/professional-categories.d.ts +1 -0
- package/lib/types/professional-category.d.ts +6 -0
- package/lib/types/professional-category.js +2 -0
- package/lib/types/provider-number-type.d.ts +11 -0
- package/lib/types/provider-number-type.js +2 -0
- package/lib/types/provider-registration-type.d.ts +9 -0
- package/lib/types/provider-registration-type.js +2 -0
- package/lib/types/provider-registration.d.ts +19 -0
- package/lib/types/provider-registration.js +2 -0
- package/lib/types/provider-set-item.d.ts +51 -0
- package/lib/types/provider-set-item.js +2 -0
- package/lib/types/specialties.d.ts +1 -0
- package/lib/types/specialty.d.ts +7 -0
- package/lib/types/specialty.js +2 -0
- package/lib/types/staff-member.d.ts +50 -0
- package/lib/types/staff-member.js +2 -0
- package/lib/types/virus-scan.d.ts +13 -0
- package/lib/types/virus-scan.js +2 -0
- package/lib/utils/application.js +1 -1
- package/lib/utils/professions.d.ts +9 -3
- package/lib/utils/professions.js +1 -1
- package/lib/utils/request.js +1 -1
- package/lib/utils/staff.d.ts +12 -8
- package/lib/utils/staff.js +1 -1
- package/package.json +5 -6
|
@@ -1798,6 +1798,15 @@ 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
|
+
};
|
|
1801
1810
|
/**
|
|
1802
1811
|
* Get url to upload a file associated to a claim
|
|
1803
1812
|
* @param {String} businessId - Business ID
|
|
@@ -1879,14 +1888,88 @@ var getS3SignedUrl = function getS3SignedUrl(businessId, practiceId, staffId, s3
|
|
|
1879
1888
|
});
|
|
1880
1889
|
};
|
|
1881
1890
|
|
|
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
|
+
|
|
1882
1959
|
var attachments = /*#__PURE__*/Object.freeze({
|
|
1883
1960
|
__proto__: null,
|
|
1884
1961
|
pathGetClaimAttachmentUrl: pathGetClaimAttachmentUrl,
|
|
1885
1962
|
pathGetS3SignedUrl: pathGetS3SignedUrl,
|
|
1886
1963
|
pathScanClaimFile: pathScanClaimFile,
|
|
1964
|
+
pathScanFile: pathScanFile,
|
|
1965
|
+
pathGetAttachmentUrl: pathGetAttachmentUrl,
|
|
1966
|
+
pathGetBusinessS3SignedUrl: pathGetBusinessS3SignedUrl,
|
|
1887
1967
|
getClaimAttachmentUrl: getClaimAttachmentUrl,
|
|
1888
1968
|
scanClaimFile: scanClaimFile,
|
|
1889
|
-
getS3SignedUrl: getS3SignedUrl
|
|
1969
|
+
getS3SignedUrl: getS3SignedUrl,
|
|
1970
|
+
scanFile: scanFile,
|
|
1971
|
+
getAttachmentUrl: getAttachmentUrl,
|
|
1972
|
+
getBusinessS3SignedUrl: getBusinessS3SignedUrl
|
|
1890
1973
|
});
|
|
1891
1974
|
|
|
1892
1975
|
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; }
|
|
@@ -21342,6 +21425,95 @@ var uploadKycTrustDocumentToS3 = /*#__PURE__*/function () {
|
|
|
21342
21425
|
return _ref8.apply(this, arguments);
|
|
21343
21426
|
};
|
|
21344
21427
|
}();
|
|
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
|
+
}();
|
|
21345
21517
|
|
|
21346
21518
|
var aws = /*#__PURE__*/Object.freeze({
|
|
21347
21519
|
__proto__: null,
|
|
@@ -21352,7 +21524,8 @@ var aws = /*#__PURE__*/Object.freeze({
|
|
|
21352
21524
|
uploadBusinessStaffMemberImageToS3: uploadBusinessStaffMemberImageToS3,
|
|
21353
21525
|
uploadInvoiceScanToS3: uploadInvoiceScanToS3,
|
|
21354
21526
|
uploadBulkUploadCSVToS3: uploadBulkUploadCSVToS3,
|
|
21355
|
-
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3
|
|
21527
|
+
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3,
|
|
21528
|
+
uploadAttachmentToS3: uploadAttachmentToS3
|
|
21356
21529
|
});
|
|
21357
21530
|
|
|
21358
21531
|
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; }
|
|
@@ -21621,22 +21794,24 @@ var applicationUtils = /*#__PURE__*/Object.freeze({
|
|
|
21621
21794
|
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; }
|
|
21622
21795
|
|
|
21623
21796
|
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
|
-
|
|
21625
21797
|
function parseProfessions(_x, _x2) {
|
|
21626
21798
|
return _parseProfessions.apply(this, arguments);
|
|
21627
21799
|
}
|
|
21628
21800
|
|
|
21629
21801
|
function _parseProfessions() {
|
|
21630
|
-
_parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(
|
|
21802
|
+
_parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(registration, _temp) {
|
|
21803
|
+
var _professionalCategori, _specialtiesResponse$, _providerTypesRespons;
|
|
21804
|
+
|
|
21631
21805
|
var _ref, providerRegistrationTypes, professionalCategoryIds, uniqueProfessionalCategoryIds, professionalCategoryIdsString, specialtyIdSets, specialtyIds, uniqueSpecialtyIds, specialtyIdsString, _yield$Promise$all, professionalCategoriesResponse, specialtiesResponse, providerTypesResponse, professionalCategoriesMap, specialtiesMap, providerRegistrationTypesMap, newProfessions;
|
|
21632
21806
|
|
|
21633
21807
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
21634
21808
|
while (1) {
|
|
21635
21809
|
switch (_context.prev = _context.next) {
|
|
21636
21810
|
case 0:
|
|
21637
|
-
_ref = _temp === void 0 ? {
|
|
21638
|
-
|
|
21639
|
-
|
|
21811
|
+
_ref = _temp === void 0 ? {
|
|
21812
|
+
providerRegistrationTypes: undefined
|
|
21813
|
+
} : _temp, providerRegistrationTypes = _ref.providerRegistrationTypes;
|
|
21814
|
+
professionalCategoryIds = registration == null ? void 0 : registration.map(function (registration) {
|
|
21640
21815
|
return registration.professionalCategoryId;
|
|
21641
21816
|
});
|
|
21642
21817
|
uniqueProfessionalCategoryIds = _uniq(professionalCategoryIds).filter(Boolean);
|
|
@@ -21650,11 +21825,9 @@ function _parseProfessions() {
|
|
|
21650
21825
|
specialtyIdsString = uniqueSpecialtyIds.join(',');
|
|
21651
21826
|
_context.next = 10;
|
|
21652
21827
|
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
|
|
21654
21828
|
professionalCategoryIds: professionalCategoryIdsString,
|
|
21655
21829
|
limit: 99
|
|
21656
21830
|
}) : 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
|
|
21658
21831
|
specialtyIds: specialtyIdsString,
|
|
21659
21832
|
limit: 99
|
|
21660
21833
|
}) : undefined, providerRegistrationTypes ? providerRegistrationTypes : sdkClient.providerRegistrationTypes.getProviderRegistrationTypes({
|
|
@@ -21666,34 +21839,30 @@ function _parseProfessions() {
|
|
|
21666
21839
|
professionalCategoriesResponse = _yield$Promise$all[0];
|
|
21667
21840
|
specialtiesResponse = _yield$Promise$all[1];
|
|
21668
21841
|
providerTypesResponse = _yield$Promise$all[2];
|
|
21669
|
-
|
|
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
|
+
professionalCategoriesMap = professionalCategoriesResponse == null ? void 0 : (_professionalCategori = professionalCategoriesResponse.items) == null ? void 0 : _professionalCategori.reduce(function (currentProfessionalCategories, professionalCategory) {
|
|
21672
21843
|
var _objectSpread2;
|
|
21673
21844
|
|
|
21674
21845
|
return _objectSpread$1f({}, currentProfessionalCategories, (_objectSpread2 = {}, _objectSpread2[professionalCategory._id] = professionalCategory, _objectSpread2));
|
|
21675
|
-
}, {});
|
|
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) {
|
|
21846
|
+
}, {});
|
|
21847
|
+
specialtiesMap = specialtiesResponse == null ? void 0 : (_specialtiesResponse$ = specialtiesResponse.items) == null ? void 0 : _specialtiesResponse$.reduce(function (currentSpecialties, specialty) {
|
|
21679
21848
|
var _objectSpread3;
|
|
21680
21849
|
|
|
21681
|
-
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[
|
|
21850
|
+
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[specialty._id] = specialty, _objectSpread3));
|
|
21682
21851
|
}, {});
|
|
21683
|
-
providerRegistrationTypesMap =
|
|
21684
|
-
function (currentProviderType, providerType) {
|
|
21852
|
+
providerRegistrationTypesMap = providerTypesResponse == null ? void 0 : (_providerTypesRespons = providerTypesResponse.items) == null ? void 0 : _providerTypesRespons.reduce(function (currentProviderType, providerType) {
|
|
21685
21853
|
var _objectSpread4;
|
|
21686
21854
|
|
|
21687
21855
|
return _objectSpread$1f({}, currentProviderType, (_objectSpread4 = {}, _objectSpread4[providerType._id] = providerType, _objectSpread4));
|
|
21688
|
-
}, {});
|
|
21856
|
+
}, {});
|
|
21857
|
+
newProfessions = registration == null ? void 0 : registration.map(function (registration) {
|
|
21858
|
+
var _registration$special;
|
|
21689
21859
|
|
|
21690
|
-
|
|
21691
|
-
var
|
|
21860
|
+
var professionalCategory = professionalCategoriesMap == null ? void 0 : professionalCategoriesMap[registration.professionalCategoryId];
|
|
21861
|
+
var specialties = registration == null ? void 0 : (_registration$special = registration.specialtyIds) == null ? void 0 : _registration$special.map(function (specialtyId) {
|
|
21862
|
+
return specialtiesMap == null ? void 0 : specialtiesMap[specialtyId];
|
|
21863
|
+
}); // @ts-expect-error
|
|
21692
21864
|
|
|
21693
|
-
var
|
|
21694
|
-
return specialtiesMap[specialtyId];
|
|
21695
|
-
});
|
|
21696
|
-
var providerRegistrationType = providerRegistrationTypesMap[registration.providerRegistrationTypeId];
|
|
21865
|
+
var providerRegistrationType = providerRegistrationTypesMap[registration == null ? void 0 : registration.providerRegistrationTypeId];
|
|
21697
21866
|
return {
|
|
21698
21867
|
professionalCategory: professionalCategory,
|
|
21699
21868
|
specialties: specialties,
|
|
@@ -22144,18 +22313,17 @@ function ownKeys$1h(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
22144
22313
|
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; }
|
|
22145
22314
|
function parseProviderSet(_x, _x2) {
|
|
22146
22315
|
return _parseProviderSet.apply(this, arguments);
|
|
22147
|
-
}
|
|
22316
|
+
}
|
|
22148
22317
|
|
|
22149
22318
|
function _parseProviderSet() {
|
|
22150
|
-
_parseProviderSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(
|
|
22151
|
-
|
|
22152
|
-
var _ref, businessId, funders, providerRegistrationTypes, _providerNumberTypes, _ref$parseProviderNum, parseProviderNumberType, fetchPractices, fetchProviderNumberTypes, _yield$Promise$all, fundersResponse, practicesResponse, providerRegistrations, providerNumberTypesResponse, fundersMap, practicesMap, providerNumberTypesMap, newProviderSet;
|
|
22319
|
+
_parseProviderSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(providerSet, _ref) {
|
|
22320
|
+
var businessId, funders, providerRegistrationTypes, _providerNumberTypes, _ref$parseProviderNum, parseProviderNumberType, fetchPractices, fetchProviderNumberTypes, _yield$Promise$all, fundersResponse, practicesResponse, providerRegistrations, providerNumberTypesResponse, fundersMap, practicesMap, providerNumberTypesMap, newProviderSet;
|
|
22153
22321
|
|
|
22154
22322
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
22155
22323
|
while (1) {
|
|
22156
22324
|
switch (_context3.prev = _context3.next) {
|
|
22157
22325
|
case 0:
|
|
22158
|
-
|
|
22326
|
+
businessId = _ref.businessId, funders = _ref.funders, providerRegistrationTypes = _ref.providerRegistrationTypes, _providerNumberTypes = _ref.providerNumberTypes, _ref$parseProviderNum = _ref.parseProviderNumberType, parseProviderNumberType = _ref$parseProviderNum === void 0 ? false : _ref$parseProviderNum;
|
|
22159
22327
|
|
|
22160
22328
|
fetchPractices = /*#__PURE__*/function () {
|
|
22161
22329
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -22164,21 +22332,19 @@ function _parseProviderSet() {
|
|
|
22164
22332
|
while (1) {
|
|
22165
22333
|
switch (_context.prev = _context.next) {
|
|
22166
22334
|
case 0:
|
|
22167
|
-
// @ts-expect-error
|
|
22168
|
-
practiceIds = providerSet.map(function (providerData) {
|
|
22169
|
-
return providerData.practiceId;
|
|
22335
|
+
// @ts-expect-error
|
|
22336
|
+
practiceIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
|
|
22337
|
+
return providerData == null ? void 0 : providerData.practiceId;
|
|
22170
22338
|
});
|
|
22171
22339
|
uniquePracticeIds = _uniq(practiceIds).filter(Boolean);
|
|
22172
22340
|
practices = [];
|
|
22173
22341
|
_context.next = 5;
|
|
22174
22342
|
return Promise.all(uniquePracticeIds.map(function (practiceId) {
|
|
22175
|
-
return (
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
})
|
|
22181
|
-
);
|
|
22343
|
+
return sdkClient.practices.getBusinessPractice(businessId, practiceId).catch(function () {
|
|
22344
|
+
return {
|
|
22345
|
+
_id: practiceId
|
|
22346
|
+
};
|
|
22347
|
+
});
|
|
22182
22348
|
}));
|
|
22183
22349
|
|
|
22184
22350
|
case 5:
|
|
@@ -22213,16 +22379,14 @@ function _parseProviderSet() {
|
|
|
22213
22379
|
return _context2.abrupt("return", _providerNumberTypes);
|
|
22214
22380
|
|
|
22215
22381
|
case 2:
|
|
22216
|
-
// @ts-expect-error
|
|
22217
|
-
providerNumberTypeIds = providerSet.map(function (providerData) {
|
|
22218
|
-
return providerData.providerNumberTypeId;
|
|
22382
|
+
// @ts-expect-error
|
|
22383
|
+
providerNumberTypeIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
|
|
22384
|
+
return providerData == null ? void 0 : providerData.providerNumberTypeId;
|
|
22219
22385
|
});
|
|
22220
22386
|
uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean);
|
|
22221
22387
|
_context2.next = 6;
|
|
22222
22388
|
return Promise.all(uniqueProviderNumberTypeIds.map(function (providerNumberTypeId) {
|
|
22223
|
-
return (
|
|
22224
|
-
sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId)
|
|
22225
|
-
);
|
|
22389
|
+
return sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId);
|
|
22226
22390
|
}));
|
|
22227
22391
|
|
|
22228
22392
|
case 6:
|
|
@@ -22254,8 +22418,7 @@ function _parseProviderSet() {
|
|
|
22254
22418
|
practicesResponse = _yield$Promise$all[1];
|
|
22255
22419
|
providerRegistrations = _yield$Promise$all[2];
|
|
22256
22420
|
providerNumberTypesResponse = _yield$Promise$all[3];
|
|
22257
|
-
fundersMap = fundersResponse.reduce(
|
|
22258
|
-
function (currentFunders, funder) {
|
|
22421
|
+
fundersMap = fundersResponse.reduce(function (currentFunders, funder) {
|
|
22259
22422
|
var _objectSpread2;
|
|
22260
22423
|
|
|
22261
22424
|
return _objectSpread$1h({}, currentFunders, (_objectSpread2 = {}, _objectSpread2[funder._id] = funder, _objectSpread2));
|
|
@@ -22265,19 +22428,19 @@ function _parseProviderSet() {
|
|
|
22265
22428
|
|
|
22266
22429
|
return _objectSpread$1h({}, currentPractices, (_objectSpread3 = {}, _objectSpread3[practice._id] = practice, _objectSpread3));
|
|
22267
22430
|
}, {});
|
|
22268
|
-
providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce(
|
|
22269
|
-
function (currentProviderNumberTypes, providerNumberType) {
|
|
22431
|
+
providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce(function (currentProviderNumberTypes, providerNumberType) {
|
|
22270
22432
|
var _objectSpread4;
|
|
22271
22433
|
|
|
22272
22434
|
return _objectSpread$1h({}, currentProviderNumberTypes, (_objectSpread4 = {}, _objectSpread4[providerNumberType._id] = providerNumberType, _objectSpread4));
|
|
22273
|
-
}, {});
|
|
22274
|
-
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
funder: fundersMap[providerData.funderId]
|
|
22435
|
+
}, {});
|
|
22436
|
+
newProviderSet = providerSet == null ? void 0 : providerSet.map(function (providerData, i) {
|
|
22437
|
+
return _objectSpread$1h({}, providerData, {}, providerRegistrations == null ? void 0 : providerRegistrations[i], {
|
|
22438
|
+
// @ts-expect-error
|
|
22439
|
+
practice: practicesMap[providerData == null ? void 0 : providerData.practiceId],
|
|
22440
|
+
// @ts-expect-error
|
|
22441
|
+
funder: fundersMap[providerData == null ? void 0 : providerData.funderId]
|
|
22280
22442
|
}, parseProviderNumberType && {
|
|
22443
|
+
// @ts-expect-error
|
|
22281
22444
|
providerNumberType: providerNumberTypesMap == null ? void 0 : providerNumberTypesMap[providerData == null ? void 0 : providerData.providerNumberTypeId]
|
|
22282
22445
|
});
|
|
22283
22446
|
});
|
|
@@ -22549,6 +22712,7 @@ exports.getAction = getAction;
|
|
|
22549
22712
|
exports.getActions = getActions;
|
|
22550
22713
|
exports.getApplication = getApplication;
|
|
22551
22714
|
exports.getApplications = getApplications;
|
|
22715
|
+
exports.getAttachmentUrl = getAttachmentUrl;
|
|
22552
22716
|
exports.getBlacklistedBankAccounts = getBlacklistedBankAccounts;
|
|
22553
22717
|
exports.getBsbDetails = getBsbDetails;
|
|
22554
22718
|
exports.getBulkUpload = getBulkUpload;
|
|
@@ -22617,6 +22781,7 @@ exports.getBusinessProducts = getBusinessProducts;
|
|
|
22617
22781
|
exports.getBusinessProfessionalCategories = getBusinessProfessionalCategories;
|
|
22618
22782
|
exports.getBusinessRNA = getBusinessRNA;
|
|
22619
22783
|
exports.getBusinessRNAs = getBusinessRNAs;
|
|
22784
|
+
exports.getBusinessS3SignedUrl = getBusinessS3SignedUrl;
|
|
22620
22785
|
exports.getBusinessSalesClientToken = getBusinessSalesClientToken;
|
|
22621
22786
|
exports.getBusinessService = getBusinessService;
|
|
22622
22787
|
exports.getBusinessServiceStaffMembers = getBusinessServiceStaffMembers;
|
|
@@ -22866,6 +23031,8 @@ exports.pathFunderValues = pathFunderValues;
|
|
|
22866
23031
|
exports.pathFunderValuesById = pathFunderValuesById;
|
|
22867
23032
|
exports.pathFuture = pathFuture;
|
|
22868
23033
|
exports.pathGetAbr = pathGetAbr;
|
|
23034
|
+
exports.pathGetAttachmentUrl = pathGetAttachmentUrl;
|
|
23035
|
+
exports.pathGetBusinessS3SignedUrl = pathGetBusinessS3SignedUrl;
|
|
22869
23036
|
exports.pathGetClaimAttachmentUrl = pathGetClaimAttachmentUrl;
|
|
22870
23037
|
exports.pathGetDraftProgressStatus = pathGetDraftProgressStatus;
|
|
22871
23038
|
exports.pathGetHealthFundTransactionExport = pathGetHealthFundTransactionExport;
|
|
@@ -22932,6 +23099,7 @@ exports.pathRequestVerificationSupport = pathRequestVerificationSupport;
|
|
|
22932
23099
|
exports.pathResetTerminal = pathResetTerminal;
|
|
22933
23100
|
exports.pathResumeComplexVerification = pathResumeComplexVerification;
|
|
22934
23101
|
exports.pathScanClaimFile = pathScanClaimFile;
|
|
23102
|
+
exports.pathScanFile = pathScanFile;
|
|
22935
23103
|
exports.pathSendReceipt = pathSendReceipt;
|
|
22936
23104
|
exports.pathSendWorkerMessage = pathSendWorkerMessage;
|
|
22937
23105
|
exports.pathSignUp = pathSignUp;
|
|
@@ -23005,6 +23173,7 @@ exports.saveDraft = saveDraft;
|
|
|
23005
23173
|
exports.saveDraftEclipseInPatientInvoice = saveDraftEclipseInPatientInvoice;
|
|
23006
23174
|
exports.saveDraftEclipseOverseasInvoice = saveDraftEclipseOverseasInvoice;
|
|
23007
23175
|
exports.scanClaimFile = scanClaimFile;
|
|
23176
|
+
exports.scanFile = scanFile;
|
|
23008
23177
|
exports.scoreAndSaveTransaction = scoreAndSaveTransaction;
|
|
23009
23178
|
exports.sdk = sdkClient;
|
|
23010
23179
|
exports.sdkClient = sdkClient;
|
|
@@ -23097,6 +23266,7 @@ exports.updateService = updateService;
|
|
|
23097
23266
|
exports.updateStaffProviderSetItem = updateStaffProviderSetItem;
|
|
23098
23267
|
exports.updateTerminal = updateTerminal;
|
|
23099
23268
|
exports.updateTransaction = updateTransaction;
|
|
23269
|
+
exports.uploadAttachmentToS3 = uploadAttachmentToS3;
|
|
23100
23270
|
exports.uploadBulkUploadCSVToS3 = uploadBulkUploadCSVToS3;
|
|
23101
23271
|
exports.uploadBusinessPracticeImageToS3 = uploadBusinessPracticeImageToS3;
|
|
23102
23272
|
exports.uploadBusinessStaffMemberImageToS3 = uploadBusinessStaffMemberImageToS3;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import type { COUNTRY_CODES } from '../utils/regions';
|
|
2
2
|
export * from './abr';
|
|
3
|
-
export * from './device';
|
|
4
3
|
export * from './blacklist-bank-account';
|
|
4
|
+
export * from './business';
|
|
5
|
+
export * from './device';
|
|
5
6
|
export * from './documents';
|
|
6
7
|
export * from './filter-option';
|
|
7
8
|
export * from './forms';
|
|
9
|
+
export * from './funder';
|
|
8
10
|
export * from './funder-value';
|
|
9
11
|
export * from './message-mappings';
|
|
10
12
|
export * from './notes';
|
|
13
|
+
export * from './practice';
|
|
11
14
|
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';
|
|
12
19
|
export * from './professional-categories';
|
|
20
|
+
export * from './provider-set-item';
|
|
13
21
|
export * from './specialties';
|
|
22
|
+
export * from './specialty';
|
|
23
|
+
export * from './staff-member';
|
|
14
24
|
export * from './subscriptions';
|
|
15
|
-
export * from './
|
|
25
|
+
export * from './virus-scan';
|
|
16
26
|
export declare type MedipassRequestOpts = {
|
|
17
27
|
baseUrl?: string;
|
|
18
28
|
hyperMediaEndpoint?: string | null | undefined;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export interface Practice {
|
|
2
|
+
settings: PracticeSettings;
|
|
3
|
+
billingAddress: PracticeBillingAddress;
|
|
4
|
+
settlement: {
|
|
5
|
+
bankAccount: PracticeBankAccount;
|
|
6
|
+
};
|
|
7
|
+
staffIds: string[];
|
|
8
|
+
practiceTypeIds: string[];
|
|
9
|
+
status: string;
|
|
10
|
+
showAddress: boolean;
|
|
11
|
+
tz: string;
|
|
12
|
+
billingNotificationEmails: string[];
|
|
13
|
+
isSignedUp: boolean;
|
|
14
|
+
isInstantQuotesEnabled: boolean;
|
|
15
|
+
_id: string;
|
|
16
|
+
fullName: string;
|
|
17
|
+
displayName: string;
|
|
18
|
+
mobile: string;
|
|
19
|
+
email: string;
|
|
20
|
+
lnglat: [number, number];
|
|
21
|
+
gmapsPlaceId: string;
|
|
22
|
+
address: string;
|
|
23
|
+
countryCode: string;
|
|
24
|
+
country: string;
|
|
25
|
+
state: string;
|
|
26
|
+
city: string;
|
|
27
|
+
postcode: string;
|
|
28
|
+
createdByProvider: string;
|
|
29
|
+
subpremise: string | null;
|
|
30
|
+
streetNumber: string;
|
|
31
|
+
route: string;
|
|
32
|
+
organisationId: string;
|
|
33
|
+
replyToEmail: string;
|
|
34
|
+
businessId: string;
|
|
35
|
+
defaultBenefitPayees: string[];
|
|
36
|
+
created: string;
|
|
37
|
+
modified: string;
|
|
38
|
+
locationId: string;
|
|
39
|
+
_links: PracticeLinks;
|
|
40
|
+
}
|
|
41
|
+
export declare type ShortPracticeResponse = {
|
|
42
|
+
tz: string;
|
|
43
|
+
_id: string;
|
|
44
|
+
fullName: string;
|
|
45
|
+
displayName: string;
|
|
46
|
+
mobile: string;
|
|
47
|
+
email: string;
|
|
48
|
+
lnglat: [number, number];
|
|
49
|
+
gmapsPlaceId: string;
|
|
50
|
+
address: string;
|
|
51
|
+
countryCode: string;
|
|
52
|
+
country: string;
|
|
53
|
+
state: string;
|
|
54
|
+
city: string;
|
|
55
|
+
postcode: string;
|
|
56
|
+
subpremise: string | null;
|
|
57
|
+
streetNumber: string;
|
|
58
|
+
route: string;
|
|
59
|
+
mobileE164: string;
|
|
60
|
+
};
|
|
61
|
+
declare type PracticeSettings = {
|
|
62
|
+
appointments: Record<string, any>;
|
|
63
|
+
directory: PracticeSettingsDirectory;
|
|
64
|
+
quotes: PracticeSettingsQuotes;
|
|
65
|
+
};
|
|
66
|
+
declare type PracticeSettingsDirectory = {
|
|
67
|
+
searchEnabled: boolean;
|
|
68
|
+
};
|
|
69
|
+
declare type PracticeSettingsQuotes = {
|
|
70
|
+
memberRequestQuotesEnabled: boolean;
|
|
71
|
+
};
|
|
72
|
+
declare type PracticeBillingAddress = {
|
|
73
|
+
address: string;
|
|
74
|
+
addressLine2?: string;
|
|
75
|
+
city: string;
|
|
76
|
+
postcode: string;
|
|
77
|
+
state: string;
|
|
78
|
+
};
|
|
79
|
+
declare type PracticeBankAccount = {
|
|
80
|
+
accountName: string;
|
|
81
|
+
accountNumber: string;
|
|
82
|
+
bankName: string;
|
|
83
|
+
bsb: string;
|
|
84
|
+
};
|
|
85
|
+
declare type PracticeLinks = {
|
|
86
|
+
self: Links;
|
|
87
|
+
services: Links;
|
|
88
|
+
staff: Links;
|
|
89
|
+
tranasctions: Links;
|
|
90
|
+
};
|
|
91
|
+
declare type Links = {
|
|
92
|
+
read?: string;
|
|
93
|
+
update?: string;
|
|
94
|
+
delete?: string;
|
|
95
|
+
};
|
|
96
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { PaginationMeta, PaginatedQuery } from './index';
|
|
|
2
2
|
/** START: Requests */
|
|
3
3
|
export declare type GetProfessionalCategoriesQuery = PaginatedQuery & {
|
|
4
4
|
searchText?: string;
|
|
5
|
+
professionalCategoryIds?: string;
|
|
5
6
|
};
|
|
6
7
|
/** START: Requests */
|
|
7
8
|
/** START: Responses */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { STAFF_TYPES } from '@medipass/utils/constants';
|
|
2
|
+
export interface ProviderNumberType {
|
|
3
|
+
code: string;
|
|
4
|
+
created: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
fullName: string;
|
|
7
|
+
funderIds: string[];
|
|
8
|
+
modified: string;
|
|
9
|
+
staffType: typeof STAFF_TYPES[keyof typeof STAFF_TYPES];
|
|
10
|
+
_id: string;
|
|
11
|
+
}
|