@medipass/web-sdk 11.50.1-chore-upgrade-react-18.0 → 11.50.1-feature-healthpoint-upload-endpoints.1
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/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-fcff4468.js} +253 -66
- 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 +127 -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,28 +21794,29 @@ 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);
|
|
21643
|
-
professionalCategoryIdsString = uniqueProfessionalCategoryIds.join(',');
|
|
21644
|
-
|
|
21645
|
-
specialtyIdSets = professions.map(function (registration) {
|
|
21818
|
+
professionalCategoryIdsString = uniqueProfessionalCategoryIds.join(',');
|
|
21819
|
+
specialtyIdSets = registration.map(function (registration) {
|
|
21646
21820
|
return registration.specialtyIds;
|
|
21647
21821
|
});
|
|
21648
21822
|
specialtyIds = _flatten(specialtyIdSets);
|
|
@@ -21650,11 +21824,9 @@ function _parseProfessions() {
|
|
|
21650
21824
|
specialtyIdsString = uniqueSpecialtyIds.join(',');
|
|
21651
21825
|
_context.next = 10;
|
|
21652
21826
|
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
21827
|
professionalCategoryIds: professionalCategoryIdsString,
|
|
21655
21828
|
limit: 99
|
|
21656
21829
|
}) : 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
21830
|
specialtyIds: specialtyIdsString,
|
|
21659
21831
|
limit: 99
|
|
21660
21832
|
}) : undefined, providerRegistrationTypes ? providerRegistrationTypes : sdkClient.providerRegistrationTypes.getProviderRegistrationTypes({
|
|
@@ -21666,34 +21838,34 @@ function _parseProfessions() {
|
|
|
21666
21838
|
professionalCategoriesResponse = _yield$Promise$all[0];
|
|
21667
21839
|
specialtiesResponse = _yield$Promise$all[1];
|
|
21668
21840
|
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) {
|
|
21841
|
+
professionalCategoriesMap = professionalCategoriesResponse == null ? void 0 : (_professionalCategori = professionalCategoriesResponse.items) == null ? void 0 : _professionalCategori.reduce(function (currentProfessionalCategories, professionalCategory) {
|
|
21672
21842
|
var _objectSpread2;
|
|
21673
21843
|
|
|
21674
21844
|
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) {
|
|
21845
|
+
}, {});
|
|
21846
|
+
specialtiesMap = specialtiesResponse == null ? void 0 : (_specialtiesResponse$ = specialtiesResponse.items) == null ? void 0 : _specialtiesResponse$.reduce(function (currentSpecialties, specialty) {
|
|
21679
21847
|
var _objectSpread3;
|
|
21680
21848
|
|
|
21681
|
-
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[
|
|
21849
|
+
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[specialty._id] = specialty, _objectSpread3));
|
|
21682
21850
|
}, {});
|
|
21683
|
-
providerRegistrationTypesMap =
|
|
21684
|
-
function (currentProviderType, providerType) {
|
|
21851
|
+
providerRegistrationTypesMap = providerTypesResponse == null ? void 0 : (_providerTypesRespons = providerTypesResponse.items) == null ? void 0 : _providerTypesRespons.reduce(function (currentProviderType, providerType) {
|
|
21685
21852
|
var _objectSpread4;
|
|
21686
21853
|
|
|
21687
21854
|
return _objectSpread$1f({}, currentProviderType, (_objectSpread4 = {}, _objectSpread4[providerType._id] = providerType, _objectSpread4));
|
|
21688
|
-
}, {});
|
|
21689
|
-
|
|
21690
|
-
|
|
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
|
|
21855
|
+
}, {});
|
|
21856
|
+
newProfessions = registration == null ? void 0 : registration.map(function (registration) {
|
|
21857
|
+
var _registration$special;
|
|
21692
21858
|
|
|
21693
|
-
var
|
|
21694
|
-
|
|
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];
|
|
21695
21862
|
});
|
|
21696
|
-
var providerRegistrationType
|
|
21863
|
+
var providerRegistrationType;
|
|
21864
|
+
|
|
21865
|
+
if ('providerRegistrationTypeId' in registration) {
|
|
21866
|
+
providerRegistrationType = providerRegistrationTypesMap[registration == null ? void 0 : registration.providerRegistrationTypeId];
|
|
21867
|
+
}
|
|
21868
|
+
|
|
21697
21869
|
return {
|
|
21698
21870
|
professionalCategory: professionalCategory,
|
|
21699
21871
|
specialties: specialties,
|
|
@@ -22144,18 +22316,17 @@ function ownKeys$1h(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
22144
22316
|
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
22317
|
function parseProviderSet(_x, _x2) {
|
|
22146
22318
|
return _parseProviderSet.apply(this, arguments);
|
|
22147
|
-
}
|
|
22319
|
+
}
|
|
22148
22320
|
|
|
22149
22321
|
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;
|
|
22322
|
+
_parseProviderSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(providerSet, _ref) {
|
|
22323
|
+
var businessId, funders, providerRegistrationTypes, _providerNumberTypes, _ref$parseProviderNum, parseProviderNumberType, fetchPractices, fetchProviderNumberTypes, _yield$Promise$all, fundersResponse, practicesResponse, providerRegistrations, providerNumberTypesResponse, fundersMap, practicesMap, providerNumberTypesMap, newProviderSet;
|
|
22153
22324
|
|
|
22154
22325
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
22155
22326
|
while (1) {
|
|
22156
22327
|
switch (_context3.prev = _context3.next) {
|
|
22157
22328
|
case 0:
|
|
22158
|
-
|
|
22329
|
+
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
22330
|
|
|
22160
22331
|
fetchPractices = /*#__PURE__*/function () {
|
|
22161
22332
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -22164,21 +22335,24 @@ function _parseProviderSet() {
|
|
|
22164
22335
|
while (1) {
|
|
22165
22336
|
switch (_context.prev = _context.next) {
|
|
22166
22337
|
case 0:
|
|
22167
|
-
|
|
22168
|
-
|
|
22169
|
-
|
|
22338
|
+
practiceIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
|
|
22339
|
+
if ('practiceId' in providerData) {
|
|
22340
|
+
return providerData == null ? void 0 : providerData.practiceId;
|
|
22341
|
+
}
|
|
22342
|
+
|
|
22343
|
+
return undefined;
|
|
22344
|
+
});
|
|
22345
|
+
uniquePracticeIds = _uniq(practiceIds).filter(Boolean).filter(function (practiceId) {
|
|
22346
|
+
return !!practiceId;
|
|
22170
22347
|
});
|
|
22171
|
-
uniquePracticeIds = _uniq(practiceIds).filter(Boolean);
|
|
22172
22348
|
practices = [];
|
|
22173
22349
|
_context.next = 5;
|
|
22174
22350
|
return Promise.all(uniquePracticeIds.map(function (practiceId) {
|
|
22175
|
-
return (
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
})
|
|
22181
|
-
);
|
|
22351
|
+
return sdkClient.practices.getBusinessPractice(businessId, practiceId).catch(function () {
|
|
22352
|
+
return {
|
|
22353
|
+
_id: practiceId
|
|
22354
|
+
};
|
|
22355
|
+
});
|
|
22182
22356
|
}));
|
|
22183
22357
|
|
|
22184
22358
|
case 5:
|
|
@@ -22213,16 +22387,19 @@ function _parseProviderSet() {
|
|
|
22213
22387
|
return _context2.abrupt("return", _providerNumberTypes);
|
|
22214
22388
|
|
|
22215
22389
|
case 2:
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22390
|
+
providerNumberTypeIds = providerSet == null ? void 0 : providerSet.map(function (providerData) {
|
|
22391
|
+
if ('providerNumberTypeId' in providerData) {
|
|
22392
|
+
return providerData == null ? void 0 : providerData.providerNumberTypeId;
|
|
22393
|
+
}
|
|
22394
|
+
|
|
22395
|
+
return undefined;
|
|
22396
|
+
});
|
|
22397
|
+
uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean).filter(function (providerNumberTypeId) {
|
|
22398
|
+
return !!providerNumberTypeId;
|
|
22219
22399
|
});
|
|
22220
|
-
uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean);
|
|
22221
22400
|
_context2.next = 6;
|
|
22222
22401
|
return Promise.all(uniqueProviderNumberTypeIds.map(function (providerNumberTypeId) {
|
|
22223
|
-
return (
|
|
22224
|
-
sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId)
|
|
22225
|
-
);
|
|
22402
|
+
return sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId);
|
|
22226
22403
|
}));
|
|
22227
22404
|
|
|
22228
22405
|
case 6:
|
|
@@ -22254,8 +22431,7 @@ function _parseProviderSet() {
|
|
|
22254
22431
|
practicesResponse = _yield$Promise$all[1];
|
|
22255
22432
|
providerRegistrations = _yield$Promise$all[2];
|
|
22256
22433
|
providerNumberTypesResponse = _yield$Promise$all[3];
|
|
22257
|
-
fundersMap = fundersResponse.reduce(
|
|
22258
|
-
function (currentFunders, funder) {
|
|
22434
|
+
fundersMap = fundersResponse.reduce(function (currentFunders, funder) {
|
|
22259
22435
|
var _objectSpread2;
|
|
22260
22436
|
|
|
22261
22437
|
return _objectSpread$1h({}, currentFunders, (_objectSpread2 = {}, _objectSpread2[funder._id] = funder, _objectSpread2));
|
|
@@ -22265,21 +22441,25 @@ function _parseProviderSet() {
|
|
|
22265
22441
|
|
|
22266
22442
|
return _objectSpread$1h({}, currentPractices, (_objectSpread3 = {}, _objectSpread3[practice._id] = practice, _objectSpread3));
|
|
22267
22443
|
}, {});
|
|
22268
|
-
providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce(
|
|
22269
|
-
function (currentProviderNumberTypes, providerNumberType) {
|
|
22444
|
+
providerNumberTypesMap = providerNumberTypesResponse == null ? void 0 : providerNumberTypesResponse.reduce(function (currentProviderNumberTypes, providerNumberType) {
|
|
22270
22445
|
var _objectSpread4;
|
|
22271
22446
|
|
|
22272
22447
|
return _objectSpread$1h({}, currentProviderNumberTypes, (_objectSpread4 = {}, _objectSpread4[providerNumberType._id] = providerNumberType, _objectSpread4));
|
|
22273
|
-
}, {});
|
|
22274
|
-
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
practice:
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22448
|
+
}, {});
|
|
22449
|
+
newProviderSet = providerSet == null ? void 0 : providerSet.map(function (providerData, i) {
|
|
22450
|
+
return _objectSpread$1h({}, providerData, {}, providerRegistrations == null ? void 0 : providerRegistrations[i], {}, 'practiceId' in providerData ? {
|
|
22451
|
+
practice: practicesMap[providerData == null ? void 0 : providerData.practiceId]
|
|
22452
|
+
} : {
|
|
22453
|
+
practice: undefined
|
|
22454
|
+
}, {}, 'funderId' in providerData ? {
|
|
22455
|
+
funder: fundersMap[providerData == null ? void 0 : providerData.funderId]
|
|
22456
|
+
} : {
|
|
22457
|
+
funder: undefined
|
|
22458
|
+
}, {}, parseProviderNumberType && _objectSpread$1h({}, 'providerNumberTypeId' in providerData ? {
|
|
22459
|
+
providerNumberType: providerData != null && providerData.providerNumberTypeId ? providerNumberTypesMap[providerData == null ? void 0 : providerData.providerNumberTypeId] : undefined
|
|
22460
|
+
} : {
|
|
22461
|
+
providerNumberType: undefined
|
|
22462
|
+
}));
|
|
22283
22463
|
});
|
|
22284
22464
|
return _context3.abrupt("return", newProviderSet);
|
|
22285
22465
|
|
|
@@ -22549,6 +22729,7 @@ exports.getAction = getAction;
|
|
|
22549
22729
|
exports.getActions = getActions;
|
|
22550
22730
|
exports.getApplication = getApplication;
|
|
22551
22731
|
exports.getApplications = getApplications;
|
|
22732
|
+
exports.getAttachmentUrl = getAttachmentUrl;
|
|
22552
22733
|
exports.getBlacklistedBankAccounts = getBlacklistedBankAccounts;
|
|
22553
22734
|
exports.getBsbDetails = getBsbDetails;
|
|
22554
22735
|
exports.getBulkUpload = getBulkUpload;
|
|
@@ -22617,6 +22798,7 @@ exports.getBusinessProducts = getBusinessProducts;
|
|
|
22617
22798
|
exports.getBusinessProfessionalCategories = getBusinessProfessionalCategories;
|
|
22618
22799
|
exports.getBusinessRNA = getBusinessRNA;
|
|
22619
22800
|
exports.getBusinessRNAs = getBusinessRNAs;
|
|
22801
|
+
exports.getBusinessS3SignedUrl = getBusinessS3SignedUrl;
|
|
22620
22802
|
exports.getBusinessSalesClientToken = getBusinessSalesClientToken;
|
|
22621
22803
|
exports.getBusinessService = getBusinessService;
|
|
22622
22804
|
exports.getBusinessServiceStaffMembers = getBusinessServiceStaffMembers;
|
|
@@ -22866,6 +23048,8 @@ exports.pathFunderValues = pathFunderValues;
|
|
|
22866
23048
|
exports.pathFunderValuesById = pathFunderValuesById;
|
|
22867
23049
|
exports.pathFuture = pathFuture;
|
|
22868
23050
|
exports.pathGetAbr = pathGetAbr;
|
|
23051
|
+
exports.pathGetAttachmentUrl = pathGetAttachmentUrl;
|
|
23052
|
+
exports.pathGetBusinessS3SignedUrl = pathGetBusinessS3SignedUrl;
|
|
22869
23053
|
exports.pathGetClaimAttachmentUrl = pathGetClaimAttachmentUrl;
|
|
22870
23054
|
exports.pathGetDraftProgressStatus = pathGetDraftProgressStatus;
|
|
22871
23055
|
exports.pathGetHealthFundTransactionExport = pathGetHealthFundTransactionExport;
|
|
@@ -22932,6 +23116,7 @@ exports.pathRequestVerificationSupport = pathRequestVerificationSupport;
|
|
|
22932
23116
|
exports.pathResetTerminal = pathResetTerminal;
|
|
22933
23117
|
exports.pathResumeComplexVerification = pathResumeComplexVerification;
|
|
22934
23118
|
exports.pathScanClaimFile = pathScanClaimFile;
|
|
23119
|
+
exports.pathScanFile = pathScanFile;
|
|
22935
23120
|
exports.pathSendReceipt = pathSendReceipt;
|
|
22936
23121
|
exports.pathSendWorkerMessage = pathSendWorkerMessage;
|
|
22937
23122
|
exports.pathSignUp = pathSignUp;
|
|
@@ -23005,6 +23190,7 @@ exports.saveDraft = saveDraft;
|
|
|
23005
23190
|
exports.saveDraftEclipseInPatientInvoice = saveDraftEclipseInPatientInvoice;
|
|
23006
23191
|
exports.saveDraftEclipseOverseasInvoice = saveDraftEclipseOverseasInvoice;
|
|
23007
23192
|
exports.scanClaimFile = scanClaimFile;
|
|
23193
|
+
exports.scanFile = scanFile;
|
|
23008
23194
|
exports.scoreAndSaveTransaction = scoreAndSaveTransaction;
|
|
23009
23195
|
exports.sdk = sdkClient;
|
|
23010
23196
|
exports.sdkClient = sdkClient;
|
|
@@ -23097,6 +23283,7 @@ exports.updateService = updateService;
|
|
|
23097
23283
|
exports.updateStaffProviderSetItem = updateStaffProviderSetItem;
|
|
23098
23284
|
exports.updateTerminal = updateTerminal;
|
|
23099
23285
|
exports.updateTransaction = updateTransaction;
|
|
23286
|
+
exports.uploadAttachmentToS3 = uploadAttachmentToS3;
|
|
23100
23287
|
exports.uploadBulkUploadCSVToS3 = uploadBulkUploadCSVToS3;
|
|
23101
23288
|
exports.uploadBusinessPracticeImageToS3 = uploadBusinessPracticeImageToS3;
|
|
23102
23289
|
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 */
|