@tryvital/vital-node 3.1.382 → 3.1.384
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.d.ts +18 -18
- package/Client.js +47 -47
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/aggregate/client/Client.js +3 -3
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/electrocardiogram/client/Client.js +1 -1
- package/api/resources/index.d.ts +10 -10
- package/api/resources/index.js +11 -11
- package/api/resources/insurance/client/Client.js +3 -3
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.d.ts +12 -12
- package/api/resources/labTests/client/Client.js +181 -181
- package/api/resources/labTests/client/requests/index.d.ts +1 -1
- package/api/resources/link/client/Client.js +19 -19
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/client/Client.js +1 -1
- package/api/resources/order/client/Client.js +1 -1
- package/api/resources/payor/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.d.ts +12 -12
- package/api/resources/sleep/client/Client.js +34 -34
- package/api/resources/sleepCycle/client/Client.js +1 -1
- package/api/resources/team/client/Client.js +7 -7
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +18 -18
- package/api/resources/vitals/client/Client.js +78 -78
- package/api/resources/workouts/client/Client.d.ts +10 -10
- package/api/resources/workouts/client/Client.js +34 -34
- package/dist/Client.d.ts +18 -18
- package/dist/Client.js +47 -47
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/aggregate/client/Client.js +3 -3
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +10 -10
- package/dist/api/resources/index.js +11 -11
- package/dist/api/resources/insurance/client/Client.js +3 -3
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.d.ts +12 -12
- package/dist/api/resources/labTests/client/Client.js +181 -181
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -1
- package/dist/api/resources/link/client/Client.js +19 -19
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
- package/dist/api/resources/order/client/Client.js +1 -1
- package/dist/api/resources/payor/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.d.ts +12 -12
- package/dist/api/resources/sleep/client/Client.js +34 -34
- package/dist/api/resources/sleepCycle/client/Client.js +1 -1
- package/dist/api/resources/team/client/Client.js +7 -7
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +18 -18
- package/dist/api/resources/vitals/client/Client.js +78 -78
- package/dist/api/resources/workouts/client/Client.d.ts +10 -10
- package/dist/api/resources/workouts/client/Client.js +34 -34
- package/dist/serialization/resources/index.d.ts +3 -3
- package/dist/serialization/resources/index.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +2027 -2027
- package/serialization/resources/index.d.ts +3 -3
- package/serialization/resources/index.js +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -21,6 +21,16 @@ export declare namespace Workouts {
|
|
|
21
21
|
export declare class Workouts {
|
|
22
22
|
protected readonly _options: Workouts.Options;
|
|
23
23
|
constructor(_options?: Workouts.Options);
|
|
24
|
+
/**
|
|
25
|
+
* @param {string} workoutId - The Vital ID for the workout
|
|
26
|
+
* @param {Workouts.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.workouts.getByWorkoutId("workout_id")
|
|
32
|
+
*/
|
|
33
|
+
getByWorkoutId(workoutId: string, requestOptions?: Workouts.RequestOptions): Promise<Vital.ClientFacingStream>;
|
|
24
34
|
/**
|
|
25
35
|
* Get workout summary for user_id
|
|
26
36
|
*
|
|
@@ -51,16 +61,6 @@ export declare class Workouts {
|
|
|
51
61
|
* })
|
|
52
62
|
*/
|
|
53
63
|
getRaw(userId: string, request: Vital.WorkoutsGetRawRequest, requestOptions?: Workouts.RequestOptions): Promise<Vital.RawWorkout>;
|
|
54
|
-
/**
|
|
55
|
-
* @param {string} workoutId - The Vital ID for the workout
|
|
56
|
-
* @param {Workouts.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
-
*
|
|
58
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* await client.workouts.getByWorkoutId("workout_id")
|
|
62
|
-
*/
|
|
63
|
-
getByWorkoutId(workoutId: string, requestOptions?: Workouts.RequestOptions): Promise<Vital.ClientFacingStream>;
|
|
64
64
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
65
65
|
"x-vital-api-key": string | undefined;
|
|
66
66
|
}>;
|
|
@@ -50,44 +50,29 @@ class Workouts {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @param {string} userId
|
|
56
|
-
* @param {Vital.WorkoutsGetRequest} request
|
|
53
|
+
* @param {string} workoutId - The Vital ID for the workout
|
|
57
54
|
* @param {Workouts.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
55
|
*
|
|
59
56
|
* @throws {@link Vital.UnprocessableEntityError}
|
|
60
57
|
*
|
|
61
58
|
* @example
|
|
62
|
-
* await client.workouts.
|
|
63
|
-
* startDate: "start_date"
|
|
64
|
-
* })
|
|
59
|
+
* await client.workouts.getByWorkoutId("workout_id")
|
|
65
60
|
*/
|
|
66
|
-
|
|
61
|
+
getByWorkoutId(workoutId, requestOptions) {
|
|
67
62
|
var _a;
|
|
68
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const { provider, startDate, endDate } = request;
|
|
70
|
-
const _queryParams = {};
|
|
71
|
-
if (provider != null) {
|
|
72
|
-
_queryParams["provider"] = provider;
|
|
73
|
-
}
|
|
74
|
-
_queryParams["start_date"] = startDate;
|
|
75
|
-
if (endDate != null) {
|
|
76
|
-
_queryParams["end_date"] = endDate;
|
|
77
|
-
}
|
|
78
64
|
const _response = yield core.fetcher({
|
|
79
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/
|
|
65
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
|
|
80
66
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
67
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
68
|
contentType: "application/json",
|
|
83
|
-
queryParameters: _queryParams,
|
|
84
69
|
requestType: "json",
|
|
85
70
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
86
71
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
87
72
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
88
73
|
});
|
|
89
74
|
if (_response.ok) {
|
|
90
|
-
return serializers.
|
|
75
|
+
return serializers.ClientFacingStream.parseOrThrow(_response.body, {
|
|
91
76
|
unrecognizedObjectKeys: "passthrough",
|
|
92
77
|
allowUnrecognizedUnionMembers: true,
|
|
93
78
|
allowUnrecognizedEnumValues: true,
|
|
@@ -126,20 +111,20 @@ class Workouts {
|
|
|
126
111
|
});
|
|
127
112
|
}
|
|
128
113
|
/**
|
|
129
|
-
* Get
|
|
114
|
+
* Get workout summary for user_id
|
|
130
115
|
*
|
|
131
116
|
* @param {string} userId
|
|
132
|
-
* @param {Vital.
|
|
117
|
+
* @param {Vital.WorkoutsGetRequest} request
|
|
133
118
|
* @param {Workouts.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
119
|
*
|
|
135
120
|
* @throws {@link Vital.UnprocessableEntityError}
|
|
136
121
|
*
|
|
137
122
|
* @example
|
|
138
|
-
* await client.workouts.
|
|
123
|
+
* await client.workouts.get("user_id", {
|
|
139
124
|
* startDate: "start_date"
|
|
140
125
|
* })
|
|
141
126
|
*/
|
|
142
|
-
|
|
127
|
+
get(userId, request, requestOptions) {
|
|
143
128
|
var _a;
|
|
144
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
130
|
const { provider, startDate, endDate } = request;
|
|
@@ -152,9 +137,9 @@ class Workouts {
|
|
|
152
137
|
_queryParams["end_date"] = endDate;
|
|
153
138
|
}
|
|
154
139
|
const _response = yield core.fetcher({
|
|
155
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}
|
|
140
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}`),
|
|
156
141
|
method: "GET",
|
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
142
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
158
143
|
contentType: "application/json",
|
|
159
144
|
queryParameters: _queryParams,
|
|
160
145
|
requestType: "json",
|
|
@@ -163,7 +148,7 @@ class Workouts {
|
|
|
163
148
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
164
149
|
});
|
|
165
150
|
if (_response.ok) {
|
|
166
|
-
return serializers.
|
|
151
|
+
return serializers.ClientWorkoutResponse.parseOrThrow(_response.body, {
|
|
167
152
|
unrecognizedObjectKeys: "passthrough",
|
|
168
153
|
allowUnrecognizedUnionMembers: true,
|
|
169
154
|
allowUnrecognizedEnumValues: true,
|
|
@@ -202,29 +187,44 @@ class Workouts {
|
|
|
202
187
|
});
|
|
203
188
|
}
|
|
204
189
|
/**
|
|
205
|
-
*
|
|
190
|
+
* Get raw workout summary for user_id
|
|
191
|
+
*
|
|
192
|
+
* @param {string} userId
|
|
193
|
+
* @param {Vital.WorkoutsGetRawRequest} request
|
|
206
194
|
* @param {Workouts.RequestOptions} requestOptions - Request-specific configuration.
|
|
207
195
|
*
|
|
208
196
|
* @throws {@link Vital.UnprocessableEntityError}
|
|
209
197
|
*
|
|
210
198
|
* @example
|
|
211
|
-
* await client.workouts.
|
|
199
|
+
* await client.workouts.getRaw("user_id", {
|
|
200
|
+
* startDate: "start_date"
|
|
201
|
+
* })
|
|
212
202
|
*/
|
|
213
|
-
|
|
203
|
+
getRaw(userId, request, requestOptions) {
|
|
214
204
|
var _a;
|
|
215
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const { provider, startDate, endDate } = request;
|
|
207
|
+
const _queryParams = {};
|
|
208
|
+
if (provider != null) {
|
|
209
|
+
_queryParams["provider"] = provider;
|
|
210
|
+
}
|
|
211
|
+
_queryParams["start_date"] = startDate;
|
|
212
|
+
if (endDate != null) {
|
|
213
|
+
_queryParams["end_date"] = endDate;
|
|
214
|
+
}
|
|
216
215
|
const _response = yield core.fetcher({
|
|
217
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/
|
|
216
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}/raw`),
|
|
218
217
|
method: "GET",
|
|
219
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
218
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
220
219
|
contentType: "application/json",
|
|
220
|
+
queryParameters: _queryParams,
|
|
221
221
|
requestType: "json",
|
|
222
222
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
223
223
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
224
224
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
225
225
|
});
|
|
226
226
|
if (_response.ok) {
|
|
227
|
-
return serializers.
|
|
227
|
+
return serializers.RawWorkout.parseOrThrow(_response.body, {
|
|
228
228
|
unrecognizedObjectKeys: "passthrough",
|
|
229
229
|
allowUnrecognizedUnionMembers: true,
|
|
230
230
|
allowUnrecognizedEnumValues: true,
|
package/dist/Client.d.ts
CHANGED
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
|
-
import { Link } from "./api/resources/link/client/Client";
|
|
7
6
|
import { User } from "./api/resources/user/client/Client";
|
|
7
|
+
import { Link } from "./api/resources/link/client/Client";
|
|
8
|
+
import { Sleep } from "./api/resources/sleep/client/Client";
|
|
9
|
+
import { Workouts } from "./api/resources/workouts/client/Client";
|
|
10
|
+
import { Vitals } from "./api/resources/vitals/client/Client";
|
|
8
11
|
import { Electrocardiogram } from "./api/resources/electrocardiogram/client/Client";
|
|
9
12
|
import { SleepCycle } from "./api/resources/sleepCycle/client/Client";
|
|
10
13
|
import { Profile } from "./api/resources/profile/client/Client";
|
|
11
14
|
import { Devices } from "./api/resources/devices/client/Client";
|
|
12
15
|
import { Activity } from "./api/resources/activity/client/Client";
|
|
13
|
-
import { Workouts } from "./api/resources/workouts/client/Client";
|
|
14
|
-
import { Sleep } from "./api/resources/sleep/client/Client";
|
|
15
16
|
import { Body } from "./api/resources/body/client/Client";
|
|
16
17
|
import { Meal } from "./api/resources/meal/client/Client";
|
|
17
18
|
import { MenstrualCycle } from "./api/resources/menstrualCycle/client/Client";
|
|
18
19
|
import { Providers } from "./api/resources/providers/client/Client";
|
|
19
|
-
import { Testkit } from "./api/resources/testkit/client/Client";
|
|
20
20
|
import { LabTests } from "./api/resources/labTests/client/Client";
|
|
21
|
-
import { Order } from "./api/resources/order/client/Client";
|
|
22
21
|
import { Team } from "./api/resources/team/client/Client";
|
|
23
|
-
import {
|
|
22
|
+
import { Testkit } from "./api/resources/testkit/client/Client";
|
|
23
|
+
import { Order } from "./api/resources/order/client/Client";
|
|
24
24
|
import { Introspect } from "./api/resources/introspect/client/Client";
|
|
25
25
|
import { Insurance } from "./api/resources/insurance/client/Client";
|
|
26
26
|
import { Payor } from "./api/resources/payor/client/Client";
|
|
@@ -42,10 +42,16 @@ export declare namespace VitalClient {
|
|
|
42
42
|
export declare class VitalClient {
|
|
43
43
|
protected readonly _options: VitalClient.Options;
|
|
44
44
|
constructor(_options?: VitalClient.Options);
|
|
45
|
-
protected _link: Link | undefined;
|
|
46
|
-
get link(): Link;
|
|
47
45
|
protected _user: User | undefined;
|
|
48
46
|
get user(): User;
|
|
47
|
+
protected _link: Link | undefined;
|
|
48
|
+
get link(): Link;
|
|
49
|
+
protected _sleep: Sleep | undefined;
|
|
50
|
+
get sleep(): Sleep;
|
|
51
|
+
protected _workouts: Workouts | undefined;
|
|
52
|
+
get workouts(): Workouts;
|
|
53
|
+
protected _vitals: Vitals | undefined;
|
|
54
|
+
get vitals(): Vitals;
|
|
49
55
|
protected _electrocardiogram: Electrocardiogram | undefined;
|
|
50
56
|
get electrocardiogram(): Electrocardiogram;
|
|
51
57
|
protected _sleepCycle: SleepCycle | undefined;
|
|
@@ -56,10 +62,6 @@ export declare class VitalClient {
|
|
|
56
62
|
get devices(): Devices;
|
|
57
63
|
protected _activity: Activity | undefined;
|
|
58
64
|
get activity(): Activity;
|
|
59
|
-
protected _workouts: Workouts | undefined;
|
|
60
|
-
get workouts(): Workouts;
|
|
61
|
-
protected _sleep: Sleep | undefined;
|
|
62
|
-
get sleep(): Sleep;
|
|
63
65
|
protected _body: Body | undefined;
|
|
64
66
|
get body(): Body;
|
|
65
67
|
protected _meal: Meal | undefined;
|
|
@@ -68,16 +70,14 @@ export declare class VitalClient {
|
|
|
68
70
|
get menstrualCycle(): MenstrualCycle;
|
|
69
71
|
protected _providers: Providers | undefined;
|
|
70
72
|
get providers(): Providers;
|
|
71
|
-
protected _testkit: Testkit | undefined;
|
|
72
|
-
get testkit(): Testkit;
|
|
73
73
|
protected _labTests: LabTests | undefined;
|
|
74
74
|
get labTests(): LabTests;
|
|
75
|
-
protected _order: Order | undefined;
|
|
76
|
-
get order(): Order;
|
|
77
75
|
protected _team: Team | undefined;
|
|
78
76
|
get team(): Team;
|
|
79
|
-
protected
|
|
80
|
-
get
|
|
77
|
+
protected _testkit: Testkit | undefined;
|
|
78
|
+
get testkit(): Testkit;
|
|
79
|
+
protected _order: Order | undefined;
|
|
80
|
+
get order(): Order;
|
|
81
81
|
protected _introspect: Introspect | undefined;
|
|
82
82
|
get introspect(): Introspect;
|
|
83
83
|
protected _insurance: Insurance | undefined;
|
package/dist/Client.js
CHANGED
|
@@ -4,24 +4,24 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.VitalClient = void 0;
|
|
7
|
-
const Client_1 = require("./api/resources/
|
|
8
|
-
const Client_2 = require("./api/resources/
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
14
|
-
const Client_8 = require("./api/resources/
|
|
15
|
-
const Client_9 = require("./api/resources/
|
|
16
|
-
const Client_10 = require("./api/resources/
|
|
17
|
-
const Client_11 = require("./api/resources/
|
|
18
|
-
const Client_12 = require("./api/resources/
|
|
19
|
-
const Client_13 = require("./api/resources/
|
|
20
|
-
const Client_14 = require("./api/resources/
|
|
7
|
+
const Client_1 = require("./api/resources/user/client/Client");
|
|
8
|
+
const Client_2 = require("./api/resources/link/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/sleep/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/workouts/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/vitals/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/electrocardiogram/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/sleepCycle/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/profile/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/devices/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/activity/client/Client");
|
|
17
|
+
const Client_11 = require("./api/resources/body/client/Client");
|
|
18
|
+
const Client_12 = require("./api/resources/meal/client/Client");
|
|
19
|
+
const Client_13 = require("./api/resources/menstrualCycle/client/Client");
|
|
20
|
+
const Client_14 = require("./api/resources/providers/client/Client");
|
|
21
21
|
const Client_15 = require("./api/resources/labTests/client/Client");
|
|
22
|
-
const Client_16 = require("./api/resources/
|
|
23
|
-
const Client_17 = require("./api/resources/
|
|
24
|
-
const Client_18 = require("./api/resources/
|
|
22
|
+
const Client_16 = require("./api/resources/team/client/Client");
|
|
23
|
+
const Client_17 = require("./api/resources/testkit/client/Client");
|
|
24
|
+
const Client_18 = require("./api/resources/order/client/Client");
|
|
25
25
|
const Client_19 = require("./api/resources/introspect/client/Client");
|
|
26
26
|
const Client_20 = require("./api/resources/insurance/client/Client");
|
|
27
27
|
const Client_21 = require("./api/resources/payor/client/Client");
|
|
@@ -30,77 +30,77 @@ class VitalClient {
|
|
|
30
30
|
constructor(_options = {}) {
|
|
31
31
|
this._options = _options;
|
|
32
32
|
}
|
|
33
|
+
get user() {
|
|
34
|
+
var _a;
|
|
35
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_1.User(this._options)));
|
|
36
|
+
}
|
|
33
37
|
get link() {
|
|
34
38
|
var _a;
|
|
35
|
-
return ((_a = this._link) !== null && _a !== void 0 ? _a : (this._link = new
|
|
39
|
+
return ((_a = this._link) !== null && _a !== void 0 ? _a : (this._link = new Client_2.Link(this._options)));
|
|
36
40
|
}
|
|
37
|
-
get
|
|
41
|
+
get sleep() {
|
|
38
42
|
var _a;
|
|
39
|
-
return ((_a = this.
|
|
43
|
+
return ((_a = this._sleep) !== null && _a !== void 0 ? _a : (this._sleep = new Client_3.Sleep(this._options)));
|
|
44
|
+
}
|
|
45
|
+
get workouts() {
|
|
46
|
+
var _a;
|
|
47
|
+
return ((_a = this._workouts) !== null && _a !== void 0 ? _a : (this._workouts = new Client_4.Workouts(this._options)));
|
|
48
|
+
}
|
|
49
|
+
get vitals() {
|
|
50
|
+
var _a;
|
|
51
|
+
return ((_a = this._vitals) !== null && _a !== void 0 ? _a : (this._vitals = new Client_5.Vitals(this._options)));
|
|
40
52
|
}
|
|
41
53
|
get electrocardiogram() {
|
|
42
54
|
var _a;
|
|
43
|
-
return ((_a = this._electrocardiogram) !== null && _a !== void 0 ? _a : (this._electrocardiogram = new
|
|
55
|
+
return ((_a = this._electrocardiogram) !== null && _a !== void 0 ? _a : (this._electrocardiogram = new Client_6.Electrocardiogram(this._options)));
|
|
44
56
|
}
|
|
45
57
|
get sleepCycle() {
|
|
46
58
|
var _a;
|
|
47
|
-
return ((_a = this._sleepCycle) !== null && _a !== void 0 ? _a : (this._sleepCycle = new
|
|
59
|
+
return ((_a = this._sleepCycle) !== null && _a !== void 0 ? _a : (this._sleepCycle = new Client_7.SleepCycle(this._options)));
|
|
48
60
|
}
|
|
49
61
|
get profile() {
|
|
50
62
|
var _a;
|
|
51
|
-
return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new
|
|
63
|
+
return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new Client_8.Profile(this._options)));
|
|
52
64
|
}
|
|
53
65
|
get devices() {
|
|
54
66
|
var _a;
|
|
55
|
-
return ((_a = this._devices) !== null && _a !== void 0 ? _a : (this._devices = new
|
|
67
|
+
return ((_a = this._devices) !== null && _a !== void 0 ? _a : (this._devices = new Client_9.Devices(this._options)));
|
|
56
68
|
}
|
|
57
69
|
get activity() {
|
|
58
70
|
var _a;
|
|
59
|
-
return ((_a = this._activity) !== null && _a !== void 0 ? _a : (this._activity = new
|
|
60
|
-
}
|
|
61
|
-
get workouts() {
|
|
62
|
-
var _a;
|
|
63
|
-
return ((_a = this._workouts) !== null && _a !== void 0 ? _a : (this._workouts = new Client_8.Workouts(this._options)));
|
|
64
|
-
}
|
|
65
|
-
get sleep() {
|
|
66
|
-
var _a;
|
|
67
|
-
return ((_a = this._sleep) !== null && _a !== void 0 ? _a : (this._sleep = new Client_9.Sleep(this._options)));
|
|
71
|
+
return ((_a = this._activity) !== null && _a !== void 0 ? _a : (this._activity = new Client_10.Activity(this._options)));
|
|
68
72
|
}
|
|
69
73
|
get body() {
|
|
70
74
|
var _a;
|
|
71
|
-
return ((_a = this._body) !== null && _a !== void 0 ? _a : (this._body = new
|
|
75
|
+
return ((_a = this._body) !== null && _a !== void 0 ? _a : (this._body = new Client_11.Body(this._options)));
|
|
72
76
|
}
|
|
73
77
|
get meal() {
|
|
74
78
|
var _a;
|
|
75
|
-
return ((_a = this._meal) !== null && _a !== void 0 ? _a : (this._meal = new
|
|
79
|
+
return ((_a = this._meal) !== null && _a !== void 0 ? _a : (this._meal = new Client_12.Meal(this._options)));
|
|
76
80
|
}
|
|
77
81
|
get menstrualCycle() {
|
|
78
82
|
var _a;
|
|
79
|
-
return ((_a = this._menstrualCycle) !== null && _a !== void 0 ? _a : (this._menstrualCycle = new
|
|
83
|
+
return ((_a = this._menstrualCycle) !== null && _a !== void 0 ? _a : (this._menstrualCycle = new Client_13.MenstrualCycle(this._options)));
|
|
80
84
|
}
|
|
81
85
|
get providers() {
|
|
82
86
|
var _a;
|
|
83
|
-
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new
|
|
84
|
-
}
|
|
85
|
-
get testkit() {
|
|
86
|
-
var _a;
|
|
87
|
-
return ((_a = this._testkit) !== null && _a !== void 0 ? _a : (this._testkit = new Client_14.Testkit(this._options)));
|
|
87
|
+
return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_14.Providers(this._options)));
|
|
88
88
|
}
|
|
89
89
|
get labTests() {
|
|
90
90
|
var _a;
|
|
91
91
|
return ((_a = this._labTests) !== null && _a !== void 0 ? _a : (this._labTests = new Client_15.LabTests(this._options)));
|
|
92
92
|
}
|
|
93
|
-
get
|
|
93
|
+
get team() {
|
|
94
94
|
var _a;
|
|
95
|
-
return ((_a = this.
|
|
95
|
+
return ((_a = this._team) !== null && _a !== void 0 ? _a : (this._team = new Client_16.Team(this._options)));
|
|
96
96
|
}
|
|
97
|
-
get
|
|
97
|
+
get testkit() {
|
|
98
98
|
var _a;
|
|
99
|
-
return ((_a = this.
|
|
99
|
+
return ((_a = this._testkit) !== null && _a !== void 0 ? _a : (this._testkit = new Client_17.Testkit(this._options)));
|
|
100
100
|
}
|
|
101
|
-
get
|
|
101
|
+
get order() {
|
|
102
102
|
var _a;
|
|
103
|
-
return ((_a = this.
|
|
103
|
+
return ((_a = this._order) !== null && _a !== void 0 ? _a : (this._order = new Client_18.Order(this._options)));
|
|
104
104
|
}
|
|
105
105
|
get introspect() {
|
|
106
106
|
var _a;
|
|
@@ -78,7 +78,7 @@ class Activity {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
queryParameters: _queryParams,
|
|
84
84
|
requestType: "json",
|
|
@@ -154,7 +154,7 @@ class Activity {
|
|
|
154
154
|
const _response = yield core.fetcher({
|
|
155
155
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}/raw`),
|
|
156
156
|
method: "GET",
|
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
157
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
queryParameters: _queryParams,
|
|
160
160
|
requestType: "json",
|
|
@@ -81,7 +81,7 @@ class Aggregate {
|
|
|
81
81
|
const _response = yield core.fetcher({
|
|
82
82
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/query`),
|
|
83
83
|
method: "POST",
|
|
84
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
84
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
requestType: "json",
|
|
87
87
|
body: serializers.QueryBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -144,7 +144,7 @@ class Aggregate {
|
|
|
144
144
|
const _response = yield core.fetcher({
|
|
145
145
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/result_table`),
|
|
146
146
|
method: "GET",
|
|
147
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
147
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -215,7 +215,7 @@ class Aggregate {
|
|
|
215
215
|
const _response = yield core.fetcher({
|
|
216
216
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/task_history`),
|
|
217
217
|
method: "GET",
|
|
218
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
218
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
219
219
|
contentType: "application/json",
|
|
220
220
|
queryParameters: _queryParams,
|
|
221
221
|
requestType: "json",
|
|
@@ -78,7 +78,7 @@ class Body {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${encodeURIComponent(userId)}`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
queryParameters: _queryParams,
|
|
84
84
|
requestType: "json",
|
|
@@ -154,7 +154,7 @@ class Body {
|
|
|
154
154
|
const _response = yield core.fetcher({
|
|
155
155
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${encodeURIComponent(userId)}/raw`),
|
|
156
156
|
method: "GET",
|
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
157
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
queryParameters: _queryParams,
|
|
160
160
|
requestType: "json",
|
|
@@ -72,7 +72,7 @@ class Devices {
|
|
|
72
72
|
const _response = yield core.fetcher({
|
|
73
73
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/devices/${encodeURIComponent(userId)}/raw`),
|
|
74
74
|
method: "GET",
|
|
75
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
queryParameters: _queryParams,
|
|
78
78
|
requestType: "json",
|
|
@@ -78,7 +78,7 @@ class Electrocardiogram {
|
|
|
78
78
|
const _response = yield core.fetcher({
|
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/electrocardiogram/${encodeURIComponent(userId)}`),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.384", "User-Agent": "@tryvital/vital-node/3.1.384", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
queryParameters: _queryParams,
|
|
84
84
|
requestType: "json",
|
|
@@ -5,42 +5,42 @@ export * from "./labTests/types";
|
|
|
5
5
|
export * as aggregate from "./aggregate";
|
|
6
6
|
export * from "./aggregate/types";
|
|
7
7
|
export * as user from "./user";
|
|
8
|
+
export * as sleep from "./sleep";
|
|
9
|
+
export * as workouts from "./workouts";
|
|
10
|
+
export * as vitals from "./vitals";
|
|
8
11
|
export * as electrocardiogram from "./electrocardiogram";
|
|
9
12
|
export * as sleepCycle from "./sleepCycle";
|
|
10
13
|
export * as profile from "./profile";
|
|
11
14
|
export * as devices from "./devices";
|
|
12
15
|
export * as activity from "./activity";
|
|
13
|
-
export * as workouts from "./workouts";
|
|
14
|
-
export * as sleep from "./sleep";
|
|
15
16
|
export * as body from "./body";
|
|
16
17
|
export * as meal from "./meal";
|
|
17
18
|
export * as menstrualCycle from "./menstrualCycle";
|
|
18
19
|
export * as providers from "./providers";
|
|
20
|
+
export * as team from "./team";
|
|
19
21
|
export * as testkit from "./testkit";
|
|
20
22
|
export * as order from "./order";
|
|
21
|
-
export * as team from "./team";
|
|
22
|
-
export * as vitals from "./vitals";
|
|
23
23
|
export * as introspect from "./introspect";
|
|
24
24
|
export * as insurance from "./insurance";
|
|
25
25
|
export * as payor from "./payor";
|
|
26
|
-
export * from "./link/client/requests";
|
|
27
26
|
export * from "./user/client/requests";
|
|
27
|
+
export * from "./link/client/requests";
|
|
28
|
+
export * from "./sleep/client/requests";
|
|
29
|
+
export * from "./workouts/client/requests";
|
|
30
|
+
export * from "./vitals/client/requests";
|
|
28
31
|
export * from "./electrocardiogram/client/requests";
|
|
29
32
|
export * from "./sleepCycle/client/requests";
|
|
30
33
|
export * from "./profile/client/requests";
|
|
31
34
|
export * from "./devices/client/requests";
|
|
32
35
|
export * from "./activity/client/requests";
|
|
33
|
-
export * from "./workouts/client/requests";
|
|
34
|
-
export * from "./sleep/client/requests";
|
|
35
36
|
export * from "./body/client/requests";
|
|
36
37
|
export * from "./meal/client/requests";
|
|
37
38
|
export * from "./menstrualCycle/client/requests";
|
|
38
39
|
export * from "./providers/client/requests";
|
|
39
|
-
export * from "./testkit/client/requests";
|
|
40
40
|
export * from "./labTests/client/requests";
|
|
41
|
-
export * from "./order/client/requests";
|
|
42
41
|
export * from "./team/client/requests";
|
|
43
|
-
export * from "./
|
|
42
|
+
export * from "./testkit/client/requests";
|
|
43
|
+
export * from "./order/client/requests";
|
|
44
44
|
export * from "./introspect/client/requests";
|
|
45
45
|
export * from "./insurance/client/requests";
|
|
46
46
|
export * from "./payor/client/requests";
|