@medipass/web-sdk 11.48.1-feature-healthpoint-upload-endpoints.1 → 11.48.1-feature-update-device-on-login.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 +1 -35
- package/lib/resources/attachments.js +1 -7
- package/lib/resources/auth.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.d.ts +6 -0
- package/lib/resources/devices.js +2 -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 +0 -10
- package/lib/services/aws.js +1 -2
- package/lib/services/version.js +1 -1
- package/lib/{staff-0d5e872e.js → staff-6179dfba.js} +262 -392
- package/lib/types/index.d.ts +1 -2
- package/lib/utils/application.js +1 -1
- package/lib/utils/professions.js +1 -1
- package/lib/utils/request.js +1 -1
- package/lib/utils/staff.js +1 -1
- package/package.json +3 -3
- package/lib/types/virus-scan.d.ts +0 -13
- package/lib/types/virus-scan.js +0 -2
|
@@ -1784,15 +1784,6 @@ 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
|
-
};
|
|
1796
1787
|
/**
|
|
1797
1788
|
* Get url to upload a file associated to a claim
|
|
1798
1789
|
* @param {String} businessId - Business ID
|
|
@@ -1874,88 +1865,14 @@ var getS3SignedUrl = function getS3SignedUrl(businessId, practiceId, staffId, s3
|
|
|
1874
1865
|
});
|
|
1875
1866
|
};
|
|
1876
1867
|
|
|
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
|
-
|
|
1945
1868
|
var attachments = /*#__PURE__*/Object.freeze({
|
|
1946
1869
|
__proto__: null,
|
|
1947
1870
|
pathGetClaimAttachmentUrl: pathGetClaimAttachmentUrl,
|
|
1948
1871
|
pathGetS3SignedUrl: pathGetS3SignedUrl,
|
|
1949
1872
|
pathScanClaimFile: pathScanClaimFile,
|
|
1950
|
-
pathScanFile: pathScanFile,
|
|
1951
|
-
pathGetAttachmentUrl: pathGetAttachmentUrl,
|
|
1952
|
-
pathGetBusinessS3SignedUrl: pathGetBusinessS3SignedUrl,
|
|
1953
1873
|
getClaimAttachmentUrl: getClaimAttachmentUrl,
|
|
1954
1874
|
scanClaimFile: scanClaimFile,
|
|
1955
|
-
getS3SignedUrl: getS3SignedUrl
|
|
1956
|
-
scanFile: scanFile,
|
|
1957
|
-
getAttachmentUrl: getAttachmentUrl,
|
|
1958
|
-
getBusinessS3SignedUrl: getBusinessS3SignedUrl
|
|
1875
|
+
getS3SignedUrl: getS3SignedUrl
|
|
1959
1876
|
});
|
|
1960
1877
|
|
|
1961
1878
|
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; }
|
|
@@ -2561,6 +2478,186 @@ var members = /*#__PURE__*/Object.freeze({
|
|
|
2561
2478
|
function ownKeys$7(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; }
|
|
2562
2479
|
|
|
2563
2480
|
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2481
|
+
var PATH__DEVICES = '/devices';
|
|
2482
|
+
var isRegistering = false;
|
|
2483
|
+
|
|
2484
|
+
var pathDeviceByDeviceId = function pathDeviceByDeviceId(deviceId) {
|
|
2485
|
+
return "/devices/" + deviceId;
|
|
2486
|
+
};
|
|
2487
|
+
/**
|
|
2488
|
+
* Register a device
|
|
2489
|
+
* @param {Object} opts - Additional options
|
|
2490
|
+
* @returns {Object} The device data
|
|
2491
|
+
*/
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
var registerDevice = /*#__PURE__*/function () {
|
|
2495
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(opts) {
|
|
2496
|
+
var deviceData, data, _data;
|
|
2497
|
+
|
|
2498
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2499
|
+
while (1) {
|
|
2500
|
+
switch (_context.prev = _context.next) {
|
|
2501
|
+
case 0:
|
|
2502
|
+
if (isRegistering) {
|
|
2503
|
+
_context.next = 15;
|
|
2504
|
+
break;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
_context.prev = 1;
|
|
2508
|
+
isRegistering = true;
|
|
2509
|
+
deviceData = {
|
|
2510
|
+
deviceType: 'browser',
|
|
2511
|
+
os: {
|
|
2512
|
+
type: platform.os.family || 'Unknown',
|
|
2513
|
+
ver: platform.os.version || '0'
|
|
2514
|
+
},
|
|
2515
|
+
app: {
|
|
2516
|
+
appId: platform.ua || 'Unknown'
|
|
2517
|
+
}
|
|
2518
|
+
};
|
|
2519
|
+
_context.next = 6;
|
|
2520
|
+
return request(_objectSpread$7({}, opts, {
|
|
2521
|
+
path: PATH__DEVICES
|
|
2522
|
+
}), {
|
|
2523
|
+
method: 'post',
|
|
2524
|
+
data: deviceData,
|
|
2525
|
+
skipDeviceCheck: true
|
|
2526
|
+
});
|
|
2527
|
+
|
|
2528
|
+
case 6:
|
|
2529
|
+
data = _context.sent;
|
|
2530
|
+
sdkClient.device = data;
|
|
2531
|
+
storage.default.set('device', data);
|
|
2532
|
+
return _context.abrupt("return", data);
|
|
2533
|
+
|
|
2534
|
+
case 10:
|
|
2535
|
+
_context.prev = 10;
|
|
2536
|
+
isRegistering = false;
|
|
2537
|
+
return _context.finish(10);
|
|
2538
|
+
|
|
2539
|
+
case 13:
|
|
2540
|
+
_context.next = 20;
|
|
2541
|
+
break;
|
|
2542
|
+
|
|
2543
|
+
case 15:
|
|
2544
|
+
_context.next = 17;
|
|
2545
|
+
return new Promise(function (resolve) {
|
|
2546
|
+
return setTimeout(resolve, 100);
|
|
2547
|
+
});
|
|
2548
|
+
|
|
2549
|
+
case 17:
|
|
2550
|
+
_data = sdkClient.device;
|
|
2551
|
+
|
|
2552
|
+
case 18:
|
|
2553
|
+
if (!_data) {
|
|
2554
|
+
_context.next = 15;
|
|
2555
|
+
break;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
case 19:
|
|
2559
|
+
return _context.abrupt("return", _data);
|
|
2560
|
+
|
|
2561
|
+
case 20:
|
|
2562
|
+
case "end":
|
|
2563
|
+
return _context.stop();
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
}, _callee, null, [[1,, 10, 13]]);
|
|
2567
|
+
}));
|
|
2568
|
+
|
|
2569
|
+
return function registerDevice(_x) {
|
|
2570
|
+
return _ref.apply(this, arguments);
|
|
2571
|
+
};
|
|
2572
|
+
}();
|
|
2573
|
+
/**
|
|
2574
|
+
* Check if the device exists, and set the device id request header.
|
|
2575
|
+
*/
|
|
2576
|
+
|
|
2577
|
+
var getDeviceId = /*#__PURE__*/function () {
|
|
2578
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
2579
|
+
var device, data;
|
|
2580
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
2581
|
+
while (1) {
|
|
2582
|
+
switch (_context2.prev = _context2.next) {
|
|
2583
|
+
case 0:
|
|
2584
|
+
device = sdkClient.device || storage.default.get('device');
|
|
2585
|
+
|
|
2586
|
+
if (!(!device || !device.deviceId)) {
|
|
2587
|
+
_context2.next = 6;
|
|
2588
|
+
break;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
_context2.next = 4;
|
|
2592
|
+
return registerDevice();
|
|
2593
|
+
|
|
2594
|
+
case 4:
|
|
2595
|
+
data = _context2.sent;
|
|
2596
|
+
return _context2.abrupt("return", data.deviceId);
|
|
2597
|
+
|
|
2598
|
+
case 6:
|
|
2599
|
+
return _context2.abrupt("return", device.deviceId);
|
|
2600
|
+
|
|
2601
|
+
case 7:
|
|
2602
|
+
case "end":
|
|
2603
|
+
return _context2.stop();
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
}, _callee2);
|
|
2607
|
+
}));
|
|
2608
|
+
|
|
2609
|
+
return function getDeviceId() {
|
|
2610
|
+
return _ref2.apply(this, arguments);
|
|
2611
|
+
};
|
|
2612
|
+
}();
|
|
2613
|
+
/**
|
|
2614
|
+
* Update device
|
|
2615
|
+
* @param {String} deviceId - Device ID
|
|
2616
|
+
* @param {Object} opts - Additional options
|
|
2617
|
+
*/
|
|
2618
|
+
|
|
2619
|
+
var updateDevice = /*#__PURE__*/function () {
|
|
2620
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(deviceId, opts) {
|
|
2621
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
2622
|
+
while (1) {
|
|
2623
|
+
switch (_context3.prev = _context3.next) {
|
|
2624
|
+
case 0:
|
|
2625
|
+
if (opts === void 0) {
|
|
2626
|
+
opts = {};
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
doesParamExist.default({
|
|
2630
|
+
deviceId: deviceId
|
|
2631
|
+
}, opts.hyperMediaEndpoint);
|
|
2632
|
+
return _context3.abrupt("return", request(_objectSpread$7({}, opts, {
|
|
2633
|
+
path: pathDeviceByDeviceId(deviceId)
|
|
2634
|
+
}), {
|
|
2635
|
+
method: 'put'
|
|
2636
|
+
}));
|
|
2637
|
+
|
|
2638
|
+
case 3:
|
|
2639
|
+
case "end":
|
|
2640
|
+
return _context3.stop();
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
}, _callee3);
|
|
2644
|
+
}));
|
|
2645
|
+
|
|
2646
|
+
return function updateDevice(_x2, _x3) {
|
|
2647
|
+
return _ref3.apply(this, arguments);
|
|
2648
|
+
};
|
|
2649
|
+
}();
|
|
2650
|
+
|
|
2651
|
+
var devices = /*#__PURE__*/Object.freeze({
|
|
2652
|
+
__proto__: null,
|
|
2653
|
+
registerDevice: registerDevice,
|
|
2654
|
+
getDeviceId: getDeviceId,
|
|
2655
|
+
updateDevice: updateDevice
|
|
2656
|
+
});
|
|
2657
|
+
|
|
2658
|
+
function ownKeys$8(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; }
|
|
2659
|
+
|
|
2660
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2564
2661
|
var PATH__AUTH = '/auth';
|
|
2565
2662
|
var PATH__OTK = '/otk';
|
|
2566
2663
|
var PATH__AUTH_TOKEN = '/auth/token';
|
|
@@ -2578,6 +2675,7 @@ var pathAuthyVerify = function pathAuthyVerify(accountId) {
|
|
|
2578
2675
|
};
|
|
2579
2676
|
|
|
2580
2677
|
var HEADER__SUPER_ADMIN = 'x-super-admin';
|
|
2678
|
+
var HEADER__DEVICE_ID = 'x-deviceid';
|
|
2581
2679
|
|
|
2582
2680
|
var setupAccountResources = /*#__PURE__*/function () {
|
|
2583
2681
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(account) {
|
|
@@ -2602,7 +2700,7 @@ var setupAccountResources = /*#__PURE__*/function () {
|
|
|
2602
2700
|
case 6:
|
|
2603
2701
|
member = _context.sent;
|
|
2604
2702
|
sdkClient.setMember(member);
|
|
2605
|
-
return _context.abrupt("return", _objectSpread$
|
|
2703
|
+
return _context.abrupt("return", _objectSpread$8({}, account, {
|
|
2606
2704
|
_member: member
|
|
2607
2705
|
}));
|
|
2608
2706
|
|
|
@@ -2632,7 +2730,7 @@ var setupAccountResources = /*#__PURE__*/function () {
|
|
|
2632
2730
|
|
|
2633
2731
|
var login = /*#__PURE__*/function () {
|
|
2634
2732
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(email, password, body, opts) {
|
|
2635
|
-
var data, res, isSuperAdmin, account;
|
|
2733
|
+
var data, res, isSuperAdmin, deviceId, account;
|
|
2636
2734
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
2637
2735
|
while (1) {
|
|
2638
2736
|
switch (_context2.prev = _context2.next) {
|
|
@@ -2647,7 +2745,7 @@ var login = /*#__PURE__*/function () {
|
|
|
2647
2745
|
};
|
|
2648
2746
|
}
|
|
2649
2747
|
|
|
2650
|
-
data = _objectSpread$
|
|
2748
|
+
data = _objectSpread$8({
|
|
2651
2749
|
email: email
|
|
2652
2750
|
}, body);
|
|
2653
2751
|
|
|
@@ -2658,7 +2756,7 @@ var login = /*#__PURE__*/function () {
|
|
|
2658
2756
|
|
|
2659
2757
|
|
|
2660
2758
|
_context2.next = 6;
|
|
2661
|
-
return request(_objectSpread$
|
|
2759
|
+
return request(_objectSpread$8({}, opts, {
|
|
2662
2760
|
path: PATH__AUTH,
|
|
2663
2761
|
getFullResponse: true
|
|
2664
2762
|
}), {
|
|
@@ -2669,31 +2767,36 @@ var login = /*#__PURE__*/function () {
|
|
|
2669
2767
|
case 6:
|
|
2670
2768
|
res = _context2.sent;
|
|
2671
2769
|
isSuperAdmin = res.headers[HEADER__SUPER_ADMIN];
|
|
2770
|
+
deviceId = res.config.headers[HEADER__DEVICE_ID];
|
|
2771
|
+
_context2.next = 11;
|
|
2772
|
+
return updateDevice(deviceId);
|
|
2672
2773
|
|
|
2774
|
+
case 11:
|
|
2673
2775
|
if (!(opts.asSuperAdmin && !isSuperAdmin)) {
|
|
2674
|
-
_context2.next =
|
|
2776
|
+
_context2.next = 14;
|
|
2675
2777
|
break;
|
|
2676
2778
|
}
|
|
2677
2779
|
|
|
2678
|
-
sdkClient.clearTokens();
|
|
2780
|
+
sdkClient.clearTokens(); // eslint-disable-next-line no-throw-literal
|
|
2781
|
+
|
|
2679
2782
|
throw {
|
|
2680
2783
|
response: 'You need to be a super admin to log in!'
|
|
2681
2784
|
};
|
|
2682
2785
|
|
|
2683
|
-
case
|
|
2786
|
+
case 14:
|
|
2684
2787
|
if (isSuperAdmin) {
|
|
2685
2788
|
sdkClient.isSuperAdmin = isSuperAdmin;
|
|
2686
2789
|
storage.default.set('isSuperAdmin', isSuperAdmin);
|
|
2687
2790
|
}
|
|
2688
2791
|
|
|
2689
|
-
_context2.next =
|
|
2792
|
+
_context2.next = 17;
|
|
2690
2793
|
return setupAccountResources(res.data);
|
|
2691
2794
|
|
|
2692
|
-
case
|
|
2795
|
+
case 17:
|
|
2693
2796
|
account = _context2.sent;
|
|
2694
2797
|
return _context2.abrupt("return", account);
|
|
2695
2798
|
|
|
2696
|
-
case
|
|
2799
|
+
case 19:
|
|
2697
2800
|
case "end":
|
|
2698
2801
|
return _context2.stop();
|
|
2699
2802
|
}
|
|
@@ -2762,7 +2865,7 @@ var impersonate = /*#__PURE__*/function () {
|
|
|
2762
2865
|
doesParamExist.default({
|
|
2763
2866
|
accountId: accountId
|
|
2764
2867
|
}, opts.hyperMediaEndpoint);
|
|
2765
|
-
return _context4.abrupt("return", request(_objectSpread$
|
|
2868
|
+
return _context4.abrupt("return", request(_objectSpread$8({}, opts, {
|
|
2766
2869
|
getFullResponse: true,
|
|
2767
2870
|
path: pathImpersonateAccount(accountId)
|
|
2768
2871
|
}), {
|
|
@@ -2794,7 +2897,7 @@ var logout = /*#__PURE__*/function () {
|
|
|
2794
2897
|
switch (_context5.prev = _context5.next) {
|
|
2795
2898
|
case 0:
|
|
2796
2899
|
_context5.next = 2;
|
|
2797
|
-
return request(_objectSpread$
|
|
2900
|
+
return request(_objectSpread$8({}, opts, {
|
|
2798
2901
|
getFullResponse: true,
|
|
2799
2902
|
path: PATH__AUTH
|
|
2800
2903
|
}), {
|
|
@@ -2832,12 +2935,12 @@ var requestOtk = /*#__PURE__*/function () {
|
|
|
2832
2935
|
while (1) {
|
|
2833
2936
|
switch (_context6.prev = _context6.next) {
|
|
2834
2937
|
case 0:
|
|
2835
|
-
body = _omitBy(_objectSpread$
|
|
2938
|
+
body = _omitBy(_objectSpread$8({
|
|
2836
2939
|
email: email,
|
|
2837
2940
|
accountId: accountId
|
|
2838
2941
|
}, requestBody), _isEmpty);
|
|
2839
2942
|
_context6.next = 3;
|
|
2840
|
-
return request(_objectSpread$
|
|
2943
|
+
return request(_objectSpread$8({}, opts, {
|
|
2841
2944
|
getFullResponse: true,
|
|
2842
2945
|
path: PATH__OTK
|
|
2843
2946
|
}), {
|
|
@@ -2882,7 +2985,7 @@ var generateAuthy = /*#__PURE__*/function () {
|
|
|
2882
2985
|
accountId: accountId
|
|
2883
2986
|
}, opts.hyperMediaEndpoint);
|
|
2884
2987
|
_context7.next = 4;
|
|
2885
|
-
return request(_objectSpread$
|
|
2988
|
+
return request(_objectSpread$8({}, opts, {
|
|
2886
2989
|
path: pathAuthy(accountId),
|
|
2887
2990
|
getFullResponse: true
|
|
2888
2991
|
}), {
|
|
@@ -2926,7 +3029,7 @@ var removeAuthy = /*#__PURE__*/function () {
|
|
|
2926
3029
|
accountId: accountId
|
|
2927
3030
|
}, opts.hyperMediaEndpoint);
|
|
2928
3031
|
_context8.next = 4;
|
|
2929
|
-
return request(_objectSpread$
|
|
3032
|
+
return request(_objectSpread$8({}, opts, {
|
|
2930
3033
|
path: pathAuthy(accountId),
|
|
2931
3034
|
getFullResponse: true
|
|
2932
3035
|
}), {
|
|
@@ -2971,7 +3074,7 @@ var verifyAuthy = /*#__PURE__*/function () {
|
|
|
2971
3074
|
accountId: accountId
|
|
2972
3075
|
}, opts.hyperMediaEndpoint);
|
|
2973
3076
|
_context9.next = 4;
|
|
2974
|
-
return request(_objectSpread$
|
|
3077
|
+
return request(_objectSpread$8({}, opts, {
|
|
2975
3078
|
path: pathAuthyVerify(accountId),
|
|
2976
3079
|
getFullResponse: true
|
|
2977
3080
|
}), {
|
|
@@ -3020,7 +3123,7 @@ var createShortLivedToken = /*#__PURE__*/function () {
|
|
|
3020
3123
|
}, opts.hyperMediaEndpoint);
|
|
3021
3124
|
sdkClient.setToken("Bearer " + apiKey);
|
|
3022
3125
|
_context10.next = 5;
|
|
3023
|
-
return request(_objectSpread$
|
|
3126
|
+
return request(_objectSpread$8({}, opts, {
|
|
3024
3127
|
path: PATH__AUTH_TOKEN
|
|
3025
3128
|
}), {
|
|
3026
3129
|
method: 'post',
|
|
@@ -3057,9 +3160,9 @@ var auth = /*#__PURE__*/Object.freeze({
|
|
|
3057
3160
|
createShortLivedToken: createShortLivedToken
|
|
3058
3161
|
});
|
|
3059
3162
|
|
|
3060
|
-
function ownKeys$
|
|
3163
|
+
function ownKeys$9(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; }
|
|
3061
3164
|
|
|
3062
|
-
function _objectSpread$
|
|
3165
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3063
3166
|
var PATH__APPLICATIONS = '/applications';
|
|
3064
3167
|
var PATH__SELF_APPLICATION = '/applications/me';
|
|
3065
3168
|
|
|
@@ -3077,7 +3180,7 @@ var getSelfApplication = function getSelfApplication(opts) {
|
|
|
3077
3180
|
opts = {};
|
|
3078
3181
|
}
|
|
3079
3182
|
|
|
3080
|
-
return request(_objectSpread$
|
|
3183
|
+
return request(_objectSpread$9({}, opts, {
|
|
3081
3184
|
path: PATH__SELF_APPLICATION
|
|
3082
3185
|
}), {
|
|
3083
3186
|
method: 'get'
|
|
@@ -3098,7 +3201,7 @@ var getApplications = function getApplications(query, opts) {
|
|
|
3098
3201
|
opts = {};
|
|
3099
3202
|
}
|
|
3100
3203
|
|
|
3101
|
-
return request(_objectSpread$
|
|
3204
|
+
return request(_objectSpread$9({}, opts, {
|
|
3102
3205
|
path: PATH__APPLICATIONS
|
|
3103
3206
|
}), {
|
|
3104
3207
|
method: 'get',
|
|
@@ -3119,7 +3222,7 @@ var getApplication = function getApplication(applicationId, opts) {
|
|
|
3119
3222
|
doesParamExist.default({
|
|
3120
3223
|
applicationId: applicationId
|
|
3121
3224
|
}, opts.hyperMediaEndpoint);
|
|
3122
|
-
return request(_objectSpread$
|
|
3225
|
+
return request(_objectSpread$9({}, opts, {
|
|
3123
3226
|
path: pathApplication(applicationId)
|
|
3124
3227
|
}), {
|
|
3125
3228
|
method: 'get'
|
|
@@ -3140,7 +3243,7 @@ var updateApplication = function updateApplication(applicationId, body, opts) {
|
|
|
3140
3243
|
doesParamExist.default({
|
|
3141
3244
|
applicationId: applicationId
|
|
3142
3245
|
}, opts.hyperMediaEndpoint);
|
|
3143
|
-
return request(_objectSpread$
|
|
3246
|
+
return request(_objectSpread$9({}, opts, {
|
|
3144
3247
|
path: pathApplication(applicationId)
|
|
3145
3248
|
}), {
|
|
3146
3249
|
method: 'put',
|
|
@@ -3158,7 +3261,7 @@ var createApplication = function createApplication(body, opts) {
|
|
|
3158
3261
|
opts = {};
|
|
3159
3262
|
}
|
|
3160
3263
|
|
|
3161
|
-
return request(_objectSpread$
|
|
3264
|
+
return request(_objectSpread$9({}, opts, {
|
|
3162
3265
|
path: PATH__APPLICATIONS
|
|
3163
3266
|
}), {
|
|
3164
3267
|
method: 'post',
|
|
@@ -3175,9 +3278,9 @@ var applications = /*#__PURE__*/Object.freeze({
|
|
|
3175
3278
|
createApplication: createApplication
|
|
3176
3279
|
});
|
|
3177
3280
|
|
|
3178
|
-
function ownKeys$
|
|
3281
|
+
function ownKeys$a(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; }
|
|
3179
3282
|
|
|
3180
|
-
function _objectSpread$
|
|
3283
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3181
3284
|
var pathBusinessBulkUploads = function pathBusinessBulkUploads(businessId) {
|
|
3182
3285
|
return "/businesses/" + businessId + "/bulkuploads";
|
|
3183
3286
|
};
|
|
@@ -3202,7 +3305,7 @@ var createBulkUpload = function createBulkUpload(businessId, body, opts) {
|
|
|
3202
3305
|
doesParamExist.default({
|
|
3203
3306
|
businessId: businessId
|
|
3204
3307
|
});
|
|
3205
|
-
return request(_objectSpread$
|
|
3308
|
+
return request(_objectSpread$a({}, opts, {
|
|
3206
3309
|
path: pathBusinessBulkUploads(businessId)
|
|
3207
3310
|
}), {
|
|
3208
3311
|
method: 'post',
|
|
@@ -3226,7 +3329,7 @@ var getBulkUpload = function getBulkUpload(businessId, bulkUploadId, opts) {
|
|
|
3226
3329
|
businessId: businessId,
|
|
3227
3330
|
bulkUploadId: bulkUploadId
|
|
3228
3331
|
});
|
|
3229
|
-
return request(_objectSpread$
|
|
3332
|
+
return request(_objectSpread$a({}, opts, {
|
|
3230
3333
|
path: pathBusinessBulkUpload(businessId, bulkUploadId)
|
|
3231
3334
|
}), {
|
|
3232
3335
|
method: 'get'
|
|
@@ -3247,7 +3350,7 @@ var getBulkUploadUrl = function getBulkUploadUrl(businessId, query, opts) {
|
|
|
3247
3350
|
doesParamExist.default({
|
|
3248
3351
|
businessId: businessId
|
|
3249
3352
|
});
|
|
3250
|
-
return request(_objectSpread$
|
|
3353
|
+
return request(_objectSpread$a({}, opts, {
|
|
3251
3354
|
path: pathBusinessBulkUploadUrl(businessId)
|
|
3252
3355
|
}), {
|
|
3253
3356
|
method: 'get',
|
|
@@ -3265,9 +3368,9 @@ var bulkUploads = /*#__PURE__*/Object.freeze({
|
|
|
3265
3368
|
getBulkUploadUrl: getBulkUploadUrl
|
|
3266
3369
|
});
|
|
3267
3370
|
|
|
3268
|
-
function ownKeys$
|
|
3371
|
+
function ownKeys$b(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; }
|
|
3269
3372
|
|
|
3270
|
-
function _objectSpread$
|
|
3373
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3271
3374
|
var pathSubmitDraftInvoices = function pathSubmitDraftInvoices(businessId) {
|
|
3272
3375
|
return "/businesses/" + businessId + "/bulksubmits";
|
|
3273
3376
|
};
|
|
@@ -3294,7 +3397,7 @@ var submitDraftInvoices = /*#__PURE__*/function () {
|
|
|
3294
3397
|
doesParamExist.default({
|
|
3295
3398
|
businessId: businessId
|
|
3296
3399
|
}, opts.hyperMediaEndpoint);
|
|
3297
|
-
return _context.abrupt("return", request(_objectSpread$
|
|
3400
|
+
return _context.abrupt("return", request(_objectSpread$b({}, opts, {
|
|
3298
3401
|
path: pathSubmitDraftInvoices(businessId)
|
|
3299
3402
|
}), {
|
|
3300
3403
|
method: 'post',
|
|
@@ -3334,7 +3437,7 @@ var getDraftProgressStatus = /*#__PURE__*/function () {
|
|
|
3334
3437
|
businessId: businessId,
|
|
3335
3438
|
bulkSubmitId: bulkSubmitId
|
|
3336
3439
|
}, opts.hyperMediaEndpoint);
|
|
3337
|
-
return _context2.abrupt("return", request(_objectSpread$
|
|
3440
|
+
return _context2.abrupt("return", request(_objectSpread$b({}, opts, {
|
|
3338
3441
|
path: pathGetDraftProgressStatus(businessId, bulkSubmitId)
|
|
3339
3442
|
}), {
|
|
3340
3443
|
method: 'get',
|
|
@@ -3362,9 +3465,9 @@ var bulkSubmits = /*#__PURE__*/Object.freeze({
|
|
|
3362
3465
|
getDraftProgressStatus: getDraftProgressStatus
|
|
3363
3466
|
});
|
|
3364
3467
|
|
|
3365
|
-
function ownKeys$
|
|
3468
|
+
function ownKeys$c(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; }
|
|
3366
3469
|
|
|
3367
|
-
function _objectSpread$
|
|
3470
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3368
3471
|
var pathLinkBusinessProfile = function pathLinkBusinessProfile(businessProfileId) {
|
|
3369
3472
|
return "/businessprofiles/" + businessProfileId + "/link";
|
|
3370
3473
|
};
|
|
@@ -3382,7 +3485,7 @@ var getOrganisationBusinessProfiles = function getOrganisationBusinessProfiles(o
|
|
|
3382
3485
|
doesParamExist.default({
|
|
3383
3486
|
organisationId: organisationId
|
|
3384
3487
|
}, opts.hyperMediaEndpoint);
|
|
3385
|
-
return request(_objectSpread$
|
|
3488
|
+
return request(_objectSpread$c({}, opts, {
|
|
3386
3489
|
path: pathOrganisationBusinessProfiles(organisationId)
|
|
3387
3490
|
}), {
|
|
3388
3491
|
method: 'get',
|
|
@@ -3401,7 +3504,7 @@ var linkBusinessProfile = function linkBusinessProfile(businessProfileId, busine
|
|
|
3401
3504
|
var body = {
|
|
3402
3505
|
businessId: businessId
|
|
3403
3506
|
};
|
|
3404
|
-
return request(_objectSpread$
|
|
3507
|
+
return request(_objectSpread$c({}, opts, {
|
|
3405
3508
|
path: pathLinkBusinessProfile(businessProfileId)
|
|
3406
3509
|
}), {
|
|
3407
3510
|
method: 'put',
|
|
@@ -3416,7 +3519,7 @@ var unlinkBusinessProfile = function unlinkBusinessProfile(businessProfileId, op
|
|
|
3416
3519
|
doesParamExist.default({
|
|
3417
3520
|
businessProfileId: businessProfileId
|
|
3418
3521
|
}, opts.hyperMediaEndpoint);
|
|
3419
|
-
return request(_objectSpread$
|
|
3522
|
+
return request(_objectSpread$c({}, opts, {
|
|
3420
3523
|
path: pathUnlinkBusinessProfile(businessProfileId)
|
|
3421
3524
|
}), {
|
|
3422
3525
|
method: 'put'
|
|
@@ -3433,9 +3536,9 @@ var businessProfiles = /*#__PURE__*/Object.freeze({
|
|
|
3433
3536
|
unlinkBusinessProfile: unlinkBusinessProfile
|
|
3434
3537
|
});
|
|
3435
3538
|
|
|
3436
|
-
function ownKeys$
|
|
3539
|
+
function ownKeys$d(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; }
|
|
3437
3540
|
|
|
3438
|
-
function _objectSpread$
|
|
3541
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3439
3542
|
var PATH__BUSINESSES = '/businesses';
|
|
3440
3543
|
var PATH__MY_BUSINESSES = '/businesses/me';
|
|
3441
3544
|
|
|
@@ -3515,7 +3618,7 @@ var createBusiness = function createBusiness(body, opts) {
|
|
|
3515
3618
|
opts = {};
|
|
3516
3619
|
}
|
|
3517
3620
|
|
|
3518
|
-
return request(_objectSpread$
|
|
3621
|
+
return request(_objectSpread$d({}, opts, {
|
|
3519
3622
|
path: PATH__BUSINESSES
|
|
3520
3623
|
}), {
|
|
3521
3624
|
method: 'post',
|
|
@@ -3537,7 +3640,7 @@ var createOrganisationBusiness = function createOrganisationBusiness(organisatio
|
|
|
3537
3640
|
doesParamExist.default({
|
|
3538
3641
|
organisationId: organisationId
|
|
3539
3642
|
}, opts.hyperMediaEndpoint);
|
|
3540
|
-
return request(_objectSpread$
|
|
3643
|
+
return request(_objectSpread$d({}, opts, {
|
|
3541
3644
|
path: pathOrganisationBusiness(organisationId)
|
|
3542
3645
|
}), {
|
|
3543
3646
|
method: 'post',
|
|
@@ -3558,7 +3661,7 @@ var deleteBusiness = function deleteBusiness(businessId, opts) {
|
|
|
3558
3661
|
doesParamExist.default({
|
|
3559
3662
|
businessId: businessId
|
|
3560
3663
|
}, opts.hyperMediaEndpoint);
|
|
3561
|
-
return request(_objectSpread$
|
|
3664
|
+
return request(_objectSpread$d({}, opts, {
|
|
3562
3665
|
path: pathBusiness(businessId)
|
|
3563
3666
|
}), {
|
|
3564
3667
|
method: 'delete'
|
|
@@ -3579,7 +3682,7 @@ var disableBusiness = function disableBusiness(businessId, body, opts) {
|
|
|
3579
3682
|
doesParamExist.default({
|
|
3580
3683
|
businessId: businessId
|
|
3581
3684
|
}, opts.hyperMediaEndpoint);
|
|
3582
|
-
return request(_objectSpread$
|
|
3685
|
+
return request(_objectSpread$d({}, opts, {
|
|
3583
3686
|
path: pathDisableBusiness(businessId)
|
|
3584
3687
|
}), {
|
|
3585
3688
|
method: 'post',
|
|
@@ -3601,7 +3704,7 @@ var emailBusinessOnboardingQuestions = function emailBusinessOnboardingQuestions
|
|
|
3601
3704
|
doesParamExist.default({
|
|
3602
3705
|
businessId: businessId
|
|
3603
3706
|
}, opts.hyperMediaEndpoint);
|
|
3604
|
-
return request(_objectSpread$
|
|
3707
|
+
return request(_objectSpread$d({}, opts, {
|
|
3605
3708
|
path: pathBusinessOnboardingQuestions(businessId)
|
|
3606
3709
|
}), {
|
|
3607
3710
|
method: 'post',
|
|
@@ -3623,7 +3726,7 @@ var enableBusiness = function enableBusiness(businessId, body, opts) {
|
|
|
3623
3726
|
doesParamExist.default({
|
|
3624
3727
|
businessId: businessId
|
|
3625
3728
|
}, opts.hyperMediaEndpoint);
|
|
3626
|
-
return request(_objectSpread$
|
|
3729
|
+
return request(_objectSpread$d({}, opts, {
|
|
3627
3730
|
path: pathEnableBusiness(businessId)
|
|
3628
3731
|
}), {
|
|
3629
3732
|
method: 'post',
|
|
@@ -3649,7 +3752,7 @@ var getBusiness = function getBusiness(businessId, query, opts) {
|
|
|
3649
3752
|
doesParamExist.default({
|
|
3650
3753
|
businessId: businessId
|
|
3651
3754
|
}, opts.hyperMediaEndpoint);
|
|
3652
|
-
return request(_objectSpread$
|
|
3755
|
+
return request(_objectSpread$d({}, opts, {
|
|
3653
3756
|
path: pathBusiness(businessId)
|
|
3654
3757
|
}), {
|
|
3655
3758
|
method: 'get',
|
|
@@ -3671,7 +3774,7 @@ var getBusinesses = function getBusinesses(query, opts) {
|
|
|
3671
3774
|
opts = {};
|
|
3672
3775
|
}
|
|
3673
3776
|
|
|
3674
|
-
return request(_objectSpread$
|
|
3777
|
+
return request(_objectSpread$d({}, opts, {
|
|
3675
3778
|
path: PATH__BUSINESSES
|
|
3676
3779
|
}), {
|
|
3677
3780
|
method: 'get',
|
|
@@ -3693,7 +3796,7 @@ var getMyBusinesses = function getMyBusinesses(query, opts) {
|
|
|
3693
3796
|
opts = {};
|
|
3694
3797
|
}
|
|
3695
3798
|
|
|
3696
|
-
return request(_objectSpread$
|
|
3799
|
+
return request(_objectSpread$d({}, opts, {
|
|
3697
3800
|
path: PATH__MY_BUSINESSES
|
|
3698
3801
|
}), {
|
|
3699
3802
|
method: 'get',
|
|
@@ -3715,7 +3818,7 @@ var getBusinessPDFs = function getBusinessPDFs(businessId, body, opts) {
|
|
|
3715
3818
|
doesParamExist.default({
|
|
3716
3819
|
businessId: businessId
|
|
3717
3820
|
}, opts.hyperMediaEndpoint);
|
|
3718
|
-
return request(_objectSpread$
|
|
3821
|
+
return request(_objectSpread$d({}, opts, {
|
|
3719
3822
|
path: pathBusiness(businessId) + "/pdfs"
|
|
3720
3823
|
}), {
|
|
3721
3824
|
method: 'post',
|
|
@@ -3742,7 +3845,7 @@ var getAccountsBusinesses = function getAccountsBusinesses(accountId, query, opt
|
|
|
3742
3845
|
doesParamExist.default({
|
|
3743
3846
|
accountId: accountId
|
|
3744
3847
|
}, opts.hyperMediaEndpoint);
|
|
3745
|
-
return request(_objectSpread$
|
|
3848
|
+
return request(_objectSpread$d({}, opts, {
|
|
3746
3849
|
path: pathAccountsBusinesses(accountId)
|
|
3747
3850
|
}), {
|
|
3748
3851
|
method: 'get',
|
|
@@ -3768,7 +3871,7 @@ var getOrganisationBusinesses = function getOrganisationBusinesses(organisationI
|
|
|
3768
3871
|
doesParamExist.default({
|
|
3769
3872
|
organisationId: organisationId
|
|
3770
3873
|
}, opts.hyperMediaEndpoint);
|
|
3771
|
-
return request(_objectSpread$
|
|
3874
|
+
return request(_objectSpread$d({}, opts, {
|
|
3772
3875
|
path: pathOrganisationBusiness(organisationId)
|
|
3773
3876
|
}), {
|
|
3774
3877
|
method: 'get',
|
|
@@ -3790,7 +3893,7 @@ var updateBusiness = function updateBusiness(businessId, body, opts) {
|
|
|
3790
3893
|
doesParamExist.default({
|
|
3791
3894
|
businessId: businessId
|
|
3792
3895
|
}, opts.hyperMediaEndpoint);
|
|
3793
|
-
return request(_objectSpread$
|
|
3896
|
+
return request(_objectSpread$d({}, opts, {
|
|
3794
3897
|
path: pathBusiness(businessId)
|
|
3795
3898
|
}), {
|
|
3796
3899
|
method: 'put',
|
|
@@ -3812,7 +3915,7 @@ var unsuspendBusiness = function unsuspendBusiness(businessId, body, opts) {
|
|
|
3812
3915
|
doesParamExist.default({
|
|
3813
3916
|
businessId: businessId
|
|
3814
3917
|
}, opts.hyperMediaEndpoint);
|
|
3815
|
-
return request(_objectSpread$
|
|
3918
|
+
return request(_objectSpread$d({}, opts, {
|
|
3816
3919
|
path: pathUnsuspendBusiness(businessId)
|
|
3817
3920
|
}), {
|
|
3818
3921
|
method: 'post',
|
|
@@ -3834,7 +3937,7 @@ var verifyMedicare = function verifyMedicare(businessId, body, opts) {
|
|
|
3834
3937
|
doesParamExist.default({
|
|
3835
3938
|
businessId: businessId
|
|
3836
3939
|
}, opts.hyperMediaEndpoint);
|
|
3837
|
-
return request(_objectSpread$
|
|
3940
|
+
return request(_objectSpread$d({}, opts, {
|
|
3838
3941
|
path: pathVerifyMedicare(businessId)
|
|
3839
3942
|
}), {
|
|
3840
3943
|
method: 'post',
|
|
@@ -3856,7 +3959,7 @@ var oldVerifyDVA = function oldVerifyDVA(businessId, body, opts) {
|
|
|
3856
3959
|
doesParamExist.default({
|
|
3857
3960
|
businessId: businessId
|
|
3858
3961
|
}, opts.hyperMediaEndpoint);
|
|
3859
|
-
return request(_objectSpread$
|
|
3962
|
+
return request(_objectSpread$d({}, opts, {
|
|
3860
3963
|
path: oldPathVerifyDVA(businessId)
|
|
3861
3964
|
}), {
|
|
3862
3965
|
method: 'post',
|
|
@@ -3878,7 +3981,7 @@ var verifyDVA = function verifyDVA(businessId, body, opts) {
|
|
|
3878
3981
|
doesParamExist.default({
|
|
3879
3982
|
businessId: businessId
|
|
3880
3983
|
}, opts.hyperMediaEndpoint);
|
|
3881
|
-
return request(_objectSpread$
|
|
3984
|
+
return request(_objectSpread$d({}, opts, {
|
|
3882
3985
|
path: pathVerifyDVA(businessId)
|
|
3883
3986
|
}), {
|
|
3884
3987
|
method: 'post',
|
|
@@ -3900,7 +4003,7 @@ var verifyIcare = function verifyIcare(businessId, body, opts) {
|
|
|
3900
4003
|
doesParamExist.default({
|
|
3901
4004
|
businessId: businessId
|
|
3902
4005
|
}, opts.hyperMediaEndpoint);
|
|
3903
|
-
return request(_objectSpread$
|
|
4006
|
+
return request(_objectSpread$d({}, opts, {
|
|
3904
4007
|
path: pathVerifyIcare(businessId)
|
|
3905
4008
|
}), {
|
|
3906
4009
|
method: 'post',
|
|
@@ -3926,7 +4029,7 @@ var verifyComcare = function verifyComcare(businessId, staffId, providerSetItemI
|
|
|
3926
4029
|
staffId: staffId,
|
|
3927
4030
|
providerSetItemId: providerSetItemId
|
|
3928
4031
|
}, opts.hyperMediaEndpoint);
|
|
3929
|
-
return request(_objectSpread$
|
|
4032
|
+
return request(_objectSpread$d({}, opts, {
|
|
3930
4033
|
path: pathVerifyComcare(businessId, staffId, providerSetItemId)
|
|
3931
4034
|
}), {
|
|
3932
4035
|
method: 'post',
|
|
@@ -3948,7 +4051,7 @@ var createSupportNote = function createSupportNote(businessId, body, opts) {
|
|
|
3948
4051
|
doesParamExist.default({
|
|
3949
4052
|
businessId: businessId
|
|
3950
4053
|
}, opts.hyperMediaEndpoint);
|
|
3951
|
-
return request(_objectSpread$
|
|
4054
|
+
return request(_objectSpread$d({}, opts, {
|
|
3952
4055
|
path: pathCreateSupportNote(businessId)
|
|
3953
4056
|
}), {
|
|
3954
4057
|
method: 'post',
|
|
@@ -3970,7 +4073,7 @@ var getBsbDetails = function getBsbDetails(businessId, query, opts) {
|
|
|
3970
4073
|
doesParamExist.default({
|
|
3971
4074
|
businessId: businessId
|
|
3972
4075
|
}, opts.hyperMediaEndpoint);
|
|
3973
|
-
return request(_objectSpread$
|
|
4076
|
+
return request(_objectSpread$d({}, opts, {
|
|
3974
4077
|
path: pathBsbDetails(businessId)
|
|
3975
4078
|
}), {
|
|
3976
4079
|
method: 'get',
|
|
@@ -3992,7 +4095,7 @@ var sendBusinessEmail = function sendBusinessEmail(businessId, body, opts) {
|
|
|
3992
4095
|
doesParamExist.default({
|
|
3993
4096
|
businessId: businessId
|
|
3994
4097
|
}, opts.hyperMediaEndpoint);
|
|
3995
|
-
return request(_objectSpread$
|
|
4098
|
+
return request(_objectSpread$d({}, opts, {
|
|
3996
4099
|
path: pathBusinessSendEmails(businessId)
|
|
3997
4100
|
}), {
|
|
3998
4101
|
method: 'post',
|
|
@@ -4014,7 +4117,7 @@ var suspendBusiness = function suspendBusiness(businessId, body, opts) {
|
|
|
4014
4117
|
doesParamExist.default({
|
|
4015
4118
|
businessId: businessId
|
|
4016
4119
|
}, opts.hyperMediaEndpoint);
|
|
4017
|
-
return request(_objectSpread$
|
|
4120
|
+
return request(_objectSpread$d({}, opts, {
|
|
4018
4121
|
path: pathSuspendBusiness(businessId)
|
|
4019
4122
|
}), {
|
|
4020
4123
|
method: 'post',
|
|
@@ -4049,9 +4152,9 @@ var businesses = /*#__PURE__*/Object.freeze({
|
|
|
4049
4152
|
suspendBusiness: suspendBusiness
|
|
4050
4153
|
});
|
|
4051
4154
|
|
|
4052
|
-
function ownKeys$
|
|
4155
|
+
function ownKeys$e(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; }
|
|
4053
4156
|
|
|
4054
|
-
function _objectSpread$
|
|
4157
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4055
4158
|
|
|
4056
4159
|
var pathBusinessClaimItems = function pathBusinessClaimItems(businessId) {
|
|
4057
4160
|
return "/businesses/" + businessId + "/claimitems";
|
|
@@ -4093,7 +4196,7 @@ var getBusinessClaimItems = /*#__PURE__*/function () {
|
|
|
4093
4196
|
doesParamExist.default({
|
|
4094
4197
|
businessId: businessId
|
|
4095
4198
|
}, opts.hyperMediaEndpoint);
|
|
4096
|
-
return _context.abrupt("return", request(_objectSpread$
|
|
4199
|
+
return _context.abrupt("return", request(_objectSpread$e({}, opts, {
|
|
4097
4200
|
path: pathBusinessClaimItems(businessId)
|
|
4098
4201
|
}), {
|
|
4099
4202
|
method: 'get',
|
|
@@ -4138,7 +4241,7 @@ var getBusinessClaimItem = /*#__PURE__*/function () {
|
|
|
4138
4241
|
businessId: businessId,
|
|
4139
4242
|
claimItemId: claimItemId
|
|
4140
4243
|
}, opts.hyperMediaEndpoint);
|
|
4141
|
-
return _context2.abrupt("return", request(_objectSpread$
|
|
4244
|
+
return _context2.abrupt("return", request(_objectSpread$e({}, opts, {
|
|
4142
4245
|
path: pathBusinessClaimItem(businessId, claimItemId)
|
|
4143
4246
|
}), {
|
|
4144
4247
|
method: 'get',
|
|
@@ -4181,7 +4284,7 @@ var getHealthFundClaimItems = /*#__PURE__*/function () {
|
|
|
4181
4284
|
doesParamExist.default({
|
|
4182
4285
|
healthFundId: healthFundId
|
|
4183
4286
|
}, opts.hyperMediaEndpoint);
|
|
4184
|
-
return _context3.abrupt("return", request(_objectSpread$
|
|
4287
|
+
return _context3.abrupt("return", request(_objectSpread$e({}, opts, {
|
|
4185
4288
|
path: pathHealthFundClaimItems(healthFundId)
|
|
4186
4289
|
}), {
|
|
4187
4290
|
method: 'get',
|
|
@@ -4226,7 +4329,7 @@ var getHealthFundClaimItem = /*#__PURE__*/function () {
|
|
|
4226
4329
|
healthFundId: healthFundId,
|
|
4227
4330
|
claimItemId: claimItemId
|
|
4228
4331
|
}, opts.hyperMediaEndpoint);
|
|
4229
|
-
return _context4.abrupt("return", request(_objectSpread$
|
|
4332
|
+
return _context4.abrupt("return", request(_objectSpread$e({}, opts, {
|
|
4230
4333
|
path: pathHealthFundClaimItem(healthFundId, claimItemId)
|
|
4231
4334
|
}), {
|
|
4232
4335
|
method: 'get',
|
|
@@ -4254,143 +4357,6 @@ var claimItems = /*#__PURE__*/Object.freeze({
|
|
|
4254
4357
|
getHealthFundClaimItem: getHealthFundClaimItem
|
|
4255
4358
|
});
|
|
4256
4359
|
|
|
4257
|
-
function ownKeys$e(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; }
|
|
4258
|
-
|
|
4259
|
-
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4260
|
-
var PATH__DEVICES = '/devices';
|
|
4261
|
-
var isRegistering = false;
|
|
4262
|
-
/**
|
|
4263
|
-
* Register a device
|
|
4264
|
-
* @param {Object} opts - Additional options
|
|
4265
|
-
* @returns {Object} The device data
|
|
4266
|
-
*/
|
|
4267
|
-
|
|
4268
|
-
var registerDevice = /*#__PURE__*/function () {
|
|
4269
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(opts) {
|
|
4270
|
-
var deviceData, data, _data;
|
|
4271
|
-
|
|
4272
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4273
|
-
while (1) {
|
|
4274
|
-
switch (_context.prev = _context.next) {
|
|
4275
|
-
case 0:
|
|
4276
|
-
if (isRegistering) {
|
|
4277
|
-
_context.next = 15;
|
|
4278
|
-
break;
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
_context.prev = 1;
|
|
4282
|
-
isRegistering = true;
|
|
4283
|
-
deviceData = {
|
|
4284
|
-
deviceType: 'browser',
|
|
4285
|
-
os: {
|
|
4286
|
-
type: platform.os.family || 'Unknown',
|
|
4287
|
-
ver: platform.os.version || '0'
|
|
4288
|
-
},
|
|
4289
|
-
app: {
|
|
4290
|
-
appId: platform.ua || 'Unknown'
|
|
4291
|
-
}
|
|
4292
|
-
};
|
|
4293
|
-
_context.next = 6;
|
|
4294
|
-
return request(_objectSpread$e({}, opts, {
|
|
4295
|
-
path: PATH__DEVICES
|
|
4296
|
-
}), {
|
|
4297
|
-
method: 'post',
|
|
4298
|
-
data: deviceData,
|
|
4299
|
-
skipDeviceCheck: true
|
|
4300
|
-
});
|
|
4301
|
-
|
|
4302
|
-
case 6:
|
|
4303
|
-
data = _context.sent;
|
|
4304
|
-
sdkClient.device = data;
|
|
4305
|
-
storage.default.set('device', data);
|
|
4306
|
-
return _context.abrupt("return", data);
|
|
4307
|
-
|
|
4308
|
-
case 10:
|
|
4309
|
-
_context.prev = 10;
|
|
4310
|
-
isRegistering = false;
|
|
4311
|
-
return _context.finish(10);
|
|
4312
|
-
|
|
4313
|
-
case 13:
|
|
4314
|
-
_context.next = 20;
|
|
4315
|
-
break;
|
|
4316
|
-
|
|
4317
|
-
case 15:
|
|
4318
|
-
_context.next = 17;
|
|
4319
|
-
return new Promise(function (resolve) {
|
|
4320
|
-
return setTimeout(resolve, 100);
|
|
4321
|
-
});
|
|
4322
|
-
|
|
4323
|
-
case 17:
|
|
4324
|
-
_data = sdkClient.device;
|
|
4325
|
-
|
|
4326
|
-
case 18:
|
|
4327
|
-
if (!_data) {
|
|
4328
|
-
_context.next = 15;
|
|
4329
|
-
break;
|
|
4330
|
-
}
|
|
4331
|
-
|
|
4332
|
-
case 19:
|
|
4333
|
-
return _context.abrupt("return", _data);
|
|
4334
|
-
|
|
4335
|
-
case 20:
|
|
4336
|
-
case "end":
|
|
4337
|
-
return _context.stop();
|
|
4338
|
-
}
|
|
4339
|
-
}
|
|
4340
|
-
}, _callee, null, [[1,, 10, 13]]);
|
|
4341
|
-
}));
|
|
4342
|
-
|
|
4343
|
-
return function registerDevice(_x) {
|
|
4344
|
-
return _ref.apply(this, arguments);
|
|
4345
|
-
};
|
|
4346
|
-
}();
|
|
4347
|
-
/**
|
|
4348
|
-
* Check if the device exists, and set the device id request header.
|
|
4349
|
-
*/
|
|
4350
|
-
|
|
4351
|
-
var getDeviceId = /*#__PURE__*/function () {
|
|
4352
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
4353
|
-
var device, data;
|
|
4354
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
4355
|
-
while (1) {
|
|
4356
|
-
switch (_context2.prev = _context2.next) {
|
|
4357
|
-
case 0:
|
|
4358
|
-
device = sdkClient.device || storage.default.get('device');
|
|
4359
|
-
|
|
4360
|
-
if (!(!device || !device.deviceId)) {
|
|
4361
|
-
_context2.next = 6;
|
|
4362
|
-
break;
|
|
4363
|
-
}
|
|
4364
|
-
|
|
4365
|
-
_context2.next = 4;
|
|
4366
|
-
return registerDevice();
|
|
4367
|
-
|
|
4368
|
-
case 4:
|
|
4369
|
-
data = _context2.sent;
|
|
4370
|
-
return _context2.abrupt("return", data.deviceId);
|
|
4371
|
-
|
|
4372
|
-
case 6:
|
|
4373
|
-
return _context2.abrupt("return", device.deviceId);
|
|
4374
|
-
|
|
4375
|
-
case 7:
|
|
4376
|
-
case "end":
|
|
4377
|
-
return _context2.stop();
|
|
4378
|
-
}
|
|
4379
|
-
}
|
|
4380
|
-
}, _callee2);
|
|
4381
|
-
}));
|
|
4382
|
-
|
|
4383
|
-
return function getDeviceId() {
|
|
4384
|
-
return _ref2.apply(this, arguments);
|
|
4385
|
-
};
|
|
4386
|
-
}();
|
|
4387
|
-
|
|
4388
|
-
var devices = /*#__PURE__*/Object.freeze({
|
|
4389
|
-
__proto__: null,
|
|
4390
|
-
registerDevice: registerDevice,
|
|
4391
|
-
getDeviceId: getDeviceId
|
|
4392
|
-
});
|
|
4393
|
-
|
|
4394
4360
|
function ownKeys$f(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; }
|
|
4395
4361
|
|
|
4396
4362
|
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -21088,95 +21054,6 @@ var uploadKycTrustDocumentToS3 = /*#__PURE__*/function () {
|
|
|
21088
21054
|
return _ref8.apply(this, arguments);
|
|
21089
21055
|
};
|
|
21090
21056
|
}();
|
|
21091
|
-
/**
|
|
21092
|
-
* Upload attachment to S3
|
|
21093
|
-
* @param {String} businessId - Business ID
|
|
21094
|
-
* @param {String} healthFundId - Health fund ID
|
|
21095
|
-
* @param {File} file - File
|
|
21096
|
-
*/
|
|
21097
|
-
|
|
21098
|
-
var uploadAttachmentToS3 = /*#__PURE__*/function () {
|
|
21099
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(businessId, healthFundId, file, opts) {
|
|
21100
|
-
var awsAxios, _yield$getAttachmentU, signedPost, s3Url, s3SignedUrlId, bodyFormData, key;
|
|
21101
|
-
|
|
21102
|
-
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
21103
|
-
while (1) {
|
|
21104
|
-
switch (_context9.prev = _context9.next) {
|
|
21105
|
-
case 0:
|
|
21106
|
-
awsAxios = axios.create();
|
|
21107
|
-
|
|
21108
|
-
if (businessId) {
|
|
21109
|
-
_context9.next = 3;
|
|
21110
|
-
break;
|
|
21111
|
-
}
|
|
21112
|
-
|
|
21113
|
-
throw new paramError.default('businessId');
|
|
21114
|
-
|
|
21115
|
-
case 3:
|
|
21116
|
-
if (healthFundId) {
|
|
21117
|
-
_context9.next = 5;
|
|
21118
|
-
break;
|
|
21119
|
-
}
|
|
21120
|
-
|
|
21121
|
-
throw new paramError.default('healthFundId');
|
|
21122
|
-
|
|
21123
|
-
case 5:
|
|
21124
|
-
if (file) {
|
|
21125
|
-
_context9.next = 7;
|
|
21126
|
-
break;
|
|
21127
|
-
}
|
|
21128
|
-
|
|
21129
|
-
throw new paramError.default('file');
|
|
21130
|
-
|
|
21131
|
-
case 7:
|
|
21132
|
-
_context9.prev = 7;
|
|
21133
|
-
_context9.next = 10;
|
|
21134
|
-
return getAttachmentUrl(businessId, {
|
|
21135
|
-
contentType: file.type,
|
|
21136
|
-
fileName: file.name,
|
|
21137
|
-
healthFundId: healthFundId,
|
|
21138
|
-
contentLength: file.size
|
|
21139
|
-
}, opts);
|
|
21140
|
-
|
|
21141
|
-
case 10:
|
|
21142
|
-
_yield$getAttachmentU = _context9.sent;
|
|
21143
|
-
signedPost = _yield$getAttachmentU.signedPost;
|
|
21144
|
-
s3Url = _yield$getAttachmentU.s3Url;
|
|
21145
|
-
s3SignedUrlId = _yield$getAttachmentU.s3SignedUrlId;
|
|
21146
|
-
// eslint-disable-next-line
|
|
21147
|
-
bodyFormData = new FormData();
|
|
21148
|
-
|
|
21149
|
-
for (key in signedPost.fields) {
|
|
21150
|
-
bodyFormData.append(key, signedPost.fields[key]);
|
|
21151
|
-
}
|
|
21152
|
-
|
|
21153
|
-
bodyFormData.append('file', file);
|
|
21154
|
-
_context9.next = 19;
|
|
21155
|
-
return awsAxios.post(signedPost.url, bodyFormData);
|
|
21156
|
-
|
|
21157
|
-
case 19:
|
|
21158
|
-
return _context9.abrupt("return", {
|
|
21159
|
-
s3Url: s3Url,
|
|
21160
|
-
s3SignedUrlId: s3SignedUrlId
|
|
21161
|
-
});
|
|
21162
|
-
|
|
21163
|
-
case 22:
|
|
21164
|
-
_context9.prev = 22;
|
|
21165
|
-
_context9.t0 = _context9["catch"](7);
|
|
21166
|
-
throw _context9.t0;
|
|
21167
|
-
|
|
21168
|
-
case 25:
|
|
21169
|
-
case "end":
|
|
21170
|
-
return _context9.stop();
|
|
21171
|
-
}
|
|
21172
|
-
}
|
|
21173
|
-
}, _callee9, null, [[7, 22]]);
|
|
21174
|
-
}));
|
|
21175
|
-
|
|
21176
|
-
return function uploadAttachmentToS3(_x30, _x31, _x32, _x33) {
|
|
21177
|
-
return _ref9.apply(this, arguments);
|
|
21178
|
-
};
|
|
21179
|
-
}();
|
|
21180
21057
|
|
|
21181
21058
|
var aws = /*#__PURE__*/Object.freeze({
|
|
21182
21059
|
__proto__: null,
|
|
@@ -21187,8 +21064,7 @@ var aws = /*#__PURE__*/Object.freeze({
|
|
|
21187
21064
|
uploadBusinessStaffMemberImageToS3: uploadBusinessStaffMemberImageToS3,
|
|
21188
21065
|
uploadInvoiceScanToS3: uploadInvoiceScanToS3,
|
|
21189
21066
|
uploadBulkUploadCSVToS3: uploadBulkUploadCSVToS3,
|
|
21190
|
-
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3
|
|
21191
|
-
uploadAttachmentToS3: uploadAttachmentToS3
|
|
21067
|
+
uploadKycTrustDocumentToS3: uploadKycTrustDocumentToS3
|
|
21192
21068
|
});
|
|
21193
21069
|
|
|
21194
21070
|
function ownKeys$1d(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; }
|
|
@@ -21561,7 +21437,7 @@ var DEFAULT_VERSION = 'v1';
|
|
|
21561
21437
|
var HEADER__APP_ID = 'x-appid';
|
|
21562
21438
|
var HEADER__APP_VERSION = 'x-appver';
|
|
21563
21439
|
var HEADER__API_VER = 'x-apiver';
|
|
21564
|
-
var HEADER__DEVICE_ID = 'x-deviceid';
|
|
21440
|
+
var HEADER__DEVICE_ID$1 = 'x-deviceid';
|
|
21565
21441
|
var HEADER__INTERCOM_HASH = 'x-intercom-hash';
|
|
21566
21442
|
var HEADER__SDK_VERSION = 'x-sdkver';
|
|
21567
21443
|
var HEADER__TOKEN = 'x-token';
|
|
@@ -21812,7 +21688,7 @@ var sdkClient = {
|
|
|
21812
21688
|
|
|
21813
21689
|
case 10:
|
|
21814
21690
|
deviceId = _context.sent;
|
|
21815
|
-
request.headers[HEADER__DEVICE_ID] = deviceId;
|
|
21691
|
+
request.headers[HEADER__DEVICE_ID$1] = deviceId;
|
|
21816
21692
|
|
|
21817
21693
|
case 12:
|
|
21818
21694
|
if (_this.requestInterceptorSuccess) {
|
|
@@ -22148,7 +22024,7 @@ exports.DEFAULT_VERSION = DEFAULT_VERSION;
|
|
|
22148
22024
|
exports.HEADER__API_VER = HEADER__API_VER;
|
|
22149
22025
|
exports.HEADER__APP_ID = HEADER__APP_ID;
|
|
22150
22026
|
exports.HEADER__APP_VERSION = HEADER__APP_VERSION;
|
|
22151
|
-
exports.HEADER__DEVICE_ID = HEADER__DEVICE_ID;
|
|
22027
|
+
exports.HEADER__DEVICE_ID = HEADER__DEVICE_ID$1;
|
|
22152
22028
|
exports.HEADER__INTERCOM_HASH = HEADER__INTERCOM_HASH;
|
|
22153
22029
|
exports.HEADER__SDK_VERSION = HEADER__SDK_VERSION;
|
|
22154
22030
|
exports.HEADER__TOKEN = HEADER__TOKEN;
|
|
@@ -22347,7 +22223,6 @@ exports.getAction = getAction;
|
|
|
22347
22223
|
exports.getActions = getActions;
|
|
22348
22224
|
exports.getApplication = getApplication;
|
|
22349
22225
|
exports.getApplications = getApplications;
|
|
22350
|
-
exports.getAttachmentUrl = getAttachmentUrl;
|
|
22351
22226
|
exports.getBsbDetails = getBsbDetails;
|
|
22352
22227
|
exports.getBulkUpload = getBulkUpload;
|
|
22353
22228
|
exports.getBulkUploadUrl = getBulkUploadUrl;
|
|
@@ -22415,7 +22290,6 @@ exports.getBusinessProducts = getBusinessProducts;
|
|
|
22415
22290
|
exports.getBusinessProfessionalCategories = getBusinessProfessionalCategories;
|
|
22416
22291
|
exports.getBusinessRNA = getBusinessRNA;
|
|
22417
22292
|
exports.getBusinessRNAs = getBusinessRNAs;
|
|
22418
|
-
exports.getBusinessS3SignedUrl = getBusinessS3SignedUrl;
|
|
22419
22293
|
exports.getBusinessSalesClientToken = getBusinessSalesClientToken;
|
|
22420
22294
|
exports.getBusinessService = getBusinessService;
|
|
22421
22295
|
exports.getBusinessServiceStaffMembers = getBusinessServiceStaffMembers;
|
|
@@ -22662,8 +22536,6 @@ exports.pathFunderValues = pathFunderValues;
|
|
|
22662
22536
|
exports.pathFunderValuesById = pathFunderValuesById;
|
|
22663
22537
|
exports.pathFuture = pathFuture;
|
|
22664
22538
|
exports.pathGetAbr = pathGetAbr;
|
|
22665
|
-
exports.pathGetAttachmentUrl = pathGetAttachmentUrl;
|
|
22666
|
-
exports.pathGetBusinessS3SignedUrl = pathGetBusinessS3SignedUrl;
|
|
22667
22539
|
exports.pathGetClaimAttachmentUrl = pathGetClaimAttachmentUrl;
|
|
22668
22540
|
exports.pathGetDraftProgressStatus = pathGetDraftProgressStatus;
|
|
22669
22541
|
exports.pathGetHealthFundTransactionExport = pathGetHealthFundTransactionExport;
|
|
@@ -22729,7 +22601,6 @@ exports.pathRequestVerificationSupport = pathRequestVerificationSupport;
|
|
|
22729
22601
|
exports.pathResetTerminal = pathResetTerminal;
|
|
22730
22602
|
exports.pathResumeComplexVerification = pathResumeComplexVerification;
|
|
22731
22603
|
exports.pathScanClaimFile = pathScanClaimFile;
|
|
22732
|
-
exports.pathScanFile = pathScanFile;
|
|
22733
22604
|
exports.pathSendReceipt = pathSendReceipt;
|
|
22734
22605
|
exports.pathSendWorkerMessage = pathSendWorkerMessage;
|
|
22735
22606
|
exports.pathSignUp = pathSignUp;
|
|
@@ -22803,7 +22674,6 @@ exports.saveDraft = saveDraft;
|
|
|
22803
22674
|
exports.saveDraftEclipseInPatientInvoice = saveDraftEclipseInPatientInvoice;
|
|
22804
22675
|
exports.saveDraftEclipseOverseasInvoice = saveDraftEclipseOverseasInvoice;
|
|
22805
22676
|
exports.scanClaimFile = scanClaimFile;
|
|
22806
|
-
exports.scanFile = scanFile;
|
|
22807
22677
|
exports.scoreAndSaveTransaction = scoreAndSaveTransaction;
|
|
22808
22678
|
exports.sdk = sdkClient;
|
|
22809
22679
|
exports.sdkClient = sdkClient;
|
|
@@ -22874,6 +22744,7 @@ exports.updateBusinessStaffMember = updateBusinessStaffMember;
|
|
|
22874
22744
|
exports.updateBusinessStaffMemberEmail = updateBusinessStaffMemberEmail;
|
|
22875
22745
|
exports.updateBusinessSubscription = updateBusinessSubscription;
|
|
22876
22746
|
exports.updateClaim = updateClaim;
|
|
22747
|
+
exports.updateDevice = updateDevice;
|
|
22877
22748
|
exports.updateDocAccount = updateDocAccount;
|
|
22878
22749
|
exports.updateEmailPackage = updateEmailPackage;
|
|
22879
22750
|
exports.updateHealthFund = updateHealthFund;
|
|
@@ -22895,7 +22766,6 @@ exports.updateService = updateService;
|
|
|
22895
22766
|
exports.updateStaffProviderSetItem = updateStaffProviderSetItem;
|
|
22896
22767
|
exports.updateTerminal = updateTerminal;
|
|
22897
22768
|
exports.updateTransaction = updateTransaction;
|
|
22898
|
-
exports.uploadAttachmentToS3 = uploadAttachmentToS3;
|
|
22899
22769
|
exports.uploadBulkUploadCSVToS3 = uploadBulkUploadCSVToS3;
|
|
22900
22770
|
exports.uploadBusinessPracticeImageToS3 = uploadBusinessPracticeImageToS3;
|
|
22901
22771
|
exports.uploadBusinessStaffMemberImageToS3 = uploadBusinessStaffMemberImageToS3;
|