@tryvital/vital-node 0.3.7 → 0.3.8
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/client/Testkits.ts +3 -7
- package/client/User.ts +2 -2
- package/client/models/activity.ts +3 -3
- package/client/models/testkit_models.ts +5 -0
- package/client/models/user_models.ts +4 -0
- package/dist/client/Testkits.d.ts +2 -2
- package/dist/client/Testkits.js +1 -1
- package/dist/client/User.d.ts +2 -2
- package/dist/client/models/activity.d.ts +3 -3
- package/dist/client/models/testkit_models.d.ts +4 -0
- package/dist/client/models/user_models.d.ts +3 -0
- package/package.json +1 -1
package/client/Testkits.ts
CHANGED
@@ -5,14 +5,9 @@ import {
|
|
5
5
|
OrderRequestResponse,
|
6
6
|
OrderResponse,
|
7
7
|
PatientAdress,
|
8
|
-
|
8
|
+
PatientDetails,
|
9
9
|
TestkitResponse,
|
10
10
|
} from './models/testkit_models';
|
11
|
-
import {
|
12
|
-
ClientWebhookResponse,
|
13
|
-
WebhookEventTypes,
|
14
|
-
ClientFacingWebhook,
|
15
|
-
} from './models/webhook_models';
|
16
11
|
|
17
12
|
export class TestkitsApi {
|
18
13
|
baseURL: string;
|
@@ -43,7 +38,8 @@ export class TestkitsApi {
|
|
43
38
|
public async order(
|
44
39
|
userKey: string,
|
45
40
|
testkitId: string,
|
46
|
-
patientAddress: PatientAdress
|
41
|
+
patientAddress: PatientAdress,
|
42
|
+
patientDetails: PatientDetails
|
47
43
|
): Promise<OrderRequestResponse> {
|
48
44
|
const resp = await this.client.post(
|
49
45
|
this.baseURL.concat('/testkit/orders'),
|
package/client/User.ts
CHANGED
@@ -3,8 +3,8 @@ import {
|
|
3
3
|
UserKeyResponse,
|
4
4
|
SuccessResponse,
|
5
5
|
ClientFacingUser,
|
6
|
-
SourceClientFacing,
|
7
6
|
Providers,
|
7
|
+
ProvidersResponse,
|
8
8
|
} from './models/user_models';
|
9
9
|
|
10
10
|
export class UserApi {
|
@@ -46,7 +46,7 @@ export class UserApi {
|
|
46
46
|
return resp.data;
|
47
47
|
}
|
48
48
|
|
49
|
-
public async providers(userKey: string): Promise<
|
49
|
+
public async providers(userKey: string): Promise<ProvidersResponse> {
|
50
50
|
const resp = await this.client.get(
|
51
51
|
this.baseURL.concat(`/user/providers/${userKey}`)
|
52
52
|
);
|
@@ -18,13 +18,13 @@ export interface ClientFacingActivity {
|
|
18
18
|
* @type {number}
|
19
19
|
* @memberof ClientFacingActivity
|
20
20
|
*/
|
21
|
-
|
21
|
+
calories_total: number;
|
22
22
|
/**
|
23
23
|
* Energy consumption caused by the physical activity of the day in kilocalories.::kilocalories
|
24
24
|
* @type {number}
|
25
25
|
* @memberof ClientFacingActivity
|
26
26
|
*/
|
27
|
-
|
27
|
+
calories_active: number;
|
28
28
|
/**
|
29
29
|
* Total number of steps registered during the day.::steps
|
30
30
|
* @type {number}
|
@@ -36,7 +36,7 @@ export interface ClientFacingActivity {
|
|
36
36
|
* @type {number}
|
37
37
|
* @memberof ClientFacingActivity
|
38
38
|
*/
|
39
|
-
|
39
|
+
daily_movement?: number;
|
40
40
|
/**
|
41
41
|
* Number of minutes during the day with low intensity activity (e.g. household work).::minutes
|
42
42
|
* @type {number}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { Order, OrderRequestResponse, OrderResponse, PatientAdress, TestkitResponse } from './models/testkit_models';
|
2
|
+
import { Order, OrderRequestResponse, OrderResponse, PatientAdress, PatientDetails, TestkitResponse } from './models/testkit_models';
|
3
3
|
export declare class TestkitsApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
7
|
get(): Promise<TestkitResponse>;
|
8
8
|
get_orders(startDate: Date, endDate: Date): Promise<OrderResponse>;
|
9
|
-
order(userKey: string, testkitId: string, patientAddress: PatientAdress): Promise<OrderRequestResponse>;
|
9
|
+
order(userKey: string, testkitId: string, patientAddress: PatientAdress, patientDetails: PatientDetails): Promise<OrderRequestResponse>;
|
10
10
|
get_order(orderId: string): Promise<Order>;
|
11
11
|
}
|
package/dist/client/Testkits.js
CHANGED
@@ -70,7 +70,7 @@ var TestkitsApi = /** @class */ (function () {
|
|
70
70
|
});
|
71
71
|
});
|
72
72
|
};
|
73
|
-
TestkitsApi.prototype.order = function (userKey, testkitId, patientAddress) {
|
73
|
+
TestkitsApi.prototype.order = function (userKey, testkitId, patientAddress, patientDetails) {
|
74
74
|
return __awaiter(this, void 0, void 0, function () {
|
75
75
|
var resp;
|
76
76
|
return __generator(this, function (_a) {
|
package/dist/client/User.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { UserKeyResponse, SuccessResponse, ClientFacingUser,
|
2
|
+
import { UserKeyResponse, SuccessResponse, ClientFacingUser, Providers, ProvidersResponse } from './models/user_models';
|
3
3
|
export declare class UserApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
@@ -9,6 +9,6 @@ export declare class UserApi {
|
|
9
9
|
getAll(): Promise<Array<ClientFacingUser>>;
|
10
10
|
get(userKey: string): Promise<ClientFacingUser>;
|
11
11
|
resolve(clientUserId: string): Promise<ClientFacingUser>;
|
12
|
-
providers(userKey: string): Promise<
|
12
|
+
providers(userKey: string): Promise<ProvidersResponse>;
|
13
13
|
deregisterProvider(userKey: string, provider: Providers): Promise<SuccessResponse>;
|
14
14
|
}
|
@@ -17,13 +17,13 @@ export interface ClientFacingActivity {
|
|
17
17
|
* @type {number}
|
18
18
|
* @memberof ClientFacingActivity
|
19
19
|
*/
|
20
|
-
|
20
|
+
calories_total: number;
|
21
21
|
/**
|
22
22
|
* Energy consumption caused by the physical activity of the day in kilocalories.::kilocalories
|
23
23
|
* @type {number}
|
24
24
|
* @memberof ClientFacingActivity
|
25
25
|
*/
|
26
|
-
|
26
|
+
calories_active: number;
|
27
27
|
/**
|
28
28
|
* Total number of steps registered during the day.::steps
|
29
29
|
* @type {number}
|
@@ -35,7 +35,7 @@ export interface ClientFacingActivity {
|
|
35
35
|
* @type {number}
|
36
36
|
* @memberof ClientFacingActivity
|
37
37
|
*/
|
38
|
-
|
38
|
+
daily_movement?: number;
|
39
39
|
/**
|
40
40
|
* Number of minutes during the day with low intensity activity (e.g. household work).::minutes
|
41
41
|
* @type {number}
|