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.
- package/dist/models/diagnosis.d.ts +4 -0
- package/dist/models/practice.d.ts +7 -0
- package/dist/oro-sdk-apis.cjs.development.js +10 -0
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +10 -0
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +7 -1
- package/package.json +1 -1
- package/src/models/diagnosis.ts +4 -0
- package/src/models/practice.ts +9 -4
- package/src/services/practice.ts +15 -0
|
@@ -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
package/src/models/diagnosis.ts
CHANGED
|
@@ -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
|
package/src/models/practice.ts
CHANGED
|
@@ -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
|
+
}
|
package/src/services/practice.ts
CHANGED
|
@@ -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`)
|