@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.
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/introspect/client/Client.d.ts +4 -0
- package/api/resources/introspect/client/Client.js +73 -1
- package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
- package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
- package/api/resources/introspect/client/requests/index.d.ts +1 -0
- package/api/resources/labTests/client/Client.d.ts +3 -2
- package/api/resources/labTests/client/Client.js +29 -57
- package/api/resources/link/client/Client.d.ts +3 -3
- package/api/resources/link/client/Client.js +23 -51
- package/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
- package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
- package/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
- package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
- package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
- package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
- package/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.js +4 -4
- package/api/resources/team/client/Client.d.ts +1 -1
- package/api/resources/team/client/Client.js +9 -13
- package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +11 -11
- package/api/resources/vitals/client/Client.js +23 -23
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/HistoricalPullStatus.d.ts +12 -0
- package/api/types/HistoricalPullStatus.js +11 -0
- package/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
- package/api/types/SingleHistoricalPullStatistics.js +5 -0
- package/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
- package/api/types/SingleProviderHistoricalPullResponse.js +5 -0
- package/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
- package/api/types/SingleUserHistoricalPullResponse.js +5 -0
- package/api/types/SingleUserResourceResponse.d.ts +2 -0
- package/api/types/UserHistoricalPullsResponse.d.ts +8 -0
- package/api/types/UserHistoricalPullsResponse.js +5 -0
- package/api/types/index.d.ts +5 -0
- package/api/types/index.js +5 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
- package/core/streaming-fetcher/StreamingFetcher.js +79 -0
- package/core/streaming-fetcher/getHeader.d.ts +2 -0
- package/core/streaming-fetcher/getHeader.js +12 -0
- package/core/streaming-fetcher/index.d.ts +3 -0
- package/core/streaming-fetcher/index.js +7 -0
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/introspect/client/Client.d.ts +4 -0
- package/dist/api/resources/introspect/client/Client.js +73 -1
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
- package/dist/api/resources/introspect/client/requests/index.d.ts +1 -0
- package/dist/api/resources/labTests/client/Client.d.ts +3 -2
- package/dist/api/resources/labTests/client/Client.js +29 -57
- package/dist/api/resources/link/client/Client.d.ts +3 -3
- package/dist/api/resources/link/client/Client.js +23 -51
- package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
- package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
- package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
- package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
- package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
- package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
- package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.js +4 -4
- package/dist/api/resources/team/client/Client.d.ts +1 -1
- package/dist/api/resources/team/client/Client.js +9 -13
- package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +11 -11
- package/dist/api/resources/vitals/client/Client.js +23 -23
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/HistoricalPullStatus.d.ts +12 -0
- package/dist/api/types/HistoricalPullStatus.js +11 -0
- package/dist/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
- package/dist/api/types/SingleHistoricalPullStatistics.js +5 -0
- package/dist/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
- package/dist/api/types/SingleProviderHistoricalPullResponse.js +5 -0
- package/dist/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
- package/dist/api/types/SingleUserHistoricalPullResponse.js +5 -0
- package/dist/api/types/SingleUserResourceResponse.d.ts +2 -0
- package/dist/api/types/UserHistoricalPullsResponse.d.ts +8 -0
- package/dist/api/types/UserHistoricalPullsResponse.js +5 -0
- package/dist/api/types/index.d.ts +5 -0
- package/dist/api/types/index.js +5 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
- package/dist/core/streaming-fetcher/StreamingFetcher.js +79 -0
- package/dist/core/streaming-fetcher/getHeader.d.ts +2 -0
- package/dist/core/streaming-fetcher/getHeader.js +12 -0
- package/dist/core/streaming-fetcher/index.d.ts +3 -0
- package/dist/core/streaming-fetcher/index.js +7 -0
- package/dist/serialization/types/HistoricalPullStatus.d.ts +10 -0
- package/dist/serialization/types/HistoricalPullStatus.js +31 -0
- package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
- package/dist/serialization/types/SingleHistoricalPullStatistics.js +47 -0
- package/dist/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
- package/dist/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
- package/dist/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
- package/dist/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
- package/dist/serialization/types/SingleUserResourceResponse.d.ts +1 -0
- package/dist/serialization/types/SingleUserResourceResponse.js +10 -0
- package/dist/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
- package/dist/serialization/types/UserHistoricalPullsResponse.js +43 -0
- package/dist/serialization/types/index.d.ts +5 -0
- package/dist/serialization/types/index.js +5 -0
- package/package.json +1 -1
- package/serialization/types/HistoricalPullStatus.d.ts +10 -0
- package/serialization/types/HistoricalPullStatus.js +31 -0
- package/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
- package/serialization/types/SingleHistoricalPullStatistics.js +47 -0
- package/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
- package/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
- package/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
- package/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
- package/serialization/types/SingleUserResourceResponse.d.ts +1 -0
- package/serialization/types/SingleUserResourceResponse.js +10 -0
- package/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
- package/serialization/types/UserHistoricalPullsResponse.js +43 -0
- package/serialization/types/index.d.ts +5 -0
- 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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
+
}
|
@@ -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<
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
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
|
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
|
83
|
+
getAllProviders(request?: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
|
84
84
|
/**
|
85
85
|
* REQUEST_SOURCE: CUSTOMER
|
86
86
|
* PROVIDER_TYPE: MANUAL-PROVIDER
|