@tryvital/vital-node 3.0.5 → 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 (133) 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/IntrospectGetUserHistoricalPullsRequest.js +5 -0
  9. package/api/resources/introspect/client/requests/index.d.ts +1 -0
  10. package/api/resources/labTests/client/Client.d.ts +3 -2
  11. package/api/resources/labTests/client/Client.js +29 -57
  12. package/api/resources/link/client/Client.d.ts +3 -3
  13. package/api/resources/link/client/Client.js +23 -51
  14. package/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  15. package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  16. package/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  17. package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
  18. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
  19. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
  20. package/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  21. package/api/resources/meal/client/Client.js +1 -1
  22. package/api/resources/profile/client/Client.js +2 -2
  23. package/api/resources/providers/client/Client.js +1 -1
  24. package/api/resources/sleep/client/Client.js +4 -4
  25. package/api/resources/team/client/Client.d.ts +1 -1
  26. package/api/resources/team/client/Client.js +9 -13
  27. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
  28. package/api/resources/testkit/client/Client.js +2 -2
  29. package/api/resources/user/client/Client.js +11 -11
  30. package/api/resources/vitals/client/Client.js +23 -23
  31. package/api/resources/workouts/client/Client.js +3 -3
  32. package/api/types/HistoricalPullStatus.d.ts +12 -0
  33. package/api/types/HistoricalPullStatus.js +11 -0
  34. package/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  35. package/api/types/SingleHistoricalPullStatistics.js +5 -0
  36. package/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  37. package/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  38. package/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  39. package/api/types/SingleUserHistoricalPullResponse.js +5 -0
  40. package/api/types/SingleUserResourceResponse.d.ts +2 -0
  41. package/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  42. package/api/types/UserHistoricalPullsResponse.js +5 -0
  43. package/api/types/index.d.ts +5 -0
  44. package/api/types/index.js +5 -0
  45. package/core/index.d.ts +1 -0
  46. package/core/index.js +1 -0
  47. package/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  48. package/core/streaming-fetcher/StreamingFetcher.js +79 -0
  49. package/core/streaming-fetcher/getHeader.d.ts +2 -0
  50. package/core/streaming-fetcher/getHeader.js +12 -0
  51. package/core/streaming-fetcher/index.d.ts +3 -0
  52. package/core/streaming-fetcher/index.js +7 -0
  53. package/dist/api/resources/activity/client/Client.js +2 -2
  54. package/dist/api/resources/body/client/Client.js +2 -2
  55. package/dist/api/resources/devices/client/Client.js +1 -1
  56. package/dist/api/resources/insurance/client/Client.js +2 -2
  57. package/dist/api/resources/introspect/client/Client.d.ts +4 -0
  58. package/dist/api/resources/introspect/client/Client.js +73 -1
  59. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
  60. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
  61. package/dist/api/resources/introspect/client/requests/index.d.ts +1 -0
  62. package/dist/api/resources/labTests/client/Client.d.ts +3 -2
  63. package/dist/api/resources/labTests/client/Client.js +29 -57
  64. package/dist/api/resources/link/client/Client.d.ts +3 -3
  65. package/dist/api/resources/link/client/Client.js +23 -51
  66. package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  67. package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  68. package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  69. package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
  70. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
  71. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
  72. package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  73. package/dist/api/resources/meal/client/Client.js +1 -1
  74. package/dist/api/resources/profile/client/Client.js +2 -2
  75. package/dist/api/resources/providers/client/Client.js +1 -1
  76. package/dist/api/resources/sleep/client/Client.js +4 -4
  77. package/dist/api/resources/team/client/Client.d.ts +1 -1
  78. package/dist/api/resources/team/client/Client.js +9 -13
  79. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
  80. package/dist/api/resources/testkit/client/Client.js +2 -2
  81. package/dist/api/resources/user/client/Client.js +11 -11
  82. package/dist/api/resources/vitals/client/Client.js +23 -23
  83. package/dist/api/resources/workouts/client/Client.js +3 -3
  84. package/dist/api/types/HistoricalPullStatus.d.ts +12 -0
  85. package/dist/api/types/HistoricalPullStatus.js +11 -0
  86. package/dist/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  87. package/dist/api/types/SingleHistoricalPullStatistics.js +5 -0
  88. package/dist/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  89. package/dist/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  90. package/dist/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  91. package/dist/api/types/SingleUserHistoricalPullResponse.js +5 -0
  92. package/dist/api/types/SingleUserResourceResponse.d.ts +2 -0
  93. package/dist/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  94. package/dist/api/types/UserHistoricalPullsResponse.js +5 -0
  95. package/dist/api/types/index.d.ts +5 -0
  96. package/dist/api/types/index.js +5 -0
  97. package/dist/core/index.d.ts +1 -0
  98. package/dist/core/index.js +1 -0
  99. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  100. package/dist/core/streaming-fetcher/StreamingFetcher.js +79 -0
  101. package/dist/core/streaming-fetcher/getHeader.d.ts +2 -0
  102. package/dist/core/streaming-fetcher/getHeader.js +12 -0
  103. package/dist/core/streaming-fetcher/index.d.ts +3 -0
  104. package/dist/core/streaming-fetcher/index.js +7 -0
  105. package/dist/serialization/types/HistoricalPullStatus.d.ts +10 -0
  106. package/dist/serialization/types/HistoricalPullStatus.js +31 -0
  107. package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  108. package/dist/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  109. package/dist/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  110. package/dist/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  111. package/dist/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  112. package/dist/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  113. package/dist/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  114. package/dist/serialization/types/SingleUserResourceResponse.js +10 -0
  115. package/dist/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  116. package/dist/serialization/types/UserHistoricalPullsResponse.js +43 -0
  117. package/dist/serialization/types/index.d.ts +5 -0
  118. package/dist/serialization/types/index.js +5 -0
  119. package/package.json +1 -1
  120. package/serialization/types/HistoricalPullStatus.d.ts +10 -0
  121. package/serialization/types/HistoricalPullStatus.js +31 -0
  122. package/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  123. package/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  124. package/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  125. package/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  126. package/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  127. package/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  128. package/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  129. package/serialization/types/SingleUserResourceResponse.js +10 -0
  130. package/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  131. package/serialization/types/UserHistoricalPullsResponse.js +43 -0
  132. package/serialization/types/index.d.ts +5 -0
  133. package/serialization/types/index.js +5 -0
@@ -73,7 +73,7 @@ class Activity {
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.5",
76
+ "X-Fern-SDK-Version": "3.0.6",
77
77
  },
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
@@ -141,7 +141,7 @@ class Activity {
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.5",
144
+ "X-Fern-SDK-Version": "3.0.6",
145
145
  },
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
@@ -73,7 +73,7 @@ class Body {
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.5",
76
+ "X-Fern-SDK-Version": "3.0.6",
77
77
  },
78
78
  contentType: "application/json",
79
79
  queryParameters: _queryParams,
@@ -141,7 +141,7 @@ class Body {
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.5",
144
+ "X-Fern-SDK-Version": "3.0.6",
145
145
  },
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
@@ -69,7 +69,7 @@ class Devices {
69
69
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "@tryvital/vital-node",
72
- "X-Fern-SDK-Version": "3.0.5",
72
+ "X-Fern-SDK-Version": "3.0.6",
73
73
  },
74
74
  contentType: "application/json",
75
75
  queryParameters: _queryParams,
@@ -63,7 +63,7 @@ class Insurance {
63
63
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@tryvital/vital-node",
66
- "X-Fern-SDK-Version": "3.0.5",
66
+ "X-Fern-SDK-Version": "3.0.6",
67
67
  },
68
68
  contentType: "application/json",
69
69
  body: yield serializers.PayorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -124,7 +124,7 @@ class Insurance {
124
124
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
125
125
  "X-Fern-Language": "JavaScript",
126
126
  "X-Fern-SDK-Name": "@tryvital/vital-node",
127
- "X-Fern-SDK-Version": "3.0.5",
127
+ "X-Fern-SDK-Version": "3.0.6",
128
128
  },
129
129
  contentType: "application/json",
130
130
  queryParameters: _queryParams,
@@ -20,4 +20,8 @@ export declare class Introspect {
20
20
  * @throws {@link Vital.UnprocessableEntityError}
21
21
  */
22
22
  getUserResources(request?: Vital.IntrospectGetUserResourcesRequest, requestOptions?: Introspect.RequestOptions): Promise<Vital.UserResourcesResponse>;
23
+ /**
24
+ * @throws {@link Vital.UnprocessableEntityError}
25
+ */
26
+ getUserHistoricalPulls(request?: Vital.IntrospectGetUserHistoricalPullsRequest, requestOptions?: Introspect.RequestOptions): Promise<Vital.UserHistoricalPullsResponse>;
23
27
  }
@@ -77,7 +77,7 @@ class Introspect {
77
77
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
78
78
  "X-Fern-Language": "JavaScript",
79
79
  "X-Fern-SDK-Name": "@tryvital/vital-node",
80
- "X-Fern-SDK-Version": "3.0.5",
80
+ "X-Fern-SDK-Version": "3.0.6",
81
81
  },
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
@@ -122,5 +122,77 @@ class Introspect {
122
122
  }
123
123
  });
124
124
  }
125
+ /**
126
+ * @throws {@link Vital.UnprocessableEntityError}
127
+ */
128
+ getUserHistoricalPulls(request = {}, requestOptions) {
129
+ var _a;
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ const { userId, provider, userLimit, cursor } = request;
132
+ const _queryParams = new url_search_params_1.default();
133
+ if (userId != null) {
134
+ _queryParams.append("user_id", userId);
135
+ }
136
+ if (provider != null) {
137
+ _queryParams.append("provider", provider);
138
+ }
139
+ if (userLimit != null) {
140
+ _queryParams.append("user_limit", userLimit.toString());
141
+ }
142
+ if (cursor != null) {
143
+ _queryParams.append("cursor", cursor);
144
+ }
145
+ const _response = yield core.fetcher({
146
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/historical_pull"),
147
+ method: "GET",
148
+ headers: {
149
+ "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
150
+ "X-Fern-Language": "JavaScript",
151
+ "X-Fern-SDK-Name": "@tryvital/vital-node",
152
+ "X-Fern-SDK-Version": "3.0.6",
153
+ },
154
+ contentType: "application/json",
155
+ queryParameters: _queryParams,
156
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
157
+ });
158
+ if (_response.ok) {
159
+ return yield serializers.UserHistoricalPullsResponse.parseOrThrow(_response.body, {
160
+ unrecognizedObjectKeys: "passthrough",
161
+ allowUnrecognizedUnionMembers: true,
162
+ allowUnrecognizedEnumValues: true,
163
+ breadcrumbsPrefix: ["response"],
164
+ });
165
+ }
166
+ if (_response.error.reason === "status-code") {
167
+ switch (_response.error.statusCode) {
168
+ case 422:
169
+ throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
170
+ unrecognizedObjectKeys: "passthrough",
171
+ allowUnrecognizedUnionMembers: true,
172
+ allowUnrecognizedEnumValues: true,
173
+ breadcrumbsPrefix: ["response"],
174
+ }));
175
+ default:
176
+ throw new errors.VitalError({
177
+ statusCode: _response.error.statusCode,
178
+ body: _response.error.body,
179
+ });
180
+ }
181
+ }
182
+ switch (_response.error.reason) {
183
+ case "non-json":
184
+ throw new errors.VitalError({
185
+ statusCode: _response.error.statusCode,
186
+ body: _response.error.rawBody,
187
+ });
188
+ case "timeout":
189
+ throw new errors.VitalTimeoutError();
190
+ case "unknown":
191
+ throw new errors.VitalError({
192
+ message: _response.error.errorMessage,
193
+ });
194
+ }
195
+ });
196
+ }
125
197
  }
126
198
  exports.Introspect = Introspect;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../../../..";
5
+ export interface IntrospectGetUserHistoricalPullsRequest {
6
+ userId?: string;
7
+ provider?: Vital.Providers;
8
+ userLimit?: number;
9
+ cursor?: string;
10
+ }
@@ -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 +1,2 @@
1
1
  export { IntrospectGetUserResourcesRequest } from "./IntrospectGetUserResourcesRequest";
2
+ export { IntrospectGetUserHistoricalPullsRequest } from "./IntrospectGetUserHistoricalPullsRequest";
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /// <reference types="node" />
4
5
  import * as environments from "../../../../environments";
5
6
  import * as core from "../../../../core";
6
7
  import * as Vital from "../../..";
8
+ import * as stream from "stream";
7
9
  export declare namespace LabTests {
8
10
  interface Options {
9
11
  environment?: core.Supplier<environments.VitalEnvironment | string>;
@@ -87,9 +89,8 @@ export declare class LabTests {
87
89
  getAreaInfo(request: Vital.LabTestsGetAreaInfoRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.AreaInfo>;
88
90
  /**
89
91
  * This endpoint returns the lab results for the order.
90
- * @throws {@link Vital.UnprocessableEntityError}
91
92
  */
92
- getResultPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<unknown>;
93
+ getResultPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<stream.Readable>;
93
94
  /**
94
95
  * Return metadata related to order results, such as lab metadata,
95
96
  * provider and sample dates.
@@ -63,7 +63,7 @@ class LabTests {
63
63
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@tryvital/vital-node",
66
- "X-Fern-SDK-Version": "3.0.5",
66
+ "X-Fern-SDK-Version": "3.0.6",
67
67
  },
68
68
  contentType: "application/json",
69
69
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -110,7 +110,7 @@ class LabTests {
110
110
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
111
111
  "X-Fern-Language": "JavaScript",
112
112
  "X-Fern-SDK-Name": "@tryvital/vital-node",
113
- "X-Fern-SDK-Version": "3.0.5",
113
+ "X-Fern-SDK-Version": "3.0.6",
114
114
  },
115
115
  contentType: "application/json",
116
116
  body: yield serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -190,7 +190,7 @@ class LabTests {
190
190
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
191
191
  "X-Fern-Language": "JavaScript",
192
192
  "X-Fern-SDK-Name": "@tryvital/vital-node",
193
- "X-Fern-SDK-Version": "3.0.5",
193
+ "X-Fern-SDK-Version": "3.0.6",
194
194
  },
195
195
  contentType: "application/json",
196
196
  queryParameters: _queryParams,
@@ -256,7 +256,7 @@ class LabTests {
256
256
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
257
257
  "X-Fern-Language": "JavaScript",
258
258
  "X-Fern-SDK-Name": "@tryvital/vital-node",
259
- "X-Fern-SDK-Version": "3.0.5",
259
+ "X-Fern-SDK-Version": "3.0.6",
260
260
  },
261
261
  contentType: "application/json",
262
262
  queryParameters: _queryParams,
@@ -315,7 +315,7 @@ class LabTests {
315
315
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
316
316
  "X-Fern-Language": "JavaScript",
317
317
  "X-Fern-SDK-Name": "@tryvital/vital-node",
318
- "X-Fern-SDK-Version": "3.0.5",
318
+ "X-Fern-SDK-Version": "3.0.6",
319
319
  },
320
320
  contentType: "application/json",
321
321
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -372,7 +372,7 @@ class LabTests {
372
372
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
373
373
  "X-Fern-Language": "JavaScript",
374
374
  "X-Fern-SDK-Name": "@tryvital/vital-node",
375
- "X-Fern-SDK-Version": "3.0.5",
375
+ "X-Fern-SDK-Version": "3.0.6",
376
376
  },
377
377
  contentType: "application/json",
378
378
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -420,7 +420,7 @@ class LabTests {
420
420
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
421
421
  "X-Fern-Language": "JavaScript",
422
422
  "X-Fern-SDK-Name": "@tryvital/vital-node",
423
- "X-Fern-SDK-Version": "3.0.5",
423
+ "X-Fern-SDK-Version": "3.0.6",
424
424
  },
425
425
  contentType: "application/json",
426
426
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -479,7 +479,7 @@ class LabTests {
479
479
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
480
480
  "X-Fern-Language": "JavaScript",
481
481
  "X-Fern-SDK-Name": "@tryvital/vital-node",
482
- "X-Fern-SDK-Version": "3.0.5",
482
+ "X-Fern-SDK-Version": "3.0.6",
483
483
  },
484
484
  contentType: "application/json",
485
485
  body: yield serializers.UsAddress.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -538,7 +538,7 @@ class LabTests {
538
538
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
539
539
  "X-Fern-Language": "JavaScript",
540
540
  "X-Fern-SDK-Name": "@tryvital/vital-node",
541
- "X-Fern-SDK-Version": "3.0.5",
541
+ "X-Fern-SDK-Version": "3.0.6",
542
542
  },
543
543
  contentType: "application/json",
544
544
  body: yield serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -597,7 +597,7 @@ class LabTests {
597
597
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
598
598
  "X-Fern-Language": "JavaScript",
599
599
  "X-Fern-SDK-Name": "@tryvital/vital-node",
600
- "X-Fern-SDK-Version": "3.0.5",
600
+ "X-Fern-SDK-Version": "3.0.6",
601
601
  },
602
602
  contentType: "application/json",
603
603
  body: yield serializers.AppointmentRescheduleRequest.jsonOrThrow(request, {
@@ -658,7 +658,7 @@ class LabTests {
658
658
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
659
659
  "X-Fern-Language": "JavaScript",
660
660
  "X-Fern-SDK-Name": "@tryvital/vital-node",
661
- "X-Fern-SDK-Version": "3.0.5",
661
+ "X-Fern-SDK-Version": "3.0.6",
662
662
  },
663
663
  contentType: "application/json",
664
664
  body: yield serializers.AppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -716,7 +716,7 @@ class LabTests {
716
716
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
717
717
  "X-Fern-Language": "JavaScript",
718
718
  "X-Fern-SDK-Name": "@tryvital/vital-node",
719
- "X-Fern-SDK-Version": "3.0.5",
719
+ "X-Fern-SDK-Version": "3.0.6",
720
720
  },
721
721
  contentType: "application/json",
722
722
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -764,7 +764,7 @@ class LabTests {
764
764
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
765
765
  "X-Fern-Language": "JavaScript",
766
766
  "X-Fern-SDK-Name": "@tryvital/vital-node",
767
- "X-Fern-SDK-Version": "3.0.5",
767
+ "X-Fern-SDK-Version": "3.0.6",
768
768
  },
769
769
  contentType: "application/json",
770
770
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -828,7 +828,7 @@ class LabTests {
828
828
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
829
829
  "X-Fern-Language": "JavaScript",
830
830
  "X-Fern-SDK-Name": "@tryvital/vital-node",
831
- "X-Fern-SDK-Version": "3.0.5",
831
+ "X-Fern-SDK-Version": "3.0.6",
832
832
  },
833
833
  contentType: "application/json",
834
834
  queryParameters: _queryParams,
@@ -875,55 +875,27 @@ class LabTests {
875
875
  }
876
876
  /**
877
877
  * This endpoint returns the lab results for the order.
878
- * @throws {@link Vital.UnprocessableEntityError}
879
878
  */
880
879
  getResultPdf(orderId, requestOptions) {
881
880
  var _a;
882
881
  return __awaiter(this, void 0, void 0, function* () {
883
- const _response = yield core.fetcher({
882
+ const _response = yield core.streamingFetcher({
884
883
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/order/${orderId}/result/pdf`),
885
884
  method: "GET",
886
885
  headers: {
887
886
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
888
887
  "X-Fern-Language": "JavaScript",
889
888
  "X-Fern-SDK-Name": "@tryvital/vital-node",
890
- "X-Fern-SDK-Version": "3.0.5",
889
+ "X-Fern-SDK-Version": "3.0.6",
891
890
  },
892
- contentType: "application/json",
893
891
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
894
- });
895
- if (_response.ok) {
896
- return _response.body;
897
- }
898
- if (_response.error.reason === "status-code") {
899
- switch (_response.error.statusCode) {
900
- case 422:
901
- throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
902
- unrecognizedObjectKeys: "passthrough",
903
- allowUnrecognizedUnionMembers: true,
904
- allowUnrecognizedEnumValues: true,
905
- breadcrumbsPrefix: ["response"],
906
- }));
907
- default:
908
- throw new errors.VitalError({
909
- statusCode: _response.error.statusCode,
910
- body: _response.error.body,
911
- });
912
- }
913
- }
914
- switch (_response.error.reason) {
915
- case "non-json":
916
- throw new errors.VitalError({
917
- statusCode: _response.error.statusCode,
918
- body: _response.error.rawBody,
919
- });
920
- case "timeout":
921
- throw new errors.VitalTimeoutError();
922
- case "unknown":
892
+ onError: (error) => {
923
893
  throw new errors.VitalError({
924
- message: _response.error.errorMessage,
894
+ message: error === null || error === void 0 ? void 0 : error.message,
925
895
  });
926
- }
896
+ },
897
+ });
898
+ return _response.data;
927
899
  });
928
900
  }
929
901
  /**
@@ -941,7 +913,7 @@ class LabTests {
941
913
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
942
914
  "X-Fern-Language": "JavaScript",
943
915
  "X-Fern-SDK-Name": "@tryvital/vital-node",
944
- "X-Fern-SDK-Version": "3.0.5",
916
+ "X-Fern-SDK-Version": "3.0.6",
945
917
  },
946
918
  contentType: "application/json",
947
919
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -999,7 +971,7 @@ class LabTests {
999
971
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1000
972
  "X-Fern-Language": "JavaScript",
1001
973
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1002
- "X-Fern-SDK-Version": "3.0.5",
974
+ "X-Fern-SDK-Version": "3.0.6",
1003
975
  },
1004
976
  contentType: "application/json",
1005
977
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1057,7 +1029,7 @@ class LabTests {
1057
1029
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1058
1030
  "X-Fern-Language": "JavaScript",
1059
1031
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1060
- "X-Fern-SDK-Version": "3.0.5",
1032
+ "X-Fern-SDK-Version": "3.0.6",
1061
1033
  },
1062
1034
  contentType: "application/json",
1063
1035
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1110,7 +1082,7 @@ class LabTests {
1110
1082
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1111
1083
  "X-Fern-Language": "JavaScript",
1112
1084
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1113
- "X-Fern-SDK-Version": "3.0.5",
1085
+ "X-Fern-SDK-Version": "3.0.6",
1114
1086
  },
1115
1087
  contentType: "application/json",
1116
1088
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1168,7 +1140,7 @@ class LabTests {
1168
1140
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1169
1141
  "X-Fern-Language": "JavaScript",
1170
1142
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1171
- "X-Fern-SDK-Version": "3.0.5",
1143
+ "X-Fern-SDK-Version": "3.0.6",
1172
1144
  },
1173
1145
  contentType: "application/json",
1174
1146
  body: yield serializers.CreateOrderRequestCompatible.jsonOrThrow(request, {
@@ -1229,7 +1201,7 @@ class LabTests {
1229
1201
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1230
1202
  "X-Fern-Language": "JavaScript",
1231
1203
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1232
- "X-Fern-SDK-Version": "3.0.5",
1204
+ "X-Fern-SDK-Version": "3.0.6",
1233
1205
  },
1234
1206
  contentType: "application/json",
1235
1207
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1295,7 +1267,7 @@ class LabTests {
1295
1267
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1296
1268
  "X-Fern-Language": "JavaScript",
1297
1269
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1298
- "X-Fern-SDK-Version": "3.0.5",
1270
+ "X-Fern-SDK-Version": "3.0.6",
1299
1271
  },
1300
1272
  contentType: "application/json",
1301
1273
  queryParameters: _queryParams,
@@ -1379,7 +1351,7 @@ class LabTests {
1379
1351
  "x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
1380
1352
  "X-Fern-Language": "JavaScript",
1381
1353
  "X-Fern-SDK-Name": "@tryvital/vital-node",
1382
- "X-Fern-SDK-Version": "3.0.5",
1354
+ "X-Fern-SDK-Version": "3.0.6",
1383
1355
  },
1384
1356
  contentType: "application/json",
1385
1357
  queryParameters: _queryParams,
@@ -46,7 +46,7 @@ export declare class Link {
46
46
  * Check link token state - can be hit continuously used as heartbeat
47
47
  * @throws {@link Vital.UnprocessableEntityError}
48
48
  */
49
- tokenState(request: Vital.LinkTokenStateRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
49
+ tokenState(request?: Vital.LinkTokenStateRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
50
50
  /**
51
51
  * REQUEST_SOURCE: VITAL-LINK
52
52
  * PROVIDER_TYPE: EMAIL-AUTH
@@ -65,7 +65,7 @@ export declare class Link {
65
65
  * This endpoint generates an OAuth link for oauth provider
66
66
  * @throws {@link Vital.UnprocessableEntityError}
67
67
  */
68
- generateOauthLink(oauthProvider: Vital.OAuthProviders, request: Vital.LinkGenerateOauthLinkRequest, requestOptions?: Link.RequestOptions): Promise<Vital.Source>;
68
+ generateOauthLink(oauthProvider: Vital.OAuthProviders, request?: Vital.LinkGenerateOauthLinkRequest, requestOptions?: Link.RequestOptions): Promise<Vital.Source>;
69
69
  /**
70
70
  * This connects auth providers that are password based.
71
71
  * @throws {@link Vital.UnprocessableEntityError}
@@ -80,7 +80,7 @@ export declare class Link {
80
80
  * GET List of all available providers given the generated link token.
81
81
  * @throws {@link Vital.UnprocessableEntityError}
82
82
  */
83
- getAllProviders(request: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
83
+ getAllProviders(request?: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
84
84
  /**
85
85
  * REQUEST_SOURCE: CUSTOMER
86
86
  * PROVIDER_TYPE: MANUAL-PROVIDER