oro-sdk-apis 1.5.2 → 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.
- 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/practice.ts +9 -4
- package/src/services/practice.ts +15 -0
- package/LICENSE +0 -21
|
@@ -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/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`)
|
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.
|