@tryvital/vital-node 3.1.391 → 3.1.393

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 (78) hide show
  1. package/Client.d.ts +24 -24
  2. package/Client.js +57 -57
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.js +3 -3
  5. package/api/resources/body/client/Client.js +2 -2
  6. package/api/resources/devices/client/Client.js +1 -1
  7. package/api/resources/electrocardiogram/client/Client.js +1 -1
  8. package/api/resources/index.d.ts +14 -14
  9. package/api/resources/index.js +15 -15
  10. package/api/resources/insurance/client/Client.js +3 -3
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labTests/client/Client.d.ts +134 -134
  13. package/api/resources/labTests/client/Client.js +822 -822
  14. package/api/resources/labTests/client/requests/index.d.ts +8 -8
  15. package/api/resources/link/client/Client.js +19 -19
  16. package/api/resources/meal/client/Client.js +1 -1
  17. package/api/resources/menstrualCycle/client/Client.js +1 -1
  18. package/api/resources/order/client/Client.js +1 -1
  19. package/api/resources/payor/client/Client.js +1 -1
  20. package/api/resources/profile/client/Client.js +2 -2
  21. package/api/resources/providers/client/Client.js +1 -1
  22. package/api/resources/sleep/client/Client.d.ts +12 -12
  23. package/api/resources/sleep/client/Client.js +34 -34
  24. package/api/resources/sleepCycle/client/Client.js +1 -1
  25. package/api/resources/team/client/Client.js +7 -7
  26. package/api/resources/testkit/client/Client.js +2 -2
  27. package/api/resources/user/client/Client.js +18 -18
  28. package/api/resources/vitals/client/Client.js +78 -78
  29. package/api/resources/workouts/client/Client.d.ts +10 -10
  30. package/api/resources/workouts/client/Client.js +34 -34
  31. package/dist/Client.d.ts +24 -24
  32. package/dist/Client.js +57 -57
  33. package/dist/api/resources/activity/client/Client.js +2 -2
  34. package/dist/api/resources/aggregate/client/Client.js +3 -3
  35. package/dist/api/resources/body/client/Client.js +2 -2
  36. package/dist/api/resources/devices/client/Client.js +1 -1
  37. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  38. package/dist/api/resources/index.d.ts +14 -14
  39. package/dist/api/resources/index.js +15 -15
  40. package/dist/api/resources/insurance/client/Client.js +3 -3
  41. package/dist/api/resources/introspect/client/Client.js +2 -2
  42. package/dist/api/resources/labTests/client/Client.d.ts +134 -134
  43. package/dist/api/resources/labTests/client/Client.js +822 -822
  44. package/dist/api/resources/labTests/client/requests/index.d.ts +8 -8
  45. package/dist/api/resources/link/client/Client.js +19 -19
  46. package/dist/api/resources/meal/client/Client.js +1 -1
  47. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  48. package/dist/api/resources/order/client/Client.js +1 -1
  49. package/dist/api/resources/payor/client/Client.js +1 -1
  50. package/dist/api/resources/profile/client/Client.js +2 -2
  51. package/dist/api/resources/providers/client/Client.js +1 -1
  52. package/dist/api/resources/sleep/client/Client.d.ts +12 -12
  53. package/dist/api/resources/sleep/client/Client.js +34 -34
  54. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  55. package/dist/api/resources/team/client/Client.js +7 -7
  56. package/dist/api/resources/testkit/client/Client.js +2 -2
  57. package/dist/api/resources/user/client/Client.js +18 -18
  58. package/dist/api/resources/vitals/client/Client.js +78 -78
  59. package/dist/api/resources/workouts/client/Client.d.ts +10 -10
  60. package/dist/api/resources/workouts/client/Client.js +34 -34
  61. package/dist/serialization/resources/index.d.ts +3 -3
  62. package/dist/serialization/resources/index.js +4 -4
  63. package/dist/serialization/resources/labTests/client/index.d.ts +2 -2
  64. package/dist/serialization/resources/labTests/client/index.js +3 -3
  65. package/dist/serialization/resources/labTests/client/requests/index.d.ts +2 -2
  66. package/dist/serialization/resources/labTests/client/requests/index.js +5 -5
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.js +1 -1
  69. package/package.json +1 -1
  70. package/reference.md +1600 -1600
  71. package/serialization/resources/index.d.ts +3 -3
  72. package/serialization/resources/index.js +4 -4
  73. package/serialization/resources/labTests/client/index.d.ts +2 -2
  74. package/serialization/resources/labTests/client/index.js +3 -3
  75. package/serialization/resources/labTests/client/requests/index.d.ts +2 -2
  76. package/serialization/resources/labTests/client/requests/index.js +5 -5
  77. package/version.d.ts +1 -1
  78. package/version.js +1 -1
@@ -1,3 +1,11 @@
1
+ export { type LabTestsGetRequest } from "./LabTestsGetRequest";
2
+ export { type CreateLabTestRequest } from "./CreateLabTestRequest";
3
+ export { type UpdateLabTestRequest } from "./UpdateLabTestRequest";
4
+ export { type LabTestsGetMarkersRequest } from "./LabTestsGetMarkersRequest";
5
+ export { type LabTestsGetMarkersForOrderSetRequest } from "./LabTestsGetMarkersForOrderSetRequest";
6
+ export { type LabTestsGetMarkersForLabTestRequest } from "./LabTestsGetMarkersForLabTestRequest";
7
+ export { type LabTestsGetPaginatedRequest } from "./LabTestsGetPaginatedRequest";
8
+ export { type LabTestsGetOrdersRequest } from "./LabTestsGetOrdersRequest";
1
9
  export { type LabTestsGetPhlebotomyAppointmentAvailabilityRequest } from "./LabTestsGetPhlebotomyAppointmentAvailabilityRequest";
2
10
  export { type RequestAppointmentRequest } from "./RequestAppointmentRequest";
3
11
  export { type ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest } from "./ApiApiV1EndpointsVitalApiLabTestingOrdersHelpersAppointmentCancelRequest";
@@ -10,11 +18,3 @@ export { type VitalCoreClientsLabTestGetlabsSchemaAppointmentCancelRequest } fro
10
18
  export { type CreateOrderRequestCompatible } from "./CreateOrderRequestCompatible";
11
19
  export { type ImportOrderBody } from "./ImportOrderBody";
12
20
  export { type LabTestsSimulateOrderProcessRequest } from "./LabTestsSimulateOrderProcessRequest";
13
- export { type LabTestsGetRequest } from "./LabTestsGetRequest";
14
- export { type CreateLabTestRequest } from "./CreateLabTestRequest";
15
- export { type UpdateLabTestRequest } from "./UpdateLabTestRequest";
16
- export { type LabTestsGetMarkersRequest } from "./LabTestsGetMarkersRequest";
17
- export { type LabTestsGetMarkersForOrderSetRequest } from "./LabTestsGetMarkersForOrderSetRequest";
18
- export { type LabTestsGetMarkersForLabTestRequest } from "./LabTestsGetMarkersForLabTestRequest";
19
- export { type LabTestsGetPaginatedRequest } from "./LabTestsGetPaginatedRequest";
20
- export { type LabTestsGetOrdersRequest } from "./LabTestsGetOrdersRequest";
@@ -86,7 +86,7 @@ class Link {
86
86
  const _response = yield core.fetcher({
87
87
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_op"),
88
88
  method: "GET",
89
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
89
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
90
90
  contentType: "application/json",
91
91
  queryParameters: _queryParams,
92
92
  requestType: "json",
@@ -162,7 +162,7 @@ class Link {
162
162
  const _response = yield core.fetcher({
163
163
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_import"),
164
164
  method: "POST",
165
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
165
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
166
166
  contentType: "application/json",
167
167
  queryParameters: _queryParams,
168
168
  requestType: "json",
@@ -233,7 +233,7 @@ class Link {
233
233
  const _response = yield core.fetcher({
234
234
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_trigger_historical_pull"),
235
235
  method: "POST",
236
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
236
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
237
237
  contentType: "application/json",
238
238
  queryParameters: _queryParams,
239
239
  requestType: "json",
@@ -298,7 +298,7 @@ class Link {
298
298
  const _response = yield core.fetcher({
299
299
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_export"),
300
300
  method: "POST",
301
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
301
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
302
302
  contentType: "application/json",
303
303
  queryParameters: _queryParams,
304
304
  requestType: "json",
@@ -369,7 +369,7 @@ class Link {
369
369
  const _response = yield core.fetcher({
370
370
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_pause"),
371
371
  method: "POST",
372
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
372
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
373
373
  contentType: "application/json",
374
374
  queryParameters: _queryParams,
375
375
  requestType: "json",
@@ -436,7 +436,7 @@ class Link {
436
436
  const _response = yield core.fetcher({
437
437
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token"),
438
438
  method: "POST",
439
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
439
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
440
440
  contentType: "application/json",
441
441
  requestType: "json",
442
442
  body: serializers.LinkTokenExchange.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -500,7 +500,7 @@ class Link {
500
500
  const _response = yield core.fetcher({
501
501
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token/isValid"),
502
502
  method: "POST",
503
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
503
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
504
504
  contentType: "application/json",
505
505
  requestType: "json",
506
506
  body: serializers.LinkTokenValidationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -572,7 +572,7 @@ class Link {
572
572
  const _response = yield core.fetcher({
573
573
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/code/create"),
574
574
  method: "POST",
575
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
575
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
576
576
  contentType: "application/json",
577
577
  queryParameters: _queryParams,
578
578
  requestType: "json",
@@ -640,7 +640,7 @@ class Link {
640
640
  const _response = yield core.fetcher({
641
641
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/start"),
642
642
  method: "POST",
643
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
643
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
644
644
  contentType: "application/json",
645
645
  requestType: "json",
646
646
  body: serializers.BeginLinkTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -706,7 +706,7 @@ class Link {
706
706
  const _response = yield core.fetcher({
707
707
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/state"),
708
708
  method: "GET",
709
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
709
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
710
710
  contentType: "application/json",
711
711
  requestType: "json",
712
712
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -774,7 +774,7 @@ class Link {
774
774
  const _response = yield core.fetcher({
775
775
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth/email"),
776
776
  method: "POST",
777
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
777
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
778
778
  contentType: "application/json",
779
779
  requestType: "json",
780
780
  body: serializers.EmailAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -839,7 +839,7 @@ class Link {
839
839
  const _response = yield core.fetcher({
840
840
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth"),
841
841
  method: "POST",
842
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
842
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
843
843
  contentType: "application/json",
844
844
  requestType: "json",
845
845
  body: serializers.PasswordAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -900,7 +900,7 @@ class Link {
900
900
  const _response = yield core.fetcher({
901
901
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/oauth/${encodeURIComponent(serializers.OAuthProviders.jsonOrThrow(oauthProvider))}`),
902
902
  method: "GET",
903
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
903
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
904
904
  contentType: "application/json",
905
905
  requestType: "json",
906
906
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -968,7 +968,7 @@ class Link {
968
968
  const _response = yield core.fetcher({
969
969
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${encodeURIComponent(serializers.PasswordProviders.jsonOrThrow(provider))}`),
970
970
  method: "POST",
971
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
971
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
972
972
  contentType: "application/json",
973
973
  requestType: "json",
974
974
  body: serializers.IndividualProviderData.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1036,7 +1036,7 @@ class Link {
1036
1036
  const _response = yield core.fetcher({
1037
1037
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${encodeURIComponent(serializers.PasswordProviders.jsonOrThrow(provider))}/complete_mfa`),
1038
1038
  method: "POST",
1039
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1039
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1040
1040
  contentType: "application/json",
1041
1041
  requestType: "json",
1042
1042
  body: serializers.CompletePasswordProviderMfaBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1104,7 +1104,7 @@ class Link {
1104
1104
  const _response = yield core.fetcher({
1105
1105
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/email/${encodeURIComponent(serializers.EmailProviders.jsonOrThrow(provider))}`),
1106
1106
  method: "POST",
1107
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1107
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1108
1108
  contentType: "application/json",
1109
1109
  requestType: "json",
1110
1110
  body: serializers.EmailProviderAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1164,7 +1164,7 @@ class Link {
1164
1164
  const _response = yield core.fetcher({
1165
1165
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/providers"),
1166
1166
  method: "GET",
1167
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1167
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1168
1168
  contentType: "application/json",
1169
1169
  requestType: "json",
1170
1170
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1228,7 +1228,7 @@ class Link {
1228
1228
  const _response = yield core.fetcher({
1229
1229
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/manual/${encodeURIComponent(serializers.ManualProviders.jsonOrThrow(provider))}`),
1230
1230
  method: "POST",
1231
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1231
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1232
1232
  contentType: "application/json",
1233
1233
  requestType: "json",
1234
1234
  body: serializers.ManualConnectionData.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1295,7 +1295,7 @@ class Link {
1295
1295
  const _response = yield core.fetcher({
1296
1296
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/connect/demo"),
1297
1297
  method: "POST",
1298
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1298
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1299
1299
  contentType: "application/json",
1300
1300
  requestType: "json",
1301
1301
  body: serializers.DemoConnectionCreationPayload.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -78,7 +78,7 @@ class Meal {
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/meal/${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.391", "User-Agent": "@tryvital/vital-node/3.1.391", "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.393", "User-Agent": "@tryvital/vital-node/3.1.393", "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",
@@ -76,7 +76,7 @@ class MenstrualCycle {
76
76
  const _response = yield core.fetcher({
77
77
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/menstrual_cycle/${encodeURIComponent(userId)}`),
78
78
  method: "GET",
79
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
80
  contentType: "application/json",
81
81
  queryParameters: _queryParams,
82
82
  requestType: "json",
@@ -66,7 +66,7 @@ class Order {
66
66
  const _response = yield core.fetcher({
67
67
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/resend_events"),
68
68
  method: "POST",
69
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
69
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  body: serializers.ResendWebhookBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -73,7 +73,7 @@ class Payor {
73
73
  const _response = yield core.fetcher({
74
74
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/payor"),
75
75
  method: "POST",
76
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
77
  contentType: "application/json",
78
78
  requestType: "json",
79
79
  body: serializers.CreatePayorBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -72,7 +72,7 @@ class Profile {
72
72
  const _response = yield core.fetcher({
73
73
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/profile/${encodeURIComponent(userId)}`),
74
74
  method: "GET",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
76
  contentType: "application/json",
77
77
  queryParameters: _queryParams,
78
78
  requestType: "json",
@@ -142,7 +142,7 @@ class Profile {
142
142
  const _response = yield core.fetcher({
143
143
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/profile/${encodeURIComponent(userId)}/raw`),
144
144
  method: "GET",
145
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
145
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
148
148
  requestType: "json",
@@ -71,7 +71,7 @@ class Providers {
71
71
  const _response = yield core.fetcher({
72
72
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/providers"),
73
73
  method: "GET",
74
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
74
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
75
  contentType: "application/json",
76
76
  queryParameters: _queryParams,
77
77
  requestType: "json",
@@ -21,6 +21,18 @@ export declare namespace Sleep {
21
21
  export declare class Sleep {
22
22
  protected readonly _options: Sleep.Options;
23
23
  constructor(_options?: Sleep.Options);
24
+ /**
25
+ * Get Sleep stream for a user_id
26
+ *
27
+ * @param {string} sleepId - The Vital Sleep ID
28
+ * @param {Sleep.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link Vital.UnprocessableEntityError}
31
+ *
32
+ * @example
33
+ * await client.sleep.getStreamBySleepId("sleep_id")
34
+ */
35
+ getStreamBySleepId(sleepId: string, requestOptions?: Sleep.RequestOptions): Promise<Vital.ClientFacingSleepStream>;
24
36
  /**
25
37
  * Get sleep summary for user_id
26
38
  *
@@ -51,18 +63,6 @@ export declare class Sleep {
51
63
  * })
52
64
  */
53
65
  getRaw(userId: string, request: Vital.SleepGetRawRequest, requestOptions?: Sleep.RequestOptions): Promise<Vital.RawSleep>;
54
- /**
55
- * Get Sleep stream for a user_id
56
- *
57
- * @param {string} sleepId - The Vital Sleep ID
58
- * @param {Sleep.RequestOptions} requestOptions - Request-specific configuration.
59
- *
60
- * @throws {@link Vital.UnprocessableEntityError}
61
- *
62
- * @example
63
- * await client.sleep.getStreamBySleepId("sleep_id")
64
- */
65
- getStreamBySleepId(sleepId: string, requestOptions?: Sleep.RequestOptions): Promise<Vital.ClientFacingSleepStream>;
66
66
  protected _getCustomAuthorizationHeaders(): Promise<{
67
67
  "x-vital-api-key": string | undefined;
68
68
  }>;
@@ -50,44 +50,31 @@ class Sleep {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get sleep summary for user_id
53
+ * Get Sleep stream for a user_id
54
54
  *
55
- * @param {string} userId
56
- * @param {Vital.SleepGetRequest} request
55
+ * @param {string} sleepId - The Vital Sleep ID
57
56
  * @param {Sleep.RequestOptions} requestOptions - Request-specific configuration.
58
57
  *
59
58
  * @throws {@link Vital.UnprocessableEntityError}
60
59
  *
61
60
  * @example
62
- * await client.sleep.get("user_id", {
63
- * startDate: "start_date"
64
- * })
61
+ * await client.sleep.getStreamBySleepId("sleep_id")
65
62
  */
66
- get(userId, request, requestOptions) {
63
+ getStreamBySleepId(sleepId, requestOptions) {
67
64
  var _a;
68
65
  return __awaiter(this, void 0, void 0, function* () {
69
- const { provider, startDate, endDate } = request;
70
- const _queryParams = {};
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
66
  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/summary/sleep/${encodeURIComponent(userId)}`),
67
+ 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/${encodeURIComponent(sleepId)}/stream`),
80
68
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
69
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
70
  contentType: "application/json",
83
- queryParameters: _queryParams,
84
71
  requestType: "json",
85
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
86
73
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
87
74
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
88
75
  });
89
76
  if (_response.ok) {
90
- return serializers.ClientSleepResponse.parseOrThrow(_response.body, {
77
+ return serializers.ClientFacingSleepStream.parseOrThrow(_response.body, {
91
78
  unrecognizedObjectKeys: "passthrough",
92
79
  allowUnrecognizedUnionMembers: true,
93
80
  allowUnrecognizedEnumValues: true,
@@ -126,20 +113,20 @@ class Sleep {
126
113
  });
127
114
  }
128
115
  /**
129
- * Get raw sleep summary for user_id
116
+ * Get sleep summary for user_id
130
117
  *
131
118
  * @param {string} userId
132
- * @param {Vital.SleepGetRawRequest} request
119
+ * @param {Vital.SleepGetRequest} request
133
120
  * @param {Sleep.RequestOptions} requestOptions - Request-specific configuration.
134
121
  *
135
122
  * @throws {@link Vital.UnprocessableEntityError}
136
123
  *
137
124
  * @example
138
- * await client.sleep.getRaw("user_id", {
125
+ * await client.sleep.get("user_id", {
139
126
  * startDate: "start_date"
140
127
  * })
141
128
  */
142
- getRaw(userId, request, requestOptions) {
129
+ get(userId, request, requestOptions) {
143
130
  var _a;
144
131
  return __awaiter(this, void 0, void 0, function* () {
145
132
  const { provider, startDate, endDate } = request;
@@ -152,9 +139,9 @@ class Sleep {
152
139
  _queryParams["end_date"] = endDate;
153
140
  }
154
141
  const _response = yield core.fetcher({
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/sleep/${encodeURIComponent(userId)}/raw`),
142
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${encodeURIComponent(userId)}`),
156
143
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
144
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
145
  contentType: "application/json",
159
146
  queryParameters: _queryParams,
160
147
  requestType: "json",
@@ -163,7 +150,7 @@ class Sleep {
163
150
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
164
151
  });
165
152
  if (_response.ok) {
166
- return serializers.RawSleep.parseOrThrow(_response.body, {
153
+ return serializers.ClientSleepResponse.parseOrThrow(_response.body, {
167
154
  unrecognizedObjectKeys: "passthrough",
168
155
  allowUnrecognizedUnionMembers: true,
169
156
  allowUnrecognizedEnumValues: true,
@@ -202,31 +189,44 @@ class Sleep {
202
189
  });
203
190
  }
204
191
  /**
205
- * Get Sleep stream for a user_id
192
+ * Get raw sleep summary for user_id
206
193
  *
207
- * @param {string} sleepId - The Vital Sleep ID
194
+ * @param {string} userId
195
+ * @param {Vital.SleepGetRawRequest} request
208
196
  * @param {Sleep.RequestOptions} requestOptions - Request-specific configuration.
209
197
  *
210
198
  * @throws {@link Vital.UnprocessableEntityError}
211
199
  *
212
200
  * @example
213
- * await client.sleep.getStreamBySleepId("sleep_id")
201
+ * await client.sleep.getRaw("user_id", {
202
+ * startDate: "start_date"
203
+ * })
214
204
  */
215
- getStreamBySleepId(sleepId, requestOptions) {
205
+ getRaw(userId, request, requestOptions) {
216
206
  var _a;
217
207
  return __awaiter(this, void 0, void 0, function* () {
208
+ const { provider, startDate, endDate } = request;
209
+ const _queryParams = {};
210
+ if (provider != null) {
211
+ _queryParams["provider"] = provider;
212
+ }
213
+ _queryParams["start_date"] = startDate;
214
+ if (endDate != null) {
215
+ _queryParams["end_date"] = endDate;
216
+ }
218
217
  const _response = yield core.fetcher({
219
- 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/${encodeURIComponent(sleepId)}/stream`),
218
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${encodeURIComponent(userId)}/raw`),
220
219
  method: "GET",
221
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
222
221
  contentType: "application/json",
222
+ queryParameters: _queryParams,
223
223
  requestType: "json",
224
224
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
225
225
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
226
226
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
227
227
  });
228
228
  if (_response.ok) {
229
- return serializers.ClientFacingSleepStream.parseOrThrow(_response.body, {
229
+ return serializers.RawSleep.parseOrThrow(_response.body, {
230
230
  unrecognizedObjectKeys: "passthrough",
231
231
  allowUnrecognizedUnionMembers: true,
232
232
  allowUnrecognizedEnumValues: true,
@@ -78,7 +78,7 @@ class SleepCycle {
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/sleep_cycle/${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.391", "User-Agent": "@tryvital/vital-node/3.1.391", "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.393", "User-Agent": "@tryvital/vital-node/3.1.393", "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",
@@ -67,7 +67,7 @@ class Team {
67
67
  const _response = yield core.fetcher({
68
68
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/link/config"),
69
69
  method: "GET",
70
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
70
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
71
71
  contentType: "application/json",
72
72
  requestType: "json",
73
73
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -130,7 +130,7 @@ class Team {
130
130
  const _response = yield core.fetcher({
131
131
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/team/${encodeURIComponent(teamId)}`),
132
132
  method: "GET",
133
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
133
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
134
134
  contentType: "application/json",
135
135
  requestType: "json",
136
136
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -198,7 +198,7 @@ class Team {
198
198
  const _response = yield core.fetcher({
199
199
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/users/search"),
200
200
  method: "GET",
201
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
201
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
202
202
  contentType: "application/json",
203
203
  queryParameters: _queryParams,
204
204
  requestType: "json",
@@ -257,7 +257,7 @@ class Team {
257
257
  const _response = yield core.fetcher({
258
258
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/svix/url"),
259
259
  method: "GET",
260
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
260
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
261
261
  contentType: "application/json",
262
262
  requestType: "json",
263
263
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -315,7 +315,7 @@ class Team {
315
315
  const _response = yield core.fetcher({
316
316
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/source/priorities"),
317
317
  method: "GET",
318
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
318
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
319
319
  contentType: "application/json",
320
320
  queryParameters: _queryParams,
321
321
  requestType: "json",
@@ -376,7 +376,7 @@ class Team {
376
376
  const _response = yield core.fetcher({
377
377
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/source/priorities"),
378
378
  method: "PATCH",
379
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
379
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
380
380
  contentType: "application/json",
381
381
  requestType: "json",
382
382
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -427,7 +427,7 @@ class Team {
427
427
  const _response = yield core.fetcher({
428
428
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/team/${encodeURIComponent(teamId)}/physicians`),
429
429
  method: "GET",
430
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
430
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
431
431
  contentType: "application/json",
432
432
  requestType: "json",
433
433
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -81,7 +81,7 @@ class Testkit {
81
81
  const _response = yield core.fetcher({
82
82
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/testkit/register"),
83
83
  method: "POST",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  body: serializers.RegisterTestkitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -157,7 +157,7 @@ class Testkit {
157
157
  const _response = yield core.fetcher({
158
158
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/testkit"),
159
159
  method: "POST",
160
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.391", "User-Agent": "@tryvital/vital-node/3.1.391", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
160
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.393", "User-Agent": "@tryvital/vital-node/3.1.393", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
161
161
  contentType: "application/json",
162
162
  requestType: "json",
163
163
  body: serializers.CreateRegistrableTestkitOrderRequest.jsonOrThrow(request, {