oro-sdk-apis 3.5.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/workflow.d.ts +6 -0
- package/dist/oro-sdk-apis.cjs.development.js +24 -10
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +26 -11
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/apisPracticeManager.d.ts +2 -2
- package/dist/services/practice.d.ts +6 -0
- package/package.json +1 -1
- package/src/models/workflow.ts +24 -17
- package/src/services/apisPracticeManager.ts +5 -4
- package/src/services/practice.ts +13 -4
package/dist/oro-sdk-apis.esm.js
CHANGED
@@ -663,18 +663,19 @@ var ApisPracticeManager = /*#__PURE__*/function () {
|
|
663
663
|
function () {
|
664
664
|
var _get = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practiceUuid) {
|
665
665
|
var _this = this;
|
666
|
-
var practiceInstance, newPracticeInstance, authTokenFunc;
|
666
|
+
var cacheKey, practiceInstance, newPracticeInstance, authTokenFunc;
|
667
667
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
668
668
|
while (1) {
|
669
669
|
switch (_context2.prev = _context2.next) {
|
670
670
|
case 0:
|
671
|
-
|
671
|
+
cacheKey = practiceUuid != null ? practiceUuid : 'none';
|
672
|
+
practiceInstance = this.practiceInstances.get(cacheKey);
|
672
673
|
if (!practiceInstance) {
|
673
|
-
_context2.next =
|
674
|
+
_context2.next = 4;
|
674
675
|
break;
|
675
676
|
}
|
676
677
|
return _context2.abrupt("return", practiceInstance);
|
677
|
-
case
|
678
|
+
case 4:
|
678
679
|
newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage); // Create one auth token callback per practice since the practice uuid needs to change
|
679
680
|
authTokenFunc = /*#__PURE__*/function () {
|
680
681
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
@@ -704,14 +705,14 @@ var ApisPracticeManager = /*#__PURE__*/function () {
|
|
704
705
|
return _ref.apply(this, arguments);
|
705
706
|
};
|
706
707
|
}(); // Initialize the M2M token
|
707
|
-
_context2.next =
|
708
|
+
_context2.next = 8;
|
708
709
|
return authTokenFunc();
|
709
|
-
case
|
710
|
+
case 8:
|
710
711
|
// Set the refresh tokens callback
|
711
712
|
newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc);
|
712
|
-
this.practiceInstances.set(
|
713
|
+
this.practiceInstances.set(cacheKey, newPracticeInstance);
|
713
714
|
return _context2.abrupt("return", newPracticeInstance);
|
714
|
-
case
|
715
|
+
case 11:
|
715
716
|
case "end":
|
716
717
|
return _context2.stop();
|
717
718
|
}
|
@@ -1080,6 +1081,12 @@ var DocumentType;
|
|
1080
1081
|
DocumentType["ImageAlias"] = "ImageAlias";
|
1081
1082
|
})(DocumentType || (DocumentType = {}));
|
1082
1083
|
|
1084
|
+
var InputApplyFunctions;
|
1085
|
+
(function (InputApplyFunctions) {
|
1086
|
+
InputApplyFunctions["MakeUpperCase"] = "MakeUpperCase";
|
1087
|
+
InputApplyFunctions["MakeLowerCase"] = "MakeLowerCase";
|
1088
|
+
InputApplyFunctions["RemoveAllSpaces"] = "RemoveAllSpaces";
|
1089
|
+
})(InputApplyFunctions || (InputApplyFunctions = {}));
|
1083
1090
|
var MetadataCategory;
|
1084
1091
|
(function (MetadataCategory) {
|
1085
1092
|
MetadataCategory["ChildPersonal"] = "ChildPersonal";
|
@@ -1966,6 +1973,15 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1966
1973
|
this.api = api;
|
1967
1974
|
this.baseURL = baseURL;
|
1968
1975
|
}
|
1976
|
+
/**
|
1977
|
+
* This function will only work if the service is initialized with
|
1978
|
+
* an M2M with the scope `practice.practices.get`
|
1979
|
+
* @returns an array of practices
|
1980
|
+
*/
|
1981
|
+
var _proto = PracticeService.prototype;
|
1982
|
+
_proto.practiceGetAll = function practiceGetAll() {
|
1983
|
+
return this.api.get(this.baseURL + "/v1/practices");
|
1984
|
+
}
|
1969
1985
|
/**
|
1970
1986
|
* This function get the practice from the URL of a practice
|
1971
1987
|
* It is the entry point of our web apps
|
@@ -1973,8 +1989,7 @@ var PracticeService = /*#__PURE__*/function () {
|
|
1973
1989
|
* @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set
|
1974
1990
|
* @param accounts (optional) if set true it the Practice field accounts will be set
|
1975
1991
|
* @returns the found practice or undefined
|
1976
|
-
|
1977
|
-
var _proto = PracticeService.prototype;
|
1992
|
+
*/;
|
1978
1993
|
_proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
|
1979
1994
|
return this.api.get(this.baseURL + "/v1/practices", {
|
1980
1995
|
params: _extends({
|
@@ -2763,5 +2778,5 @@ var init = function init(services, authenticationCallback, useLocalStorage) {
|
|
2763
2778
|
};
|
2764
2779
|
|
2765
2780
|
export default init;
|
2766
|
-
export { APIService, ApisPracticeManager, AssignmentStatus, AssistantType, AuthenticationBadRequest, AuthenticationFailed, AuthenticationServerError, AuthenticationUnconfirmedEmail, AxiosService, ClosedReasonType, ConsultService, ConsultType, DiagnosisService, DocumentType, DrugType, FeeStatus, GuardService, IdentityCreationBadRequest, IdentityCreationConflict, IdentityCreationFailed, IndexKey, IndexKind, LicenseStatus, MedicalStatus, MetadataCategory, OtherRoleType, PaymentIntentRequestMetadataKind, PaymentStatus, PeriodType, PlanStatus, PlanType, PracticeConfigKind, PracticeEmailKind, PracticeService, PractitionerStatus, PractitionnerRoleType, PrescriptionStatus, RateDimension, SearchService, StripePriceType, SyncStatus, TaskStatus, TellerService, TransmissionKind, TransmissionStatus, VaultDataMissing, VaultService, VisibilityType, WorkflowService, WorkflowType, hashToBase64String, init };
|
2781
|
+
export { APIService, ApisPracticeManager, AssignmentStatus, AssistantType, AuthenticationBadRequest, AuthenticationFailed, AuthenticationServerError, AuthenticationUnconfirmedEmail, AxiosService, ClosedReasonType, ConsultService, ConsultType, DiagnosisService, DocumentType, DrugType, FeeStatus, GuardService, IdentityCreationBadRequest, IdentityCreationConflict, IdentityCreationFailed, IndexKey, IndexKind, InputApplyFunctions, LicenseStatus, MedicalStatus, MetadataCategory, OtherRoleType, PaymentIntentRequestMetadataKind, PaymentStatus, PeriodType, PlanStatus, PlanType, PracticeConfigKind, PracticeEmailKind, PracticeService, PractitionerStatus, PractitionnerRoleType, PrescriptionStatus, RateDimension, SearchService, StripePriceType, SyncStatus, TaskStatus, TellerService, TransmissionKind, TransmissionStatus, VaultDataMissing, VaultService, VisibilityType, WorkflowService, WorkflowType, hashToBase64String, init };
|
2767
2782
|
//# sourceMappingURL=oro-sdk-apis.esm.js.map
|