oro-sdk-apis 3.6.0 → 3.7.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/oro-sdk-apis.cjs.development.js +10 -2
- 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 -2
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/practice.d.ts +6 -0
- package/package.json +1 -1
- package/src/services/practice.ts +13 -4
@@ -5,6 +5,12 @@ export declare class PracticeService {
|
|
5
5
|
private api;
|
6
6
|
private baseURL;
|
7
7
|
constructor(api: APIService, baseURL: string);
|
8
|
+
/**
|
9
|
+
* This function will only work if the service is initialized with
|
10
|
+
* an M2M with the scope `practice.practices.get`
|
11
|
+
* @returns an array of practices
|
12
|
+
*/
|
13
|
+
practiceGetAll(): Promise<Practice[]>;
|
8
14
|
/**
|
9
15
|
* This function get the practice from the URL of a practice
|
10
16
|
* It is the entry point of our web apps
|
package/package.json
CHANGED
package/src/services/practice.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { hashToBase64String } from '../helpers'
|
2
|
-
import {PaymentStatus, PracticeAccount, Uuid} from '../models'
|
2
|
+
import { PaymentStatus, PracticeAccount, Uuid } from '../models'
|
3
3
|
import {
|
4
4
|
Assignment,
|
5
5
|
AssignmentRequest,
|
@@ -27,6 +27,15 @@ import { APIService } from './api'
|
|
27
27
|
export class PracticeService {
|
28
28
|
constructor(private api: APIService, private baseURL: string) {}
|
29
29
|
|
30
|
+
/**
|
31
|
+
* This function will only work if the service is initialized with
|
32
|
+
* an M2M with the scope `practice.practices.get`
|
33
|
+
* @returns an array of practices
|
34
|
+
*/
|
35
|
+
public practiceGetAll(): Promise<Practice[]> {
|
36
|
+
return this.api.get<Practice[]>(`${this.baseURL}/v1/practices`)
|
37
|
+
}
|
38
|
+
|
30
39
|
/**
|
31
40
|
* This function get the practice from the URL of a practice
|
32
41
|
* It is the entry point of our web apps
|
@@ -154,14 +163,14 @@ export class PracticeService {
|
|
154
163
|
statusPayment?: PaymentStatus,
|
155
164
|
withConsultUUIDNULL?: boolean,
|
156
165
|
perPage?: number,
|
157
|
-
indexPage?: number
|
158
|
-
|
166
|
+
indexPage?: number
|
167
|
+
): Promise<PracticePayment[]> {
|
159
168
|
return this.api.get<PracticePayment[]>(`${this.baseURL}/v1/practices/${practiceUuid}/payments`, {
|
160
169
|
params: {
|
161
170
|
status: statusPayment,
|
162
171
|
withConsultUUIDNULL,
|
163
172
|
perPage,
|
164
|
-
indexPage
|
173
|
+
indexPage,
|
165
174
|
},
|
166
175
|
})
|
167
176
|
}
|