@tryvital/vital-node 1.0.5 → 1.0.9
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/Activity.ts +16 -0
- package/client/Body.ts +17 -0
- package/client/Link.ts +16 -0
- package/client/Profile.ts +17 -1
- package/client/Sleep.ts +17 -1
- package/client/Workouts.ts +16 -0
- package/client/models/link_models.ts +2 -0
- package/client/models/raw_response.ts +31 -0
- package/dist/client/Activity.d.ts +2 -0
- package/dist/client/Activity.js +15 -0
- package/dist/client/Body.d.ts +2 -0
- package/dist/client/Body.js +15 -0
- package/dist/client/Link.d.ts +2 -1
- package/dist/client/Link.js +15 -0
- package/dist/client/Profile.d.ts +2 -0
- package/dist/client/Profile.js +15 -0
- package/dist/client/Sleep.d.ts +2 -0
- package/dist/client/Sleep.js +15 -0
- package/dist/client/Workouts.d.ts +2 -0
- package/dist/client/Workouts.js +15 -0
- package/dist/client/models/link_models.d.ts +1 -0
- package/dist/client/models/raw_response.d.ts +27 -0
- package/dist/client/models/raw_response.js +2 -0
- package/dist/index.js +3 -3
- package/index.ts +3 -3
- package/package.json +2 -2
- package/yarn-error.log +0 -4023
package/client/Activity.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientActivityResponse } from './models/activity';
|
3
|
+
import { ClientActivityRawResponse } from './models/raw_response';
|
3
4
|
|
4
5
|
export class ActivityApi {
|
5
6
|
baseURL: string;
|
@@ -23,4 +24,19 @@ export class ActivityApi {
|
|
23
24
|
);
|
24
25
|
return resp.data;
|
25
26
|
}
|
27
|
+
|
28
|
+
public async get_raw(
|
29
|
+
userKey: string,
|
30
|
+
startDate: Date,
|
31
|
+
endDate: Date,
|
32
|
+
provider?: string
|
33
|
+
): Promise<ClientActivityRawResponse> {
|
34
|
+
const resp = await this.client.get(
|
35
|
+
this.baseURL.concat(`/summary/activity/${userKey}/raw`),
|
36
|
+
{
|
37
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
38
|
+
}
|
39
|
+
);
|
40
|
+
return resp.data;
|
41
|
+
}
|
26
42
|
}
|
package/client/Body.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientBodyResponse } from './models/body_model';
|
3
|
+
import { ClientBodyRawResponse } from './models/raw_response';
|
3
4
|
|
4
5
|
export class BodyApi {
|
5
6
|
baseURL: string;
|
@@ -24,4 +25,20 @@ export class BodyApi {
|
|
24
25
|
);
|
25
26
|
return resp.data;
|
26
27
|
}
|
28
|
+
|
29
|
+
|
30
|
+
public async get_raw(
|
31
|
+
userKey: string,
|
32
|
+
startDate: Date,
|
33
|
+
endDate: Date,
|
34
|
+
provider?: string
|
35
|
+
): Promise<ClientBodyRawResponse> {
|
36
|
+
const resp = await this.client.get(
|
37
|
+
this.baseURL.concat(`/summary/body/${userKey}/raw`),
|
38
|
+
{
|
39
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
40
|
+
}
|
41
|
+
);
|
42
|
+
return resp.data;
|
43
|
+
}
|
27
44
|
}
|
package/client/Link.ts
CHANGED
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
LinkTokenExchangeResponse,
|
5
5
|
PasswordProviders,
|
6
6
|
OAuthProviders,
|
7
|
+
EmailProviders,
|
7
8
|
} from './models/link_models';
|
8
9
|
import { SourceWithLinkInfo } from './models/user_models';
|
9
10
|
|
@@ -43,6 +44,21 @@ export class LinkApi {
|
|
43
44
|
return resp.data;
|
44
45
|
}
|
45
46
|
|
47
|
+
public async connectEmailProvider(
|
48
|
+
linkToken: string,
|
49
|
+
provider: EmailProviders,
|
50
|
+
email: string
|
51
|
+
): Promise<ProviderLinkResponse> {
|
52
|
+
const resp = await this.client.post(
|
53
|
+
this.baseURL.concat(`/link/provider/email/${provider}`),
|
54
|
+
{
|
55
|
+
email,
|
56
|
+
},
|
57
|
+
{ headers: { LinkToken: linkToken } }
|
58
|
+
);
|
59
|
+
return resp.data;
|
60
|
+
}
|
61
|
+
|
46
62
|
public async getOAuthLink(
|
47
63
|
linkToken: string,
|
48
64
|
provider: OAuthProviders
|
package/client/Profile.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientFacingProfile } from './models/profile_model';
|
2
|
+
import { ClientFacingProfile, } from './models/profile_model';
|
3
|
+
import { ClientProfileRawResponse } from './models/raw_response';
|
3
4
|
|
4
5
|
export class ProfileApi {
|
5
6
|
baseURL: string;
|
@@ -22,4 +23,19 @@ export class ProfileApi {
|
|
22
23
|
);
|
23
24
|
return resp.data;
|
24
25
|
}
|
26
|
+
|
27
|
+
public async get_raw(
|
28
|
+
userKey: string,
|
29
|
+
startDate: Date,
|
30
|
+
endDate: Date,
|
31
|
+
provider?: string
|
32
|
+
): Promise<ClientProfileRawResponse> {
|
33
|
+
const resp = await this.client.get(
|
34
|
+
this.baseURL.concat(`/summary/profile/${userKey}/raw`),
|
35
|
+
{
|
36
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
37
|
+
}
|
38
|
+
);
|
39
|
+
return resp.data;
|
40
|
+
}
|
25
41
|
}
|
package/client/Sleep.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientSleepResponse, ClientSleepStreamResponse
|
2
|
+
import { ClientSleepResponse, ClientSleepStreamResponse } from './models/sleep_models';
|
3
|
+
import { ClientSleepRawResponse } from './models/raw_response';
|
3
4
|
|
4
5
|
export class SleepApi {
|
5
6
|
baseURL: string;
|
@@ -30,4 +31,19 @@ export class SleepApi {
|
|
30
31
|
);
|
31
32
|
return resp.data;
|
32
33
|
}
|
34
|
+
|
35
|
+
public async get_raw(
|
36
|
+
userKey: string,
|
37
|
+
startDate: Date,
|
38
|
+
endDate: Date,
|
39
|
+
provider?: string
|
40
|
+
): Promise<ClientSleepRawResponse> {
|
41
|
+
const resp = await this.client.get(
|
42
|
+
this.baseURL.concat(`/summary/sleep/${userKey}/raw`),
|
43
|
+
{
|
44
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
45
|
+
}
|
46
|
+
);
|
47
|
+
return resp.data;
|
48
|
+
}
|
33
49
|
}
|
package/client/Workouts.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
+
import { ClientWorkoutsRawResponse } from './models/raw_response';
|
2
3
|
import {
|
3
4
|
ClientWorkoutResponse,
|
4
5
|
ClientWorkoutStreamResponse,
|
@@ -35,4 +36,19 @@ export class WorkoutsApi {
|
|
35
36
|
);
|
36
37
|
return resp.data;
|
37
38
|
}
|
39
|
+
|
40
|
+
public async get_raw(
|
41
|
+
userKey: string,
|
42
|
+
startDate: Date,
|
43
|
+
endDate: Date,
|
44
|
+
provider?: string
|
45
|
+
): Promise<ClientWorkoutsRawResponse> {
|
46
|
+
const resp = await this.client.get(
|
47
|
+
this.baseURL.concat(`/summary/workouts/${userKey}/raw`),
|
48
|
+
{
|
49
|
+
params: { start_date: startDate, end_date: endDate, provider },
|
50
|
+
}
|
51
|
+
);
|
52
|
+
return resp.data;
|
53
|
+
}
|
38
54
|
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { SourceClientFacing } from './user_models';
|
2
|
+
|
3
|
+
export interface RawResponse {
|
4
|
+
id: string;
|
5
|
+
user_id: string;
|
6
|
+
source_id: number;
|
7
|
+
source?: SourceClientFacing;
|
8
|
+
priority: number;
|
9
|
+
priority_id: number;
|
10
|
+
timestamp: Date;
|
11
|
+
data: Record<string, string>
|
12
|
+
provider_id: string;
|
13
|
+
}
|
14
|
+
|
15
|
+
export interface ClientActivityRawResponse {
|
16
|
+
activity: RawResponse[];
|
17
|
+
}
|
18
|
+
export interface ClientWorkoutsRawResponse {
|
19
|
+
workouts: RawResponse[];
|
20
|
+
}
|
21
|
+
export interface ClientBodyRawResponse {
|
22
|
+
body: RawResponse[];
|
23
|
+
}
|
24
|
+
|
25
|
+
export interface ClientSleepRawResponse {
|
26
|
+
sleep: RawResponse[];
|
27
|
+
}
|
28
|
+
|
29
|
+
export interface ClientProfileRawResponse {
|
30
|
+
profile: RawResponse[];
|
31
|
+
}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientActivityResponse } from './models/activity';
|
3
|
+
import { ClientActivityRawResponse } from './models/raw_response';
|
3
4
|
export declare class ActivityApi {
|
4
5
|
baseURL: string;
|
5
6
|
client: AxiosInstance;
|
6
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
8
|
get(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientActivityResponse>;
|
9
|
+
get_raw(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientActivityRawResponse>;
|
8
10
|
}
|
package/dist/client/Activity.js
CHANGED
@@ -57,6 +57,21 @@ var ActivityApi = /** @class */ (function () {
|
|
57
57
|
});
|
58
58
|
});
|
59
59
|
};
|
60
|
+
ActivityApi.prototype.get_raw = function (userKey, startDate, endDate, provider) {
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
62
|
+
var resp;
|
63
|
+
return __generator(this, function (_a) {
|
64
|
+
switch (_a.label) {
|
65
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/summary/activity/" + userKey + "/raw"), {
|
66
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
67
|
+
})];
|
68
|
+
case 1:
|
69
|
+
resp = _a.sent();
|
70
|
+
return [2 /*return*/, resp.data];
|
71
|
+
}
|
72
|
+
});
|
73
|
+
});
|
74
|
+
};
|
60
75
|
return ActivityApi;
|
61
76
|
}());
|
62
77
|
exports.ActivityApi = ActivityApi;
|
package/dist/client/Body.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientBodyResponse } from './models/body_model';
|
3
|
+
import { ClientBodyRawResponse } from './models/raw_response';
|
3
4
|
export declare class BodyApi {
|
4
5
|
baseURL: string;
|
5
6
|
client: AxiosInstance;
|
6
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
8
|
get(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientBodyResponse>;
|
9
|
+
get_raw(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientBodyRawResponse>;
|
8
10
|
}
|
package/dist/client/Body.js
CHANGED
@@ -57,6 +57,21 @@ var BodyApi = /** @class */ (function () {
|
|
57
57
|
});
|
58
58
|
});
|
59
59
|
};
|
60
|
+
BodyApi.prototype.get_raw = function (userKey, startDate, endDate, provider) {
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
62
|
+
var resp;
|
63
|
+
return __generator(this, function (_a) {
|
64
|
+
switch (_a.label) {
|
65
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/summary/body/" + userKey + "/raw"), {
|
66
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
67
|
+
})];
|
68
|
+
case 1:
|
69
|
+
resp = _a.sent();
|
70
|
+
return [2 /*return*/, resp.data];
|
71
|
+
}
|
72
|
+
});
|
73
|
+
});
|
74
|
+
};
|
60
75
|
return BodyApi;
|
61
76
|
}());
|
62
77
|
exports.BodyApi = BodyApi;
|
package/dist/client/Link.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ProviderLinkResponse, LinkTokenExchangeResponse, PasswordProviders, OAuthProviders } from './models/link_models';
|
2
|
+
import { ProviderLinkResponse, LinkTokenExchangeResponse, PasswordProviders, OAuthProviders, EmailProviders } from './models/link_models';
|
3
3
|
import { SourceWithLinkInfo } from './models/user_models';
|
4
4
|
export declare class LinkApi {
|
5
5
|
baseURL: string;
|
@@ -7,5 +7,6 @@ export declare class LinkApi {
|
|
7
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
8
8
|
create(userKey: string, provider?: string): Promise<LinkTokenExchangeResponse>;
|
9
9
|
connectProvider(linkToken: string, provider: PasswordProviders, username: string, password: string): Promise<ProviderLinkResponse>;
|
10
|
+
connectEmailProvider(linkToken: string, provider: EmailProviders, email: string): Promise<ProviderLinkResponse>;
|
10
11
|
getOAuthLink(linkToken: string, provider: OAuthProviders): Promise<SourceWithLinkInfo>;
|
11
12
|
}
|
package/dist/client/Link.js
CHANGED
@@ -75,6 +75,21 @@ var LinkApi = /** @class */ (function () {
|
|
75
75
|
});
|
76
76
|
});
|
77
77
|
};
|
78
|
+
LinkApi.prototype.connectEmailProvider = function (linkToken, provider, email) {
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
80
|
+
var resp;
|
81
|
+
return __generator(this, function (_a) {
|
82
|
+
switch (_a.label) {
|
83
|
+
case 0: return [4 /*yield*/, this.client.post(this.baseURL.concat("/link/provider/email/" + provider), {
|
84
|
+
email: email,
|
85
|
+
}, { headers: { LinkToken: linkToken } })];
|
86
|
+
case 1:
|
87
|
+
resp = _a.sent();
|
88
|
+
return [2 /*return*/, resp.data];
|
89
|
+
}
|
90
|
+
});
|
91
|
+
});
|
92
|
+
};
|
78
93
|
LinkApi.prototype.getOAuthLink = function (linkToken, provider) {
|
79
94
|
return __awaiter(this, void 0, void 0, function () {
|
80
95
|
var resp;
|
package/dist/client/Profile.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientFacingProfile } from './models/profile_model';
|
3
|
+
import { ClientProfileRawResponse } from './models/raw_response';
|
3
4
|
export declare class ProfileApi {
|
4
5
|
baseURL: string;
|
5
6
|
client: AxiosInstance;
|
6
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
8
|
get(userKey: string, provider?: string): Promise<ClientFacingProfile>;
|
9
|
+
get_raw(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientProfileRawResponse>;
|
8
10
|
}
|
package/dist/client/Profile.js
CHANGED
@@ -57,6 +57,21 @@ var ProfileApi = /** @class */ (function () {
|
|
57
57
|
});
|
58
58
|
});
|
59
59
|
};
|
60
|
+
ProfileApi.prototype.get_raw = function (userKey, startDate, endDate, provider) {
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
62
|
+
var resp;
|
63
|
+
return __generator(this, function (_a) {
|
64
|
+
switch (_a.label) {
|
65
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/summary/profile/" + userKey + "/raw"), {
|
66
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
67
|
+
})];
|
68
|
+
case 1:
|
69
|
+
resp = _a.sent();
|
70
|
+
return [2 /*return*/, resp.data];
|
71
|
+
}
|
72
|
+
});
|
73
|
+
});
|
74
|
+
};
|
60
75
|
return ProfileApi;
|
61
76
|
}());
|
62
77
|
exports.ProfileApi = ProfileApi;
|
package/dist/client/Sleep.d.ts
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
2
|
import { ClientSleepResponse, ClientSleepStreamResponse } from './models/sleep_models';
|
3
|
+
import { ClientSleepRawResponse } from './models/raw_response';
|
3
4
|
export declare class SleepApi {
|
4
5
|
baseURL: string;
|
5
6
|
client: AxiosInstance;
|
6
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
8
|
get(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientSleepResponse>;
|
8
9
|
getStream(sleepId: string): Promise<ClientSleepStreamResponse>;
|
10
|
+
get_raw(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientSleepRawResponse>;
|
9
11
|
}
|
package/dist/client/Sleep.js
CHANGED
@@ -70,6 +70,21 @@ var SleepApi = /** @class */ (function () {
|
|
70
70
|
});
|
71
71
|
});
|
72
72
|
};
|
73
|
+
SleepApi.prototype.get_raw = function (userKey, startDate, endDate, provider) {
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
75
|
+
var resp;
|
76
|
+
return __generator(this, function (_a) {
|
77
|
+
switch (_a.label) {
|
78
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/summary/sleep/" + userKey + "/raw"), {
|
79
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
80
|
+
})];
|
81
|
+
case 1:
|
82
|
+
resp = _a.sent();
|
83
|
+
return [2 /*return*/, resp.data];
|
84
|
+
}
|
85
|
+
});
|
86
|
+
});
|
87
|
+
};
|
73
88
|
return SleepApi;
|
74
89
|
}());
|
75
90
|
exports.SleepApi = SleepApi;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
+
import { ClientWorkoutsRawResponse } from './models/raw_response';
|
2
3
|
import { ClientWorkoutResponse, ClientWorkoutStreamResponse } from './models/workout_models';
|
3
4
|
export declare class WorkoutsApi {
|
4
5
|
baseURL: string;
|
@@ -6,4 +7,5 @@ export declare class WorkoutsApi {
|
|
6
7
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
8
|
get(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientWorkoutResponse>;
|
8
9
|
getStream(workoutId: string): Promise<ClientWorkoutStreamResponse>;
|
10
|
+
get_raw(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientWorkoutsRawResponse>;
|
9
11
|
}
|
package/dist/client/Workouts.js
CHANGED
@@ -70,6 +70,21 @@ var WorkoutsApi = /** @class */ (function () {
|
|
70
70
|
});
|
71
71
|
});
|
72
72
|
};
|
73
|
+
WorkoutsApi.prototype.get_raw = function (userKey, startDate, endDate, provider) {
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
75
|
+
var resp;
|
76
|
+
return __generator(this, function (_a) {
|
77
|
+
switch (_a.label) {
|
78
|
+
case 0: return [4 /*yield*/, this.client.get(this.baseURL.concat("/summary/workouts/" + userKey + "/raw"), {
|
79
|
+
params: { start_date: startDate, end_date: endDate, provider: provider },
|
80
|
+
})];
|
81
|
+
case 1:
|
82
|
+
resp = _a.sent();
|
83
|
+
return [2 /*return*/, resp.data];
|
84
|
+
}
|
85
|
+
});
|
86
|
+
});
|
87
|
+
};
|
73
88
|
return WorkoutsApi;
|
74
89
|
}());
|
75
90
|
exports.WorkoutsApi = WorkoutsApi;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export declare type PasswordProviders = 'whoop' | 'renpho' | 'peloton' | 'zwift';
|
2
2
|
export declare type OAuthProviders = 'oura' | 'fitbit' | 'garmin' | 'whoop' | 'strava' | 'wahoo';
|
3
|
+
export declare type EmailProviders = 'freestyle_libre';
|
3
4
|
export interface ProviderLinkResponse {
|
4
5
|
provider: PasswordProviders;
|
5
6
|
connected: boolean;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { SourceClientFacing } from './user_models';
|
2
|
+
export interface RawResponse {
|
3
|
+
id: string;
|
4
|
+
user_id: string;
|
5
|
+
source_id: number;
|
6
|
+
source?: SourceClientFacing;
|
7
|
+
priority: number;
|
8
|
+
priority_id: number;
|
9
|
+
timestamp: Date;
|
10
|
+
data: Record<string, string>;
|
11
|
+
provider_id: string;
|
12
|
+
}
|
13
|
+
export interface ClientActivityRawResponse {
|
14
|
+
activity: RawResponse[];
|
15
|
+
}
|
16
|
+
export interface ClientWorkoutsRawResponse {
|
17
|
+
workouts: RawResponse[];
|
18
|
+
}
|
19
|
+
export interface ClientBodyRawResponse {
|
20
|
+
body: RawResponse[];
|
21
|
+
}
|
22
|
+
export interface ClientSleepRawResponse {
|
23
|
+
sleep: RawResponse[];
|
24
|
+
}
|
25
|
+
export interface ClientProfileRawResponse {
|
26
|
+
profile: RawResponse[];
|
27
|
+
}
|
package/dist/index.js
CHANGED
@@ -81,14 +81,14 @@ var VitalClient = /** @class */ (function () {
|
|
81
81
|
});
|
82
82
|
// Hook APIS
|
83
83
|
this.Activity = new client_1.ActivityApi(baseURL.concat('/v2'), axiosApiInstance);
|
84
|
-
this.Link = new client_1.LinkApi(baseURL.concat('/
|
84
|
+
this.Link = new client_1.LinkApi(baseURL.concat('/v2'), axiosApiInstance);
|
85
85
|
this.Body = new client_1.BodyApi(baseURL.concat('/v2'), axiosApiInstance);
|
86
86
|
this.Sleep = new client_1.SleepApi(baseURL.concat('/v2'), axiosApiInstance);
|
87
|
-
this.User = new client_1.UserApi(baseURL.concat('/
|
87
|
+
this.User = new client_1.UserApi(baseURL.concat('/v2'), axiosApiInstance);
|
88
88
|
this.Workouts = new client_1.WorkoutsApi(baseURL.concat('/v2'), axiosApiInstance);
|
89
89
|
this.Webhooks = new client_1.WebhooksApi(baseURL.concat('/v2'), axiosApiInstance);
|
90
90
|
this.Vitals = new Vitals_1.VitalsApi(baseURL.concat('/v2'), axiosApiInstance);
|
91
|
-
this.Testkits = new client_1.TestkitsApi(baseURL.concat('/
|
91
|
+
this.Testkits = new client_1.TestkitsApi(baseURL.concat('/v2'), axiosApiInstance);
|
92
92
|
this.Profile = new client_1.ProfileApi(baseURL.concat('/v2'), axiosApiInstance);
|
93
93
|
}
|
94
94
|
return VitalClient;
|
package/index.ts
CHANGED
@@ -58,14 +58,14 @@ export class VitalClient {
|
|
58
58
|
|
59
59
|
// Hook APIS
|
60
60
|
this.Activity = new ActivityApi(baseURL.concat('/v2'), axiosApiInstance);
|
61
|
-
this.Link = new LinkApi(baseURL.concat('/
|
61
|
+
this.Link = new LinkApi(baseURL.concat('/v2'), axiosApiInstance);
|
62
62
|
this.Body = new BodyApi(baseURL.concat('/v2'), axiosApiInstance);
|
63
63
|
this.Sleep = new SleepApi(baseURL.concat('/v2'), axiosApiInstance);
|
64
|
-
this.User = new UserApi(baseURL.concat('/
|
64
|
+
this.User = new UserApi(baseURL.concat('/v2'), axiosApiInstance);
|
65
65
|
this.Workouts = new WorkoutsApi(baseURL.concat('/v2'), axiosApiInstance);
|
66
66
|
this.Webhooks = new WebhooksApi(baseURL.concat('/v2'), axiosApiInstance);
|
67
67
|
this.Vitals = new VitalsApi(baseURL.concat('/v2'), axiosApiInstance);
|
68
|
-
this.Testkits = new TestkitsApi(baseURL.concat('/
|
68
|
+
this.Testkits = new TestkitsApi(baseURL.concat('/v2'), axiosApiInstance);
|
69
69
|
this.Profile = new ProfileApi(baseURL.concat('/v2'), axiosApiInstance);
|
70
70
|
}
|
71
71
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tryvital/vital-node",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.9",
|
4
4
|
"description": "Node client for Vital",
|
5
5
|
"author": "maitham",
|
6
6
|
"keywords": [
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"axios": ">=0.21.2",
|
25
25
|
"axios-retry": "^3.2.4",
|
26
26
|
"crypto": "^1.0.1",
|
27
|
-
"svix": "
|
27
|
+
"svix": "0.42.3"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@testdeck/mocha": "^0.1.2",
|