@tryvital/vital-node 1.0.1 → 1.0.5

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<ClientSleepResponse> {
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
  );
@@ -10,6 +10,7 @@ export type OAuthProviders =
10
10
  export interface ProviderLinkResponse {
11
11
  provider: PasswordProviders;
12
12
  connected: boolean;
13
+ provider_id?: string;
13
14
  }
14
15
 
15
16
  export interface LinkTokenExchangeResponse {
@@ -6,7 +6,7 @@ export interface ClientFacingProfile {
6
6
  * @type {number}
7
7
  * @memberof ClientFacingBody
8
8
  */
9
- age?: number;
9
+ dob?: string;
10
10
  /**
11
11
  * Height in cm.::cm
12
12
  * @type {number}
@@ -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&lt;ClientFacingSleep&gt;}
145
+ * @memberof ClientSleepResponse
146
+ */
147
+ hrv: TimeseriesPoint[];
148
+ heartrate: TimeseriesPoint[];
149
+ respiratory_rate: TimeseriesPoint[];
150
+ hypnogram: TimeseriesPoint[];
151
+ }
@@ -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<ClientSleepResponse>;
8
+ getStream(sleepId: string): Promise<ClientSleepStreamResponse>;
9
9
  }
@@ -3,6 +3,7 @@ export declare type OAuthProviders = 'oura' | 'fitbit' | 'garmin' | 'whoop' | 's
3
3
  export interface ProviderLinkResponse {
4
4
  provider: PasswordProviders;
5
5
  connected: boolean;
6
+ provider_id?: string;
6
7
  }
7
8
  export interface LinkTokenExchangeResponse {
8
9
  link_token: string;
@@ -5,7 +5,7 @@ export interface ClientFacingProfile {
5
5
  * @type {number}
6
6
  * @memberof ClientFacingBody
7
7
  */
8
- age?: number;
8
+ dob?: string;
9
9
  /**
10
10
  * Height in cm.::cm
11
11
  * @type {number}
@@ -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&lt;ClientFacingSleep&gt;}
142
+ * @memberof ClientSleepResponse
143
+ */
144
+ hrv: TimeseriesPoint[];
145
+ heartrate: TimeseriesPoint[];
146
+ respiratory_rate: TimeseriesPoint[];
147
+ hypnogram: TimeseriesPoint[];
148
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-node",
3
- "version": "1.0.1",
3
+ "version": "1.0.5",
4
4
  "description": "Node client for Vital",
5
5
  "author": "maitham",
6
6
  "keywords": [
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "auth0": "^2.35.1",
24
- "axios": "^0.21.1",
24
+ "axios": ">=0.21.2",
25
25
  "axios-retry": "^3.2.4",
26
26
  "crypto": "^1.0.1",
27
- "svix": "^0.41.2"
27
+ "svix": "^0.42.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testdeck/mocha": "^0.1.2",