@tryvital/vital-node 3.0.0-beta.0 → 3.0.2
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 +0 -3
- package/Client.js +14 -19
- package/README.md +91 -0
- 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 +0 -1
- package/api/resources/index.js +1 -2
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.d.ts +10 -1
- package/api/resources/labTests/client/Client.js +145 -21
- package/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +7 -0
- package/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/api/resources/link/client/Client.d.ts +1 -1
- package/api/resources/link/client/Client.js +16 -16
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.d.ts +1 -1
- package/api/resources/providers/client/Client.js +3 -3
- package/api/resources/sleep/client/Client.d.ts +5 -0
- package/api/resources/sleep/client/Client.js +61 -3
- package/api/resources/team/client/Client.d.ts +6 -6
- package/api/resources/team/client/Client.js +13 -13
- package/api/resources/team/client/requests/{GetSourcePrioritiesV2TeamSourcePrioritiesGetRequest.d.ts → TeamGetSourcePrioritiesRequest.d.ts} +1 -1
- package/{dist/api/resources/team/client/requests/SearchTeamUsersByUuidOrClientUserIdV2TeamUsersSearchGetRequest.d.ts → api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts} +1 -1
- package/{dist/api/resources/team/client/requests/UpdateSourcePrioritiesV2TeamSourcePrioritiesPatchRequest.d.ts → api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts} +1 -1
- package/api/resources/team/client/requests/index.d.ts +3 -3
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +11 -11
- package/api/resources/vitals/client/Client.d.ts +5 -0
- package/api/resources/vitals/client/Client.js +90 -22
- package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +17 -0
- package/api/resources/vitals/client/requests/index.d.ts +1 -0
- package/api/resources/workouts/client/Client.d.ts +4 -0
- package/api/resources/workouts/client/Client.js +59 -2
- package/api/types/BiomarkerResult.d.ts +2 -0
- package/api/types/ClientFacingElectrocardiogramVoltageTimeseries.d.ts +17 -0
- package/api/types/ClientFacingLoinc.d.ts +10 -0
- package/api/types/ClientFacingLoinc.js +5 -0
- package/api/types/ClientFacingMarkerComplete.d.ts +16 -0
- package/api/types/ClientFacingMarkerComplete.js +5 -0
- package/api/types/ClientFacingResult.d.ts +12 -0
- package/api/types/ClientFacingResult.js +5 -0
- package/api/types/ClientFacingSleep.d.ts +1 -1
- package/api/types/GetMarkersResponse.d.ts +1 -1
- package/api/types/Region.d.ts +2 -1
- package/api/types/Region.js +1 -0
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/Client.d.ts +0 -3
- package/dist/Client.js +14 -19
- 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 +0 -1
- package/dist/api/resources/index.js +1 -2
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.d.ts +10 -1
- package/dist/api/resources/labTests/client/Client.js +145 -21
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +7 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/dist/api/resources/link/client/Client.d.ts +1 -1
- package/dist/api/resources/link/client/Client.js +16 -16
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.d.ts +1 -1
- package/dist/api/resources/providers/client/Client.js +3 -3
- package/dist/api/resources/sleep/client/Client.d.ts +5 -0
- package/dist/api/resources/sleep/client/Client.js +61 -3
- package/dist/api/resources/team/client/Client.d.ts +6 -6
- package/dist/api/resources/team/client/Client.js +13 -13
- package/dist/api/resources/team/client/requests/{GetSourcePrioritiesV2TeamSourcePrioritiesGetRequest.d.ts → TeamGetSourcePrioritiesRequest.d.ts} +1 -1
- package/dist/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.js +5 -0
- package/{api/resources/team/client/requests/SearchTeamUsersByUuidOrClientUserIdV2TeamUsersSearchGetRequest.d.ts → dist/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts} +1 -1
- package/dist/api/resources/team/client/requests/TeamGetUserByIdRequest.js +5 -0
- package/{api/resources/team/client/requests/UpdateSourcePrioritiesV2TeamSourcePrioritiesPatchRequest.d.ts → dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts} +1 -1
- package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.js +5 -0
- package/dist/api/resources/team/client/requests/index.d.ts +3 -3
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +11 -11
- package/dist/api/resources/vitals/client/Client.d.ts +5 -0
- package/dist/api/resources/vitals/client/Client.js +90 -22
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +17 -0
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.js +5 -0
- package/dist/api/resources/vitals/client/requests/index.d.ts +1 -0
- package/dist/api/resources/workouts/client/Client.d.ts +4 -0
- package/dist/api/resources/workouts/client/Client.js +59 -2
- package/dist/api/types/BiomarkerResult.d.ts +2 -0
- package/dist/api/types/ClientFacingElectrocardiogramVoltageTimeseries.d.ts +17 -0
- package/dist/api/types/ClientFacingElectrocardiogramVoltageTimeseries.js +5 -0
- package/dist/api/types/ClientFacingLoinc.d.ts +10 -0
- package/dist/api/types/ClientFacingLoinc.js +5 -0
- package/dist/api/types/ClientFacingMarkerComplete.d.ts +16 -0
- package/dist/api/types/ClientFacingMarkerComplete.js +5 -0
- package/dist/api/types/ClientFacingResult.d.ts +12 -0
- package/dist/api/types/ClientFacingResult.js +5 -0
- package/dist/api/types/ClientFacingSleep.d.ts +1 -1
- package/dist/api/types/GetMarkersResponse.d.ts +1 -1
- package/dist/api/types/Region.d.ts +2 -1
- package/dist/api/types/Region.js +1 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/serialization/resources/link/client/{getProviders.d.ts → getAllProviders.d.ts} +1 -1
- package/dist/serialization/resources/link/client/index.d.ts +1 -1
- package/dist/serialization/resources/link/client/index.js +2 -2
- package/{serialization/resources/providers/client/getListOfProviders.d.ts → dist/serialization/resources/providers/client/getAll.d.ts} +1 -1
- package/dist/serialization/resources/providers/client/index.d.ts +1 -1
- package/dist/serialization/resources/providers/client/index.js +2 -2
- package/{serialization/resources/team/client/getTeamConfig.d.ts → dist/serialization/resources/team/client/getLinkConfig.d.ts} +1 -1
- package/dist/serialization/resources/team/client/{getTeamConfig.d.ts → getSvixUrl.d.ts} +1 -1
- package/{serialization/resources/team/client/searchTeamUsersByUuidOrClientUserId.d.ts → dist/serialization/resources/team/client/getUserById.d.ts} +1 -1
- package/dist/serialization/resources/team/client/index.d.ts +3 -3
- package/dist/serialization/resources/team/client/index.js +4 -4
- package/dist/serialization/resources/vitals/client/electrocardiogramVoltage.d.ts +10 -0
- package/dist/serialization/resources/vitals/client/electrocardiogramVoltage.js +40 -0
- package/dist/serialization/resources/vitals/client/index.d.ts +1 -0
- package/dist/serialization/resources/vitals/client/index.js +2 -1
- package/dist/serialization/types/BiomarkerResult.d.ts +2 -0
- package/dist/serialization/types/BiomarkerResult.js +2 -0
- package/dist/serialization/types/ClientFacingElectrocardiogramVoltageTimeseries.d.ts +17 -0
- package/dist/serialization/types/ClientFacingElectrocardiogramVoltageTimeseries.js +38 -0
- package/dist/serialization/types/ClientFacingLoinc.d.ts +16 -0
- package/dist/serialization/types/ClientFacingLoinc.js +37 -0
- package/dist/serialization/types/ClientFacingMarkerComplete.d.ts +21 -0
- package/dist/serialization/types/ClientFacingMarkerComplete.js +51 -0
- package/dist/serialization/types/ClientFacingResult.d.ts +17 -0
- package/dist/serialization/types/ClientFacingResult.js +47 -0
- package/dist/serialization/types/GetMarkersResponse.d.ts +1 -1
- package/dist/serialization/types/GetMarkersResponse.js +1 -1
- package/dist/serialization/types/Region.d.ts +1 -1
- package/dist/serialization/types/Region.js +1 -0
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/package.json +1 -1
- package/serialization/resources/link/client/{getProviders.d.ts → getAllProviders.d.ts} +1 -1
- package/serialization/resources/link/client/index.d.ts +1 -1
- package/serialization/resources/link/client/index.js +2 -2
- package/{dist/serialization/resources/providers/client/getListOfProviders.d.ts → serialization/resources/providers/client/getAll.d.ts} +1 -1
- package/serialization/resources/providers/client/index.d.ts +1 -1
- package/serialization/resources/providers/client/index.js +2 -2
- package/serialization/resources/team/client/{getSvixWebhookUrl.d.ts → getLinkConfig.d.ts} +1 -1
- package/{dist/serialization/resources/team/client/getSvixWebhookUrl.d.ts → serialization/resources/team/client/getSvixUrl.d.ts} +1 -1
- package/{dist/serialization/resources/team/client/searchTeamUsersByUuidOrClientUserId.d.ts → serialization/resources/team/client/getUserById.d.ts} +1 -1
- package/serialization/resources/team/client/index.d.ts +3 -3
- package/serialization/resources/team/client/index.js +4 -4
- package/serialization/resources/vitals/client/electrocardiogramVoltage.d.ts +10 -0
- package/serialization/resources/vitals/client/electrocardiogramVoltage.js +40 -0
- package/serialization/resources/vitals/client/index.d.ts +1 -0
- package/serialization/resources/vitals/client/index.js +2 -1
- package/serialization/types/BiomarkerResult.d.ts +2 -0
- package/serialization/types/BiomarkerResult.js +2 -0
- package/serialization/types/ClientFacingElectrocardiogramVoltageTimeseries.d.ts +17 -0
- package/serialization/types/ClientFacingElectrocardiogramVoltageTimeseries.js +38 -0
- package/serialization/types/ClientFacingLoinc.d.ts +16 -0
- package/serialization/types/ClientFacingLoinc.js +37 -0
- package/serialization/types/ClientFacingMarkerComplete.d.ts +21 -0
- package/serialization/types/ClientFacingMarkerComplete.js +51 -0
- package/serialization/types/ClientFacingResult.d.ts +17 -0
- package/serialization/types/ClientFacingResult.js +47 -0
- package/serialization/types/GetMarkersResponse.d.ts +1 -1
- package/serialization/types/GetMarkersResponse.js +1 -1
- package/serialization/types/Region.d.ts +1 -1
- package/serialization/types/Region.js +1 -0
- package/serialization/types/index.d.ts +4 -0
- package/serialization/types/index.js +4 -0
- package/api/resources/timeseries/client/Client.d.ts +0 -28
- package/api/resources/timeseries/client/Client.js +0 -168
- package/api/resources/timeseries/client/index.d.ts +0 -1
- package/api/resources/timeseries/client/index.js +0 -2
- package/api/resources/timeseries/index.d.ts +0 -1
- package/api/resources/timeseries/index.js +0 -17
- package/dist/api/resources/timeseries/client/Client.d.ts +0 -28
- package/dist/api/resources/timeseries/client/Client.js +0 -168
- package/dist/api/resources/timeseries/client/index.d.ts +0 -1
- package/dist/api/resources/timeseries/client/index.js +0 -2
- package/dist/api/resources/timeseries/index.d.ts +0 -1
- package/dist/api/resources/timeseries/index.js +0 -17
- /package/api/resources/{team/client/requests/GetSourcePrioritiesV2TeamSourcePrioritiesGetRequest.js → labTests/client/requests/LabTestsGetMarkersForLabTestRequest.js} +0 -0
- /package/api/resources/team/client/requests/{SearchTeamUsersByUuidOrClientUserIdV2TeamUsersSearchGetRequest.js → TeamGetSourcePrioritiesRequest.js} +0 -0
- /package/api/resources/team/client/requests/{UpdateSourcePrioritiesV2TeamSourcePrioritiesPatchRequest.js → TeamGetUserByIdRequest.js} +0 -0
- /package/{dist/api/resources/team/client/requests/GetSourcePrioritiesV2TeamSourcePrioritiesGetRequest.js → api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.js} +0 -0
- /package/{dist/api/resources/team/client/requests/SearchTeamUsersByUuidOrClientUserIdV2TeamUsersSearchGetRequest.js → api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.js} +0 -0
- /package/{dist/api/resources/team/client/requests/UpdateSourcePrioritiesV2TeamSourcePrioritiesPatchRequest.js → api/types/ClientFacingElectrocardiogramVoltageTimeseries.js} +0 -0
- /package/dist/serialization/resources/link/client/{getProviders.js → getAllProviders.js} +0 -0
- /package/dist/serialization/resources/providers/client/{getListOfProviders.js → getAll.js} +0 -0
- /package/dist/serialization/resources/team/client/{getSvixWebhookUrl.js → getLinkConfig.js} +0 -0
- /package/dist/serialization/resources/team/client/{getTeamConfig.js → getSvixUrl.js} +0 -0
- /package/dist/serialization/resources/team/client/{searchTeamUsersByUuidOrClientUserId.js → getUserById.js} +0 -0
- /package/serialization/resources/link/client/{getProviders.js → getAllProviders.js} +0 -0
- /package/serialization/resources/providers/client/{getListOfProviders.js → getAll.js} +0 -0
- /package/serialization/resources/team/client/{getSvixWebhookUrl.js → getLinkConfig.js} +0 -0
- /package/serialization/resources/team/client/{getTeamConfig.js → getSvixUrl.js} +0 -0
- /package/serialization/resources/team/client/{searchTeamUsersByUuidOrClientUserId.js → getUserById.js} +0 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../..";
|
5
|
+
import * as Vital from "../../../../api";
|
6
|
+
import * as core from "../../../../core";
|
7
|
+
export declare const Response: core.serialization.Schema<serializers.vitals.electrocardiogramVoltage.Response.Raw, Vital.ClientFacingElectrocardiogramVoltageTimeseries[]>;
|
8
|
+
export declare namespace Response {
|
9
|
+
type Raw = serializers.ClientFacingElectrocardiogramVoltageTimeseries.Raw[];
|
10
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.Response = void 0;
|
39
|
+
const core = __importStar(require("../../../../core"));
|
40
|
+
exports.Response = core.serialization.list(core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../..")))).ClientFacingElectrocardiogramVoltageTimeseries; })));
|
@@ -19,4 +19,5 @@ export * as cholesterolHdl from "./cholesterolHdl";
|
|
19
19
|
export * as cholesterolLdl from "./cholesterolLdl";
|
20
20
|
export * as cholesterol from "./cholesterol";
|
21
21
|
export * as bloodOxygen from "./bloodOxygen";
|
22
|
+
export * as electrocardiogramVoltage from "./electrocardiogramVoltage";
|
22
23
|
export * as bloodPressure from "./bloodPressure";
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.bloodPressure = exports.bloodOxygen = exports.cholesterol = exports.cholesterolLdl = exports.cholesterolHdl = exports.cholesterolTotal = exports.triglycerides = exports.glucose = exports.heartrate = exports.hrv = exports.hypnogram = exports.igg = exports.ige = exports.respiratoryRate = exports.caloriesActive = exports.caloriesBasal = exports.distance = exports.floorsClimbed = exports.steps = exports.water = exports.caffeine = exports.mindfulnessMinutes = void 0;
|
26
|
+
exports.bloodPressure = exports.electrocardiogramVoltage = exports.bloodOxygen = exports.cholesterol = exports.cholesterolLdl = exports.cholesterolHdl = exports.cholesterolTotal = exports.triglycerides = exports.glucose = exports.heartrate = exports.hrv = exports.hypnogram = exports.igg = exports.ige = exports.respiratoryRate = exports.caloriesActive = exports.caloriesBasal = exports.distance = exports.floorsClimbed = exports.steps = exports.water = exports.caffeine = exports.mindfulnessMinutes = void 0;
|
27
27
|
exports.mindfulnessMinutes = __importStar(require("./mindfulnessMinutes"));
|
28
28
|
exports.caffeine = __importStar(require("./caffeine"));
|
29
29
|
exports.water = __importStar(require("./water"));
|
@@ -45,4 +45,5 @@ exports.cholesterolHdl = __importStar(require("./cholesterolHdl"));
|
|
45
45
|
exports.cholesterolLdl = __importStar(require("./cholesterolLdl"));
|
46
46
|
exports.cholesterol = __importStar(require("./cholesterol"));
|
47
47
|
exports.bloodOxygen = __importStar(require("./bloodOxygen"));
|
48
|
+
exports.electrocardiogramVoltage = __importStar(require("./electrocardiogramVoltage"));
|
48
49
|
exports.bloodPressure = __importStar(require("./bloodPressure"));
|
@@ -51,4 +51,6 @@ exports.BiomarkerResult = core.serialization.object({
|
|
51
51
|
isAboveMaxRange: core.serialization.property("is_above_max_range", core.serialization.boolean().optional()),
|
52
52
|
isBelowMinRange: core.serialization.property("is_below_min_range", core.serialization.boolean().optional()),
|
53
53
|
interpretation: core.serialization.string().optional(),
|
54
|
+
loinc: core.serialization.string().optional(),
|
55
|
+
loincSlug: core.serialization.property("loinc_slug", core.serialization.string().optional()),
|
54
56
|
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "..";
|
5
|
+
import * as Vital from "../../api";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ClientFacingElectrocardiogramVoltageTimeseries: core.serialization.ObjectSchema<serializers.ClientFacingElectrocardiogramVoltageTimeseries.Raw, Vital.ClientFacingElectrocardiogramVoltageTimeseries>;
|
8
|
+
export declare namespace ClientFacingElectrocardiogramVoltageTimeseries {
|
9
|
+
interface Raw {
|
10
|
+
id?: number | null;
|
11
|
+
timezone_offset?: number | null;
|
12
|
+
type: string;
|
13
|
+
unit: string;
|
14
|
+
timestamp: string;
|
15
|
+
value: number;
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.ClientFacingElectrocardiogramVoltageTimeseries = void 0;
|
30
|
+
const core = __importStar(require("../../core"));
|
31
|
+
exports.ClientFacingElectrocardiogramVoltageTimeseries = core.serialization.object({
|
32
|
+
id: core.serialization.number().optional(),
|
33
|
+
timezoneOffset: core.serialization.property("timezone_offset", core.serialization.number().optional()),
|
34
|
+
type: core.serialization.string(),
|
35
|
+
unit: core.serialization.string(),
|
36
|
+
timestamp: core.serialization.date(),
|
37
|
+
value: core.serialization.number(),
|
38
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "..";
|
5
|
+
import * as Vital from "../../api";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ClientFacingLoinc: core.serialization.ObjectSchema<serializers.ClientFacingLoinc.Raw, Vital.ClientFacingLoinc>;
|
8
|
+
export declare namespace ClientFacingLoinc {
|
9
|
+
interface Raw {
|
10
|
+
id: number;
|
11
|
+
name: string;
|
12
|
+
slug: string;
|
13
|
+
code: string;
|
14
|
+
unit?: string | null;
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.ClientFacingLoinc = void 0;
|
30
|
+
const core = __importStar(require("../../core"));
|
31
|
+
exports.ClientFacingLoinc = core.serialization.object({
|
32
|
+
id: core.serialization.number(),
|
33
|
+
name: core.serialization.string(),
|
34
|
+
slug: core.serialization.string(),
|
35
|
+
code: core.serialization.string(),
|
36
|
+
unit: core.serialization.string().optional(),
|
37
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "..";
|
5
|
+
import * as Vital from "../../api";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ClientFacingMarkerComplete: core.serialization.ObjectSchema<serializers.ClientFacingMarkerComplete.Raw, Vital.ClientFacingMarkerComplete>;
|
8
|
+
export declare namespace ClientFacingMarkerComplete {
|
9
|
+
interface Raw {
|
10
|
+
id: number;
|
11
|
+
name: string;
|
12
|
+
slug: string;
|
13
|
+
description?: string | null;
|
14
|
+
lab_id?: number | null;
|
15
|
+
provider_id?: string | null;
|
16
|
+
type?: serializers.MarkerType.Raw | null;
|
17
|
+
unit?: string | null;
|
18
|
+
price?: string | null;
|
19
|
+
expected_results: serializers.ClientFacingResult.Raw[];
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.ClientFacingMarkerComplete = void 0;
|
39
|
+
const core = __importStar(require("../../core"));
|
40
|
+
exports.ClientFacingMarkerComplete = core.serialization.object({
|
41
|
+
id: core.serialization.number(),
|
42
|
+
name: core.serialization.string(),
|
43
|
+
slug: core.serialization.string(),
|
44
|
+
description: core.serialization.string().optional(),
|
45
|
+
labId: core.serialization.property("lab_id", core.serialization.number().optional()),
|
46
|
+
providerId: core.serialization.property("provider_id", core.serialization.string().optional()),
|
47
|
+
type: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).MarkerType; })).optional(),
|
48
|
+
unit: core.serialization.string().optional(),
|
49
|
+
price: core.serialization.string().optional(),
|
50
|
+
expectedResults: core.serialization.property("expected_results", core.serialization.list(core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).ClientFacingResult; })))),
|
51
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "..";
|
5
|
+
import * as Vital from "../../api";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ClientFacingResult: core.serialization.ObjectSchema<serializers.ClientFacingResult.Raw, Vital.ClientFacingResult>;
|
8
|
+
export declare namespace ClientFacingResult {
|
9
|
+
interface Raw {
|
10
|
+
id: number;
|
11
|
+
name: string;
|
12
|
+
slug: string;
|
13
|
+
lab_id?: number | null;
|
14
|
+
provider_id?: string | null;
|
15
|
+
loinc?: serializers.ClientFacingLoinc.Raw | null;
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.ClientFacingResult = void 0;
|
39
|
+
const core = __importStar(require("../../core"));
|
40
|
+
exports.ClientFacingResult = core.serialization.object({
|
41
|
+
id: core.serialization.number(),
|
42
|
+
name: core.serialization.string(),
|
43
|
+
slug: core.serialization.string(),
|
44
|
+
labId: core.serialization.property("lab_id", core.serialization.number().optional()),
|
45
|
+
providerId: core.serialization.property("provider_id", core.serialization.string().optional()),
|
46
|
+
loinc: core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).ClientFacingLoinc; })).optional(),
|
47
|
+
});
|
@@ -7,7 +7,7 @@ import * as core from "../../core";
|
|
7
7
|
export declare const GetMarkersResponse: core.serialization.ObjectSchema<serializers.GetMarkersResponse.Raw, Vital.GetMarkersResponse>;
|
8
8
|
export declare namespace GetMarkersResponse {
|
9
9
|
interface Raw {
|
10
|
-
markers: serializers.
|
10
|
+
markers: serializers.ClientFacingMarkerComplete.Raw[];
|
11
11
|
total: number;
|
12
12
|
page: number;
|
13
13
|
size: number;
|
@@ -38,7 +38,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.GetMarkersResponse = void 0;
|
39
39
|
const core = __importStar(require("../../core"));
|
40
40
|
exports.GetMarkersResponse = core.serialization.object({
|
41
|
-
markers: core.serialization.list(core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).
|
41
|
+
markers: core.serialization.list(core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).ClientFacingMarkerComplete; }))),
|
42
42
|
total: core.serialization.number(),
|
43
43
|
page: core.serialization.number(),
|
44
44
|
size: core.serialization.number(),
|
@@ -6,5 +6,5 @@ import * as Vital from "../../api";
|
|
6
6
|
import * as core from "../../core";
|
7
7
|
export declare const Region: core.serialization.Schema<serializers.Region.Raw, Vital.Region>;
|
8
8
|
export declare namespace Region {
|
9
|
-
type Raw = "us" | "eu" | "sg" | "de" | "au" | "br" | "nl" | "fr";
|
9
|
+
type Raw = "us" | "eu" | "sg" | "de" | "au" | "br" | "nl" | "fr" | "ca";
|
10
10
|
}
|
@@ -28,6 +28,7 @@ export * from "./ClientFacingCaloriesBasalTimeseries";
|
|
28
28
|
export * from "./ClientFacingCholesterolTimeseries";
|
29
29
|
export * from "./ClientFacingDiagnosisInformation";
|
30
30
|
export * from "./ClientFacingDistanceTimeseries";
|
31
|
+
export * from "./ClientFacingElectrocardiogramVoltageTimeseries";
|
31
32
|
export * from "./ClientFacingFloorsClimbedTimeseries";
|
32
33
|
export * from "./ClientFacingFood";
|
33
34
|
export * from "./ClientFacingGlucoseTimeseries";
|
@@ -39,7 +40,9 @@ export * from "./ClientFacingIgeTimeseries";
|
|
39
40
|
export * from "./ClientFacingIggTimeseries";
|
40
41
|
export * from "./ClientFacingLab";
|
41
42
|
export * from "./ClientFacingLabTest";
|
43
|
+
export * from "./ClientFacingLoinc";
|
42
44
|
export * from "./ClientFacingMarker";
|
45
|
+
export * from "./ClientFacingMarkerComplete";
|
43
46
|
export * from "./ClientFacingMealResponse";
|
44
47
|
export * from "./ClientFacingMindfulnessMinutesTimeseries";
|
45
48
|
export * from "./ClientFacingOrder";
|
@@ -53,6 +56,7 @@ export * from "./ClientFacingProviderDetailed";
|
|
53
56
|
export * from "./ClientFacingProviderWithStatus";
|
54
57
|
export * from "./ClientFacingResource";
|
55
58
|
export * from "./ClientFacingRespiratoryRateTimeseries";
|
59
|
+
export * from "./ClientFacingResult";
|
56
60
|
export * from "./ClientFacingShipment";
|
57
61
|
export * from "./ClientFacingSleep";
|
58
62
|
export * from "./ClientFacingSleepStream";
|
@@ -44,6 +44,7 @@ __exportStar(require("./ClientFacingCaloriesBasalTimeseries"), exports);
|
|
44
44
|
__exportStar(require("./ClientFacingCholesterolTimeseries"), exports);
|
45
45
|
__exportStar(require("./ClientFacingDiagnosisInformation"), exports);
|
46
46
|
__exportStar(require("./ClientFacingDistanceTimeseries"), exports);
|
47
|
+
__exportStar(require("./ClientFacingElectrocardiogramVoltageTimeseries"), exports);
|
47
48
|
__exportStar(require("./ClientFacingFloorsClimbedTimeseries"), exports);
|
48
49
|
__exportStar(require("./ClientFacingFood"), exports);
|
49
50
|
__exportStar(require("./ClientFacingGlucoseTimeseries"), exports);
|
@@ -55,7 +56,9 @@ __exportStar(require("./ClientFacingIgeTimeseries"), exports);
|
|
55
56
|
__exportStar(require("./ClientFacingIggTimeseries"), exports);
|
56
57
|
__exportStar(require("./ClientFacingLab"), exports);
|
57
58
|
__exportStar(require("./ClientFacingLabTest"), exports);
|
59
|
+
__exportStar(require("./ClientFacingLoinc"), exports);
|
58
60
|
__exportStar(require("./ClientFacingMarker"), exports);
|
61
|
+
__exportStar(require("./ClientFacingMarkerComplete"), exports);
|
59
62
|
__exportStar(require("./ClientFacingMealResponse"), exports);
|
60
63
|
__exportStar(require("./ClientFacingMindfulnessMinutesTimeseries"), exports);
|
61
64
|
__exportStar(require("./ClientFacingOrder"), exports);
|
@@ -69,6 +72,7 @@ __exportStar(require("./ClientFacingProviderDetailed"), exports);
|
|
69
72
|
__exportStar(require("./ClientFacingProviderWithStatus"), exports);
|
70
73
|
__exportStar(require("./ClientFacingResource"), exports);
|
71
74
|
__exportStar(require("./ClientFacingRespiratoryRateTimeseries"), exports);
|
75
|
+
__exportStar(require("./ClientFacingResult"), exports);
|
72
76
|
__exportStar(require("./ClientFacingShipment"), exports);
|
73
77
|
__exportStar(require("./ClientFacingSleep"), exports);
|
74
78
|
__exportStar(require("./ClientFacingSleepStream"), exports);
|
@@ -1,28 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as environments from "../../../../environments";
|
5
|
-
import * as core from "../../../../core";
|
6
|
-
import * as Vital from "../../..";
|
7
|
-
export declare namespace Timeseries {
|
8
|
-
interface Options {
|
9
|
-
environment?: core.Supplier<environments.VitalEnvironment | string>;
|
10
|
-
apiKey: core.Supplier<string>;
|
11
|
-
}
|
12
|
-
interface RequestOptions {
|
13
|
-
timeoutInSeconds?: number;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
export declare class Timeseries {
|
17
|
-
protected readonly _options: Timeseries.Options;
|
18
|
-
constructor(_options: Timeseries.Options);
|
19
|
-
/**
|
20
|
-
* Get Sleep stream for a user_id
|
21
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
22
|
-
*/
|
23
|
-
getUserSleepStream(sleepId: string, requestOptions?: Timeseries.RequestOptions): Promise<Vital.ClientFacingSleepStream>;
|
24
|
-
/**
|
25
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
26
|
-
*/
|
27
|
-
getUserWorkouts(workoutId: string, requestOptions?: Timeseries.RequestOptions): Promise<Vital.ClientFacingStream>;
|
28
|
-
}
|
@@ -1,168 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
4
|
-
*/
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
-
if (k2 === undefined) k2 = k;
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
-
}
|
11
|
-
Object.defineProperty(o, k2, desc);
|
12
|
-
}) : (function(o, m, k, k2) {
|
13
|
-
if (k2 === undefined) k2 = k;
|
14
|
-
o[k2] = m[k];
|
15
|
-
}));
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
-
}) : function(o, v) {
|
19
|
-
o["default"] = v;
|
20
|
-
});
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
-
if (mod && mod.__esModule) return mod;
|
23
|
-
var result = {};
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
-
__setModuleDefault(result, mod);
|
26
|
-
return result;
|
27
|
-
};
|
28
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
-
});
|
36
|
-
};
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
|
-
};
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
-
exports.Timeseries = void 0;
|
42
|
-
const environments = __importStar(require("../../../../environments"));
|
43
|
-
const core = __importStar(require("../../../../core"));
|
44
|
-
const Vital = __importStar(require("../../.."));
|
45
|
-
const url_join_1 = __importDefault(require("url-join"));
|
46
|
-
const serializers = __importStar(require("../../../../serialization"));
|
47
|
-
const errors = __importStar(require("../../../../errors"));
|
48
|
-
class Timeseries {
|
49
|
-
constructor(_options) {
|
50
|
-
this._options = _options;
|
51
|
-
}
|
52
|
-
/**
|
53
|
-
* Get Sleep stream for a user_id
|
54
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
55
|
-
*/
|
56
|
-
getUserSleepStream(sleepId, requestOptions) {
|
57
|
-
var _a;
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
59
|
-
const _response = yield core.fetcher({
|
60
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/sleep/${sleepId}/stream`),
|
61
|
-
method: "GET",
|
62
|
-
headers: {
|
63
|
-
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
64
|
-
"X-Fern-Language": "JavaScript",
|
65
|
-
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
66
|
-
"X-Fern-SDK-Version": "3.0.0-beta.0",
|
67
|
-
},
|
68
|
-
contentType: "application/json",
|
69
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
70
|
-
});
|
71
|
-
if (_response.ok) {
|
72
|
-
return yield serializers.ClientFacingSleepStream.parseOrThrow(_response.body, {
|
73
|
-
unrecognizedObjectKeys: "passthrough",
|
74
|
-
allowUnrecognizedUnionMembers: true,
|
75
|
-
allowUnrecognizedEnumValues: true,
|
76
|
-
breadcrumbsPrefix: ["response"],
|
77
|
-
});
|
78
|
-
}
|
79
|
-
if (_response.error.reason === "status-code") {
|
80
|
-
switch (_response.error.statusCode) {
|
81
|
-
case 422:
|
82
|
-
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
83
|
-
unrecognizedObjectKeys: "passthrough",
|
84
|
-
allowUnrecognizedUnionMembers: true,
|
85
|
-
allowUnrecognizedEnumValues: true,
|
86
|
-
breadcrumbsPrefix: ["response"],
|
87
|
-
}));
|
88
|
-
default:
|
89
|
-
throw new errors.VitalError({
|
90
|
-
statusCode: _response.error.statusCode,
|
91
|
-
body: _response.error.body,
|
92
|
-
});
|
93
|
-
}
|
94
|
-
}
|
95
|
-
switch (_response.error.reason) {
|
96
|
-
case "non-json":
|
97
|
-
throw new errors.VitalError({
|
98
|
-
statusCode: _response.error.statusCode,
|
99
|
-
body: _response.error.rawBody,
|
100
|
-
});
|
101
|
-
case "timeout":
|
102
|
-
throw new errors.VitalTimeoutError();
|
103
|
-
case "unknown":
|
104
|
-
throw new errors.VitalError({
|
105
|
-
message: _response.error.errorMessage,
|
106
|
-
});
|
107
|
-
}
|
108
|
-
});
|
109
|
-
}
|
110
|
-
/**
|
111
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
112
|
-
*/
|
113
|
-
getUserWorkouts(workoutId, requestOptions) {
|
114
|
-
var _a;
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
116
|
-
const _response = yield core.fetcher({
|
117
|
-
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/${workoutId}/stream`),
|
118
|
-
method: "GET",
|
119
|
-
headers: {
|
120
|
-
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
121
|
-
"X-Fern-Language": "JavaScript",
|
122
|
-
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
123
|
-
"X-Fern-SDK-Version": "3.0.0-beta.0",
|
124
|
-
},
|
125
|
-
contentType: "application/json",
|
126
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
127
|
-
});
|
128
|
-
if (_response.ok) {
|
129
|
-
return yield serializers.ClientFacingStream.parseOrThrow(_response.body, {
|
130
|
-
unrecognizedObjectKeys: "passthrough",
|
131
|
-
allowUnrecognizedUnionMembers: true,
|
132
|
-
allowUnrecognizedEnumValues: true,
|
133
|
-
breadcrumbsPrefix: ["response"],
|
134
|
-
});
|
135
|
-
}
|
136
|
-
if (_response.error.reason === "status-code") {
|
137
|
-
switch (_response.error.statusCode) {
|
138
|
-
case 422:
|
139
|
-
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
140
|
-
unrecognizedObjectKeys: "passthrough",
|
141
|
-
allowUnrecognizedUnionMembers: true,
|
142
|
-
allowUnrecognizedEnumValues: true,
|
143
|
-
breadcrumbsPrefix: ["response"],
|
144
|
-
}));
|
145
|
-
default:
|
146
|
-
throw new errors.VitalError({
|
147
|
-
statusCode: _response.error.statusCode,
|
148
|
-
body: _response.error.body,
|
149
|
-
});
|
150
|
-
}
|
151
|
-
}
|
152
|
-
switch (_response.error.reason) {
|
153
|
-
case "non-json":
|
154
|
-
throw new errors.VitalError({
|
155
|
-
statusCode: _response.error.statusCode,
|
156
|
-
body: _response.error.rawBody,
|
157
|
-
});
|
158
|
-
case "timeout":
|
159
|
-
throw new errors.VitalTimeoutError();
|
160
|
-
case "unknown":
|
161
|
-
throw new errors.VitalError({
|
162
|
-
message: _response.error.errorMessage,
|
163
|
-
});
|
164
|
-
}
|
165
|
-
});
|
166
|
-
}
|
167
|
-
}
|
168
|
-
exports.Timeseries = Timeseries;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from "./client";
|