oro-sdk-apis 1.3.0 → 1.5.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.
@@ -1,5 +1,5 @@
1
1
  import type { AxiosAuthRefreshRequestConfig } from 'axios-auth-refresh';
2
- import { AuthRecoverRequest, AuthTokenRequest, AuthTokenResponse, Base64String, IdentityCreateRequest, IdentityResponse, IdentityUpdateRequest, QRCodeResponse, Tokens, Uuid, WhoAmIResponse } from '../models';
2
+ import { AuthRecoverRequest, AuthTokenRequest, AuthTokenResponse, Base64String, IdentityCreateRequest, IdentityResendConfirmEmailRequest, IdentityResponse, IdentityUpdateRequest, QRCodeResponse, Tokens, Uuid, WhoAmIResponse } from '../models';
3
3
  import { APIService } from './api';
4
4
  export interface GuardRequestConfig extends AxiosAuthRefreshRequestConfig {
5
5
  useRefreshToken: boolean;
@@ -89,4 +89,11 @@ export declare class GuardService {
89
89
  * @returns QRCodeResponse
90
90
  */
91
91
  identityMFAQRCode(identityID: Uuid, password: Base64String): Promise<QRCodeResponse>;
92
+ /**
93
+ * Attempt to resend the email confirmation email
94
+ *
95
+ * @param req IdentityResendConfirmEmailRequest
96
+ * @return void
97
+ */
98
+ identitySendConfirmEmail(req: IdentityResendConfirmEmailRequest): Promise<void>;
92
99
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.1",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -38,6 +38,7 @@ export interface TreatmentRequest {
38
38
  export interface Treatment extends TreatmentRequest {
39
39
  uuid: string
40
40
  uuidDiagnosis: string
41
+ uuidPractitioner?: string
41
42
  createdAt: string
42
43
  }
43
44
 
@@ -57,6 +58,7 @@ export interface DrugRequest {
57
58
  parentUuid?: string // (optional) parent uuid of the drug. In case of DrugType.Instance
58
59
  uuid?: string // uuid of the drug (will be used as parentUuid in case of creation of new drug)
59
60
  }
61
+
60
62
  export interface Drug extends DrugRequest {
61
63
  uuid: string
62
64
  uuidPractice: string
@@ -90,6 +92,7 @@ export interface TreatmentPlan {
90
92
  uuidConsult: string
91
93
  uuidDiagnosis: string
92
94
  uuidTreatment?: string
95
+ notes?: string
93
96
  status: PlanStatus
94
97
  }
95
98
 
@@ -119,6 +122,7 @@ export interface TreatmentAndDrugPrescriptionRequest {
119
122
  trackingId: string
120
123
  treatment: TreatmentRequest
121
124
  prescriptionsAndDrugs?: DrugPrescriptionRequest[]
125
+ notes?: string
122
126
  }
123
127
 
124
128
  export interface TreatmentPlansRequest {
@@ -130,6 +134,7 @@ export interface TreatmentPlansRequest {
130
134
  export interface TreatmentAndDrugPrescriptionUpdateRequest {
131
135
  treatment: Treatment
132
136
  prescriptionsAndDrugs?: DrugPrescriptionRequest[]
137
+ notes?: string
133
138
  }
134
139
 
135
140
  export interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {
@@ -26,6 +26,8 @@ export interface AuthRecoverRequest {
26
26
  email: string
27
27
  }
28
28
 
29
+ export type IdentityResendConfirmEmailRequest = AuthRecoverRequest
30
+
29
31
  export interface WhoAmIResponse {
30
32
  aud: string
31
33
  exp: number
@@ -23,6 +23,12 @@ export interface RadioInputData extends ChoiceInputData {
23
23
  export interface RadioCardInputData extends RadioInputData {
24
24
  bodyText: string
25
25
  }
26
+
27
+ export interface LanguagePickerData extends ChoiceInputData {
28
+ flag: string // iso3166-1
29
+ locale: string
30
+ }
31
+
26
32
  export interface EntryData {
27
33
  id?: number
28
34
  label?: string
@@ -46,8 +52,7 @@ export enum MetadataCategory { //these are generic metadata categories
46
52
  Raw = 'Raw',
47
53
  }
48
54
 
49
- export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>>
50
- extends EntryData {
55
+ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends EntryData {
51
56
  kind: T
52
57
  metaCategory: MetadataCategory
53
58
  answers?: A
@@ -57,10 +62,7 @@ export interface GenericQuestionData<T, A = IndexedData<ChoiceInputData>>
57
62
  value?: string
58
63
  }
59
64
 
60
- export interface GroupedGenericQuestionData<
61
- T,
62
- A = IndexedData<ChoiceInputData>
63
- > extends GenericQuestionData<T, A> {
65
+ export interface GroupedGenericQuestionData<T, A = IndexedData<ChoiceInputData>> extends GenericQuestionData<T, A> {
64
66
  inline?: boolean
65
67
  inlineLabel?: boolean
66
68
  order?: number
@@ -69,21 +71,12 @@ export interface GroupedGenericQuestionData<
69
71
  export type QuestionData =
70
72
  | GenericQuestionData<'title' | 'paragraph' | 'checkbox', void>
71
73
  | GenericQuestionData<
72
- | 'text'
73
- | 'date'
74
- | 'number'
75
- | 'images'
76
- | 'images-alias'
77
- | 'body-parts'
78
- | 'pharmacy-picker'
79
- | 'place-address'
80
- >
81
- | GenericQuestionData<
82
- 'checkbox-group' | 'select' | 'multiple',
83
- IndexedData<ChoiceInputData>
74
+ 'text' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker' | 'place-address'
84
75
  >
76
+ | GenericQuestionData<'checkbox-group' | 'select' | 'multiple', IndexedData<ChoiceInputData>>
85
77
  | GroupedGenericQuestionData<'radio', IndexedData<RadioInputData>>
86
78
  | GroupedGenericQuestionData<'radio-card', IndexedData<RadioCardInputData>>
79
+ | GroupedGenericQuestionData<'language-picker', IndexedData<LanguagePickerData>>
87
80
 
88
81
  export interface FieldData {
89
82
  type: 'field'
@@ -4,7 +4,7 @@ import {
4
4
  AuthenticationBadRequest,
5
5
  AuthenticationFailed, AuthenticationServerError, AuthenticationUnconfirmedEmail, AuthRecoverRequest, AuthTokenRequest,
6
6
  AuthTokenResponse, Base64String, IdentityCreateRequest, IdentityCreationBadRequest,
7
- IdentityCreationConflict, IdentityCreationFailed, IdentityResponse, IdentityUpdateRequest, QRCodeRequest,
7
+ IdentityCreationConflict, IdentityCreationFailed, IdentityResendConfirmEmailRequest, IdentityResponse, IdentityUpdateRequest, QRCodeRequest,
8
8
  QRCodeResponse, Tokens, Uuid,
9
9
  WhoAmIResponse
10
10
  } from '../models'
@@ -214,5 +214,15 @@ export class GuardService {
214
214
  const req: QRCodeRequest = { password }
215
215
  return this.api.post<QRCodeResponse>(`${this.baseURL}/v1/identities/${identityID}/mfa`, req, { headers: { 'Accept': 'application/json' } })
216
216
  }
217
+
218
+ /**
219
+ * Attempt to resend the email confirmation email
220
+ *
221
+ * @param req IdentityResendConfirmEmailRequest
222
+ * @return void
223
+ */
224
+ public async identitySendConfirmEmail(req : IdentityResendConfirmEmailRequest): Promise<void> {
225
+ return this.api.post<void>(`${this.baseURL}/v1/identity/confirm`, req)
226
+ }
217
227
  }
218
228