@tryvital/vital-node 3.0.4 → 3.0.6

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 (161) hide show
  1. package/api/resources/activity/client/Client.js +2 -2
  2. package/api/resources/body/client/Client.js +2 -2
  3. package/api/resources/devices/client/Client.js +1 -1
  4. package/api/resources/insurance/client/Client.js +2 -2
  5. package/api/resources/introspect/client/Client.d.ts +4 -0
  6. package/api/resources/introspect/client/Client.js +73 -1
  7. package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
  8. package/api/resources/introspect/client/requests/index.d.ts +1 -0
  9. package/api/resources/labTests/client/Client.d.ts +3 -2
  10. package/api/resources/labTests/client/Client.js +29 -57
  11. package/api/resources/link/client/Client.d.ts +5 -10
  12. package/api/resources/link/client/Client.js +57 -85
  13. package/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -0
  14. package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -0
  15. package/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -0
  16. package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +6 -0
  17. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +6 -0
  18. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.js +5 -0
  19. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +6 -0
  20. package/api/resources/link/client/requests/LinkTokenStateRequest.js +5 -0
  21. package/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -0
  22. package/api/resources/link/client/requests/index.d.ts +3 -1
  23. package/api/resources/meal/client/Client.js +1 -1
  24. package/api/resources/profile/client/Client.js +2 -2
  25. package/api/resources/providers/client/Client.js +1 -1
  26. package/api/resources/sleep/client/Client.js +4 -4
  27. package/api/resources/team/client/Client.d.ts +2 -1
  28. package/api/resources/team/client/Client.js +26 -13
  29. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +6 -0
  30. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.js +5 -0
  31. package/api/resources/team/client/requests/index.d.ts +1 -0
  32. package/api/resources/testkit/client/Client.js +2 -2
  33. package/api/resources/user/client/Client.js +11 -11
  34. package/api/resources/vitals/client/Client.js +23 -23
  35. package/api/resources/workouts/client/Client.js +3 -3
  36. package/api/types/HistoricalPullStatus.d.ts +12 -0
  37. package/api/types/HistoricalPullStatus.js +11 -0
  38. package/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  39. package/api/types/SingleHistoricalPullStatistics.js +5 -0
  40. package/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  41. package/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  42. package/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  43. package/api/types/SingleUserHistoricalPullResponse.js +5 -0
  44. package/api/types/SingleUserResourceResponse.d.ts +2 -0
  45. package/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  46. package/api/types/UserHistoricalPullsResponse.js +5 -0
  47. package/api/types/index.d.ts +5 -0
  48. package/api/types/index.js +5 -0
  49. package/core/index.d.ts +1 -0
  50. package/core/index.js +1 -0
  51. package/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  52. package/core/streaming-fetcher/StreamingFetcher.js +79 -0
  53. package/core/streaming-fetcher/getHeader.d.ts +2 -0
  54. package/core/streaming-fetcher/getHeader.js +12 -0
  55. package/core/streaming-fetcher/index.d.ts +3 -0
  56. package/core/streaming-fetcher/index.js +7 -0
  57. package/dist/api/resources/activity/client/Client.js +2 -2
  58. package/dist/api/resources/body/client/Client.js +2 -2
  59. package/dist/api/resources/devices/client/Client.js +1 -1
  60. package/dist/api/resources/insurance/client/Client.js +2 -2
  61. package/dist/api/resources/introspect/client/Client.d.ts +4 -0
  62. package/dist/api/resources/introspect/client/Client.js +73 -1
  63. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
  64. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
  65. package/dist/api/resources/introspect/client/requests/index.d.ts +1 -0
  66. package/dist/api/resources/labTests/client/Client.d.ts +3 -2
  67. package/dist/api/resources/labTests/client/Client.js +29 -57
  68. package/dist/api/resources/link/client/Client.d.ts +5 -10
  69. package/dist/api/resources/link/client/Client.js +57 -85
  70. package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -0
  71. package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -0
  72. package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -0
  73. package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +6 -0
  74. package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.js +5 -0
  75. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +6 -0
  76. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.js +5 -0
  77. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +6 -0
  78. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.js +5 -0
  79. package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -0
  80. package/dist/api/resources/link/client/requests/index.d.ts +3 -1
  81. package/dist/api/resources/meal/client/Client.js +1 -1
  82. package/dist/api/resources/profile/client/Client.js +2 -2
  83. package/dist/api/resources/providers/client/Client.js +1 -1
  84. package/dist/api/resources/sleep/client/Client.js +4 -4
  85. package/dist/api/resources/team/client/Client.d.ts +2 -1
  86. package/dist/api/resources/team/client/Client.js +26 -13
  87. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +6 -0
  88. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.js +5 -0
  89. package/dist/api/resources/team/client/requests/index.d.ts +1 -0
  90. package/dist/api/resources/testkit/client/Client.js +2 -2
  91. package/dist/api/resources/user/client/Client.js +11 -11
  92. package/dist/api/resources/vitals/client/Client.js +23 -23
  93. package/dist/api/resources/workouts/client/Client.js +3 -3
  94. package/dist/api/types/HistoricalPullStatus.d.ts +12 -0
  95. package/dist/api/types/HistoricalPullStatus.js +11 -0
  96. package/dist/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  97. package/dist/api/types/SingleHistoricalPullStatistics.js +5 -0
  98. package/dist/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  99. package/dist/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  100. package/dist/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  101. package/dist/api/types/SingleUserHistoricalPullResponse.js +5 -0
  102. package/dist/api/types/SingleUserResourceResponse.d.ts +2 -0
  103. package/dist/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  104. package/dist/api/types/UserHistoricalPullsResponse.js +5 -0
  105. package/dist/api/types/index.d.ts +5 -0
  106. package/dist/api/types/index.js +5 -0
  107. package/dist/core/index.d.ts +1 -0
  108. package/dist/core/index.js +1 -0
  109. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  110. package/dist/core/streaming-fetcher/StreamingFetcher.js +79 -0
  111. package/dist/core/streaming-fetcher/getHeader.d.ts +2 -0
  112. package/dist/core/streaming-fetcher/getHeader.js +12 -0
  113. package/dist/core/streaming-fetcher/index.d.ts +3 -0
  114. package/dist/core/streaming-fetcher/index.js +7 -0
  115. package/dist/serialization/resources/link/client/index.d.ts +0 -1
  116. package/dist/serialization/resources/link/client/index.js +1 -2
  117. package/dist/serialization/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  118. package/dist/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  119. package/dist/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  120. package/dist/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  121. package/dist/serialization/types/HistoricalPullStatus.d.ts +10 -0
  122. package/dist/serialization/{resources/link/client/connectOauthProvider.js → types/HistoricalPullStatus.js} +3 -3
  123. package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  124. package/dist/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  125. package/dist/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  126. package/dist/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  127. package/dist/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  128. package/dist/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  129. package/dist/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  130. package/dist/serialization/types/SingleUserResourceResponse.js +10 -0
  131. package/dist/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  132. package/dist/serialization/types/UserHistoricalPullsResponse.js +43 -0
  133. package/dist/serialization/types/index.d.ts +5 -0
  134. package/dist/serialization/types/index.js +5 -0
  135. package/package.json +1 -1
  136. package/serialization/resources/link/client/index.d.ts +0 -1
  137. package/serialization/resources/link/client/index.js +1 -2
  138. package/serialization/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  139. package/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  140. package/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  141. package/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  142. package/serialization/types/HistoricalPullStatus.d.ts +10 -0
  143. package/serialization/{resources/link/client/connectOauthProvider.js → types/HistoricalPullStatus.js} +3 -3
  144. package/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  145. package/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  146. package/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  147. package/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  148. package/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  149. package/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  150. package/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  151. package/serialization/types/SingleUserResourceResponse.js +10 -0
  152. package/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  153. package/serialization/types/UserHistoricalPullsResponse.js +43 -0
  154. package/serialization/types/index.d.ts +5 -0
  155. package/serialization/types/index.js +5 -0
  156. package/api/resources/link/client/requests/LinkConnectOauthProviderRequest.d.ts +0 -6
  157. package/dist/api/resources/link/client/requests/LinkConnectOauthProviderRequest.d.ts +0 -6
  158. package/dist/serialization/resources/link/client/connectOauthProvider.d.ts +0 -9
  159. package/serialization/resources/link/client/connectOauthProvider.d.ts +0 -9
  160. /package/api/resources/{link/client/requests/LinkConnectOauthProviderRequest.js → introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js} +0 -0
  161. /package/{dist/api/resources/link/client/requests/LinkConnectOauthProviderRequest.js → api/resources/link/client/requests/LinkGenerateOauthLinkRequest.js} +0 -0
@@ -1,3 +1,4 @@
1
+ export { TeamGetLinkConfigRequest } from "./TeamGetLinkConfigRequest";
1
2
  export { TeamGetUserByIdRequest } from "./TeamGetUserByIdRequest";
2
3
  export { TeamGetSourcePrioritiesRequest } from "./TeamGetSourcePrioritiesRequest";
3
4
  export { TeamUpdateSourcePrioritiesRequest } from "./TeamUpdateSourcePrioritiesRequest";
@@ -62,7 +62,7 @@ class Testkit {
62
62
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "@tryvital/vital-node",
65
- "X-Fern-SDK-Version": "3.0.4",
65
+ "X-Fern-SDK-Version": "3.0.6",
66
66
  },
67
67
  contentType: "application/json",
68
68
  body: yield serializers.RegisterTestkitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -121,7 +121,7 @@ class Testkit {
121
121
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
122
122
  "X-Fern-Language": "JavaScript",
123
123
  "X-Fern-SDK-Name": "@tryvital/vital-node",
124
- "X-Fern-SDK-Version": "3.0.4",
124
+ "X-Fern-SDK-Version": "3.0.6",
125
125
  },
126
126
  contentType: "application/json",
127
127
  body: yield serializers.CreateRegistrableTestkitOrderRequest.jsonOrThrow(request, {
@@ -72,7 +72,7 @@ class User {
72
72
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
73
73
  "X-Fern-Language": "JavaScript",
74
74
  "X-Fern-SDK-Name": "@tryvital/vital-node",
75
- "X-Fern-SDK-Version": "3.0.4",
75
+ "X-Fern-SDK-Version": "3.0.6",
76
76
  },
77
77
  contentType: "application/json",
78
78
  queryParameters: _queryParams,
@@ -131,7 +131,7 @@ 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.4",
134
+ "X-Fern-SDK-Version": "3.0.6",
135
135
  },
136
136
  contentType: "application/json",
137
137
  body: yield serializers.UserCreateBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -189,7 +189,7 @@ class User {
189
189
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
190
190
  "X-Fern-Language": "JavaScript",
191
191
  "X-Fern-SDK-Name": "@tryvital/vital-node",
192
- "X-Fern-SDK-Version": "3.0.4",
192
+ "X-Fern-SDK-Version": "3.0.6",
193
193
  },
194
194
  contentType: "application/json",
195
195
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -236,7 +236,7 @@ class User {
236
236
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
237
237
  "X-Fern-Language": "JavaScript",
238
238
  "X-Fern-SDK-Name": "@tryvital/vital-node",
239
- "X-Fern-SDK-Version": "3.0.4",
239
+ "X-Fern-SDK-Version": "3.0.6",
240
240
  },
241
241
  contentType: "application/json",
242
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -294,7 +294,7 @@ class User {
294
294
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
295
295
  "X-Fern-Language": "JavaScript",
296
296
  "X-Fern-SDK-Name": "@tryvital/vital-node",
297
- "X-Fern-SDK-Version": "3.0.4",
297
+ "X-Fern-SDK-Version": "3.0.6",
298
298
  },
299
299
  contentType: "application/json",
300
300
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -352,7 +352,7 @@ class User {
352
352
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
353
353
  "X-Fern-Language": "JavaScript",
354
354
  "X-Fern-SDK-Name": "@tryvital/vital-node",
355
- "X-Fern-SDK-Version": "3.0.4",
355
+ "X-Fern-SDK-Version": "3.0.6",
356
356
  },
357
357
  contentType: "application/json",
358
358
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -409,7 +409,7 @@ class User {
409
409
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
410
410
  "X-Fern-Language": "JavaScript",
411
411
  "X-Fern-SDK-Name": "@tryvital/vital-node",
412
- "X-Fern-SDK-Version": "3.0.4",
412
+ "X-Fern-SDK-Version": "3.0.6",
413
413
  },
414
414
  contentType: "application/json",
415
415
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -466,7 +466,7 @@ class User {
466
466
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
467
467
  "X-Fern-Language": "JavaScript",
468
468
  "X-Fern-SDK-Name": "@tryvital/vital-node",
469
- "X-Fern-SDK-Version": "3.0.4",
469
+ "X-Fern-SDK-Version": "3.0.6",
470
470
  },
471
471
  contentType: "application/json",
472
472
  body: yield serializers.UserPatchBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -520,7 +520,7 @@ class User {
520
520
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
521
521
  "X-Fern-Language": "JavaScript",
522
522
  "X-Fern-SDK-Name": "@tryvital/vital-node",
523
- "X-Fern-SDK-Version": "3.0.4",
523
+ "X-Fern-SDK-Version": "3.0.6",
524
524
  },
525
525
  contentType: "application/json",
526
526
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -577,7 +577,7 @@ class User {
577
577
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
578
578
  "X-Fern-Language": "JavaScript",
579
579
  "X-Fern-SDK-Name": "@tryvital/vital-node",
580
- "X-Fern-SDK-Version": "3.0.4",
580
+ "X-Fern-SDK-Version": "3.0.6",
581
581
  },
582
582
  contentType: "application/json",
583
583
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -636,7 +636,7 @@ class User {
636
636
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
637
637
  "X-Fern-Language": "JavaScript",
638
638
  "X-Fern-SDK-Name": "@tryvital/vital-node",
639
- "X-Fern-SDK-Version": "3.0.4",
639
+ "X-Fern-SDK-Version": "3.0.6",
640
640
  },
641
641
  contentType: "application/json",
642
642
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -73,7 +73,7 @@ class Vitals {
73
73
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "@tryvital/vital-node",
76
- "X-Fern-SDK-Version": "3.0.4",
76
+ "X-Fern-SDK-Version": "3.0.6",
77
77
  },
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
@@ -141,7 +141,7 @@ class Vitals {
141
141
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
142
142
  "X-Fern-Language": "JavaScript",
143
143
  "X-Fern-SDK-Name": "@tryvital/vital-node",
144
- "X-Fern-SDK-Version": "3.0.4",
144
+ "X-Fern-SDK-Version": "3.0.6",
145
145
  },
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
@@ -209,7 +209,7 @@ class Vitals {
209
209
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
210
210
  "X-Fern-Language": "JavaScript",
211
211
  "X-Fern-SDK-Name": "@tryvital/vital-node",
212
- "X-Fern-SDK-Version": "3.0.4",
212
+ "X-Fern-SDK-Version": "3.0.6",
213
213
  },
214
214
  contentType: "application/json",
215
215
  queryParameters: _queryParams,
@@ -277,7 +277,7 @@ class Vitals {
277
277
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
278
278
  "X-Fern-Language": "JavaScript",
279
279
  "X-Fern-SDK-Name": "@tryvital/vital-node",
280
- "X-Fern-SDK-Version": "3.0.4",
280
+ "X-Fern-SDK-Version": "3.0.6",
281
281
  },
282
282
  contentType: "application/json",
283
283
  queryParameters: _queryParams,
@@ -345,7 +345,7 @@ class Vitals {
345
345
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
346
346
  "X-Fern-Language": "JavaScript",
347
347
  "X-Fern-SDK-Name": "@tryvital/vital-node",
348
- "X-Fern-SDK-Version": "3.0.4",
348
+ "X-Fern-SDK-Version": "3.0.6",
349
349
  },
350
350
  contentType: "application/json",
351
351
  queryParameters: _queryParams,
@@ -413,7 +413,7 @@ class Vitals {
413
413
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
414
414
  "X-Fern-Language": "JavaScript",
415
415
  "X-Fern-SDK-Name": "@tryvital/vital-node",
416
- "X-Fern-SDK-Version": "3.0.4",
416
+ "X-Fern-SDK-Version": "3.0.6",
417
417
  },
418
418
  contentType: "application/json",
419
419
  queryParameters: _queryParams,
@@ -481,7 +481,7 @@ class Vitals {
481
481
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
482
482
  "X-Fern-Language": "JavaScript",
483
483
  "X-Fern-SDK-Name": "@tryvital/vital-node",
484
- "X-Fern-SDK-Version": "3.0.4",
484
+ "X-Fern-SDK-Version": "3.0.6",
485
485
  },
486
486
  contentType: "application/json",
487
487
  queryParameters: _queryParams,
@@ -549,7 +549,7 @@ class Vitals {
549
549
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
550
550
  "X-Fern-Language": "JavaScript",
551
551
  "X-Fern-SDK-Name": "@tryvital/vital-node",
552
- "X-Fern-SDK-Version": "3.0.4",
552
+ "X-Fern-SDK-Version": "3.0.6",
553
553
  },
554
554
  contentType: "application/json",
555
555
  queryParameters: _queryParams,
@@ -617,7 +617,7 @@ class Vitals {
617
617
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
618
618
  "X-Fern-Language": "JavaScript",
619
619
  "X-Fern-SDK-Name": "@tryvital/vital-node",
620
- "X-Fern-SDK-Version": "3.0.4",
620
+ "X-Fern-SDK-Version": "3.0.6",
621
621
  },
622
622
  contentType: "application/json",
623
623
  queryParameters: _queryParams,
@@ -685,7 +685,7 @@ class Vitals {
685
685
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
686
686
  "X-Fern-Language": "JavaScript",
687
687
  "X-Fern-SDK-Name": "@tryvital/vital-node",
688
- "X-Fern-SDK-Version": "3.0.4",
688
+ "X-Fern-SDK-Version": "3.0.6",
689
689
  },
690
690
  contentType: "application/json",
691
691
  queryParameters: _queryParams,
@@ -753,7 +753,7 @@ class Vitals {
753
753
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
754
754
  "X-Fern-Language": "JavaScript",
755
755
  "X-Fern-SDK-Name": "@tryvital/vital-node",
756
- "X-Fern-SDK-Version": "3.0.4",
756
+ "X-Fern-SDK-Version": "3.0.6",
757
757
  },
758
758
  contentType: "application/json",
759
759
  queryParameters: _queryParams,
@@ -821,7 +821,7 @@ class Vitals {
821
821
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
822
822
  "X-Fern-Language": "JavaScript",
823
823
  "X-Fern-SDK-Name": "@tryvital/vital-node",
824
- "X-Fern-SDK-Version": "3.0.4",
824
+ "X-Fern-SDK-Version": "3.0.6",
825
825
  },
826
826
  contentType: "application/json",
827
827
  queryParameters: _queryParams,
@@ -889,7 +889,7 @@ class Vitals {
889
889
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
890
890
  "X-Fern-Language": "JavaScript",
891
891
  "X-Fern-SDK-Name": "@tryvital/vital-node",
892
- "X-Fern-SDK-Version": "3.0.4",
892
+ "X-Fern-SDK-Version": "3.0.6",
893
893
  },
894
894
  contentType: "application/json",
895
895
  queryParameters: _queryParams,
@@ -957,7 +957,7 @@ class Vitals {
957
957
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
958
958
  "X-Fern-Language": "JavaScript",
959
959
  "X-Fern-SDK-Name": "@tryvital/vital-node",
960
- "X-Fern-SDK-Version": "3.0.4",
960
+ "X-Fern-SDK-Version": "3.0.6",
961
961
  },
962
962
  contentType: "application/json",
963
963
  queryParameters: _queryParams,
@@ -1025,7 +1025,7 @@ class Vitals {
1025
1025
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1026
1026
  "X-Fern-Language": "JavaScript",
1027
1027
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1028
- "X-Fern-SDK-Version": "3.0.4",
1028
+ "X-Fern-SDK-Version": "3.0.6",
1029
1029
  },
1030
1030
  contentType: "application/json",
1031
1031
  queryParameters: _queryParams,
@@ -1093,7 +1093,7 @@ class Vitals {
1093
1093
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1094
1094
  "X-Fern-Language": "JavaScript",
1095
1095
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1096
- "X-Fern-SDK-Version": "3.0.4",
1096
+ "X-Fern-SDK-Version": "3.0.6",
1097
1097
  },
1098
1098
  contentType: "application/json",
1099
1099
  queryParameters: _queryParams,
@@ -1161,7 +1161,7 @@ class Vitals {
1161
1161
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1162
1162
  "X-Fern-Language": "JavaScript",
1163
1163
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1164
- "X-Fern-SDK-Version": "3.0.4",
1164
+ "X-Fern-SDK-Version": "3.0.6",
1165
1165
  },
1166
1166
  contentType: "application/json",
1167
1167
  queryParameters: _queryParams,
@@ -1229,7 +1229,7 @@ class Vitals {
1229
1229
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1230
1230
  "X-Fern-Language": "JavaScript",
1231
1231
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1232
- "X-Fern-SDK-Version": "3.0.4",
1232
+ "X-Fern-SDK-Version": "3.0.6",
1233
1233
  },
1234
1234
  contentType: "application/json",
1235
1235
  queryParameters: _queryParams,
@@ -1297,7 +1297,7 @@ class Vitals {
1297
1297
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1298
1298
  "X-Fern-Language": "JavaScript",
1299
1299
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1300
- "X-Fern-SDK-Version": "3.0.4",
1300
+ "X-Fern-SDK-Version": "3.0.6",
1301
1301
  },
1302
1302
  contentType: "application/json",
1303
1303
  queryParameters: _queryParams,
@@ -1365,7 +1365,7 @@ class Vitals {
1365
1365
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1366
1366
  "X-Fern-Language": "JavaScript",
1367
1367
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1368
- "X-Fern-SDK-Version": "3.0.4",
1368
+ "X-Fern-SDK-Version": "3.0.6",
1369
1369
  },
1370
1370
  contentType: "application/json",
1371
1371
  queryParameters: _queryParams,
@@ -1433,7 +1433,7 @@ class Vitals {
1433
1433
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1434
1434
  "X-Fern-Language": "JavaScript",
1435
1435
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1436
- "X-Fern-SDK-Version": "3.0.4",
1436
+ "X-Fern-SDK-Version": "3.0.6",
1437
1437
  },
1438
1438
  contentType: "application/json",
1439
1439
  queryParameters: _queryParams,
@@ -1501,7 +1501,7 @@ class Vitals {
1501
1501
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1502
1502
  "X-Fern-Language": "JavaScript",
1503
1503
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1504
- "X-Fern-SDK-Version": "3.0.4",
1504
+ "X-Fern-SDK-Version": "3.0.6",
1505
1505
  },
1506
1506
  contentType: "application/json",
1507
1507
  queryParameters: _queryParams,
@@ -1569,7 +1569,7 @@ class Vitals {
1569
1569
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1570
1570
  "X-Fern-Language": "JavaScript",
1571
1571
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1572
- "X-Fern-SDK-Version": "3.0.4",
1572
+ "X-Fern-SDK-Version": "3.0.6",
1573
1573
  },
1574
1574
  contentType: "application/json",
1575
1575
  queryParameters: _queryParams,
@@ -73,7 +73,7 @@ class Workouts {
73
73
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "@tryvital/vital-node",
76
- "X-Fern-SDK-Version": "3.0.4",
76
+ "X-Fern-SDK-Version": "3.0.6",
77
77
  },
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
@@ -141,7 +141,7 @@ class Workouts {
141
141
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
142
142
  "X-Fern-Language": "JavaScript",
143
143
  "X-Fern-SDK-Name": "@tryvital/vital-node",
144
- "X-Fern-SDK-Version": "3.0.4",
144
+ "X-Fern-SDK-Version": "3.0.6",
145
145
  },
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
@@ -199,7 +199,7 @@ class Workouts {
199
199
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
200
200
  "X-Fern-Language": "JavaScript",
201
201
  "X-Fern-SDK-Name": "@tryvital/vital-node",
202
- "X-Fern-SDK-Version": "3.0.4",
202
+ "X-Fern-SDK-Version": "3.0.6",
203
203
  },
204
204
  contentType: "application/json",
205
205
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * An enumeration.
6
+ */
7
+ export declare type HistoricalPullStatus = "success" | "failure" | "in_progress";
8
+ export declare const HistoricalPullStatus: {
9
+ readonly Success: "success";
10
+ readonly Failure: "failure";
11
+ readonly InProgress: "in_progress";
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HistoricalPullStatus = void 0;
7
+ exports.HistoricalPullStatus = {
8
+ Success: "success",
9
+ Failure: "failure",
10
+ InProgress: "in_progress",
11
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface SingleHistoricalPullStatistics {
6
+ status: Vital.HistoricalPullStatus;
7
+ rangeStart?: Date;
8
+ rangeEnd?: Date;
9
+ daysWithData?: number;
10
+ release: string;
11
+ traceId?: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface SingleProviderHistoricalPullResponse {
6
+ pulled: Record<string, Vital.SingleHistoricalPullStatistics>;
7
+ notPulled: Vital.ClientFacingResource[];
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface SingleUserHistoricalPullResponse {
6
+ userId: string;
7
+ provider: Record<string, Vital.SingleProviderHistoricalPullResponse>;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Vital from "..";
4
5
  export interface SingleUserResourceResponse {
5
6
  userId: string;
7
+ provider: Record<string, Record<string, Vital.SingleResourceStatistics>>;
6
8
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "..";
5
+ export interface UserHistoricalPullsResponse {
6
+ data: Vital.SingleUserHistoricalPullResponse[];
7
+ next?: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -101,6 +101,7 @@ export * from "./HealthInsuranceCreateRequest";
101
101
  export * from "./HealthInsuranceCreateRequestFrontImage";
102
102
  export * from "./HealthInsuranceCreateRequestBackImage";
103
103
  export * from "./HealthInsuranceCreateRequestPatientSignatureImage";
104
+ export * from "./HistoricalPullStatus";
104
105
  export * from "./Jpeg";
105
106
  export * from "./LabResultsMetadata";
106
107
  export * from "./LabResultsRaw";
@@ -145,7 +146,10 @@ export * from "./Region";
145
146
  export * from "./ResponsibleRelationship";
146
147
  export * from "./ResultType";
147
148
  export * from "./ShippingAddress";
149
+ export * from "./SingleHistoricalPullStatistics";
150
+ export * from "./SingleProviderHistoricalPullResponse";
148
151
  export * from "./SingleResourceStatistics";
152
+ export * from "./SingleUserHistoricalPullResponse";
149
153
  export * from "./SingleUserResourceResponse";
150
154
  export * from "./SleepV2InDb";
151
155
  export * from "./Source";
@@ -156,6 +160,7 @@ export * from "./TeamConfig";
156
160
  export * from "./TimeSlot";
157
161
  export * from "./TimeseriesMetricPoint";
158
162
  export * from "./TimeseriesResource";
163
+ export * from "./UserHistoricalPullsResponse";
159
164
  export * from "./UserRefreshErrorResponse";
160
165
  export * from "./UserRefreshSuccessResponse";
161
166
  export * from "./UserResourcesResponse";
@@ -117,6 +117,7 @@ __exportStar(require("./HealthInsuranceCreateRequest"), exports);
117
117
  __exportStar(require("./HealthInsuranceCreateRequestFrontImage"), exports);
118
118
  __exportStar(require("./HealthInsuranceCreateRequestBackImage"), exports);
119
119
  __exportStar(require("./HealthInsuranceCreateRequestPatientSignatureImage"), exports);
120
+ __exportStar(require("./HistoricalPullStatus"), exports);
120
121
  __exportStar(require("./Jpeg"), exports);
121
122
  __exportStar(require("./LabResultsMetadata"), exports);
122
123
  __exportStar(require("./LabResultsRaw"), exports);
@@ -161,7 +162,10 @@ __exportStar(require("./Region"), exports);
161
162
  __exportStar(require("./ResponsibleRelationship"), exports);
162
163
  __exportStar(require("./ResultType"), exports);
163
164
  __exportStar(require("./ShippingAddress"), exports);
165
+ __exportStar(require("./SingleHistoricalPullStatistics"), exports);
166
+ __exportStar(require("./SingleProviderHistoricalPullResponse"), exports);
164
167
  __exportStar(require("./SingleResourceStatistics"), exports);
168
+ __exportStar(require("./SingleUserHistoricalPullResponse"), exports);
165
169
  __exportStar(require("./SingleUserResourceResponse"), exports);
166
170
  __exportStar(require("./SleepV2InDb"), exports);
167
171
  __exportStar(require("./Source"), exports);
@@ -172,6 +176,7 @@ __exportStar(require("./TeamConfig"), exports);
172
176
  __exportStar(require("./TimeSlot"), exports);
173
177
  __exportStar(require("./TimeseriesMetricPoint"), exports);
174
178
  __exportStar(require("./TimeseriesResource"), exports);
179
+ __exportStar(require("./UserHistoricalPullsResponse"), exports);
175
180
  __exportStar(require("./UserRefreshErrorResponse"), exports);
176
181
  __exportStar(require("./UserRefreshSuccessResponse"), exports);
177
182
  __exportStar(require("./UserResourcesResponse"), exports);
@@ -1,2 +1,3 @@
1
1
  export * from "./fetcher";
2
+ export * from "./streaming-fetcher";
2
3
  export * as serialization from "./schemas";
@@ -28,4 +28,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.serialization = void 0;
30
30
  __exportStar(require("./fetcher"), exports);
31
+ __exportStar(require("./streaming-fetcher"), exports);
31
32
  exports.serialization = __importStar(require("./schemas"));
@@ -0,0 +1,30 @@
1
+ /// <reference types="node" />
2
+ import { default as URLSearchParams } from "@ungap/url-search-params";
3
+ import { AxiosAdapter } from "axios";
4
+ import { Readable } from "stream";
5
+ export declare type StreamingFetchFunction = (args: StreamingFetcher.Args) => Promise<StreamingFetcher.Response>;
6
+ export declare namespace StreamingFetcher {
7
+ interface Args {
8
+ url: string;
9
+ method: string;
10
+ headers?: Record<string, string | undefined>;
11
+ queryParameters?: URLSearchParams;
12
+ body?: unknown;
13
+ timeoutMs?: number;
14
+ withCredentials?: boolean;
15
+ adapter?: AxiosAdapter;
16
+ onUploadProgress?: (event: ProgressEvent) => void;
17
+ onDownloadProgress?: (event: ProgressEvent) => void;
18
+ onData?: (data: unknown) => void;
19
+ onError?: (err: unknown) => void;
20
+ onFinish?: () => void;
21
+ abortController?: AbortController;
22
+ responseChunkPrefix?: string;
23
+ terminator?: string;
24
+ }
25
+ interface Response {
26
+ data: Readable;
27
+ headers: Record<string, any>;
28
+ }
29
+ }
30
+ export declare const streamingFetcher: StreamingFetchFunction;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.streamingFetcher = void 0;
16
+ const axios_1 = __importDefault(require("axios"));
17
+ const streamingFetcher = (args) => __awaiter(void 0, void 0, void 0, function* () {
18
+ var _a;
19
+ const headers = {};
20
+ if (args.body !== undefined) {
21
+ headers["Content-Type"] = "application/json";
22
+ }
23
+ if (args.headers != null) {
24
+ for (const [key, value] of Object.entries(args.headers)) {
25
+ if (value != null) {
26
+ headers[key] = value;
27
+ }
28
+ }
29
+ }
30
+ const response = yield (0, axios_1.default)({
31
+ url: args.url,
32
+ params: args.queryParameters,
33
+ method: args.method,
34
+ headers,
35
+ data: args.body,
36
+ timeout: args.timeoutMs,
37
+ transitional: {
38
+ clarifyTimeoutError: true,
39
+ },
40
+ withCredentials: args.withCredentials,
41
+ maxBodyLength: Infinity,
42
+ maxContentLength: Infinity,
43
+ onUploadProgress: args.onUploadProgress,
44
+ onDownloadProgress: args.onDownloadProgress,
45
+ signal: (_a = args.abortController) === null || _a === void 0 ? void 0 : _a.signal,
46
+ responseType: "stream",
47
+ adapter: args.adapter,
48
+ });
49
+ if (args.onData != null) {
50
+ const { onData } = args;
51
+ response.data.on("data", (data) => {
52
+ var _a;
53
+ for (const line of data.toString().split("\n")) {
54
+ let data = line;
55
+ if (args.responseChunkPrefix != null) {
56
+ if (!data.startsWith(args.responseChunkPrefix)) {
57
+ continue;
58
+ }
59
+ data = data.substring(args.responseChunkPrefix.length);
60
+ }
61
+ try {
62
+ const parsed = JSON.parse(data);
63
+ onData(parsed);
64
+ }
65
+ catch (error) {
66
+ (_a = args.onError) === null || _a === void 0 ? void 0 : _a.call(args, error);
67
+ }
68
+ }
69
+ });
70
+ }
71
+ if (args.onFinish != null) {
72
+ response.data.on("end", args.onFinish);
73
+ }
74
+ return {
75
+ data: response.data,
76
+ headers: response.headers,
77
+ };
78
+ });
79
+ exports.streamingFetcher = streamingFetcher;
@@ -0,0 +1,2 @@
1
+ import { StreamingFetcher } from "./StreamingFetcher";
2
+ export declare function getHeader(response: StreamingFetcher.Response, header: string): string | undefined;