@tryvital/vital-node 3.0.5 → 3.0.7
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/index.d.ts +1 -0
- package/api/resources/labTests/client/Client.d.ts +8 -2
- package/api/resources/labTests/client/Client.js +88 -57
- package/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +9 -0
- package/api/resources/labTests/client/requests/index.d.ts +1 -0
- 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.d.ts +1 -1
- package/api/resources/user/client/Client.js +18 -12
- package/api/resources/user/client/requests/UserRefreshRequest.d.ts +6 -0
- package/api/resources/user/client/requests/index.d.ts +1 -0
- package/api/resources/vitals/client/Client.js +23 -23
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/AppointmentEventStatus.d.ts +2 -1
- package/api/types/AppointmentEventStatus.js +1 -0
- package/api/types/AppointmentProvider.d.ts +2 -1
- package/api/types/AppointmentProvider.js +1 -0
- package/api/types/AppointmentServiceType.d.ts +11 -0
- package/api/types/AppointmentServiceType.js +10 -0
- package/api/types/ClientFacingAppointment.d.ts +3 -3
- package/api/types/HistoricalPullStatus.d.ts +12 -0
- package/api/types/HistoricalPullStatus.js +11 -0
- package/api/types/OrderStatus.d.ts +2 -1
- package/api/types/OrderStatus.js +1 -0
- package/api/types/PhlebotomyAreaInfo.d.ts +2 -0
- package/api/types/PhlebotomyProviderInfo.d.ts +8 -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/UserRefreshSuccessResponse.d.ts +1 -0
- package/api/types/UserSignInTokenResponse.d.ts +1 -2
- package/api/types/index.d.ts +7 -2
- package/api/types/index.js +7 -2
- 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 +8 -2
- package/dist/api/resources/labTests/client/Client.js +88 -57
- package/dist/api/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +9 -0
- package/dist/api/resources/labTests/client/requests/RequestAppointmentRequest.js +5 -0
- package/dist/api/resources/labTests/client/requests/index.d.ts +1 -0
- 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.d.ts +1 -1
- package/dist/api/resources/user/client/Client.js +18 -12
- package/dist/api/resources/user/client/requests/UserRefreshRequest.d.ts +6 -0
- package/dist/api/resources/user/client/requests/UserRefreshRequest.js +5 -0
- package/dist/api/resources/user/client/requests/index.d.ts +1 -0
- package/dist/api/resources/vitals/client/Client.js +23 -23
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/AppointmentEventStatus.d.ts +2 -1
- package/dist/api/types/AppointmentEventStatus.js +1 -0
- package/dist/api/types/AppointmentProvider.d.ts +2 -1
- package/dist/api/types/AppointmentProvider.js +1 -0
- package/dist/api/types/AppointmentServiceType.d.ts +11 -0
- package/dist/api/types/AppointmentServiceType.js +10 -0
- package/dist/api/types/ClientFacingAppointment.d.ts +3 -3
- package/dist/api/types/HistoricalPullStatus.d.ts +12 -0
- package/dist/api/types/HistoricalPullStatus.js +11 -0
- package/dist/api/types/OrderStatus.d.ts +2 -1
- package/dist/api/types/OrderStatus.js +1 -0
- package/dist/api/types/PhlebotomyAreaInfo.d.ts +2 -0
- package/dist/api/types/PhlebotomyProviderInfo.d.ts +8 -0
- package/dist/api/types/PhlebotomyProviderInfo.js +5 -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/UserRefreshSuccessResponse.d.ts +1 -0
- package/dist/api/types/UserSignInTokenResponse.d.ts +1 -2
- package/dist/api/types/index.d.ts +7 -2
- package/dist/api/types/index.js +7 -2
- 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/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +13 -0
- package/dist/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +43 -0
- package/dist/serialization/resources/labTests/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/labTests/client/requests/index.js +3 -1
- package/dist/serialization/types/AppointmentEventStatus.d.ts +1 -1
- package/dist/serialization/types/AppointmentEventStatus.js +1 -1
- package/dist/serialization/types/AppointmentProvider.d.ts +1 -1
- package/dist/serialization/types/AppointmentProvider.js +1 -1
- package/dist/serialization/types/AppointmentServiceType.d.ts +10 -0
- package/dist/serialization/types/{UserSignInToken.js → AppointmentServiceType.js} +2 -5
- package/dist/serialization/types/ClientFacingAppointment.d.ts +3 -3
- package/dist/serialization/types/ClientFacingAppointment.js +3 -3
- package/dist/serialization/types/HistoricalPullStatus.d.ts +10 -0
- package/{serialization/types/UserSignInToken.js → dist/serialization/types/HistoricalPullStatus.js} +2 -5
- package/dist/serialization/types/OrderStatus.d.ts +1 -1
- package/dist/serialization/types/OrderStatus.js +1 -0
- package/dist/serialization/types/PhlebotomyAreaInfo.d.ts +1 -0
- package/dist/serialization/types/PhlebotomyAreaInfo.js +10 -0
- package/dist/serialization/types/PhlebotomyProviderInfo.d.ts +13 -0
- package/dist/serialization/types/PhlebotomyProviderInfo.js +43 -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/{UserSignInTokenResponseSignInToken.js → UserHistoricalPullsResponse.js} +5 -5
- package/dist/serialization/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/dist/serialization/types/UserRefreshSuccessResponse.js +1 -0
- package/dist/serialization/types/UserSignInTokenResponse.d.ts +1 -1
- package/dist/serialization/types/UserSignInTokenResponse.js +1 -10
- package/dist/serialization/types/index.d.ts +7 -2
- package/dist/serialization/types/index.js +7 -2
- package/package.json +1 -1
- package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.d.ts +13 -0
- package/serialization/resources/labTests/client/requests/RequestAppointmentRequest.js +43 -0
- package/serialization/resources/labTests/client/requests/index.d.ts +1 -0
- package/serialization/resources/labTests/client/requests/index.js +3 -1
- package/serialization/types/AppointmentEventStatus.d.ts +1 -1
- package/serialization/types/AppointmentEventStatus.js +1 -1
- package/serialization/types/AppointmentProvider.d.ts +1 -1
- package/serialization/types/AppointmentProvider.js +1 -1
- package/serialization/types/AppointmentServiceType.d.ts +10 -0
- package/serialization/types/AppointmentServiceType.js +31 -0
- package/serialization/types/ClientFacingAppointment.d.ts +3 -3
- package/serialization/types/ClientFacingAppointment.js +3 -3
- package/serialization/types/HistoricalPullStatus.d.ts +10 -0
- package/serialization/types/HistoricalPullStatus.js +31 -0
- package/serialization/types/OrderStatus.d.ts +1 -1
- package/serialization/types/OrderStatus.js +1 -0
- package/serialization/types/PhlebotomyAreaInfo.d.ts +1 -0
- package/serialization/types/PhlebotomyAreaInfo.js +10 -0
- package/serialization/types/PhlebotomyProviderInfo.d.ts +13 -0
- package/serialization/types/PhlebotomyProviderInfo.js +43 -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/{UserSignInTokenResponseSignInToken.js → UserHistoricalPullsResponse.js} +5 -5
- package/serialization/types/UserRefreshSuccessResponse.d.ts +1 -0
- package/serialization/types/UserRefreshSuccessResponse.js +1 -0
- package/serialization/types/UserSignInTokenResponse.d.ts +1 -1
- package/serialization/types/UserSignInTokenResponse.js +1 -10
- package/serialization/types/index.d.ts +7 -2
- package/serialization/types/index.js +7 -2
- package/api/types/UserSignInToken.d.ts +0 -7
- package/api/types/UserSignInTokenResponseSignInToken.d.ts +0 -5
- package/dist/api/types/UserSignInToken.d.ts +0 -7
- package/dist/api/types/UserSignInTokenResponseSignInToken.d.ts +0 -5
- package/dist/serialization/types/UserSignInToken.d.ts +0 -13
- package/dist/serialization/types/UserSignInTokenResponseSignInToken.d.ts +0 -10
- package/serialization/types/UserSignInToken.d.ts +0 -13
- package/serialization/types/UserSignInTokenResponseSignInToken.d.ts +0 -10
- /package/api/{types/UserSignInToken.js → resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js} +0 -0
- /package/api/{types/UserSignInTokenResponseSignInToken.js → resources/labTests/client/requests/RequestAppointmentRequest.js} +0 -0
- /package/{dist/api/types/UserSignInToken.js → api/resources/user/client/requests/UserRefreshRequest.js} +0 -0
- /package/{dist/api/types/UserSignInTokenResponseSignInToken.js → api/types/PhlebotomyProviderInfo.js} +0 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.streamingFetcher = void 0;
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
17
|
+
const streamingFetcher = (args) => __awaiter(void 0, void 0, void 0, function* () {
|
18
|
+
var _a;
|
19
|
+
const headers = {};
|
20
|
+
if (args.body !== undefined) {
|
21
|
+
headers["Content-Type"] = "application/json";
|
22
|
+
}
|
23
|
+
if (args.headers != null) {
|
24
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
25
|
+
if (value != null) {
|
26
|
+
headers[key] = value;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
const response = yield (0, axios_1.default)({
|
31
|
+
url: args.url,
|
32
|
+
params: args.queryParameters,
|
33
|
+
method: args.method,
|
34
|
+
headers,
|
35
|
+
data: args.body,
|
36
|
+
timeout: args.timeoutMs,
|
37
|
+
transitional: {
|
38
|
+
clarifyTimeoutError: true,
|
39
|
+
},
|
40
|
+
withCredentials: args.withCredentials,
|
41
|
+
maxBodyLength: Infinity,
|
42
|
+
maxContentLength: Infinity,
|
43
|
+
onUploadProgress: args.onUploadProgress,
|
44
|
+
onDownloadProgress: args.onDownloadProgress,
|
45
|
+
signal: (_a = args.abortController) === null || _a === void 0 ? void 0 : _a.signal,
|
46
|
+
responseType: "stream",
|
47
|
+
adapter: args.adapter,
|
48
|
+
});
|
49
|
+
if (args.onData != null) {
|
50
|
+
const { onData } = args;
|
51
|
+
response.data.on("data", (data) => {
|
52
|
+
var _a;
|
53
|
+
for (const line of data.toString().split("\n")) {
|
54
|
+
let data = line;
|
55
|
+
if (args.responseChunkPrefix != null) {
|
56
|
+
if (!data.startsWith(args.responseChunkPrefix)) {
|
57
|
+
continue;
|
58
|
+
}
|
59
|
+
data = data.substring(args.responseChunkPrefix.length);
|
60
|
+
}
|
61
|
+
try {
|
62
|
+
const parsed = JSON.parse(data);
|
63
|
+
onData(parsed);
|
64
|
+
}
|
65
|
+
catch (error) {
|
66
|
+
(_a = args.onError) === null || _a === void 0 ? void 0 : _a.call(args, error);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
});
|
70
|
+
}
|
71
|
+
if (args.onFinish != null) {
|
72
|
+
response.data.on("end", args.onFinish);
|
73
|
+
}
|
74
|
+
return {
|
75
|
+
data: response.data,
|
76
|
+
headers: response.headers,
|
77
|
+
};
|
78
|
+
});
|
79
|
+
exports.streamingFetcher = streamingFetcher;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getHeader = void 0;
|
4
|
+
function getHeader(response, header) {
|
5
|
+
for (const [headerKey, headerValue] of Object.entries(response.headers)) {
|
6
|
+
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
7
|
+
return headerValue;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
return undefined;
|
11
|
+
}
|
12
|
+
exports.getHeader = getHeader;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.streamingFetcher = exports.getHeader = void 0;
|
4
|
+
var getHeader_1 = require("./getHeader");
|
5
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
6
|
+
var StreamingFetcher_1 = require("./StreamingFetcher");
|
7
|
+
Object.defineProperty(exports, "streamingFetcher", { enumerable: true, get: function () { return StreamingFetcher_1.streamingFetcher; } });
|
@@ -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.7",
|
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.7",
|
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.7",
|
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.7",
|
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.7",
|
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.7",
|
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.7",
|
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.7",
|
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.7",
|
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;
|
package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts
ADDED
@@ -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>;
|
@@ -58,6 +60,11 @@ export declare class LabTests {
|
|
58
60
|
* @throws {@link Vital.UnprocessableEntityError}
|
59
61
|
*/
|
60
62
|
bookPhlebotomyAppointment(orderId: string, request: Vital.AppointmentBookingRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
63
|
+
/**
|
64
|
+
* Request an at-home phlebotomy appointment.
|
65
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
66
|
+
*/
|
67
|
+
requestPhlebotomyAppointment(orderId: string, request: Vital.RequestAppointmentRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.ClientFacingAppointment>;
|
61
68
|
/**
|
62
69
|
* Reschedule a previously booked at-home phlebotomy appointment.
|
63
70
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -87,9 +94,8 @@ export declare class LabTests {
|
|
87
94
|
getAreaInfo(request: Vital.LabTestsGetAreaInfoRequest, requestOptions?: LabTests.RequestOptions): Promise<Vital.AreaInfo>;
|
88
95
|
/**
|
89
96
|
* This endpoint returns the lab results for the order.
|
90
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
91
97
|
*/
|
92
|
-
getResultPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<
|
98
|
+
getResultPdf(orderId: string, requestOptions?: LabTests.RequestOptions): Promise<stream.Readable>;
|
93
99
|
/**
|
94
100
|
* Return metadata related to order results, such as lab metadata,
|
95
101
|
* provider and sample dates.
|