oro-sdk-apis 1.5.2 → 1.6.0-dev1

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.2",
2
+ "version": "1.6.0-dev1",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -94,6 +94,8 @@ export interface TreatmentPlan {
94
94
  uuidTreatment?: string
95
95
  notes?: string
96
96
  status: PlanStatus
97
+ decidedAt: string
98
+ createdAt: string
97
99
  }
98
100
 
99
101
  export interface DrugPrescription {
@@ -107,6 +109,8 @@ export interface TreatmentAndDrugPrescription {
107
109
  notes?: string
108
110
  status: PlanStatus
109
111
  uuidTreatmentPlan: string
112
+ decidedAt: string
113
+ createdAt: string
110
114
  }
111
115
  export interface TreatmentPlans {
112
116
  uuidConsult: string
@@ -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
+ }
@@ -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`)