@tryvital/vital-node 3.1.310 → 3.1.312

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.
Files changed (76) hide show
  1. package/api/resources/activity/client/Client.js +2 -2
  2. package/api/resources/aggregate/client/Client.js +3 -3
  3. package/api/resources/body/client/Client.js +2 -2
  4. package/api/resources/devices/client/Client.js +1 -1
  5. package/api/resources/electrocardiogram/client/Client.js +1 -1
  6. package/api/resources/insurance/client/Client.js +3 -3
  7. package/api/resources/introspect/client/Client.js +2 -2
  8. package/api/resources/labTests/client/Client.js +41 -41
  9. package/api/resources/link/client/Client.js +19 -19
  10. package/api/resources/meal/client/Client.js +1 -1
  11. package/api/resources/menstrualCycle/client/Client.js +1 -1
  12. package/api/resources/order/client/Client.js +1 -1
  13. package/api/resources/payor/client/Client.js +1 -1
  14. package/api/resources/profile/client/Client.js +2 -2
  15. package/api/resources/providers/client/Client.js +1 -1
  16. package/api/resources/sleep/client/Client.d.ts +0 -15
  17. package/api/resources/sleep/client/Client.js +3 -79
  18. package/api/resources/sleep/client/requests/index.d.ts +0 -1
  19. package/api/resources/sleepCycle/client/Client.js +1 -1
  20. package/api/resources/team/client/Client.js +7 -7
  21. package/api/resources/testkit/client/Client.js +2 -2
  22. package/api/resources/user/client/Client.js +16 -16
  23. package/api/resources/vitals/client/Client.js +78 -78
  24. package/api/resources/workouts/client/Client.js +3 -3
  25. package/api/types/ClientFacingElectrocardiogram.d.ts +1 -0
  26. package/api/types/ClientFacingSource.d.ts +2 -0
  27. package/api/types/SimulationFlags.d.ts +1 -0
  28. package/dist/api/resources/activity/client/Client.js +2 -2
  29. package/dist/api/resources/aggregate/client/Client.js +3 -3
  30. package/dist/api/resources/body/client/Client.js +2 -2
  31. package/dist/api/resources/devices/client/Client.js +1 -1
  32. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  33. package/dist/api/resources/insurance/client/Client.js +3 -3
  34. package/dist/api/resources/introspect/client/Client.js +2 -2
  35. package/dist/api/resources/labTests/client/Client.js +41 -41
  36. package/dist/api/resources/link/client/Client.js +19 -19
  37. package/dist/api/resources/meal/client/Client.js +1 -1
  38. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  39. package/dist/api/resources/order/client/Client.js +1 -1
  40. package/dist/api/resources/payor/client/Client.js +1 -1
  41. package/dist/api/resources/profile/client/Client.js +2 -2
  42. package/dist/api/resources/providers/client/Client.js +1 -1
  43. package/dist/api/resources/sleep/client/Client.d.ts +0 -15
  44. package/dist/api/resources/sleep/client/Client.js +3 -79
  45. package/dist/api/resources/sleep/client/requests/index.d.ts +0 -1
  46. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  47. package/dist/api/resources/team/client/Client.js +7 -7
  48. package/dist/api/resources/testkit/client/Client.js +2 -2
  49. package/dist/api/resources/user/client/Client.js +16 -16
  50. package/dist/api/resources/vitals/client/Client.js +78 -78
  51. package/dist/api/resources/workouts/client/Client.js +3 -3
  52. package/dist/api/types/ClientFacingElectrocardiogram.d.ts +1 -0
  53. package/dist/api/types/ClientFacingSource.d.ts +2 -0
  54. package/dist/api/types/SimulationFlags.d.ts +1 -0
  55. package/dist/serialization/types/ClientFacingElectrocardiogram.d.ts +1 -0
  56. package/dist/serialization/types/ClientFacingElectrocardiogram.js +1 -0
  57. package/dist/serialization/types/ClientFacingSource.d.ts +1 -0
  58. package/dist/serialization/types/ClientFacingSource.js +1 -0
  59. package/dist/serialization/types/SimulationFlags.d.ts +1 -0
  60. package/dist/serialization/types/SimulationFlags.js +1 -0
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/package.json +1 -1
  64. package/reference.md +0 -73
  65. package/serialization/types/ClientFacingElectrocardiogram.d.ts +1 -0
  66. package/serialization/types/ClientFacingElectrocardiogram.js +1 -0
  67. package/serialization/types/ClientFacingSource.d.ts +1 -0
  68. package/serialization/types/ClientFacingSource.js +1 -0
  69. package/serialization/types/SimulationFlags.d.ts +1 -0
  70. package/serialization/types/SimulationFlags.js +1 -0
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
  73. package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +0 -23
  74. package/api/resources/sleep/client/requests/SleepGetStreamRequest.js +0 -5
  75. package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +0 -23
  76. package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.js +0 -5
@@ -78,7 +78,7 @@ class Workouts {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.310", "User-Agent": "@tryvital/vital-node/3.1.310", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.312", "User-Agent": "@tryvital/vital-node/3.1.312", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -154,7 +154,7 @@ class Workouts {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.310", "User-Agent": "@tryvital/vital-node/3.1.310", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.312", "User-Agent": "@tryvital/vital-node/3.1.312", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -216,7 +216,7 @@ class Workouts {
216
216
  const _response = yield core.fetcher({
217
217
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
218
218
  method: "GET",
219
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.310", "User-Agent": "@tryvital/vital-node/3.1.310", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
219
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.312", "User-Agent": "@tryvital/vital-node/3.1.312", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
220
  contentType: "application/json",
221
221
  requestType: "json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -20,6 +20,7 @@ export interface ClientFacingElectrocardiogram {
20
20
  sourceType: Vital.ClientFacingElectrocardiogramSourceType;
21
21
  sourceAppId?: string;
22
22
  sourceDeviceModel?: string;
23
+ sourceDeviceId?: string;
23
24
  createdAt: Date;
24
25
  updatedAt: Date;
25
26
  userId: string;
@@ -12,6 +12,8 @@ export interface ClientFacingSource {
12
12
  type?: string;
13
13
  /** The identifier of the app which recorded this summary. This is only applicable to multi-source providers like Apple Health and Android Health Connect. */
14
14
  appId?: string;
15
+ /** The identifier of the device which recorded this summary. */
16
+ deviceId?: string;
15
17
  /**
16
18
  * For workout stream timeseries, this is the standard sport slug of the workout with which the timeseries data are associated.
17
19
  *
@@ -5,4 +5,5 @@ import * as Vital from "../index";
5
5
  export interface SimulationFlags {
6
6
  interpretation?: Vital.Interpretation;
7
7
  resultTypes?: Vital.ResultType[];
8
+ hasMissingResults?: boolean;
8
9
  }
@@ -26,6 +26,7 @@ export declare namespace ClientFacingElectrocardiogram {
26
26
  source_type: ClientFacingElectrocardiogramSourceType.Raw;
27
27
  source_app_id?: string | null;
28
28
  source_device_model?: string | null;
29
+ source_device_id?: string | null;
29
30
  created_at: string;
30
31
  updated_at: string;
31
32
  user_id: string;
@@ -48,6 +48,7 @@ exports.ClientFacingElectrocardiogram = core.serialization.object({
48
48
  sourceType: core.serialization.property("source_type", ClientFacingElectrocardiogramSourceType_1.ClientFacingElectrocardiogramSourceType),
49
49
  sourceAppId: core.serialization.property("source_app_id", core.serialization.string().optional()),
50
50
  sourceDeviceModel: core.serialization.property("source_device_model", core.serialization.string().optional()),
51
+ sourceDeviceId: core.serialization.property("source_device_id", core.serialization.string().optional()),
51
52
  createdAt: core.serialization.property("created_at", core.serialization.date()),
52
53
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
53
54
  userId: core.serialization.property("user_id", core.serialization.string()),
@@ -10,6 +10,7 @@ export declare namespace ClientFacingSource {
10
10
  provider: string;
11
11
  type?: string | null;
12
12
  app_id?: string | null;
13
+ device_id?: string | null;
13
14
  sport?: string | null;
14
15
  workout_id?: string | null;
15
16
  name?: string | null;
@@ -32,6 +32,7 @@ exports.ClientFacingSource = core.serialization.object({
32
32
  provider: core.serialization.string(),
33
33
  type: core.serialization.string().optional(),
34
34
  appId: core.serialization.property("app_id", core.serialization.string().optional()),
35
+ deviceId: core.serialization.property("device_id", core.serialization.string().optional()),
35
36
  sport: core.serialization.string().optional(),
36
37
  workoutId: core.serialization.property("workout_id", core.serialization.string().optional()),
37
38
  name: core.serialization.string().optional(),
@@ -11,5 +11,6 @@ export declare namespace SimulationFlags {
11
11
  interface Raw {
12
12
  interpretation?: Interpretation.Raw | null;
13
13
  result_types?: ResultType.Raw[] | null;
14
+ has_missing_results?: boolean | null;
14
15
  }
15
16
  }
@@ -33,4 +33,5 @@ const ResultType_1 = require("./ResultType");
33
33
  exports.SimulationFlags = core.serialization.object({
34
34
  interpretation: Interpretation_1.Interpretation.optional(),
35
35
  resultTypes: core.serialization.property("result_types", core.serialization.list(ResultType_1.ResultType).optional()),
36
+ hasMissingResults: core.serialization.property("has_missing_results", core.serialization.boolean().optional()),
36
37
  });
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.1.310";
1
+ export declare const SDK_VERSION = "3.1.312";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.1.310";
4
+ exports.SDK_VERSION = "3.1.312";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-node",
3
- "version": "3.1.310",
3
+ "version": "3.1.312",
4
4
  "private": false,
5
5
  "repository": "https://github.com/tryVital/vital-node",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -1976,79 +1976,6 @@ await client.sleep.get("user_id", {
1976
1976
  </dl>
1977
1977
  </details>
1978
1978
 
1979
- <details><summary><code>client.sleep.<a href="/src/api/resources/sleep/client/Client.ts">getStream</a>(userId, { ...params }) -> Vital.ClientSleepResponse</code></summary>
1980
- <dl>
1981
- <dd>
1982
-
1983
- #### 📝 Description
1984
-
1985
- <dl>
1986
- <dd>
1987
-
1988
- <dl>
1989
- <dd>
1990
-
1991
- Get sleep stream for user_id
1992
-
1993
- </dd>
1994
- </dl>
1995
- </dd>
1996
- </dl>
1997
-
1998
- #### 🔌 Usage
1999
-
2000
- <dl>
2001
- <dd>
2002
-
2003
- <dl>
2004
- <dd>
2005
-
2006
- ```typescript
2007
- await client.sleep.getStream("user_id", {
2008
- startDate: "start_date",
2009
- });
2010
- ```
2011
-
2012
- </dd>
2013
- </dl>
2014
- </dd>
2015
- </dl>
2016
-
2017
- #### ⚙️ Parameters
2018
-
2019
- <dl>
2020
- <dd>
2021
-
2022
- <dl>
2023
- <dd>
2024
-
2025
- **userId:** `string`
2026
-
2027
- </dd>
2028
- </dl>
2029
-
2030
- <dl>
2031
- <dd>
2032
-
2033
- **request:** `Vital.SleepGetStreamRequest`
2034
-
2035
- </dd>
2036
- </dl>
2037
-
2038
- <dl>
2039
- <dd>
2040
-
2041
- **requestOptions:** `Sleep.RequestOptions`
2042
-
2043
- </dd>
2044
- </dl>
2045
- </dd>
2046
- </dl>
2047
-
2048
- </dd>
2049
- </dl>
2050
- </details>
2051
-
2052
1979
  <details><summary><code>client.sleep.<a href="/src/api/resources/sleep/client/Client.ts">getRaw</a>(userId, { ...params }) -> Vital.RawSleep</code></summary>
2053
1980
  <dl>
2054
1981
  <dd>
@@ -26,6 +26,7 @@ export declare namespace ClientFacingElectrocardiogram {
26
26
  source_type: ClientFacingElectrocardiogramSourceType.Raw;
27
27
  source_app_id?: string | null;
28
28
  source_device_model?: string | null;
29
+ source_device_id?: string | null;
29
30
  created_at: string;
30
31
  updated_at: string;
31
32
  user_id: string;
@@ -48,6 +48,7 @@ exports.ClientFacingElectrocardiogram = core.serialization.object({
48
48
  sourceType: core.serialization.property("source_type", ClientFacingElectrocardiogramSourceType_1.ClientFacingElectrocardiogramSourceType),
49
49
  sourceAppId: core.serialization.property("source_app_id", core.serialization.string().optional()),
50
50
  sourceDeviceModel: core.serialization.property("source_device_model", core.serialization.string().optional()),
51
+ sourceDeviceId: core.serialization.property("source_device_id", core.serialization.string().optional()),
51
52
  createdAt: core.serialization.property("created_at", core.serialization.date()),
52
53
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
53
54
  userId: core.serialization.property("user_id", core.serialization.string()),
@@ -10,6 +10,7 @@ export declare namespace ClientFacingSource {
10
10
  provider: string;
11
11
  type?: string | null;
12
12
  app_id?: string | null;
13
+ device_id?: string | null;
13
14
  sport?: string | null;
14
15
  workout_id?: string | null;
15
16
  name?: string | null;
@@ -32,6 +32,7 @@ exports.ClientFacingSource = core.serialization.object({
32
32
  provider: core.serialization.string(),
33
33
  type: core.serialization.string().optional(),
34
34
  appId: core.serialization.property("app_id", core.serialization.string().optional()),
35
+ deviceId: core.serialization.property("device_id", core.serialization.string().optional()),
35
36
  sport: core.serialization.string().optional(),
36
37
  workoutId: core.serialization.property("workout_id", core.serialization.string().optional()),
37
38
  name: core.serialization.string().optional(),
@@ -11,5 +11,6 @@ export declare namespace SimulationFlags {
11
11
  interface Raw {
12
12
  interpretation?: Interpretation.Raw | null;
13
13
  result_types?: ResultType.Raw[] | null;
14
+ has_missing_results?: boolean | null;
14
15
  }
15
16
  }
@@ -33,4 +33,5 @@ const ResultType_1 = require("./ResultType");
33
33
  exports.SimulationFlags = core.serialization.object({
34
34
  interpretation: Interpretation_1.Interpretation.optional(),
35
35
  resultTypes: core.serialization.property("result_types", core.serialization.list(ResultType_1.ResultType).optional()),
36
+ hasMissingResults: core.serialization.property("has_missing_results", core.serialization.boolean().optional()),
36
37
  });
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.1.310";
1
+ export declare const SDK_VERSION = "3.1.312";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.1.310";
4
+ exports.SDK_VERSION = "3.1.312";
@@ -1,23 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * startDate: "start_date"
8
- * }
9
- */
10
- export interface SleepGetStreamRequest {
11
- /**
12
- * Provider oura/strava etc
13
- */
14
- provider?: string;
15
- /**
16
- * Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00
17
- */
18
- startDate: string;
19
- /**
20
- * Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59
21
- */
22
- endDate?: string;
23
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,23 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * startDate: "start_date"
8
- * }
9
- */
10
- export interface SleepGetStreamRequest {
11
- /**
12
- * Provider oura/strava etc
13
- */
14
- provider?: string;
15
- /**
16
- * Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00
17
- */
18
- startDate: string;
19
- /**
20
- * Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59
21
- */
22
- endDate?: string;
23
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });