@tryvital/vital-node 3.1.55 → 3.1.57
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/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +3 -2
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.js +43 -28
- package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +15 -0
- package/api/resources/labTests/index.d.ts +1 -0
- package/api/resources/labTests/index.js +1 -0
- package/api/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.d.ts +8 -0
- package/api/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.js +10 -0
- package/api/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.d.ts +9 -0
- package/api/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.js +11 -0
- package/api/resources/labTests/types/index.d.ts +2 -0
- package/api/resources/labTests/types/index.js +18 -0
- package/api/resources/link/client/Client.js +14 -14
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/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.js +4 -4
- 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 +16 -16
- package/api/resources/vitals/client/Client.d.ts +36 -0
- package/api/resources/vitals/client/Client.js +348 -52
- package/api/resources/vitals/client/requests/VitalsCarbohydratesGroupedRequest.d.ts +31 -0
- package/api/resources/vitals/client/requests/VitalsCarbohydratesGroupedRequest.js +5 -0
- package/api/resources/vitals/client/requests/VitalsInsulinInjectionGroupedRequest.d.ts +31 -0
- package/api/resources/vitals/client/requests/VitalsInsulinInjectionGroupedRequest.js +5 -0
- package/api/resources/vitals/client/requests/VitalsNoteGroupedRequest.d.ts +31 -0
- package/api/resources/vitals/client/requests/VitalsNoteGroupedRequest.js +5 -0
- package/api/resources/vitals/client/requests/VitalsWorkoutDurationGroupedRequest.d.ts +31 -0
- package/api/resources/vitals/client/requests/VitalsWorkoutDurationGroupedRequest.js +5 -0
- package/api/resources/vitals/client/requests/index.d.ts +4 -0
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/ClientFacingCarbohydratesSample.d.ts +18 -0
- package/api/types/ClientFacingCarbohydratesSample.js +5 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.d.ts +10 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.js +5 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.d.ts +10 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.js +5 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.d.ts +10 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.js +5 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.d.ts +10 -0
- package/api/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.js +5 -0
- package/api/types/ClientFacingInsulinInjectionSample.d.ts +19 -0
- package/api/types/ClientFacingInsulinInjectionSample.js +5 -0
- package/api/types/ClientFacingInsulinInjectionSampleType.d.ts +11 -0
- package/api/types/ClientFacingInsulinInjectionSampleType.js +10 -0
- package/api/types/ClientFacingNoteSample.d.ts +20 -0
- package/api/types/ClientFacingNoteSample.js +5 -0
- package/api/types/ClientFacingNoteSampleTagsItem.d.ts +10 -0
- package/api/types/ClientFacingNoteSampleTagsItem.js +12 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.d.ts +8 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.js +5 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.d.ts +8 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.js +5 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingNoteSample.d.ts +8 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingNoteSample.js +5 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.d.ts +8 -0
- package/api/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.js +5 -0
- package/api/types/ClientFacingWorkoutDurationSample.d.ts +19 -0
- package/api/types/ClientFacingWorkoutDurationSample.js +5 -0
- package/api/types/ClientFacingWorkoutDurationSampleIntensity.d.ts +9 -0
- package/api/types/ClientFacingWorkoutDurationSampleIntensity.js +11 -0
- package/api/types/index.d.ts +15 -0
- package/api/types/index.js +15 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.js +43 -28
- package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +15 -0
- package/dist/api/resources/labTests/index.d.ts +1 -0
- package/dist/api/resources/labTests/index.js +1 -0
- package/dist/api/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.d.ts +8 -0
- package/dist/api/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.js +10 -0
- package/dist/api/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.d.ts +9 -0
- package/dist/api/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.js +11 -0
- package/dist/api/resources/labTests/types/index.d.ts +2 -0
- package/dist/api/resources/labTests/types/index.js +18 -0
- package/dist/api/resources/link/client/Client.js +14 -14
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/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.js +4 -4
- 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 +16 -16
- package/dist/api/resources/vitals/client/Client.d.ts +36 -0
- package/dist/api/resources/vitals/client/Client.js +348 -52
- package/dist/api/resources/vitals/client/requests/VitalsCarbohydratesGroupedRequest.d.ts +31 -0
- package/dist/api/resources/vitals/client/requests/VitalsCarbohydratesGroupedRequest.js +5 -0
- package/dist/api/resources/vitals/client/requests/VitalsInsulinInjectionGroupedRequest.d.ts +31 -0
- package/dist/api/resources/vitals/client/requests/VitalsInsulinInjectionGroupedRequest.js +5 -0
- package/dist/api/resources/vitals/client/requests/VitalsNoteGroupedRequest.d.ts +31 -0
- package/dist/api/resources/vitals/client/requests/VitalsNoteGroupedRequest.js +5 -0
- package/dist/api/resources/vitals/client/requests/VitalsWorkoutDurationGroupedRequest.d.ts +31 -0
- package/dist/api/resources/vitals/client/requests/VitalsWorkoutDurationGroupedRequest.js +5 -0
- package/dist/api/resources/vitals/client/requests/index.d.ts +4 -0
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/ClientFacingCarbohydratesSample.d.ts +18 -0
- package/dist/api/types/ClientFacingCarbohydratesSample.js +5 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.d.ts +10 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.js +5 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.d.ts +10 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.js +5 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.d.ts +10 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.js +5 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.d.ts +10 -0
- package/dist/api/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.js +5 -0
- package/dist/api/types/ClientFacingInsulinInjectionSample.d.ts +19 -0
- package/dist/api/types/ClientFacingInsulinInjectionSample.js +5 -0
- package/dist/api/types/ClientFacingInsulinInjectionSampleType.d.ts +11 -0
- package/dist/api/types/ClientFacingInsulinInjectionSampleType.js +10 -0
- package/dist/api/types/ClientFacingNoteSample.d.ts +20 -0
- package/dist/api/types/ClientFacingNoteSample.js +5 -0
- package/dist/api/types/ClientFacingNoteSampleTagsItem.d.ts +10 -0
- package/dist/api/types/ClientFacingNoteSampleTagsItem.js +12 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.d.ts +8 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.js +5 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.d.ts +8 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.js +5 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingNoteSample.d.ts +8 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingNoteSample.js +5 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.d.ts +8 -0
- package/dist/api/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.js +5 -0
- package/dist/api/types/ClientFacingWorkoutDurationSample.d.ts +19 -0
- package/dist/api/types/ClientFacingWorkoutDurationSample.js +5 -0
- package/dist/api/types/ClientFacingWorkoutDurationSampleIntensity.d.ts +9 -0
- package/dist/api/types/ClientFacingWorkoutDurationSampleIntensity.js +11 -0
- package/dist/api/types/index.d.ts +15 -0
- package/dist/api/types/index.js +15 -0
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +2 -1
- package/dist/serialization/resources/index.js +3 -2
- package/dist/serialization/resources/labTests/index.d.ts +1 -0
- package/dist/serialization/resources/labTests/index.js +1 -0
- package/dist/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.d.ts +10 -0
- package/dist/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.js +31 -0
- package/dist/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.d.ts +10 -0
- package/dist/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.js +31 -0
- package/dist/serialization/resources/labTests/types/index.d.ts +2 -0
- package/dist/serialization/resources/labTests/types/index.js +18 -0
- package/dist/serialization/types/ClientFacingCarbohydratesSample.d.ts +19 -0
- package/dist/serialization/types/ClientFacingCarbohydratesSample.js +40 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.js +36 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.js +36 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.js +36 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.js +36 -0
- package/dist/serialization/types/ClientFacingInsulinInjectionSample.d.ts +20 -0
- package/dist/serialization/types/ClientFacingInsulinInjectionSample.js +41 -0
- package/dist/serialization/types/ClientFacingInsulinInjectionSampleType.d.ts +10 -0
- package/dist/serialization/types/ClientFacingInsulinInjectionSampleType.js +31 -0
- package/dist/serialization/types/ClientFacingNoteSample.d.ts +21 -0
- package/dist/serialization/types/ClientFacingNoteSample.js +42 -0
- package/dist/serialization/types/ClientFacingNoteSampleTagsItem.d.ts +10 -0
- package/dist/serialization/types/ClientFacingNoteSampleTagsItem.js +31 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.js +36 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.js +36 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingNoteSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingNoteSample.js +36 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.d.ts +15 -0
- package/dist/serialization/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.js +36 -0
- package/dist/serialization/types/ClientFacingWorkoutDurationSample.d.ts +21 -0
- package/dist/serialization/types/ClientFacingWorkoutDurationSample.js +42 -0
- package/dist/serialization/types/ClientFacingWorkoutDurationSampleIntensity.d.ts +10 -0
- package/dist/serialization/types/ClientFacingWorkoutDurationSampleIntensity.js +31 -0
- package/dist/serialization/types/index.d.ts +15 -0
- package/dist/serialization/types/index.js +15 -0
- package/package.json +1 -1
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/index.d.ts +2 -1
- package/serialization/resources/index.js +3 -2
- package/serialization/resources/labTests/index.d.ts +1 -0
- package/serialization/resources/labTests/index.js +1 -0
- package/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.d.ts +10 -0
- package/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderDirection.js +31 -0
- package/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.d.ts +10 -0
- package/serialization/resources/labTests/types/LabTestsGetOrdersRequestOrderKey.js +31 -0
- package/serialization/resources/labTests/types/index.d.ts +2 -0
- package/serialization/resources/labTests/types/index.js +18 -0
- package/serialization/types/ClientFacingCarbohydratesSample.d.ts +19 -0
- package/serialization/types/ClientFacingCarbohydratesSample.js +40 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.d.ts +15 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.js +36 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.d.ts +15 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.js +36 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.d.ts +15 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.js +36 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.d.ts +15 -0
- package/serialization/types/ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.js +36 -0
- package/serialization/types/ClientFacingInsulinInjectionSample.d.ts +20 -0
- package/serialization/types/ClientFacingInsulinInjectionSample.js +41 -0
- package/serialization/types/ClientFacingInsulinInjectionSampleType.d.ts +10 -0
- package/serialization/types/ClientFacingInsulinInjectionSampleType.js +31 -0
- package/serialization/types/ClientFacingNoteSample.d.ts +21 -0
- package/serialization/types/ClientFacingNoteSample.js +42 -0
- package/serialization/types/ClientFacingNoteSampleTagsItem.d.ts +10 -0
- package/serialization/types/ClientFacingNoteSampleTagsItem.js +31 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.d.ts +15 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingCarbohydratesSample.js +36 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.d.ts +15 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingInsulinInjectionSample.js +36 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingNoteSample.d.ts +15 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingNoteSample.js +36 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.d.ts +15 -0
- package/serialization/types/ClientFacingTimeseriesGroupClientFacingWorkoutDurationSample.js +36 -0
- package/serialization/types/ClientFacingWorkoutDurationSample.d.ts +21 -0
- package/serialization/types/ClientFacingWorkoutDurationSample.js +42 -0
- package/serialization/types/ClientFacingWorkoutDurationSampleIntensity.d.ts +10 -0
- package/serialization/types/ClientFacingWorkoutDurationSampleIntensity.js +31 -0
- package/serialization/types/index.d.ts +15 -0
- package/serialization/types/index.js +15 -0
@@ -49,6 +49,80 @@ class Vitals {
|
|
49
49
|
constructor(_options) {
|
50
50
|
this._options = _options;
|
51
51
|
}
|
52
|
+
/**
|
53
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
54
|
+
*
|
55
|
+
* @example
|
56
|
+
* await vital.vitals.workoutDurationGrouped("user_id", {
|
57
|
+
* startDate: "start_date"
|
58
|
+
* })
|
59
|
+
*/
|
60
|
+
workoutDurationGrouped(userId, request, requestOptions) {
|
61
|
+
var _a;
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
63
|
+
const { cursor, nextCursor, provider, startDate, endDate } = request;
|
64
|
+
const _queryParams = {};
|
65
|
+
if (cursor != null) {
|
66
|
+
_queryParams["cursor"] = cursor;
|
67
|
+
}
|
68
|
+
if (nextCursor != null) {
|
69
|
+
_queryParams["next_cursor"] = nextCursor;
|
70
|
+
}
|
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
|
+
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/timeseries/${userId}/workout_duration/grouped`),
|
80
|
+
method: "GET",
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
|
+
contentType: "application/json",
|
83
|
+
queryParameters: _queryParams,
|
84
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
85
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
86
|
+
});
|
87
|
+
if (_response.ok) {
|
88
|
+
return yield serializers.ClientFacingGroupedTimeseriesResponseClientFacingWorkoutDurationSample.parseOrThrow(_response.body, {
|
89
|
+
unrecognizedObjectKeys: "passthrough",
|
90
|
+
allowUnrecognizedUnionMembers: true,
|
91
|
+
allowUnrecognizedEnumValues: true,
|
92
|
+
breadcrumbsPrefix: ["response"],
|
93
|
+
});
|
94
|
+
}
|
95
|
+
if (_response.error.reason === "status-code") {
|
96
|
+
switch (_response.error.statusCode) {
|
97
|
+
case 422:
|
98
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
99
|
+
unrecognizedObjectKeys: "passthrough",
|
100
|
+
allowUnrecognizedUnionMembers: true,
|
101
|
+
allowUnrecognizedEnumValues: true,
|
102
|
+
breadcrumbsPrefix: ["response"],
|
103
|
+
}));
|
104
|
+
default:
|
105
|
+
throw new errors.VitalError({
|
106
|
+
statusCode: _response.error.statusCode,
|
107
|
+
body: _response.error.body,
|
108
|
+
});
|
109
|
+
}
|
110
|
+
}
|
111
|
+
switch (_response.error.reason) {
|
112
|
+
case "non-json":
|
113
|
+
throw new errors.VitalError({
|
114
|
+
statusCode: _response.error.statusCode,
|
115
|
+
body: _response.error.rawBody,
|
116
|
+
});
|
117
|
+
case "timeout":
|
118
|
+
throw new errors.VitalTimeoutError();
|
119
|
+
case "unknown":
|
120
|
+
throw new errors.VitalError({
|
121
|
+
message: _response.error.errorMessage,
|
122
|
+
});
|
123
|
+
}
|
124
|
+
});
|
125
|
+
}
|
52
126
|
/**
|
53
127
|
* @throws {@link Vital.UnprocessableEntityError}
|
54
128
|
*
|
@@ -78,7 +152,7 @@ class Vitals {
|
|
78
152
|
const _response = yield core.fetcher({
|
79
153
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/vo2_max/grouped`),
|
80
154
|
method: "GET",
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
155
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
156
|
contentType: "application/json",
|
83
157
|
queryParameters: _queryParams,
|
84
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -152,7 +226,7 @@ class Vitals {
|
|
152
226
|
const _response = yield core.fetcher({
|
153
227
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/stress_level/grouped`),
|
154
228
|
method: "GET",
|
155
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
229
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
156
230
|
contentType: "application/json",
|
157
231
|
queryParameters: _queryParams,
|
158
232
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -226,7 +300,7 @@ class Vitals {
|
|
226
300
|
const _response = yield core.fetcher({
|
227
301
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/mindfulness_minutes/grouped`),
|
228
302
|
method: "GET",
|
229
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
303
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
230
304
|
contentType: "application/json",
|
231
305
|
queryParameters: _queryParams,
|
232
306
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -300,7 +374,7 @@ class Vitals {
|
|
300
374
|
const _response = yield core.fetcher({
|
301
375
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/caffeine/grouped`),
|
302
376
|
method: "GET",
|
303
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
377
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
304
378
|
contentType: "application/json",
|
305
379
|
queryParameters: _queryParams,
|
306
380
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -374,7 +448,7 @@ class Vitals {
|
|
374
448
|
const _response = yield core.fetcher({
|
375
449
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/water/grouped`),
|
376
450
|
method: "GET",
|
377
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
451
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
378
452
|
contentType: "application/json",
|
379
453
|
queryParameters: _queryParams,
|
380
454
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -448,7 +522,7 @@ class Vitals {
|
|
448
522
|
const _response = yield core.fetcher({
|
449
523
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/steps/grouped`),
|
450
524
|
method: "GET",
|
451
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
525
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
452
526
|
contentType: "application/json",
|
453
527
|
queryParameters: _queryParams,
|
454
528
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -522,7 +596,7 @@ class Vitals {
|
|
522
596
|
const _response = yield core.fetcher({
|
523
597
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/floors_climbed/grouped`),
|
524
598
|
method: "GET",
|
525
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
599
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
526
600
|
contentType: "application/json",
|
527
601
|
queryParameters: _queryParams,
|
528
602
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -596,7 +670,7 @@ class Vitals {
|
|
596
670
|
const _response = yield core.fetcher({
|
597
671
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/distance/grouped`),
|
598
672
|
method: "GET",
|
599
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
673
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
600
674
|
contentType: "application/json",
|
601
675
|
queryParameters: _queryParams,
|
602
676
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -670,7 +744,7 @@ class Vitals {
|
|
670
744
|
const _response = yield core.fetcher({
|
671
745
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_basal/grouped`),
|
672
746
|
method: "GET",
|
673
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
747
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
674
748
|
contentType: "application/json",
|
675
749
|
queryParameters: _queryParams,
|
676
750
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -744,7 +818,7 @@ class Vitals {
|
|
744
818
|
const _response = yield core.fetcher({
|
745
819
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_active/grouped`),
|
746
820
|
method: "GET",
|
747
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
821
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
748
822
|
contentType: "application/json",
|
749
823
|
queryParameters: _queryParams,
|
750
824
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -818,7 +892,7 @@ class Vitals {
|
|
818
892
|
const _response = yield core.fetcher({
|
819
893
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/respiratory_rate/grouped`),
|
820
894
|
method: "GET",
|
821
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
895
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
822
896
|
contentType: "application/json",
|
823
897
|
queryParameters: _queryParams,
|
824
898
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -863,6 +937,154 @@ class Vitals {
|
|
863
937
|
}
|
864
938
|
});
|
865
939
|
}
|
940
|
+
/**
|
941
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
942
|
+
*
|
943
|
+
* @example
|
944
|
+
* await vital.vitals.noteGrouped("user_id", {
|
945
|
+
* startDate: "start_date"
|
946
|
+
* })
|
947
|
+
*/
|
948
|
+
noteGrouped(userId, request, requestOptions) {
|
949
|
+
var _a;
|
950
|
+
return __awaiter(this, void 0, void 0, function* () {
|
951
|
+
const { cursor, nextCursor, provider, startDate, endDate } = request;
|
952
|
+
const _queryParams = {};
|
953
|
+
if (cursor != null) {
|
954
|
+
_queryParams["cursor"] = cursor;
|
955
|
+
}
|
956
|
+
if (nextCursor != null) {
|
957
|
+
_queryParams["next_cursor"] = nextCursor;
|
958
|
+
}
|
959
|
+
if (provider != null) {
|
960
|
+
_queryParams["provider"] = provider;
|
961
|
+
}
|
962
|
+
_queryParams["start_date"] = startDate;
|
963
|
+
if (endDate != null) {
|
964
|
+
_queryParams["end_date"] = endDate;
|
965
|
+
}
|
966
|
+
const _response = yield core.fetcher({
|
967
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/note/grouped`),
|
968
|
+
method: "GET",
|
969
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
970
|
+
contentType: "application/json",
|
971
|
+
queryParameters: _queryParams,
|
972
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
973
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
974
|
+
});
|
975
|
+
if (_response.ok) {
|
976
|
+
return yield serializers.ClientFacingGroupedTimeseriesResponseClientFacingNoteSample.parseOrThrow(_response.body, {
|
977
|
+
unrecognizedObjectKeys: "passthrough",
|
978
|
+
allowUnrecognizedUnionMembers: true,
|
979
|
+
allowUnrecognizedEnumValues: true,
|
980
|
+
breadcrumbsPrefix: ["response"],
|
981
|
+
});
|
982
|
+
}
|
983
|
+
if (_response.error.reason === "status-code") {
|
984
|
+
switch (_response.error.statusCode) {
|
985
|
+
case 422:
|
986
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
987
|
+
unrecognizedObjectKeys: "passthrough",
|
988
|
+
allowUnrecognizedUnionMembers: true,
|
989
|
+
allowUnrecognizedEnumValues: true,
|
990
|
+
breadcrumbsPrefix: ["response"],
|
991
|
+
}));
|
992
|
+
default:
|
993
|
+
throw new errors.VitalError({
|
994
|
+
statusCode: _response.error.statusCode,
|
995
|
+
body: _response.error.body,
|
996
|
+
});
|
997
|
+
}
|
998
|
+
}
|
999
|
+
switch (_response.error.reason) {
|
1000
|
+
case "non-json":
|
1001
|
+
throw new errors.VitalError({
|
1002
|
+
statusCode: _response.error.statusCode,
|
1003
|
+
body: _response.error.rawBody,
|
1004
|
+
});
|
1005
|
+
case "timeout":
|
1006
|
+
throw new errors.VitalTimeoutError();
|
1007
|
+
case "unknown":
|
1008
|
+
throw new errors.VitalError({
|
1009
|
+
message: _response.error.errorMessage,
|
1010
|
+
});
|
1011
|
+
}
|
1012
|
+
});
|
1013
|
+
}
|
1014
|
+
/**
|
1015
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1016
|
+
*
|
1017
|
+
* @example
|
1018
|
+
* await vital.vitals.insulinInjectionGrouped("user_id", {
|
1019
|
+
* startDate: "start_date"
|
1020
|
+
* })
|
1021
|
+
*/
|
1022
|
+
insulinInjectionGrouped(userId, request, requestOptions) {
|
1023
|
+
var _a;
|
1024
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1025
|
+
const { cursor, nextCursor, provider, startDate, endDate } = request;
|
1026
|
+
const _queryParams = {};
|
1027
|
+
if (cursor != null) {
|
1028
|
+
_queryParams["cursor"] = cursor;
|
1029
|
+
}
|
1030
|
+
if (nextCursor != null) {
|
1031
|
+
_queryParams["next_cursor"] = nextCursor;
|
1032
|
+
}
|
1033
|
+
if (provider != null) {
|
1034
|
+
_queryParams["provider"] = provider;
|
1035
|
+
}
|
1036
|
+
_queryParams["start_date"] = startDate;
|
1037
|
+
if (endDate != null) {
|
1038
|
+
_queryParams["end_date"] = endDate;
|
1039
|
+
}
|
1040
|
+
const _response = yield core.fetcher({
|
1041
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/insulin_injection/grouped`),
|
1042
|
+
method: "GET",
|
1043
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1044
|
+
contentType: "application/json",
|
1045
|
+
queryParameters: _queryParams,
|
1046
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1047
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1048
|
+
});
|
1049
|
+
if (_response.ok) {
|
1050
|
+
return yield serializers.ClientFacingGroupedTimeseriesResponseClientFacingInsulinInjectionSample.parseOrThrow(_response.body, {
|
1051
|
+
unrecognizedObjectKeys: "passthrough",
|
1052
|
+
allowUnrecognizedUnionMembers: true,
|
1053
|
+
allowUnrecognizedEnumValues: true,
|
1054
|
+
breadcrumbsPrefix: ["response"],
|
1055
|
+
});
|
1056
|
+
}
|
1057
|
+
if (_response.error.reason === "status-code") {
|
1058
|
+
switch (_response.error.statusCode) {
|
1059
|
+
case 422:
|
1060
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1061
|
+
unrecognizedObjectKeys: "passthrough",
|
1062
|
+
allowUnrecognizedUnionMembers: true,
|
1063
|
+
allowUnrecognizedEnumValues: true,
|
1064
|
+
breadcrumbsPrefix: ["response"],
|
1065
|
+
}));
|
1066
|
+
default:
|
1067
|
+
throw new errors.VitalError({
|
1068
|
+
statusCode: _response.error.statusCode,
|
1069
|
+
body: _response.error.body,
|
1070
|
+
});
|
1071
|
+
}
|
1072
|
+
}
|
1073
|
+
switch (_response.error.reason) {
|
1074
|
+
case "non-json":
|
1075
|
+
throw new errors.VitalError({
|
1076
|
+
statusCode: _response.error.statusCode,
|
1077
|
+
body: _response.error.rawBody,
|
1078
|
+
});
|
1079
|
+
case "timeout":
|
1080
|
+
throw new errors.VitalTimeoutError();
|
1081
|
+
case "unknown":
|
1082
|
+
throw new errors.VitalError({
|
1083
|
+
message: _response.error.errorMessage,
|
1084
|
+
});
|
1085
|
+
}
|
1086
|
+
});
|
1087
|
+
}
|
866
1088
|
/**
|
867
1089
|
* @throws {@link Vital.UnprocessableEntityError}
|
868
1090
|
*
|
@@ -892,7 +1114,7 @@ class Vitals {
|
|
892
1114
|
const _response = yield core.fetcher({
|
893
1115
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/ige/grouped`),
|
894
1116
|
method: "GET",
|
895
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1117
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
896
1118
|
contentType: "application/json",
|
897
1119
|
queryParameters: _queryParams,
|
898
1120
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -966,7 +1188,7 @@ class Vitals {
|
|
966
1188
|
const _response = yield core.fetcher({
|
967
1189
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/igg/grouped`),
|
968
1190
|
method: "GET",
|
969
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1191
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
970
1192
|
contentType: "application/json",
|
971
1193
|
queryParameters: _queryParams,
|
972
1194
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1040,7 +1262,7 @@ class Vitals {
|
|
1040
1262
|
const _response = yield core.fetcher({
|
1041
1263
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hypnogram/grouped`),
|
1042
1264
|
method: "GET",
|
1043
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1265
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1044
1266
|
contentType: "application/json",
|
1045
1267
|
queryParameters: _queryParams,
|
1046
1268
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1114,7 +1336,7 @@ class Vitals {
|
|
1114
1336
|
const _response = yield core.fetcher({
|
1115
1337
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hrv/grouped`),
|
1116
1338
|
method: "GET",
|
1117
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1339
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1118
1340
|
contentType: "application/json",
|
1119
1341
|
queryParameters: _queryParams,
|
1120
1342
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1188,7 +1410,7 @@ class Vitals {
|
|
1188
1410
|
const _response = yield core.fetcher({
|
1189
1411
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/heartrate/grouped`),
|
1190
1412
|
method: "GET",
|
1191
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1413
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1192
1414
|
contentType: "application/json",
|
1193
1415
|
queryParameters: _queryParams,
|
1194
1416
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1262,7 +1484,7 @@ class Vitals {
|
|
1262
1484
|
const _response = yield core.fetcher({
|
1263
1485
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/glucose/grouped`),
|
1264
1486
|
method: "GET",
|
1265
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1487
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1266
1488
|
contentType: "application/json",
|
1267
1489
|
queryParameters: _queryParams,
|
1268
1490
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1336,7 +1558,7 @@ class Vitals {
|
|
1336
1558
|
const _response = yield core.fetcher({
|
1337
1559
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/grouped`),
|
1338
1560
|
method: "GET",
|
1339
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1561
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1340
1562
|
contentType: "application/json",
|
1341
1563
|
queryParameters: _queryParams,
|
1342
1564
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1381,6 +1603,80 @@ class Vitals {
|
|
1381
1603
|
}
|
1382
1604
|
});
|
1383
1605
|
}
|
1606
|
+
/**
|
1607
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1608
|
+
*
|
1609
|
+
* @example
|
1610
|
+
* await vital.vitals.carbohydratesGrouped("user_id", {
|
1611
|
+
* startDate: "start_date"
|
1612
|
+
* })
|
1613
|
+
*/
|
1614
|
+
carbohydratesGrouped(userId, request, requestOptions) {
|
1615
|
+
var _a;
|
1616
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1617
|
+
const { cursor, nextCursor, provider, startDate, endDate } = request;
|
1618
|
+
const _queryParams = {};
|
1619
|
+
if (cursor != null) {
|
1620
|
+
_queryParams["cursor"] = cursor;
|
1621
|
+
}
|
1622
|
+
if (nextCursor != null) {
|
1623
|
+
_queryParams["next_cursor"] = nextCursor;
|
1624
|
+
}
|
1625
|
+
if (provider != null) {
|
1626
|
+
_queryParams["provider"] = provider;
|
1627
|
+
}
|
1628
|
+
_queryParams["start_date"] = startDate;
|
1629
|
+
if (endDate != null) {
|
1630
|
+
_queryParams["end_date"] = endDate;
|
1631
|
+
}
|
1632
|
+
const _response = yield core.fetcher({
|
1633
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/carbohydrates/grouped`),
|
1634
|
+
method: "GET",
|
1635
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1636
|
+
contentType: "application/json",
|
1637
|
+
queryParameters: _queryParams,
|
1638
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1639
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1640
|
+
});
|
1641
|
+
if (_response.ok) {
|
1642
|
+
return yield serializers.ClientFacingGroupedTimeseriesResponseClientFacingCarbohydratesSample.parseOrThrow(_response.body, {
|
1643
|
+
unrecognizedObjectKeys: "passthrough",
|
1644
|
+
allowUnrecognizedUnionMembers: true,
|
1645
|
+
allowUnrecognizedEnumValues: true,
|
1646
|
+
breadcrumbsPrefix: ["response"],
|
1647
|
+
});
|
1648
|
+
}
|
1649
|
+
if (_response.error.reason === "status-code") {
|
1650
|
+
switch (_response.error.statusCode) {
|
1651
|
+
case 422:
|
1652
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1653
|
+
unrecognizedObjectKeys: "passthrough",
|
1654
|
+
allowUnrecognizedUnionMembers: true,
|
1655
|
+
allowUnrecognizedEnumValues: true,
|
1656
|
+
breadcrumbsPrefix: ["response"],
|
1657
|
+
}));
|
1658
|
+
default:
|
1659
|
+
throw new errors.VitalError({
|
1660
|
+
statusCode: _response.error.statusCode,
|
1661
|
+
body: _response.error.body,
|
1662
|
+
});
|
1663
|
+
}
|
1664
|
+
}
|
1665
|
+
switch (_response.error.reason) {
|
1666
|
+
case "non-json":
|
1667
|
+
throw new errors.VitalError({
|
1668
|
+
statusCode: _response.error.statusCode,
|
1669
|
+
body: _response.error.rawBody,
|
1670
|
+
});
|
1671
|
+
case "timeout":
|
1672
|
+
throw new errors.VitalTimeoutError();
|
1673
|
+
case "unknown":
|
1674
|
+
throw new errors.VitalError({
|
1675
|
+
message: _response.error.errorMessage,
|
1676
|
+
});
|
1677
|
+
}
|
1678
|
+
});
|
1679
|
+
}
|
1384
1680
|
/**
|
1385
1681
|
* @throws {@link Vital.UnprocessableEntityError}
|
1386
1682
|
*
|
@@ -1410,7 +1706,7 @@ class Vitals {
|
|
1410
1706
|
const _response = yield core.fetcher({
|
1411
1707
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_temperature_delta/grouped`),
|
1412
1708
|
method: "GET",
|
1413
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1709
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1414
1710
|
contentType: "application/json",
|
1415
1711
|
queryParameters: _queryParams,
|
1416
1712
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1484,7 +1780,7 @@ class Vitals {
|
|
1484
1780
|
const _response = yield core.fetcher({
|
1485
1781
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_temperature/grouped`),
|
1486
1782
|
method: "GET",
|
1487
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1783
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1488
1784
|
contentType: "application/json",
|
1489
1785
|
queryParameters: _queryParams,
|
1490
1786
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1558,7 +1854,7 @@ class Vitals {
|
|
1558
1854
|
const _response = yield core.fetcher({
|
1559
1855
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_weight/grouped`),
|
1560
1856
|
method: "GET",
|
1561
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1857
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1562
1858
|
contentType: "application/json",
|
1563
1859
|
queryParameters: _queryParams,
|
1564
1860
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1632,7 +1928,7 @@ class Vitals {
|
|
1632
1928
|
const _response = yield core.fetcher({
|
1633
1929
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_fat/grouped`),
|
1634
1930
|
method: "GET",
|
1635
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1931
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1636
1932
|
contentType: "application/json",
|
1637
1933
|
queryParameters: _queryParams,
|
1638
1934
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1706,7 +2002,7 @@ class Vitals {
|
|
1706
2002
|
const _response = yield core.fetcher({
|
1707
2003
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_oxygen/grouped`),
|
1708
2004
|
method: "GET",
|
1709
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2005
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1710
2006
|
contentType: "application/json",
|
1711
2007
|
queryParameters: _queryParams,
|
1712
2008
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1780,7 +2076,7 @@ class Vitals {
|
|
1780
2076
|
const _response = yield core.fetcher({
|
1781
2077
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/electrocardiogram_voltage/grouped`),
|
1782
2078
|
method: "GET",
|
1783
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2079
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1784
2080
|
contentType: "application/json",
|
1785
2081
|
queryParameters: _queryParams,
|
1786
2082
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1854,7 +2150,7 @@ class Vitals {
|
|
1854
2150
|
const _response = yield core.fetcher({
|
1855
2151
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_pressure/grouped`),
|
1856
2152
|
method: "GET",
|
1857
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2153
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1858
2154
|
contentType: "application/json",
|
1859
2155
|
queryParameters: _queryParams,
|
1860
2156
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1922,7 +2218,7 @@ class Vitals {
|
|
1922
2218
|
const _response = yield core.fetcher({
|
1923
2219
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/vo2_max`),
|
1924
2220
|
method: "GET",
|
1925
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2221
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1926
2222
|
contentType: "application/json",
|
1927
2223
|
queryParameters: _queryParams,
|
1928
2224
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1990,7 +2286,7 @@ class Vitals {
|
|
1990
2286
|
const _response = yield core.fetcher({
|
1991
2287
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/stress_level`),
|
1992
2288
|
method: "GET",
|
1993
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2289
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1994
2290
|
contentType: "application/json",
|
1995
2291
|
queryParameters: _queryParams,
|
1996
2292
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2058,7 +2354,7 @@ class Vitals {
|
|
2058
2354
|
const _response = yield core.fetcher({
|
2059
2355
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/mindfulness_minutes`),
|
2060
2356
|
method: "GET",
|
2061
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2357
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2062
2358
|
contentType: "application/json",
|
2063
2359
|
queryParameters: _queryParams,
|
2064
2360
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2126,7 +2422,7 @@ class Vitals {
|
|
2126
2422
|
const _response = yield core.fetcher({
|
2127
2423
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/caffeine`),
|
2128
2424
|
method: "GET",
|
2129
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2425
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2130
2426
|
contentType: "application/json",
|
2131
2427
|
queryParameters: _queryParams,
|
2132
2428
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2194,7 +2490,7 @@ class Vitals {
|
|
2194
2490
|
const _response = yield core.fetcher({
|
2195
2491
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/water`),
|
2196
2492
|
method: "GET",
|
2197
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2493
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2198
2494
|
contentType: "application/json",
|
2199
2495
|
queryParameters: _queryParams,
|
2200
2496
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2262,7 +2558,7 @@ class Vitals {
|
|
2262
2558
|
const _response = yield core.fetcher({
|
2263
2559
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/steps`),
|
2264
2560
|
method: "GET",
|
2265
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2561
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2266
2562
|
contentType: "application/json",
|
2267
2563
|
queryParameters: _queryParams,
|
2268
2564
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2330,7 +2626,7 @@ class Vitals {
|
|
2330
2626
|
const _response = yield core.fetcher({
|
2331
2627
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/floors_climbed`),
|
2332
2628
|
method: "GET",
|
2333
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2629
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2334
2630
|
contentType: "application/json",
|
2335
2631
|
queryParameters: _queryParams,
|
2336
2632
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2398,7 +2694,7 @@ class Vitals {
|
|
2398
2694
|
const _response = yield core.fetcher({
|
2399
2695
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/distance`),
|
2400
2696
|
method: "GET",
|
2401
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2697
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2402
2698
|
contentType: "application/json",
|
2403
2699
|
queryParameters: _queryParams,
|
2404
2700
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2466,7 +2762,7 @@ class Vitals {
|
|
2466
2762
|
const _response = yield core.fetcher({
|
2467
2763
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_basal`),
|
2468
2764
|
method: "GET",
|
2469
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2765
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2470
2766
|
contentType: "application/json",
|
2471
2767
|
queryParameters: _queryParams,
|
2472
2768
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2534,7 +2830,7 @@ class Vitals {
|
|
2534
2830
|
const _response = yield core.fetcher({
|
2535
2831
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/calories_active`),
|
2536
2832
|
method: "GET",
|
2537
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2833
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2538
2834
|
contentType: "application/json",
|
2539
2835
|
queryParameters: _queryParams,
|
2540
2836
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2602,7 +2898,7 @@ class Vitals {
|
|
2602
2898
|
const _response = yield core.fetcher({
|
2603
2899
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/respiratory_rate`),
|
2604
2900
|
method: "GET",
|
2605
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2901
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2606
2902
|
contentType: "application/json",
|
2607
2903
|
queryParameters: _queryParams,
|
2608
2904
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2670,7 +2966,7 @@ class Vitals {
|
|
2670
2966
|
const _response = yield core.fetcher({
|
2671
2967
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/ige`),
|
2672
2968
|
method: "GET",
|
2673
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
2969
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2674
2970
|
contentType: "application/json",
|
2675
2971
|
queryParameters: _queryParams,
|
2676
2972
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2738,7 +3034,7 @@ class Vitals {
|
|
2738
3034
|
const _response = yield core.fetcher({
|
2739
3035
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/igg`),
|
2740
3036
|
method: "GET",
|
2741
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3037
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2742
3038
|
contentType: "application/json",
|
2743
3039
|
queryParameters: _queryParams,
|
2744
3040
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2806,7 +3102,7 @@ class Vitals {
|
|
2806
3102
|
const _response = yield core.fetcher({
|
2807
3103
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hypnogram`),
|
2808
3104
|
method: "GET",
|
2809
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3105
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2810
3106
|
contentType: "application/json",
|
2811
3107
|
queryParameters: _queryParams,
|
2812
3108
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2874,7 +3170,7 @@ class Vitals {
|
|
2874
3170
|
const _response = yield core.fetcher({
|
2875
3171
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/hrv`),
|
2876
3172
|
method: "GET",
|
2877
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3173
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2878
3174
|
contentType: "application/json",
|
2879
3175
|
queryParameters: _queryParams,
|
2880
3176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -2942,7 +3238,7 @@ class Vitals {
|
|
2942
3238
|
const _response = yield core.fetcher({
|
2943
3239
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/heartrate`),
|
2944
3240
|
method: "GET",
|
2945
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3241
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
2946
3242
|
contentType: "application/json",
|
2947
3243
|
queryParameters: _queryParams,
|
2948
3244
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3010,7 +3306,7 @@ class Vitals {
|
|
3010
3306
|
const _response = yield core.fetcher({
|
3011
3307
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/glucose`),
|
3012
3308
|
method: "GET",
|
3013
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3309
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3014
3310
|
contentType: "application/json",
|
3015
3311
|
queryParameters: _queryParams,
|
3016
3312
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3078,7 +3374,7 @@ class Vitals {
|
|
3078
3374
|
const _response = yield core.fetcher({
|
3079
3375
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/triglycerides`),
|
3080
3376
|
method: "GET",
|
3081
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3377
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3082
3378
|
contentType: "application/json",
|
3083
3379
|
queryParameters: _queryParams,
|
3084
3380
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3146,7 +3442,7 @@ class Vitals {
|
|
3146
3442
|
const _response = yield core.fetcher({
|
3147
3443
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/total`),
|
3148
3444
|
method: "GET",
|
3149
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3445
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3150
3446
|
contentType: "application/json",
|
3151
3447
|
queryParameters: _queryParams,
|
3152
3448
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3214,7 +3510,7 @@ class Vitals {
|
|
3214
3510
|
const _response = yield core.fetcher({
|
3215
3511
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/ldl`),
|
3216
3512
|
method: "GET",
|
3217
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3513
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3218
3514
|
contentType: "application/json",
|
3219
3515
|
queryParameters: _queryParams,
|
3220
3516
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3282,7 +3578,7 @@ class Vitals {
|
|
3282
3578
|
const _response = yield core.fetcher({
|
3283
3579
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol/hdl`),
|
3284
3580
|
method: "GET",
|
3285
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3581
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3286
3582
|
contentType: "application/json",
|
3287
3583
|
queryParameters: _queryParams,
|
3288
3584
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3350,7 +3646,7 @@ class Vitals {
|
|
3350
3646
|
const _response = yield core.fetcher({
|
3351
3647
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/cholesterol`),
|
3352
3648
|
method: "GET",
|
3353
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3649
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3354
3650
|
contentType: "application/json",
|
3355
3651
|
queryParameters: _queryParams,
|
3356
3652
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3418,7 +3714,7 @@ class Vitals {
|
|
3418
3714
|
const _response = yield core.fetcher({
|
3419
3715
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_weight`),
|
3420
3716
|
method: "GET",
|
3421
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3717
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3422
3718
|
contentType: "application/json",
|
3423
3719
|
queryParameters: _queryParams,
|
3424
3720
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3486,7 +3782,7 @@ class Vitals {
|
|
3486
3782
|
const _response = yield core.fetcher({
|
3487
3783
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/body_fat`),
|
3488
3784
|
method: "GET",
|
3489
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3785
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3490
3786
|
contentType: "application/json",
|
3491
3787
|
queryParameters: _queryParams,
|
3492
3788
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3554,7 +3850,7 @@ class Vitals {
|
|
3554
3850
|
const _response = yield core.fetcher({
|
3555
3851
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_oxygen`),
|
3556
3852
|
method: "GET",
|
3557
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3853
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3558
3854
|
contentType: "application/json",
|
3559
3855
|
queryParameters: _queryParams,
|
3560
3856
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3622,7 +3918,7 @@ class Vitals {
|
|
3622
3918
|
const _response = yield core.fetcher({
|
3623
3919
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/electrocardiogram_voltage`),
|
3624
3920
|
method: "GET",
|
3625
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3921
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3626
3922
|
contentType: "application/json",
|
3627
3923
|
queryParameters: _queryParams,
|
3628
3924
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -3690,7 +3986,7 @@ class Vitals {
|
|
3690
3986
|
const _response = yield core.fetcher({
|
3691
3987
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/${userId}/blood_pressure`),
|
3692
3988
|
method: "GET",
|
3693
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
3989
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.57", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
3694
3990
|
contentType: "application/json",
|
3695
3991
|
queryParameters: _queryParams,
|
3696
3992
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|