@tryvital/vital-node 1.0.2 → 1.0.3
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/Sleep.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientSleepResponse } from './models/sleep_models';
|
2
|
+
import { ClientSleepResponse, ClientSleepStreamResponse } from './models/sleep_models';
|
3
3
|
|
4
4
|
export class SleepApi {
|
5
5
|
baseURL: string;
|
@@ -24,7 +24,7 @@ export class SleepApi {
|
|
24
24
|
return resp.data;
|
25
25
|
}
|
26
26
|
|
27
|
-
public async getStream(sleepId: string): Promise<
|
27
|
+
public async getStream(sleepId: string): Promise<ClientSleepStreamResponse> {
|
28
28
|
const resp = await this.client.get(
|
29
29
|
this.baseURL.concat(`/timeseries/sleep/${sleepId}/stream`)
|
30
30
|
);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { TimeseriesPoint } from './activity';
|
1
2
|
import { SourceClientFacing } from './user_models';
|
2
3
|
|
3
4
|
/**
|
@@ -136,3 +137,15 @@ export interface ClientSleepResponse {
|
|
136
137
|
*/
|
137
138
|
sleep: ClientFacingSleep[];
|
138
139
|
}
|
140
|
+
|
141
|
+
export interface ClientSleepStreamResponse {
|
142
|
+
/**
|
143
|
+
*
|
144
|
+
* @type {Array<ClientFacingSleep>}
|
145
|
+
* @memberof ClientSleepResponse
|
146
|
+
*/
|
147
|
+
hrv: TimeseriesPoint[];
|
148
|
+
heartrate: TimeseriesPoint[];
|
149
|
+
respiratory_rate: TimeseriesPoint[];
|
150
|
+
hypnogram: TimeseriesPoint[];
|
151
|
+
}
|
package/dist/client/Sleep.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import { ClientSleepResponse } from './models/sleep_models';
|
2
|
+
import { ClientSleepResponse, ClientSleepStreamResponse } from './models/sleep_models';
|
3
3
|
export declare class SleepApi {
|
4
4
|
baseURL: string;
|
5
5
|
client: AxiosInstance;
|
6
6
|
constructor(baseURL: string, axios: AxiosInstance);
|
7
7
|
get(userKey: string, startDate: Date, endDate: Date, provider?: string): Promise<ClientSleepResponse>;
|
8
|
-
getStream(sleepId: string): Promise<
|
8
|
+
getStream(sleepId: string): Promise<ClientSleepStreamResponse>;
|
9
9
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { TimeseriesPoint } from './activity';
|
1
2
|
import { SourceClientFacing } from './user_models';
|
2
3
|
/**
|
3
4
|
*
|
@@ -134,3 +135,14 @@ export interface ClientSleepResponse {
|
|
134
135
|
*/
|
135
136
|
sleep: ClientFacingSleep[];
|
136
137
|
}
|
138
|
+
export interface ClientSleepStreamResponse {
|
139
|
+
/**
|
140
|
+
*
|
141
|
+
* @type {Array<ClientFacingSleep>}
|
142
|
+
* @memberof ClientSleepResponse
|
143
|
+
*/
|
144
|
+
hrv: TimeseriesPoint[];
|
145
|
+
heartrate: TimeseriesPoint[];
|
146
|
+
respiratory_rate: TimeseriesPoint[];
|
147
|
+
hypnogram: TimeseriesPoint[];
|
148
|
+
}
|