@tryvital/vital-node 1.4.1 → 1.4.5
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 +9 -1
- package/client/Webhooks.ts +1 -1
- package/client/models/link_models.ts +1 -1
- package/client/models/user_models.ts +1 -0
- package/dist/client/Testkits.d.ts +1 -1
- package/dist/client/Testkits.js +8 -2
- package/dist/client/Webhooks.d.ts +1 -1
- package/dist/client/models/link_models.d.ts +1 -1
- package/dist/client/models/user_models.d.ts +2 -1
- package/dist/client/models/user_models.js +1 -0
- package/package.json +2 -2
package/client/Testkits.ts
CHANGED
@@ -27,11 +27,19 @@ export class TestkitsApi {
|
|
27
27
|
startDate: Date,
|
28
28
|
endDate: Date,
|
29
29
|
status?: string[],
|
30
|
+
userId?: string,
|
31
|
+
patientName?: string
|
30
32
|
): Promise<OrderResponse> {
|
31
33
|
const resp = await this.client.get(
|
32
34
|
this.baseURL.concat('/testkit/orders/'),
|
33
35
|
{
|
34
|
-
params: {
|
36
|
+
params: {
|
37
|
+
start_date: startDate,
|
38
|
+
end_date: endDate,
|
39
|
+
status: status ? status : null,
|
40
|
+
user_id: userId ? userId : null,
|
41
|
+
patient_name: patientName ? patientName : null,
|
42
|
+
},
|
35
43
|
}
|
36
44
|
);
|
37
45
|
return resp.data;
|
package/client/Webhooks.ts
CHANGED
@@ -5,7 +5,7 @@ export declare class TestkitsApi {
|
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
7
|
get(): Promise<TestkitResponse>;
|
8
|
-
get_orders(startDate: Date, endDate: Date, status?: string[]): Promise<OrderResponse>;
|
8
|
+
get_orders(startDate: Date, endDate: Date, status?: string[], userId?: string, patientName?: string): Promise<OrderResponse>;
|
9
9
|
order(userId: string, testkitId: string, patientAddress: PatientAdress, patientDetails: PatientDetails): Promise<OrderRequestResponse>;
|
10
10
|
get_order(orderId: string): Promise<Order>;
|
11
11
|
cancel_order(orderId: string): Promise<OrderRequestResponse>;
|
package/dist/client/Testkits.js
CHANGED
@@ -55,13 +55,19 @@ var TestkitsApi = /** @class */ (function () {
|
|
55
55
|
});
|
56
56
|
});
|
57
57
|
};
|
58
|
-
TestkitsApi.prototype.get_orders = function (startDate, endDate, status) {
|
58
|
+
TestkitsApi.prototype.get_orders = function (startDate, endDate, status, userId, patientName) {
|
59
59
|
return __awaiter(this, void 0, void 0, function () {
|
60
60
|
var resp;
|
61
61
|
return __generator(this, function (_a) {
|
62
62
|
switch (_a.label) {
|
63
63
|
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat('/testkit/orders/'), {
|
64
|
-
params: {
|
64
|
+
params: {
|
65
|
+
start_date: startDate,
|
66
|
+
end_date: endDate,
|
67
|
+
status: status ? status : null,
|
68
|
+
user_id: userId ? userId : null,
|
69
|
+
patient_name: patientName ? patientName : null,
|
70
|
+
},
|
65
71
|
})];
|
66
72
|
case 1:
|
67
73
|
resp = _a.sent();
|
@@ -3,5 +3,5 @@ export declare class WebhooksApi {
|
|
3
3
|
baseURL: string;
|
4
4
|
client: AxiosInstance;
|
5
5
|
constructor(baseURL: string, axios: AxiosInstance);
|
6
|
-
constructWebhookEvent(payload: string, headers: Record<string, string>, secret: string):
|
6
|
+
constructWebhookEvent(payload: string, headers: Record<string, string>, secret: string): Record<string, any> | Record<string, any>[];
|
7
7
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare type PasswordProviders = 'whoop' | 'renpho' | 'peloton' | 'zwift';
|
1
|
+
export declare type PasswordProviders = 'whoop' | 'renpho' | 'peloton' | 'zwift' | 'hammerhead';
|
2
2
|
export declare type OAuthProviders = 'oura' | 'fitbit' | 'garmin' | 'whoop' | 'strava' | 'wahoo';
|
3
3
|
export declare type EmailProviders = 'freestyle_libre';
|
4
4
|
export interface ProviderLinkResponse {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tryvital/vital-node",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.5",
|
4
4
|
"description": "Node client for Vital",
|
5
5
|
"author": "maitham",
|
6
6
|
"keywords": [
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"axios": ">=0.21.2",
|
27
27
|
"axios-retry": "^3.2.4",
|
28
28
|
"crypto": "^1.0.1",
|
29
|
-
"svix": "0.
|
29
|
+
"svix": "0.64.2"
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
32
32
|
"@testdeck/mocha": "^0.1.2",
|