@medipass/web-sdk 11.49.4-feature-tailwind-migration-heading-component.0 → 11.49.4-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-97eddb5e.js → staff-76b1e016.js} +218 -31
- 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-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 +6 -0
- package/lib/types/provider-registration.js +2 -0
- package/lib/types/provider-set-item.d.ts +53 -0
- package/lib/types/provider-set-item.js +2 -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 +8 -3
- package/lib/utils/professions.js +1 -1
- package/lib/utils/request.js +1 -1
- package/lib/utils/staff.d.ts +42 -8
- package/lib/utils/staff.js +1 -1
- package/package.json +3 -3
|
@@ -1784,6 +1784,15 @@ var pathGetS3SignedUrl = function pathGetS3SignedUrl(businessId, practiceId, sta
|
|
|
1784
1784
|
var pathScanClaimFile = function pathScanClaimFile(businessId, practiceId, staffId) {
|
|
1785
1785
|
return "/businesses/" + businessId + "/practices/" + practiceId + "/staff/" + staffId + "/attachments/virusscan";
|
|
1786
1786
|
};
|
|
1787
|
+
var pathScanFile = function pathScanFile(businessId) {
|
|
1788
|
+
return "/businesses/" + businessId + "/attachments/virusscan";
|
|
1789
|
+
};
|
|
1790
|
+
var pathGetAttachmentUrl = function pathGetAttachmentUrl(businessId) {
|
|
1791
|
+
return "/businesses/" + businessId + "/attachments/uploadurl";
|
|
1792
|
+
};
|
|
1793
|
+
var pathGetBusinessS3SignedUrl = function pathGetBusinessS3SignedUrl(businessId, s3SignedUrlId) {
|
|
1794
|
+
return "/businesses/" + businessId + "/attachments/s3signedurls/" + s3SignedUrlId;
|
|
1795
|
+
};
|
|
1787
1796
|
/**
|
|
1788
1797
|
* Get url to upload a file associated to a claim
|
|
1789
1798
|
* @param {String} businessId - Business ID
|
|
@@ -1865,14 +1874,88 @@ var getS3SignedUrl = function getS3SignedUrl(businessId, practiceId, staffId, s3
|
|
|
1865
1874
|
});
|
|
1866
1875
|
};
|
|
1867
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* Scan a file
|
|
1879
|
+
* @param {String} businessId - Business ID
|
|
1880
|
+
* @param {Object} body - Request body
|
|
1881
|
+
* @param {Object} opts - Additional options
|
|
1882
|
+
*/
|
|
1883
|
+
var scanFile = function scanFile(businessId, body, opts) {
|
|
1884
|
+
if (opts === void 0) {
|
|
1885
|
+
opts = {};
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
doesParamExist.default({
|
|
1889
|
+
businessId: businessId
|
|
1890
|
+
}, opts.hyperMediaEndpoint);
|
|
1891
|
+
return request(_objectSpread$5({}, opts, {
|
|
1892
|
+
path: pathScanFile(businessId)
|
|
1893
|
+
}), {
|
|
1894
|
+
method: 'post',
|
|
1895
|
+
data: body
|
|
1896
|
+
});
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
/**
|
|
1900
|
+
* Get url to upload a file
|
|
1901
|
+
* @param {String} businessId - Business ID
|
|
1902
|
+
* @param {Object} query - Query
|
|
1903
|
+
* @param {Object} opts - Additional options
|
|
1904
|
+
*/
|
|
1905
|
+
var getAttachmentUrl = function getAttachmentUrl(businessId, query, opts) {
|
|
1906
|
+
if (opts === void 0) {
|
|
1907
|
+
opts = {};
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
doesParamExist.default({
|
|
1911
|
+
businessId: businessId
|
|
1912
|
+
}, opts.hyperMediaEndpoint);
|
|
1913
|
+
return request(_objectSpread$5({}, opts, {
|
|
1914
|
+
path: pathGetAttachmentUrl(businessId)
|
|
1915
|
+
}), {
|
|
1916
|
+
method: 'get',
|
|
1917
|
+
params: query
|
|
1918
|
+
});
|
|
1919
|
+
};
|
|
1920
|
+
/**
|
|
1921
|
+
* Get a business' s3 signed url
|
|
1922
|
+
* @param {String} businessId - Business ID
|
|
1923
|
+
* @param {String} s3SignedUrlId - Internal s3 signed url ID
|
|
1924
|
+
* @param {Object} query - Request query
|
|
1925
|
+
* @param {Object} opts - Additional options
|
|
1926
|
+
*/
|
|
1927
|
+
|
|
1928
|
+
var getBusinessS3SignedUrl = function getBusinessS3SignedUrl(businessId, s3SignedUrlId, query, opts) {
|
|
1929
|
+
if (opts === void 0) {
|
|
1930
|
+
opts = {};
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
doesParamExist.default({
|
|
1934
|
+
businessId: businessId,
|
|
1935
|
+
s3SignedUrlId: s3SignedUrlId
|
|
1936
|
+
}, opts.hyperMediaEndpoint);
|
|
1937
|
+
return request(_objectSpread$5({}, opts, {
|
|
1938
|
+
path: pathGetBusinessS3SignedUrl(businessId, s3SignedUrlId)
|
|
1939
|
+
}), {
|
|
1940
|
+
method: 'get',
|
|
1941
|
+
params: query
|
|
1942
|
+
});
|
|
1943
|
+
};
|
|
1944
|
+
|
|
1868
1945
|
var attachments = /*#__PURE__*/Object.freeze({
|
|
1869
1946
|
__proto__: null,
|
|
1870
1947
|
pathGetClaimAttachmentUrl: pathGetClaimAttachmentUrl,
|
|
1871
1948
|
pathGetS3SignedUrl: pathGetS3SignedUrl,
|
|
1872
1949
|
pathScanClaimFile: pathScanClaimFile,
|
|
1950
|
+
pathScanFile: pathScanFile,
|
|
1951
|
+
pathGetAttachmentUrl: pathGetAttachmentUrl,
|
|
1952
|
+
pathGetBusinessS3SignedUrl: pathGetBusinessS3SignedUrl,
|
|
1873
1953
|
getClaimAttachmentUrl: getClaimAttachmentUrl,
|
|
1874
1954
|
scanClaimFile: scanClaimFile,
|
|
1875
|
-
getS3SignedUrl: getS3SignedUrl
|
|
1955
|
+
getS3SignedUrl: getS3SignedUrl,
|
|
1956
|
+
scanFile: scanFile,
|
|
1957
|
+
getAttachmentUrl: getAttachmentUrl,
|
|
1958
|
+
getBusinessS3SignedUrl: getBusinessS3SignedUrl
|
|
1876
1959
|
});
|
|
1877
1960
|
|
|
1878
1961
|
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; }
|
|
@@ -21189,6 +21272,95 @@ var uploadKycTrustDocumentToS3 = /*#__PURE__*/function () {
|
|
|
21189
21272
|
return _ref8.apply(this, arguments);
|
|
21190
21273
|
};
|
|
21191
21274
|
}();
|
|
21275
|
+
/**
|
|
21276
|
+
* Upload attachment to S3
|
|
21277
|
+
* @param {String} businessId - Business ID
|
|
21278
|
+
* @param {String} healthFundId - Health fund ID
|
|
21279
|
+
* @param {File} file - File
|
|
21280
|
+
*/
|
|
21281
|
+
|
|
21282
|
+
var uploadAttachmentToS3 = /*#__PURE__*/function () {
|
|
21283
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(businessId, healthFundId, file, opts) {
|
|
21284
|
+
var awsAxios, _yield$getAttachmentU, signedPost, s3Url, s3SignedUrlId, bodyFormData, key;
|
|
21285
|
+
|
|
21286
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
21287
|
+
while (1) {
|
|
21288
|
+
switch (_context9.prev = _context9.next) {
|
|
21289
|
+
case 0:
|
|
21290
|
+
awsAxios = axios.create();
|
|
21291
|
+
|
|
21292
|
+
if (businessId) {
|
|
21293
|
+
_context9.next = 3;
|
|
21294
|
+
break;
|
|
21295
|
+
}
|
|
21296
|
+
|
|
21297
|
+
throw new paramError.default('businessId');
|
|
21298
|
+
|
|
21299
|
+
case 3:
|
|
21300
|
+
if (healthFundId) {
|
|
21301
|
+
_context9.next = 5;
|
|
21302
|
+
break;
|
|
21303
|
+
}
|
|
21304
|
+
|
|
21305
|
+
throw new paramError.default('healthFundId');
|
|
21306
|
+
|
|
21307
|
+
case 5:
|
|
21308
|
+
if (file) {
|
|
21309
|
+
_context9.next = 7;
|
|
21310
|
+
break;
|
|
21311
|
+
}
|
|
21312
|
+
|
|
21313
|
+
throw new paramError.default('file');
|
|
21314
|
+
|
|
21315
|
+
case 7:
|
|
21316
|
+
_context9.prev = 7;
|
|
21317
|
+
_context9.next = 10;
|
|
21318
|
+
return getAttachmentUrl(businessId, {
|
|
21319
|
+
contentType: file.type,
|
|
21320
|
+
fileName: file.name,
|
|
21321
|
+
healthFundId: healthFundId,
|
|
21322
|
+
contentLength: file.size
|
|
21323
|
+
}, opts);
|
|
21324
|
+
|
|
21325
|
+
case 10:
|
|
21326
|
+
_yield$getAttachmentU = _context9.sent;
|
|
21327
|
+
signedPost = _yield$getAttachmentU.signedPost;
|
|
21328
|
+
s3Url = _yield$getAttachmentU.s3Url;
|
|
21329
|
+
s3SignedUrlId = _yield$getAttachmentU.s3SignedUrlId;
|
|
21330
|
+
// eslint-disable-next-line
|
|
21331
|
+
bodyFormData = new FormData();
|
|
21332
|
+
|
|
21333
|
+
for (key in signedPost.fields) {
|
|
21334
|
+
bodyFormData.append(key, signedPost.fields[key]);
|
|
21335
|
+
}
|
|
21336
|
+
|
|
21337
|
+
bodyFormData.append('file', file);
|
|
21338
|
+
_context9.next = 19;
|
|
21339
|
+
return awsAxios.post(signedPost.url, bodyFormData);
|
|
21340
|
+
|
|
21341
|
+
case 19:
|
|
21342
|
+
return _context9.abrupt("return", {
|
|
21343
|
+
s3Url: s3Url,
|
|
21344
|
+
s3SignedUrlId: s3SignedUrlId
|
|
21345
|
+
});
|
|
21346
|
+
|
|
21347
|
+
case 22:
|
|
21348
|
+
_context9.prev = 22;
|
|
21349
|
+
_context9.t0 = _context9["catch"](7);
|
|
21350
|
+
throw _context9.t0;
|
|
21351
|
+
|
|
21352
|
+
case 25:
|
|
21353
|
+
case "end":
|
|
21354
|
+
return _context9.stop();
|
|
21355
|
+
}
|
|
21356
|
+
}
|
|
21357
|
+
}, _callee9, null, [[7, 22]]);
|
|
21358
|
+
}));
|
|
21359
|
+
|
|
21360
|
+
return function uploadAttachmentToS3(_x30, _x31, _x32, _x33) {
|
|
21361
|
+
return _ref9.apply(this, arguments);
|
|
21362
|
+
};
|
|
21363
|
+
}();
|
|
21192
21364
|
|
|
21193
21365
|
var aws = /*#__PURE__*/Object.freeze({
|
|
21194
21366
|
__proto__: null,
|
|
@@ -21199,7 +21371,8 @@ var aws = /*#__PURE__*/Object.freeze({
|
|
|
21199
21371
|
uploadBusinessStaffMemberImageToS3: uploadBusinessStaffMemberImageToS3,
|
|
21200
21372
|
uploadInvoiceScanToS3: uploadInvoiceScanToS3,
|
|
21201
21373
|
uploadBulkUploadCSVToS3: uploadBulkUploadCSVToS3,
|
|
21202
|
-
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3
|
|
21374
|
+
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3,
|
|
21375
|
+
uploadAttachmentToS3: uploadAttachmentToS3
|
|
21203
21376
|
});
|
|
21204
21377
|
|
|
21205
21378
|
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; }
|
|
@@ -21467,26 +21640,29 @@ var applicationUtils = /*#__PURE__*/Object.freeze({
|
|
|
21467
21640
|
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; }
|
|
21468
21641
|
|
|
21469
21642
|
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; }
|
|
21470
|
-
|
|
21471
21643
|
function parseProfessions(_x, _x2) {
|
|
21472
21644
|
return _parseProfessions.apply(this, arguments);
|
|
21473
21645
|
}
|
|
21474
21646
|
|
|
21475
21647
|
function _parseProfessions() {
|
|
21476
|
-
_parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(
|
|
21648
|
+
_parseProfessions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(registration, _temp) {
|
|
21649
|
+
var _professionalCategori, _specialtiesResponse$, _providerTypesRespons;
|
|
21650
|
+
|
|
21477
21651
|
var _ref, providerRegistrationTypes, professionalCategoryIds, uniqueProfessionalCategoryIds, professionalCategoryIdsString, specialtyIdSets, specialtyIds, uniqueSpecialtyIds, specialtyIdsString, _yield$Promise$all, professionalCategoriesResponse, specialtiesResponse, providerTypesResponse, professionalCategoriesMap, specialtiesMap, providerRegistrationTypesMap, newProfessions;
|
|
21478
21652
|
|
|
21479
21653
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
21480
21654
|
while (1) {
|
|
21481
21655
|
switch (_context.prev = _context.next) {
|
|
21482
21656
|
case 0:
|
|
21483
|
-
_ref = _temp === void 0 ? {
|
|
21484
|
-
|
|
21657
|
+
_ref = _temp === void 0 ? {
|
|
21658
|
+
providerRegistrationTypes: undefined
|
|
21659
|
+
} : _temp, providerRegistrationTypes = _ref.providerRegistrationTypes;
|
|
21660
|
+
professionalCategoryIds = registration.map(function (registration) {
|
|
21485
21661
|
return registration.professionalCategoryId;
|
|
21486
21662
|
});
|
|
21487
21663
|
uniqueProfessionalCategoryIds = _uniq(professionalCategoryIds).filter(Boolean);
|
|
21488
21664
|
professionalCategoryIdsString = uniqueProfessionalCategoryIds.join(',');
|
|
21489
|
-
specialtyIdSets =
|
|
21665
|
+
specialtyIdSets = registration.map(function (registration) {
|
|
21490
21666
|
return registration.specialtyIds;
|
|
21491
21667
|
});
|
|
21492
21668
|
specialtyIds = _flatten(specialtyIdSets);
|
|
@@ -21510,29 +21686,28 @@ function _parseProfessions() {
|
|
|
21510
21686
|
professionalCategoriesResponse = _yield$Promise$all[0];
|
|
21511
21687
|
specialtiesResponse = _yield$Promise$all[1];
|
|
21512
21688
|
providerTypesResponse = _yield$Promise$all[2];
|
|
21513
|
-
professionalCategoriesMap =
|
|
21689
|
+
professionalCategoriesMap = professionalCategoriesResponse == null ? void 0 : (_professionalCategori = professionalCategoriesResponse.items) == null ? void 0 : _professionalCategori.reduce(function (currentProfessionalCategories, professionalCategory) {
|
|
21514
21690
|
var _objectSpread2;
|
|
21515
21691
|
|
|
21516
21692
|
return _objectSpread$1f({}, currentProfessionalCategories, (_objectSpread2 = {}, _objectSpread2[professionalCategory._id] = professionalCategory, _objectSpread2));
|
|
21517
|
-
},
|
|
21518
|
-
{
|
|
21519
|
-
specialtiesMap = _get(specialtiesResponse, 'items', []).reduce(function (currentSpecialties, professionalCategory) {
|
|
21693
|
+
}, {});
|
|
21694
|
+
specialtiesMap = specialtiesResponse == null ? void 0 : (_specialtiesResponse$ = specialtiesResponse.items) == null ? void 0 : _specialtiesResponse$.reduce(function (currentSpecialties, specialty) {
|
|
21520
21695
|
var _objectSpread3;
|
|
21521
21696
|
|
|
21522
|
-
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[
|
|
21523
|
-
},
|
|
21524
|
-
{
|
|
21525
|
-
providerRegistrationTypesMap = _get(providerTypesResponse, 'items', []).reduce(function (currentProviderType, providerType) {
|
|
21697
|
+
return _objectSpread$1f({}, currentSpecialties, (_objectSpread3 = {}, _objectSpread3[specialty._id] = specialty, _objectSpread3));
|
|
21698
|
+
}, {});
|
|
21699
|
+
providerRegistrationTypesMap = providerTypesResponse == null ? void 0 : (_providerTypesRespons = providerTypesResponse.items) == null ? void 0 : _providerTypesRespons.reduce(function (currentProviderType, providerType) {
|
|
21526
21700
|
var _objectSpread4;
|
|
21527
21701
|
|
|
21528
21702
|
return _objectSpread$1f({}, currentProviderType, (_objectSpread4 = {}, _objectSpread4[providerType._id] = providerType, _objectSpread4));
|
|
21529
21703
|
}, {});
|
|
21530
|
-
newProfessions =
|
|
21704
|
+
newProfessions = registration == null ? void 0 : registration.map(function (registration) {
|
|
21531
21705
|
var professionalCategory = professionalCategoriesMap[registration.professionalCategoryId];
|
|
21532
21706
|
var specialties = registration.specialtyIds.map(function (specialtyId) {
|
|
21533
21707
|
return specialtiesMap[specialtyId];
|
|
21534
|
-
});
|
|
21535
|
-
|
|
21708
|
+
}); // @ts-expect-error
|
|
21709
|
+
|
|
21710
|
+
var providerRegistrationType = providerRegistrationTypesMap[registration == null ? void 0 : registration.providerRegistrationTypeId];
|
|
21536
21711
|
return {
|
|
21537
21712
|
professionalCategory: professionalCategory,
|
|
21538
21713
|
specialties: specialties,
|
|
@@ -21978,7 +22153,13 @@ function _parseProviderSet() {
|
|
|
21978
22153
|
while (1) {
|
|
21979
22154
|
switch (_context3.prev = _context3.next) {
|
|
21980
22155
|
case 0:
|
|
21981
|
-
_ref = _temp === void 0 ? {
|
|
22156
|
+
_ref = _temp === void 0 ? {
|
|
22157
|
+
businessId: undefined,
|
|
22158
|
+
funders: undefined,
|
|
22159
|
+
providerRegistrationTypes: undefined,
|
|
22160
|
+
providerNumberTypes: undefined,
|
|
22161
|
+
parseProviderNumberType: false
|
|
22162
|
+
} : _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;
|
|
21982
22163
|
|
|
21983
22164
|
fetchPractices = /*#__PURE__*/function () {
|
|
21984
22165
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -21994,13 +22175,11 @@ function _parseProviderSet() {
|
|
|
21994
22175
|
practices = [];
|
|
21995
22176
|
_context.next = 5;
|
|
21996
22177
|
return Promise.all(uniquePracticeIds.map(function (practiceId) {
|
|
21997
|
-
return (
|
|
21998
|
-
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
22002
|
-
})
|
|
22003
|
-
);
|
|
22178
|
+
return sdkClient.practices.getBusinessPractice(businessId, practiceId).catch(function () {
|
|
22179
|
+
return {
|
|
22180
|
+
_id: practiceId
|
|
22181
|
+
};
|
|
22182
|
+
});
|
|
22004
22183
|
}));
|
|
22005
22184
|
|
|
22006
22185
|
case 5:
|
|
@@ -22041,9 +22220,7 @@ function _parseProviderSet() {
|
|
|
22041
22220
|
uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean);
|
|
22042
22221
|
_context2.next = 6;
|
|
22043
22222
|
return Promise.all(uniqueProviderNumberTypeIds.map(function (providerNumberTypeId) {
|
|
22044
|
-
return (
|
|
22045
|
-
sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId)
|
|
22046
|
-
);
|
|
22223
|
+
return sdkClient.providerNumberTypes.getProviderNumberType(providerNumberTypeId);
|
|
22047
22224
|
}));
|
|
22048
22225
|
|
|
22049
22226
|
case 6:
|
|
@@ -22092,9 +22269,12 @@ function _parseProviderSet() {
|
|
|
22092
22269
|
}, {});
|
|
22093
22270
|
newProviderSet = providerSet.map(function (providerData, i) {
|
|
22094
22271
|
return _objectSpread$1h({}, providerData, {}, providerRegistrations[i], {
|
|
22095
|
-
|
|
22096
|
-
|
|
22272
|
+
// @ts-expect-error
|
|
22273
|
+
practice: practicesMap[providerData == null ? void 0 : providerData.practiceId],
|
|
22274
|
+
// @ts-expect-error
|
|
22275
|
+
funder: fundersMap[providerData == null ? void 0 : providerData.funderId]
|
|
22097
22276
|
}, parseProviderNumberType && {
|
|
22277
|
+
// @ts-expect-error
|
|
22098
22278
|
providerNumberType: providerNumberTypesMap == null ? void 0 : providerNumberTypesMap[providerData == null ? void 0 : providerData.providerNumberTypeId]
|
|
22099
22279
|
});
|
|
22100
22280
|
});
|
|
@@ -22366,6 +22546,7 @@ exports.getAction = getAction;
|
|
|
22366
22546
|
exports.getActions = getActions;
|
|
22367
22547
|
exports.getApplication = getApplication;
|
|
22368
22548
|
exports.getApplications = getApplications;
|
|
22549
|
+
exports.getAttachmentUrl = getAttachmentUrl;
|
|
22369
22550
|
exports.getBlacklistedBankAccounts = getBlacklistedBankAccounts;
|
|
22370
22551
|
exports.getBsbDetails = getBsbDetails;
|
|
22371
22552
|
exports.getBulkUpload = getBulkUpload;
|
|
@@ -22434,6 +22615,7 @@ exports.getBusinessProducts = getBusinessProducts;
|
|
|
22434
22615
|
exports.getBusinessProfessionalCategories = getBusinessProfessionalCategories;
|
|
22435
22616
|
exports.getBusinessRNA = getBusinessRNA;
|
|
22436
22617
|
exports.getBusinessRNAs = getBusinessRNAs;
|
|
22618
|
+
exports.getBusinessS3SignedUrl = getBusinessS3SignedUrl;
|
|
22437
22619
|
exports.getBusinessSalesClientToken = getBusinessSalesClientToken;
|
|
22438
22620
|
exports.getBusinessService = getBusinessService;
|
|
22439
22621
|
exports.getBusinessServiceStaffMembers = getBusinessServiceStaffMembers;
|
|
@@ -22683,6 +22865,8 @@ exports.pathFunderValues = pathFunderValues;
|
|
|
22683
22865
|
exports.pathFunderValuesById = pathFunderValuesById;
|
|
22684
22866
|
exports.pathFuture = pathFuture;
|
|
22685
22867
|
exports.pathGetAbr = pathGetAbr;
|
|
22868
|
+
exports.pathGetAttachmentUrl = pathGetAttachmentUrl;
|
|
22869
|
+
exports.pathGetBusinessS3SignedUrl = pathGetBusinessS3SignedUrl;
|
|
22686
22870
|
exports.pathGetClaimAttachmentUrl = pathGetClaimAttachmentUrl;
|
|
22687
22871
|
exports.pathGetDraftProgressStatus = pathGetDraftProgressStatus;
|
|
22688
22872
|
exports.pathGetHealthFundTransactionExport = pathGetHealthFundTransactionExport;
|
|
@@ -22749,6 +22933,7 @@ exports.pathRequestVerificationSupport = pathRequestVerificationSupport;
|
|
|
22749
22933
|
exports.pathResetTerminal = pathResetTerminal;
|
|
22750
22934
|
exports.pathResumeComplexVerification = pathResumeComplexVerification;
|
|
22751
22935
|
exports.pathScanClaimFile = pathScanClaimFile;
|
|
22936
|
+
exports.pathScanFile = pathScanFile;
|
|
22752
22937
|
exports.pathSendReceipt = pathSendReceipt;
|
|
22753
22938
|
exports.pathSendWorkerMessage = pathSendWorkerMessage;
|
|
22754
22939
|
exports.pathSignUp = pathSignUp;
|
|
@@ -22822,6 +23007,7 @@ exports.saveDraft = saveDraft;
|
|
|
22822
23007
|
exports.saveDraftEclipseInPatientInvoice = saveDraftEclipseInPatientInvoice;
|
|
22823
23008
|
exports.saveDraftEclipseOverseasInvoice = saveDraftEclipseOverseasInvoice;
|
|
22824
23009
|
exports.scanClaimFile = scanClaimFile;
|
|
23010
|
+
exports.scanFile = scanFile;
|
|
22825
23011
|
exports.scoreAndSaveTransaction = scoreAndSaveTransaction;
|
|
22826
23012
|
exports.sdk = sdkClient;
|
|
22827
23013
|
exports.sdkClient = sdkClient;
|
|
@@ -22914,6 +23100,7 @@ exports.updateService = updateService;
|
|
|
22914
23100
|
exports.updateStaffProviderSetItem = updateStaffProviderSetItem;
|
|
22915
23101
|
exports.updateTerminal = updateTerminal;
|
|
22916
23102
|
exports.updateTransaction = updateTransaction;
|
|
23103
|
+
exports.uploadAttachmentToS3 = uploadAttachmentToS3;
|
|
22917
23104
|
exports.uploadBulkUploadCSVToS3 = uploadBulkUploadCSVToS3;
|
|
22918
23105
|
exports.uploadBusinessPracticeImageToS3 = uploadBusinessPracticeImageToS3;
|
|
22919
23106
|
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 {};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Funder } from './funder';
|
|
2
|
+
import type { Practice } from './practice';
|
|
3
|
+
import type { ProfessionalCategory } from './professional-category';
|
|
4
|
+
import type { Specialty } from './specialty';
|
|
5
|
+
export interface ParsedProviderSetItem {
|
|
6
|
+
created: string;
|
|
7
|
+
funder: Funder;
|
|
8
|
+
funderId: string;
|
|
9
|
+
healthFundOverrides?: [];
|
|
10
|
+
hicaps?: HicapsProviderSetAttributes;
|
|
11
|
+
medipassProviderNumber?: string;
|
|
12
|
+
practice: Practice;
|
|
13
|
+
practiceId: string;
|
|
14
|
+
professionalCategory: ProfessionalCategory;
|
|
15
|
+
professionalCategoryId: string;
|
|
16
|
+
providerNumber: string;
|
|
17
|
+
specialties: Specialty[];
|
|
18
|
+
specialtyIds: string[];
|
|
19
|
+
status: string;
|
|
20
|
+
statusHistory: [];
|
|
21
|
+
_id: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ProviderSetItem {
|
|
24
|
+
created: string;
|
|
25
|
+
funderId: string;
|
|
26
|
+
healthFundOverrides: string[];
|
|
27
|
+
practiceId: string;
|
|
28
|
+
professionalCategoryId: string;
|
|
29
|
+
providerNumber: string;
|
|
30
|
+
providerNumberTypeId?: string;
|
|
31
|
+
specialtyIds: string[];
|
|
32
|
+
status: string;
|
|
33
|
+
statusHistory: string[];
|
|
34
|
+
_id: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ProviderSetItemRequestBody {
|
|
37
|
+
funderId: string;
|
|
38
|
+
practiceId: string;
|
|
39
|
+
professionalCategoryId: string;
|
|
40
|
+
providerNumber: string;
|
|
41
|
+
specialtyIds: string[];
|
|
42
|
+
hicaps?: HicapsProviderSetAttributes;
|
|
43
|
+
}
|
|
44
|
+
export interface HicapsProviderSetAttributes {
|
|
45
|
+
address?: string;
|
|
46
|
+
addressPrefix?: string;
|
|
47
|
+
city?: string;
|
|
48
|
+
country?: string;
|
|
49
|
+
postcode?: string;
|
|
50
|
+
state?: string;
|
|
51
|
+
lnglat?: string[];
|
|
52
|
+
gmapsPlaceId?: string;
|
|
53
|
+
}
|