oro-sdk-apis 1.1.0 → 1.5.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 ORO Health Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -11,6 +11,7 @@ ORO SDK apis package is intended to be run in browser or Node.js environment. It
11
11
  ## Local development
12
12
 
13
13
  > If you cannot see Jest types try opening this folder in a seperate VSCode window.
14
+
14
15
  ### Set up project
15
16
 
16
17
  ```bash
@@ -29,7 +30,17 @@ npm build # build
29
30
  If you need to link `oro-sdk-apis` to app please see https://github.com/OROHealth/oro-apis/blob/main/sdk/ts/README.md#linking-the-sdk-locally
30
31
 
31
32
  In all cases (node.js or app), you need to use:
33
+
32
34
  ```bash
33
35
  npm install
34
36
  npm run link:watch
35
- ```
37
+ ```
38
+
39
+ ### Publishing package
40
+
41
+ 1. (Only first time) Locally run `npm login` and use the creds in 1password (tech-team-oro) . This will create ~/.npmrc . You will require a OTP but it's sent on tech@orohealth.me so you should all have it.
42
+ 2. Run `docker-compose up --build sdk-apis-publisher`
43
+
44
+ #### Publishing `oro-sdk` and `oro-sdk-apis`
45
+
46
+ Cf. https://github.com/OROHealth/oro-apis/blob/bc91807d8059c9b50cb602f83911969188253d0f/sdk/ts/README.md#publishing-oro-sdk-and-oro-sdk-apis`
@@ -1,8 +1,10 @@
1
- export declare enum DiagnosisType {
1
+ export declare enum VisibilityType {
2
2
  Generic = "Generic",
3
3
  Private = "Private",
4
4
  Instance = "Instance"
5
5
  }
6
+ export declare type DiagnosisType = VisibilityType;
7
+ export declare type TreatmentType = VisibilityType;
6
8
  export interface DiagnosisRequest {
7
9
  uuid?: string;
8
10
  name: string;
@@ -25,10 +27,12 @@ export interface TreatmentRequest {
25
27
  name: string;
26
28
  description: string;
27
29
  urlMultimedia?: string;
30
+ type?: TreatmentType;
28
31
  }
29
32
  export interface Treatment extends TreatmentRequest {
30
33
  uuid: string;
31
34
  uuidDiagnosis: string;
35
+ uuidPractitioner?: string;
32
36
  createdAt: string;
33
37
  }
34
38
  export declare enum DrugType {
@@ -37,10 +41,11 @@ export declare enum DrugType {
37
41
  }
38
42
  export interface DrugRequest {
39
43
  name: string;
40
- description: string;
44
+ description?: string;
41
45
  type: DrugType;
42
46
  language: string;
43
- sideEffects: string;
47
+ posology?: string;
48
+ sideEffects?: string;
44
49
  imageUrl?: string;
45
50
  parentUuid?: string;
46
51
  uuid?: string;
@@ -74,6 +79,7 @@ export interface TreatmentPlan {
74
79
  uuidConsult: string;
75
80
  uuidDiagnosis: string;
76
81
  uuidTreatment?: string;
82
+ notes?: string;
77
83
  status: PlanStatus;
78
84
  }
79
85
  export interface DrugPrescription {
@@ -99,6 +105,7 @@ export interface TreatmentAndDrugPrescriptionRequest {
99
105
  trackingId: string;
100
106
  treatment: TreatmentRequest;
101
107
  prescriptionsAndDrugs?: DrugPrescriptionRequest[];
108
+ notes?: string;
102
109
  }
103
110
  export interface TreatmentPlansRequest {
104
111
  uuidConsult: string;
@@ -108,6 +115,7 @@ export interface TreatmentPlansRequest {
108
115
  export interface TreatmentAndDrugPrescriptionUpdateRequest {
109
116
  treatment: Treatment;
110
117
  prescriptionsAndDrugs?: DrugPrescriptionRequest[];
118
+ notes?: string;
111
119
  }
112
120
  export interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {
113
121
  uuidConsult: string;
@@ -20,6 +20,7 @@ export interface AuthRecoverRequest {
20
20
  practiceUuid: string;
21
21
  email: string;
22
22
  }
23
+ export declare type IdentityResendConfirmEmailRequest = AuthRecoverRequest;
23
24
  export interface WhoAmIResponse {
24
25
  aud: string;
25
26
  exp: number;
@@ -1191,11 +1191,11 @@ var APIService = /*#__PURE__*/function (_AxiosService) {
1191
1191
  TaskStatus["Done"] = "Done";
1192
1192
  })(exports.TaskStatus || (exports.TaskStatus = {}));
1193
1193
 
1194
- (function (DiagnosisType) {
1195
- DiagnosisType["Generic"] = "Generic";
1196
- DiagnosisType["Private"] = "Private";
1197
- DiagnosisType["Instance"] = "Instance";
1198
- })(exports.DiagnosisType || (exports.DiagnosisType = {}));
1194
+ (function (VisibilityType) {
1195
+ VisibilityType["Generic"] = "Generic";
1196
+ VisibilityType["Private"] = "Private";
1197
+ VisibilityType["Instance"] = "Instance";
1198
+ })(exports.VisibilityType || (exports.VisibilityType = {}));
1199
1199
 
1200
1200
  (function (DrugType) {
1201
1201
  DrugType["Generic"] = "Generic";
@@ -2202,6 +2202,38 @@ var GuardService = /*#__PURE__*/function () {
2202
2202
  }
2203
2203
 
2204
2204
  return identityMFAQRCode;
2205
+ }()
2206
+ /**
2207
+ * Attempt to resend the email confirmation email
2208
+ *
2209
+ * @param req IdentityResendConfirmEmailRequest
2210
+ * @return void
2211
+ */
2212
+ ;
2213
+
2214
+ _proto.identitySendConfirmEmail =
2215
+ /*#__PURE__*/
2216
+ function () {
2217
+ var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(req) {
2218
+ return runtime_1.wrap(function _callee10$(_context10) {
2219
+ while (1) {
2220
+ switch (_context10.prev = _context10.next) {
2221
+ case 0:
2222
+ return _context10.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
2223
+
2224
+ case 1:
2225
+ case "end":
2226
+ return _context10.stop();
2227
+ }
2228
+ }
2229
+ }, _callee10, this);
2230
+ }));
2231
+
2232
+ function identitySendConfirmEmail(_x11) {
2233
+ return _identitySendConfirmEmail.apply(this, arguments);
2234
+ }
2235
+
2236
+ return identitySendConfirmEmail;
2205
2237
  }();
2206
2238
 
2207
2239
  return GuardService;