oro-sdk-apis 1.36.0 → 1.38.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.
@@ -56,6 +56,14 @@ export interface Drug extends DrugRequest {
56
56
  uuidPractitioner?: string;
57
57
  createdAt: string;
58
58
  }
59
+ /**
60
+ * Status of the prescription
61
+ * Right now, it only serves a soft delete flag
62
+ */
63
+ export declare enum PrescriptionStatus {
64
+ Existing = "Existing",
65
+ Deleted = "Deleted"
66
+ }
59
67
  export interface PrescriptionRequest {
60
68
  uuid?: string;
61
69
  uuidTreatment?: string;
@@ -67,6 +75,7 @@ export interface PrescriptionRequest {
67
75
  export interface Prescription extends PrescriptionRequest {
68
76
  uuid: string;
69
77
  uuidTreatment: string;
78
+ status: PrescriptionStatus;
70
79
  createdAt: string;
71
80
  }
72
81
  export declare enum PlanStatus {
@@ -11,3 +11,4 @@ export * from './workflow';
11
11
  export * from './external';
12
12
  export * from './user';
13
13
  export * from './teller';
14
+ export * from './search';
@@ -1,4 +1,4 @@
1
- import { APIService, ConsultService, DiagnosisService, GuardService, PracticeService, TellerService, VaultService, WorkflowService } from '../services';
1
+ import { APIService, ConsultService, DiagnosisService, GuardService, SearchService, PracticeService, TellerService, VaultService, WorkflowService } from '../services';
2
2
  /**
3
3
  * This interface represents a collection of service urls you need to initialize
4
4
  */
@@ -6,6 +6,7 @@ export interface ServiceCollectionRequest {
6
6
  tellerBaseURL?: string;
7
7
  vaultBaseURL?: string;
8
8
  guardBaseURL?: string;
9
+ searchBaseURL?: string;
9
10
  practiceBaseURL?: string;
10
11
  consultBaseURL?: string;
11
12
  workflowBaseURL?: string;
@@ -21,6 +22,7 @@ export interface ServiceCollection {
21
22
  consultService?: ConsultService;
22
23
  vaultService?: VaultService;
23
24
  guardService?: GuardService;
25
+ searchService?: SearchService;
24
26
  workflowService?: WorkflowService;
25
27
  diagnosisService?: DiagnosisService;
26
28
  }
@@ -371,7 +371,10 @@ export interface PracticePaymentIntent {
371
371
  numPlatformFeeAmount: number;
372
372
  idStripeInvoice: string;
373
373
  idStripePaymtIntent: string;
374
- stripeClientSecret: string;
374
+ /**
375
+ * This value is set only after the PracticePaymentIntent has been finalized and ready to be paid
376
+ */
377
+ stripeClientSecret?: string;
375
378
  dateCreatedAt?: Date;
376
379
  dateUpdateAt?: Date;
377
380
  }
@@ -0,0 +1,28 @@
1
+ export interface SearchRequest {
2
+ terms: Terms;
3
+ }
4
+ export interface SearchResponse {
5
+ results: SearchResult[];
6
+ }
7
+ export interface SearchResult {
8
+ consultUUID: string;
9
+ kind: string;
10
+ score: number;
11
+ }
12
+ export interface IndexRequest {
13
+ consultUUID: string;
14
+ terms: Terms;
15
+ }
16
+ export declare type Terms = Term[];
17
+ export interface Term {
18
+ kind?: string;
19
+ value: string;
20
+ }
21
+ export declare enum IndexKind {
22
+ consultUuid = 0,
23
+ consultShortid = 1,
24
+ firstName = 2,
25
+ lastName = 3,
26
+ healthId = 4,
27
+ dob = 5
28
+ }
@@ -954,6 +954,11 @@ var ApisPracticeManager = /*#__PURE__*/function () {
954
954
  DrugType["Instance"] = "Instance";
955
955
  })(exports.DrugType || (exports.DrugType = {}));
956
956
 
957
+ (function (PrescriptionStatus) {
958
+ PrescriptionStatus["Existing"] = "Existing";
959
+ PrescriptionStatus["Deleted"] = "Deleted";
960
+ })(exports.PrescriptionStatus || (exports.PrescriptionStatus = {}));
961
+
957
962
  (function (PlanStatus) {
958
963
  PlanStatus["Pending"] = "Pending";
959
964
  PlanStatus["Accepted"] = "Accepted";
@@ -1190,6 +1195,15 @@ var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
1190
1195
  MetadataCategory["Raw"] = "Raw";
1191
1196
  })(exports.MetadataCategory || (exports.MetadataCategory = {}));
1192
1197
 
1198
+ (function (IndexKind) {
1199
+ IndexKind[IndexKind["consultUuid"] = 0] = "consultUuid";
1200
+ IndexKind[IndexKind["consultShortid"] = 1] = "consultShortid";
1201
+ IndexKind[IndexKind["firstName"] = 2] = "firstName";
1202
+ IndexKind[IndexKind["lastName"] = 3] = "lastName";
1203
+ IndexKind[IndexKind["healthId"] = 4] = "healthId";
1204
+ IndexKind[IndexKind["dob"] = 5] = "dob";
1205
+ })(exports.IndexKind || (exports.IndexKind = {}));
1206
+
1193
1207
  var ConsultService = /*#__PURE__*/function () {
1194
1208
  function ConsultService(api, baseURL) {
1195
1209
  this.api = api;
@@ -2164,6 +2178,41 @@ var GuardService = /*#__PURE__*/function () {
2164
2178
  return GuardService;
2165
2179
  }();
2166
2180
 
2181
+ var SearchService = /*#__PURE__*/function () {
2182
+ function SearchService(api, baseURL) {
2183
+ this.api = api;
2184
+ this.baseURL = baseURL;
2185
+ }
2186
+ /**
2187
+ * Creates search indexes for the terms passed in order to be able to search for it in the future
2188
+ * @param consultUUID
2189
+ * @param terms the search terms to be indexed
2190
+ */
2191
+
2192
+
2193
+ var _proto = SearchService.prototype;
2194
+
2195
+ _proto.index = function index(consultUUID, terms) {
2196
+ return this.api.post(this.baseURL + "/v1/search", {
2197
+ consultUUID: consultUUID,
2198
+ terms: terms
2199
+ });
2200
+ }
2201
+ /**
2202
+ * Searches for the consultations corresponding to the search terms entered in the query
2203
+ * @param terms array of search terms
2204
+ */
2205
+ ;
2206
+
2207
+ _proto.search = function search(terms) {
2208
+ return this.api.post(this.baseURL + "/v1/search", {
2209
+ terms: terms
2210
+ });
2211
+ };
2212
+
2213
+ return SearchService;
2214
+ }();
2215
+
2167
2216
  var PracticeService = /*#__PURE__*/function () {
2168
2217
  function PracticeService(api, baseURL) {
2169
2218
  this.api = api;
@@ -2340,14 +2389,26 @@ var PracticeService = /*#__PURE__*/function () {
2340
2389
 
2341
2390
  _proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
2342
2391
  return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
2343
- };
2392
+ }
2393
+ /**
2394
+ * Updates a PracticePaymentIntent
2395
+ * @param practiceUuid the practice uuid
2396
+ * @param idPraticePaymentIntent the id of the PracticePaymentIntent to update
2397
+ * @param practicePaymentIntent the desired PracticePaymentIntent
2398
+ * @param userEmail the email of the user
2399
+ * @param promotionCode (optional) promotional code to apply
2400
+ * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
2401
+ * @returns the updated PracticePaymentIntent
2402
+ */
2403
+ ;
2344
2404
 
2345
- _proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode) {
2405
+ _proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
2346
2406
  return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
2347
2407
  hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
2348
2408
  }), {
2349
2409
  params: {
2350
- promotionCode: promotionCode
2410
+ promotionCode: promotionCode,
2411
+ finalize: finalize
2351
2412
  }
2352
2413
  });
2353
2414
  }
@@ -3044,6 +3105,7 @@ var init = function init(services, authenticationCallback, useLocalStorage) {
3044
3105
  consultBaseURL = services.consultBaseURL,
3045
3106
  vaultBaseURL = services.vaultBaseURL,
3046
3107
  guardBaseURL = services.guardBaseURL,
3108
+ searchBaseURL = services.searchBaseURL,
3047
3109
  workflowBaseURL = services.workflowBaseURL,
3048
3110
  diagnosisBaseURL = services.diagnosisBaseURL;
3049
3111
  var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
@@ -3054,6 +3116,7 @@ var init = function init(services, authenticationCallback, useLocalStorage) {
3054
3116
  consultService: consultBaseURL ? new ConsultService(apiService, consultBaseURL) : undefined,
3055
3117
  vaultService: vaultBaseURL ? new VaultService(apiService, vaultBaseURL) : undefined,
3056
3118
  guardService: guardBaseURL ? new GuardService(apiService, guardBaseURL) : undefined,
3119
+ searchService: searchBaseURL ? new SearchService(apiService, searchBaseURL) : undefined,
3057
3120
  workflowService: workflowBaseURL ? new WorkflowService(apiService, workflowBaseURL) : undefined,
3058
3121
  diagnosisService: diagnosisBaseURL ? new DiagnosisService(apiService, diagnosisBaseURL) : undefined
3059
3122
  };
@@ -3073,6 +3136,7 @@ exports.IdentityCreationBadRequest = IdentityCreationBadRequest;
3073
3136
  exports.IdentityCreationConflict = IdentityCreationConflict;
3074
3137
  exports.IdentityCreationFailed = IdentityCreationFailed;
3075
3138
  exports.PracticeService = PracticeService;
3139
+ exports.SearchService = SearchService;
3076
3140
  exports.TellerService = TellerService;
3077
3141
  exports.VaultService = VaultService;
3078
3142
  exports.WorkflowService = WorkflowService;