@tryvital/vital-node 3.0.7 → 3.0.8

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 (237) hide show
  1. package/Client.d.ts +1 -0
  2. package/api/errors/BadRequestError.js +1 -0
  3. package/api/errors/UnprocessableEntityError.js +1 -0
  4. package/api/resources/activity/client/Client.d.ts +11 -0
  5. package/api/resources/activity/client/Client.js +22 -11
  6. package/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
  7. package/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
  8. package/api/resources/body/client/Client.d.ts +11 -0
  9. package/api/resources/body/client/Client.js +22 -11
  10. package/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
  11. package/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
  12. package/api/resources/devices/client/Client.d.ts +4 -0
  13. package/api/resources/devices/client/Client.js +7 -4
  14. package/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
  15. package/api/resources/insurance/client/Client.d.ts +6 -0
  16. package/api/resources/insurance/client/Client.js +11 -5
  17. package/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
  18. package/api/resources/introspect/client/Client.d.ts +11 -0
  19. package/api/resources/introspect/client/Client.js +24 -13
  20. package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
  21. package/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
  22. package/api/resources/labTests/client/Client.d.ts +21 -1
  23. package/api/resources/labTests/client/Client.js +115 -59
  24. package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  25. package/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
  26. package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
  27. package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
  28. package/api/resources/link/client/Client.d.ts +7 -0
  29. package/api/resources/link/client/Client.js +35 -17
  30. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
  31. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
  32. package/api/resources/meal/client/Client.d.ts +6 -0
  33. package/api/resources/meal/client/Client.js +11 -6
  34. package/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
  35. package/api/resources/profile/client/Client.d.ts +1 -0
  36. package/api/resources/profile/client/Client.js +8 -7
  37. package/api/resources/providers/client/Client.d.ts +4 -0
  38. package/api/resources/providers/client/Client.js +5 -1
  39. package/api/resources/sleep/client/Client.d.ts +19 -0
  40. package/api/resources/sleep/client/Client.js +38 -17
  41. package/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
  42. package/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
  43. package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
  44. package/api/resources/team/client/Client.d.ts +18 -0
  45. package/api/resources/team/client/Client.js +37 -14
  46. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
  47. package/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
  48. package/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
  49. package/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
  50. package/api/resources/testkit/client/Client.d.ts +1 -0
  51. package/api/resources/testkit/client/Client.js +4 -2
  52. package/api/resources/user/client/Client.d.ts +7 -0
  53. package/api/resources/user/client/Client.js +33 -17
  54. package/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  55. package/api/resources/vitals/client/Client.d.ts +116 -0
  56. package/api/resources/vitals/client/Client.js +253 -116
  57. package/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
  58. package/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
  59. package/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
  60. package/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
  61. package/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
  62. package/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
  63. package/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
  64. package/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
  65. package/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
  66. package/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
  67. package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
  68. package/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
  69. package/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
  70. package/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
  71. package/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
  72. package/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
  73. package/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
  74. package/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
  75. package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
  76. package/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
  77. package/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
  78. package/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
  79. package/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
  80. package/api/resources/workouts/client/Client.d.ts +14 -0
  81. package/api/resources/workouts/client/Client.js +27 -12
  82. package/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
  83. package/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
  84. package/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
  85. package/api/types/ClientFacingLabTest.d.ts +1 -1
  86. package/api/types/ClientFacingOrder.d.ts +1 -1
  87. package/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
  88. package/api/types/ClientFacingSleep.d.ts +1 -1
  89. package/api/types/ClientFacingUser.d.ts +0 -1
  90. package/api/types/FallbackTimeZone.d.ts +0 -1
  91. package/api/types/index.d.ts +7 -7
  92. package/api/types/index.js +7 -7
  93. package/core/fetcher/APIResponse.d.ts +1 -0
  94. package/core/fetcher/Fetcher.d.ts +3 -6
  95. package/core/fetcher/Fetcher.js +70 -26
  96. package/core/fetcher/getHeader.d.ts +1 -0
  97. package/{dist/core/streaming-fetcher → core/fetcher}/getHeader.js +2 -2
  98. package/core/fetcher/index.d.ts +1 -0
  99. package/core/fetcher/index.js +3 -1
  100. package/core/index.d.ts +0 -1
  101. package/core/index.js +0 -1
  102. package/core/schemas/Schema.d.ts +1 -0
  103. package/core/schemas/Schema.js +1 -0
  104. package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  105. package/core/schemas/builders/literals/booleanLiteral.js +29 -0
  106. package/core/schemas/builders/literals/index.d.ts +1 -0
  107. package/core/schemas/builders/literals/index.js +3 -1
  108. package/core/schemas/builders/object/index.d.ts +2 -0
  109. package/core/schemas/builders/object/index.js +3 -1
  110. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  111. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  112. package/dist/Client.d.ts +1 -0
  113. package/dist/api/errors/BadRequestError.js +1 -0
  114. package/dist/api/errors/UnprocessableEntityError.js +1 -0
  115. package/dist/api/resources/activity/client/Client.d.ts +11 -0
  116. package/dist/api/resources/activity/client/Client.js +22 -11
  117. package/dist/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
  118. package/dist/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
  119. package/dist/api/resources/body/client/Client.d.ts +11 -0
  120. package/dist/api/resources/body/client/Client.js +22 -11
  121. package/dist/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
  122. package/dist/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
  123. package/dist/api/resources/devices/client/Client.d.ts +4 -0
  124. package/dist/api/resources/devices/client/Client.js +7 -4
  125. package/dist/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
  126. package/dist/api/resources/insurance/client/Client.d.ts +6 -0
  127. package/dist/api/resources/insurance/client/Client.js +11 -5
  128. package/dist/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
  129. package/dist/api/resources/introspect/client/Client.d.ts +11 -0
  130. package/dist/api/resources/introspect/client/Client.js +24 -13
  131. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
  132. package/dist/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
  133. package/dist/api/resources/labTests/client/Client.d.ts +21 -1
  134. package/dist/api/resources/labTests/client/Client.js +115 -59
  135. package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  136. package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
  137. package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
  138. package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
  139. package/dist/api/resources/link/client/Client.d.ts +7 -0
  140. package/dist/api/resources/link/client/Client.js +35 -17
  141. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
  142. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
  143. package/dist/api/resources/meal/client/Client.d.ts +6 -0
  144. package/dist/api/resources/meal/client/Client.js +11 -6
  145. package/dist/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
  146. package/dist/api/resources/profile/client/Client.d.ts +1 -0
  147. package/dist/api/resources/profile/client/Client.js +8 -7
  148. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  149. package/dist/api/resources/providers/client/Client.js +5 -1
  150. package/dist/api/resources/sleep/client/Client.d.ts +19 -0
  151. package/dist/api/resources/sleep/client/Client.js +38 -17
  152. package/dist/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
  153. package/dist/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
  154. package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
  155. package/dist/api/resources/team/client/Client.d.ts +18 -0
  156. package/dist/api/resources/team/client/Client.js +37 -14
  157. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
  158. package/dist/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
  159. package/dist/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
  160. package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
  161. package/dist/api/resources/testkit/client/Client.d.ts +1 -0
  162. package/dist/api/resources/testkit/client/Client.js +4 -2
  163. package/dist/api/resources/user/client/Client.d.ts +7 -0
  164. package/dist/api/resources/user/client/Client.js +33 -17
  165. package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
  166. package/dist/api/resources/vitals/client/Client.d.ts +116 -0
  167. package/dist/api/resources/vitals/client/Client.js +253 -116
  168. package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
  169. package/dist/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
  170. package/dist/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
  171. package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
  172. package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
  173. package/dist/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
  174. package/dist/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
  175. package/dist/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
  176. package/dist/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
  177. package/dist/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
  178. package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
  179. package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
  180. package/dist/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
  181. package/dist/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
  182. package/dist/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
  183. package/dist/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
  184. package/dist/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
  185. package/dist/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
  186. package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
  187. package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
  188. package/dist/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
  189. package/dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
  190. package/dist/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
  191. package/dist/api/resources/workouts/client/Client.d.ts +14 -0
  192. package/dist/api/resources/workouts/client/Client.js +27 -12
  193. package/dist/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
  194. package/dist/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
  195. package/dist/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
  196. package/dist/api/types/ClientFacingLabTest.d.ts +1 -1
  197. package/dist/api/types/ClientFacingOrder.d.ts +1 -1
  198. package/dist/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
  199. package/dist/api/types/ClientFacingSleep.d.ts +1 -1
  200. package/dist/api/types/ClientFacingUser.d.ts +0 -1
  201. package/dist/api/types/FallbackTimeZone.d.ts +0 -1
  202. package/dist/api/types/index.d.ts +7 -7
  203. package/dist/api/types/index.js +7 -7
  204. package/dist/core/fetcher/APIResponse.d.ts +1 -0
  205. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  206. package/dist/core/fetcher/Fetcher.js +70 -26
  207. package/dist/core/fetcher/getHeader.d.ts +1 -0
  208. package/{core/streaming-fetcher → dist/core/fetcher}/getHeader.js +2 -2
  209. package/dist/core/fetcher/index.d.ts +1 -0
  210. package/dist/core/fetcher/index.js +3 -1
  211. package/dist/core/index.d.ts +0 -1
  212. package/dist/core/index.js +0 -1
  213. package/dist/core/schemas/Schema.d.ts +1 -0
  214. package/dist/core/schemas/Schema.js +1 -0
  215. package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  216. package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
  217. package/dist/core/schemas/builders/literals/index.d.ts +1 -0
  218. package/dist/core/schemas/builders/literals/index.js +3 -1
  219. package/dist/core/schemas/builders/object/index.d.ts +2 -0
  220. package/dist/core/schemas/builders/object/index.js +3 -1
  221. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  222. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  223. package/dist/serialization/types/index.d.ts +7 -7
  224. package/dist/serialization/types/index.js +7 -7
  225. package/package.json +7 -4
  226. package/serialization/types/index.d.ts +7 -7
  227. package/serialization/types/index.js +7 -7
  228. package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
  229. package/core/streaming-fetcher/StreamingFetcher.js +0 -79
  230. package/core/streaming-fetcher/getHeader.d.ts +0 -2
  231. package/core/streaming-fetcher/index.d.ts +0 -3
  232. package/core/streaming-fetcher/index.js +0 -7
  233. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
  234. package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -79
  235. package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
  236. package/dist/core/streaming-fetcher/index.d.ts +0 -3
  237. package/dist/core/streaming-fetcher/index.js +0 -7
@@ -42,7 +42,6 @@ exports.User = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
44
  const Vital = __importStar(require("../../.."));
45
- const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
46
45
  const url_join_1 = __importDefault(require("url-join"));
47
46
  const serializers = __importStar(require("../../../../serialization"));
48
47
  const errors = __importStar(require("../../../../errors"));
@@ -58,12 +57,12 @@ class User {
58
57
  var _a;
59
58
  return __awaiter(this, void 0, void 0, function* () {
60
59
  const { offset, limit } = request;
61
- const _queryParams = new url_search_params_1.default();
60
+ const _queryParams = {};
62
61
  if (offset != null) {
63
- _queryParams.append("offset", offset.toString());
62
+ _queryParams["offset"] = offset.toString();
64
63
  }
65
64
  if (limit != null) {
66
- _queryParams.append("limit", limit.toString());
65
+ _queryParams["limit"] = limit.toString();
67
66
  }
68
67
  const _response = yield core.fetcher({
69
68
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/user"),
@@ -72,11 +71,12 @@ class User {
72
71
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
73
72
  "X-Fern-Language": "JavaScript",
74
73
  "X-Fern-SDK-Name": "@tryvital/vital-node",
75
- "X-Fern-SDK-Version": "3.0.7",
74
+ "X-Fern-SDK-Version": "3.0.8",
76
75
  },
77
76
  contentType: "application/json",
78
77
  queryParameters: _queryParams,
79
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
80
  });
81
81
  if (_response.ok) {
82
82
  return yield serializers.PaginatedUsersResponse.parseOrThrow(_response.body, {
@@ -131,11 +131,12 @@ class User {
131
131
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
132
132
  "X-Fern-Language": "JavaScript",
133
133
  "X-Fern-SDK-Name": "@tryvital/vital-node",
134
- "X-Fern-SDK-Version": "3.0.7",
134
+ "X-Fern-SDK-Version": "3.0.8",
135
135
  },
136
136
  contentType: "application/json",
137
137
  body: yield serializers.UserCreateBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
138
138
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
139
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
139
140
  });
140
141
  if (_response.ok) {
141
142
  return yield serializers.ClientFacingUserKey.parseOrThrow(_response.body, {
@@ -189,10 +190,11 @@ class User {
189
190
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
190
191
  "X-Fern-Language": "JavaScript",
191
192
  "X-Fern-SDK-Name": "@tryvital/vital-node",
192
- "X-Fern-SDK-Version": "3.0.7",
193
+ "X-Fern-SDK-Version": "3.0.8",
193
194
  },
194
195
  contentType: "application/json",
195
196
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
197
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
196
198
  });
197
199
  if (_response.ok) {
198
200
  return yield serializers.MetricsResult.parseOrThrow(_response.body, {
@@ -236,10 +238,11 @@ class User {
236
238
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
237
239
  "X-Fern-Language": "JavaScript",
238
240
  "X-Fern-SDK-Name": "@tryvital/vital-node",
239
- "X-Fern-SDK-Version": "3.0.7",
241
+ "X-Fern-SDK-Version": "3.0.8",
240
242
  },
241
243
  contentType: "application/json",
242
244
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
245
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
243
246
  });
244
247
  if (_response.ok) {
245
248
  return yield serializers.UserSignInTokenResponse.parseOrThrow(_response.body, {
@@ -283,6 +286,9 @@ class User {
283
286
  /**
284
287
  * GET Users connected providers
285
288
  * @throws {@link Vital.UnprocessableEntityError}
289
+ *
290
+ * @example
291
+ * await vital.user.getConnectedProviders("user-id")
286
292
  */
287
293
  getConnectedProviders(userId, requestOptions) {
288
294
  var _a;
@@ -294,10 +300,11 @@ class User {
294
300
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
295
301
  "X-Fern-Language": "JavaScript",
296
302
  "X-Fern-SDK-Name": "@tryvital/vital-node",
297
- "X-Fern-SDK-Version": "3.0.7",
303
+ "X-Fern-SDK-Version": "3.0.8",
298
304
  },
299
305
  contentType: "application/json",
300
306
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
307
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
301
308
  });
302
309
  if (_response.ok) {
303
310
  return yield serializers.user.getConnectedProviders.Response.parseOrThrow(_response.body, {
@@ -352,10 +359,11 @@ class User {
352
359
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
353
360
  "X-Fern-Language": "JavaScript",
354
361
  "X-Fern-SDK-Name": "@tryvital/vital-node",
355
- "X-Fern-SDK-Version": "3.0.7",
362
+ "X-Fern-SDK-Version": "3.0.8",
356
363
  },
357
364
  contentType: "application/json",
358
365
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
366
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
359
367
  });
360
368
  if (_response.ok) {
361
369
  return yield serializers.ClientFacingUser.parseOrThrow(_response.body, {
@@ -409,10 +417,11 @@ class User {
409
417
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
410
418
  "X-Fern-Language": "JavaScript",
411
419
  "X-Fern-SDK-Name": "@tryvital/vital-node",
412
- "X-Fern-SDK-Version": "3.0.7",
420
+ "X-Fern-SDK-Version": "3.0.8",
413
421
  },
414
422
  contentType: "application/json",
415
423
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
424
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
416
425
  });
417
426
  if (_response.ok) {
418
427
  return yield serializers.UserSuccessResponse.parseOrThrow(_response.body, {
@@ -455,6 +464,9 @@ class User {
455
464
  }
456
465
  /**
457
466
  * @throws {@link Vital.UnprocessableEntityError}
467
+ *
468
+ * @example
469
+ * await vital.user.patch("user-id", {})
458
470
  */
459
471
  patch(userId, request = {}, requestOptions) {
460
472
  var _a;
@@ -466,11 +478,12 @@ class User {
466
478
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
467
479
  "X-Fern-Language": "JavaScript",
468
480
  "X-Fern-SDK-Name": "@tryvital/vital-node",
469
- "X-Fern-SDK-Version": "3.0.7",
481
+ "X-Fern-SDK-Version": "3.0.8",
470
482
  },
471
483
  contentType: "application/json",
472
484
  body: yield serializers.UserPatchBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
473
485
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
486
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
474
487
  });
475
488
  if (_response.ok) {
476
489
  return;
@@ -520,10 +533,11 @@ class User {
520
533
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
521
534
  "X-Fern-Language": "JavaScript",
522
535
  "X-Fern-SDK-Name": "@tryvital/vital-node",
523
- "X-Fern-SDK-Version": "3.0.7",
536
+ "X-Fern-SDK-Version": "3.0.8",
524
537
  },
525
538
  contentType: "application/json",
526
539
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
540
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
527
541
  });
528
542
  if (_response.ok) {
529
543
  return yield serializers.ClientFacingUser.parseOrThrow(_response.body, {
@@ -577,10 +591,11 @@ class User {
577
591
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
578
592
  "X-Fern-Language": "JavaScript",
579
593
  "X-Fern-SDK-Name": "@tryvital/vital-node",
580
- "X-Fern-SDK-Version": "3.0.7",
594
+ "X-Fern-SDK-Version": "3.0.8",
581
595
  },
582
596
  contentType: "application/json",
583
597
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
598
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
584
599
  });
585
600
  if (_response.ok) {
586
601
  return yield serializers.UserSuccessResponse.parseOrThrow(_response.body, {
@@ -630,9 +645,9 @@ class User {
630
645
  var _a;
631
646
  return __awaiter(this, void 0, void 0, function* () {
632
647
  const { timeout } = request;
633
- const _queryParams = new url_search_params_1.default();
648
+ const _queryParams = {};
634
649
  if (timeout != null) {
635
- _queryParams.append("timeout", timeout.toString());
650
+ _queryParams["timeout"] = timeout.toString();
636
651
  }
637
652
  const _response = yield core.fetcher({
638
653
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/refresh/${userId}`),
@@ -641,11 +656,12 @@ class User {
641
656
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
642
657
  "X-Fern-Language": "JavaScript",
643
658
  "X-Fern-SDK-Name": "@tryvital/vital-node",
644
- "X-Fern-SDK-Version": "3.0.7",
659
+ "X-Fern-SDK-Version": "3.0.8",
645
660
  },
646
661
  contentType: "application/json",
647
662
  queryParameters: _queryParams,
648
663
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
664
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
649
665
  });
650
666
  if (_response.ok) {
651
667
  return yield serializers.UserRefreshSuccessResponse.parseOrThrow(_response.body, {
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface UserPatchBody {
5
9
  /**
6
10
  * Fallback time zone of the user, in the form of a valid IANA tzdatabase identifier (e.g., `Europe/London` or `America/Los_Angeles`).
@@ -11,6 +11,7 @@ export declare namespace Vitals {
11
11
  }
12
12
  interface RequestOptions {
13
13
  timeoutInSeconds?: number;
14
+ maxRetries?: number;
14
15
  }
15
16
  }
16
17
  export declare class Vitals {
@@ -19,116 +20,231 @@ export declare class Vitals {
19
20
  /**
20
21
  * Get timeseries data for user
21
22
  * @throws {@link Vital.UnprocessableEntityError}
23
+ *
24
+ * @example
25
+ * await vital.vitals.mindfulnessMinutes("user-id", {
26
+ * startDate: "start-date"
27
+ * })
22
28
  */
23
29
  mindfulnessMinutes(userId: string, request: Vital.VitalsMindfulnessMinutesRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingMindfulnessMinutesTimeseries[]>;
24
30
  /**
25
31
  * Get timeseries data for user
26
32
  * @throws {@link Vital.UnprocessableEntityError}
33
+ *
34
+ * @example
35
+ * await vital.vitals.caffeine("user-id", {
36
+ * startDate: "start-date"
37
+ * })
27
38
  */
28
39
  caffeine(userId: string, request: Vital.VitalsCaffeineRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCaffeineTimeseries[]>;
29
40
  /**
30
41
  * Get timeseries data for user
31
42
  * @throws {@link Vital.UnprocessableEntityError}
43
+ *
44
+ * @example
45
+ * await vital.vitals.water("user-id", {
46
+ * startDate: "start-date"
47
+ * })
32
48
  */
33
49
  water(userId: string, request: Vital.VitalsWaterRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingWaterTimeseries[]>;
34
50
  /**
35
51
  * Get timeseries data for user
36
52
  * @throws {@link Vital.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await vital.vitals.steps("user-id", {
56
+ * startDate: "start-date"
57
+ * })
37
58
  */
38
59
  steps(userId: string, request: Vital.VitalsStepsRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingStepsTimeseries[]>;
39
60
  /**
40
61
  * Get timeseries data for user
41
62
  * @throws {@link Vital.UnprocessableEntityError}
63
+ *
64
+ * @example
65
+ * await vital.vitals.floorsClimbed("user-id", {
66
+ * startDate: "start-date"
67
+ * })
42
68
  */
43
69
  floorsClimbed(userId: string, request: Vital.VitalsFloorsClimbedRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingFloorsClimbedTimeseries[]>;
44
70
  /**
45
71
  * Get timeseries data for user
46
72
  * @throws {@link Vital.UnprocessableEntityError}
73
+ *
74
+ * @example
75
+ * await vital.vitals.distance("user-id", {
76
+ * startDate: "start-date"
77
+ * })
47
78
  */
48
79
  distance(userId: string, request: Vital.VitalsDistanceRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingDistanceTimeseries[]>;
49
80
  /**
50
81
  * Get timeseries data for user
51
82
  * @throws {@link Vital.UnprocessableEntityError}
83
+ *
84
+ * @example
85
+ * await vital.vitals.caloriesBasal("user-id", {
86
+ * startDate: "start-date"
87
+ * })
52
88
  */
53
89
  caloriesBasal(userId: string, request: Vital.VitalsCaloriesBasalRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCaloriesBasalTimeseries[]>;
54
90
  /**
55
91
  * Get timeseries data for user
56
92
  * @throws {@link Vital.UnprocessableEntityError}
93
+ *
94
+ * @example
95
+ * await vital.vitals.caloriesActive("user-id", {
96
+ * startDate: "start-date"
97
+ * })
57
98
  */
58
99
  caloriesActive(userId: string, request: Vital.VitalsCaloriesActiveRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCaloriesActiveTimeseries[]>;
59
100
  /**
60
101
  * Get timeseries data for user
61
102
  * @throws {@link Vital.UnprocessableEntityError}
103
+ *
104
+ * @example
105
+ * await vital.vitals.respiratoryRate("user-id", {
106
+ * startDate: "start-date"
107
+ * })
62
108
  */
63
109
  respiratoryRate(userId: string, request: Vital.VitalsRespiratoryRateRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingRespiratoryRateTimeseries[]>;
64
110
  /**
65
111
  * Get timeseries data for user
66
112
  * @throws {@link Vital.UnprocessableEntityError}
113
+ *
114
+ * @example
115
+ * await vital.vitals.ige("user-id", {
116
+ * startDate: "start-date"
117
+ * })
67
118
  */
68
119
  ige(userId: string, request: Vital.VitalsIgeRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingIgeTimeseries[]>;
69
120
  /**
70
121
  * Get timeseries data for user
71
122
  * @throws {@link Vital.UnprocessableEntityError}
123
+ *
124
+ * @example
125
+ * await vital.vitals.igg("user-id", {
126
+ * startDate: "start-date"
127
+ * })
72
128
  */
73
129
  igg(userId: string, request: Vital.VitalsIggRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingIggTimeseries[]>;
74
130
  /**
75
131
  * Get timeseries data for user
76
132
  * @throws {@link Vital.UnprocessableEntityError}
133
+ *
134
+ * @example
135
+ * await vital.vitals.hypnogram("user-id", {
136
+ * startDate: "start-date"
137
+ * })
77
138
  */
78
139
  hypnogram(userId: string, request: Vital.VitalsHypnogramRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingHypnogramTimeseries[]>;
79
140
  /**
80
141
  * Get timeseries data for user
81
142
  * @throws {@link Vital.UnprocessableEntityError}
143
+ *
144
+ * @example
145
+ * await vital.vitals.hrv("user-id", {
146
+ * startDate: "start-date"
147
+ * })
82
148
  */
83
149
  hrv(userId: string, request: Vital.VitalsHrvRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingHrvTimeseries[]>;
84
150
  /**
85
151
  * Get timeseries data for user
86
152
  * @throws {@link Vital.UnprocessableEntityError}
153
+ *
154
+ * @example
155
+ * await vital.vitals.heartrate("user-id", {
156
+ * startDate: "start-date"
157
+ * })
87
158
  */
88
159
  heartrate(userId: string, request: Vital.VitalsHeartrateRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingHeartRateTimeseries[]>;
89
160
  /**
90
161
  * Get timeseries data for user
91
162
  * @throws {@link Vital.UnprocessableEntityError}
163
+ *
164
+ * @example
165
+ * await vital.vitals.glucose("user-id", {
166
+ * startDate: "start-date"
167
+ * })
92
168
  */
93
169
  glucose(userId: string, request: Vital.VitalsGlucoseRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingGlucoseTimeseries[]>;
94
170
  /**
95
171
  * Get timeseries data for user
96
172
  * @throws {@link Vital.UnprocessableEntityError}
173
+ *
174
+ * @example
175
+ * await vital.vitals.triglycerides("user-id", {
176
+ * startDate: "start-date"
177
+ * })
97
178
  */
98
179
  triglycerides(userId: string, request: Vital.VitalsTriglyceridesRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCholesterolTimeseries[]>;
99
180
  /**
100
181
  * Get timeseries data for user
101
182
  * @throws {@link Vital.UnprocessableEntityError}
183
+ *
184
+ * @example
185
+ * await vital.vitals.cholesterolTotal("user-id", {
186
+ * startDate: "start-date"
187
+ * })
102
188
  */
103
189
  cholesterolTotal(userId: string, request: Vital.VitalsCholesterolTotalRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCholesterolTimeseries[]>;
104
190
  /**
105
191
  * Get timeseries data for user
106
192
  * @throws {@link Vital.UnprocessableEntityError}
193
+ *
194
+ * @example
195
+ * await vital.vitals.cholesterolHdl("user-id", {
196
+ * startDate: "start-date"
197
+ * })
107
198
  */
108
199
  cholesterolHdl(userId: string, request: Vital.VitalsCholesterolHdlRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCholesterolTimeseries[]>;
109
200
  /**
110
201
  * Get timeseries data for user
111
202
  * @throws {@link Vital.UnprocessableEntityError}
203
+ *
204
+ * @example
205
+ * await vital.vitals.cholesterolLdl("user-id", {
206
+ * startDate: "start-date"
207
+ * })
112
208
  */
113
209
  cholesterolLdl(userId: string, request: Vital.VitalsCholesterolLdlRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCholesterolTimeseries[]>;
114
210
  /**
115
211
  * Get timeseries data for user
116
212
  * @throws {@link Vital.UnprocessableEntityError}
213
+ *
214
+ * @example
215
+ * await vital.vitals.cholesterol("user-id", {
216
+ * startDate: "start-date"
217
+ * })
117
218
  */
118
219
  cholesterol(userId: string, request: Vital.VitalsCholesterolRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingCholesterolTimeseries[]>;
119
220
  /**
120
221
  * Get timeseries data for user
121
222
  * @throws {@link Vital.UnprocessableEntityError}
223
+ *
224
+ * @example
225
+ * await vital.vitals.bloodOxygen("user-id", {
226
+ * startDate: "start-date"
227
+ * })
122
228
  */
123
229
  bloodOxygen(userId: string, request: Vital.VitalsBloodOxygenRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingBloodOxygenTimeseries[]>;
124
230
  /**
125
231
  * Get timeseries data for user
126
232
  * @throws {@link Vital.UnprocessableEntityError}
233
+ *
234
+ * @example
235
+ * await vital.vitals.electrocardiogramVoltage("user-id", {
236
+ * startDate: "start-date"
237
+ * })
127
238
  */
128
239
  electrocardiogramVoltage(userId: string, request: Vital.VitalsElectrocardiogramVoltageRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingElectrocardiogramVoltageTimeseries[]>;
129
240
  /**
130
241
  * Get timeseries data for user
131
242
  * @throws {@link Vital.UnprocessableEntityError}
243
+ *
244
+ * @example
245
+ * await vital.vitals.bloodPressure("user-id", {
246
+ * startDate: "start-date"
247
+ * })
132
248
  */
133
249
  bloodPressure(userId: string, request: Vital.VitalsBloodPressureRequest, requestOptions?: Vitals.RequestOptions): Promise<Vital.ClientFacingBloodPressureTimeseries[]>;
134
250
  }