@tryvital/vital-node 3.1.27 → 3.1.29
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.js +2 -2
- package/api/resources/labTests/client/Client.d.ts +17 -0
- package/api/resources/labTests/client/Client.js +149 -26
- package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.d.ts +20 -0
- package/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.js +5 -0
- package/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/api/resources/link/client/Client.js +14 -14
- 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.js +7 -7
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +12 -12
- package/api/resources/vitals/client/Client.js +52 -52
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/PscAreaInfo.d.ts +1 -1
- package/api/types/PscAreaInfoDetails.d.ts +7 -0
- package/api/types/PscAreaInfoDetails.js +5 -0
- package/api/types/PscInfo.d.ts +8 -0
- package/api/types/PscInfo.js +5 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -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.js +2 -2
- package/dist/api/resources/labTests/client/Client.d.ts +17 -0
- package/dist/api/resources/labTests/client/Client.js +149 -26
- package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.d.ts +20 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetPscInfoRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -0
- package/dist/api/resources/link/client/Client.js +14 -14
- 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.js +7 -7
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +12 -12
- package/dist/api/resources/vitals/client/Client.js +52 -52
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/PscAreaInfo.d.ts +1 -1
- package/dist/api/types/PscAreaInfoDetails.d.ts +7 -0
- package/dist/api/types/PscAreaInfoDetails.js +5 -0
- package/dist/api/types/PscInfo.d.ts +8 -0
- package/dist/api/types/PscInfo.js +5 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/types/PscAreaInfo.d.ts +2 -2
- package/dist/serialization/types/PscAreaInfo.js +2 -2
- package/dist/serialization/types/PscAreaInfoDetails.d.ts +13 -0
- package/dist/serialization/types/PscAreaInfoDetails.js +34 -0
- package/dist/serialization/types/PscInfo.d.ts +14 -0
- package/dist/serialization/types/PscInfo.js +35 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/package.json +1 -1
- package/serialization/types/PscAreaInfo.d.ts +2 -2
- package/serialization/types/PscAreaInfo.js +2 -2
- package/serialization/types/PscAreaInfoDetails.d.ts +13 -0
- package/serialization/types/PscAreaInfoDetails.js +34 -0
- package/serialization/types/PscInfo.d.ts +14 -0
- package/serialization/types/PscInfo.js +35 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
package/api/types/index.js
CHANGED
@@ -171,6 +171,8 @@ __exportStar(require("./OAuthProviders"), exports);
|
|
171
171
|
__exportStar(require("./OrderStatus"), exports);
|
172
172
|
__exportStar(require("./OrderTopLevelStatus"), exports);
|
173
173
|
__exportStar(require("./PscAreaInfo"), exports);
|
174
|
+
__exportStar(require("./PscAreaInfoDetails"), exports);
|
175
|
+
__exportStar(require("./PscInfo"), exports);
|
174
176
|
__exportStar(require("./PaginatedUsersResponse"), exports);
|
175
177
|
__exportStar(require("./PasswordProviders"), exports);
|
176
178
|
__exportStar(require("./PatientAddressCompatibleInput"), exports);
|
@@ -73,7 +73,7 @@ class Activity {
|
|
73
73
|
const _response = yield core.fetcher({
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${userId}`),
|
75
75
|
method: "GET",
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
77
77
|
contentType: "application/json",
|
78
78
|
queryParameters: _queryParams,
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -142,7 +142,7 @@ class Activity {
|
|
142
142
|
const _response = yield core.fetcher({
|
143
143
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${userId}/raw`),
|
144
144
|
method: "GET",
|
145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
146
146
|
contentType: "application/json",
|
147
147
|
queryParameters: _queryParams,
|
148
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -73,7 +73,7 @@ class Body {
|
|
73
73
|
const _response = yield core.fetcher({
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${userId}`),
|
75
75
|
method: "GET",
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
77
77
|
contentType: "application/json",
|
78
78
|
queryParameters: _queryParams,
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -142,7 +142,7 @@ class Body {
|
|
142
142
|
const _response = yield core.fetcher({
|
143
143
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${userId}/raw`),
|
144
144
|
method: "GET",
|
145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
146
146
|
contentType: "application/json",
|
147
147
|
queryParameters: _queryParams,
|
148
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -67,7 +67,7 @@ class Devices {
|
|
67
67
|
const _response = yield core.fetcher({
|
68
68
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/devices/${userId}/raw`),
|
69
69
|
method: "GET",
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
70
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
71
71
|
contentType: "application/json",
|
72
72
|
queryParameters: _queryParams,
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -63,7 +63,7 @@ class Insurance {
|
|
63
63
|
const _response = yield core.fetcher({
|
64
64
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/payor"),
|
65
65
|
method: "POST",
|
66
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
66
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
67
67
|
contentType: "application/json",
|
68
68
|
body: yield serializers.PayorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
69
69
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -125,7 +125,7 @@ class Insurance {
|
|
125
125
|
const _response = yield core.fetcher({
|
126
126
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/diagnosis"),
|
127
127
|
method: "GET",
|
128
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
128
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
129
129
|
contentType: "application/json",
|
130
130
|
queryParameters: _queryParams,
|
131
131
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -75,7 +75,7 @@ class Introspect {
|
|
75
75
|
const _response = yield core.fetcher({
|
76
76
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/resources"),
|
77
77
|
method: "GET",
|
78
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
79
79
|
contentType: "application/json",
|
80
80
|
queryParameters: _queryParams,
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -146,7 +146,7 @@ class Introspect {
|
|
146
146
|
const _response = yield core.fetcher({
|
147
147
|
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"),
|
148
148
|
method: "GET",
|
149
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
149
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
150
150
|
contentType: "application/json",
|
151
151
|
queryParameters: _queryParams,
|
152
152
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -168,6 +168,23 @@ export declare class LabTests {
|
|
168
168
|
* })
|
169
169
|
*/
|
170
170
|
getAreaInfo(request: Vital.LabTestsGetAreaInfoRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.AreaInfo>;
|
171
|
+
/**
|
172
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
173
|
+
*
|
174
|
+
* @example
|
175
|
+
* await vital.labTests.getPscInfo({
|
176
|
+
* zipCode: "zip_code",
|
177
|
+
* labId: 1
|
178
|
+
* })
|
179
|
+
*/
|
180
|
+
getPscInfo(request: Vital.LabTestsGetPscInfoRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.PscInfo>;
|
181
|
+
/**
|
182
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
183
|
+
*
|
184
|
+
* @example
|
185
|
+
* await vital.labTests.getOrderPscInfo("order_id")
|
186
|
+
*/
|
187
|
+
getOrderPscInfo(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<Vital.PscInfo>;
|
171
188
|
/**
|
172
189
|
* This endpoint returns the lab results for the order.
|
173
190
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -61,7 +61,7 @@ class LabTests {
|
|
61
61
|
const _response = yield core.fetcher({
|
62
62
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests"),
|
63
63
|
method: "GET",
|
64
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
64
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
65
65
|
contentType: "application/json",
|
66
66
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
67
67
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -114,7 +114,7 @@ class LabTests {
|
|
114
114
|
const _response = yield core.fetcher({
|
115
115
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests"),
|
116
116
|
method: "POST",
|
117
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
117
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
118
118
|
contentType: "application/json",
|
119
119
|
body: yield serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
120
120
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -191,7 +191,7 @@ class LabTests {
|
|
191
191
|
const _response = yield core.fetcher({
|
192
192
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/markers"),
|
193
193
|
method: "GET",
|
194
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
194
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
195
195
|
contentType: "application/json",
|
196
196
|
queryParameters: _queryParams,
|
197
197
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -256,7 +256,7 @@ class LabTests {
|
|
256
256
|
const _response = yield core.fetcher({
|
257
257
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${labTestId}/markers`),
|
258
258
|
method: "GET",
|
259
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
259
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
260
260
|
contentType: "application/json",
|
261
261
|
queryParameters: _queryParams,
|
262
262
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -314,7 +314,7 @@ class LabTests {
|
|
314
314
|
const _response = yield core.fetcher({
|
315
315
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${labId}/markers/${providerId}`),
|
316
316
|
method: "GET",
|
317
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
317
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
318
318
|
contentType: "application/json",
|
319
319
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
320
320
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -370,7 +370,7 @@ class LabTests {
|
|
370
370
|
const _response = yield core.fetcher({
|
371
371
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/lab_tests/labs"),
|
372
372
|
method: "GET",
|
373
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
373
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
374
374
|
contentType: "application/json",
|
375
375
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
376
376
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -417,7 +417,7 @@ class LabTests {
|
|
417
417
|
const _response = yield core.fetcher({
|
418
418
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v3/lab_tests/${labTestId}`),
|
419
419
|
method: "GET",
|
420
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
420
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
421
421
|
contentType: "application/json",
|
422
422
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
423
423
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -480,7 +480,7 @@ class LabTests {
|
|
480
480
|
const _response = yield core.fetcher({
|
481
481
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/availability"),
|
482
482
|
method: "POST",
|
483
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
483
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
484
484
|
contentType: "application/json",
|
485
485
|
body: yield serializers.UsAddress.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
486
486
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -540,7 +540,7 @@ class LabTests {
|
|
540
540
|
const _response = yield core.fetcher({
|
541
541
|
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}/phlebotomy/appointment/book`),
|
542
542
|
method: "POST",
|
543
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
543
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
544
544
|
contentType: "application/json",
|
545
545
|
body: yield serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
546
546
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -606,7 +606,7 @@ class LabTests {
|
|
606
606
|
const _response = yield core.fetcher({
|
607
607
|
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}/phlebotomy/appointment/request`),
|
608
608
|
method: "POST",
|
609
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
609
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
610
610
|
contentType: "application/json",
|
611
611
|
body: yield serializers.RequestAppointmentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
612
612
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -666,7 +666,7 @@ class LabTests {
|
|
666
666
|
const _response = yield core.fetcher({
|
667
667
|
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}/phlebotomy/appointment/reschedule`),
|
668
668
|
method: "PATCH",
|
669
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
669
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
670
670
|
contentType: "application/json",
|
671
671
|
body: yield serializers.AppointmentRescheduleRequest.jsonOrThrow(request, {
|
672
672
|
unrecognizedObjectKeys: "strip",
|
@@ -728,7 +728,7 @@ class LabTests {
|
|
728
728
|
const _response = yield core.fetcher({
|
729
729
|
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}/phlebotomy/appointment/cancel`),
|
730
730
|
method: "PATCH",
|
731
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
731
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
732
732
|
contentType: "application/json",
|
733
733
|
body: yield serializers.AppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
734
734
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -785,7 +785,7 @@ class LabTests {
|
|
785
785
|
const _response = yield core.fetcher({
|
786
786
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/phlebotomy/appointment/cancellation-reasons"),
|
787
787
|
method: "GET",
|
788
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
788
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
789
789
|
contentType: "application/json",
|
790
790
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
791
791
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -832,7 +832,7 @@ class LabTests {
|
|
832
832
|
const _response = yield core.fetcher({
|
833
833
|
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}/phlebotomy/appointment`),
|
834
834
|
method: "GET",
|
835
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
835
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
836
836
|
contentType: "application/json",
|
837
837
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
838
838
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -899,7 +899,7 @@ class LabTests {
|
|
899
899
|
const _response = yield core.fetcher({
|
900
900
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/area/info"),
|
901
901
|
method: "GET",
|
902
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
902
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
903
903
|
contentType: "application/json",
|
904
904
|
queryParameters: _queryParams,
|
905
905
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -944,6 +944,126 @@ class LabTests {
|
|
944
944
|
}
|
945
945
|
});
|
946
946
|
}
|
947
|
+
/**
|
948
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
949
|
+
*
|
950
|
+
* @example
|
951
|
+
* await vital.labTests.getPscInfo({
|
952
|
+
* zipCode: "zip_code",
|
953
|
+
* labId: 1
|
954
|
+
* })
|
955
|
+
*/
|
956
|
+
getPscInfo(request, requestOptions) {
|
957
|
+
var _a;
|
958
|
+
return __awaiter(this, void 0, void 0, function* () {
|
959
|
+
const { zipCode, labId } = request;
|
960
|
+
const _queryParams = {};
|
961
|
+
_queryParams["zip_code"] = zipCode;
|
962
|
+
_queryParams["lab_id"] = labId.toString();
|
963
|
+
const _response = yield core.fetcher({
|
964
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/psc/info"),
|
965
|
+
method: "GET",
|
966
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
967
|
+
contentType: "application/json",
|
968
|
+
queryParameters: _queryParams,
|
969
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
970
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
971
|
+
});
|
972
|
+
if (_response.ok) {
|
973
|
+
return yield serializers.PscInfo.parseOrThrow(_response.body, {
|
974
|
+
unrecognizedObjectKeys: "passthrough",
|
975
|
+
allowUnrecognizedUnionMembers: true,
|
976
|
+
allowUnrecognizedEnumValues: true,
|
977
|
+
breadcrumbsPrefix: ["response"],
|
978
|
+
});
|
979
|
+
}
|
980
|
+
if (_response.error.reason === "status-code") {
|
981
|
+
switch (_response.error.statusCode) {
|
982
|
+
case 422:
|
983
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
984
|
+
unrecognizedObjectKeys: "passthrough",
|
985
|
+
allowUnrecognizedUnionMembers: true,
|
986
|
+
allowUnrecognizedEnumValues: true,
|
987
|
+
breadcrumbsPrefix: ["response"],
|
988
|
+
}));
|
989
|
+
default:
|
990
|
+
throw new errors.VitalError({
|
991
|
+
statusCode: _response.error.statusCode,
|
992
|
+
body: _response.error.body,
|
993
|
+
});
|
994
|
+
}
|
995
|
+
}
|
996
|
+
switch (_response.error.reason) {
|
997
|
+
case "non-json":
|
998
|
+
throw new errors.VitalError({
|
999
|
+
statusCode: _response.error.statusCode,
|
1000
|
+
body: _response.error.rawBody,
|
1001
|
+
});
|
1002
|
+
case "timeout":
|
1003
|
+
throw new errors.VitalTimeoutError();
|
1004
|
+
case "unknown":
|
1005
|
+
throw new errors.VitalError({
|
1006
|
+
message: _response.error.errorMessage,
|
1007
|
+
});
|
1008
|
+
}
|
1009
|
+
});
|
1010
|
+
}
|
1011
|
+
/**
|
1012
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
1013
|
+
*
|
1014
|
+
* @example
|
1015
|
+
* await vital.labTests.getOrderPscInfo("order_id")
|
1016
|
+
*/
|
1017
|
+
getOrderPscInfo(orderId, requestOptions) {
|
1018
|
+
var _a;
|
1019
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1020
|
+
const _response = yield core.fetcher({
|
1021
|
+
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}/psc/info`),
|
1022
|
+
method: "GET",
|
1023
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1024
|
+
contentType: "application/json",
|
1025
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1026
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1027
|
+
});
|
1028
|
+
if (_response.ok) {
|
1029
|
+
return yield serializers.PscInfo.parseOrThrow(_response.body, {
|
1030
|
+
unrecognizedObjectKeys: "passthrough",
|
1031
|
+
allowUnrecognizedUnionMembers: true,
|
1032
|
+
allowUnrecognizedEnumValues: true,
|
1033
|
+
breadcrumbsPrefix: ["response"],
|
1034
|
+
});
|
1035
|
+
}
|
1036
|
+
if (_response.error.reason === "status-code") {
|
1037
|
+
switch (_response.error.statusCode) {
|
1038
|
+
case 422:
|
1039
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
1040
|
+
unrecognizedObjectKeys: "passthrough",
|
1041
|
+
allowUnrecognizedUnionMembers: true,
|
1042
|
+
allowUnrecognizedEnumValues: true,
|
1043
|
+
breadcrumbsPrefix: ["response"],
|
1044
|
+
}));
|
1045
|
+
default:
|
1046
|
+
throw new errors.VitalError({
|
1047
|
+
statusCode: _response.error.statusCode,
|
1048
|
+
body: _response.error.body,
|
1049
|
+
});
|
1050
|
+
}
|
1051
|
+
}
|
1052
|
+
switch (_response.error.reason) {
|
1053
|
+
case "non-json":
|
1054
|
+
throw new errors.VitalError({
|
1055
|
+
statusCode: _response.error.statusCode,
|
1056
|
+
body: _response.error.rawBody,
|
1057
|
+
});
|
1058
|
+
case "timeout":
|
1059
|
+
throw new errors.VitalTimeoutError();
|
1060
|
+
case "unknown":
|
1061
|
+
throw new errors.VitalError({
|
1062
|
+
message: _response.error.errorMessage,
|
1063
|
+
});
|
1064
|
+
}
|
1065
|
+
});
|
1066
|
+
}
|
947
1067
|
/**
|
948
1068
|
* This endpoint returns the lab results for the order.
|
949
1069
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -954,7 +1074,7 @@ class LabTests {
|
|
954
1074
|
const _response = yield core.fetcher({
|
955
1075
|
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`),
|
956
1076
|
method: "GET",
|
957
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1077
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
958
1078
|
contentType: "application/json",
|
959
1079
|
responseType: "streaming",
|
960
1080
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1008,7 +1128,7 @@ class LabTests {
|
|
1008
1128
|
const _response = yield core.fetcher({
|
1009
1129
|
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/metadata`),
|
1010
1130
|
method: "GET",
|
1011
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1131
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1012
1132
|
contentType: "application/json",
|
1013
1133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1014
1134
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1065,7 +1185,7 @@ class LabTests {
|
|
1065
1185
|
const _response = yield core.fetcher({
|
1066
1186
|
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`),
|
1067
1187
|
method: "GET",
|
1068
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1188
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1069
1189
|
contentType: "application/json",
|
1070
1190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1071
1191
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1125,7 +1245,7 @@ class LabTests {
|
|
1125
1245
|
const _response = yield core.fetcher({
|
1126
1246
|
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}/labels/pdf`),
|
1127
1247
|
method: "GET",
|
1128
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1248
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1129
1249
|
contentType: "application/json",
|
1130
1250
|
queryParameters: _queryParams,
|
1131
1251
|
responseType: "streaming",
|
@@ -1176,7 +1296,7 @@ class LabTests {
|
|
1176
1296
|
const _response = yield core.fetcher({
|
1177
1297
|
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}/requisition/pdf`),
|
1178
1298
|
method: "GET",
|
1179
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1299
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1180
1300
|
contentType: "application/json",
|
1181
1301
|
responseType: "streaming",
|
1182
1302
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1226,7 +1346,7 @@ class LabTests {
|
|
1226
1346
|
const _response = yield core.fetcher({
|
1227
1347
|
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}`),
|
1228
1348
|
method: "GET",
|
1229
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1349
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1230
1350
|
contentType: "application/json",
|
1231
1351
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1232
1352
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1280,7 +1400,7 @@ class LabTests {
|
|
1280
1400
|
const _response = yield core.fetcher({
|
1281
1401
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order"),
|
1282
1402
|
method: "POST",
|
1283
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1403
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1284
1404
|
contentType: "application/json",
|
1285
1405
|
body: yield serializers.CreateOrderRequestCompatible.jsonOrThrow(request, {
|
1286
1406
|
unrecognizedObjectKeys: "strip",
|
@@ -1337,7 +1457,7 @@ class LabTests {
|
|
1337
1457
|
const _response = yield core.fetcher({
|
1338
1458
|
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}/cancel`),
|
1339
1459
|
method: "POST",
|
1340
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1460
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1341
1461
|
contentType: "application/json",
|
1342
1462
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1343
1463
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -1402,7 +1522,7 @@ class LabTests {
|
|
1402
1522
|
const _response = yield core.fetcher({
|
1403
1523
|
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}/test`),
|
1404
1524
|
method: "POST",
|
1405
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1525
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1406
1526
|
contentType: "application/json",
|
1407
1527
|
queryParameters: _queryParams,
|
1408
1528
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1452,7 +1572,7 @@ class LabTests {
|
|
1452
1572
|
getOrders(request = {}, requestOptions) {
|
1453
1573
|
var _a;
|
1454
1574
|
return __awaiter(this, void 0, void 0, function* () {
|
1455
|
-
const { startDate, endDate, userId, patientName, orderIds, page, size } = request;
|
1575
|
+
const { startDate, endDate, userId, patientName, shippingRecipientName, orderIds, page, size } = request;
|
1456
1576
|
const _queryParams = {};
|
1457
1577
|
if (startDate != null) {
|
1458
1578
|
_queryParams["start_date"] = startDate.toISOString();
|
@@ -1466,6 +1586,9 @@ class LabTests {
|
|
1466
1586
|
if (patientName != null) {
|
1467
1587
|
_queryParams["patient_name"] = patientName;
|
1468
1588
|
}
|
1589
|
+
if (shippingRecipientName != null) {
|
1590
|
+
_queryParams["shipping_recipient_name"] = shippingRecipientName;
|
1591
|
+
}
|
1469
1592
|
if (orderIds != null) {
|
1470
1593
|
if (Array.isArray(orderIds)) {
|
1471
1594
|
_queryParams["order_ids"] = orderIds.map((item) => item);
|
@@ -1483,7 +1606,7 @@ class LabTests {
|
|
1483
1606
|
const _response = yield core.fetcher({
|
1484
1607
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/orders"),
|
1485
1608
|
method: "GET",
|
1486
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
1609
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.29", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
1487
1610
|
contentType: "application/json",
|
1488
1611
|
queryParameters: _queryParams,
|
1489
1612
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
* {
|
7
|
+
* zipCode: "zip_code",
|
8
|
+
* labId: 1
|
9
|
+
* }
|
10
|
+
*/
|
11
|
+
export interface LabTestsGetPscInfoRequest {
|
12
|
+
/**
|
13
|
+
* Zip code of the area to check
|
14
|
+
*/
|
15
|
+
zipCode: string;
|
16
|
+
/**
|
17
|
+
* Lab ID to check for PSCs
|
18
|
+
*/
|
19
|
+
labId: number;
|
20
|
+
}
|
@@ -6,6 +6,7 @@ export { RequestAppointmentRequest } from "./RequestAppointmentRequest";
|
|
6
6
|
export { AppointmentRescheduleRequest } from "./AppointmentRescheduleRequest";
|
7
7
|
export { AppointmentCancelRequest } from "./AppointmentCancelRequest";
|
8
8
|
export { LabTestsGetAreaInfoRequest } from "./LabTestsGetAreaInfoRequest";
|
9
|
+
export { LabTestsGetPscInfoRequest } from "./LabTestsGetPscInfoRequest";
|
9
10
|
export { LabTestsGetLabelsPdfRequest } from "./LabTestsGetLabelsPdfRequest";
|
10
11
|
export { CreateOrderRequestCompatible } from "./CreateOrderRequestCompatible";
|
11
12
|
export { LabTestsSimulateOrderProcessRequest } from "./LabTestsSimulateOrderProcessRequest";
|