oro-sdk-apis 1.5.0 → 1.6.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.
@@ -1,5 +1,5 @@
1
1
  import { PracticeAccount, Uuid } from '../models';
2
- import { Assignment, PlanType, Practice, PracticeConfigKind, PracticeConfigs, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice';
2
+ import { Assignment, PlanType, Practice, PracticeConfigKind, PracticeConfigs, PracticeInvoice, PracticePayment, PracticePaymentIntent, PracticePlan, PracticePlanPrices, PracticeWorkflow, PracticeWorkflowWithTagSpecialty, Practitioner, PractitionerLicense, PractitionerPreference, PractitionerQuota, PractitionerRole, WorkflowType } from '../models/practice';
3
3
  import { APIService } from './api';
4
4
  export declare class PracticeService {
5
5
  private api;
@@ -65,6 +65,12 @@ export declare class PracticeService {
65
65
  practiceCreatePaymentsIntent(practiceUuid: Uuid, planId: number, userEmail: string, isoLocality?: string, url_subdomain?: string, promotionCode?: string): Promise<PracticePaymentIntent>;
66
66
  practiceGetPaymentsIntent(practiceUuid: Uuid, paymentIntentId: number): Promise<PracticePaymentIntent>;
67
67
  practiceUpdatePaymentsIntent(practiceUuid: string, idPraticePaymentIntent: number, practicePaymentIntent: PracticePaymentIntent, userEmail: string, promotionCode?: string): Promise<PracticePaymentIntent>;
68
+ /**
69
+ * Invoice
70
+ * @param practiceUuid UUID of the practice to get the invoice from
71
+ * @param invoiceId ID of the invoice in stripe
72
+ */
73
+ getInvoice(practiceUuid: Uuid, invoiceId: string): Promise<PracticeInvoice>;
68
74
  practiceGetPractitioners(practiceUuid: Uuid): Promise<Practitioner[]>;
69
75
  practiceUpdatePractitioner(practiceUuid: Uuid, practitionerUuid: Uuid, requestBody: Practitioner): Promise<Practitioner>;
70
76
  practiceGetPractitioner(practiceUuid: Uuid, practitionerUuid: Uuid): Promise<Practitioner>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0",
2
+ "version": "1.6.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -104,6 +104,7 @@ export interface DrugPrescription {
104
104
  export interface TreatmentAndDrugPrescription {
105
105
  treatment?: Treatment
106
106
  prescriptionsAndDrugs?: DrugPrescription[]
107
+ notes?: string
107
108
  status: PlanStatus
108
109
  uuidTreatmentPlan: string
109
110
  }
@@ -161,10 +161,7 @@ export type PracticeConfigPracticeCookieBanner = PracticeConfig<
161
161
  >
162
162
 
163
163
  // This type is for demonstration only for now
164
- export type PracticeConfigPracticeTheme = PracticeConfig<
165
- PracticeConfigKind.PracticeTheme,
166
- { primaryColor?: string }
167
- >
164
+ export type PracticeConfigPracticeTheme = PracticeConfig<PracticeConfigKind.PracticeTheme, { primaryColor?: string }>
168
165
 
169
166
  export type PracticeConfigs =
170
167
  | PracticeConfigPractitionerConsultList
@@ -409,3 +406,11 @@ export interface PracticeSubscription {
409
406
  idMailChimpAudience: string
410
407
  isoLanguage: string
411
408
  }
409
+
410
+ export interface PracticeInvoice {
411
+ id: string //Stripe invoice ID
412
+ total: number
413
+ subtotal: number
414
+ currency: string
415
+ discount: number
416
+ }
@@ -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'
@@ -7,6 +7,7 @@ import {
7
7
  Practice,
8
8
  PracticeConfigKind,
9
9
  PracticeConfigs,
10
+ PracticeInvoice,
10
11
  PracticePayment,
11
12
  PracticePaymentIntent,
12
13
  PracticePlan,
@@ -219,6 +220,20 @@ export class PracticeService {
219
220
  )
220
221
  }
221
222
 
223
+ /**
224
+ * Invoice
225
+ * @param practiceUuid UUID of the practice to get the invoice from
226
+ * @param invoiceId ID of the invoice in stripe
227
+ */
228
+ public getInvoice(
229
+ practiceUuid: Uuid,
230
+ invoiceId: string
231
+ ): Promise<PracticeInvoice> {
232
+ return this.api.get<PracticeInvoice>(
233
+ `${this.baseURL}/v1/practices/${practiceUuid}/payments/invoices/${invoiceId}`,
234
+ )
235
+ }
236
+
222
237
  // Practitioner
223
238
  public practiceGetPractitioners(practiceUuid: Uuid): Promise<Practitioner[]> {
224
239
  return this.api.get<Practitioner[]>(`${this.baseURL}/v1/practices/${practiceUuid}/practitioners`)
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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.