@tryvital/vital-node 3.1.254 → 3.1.255
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/aggregate/client/Client.d.ts +12 -0
- package/api/resources/aggregate/client/Client.js +74 -2
- package/api/resources/aggregate/client/requests/AggregateGetTaskHistoryForContinuousQueryRequest.d.ts +11 -0
- package/api/resources/aggregate/client/requests/AggregateGetTaskHistoryForContinuousQueryRequest.js +5 -0
- package/api/resources/aggregate/client/requests/index.d.ts +1 -0
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/electrocardiogram/client/Client.js +1 -1
- package/api/resources/insurance/client/Client.js +3 -3
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.js +44 -41
- package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/api/resources/link/client/Client.js +19 -19
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/client/Client.js +1 -1
- package/api/resources/order/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/sleepCycle/client/Client.js +1 -1
- 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 +16 -16
- package/api/resources/vitals/client/Client.js +78 -78
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/ClientFacingProviderWithStatus.d.ts +9 -0
- package/api/types/ContinuousQueryTaskHistoryEntry.d.ts +14 -0
- package/api/types/ContinuousQueryTaskHistoryEntry.js +5 -0
- package/api/types/ContinuousQueryTaskHistoryResponse.d.ts +8 -0
- package/api/types/ContinuousQueryTaskHistoryResponse.js +5 -0
- package/api/types/ContinuousQueryTaskStatus.d.ts +13 -0
- package/api/types/ContinuousQueryTaskStatus.js +12 -0
- package/api/types/HistoricalPullNonRetriableErrorDetails.d.ts +12 -0
- package/api/types/HistoricalPullNonRetriableErrorDetails.js +11 -0
- package/api/types/HistoricalPullRetriableErrorDetails.d.ts +13 -0
- package/api/types/HistoricalPullRetriableErrorDetails.js +12 -0
- package/api/types/ProviderConnectionCreated.d.ts +9 -0
- package/api/types/SingleHistoricalPullStatistics.d.ts +1 -0
- package/api/types/SingleHistoricalPullStatisticsErrorDetails.d.ts +5 -0
- package/api/types/SingleHistoricalPullStatisticsErrorDetails.js +5 -0
- package/api/types/index.d.ts +6 -0
- package/api/types/index.js +6 -0
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/aggregate/client/Client.d.ts +12 -0
- package/dist/api/resources/aggregate/client/Client.js +74 -2
- package/dist/api/resources/aggregate/client/requests/AggregateGetTaskHistoryForContinuousQueryRequest.d.ts +11 -0
- package/dist/api/resources/aggregate/client/requests/AggregateGetTaskHistoryForContinuousQueryRequest.js +5 -0
- package/dist/api/resources/aggregate/client/requests/index.d.ts +1 -0
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
- package/dist/api/resources/insurance/client/Client.js +3 -3
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.js +44 -41
- package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/dist/api/resources/link/client/Client.js +19 -19
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
- package/dist/api/resources/order/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/sleepCycle/client/Client.js +1 -1
- 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 +16 -16
- package/dist/api/resources/vitals/client/Client.js +78 -78
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/ClientFacingProviderWithStatus.d.ts +9 -0
- package/dist/api/types/ContinuousQueryTaskHistoryEntry.d.ts +14 -0
- package/dist/api/types/ContinuousQueryTaskHistoryEntry.js +5 -0
- package/dist/api/types/ContinuousQueryTaskHistoryResponse.d.ts +8 -0
- package/dist/api/types/ContinuousQueryTaskHistoryResponse.js +5 -0
- package/dist/api/types/ContinuousQueryTaskStatus.d.ts +13 -0
- package/dist/api/types/ContinuousQueryTaskStatus.js +12 -0
- package/dist/api/types/HistoricalPullNonRetriableErrorDetails.d.ts +12 -0
- package/dist/api/types/HistoricalPullNonRetriableErrorDetails.js +11 -0
- package/dist/api/types/HistoricalPullRetriableErrorDetails.d.ts +13 -0
- package/dist/api/types/HistoricalPullRetriableErrorDetails.js +12 -0
- package/dist/api/types/ProviderConnectionCreated.d.ts +9 -0
- package/dist/api/types/SingleHistoricalPullStatistics.d.ts +1 -0
- package/dist/api/types/SingleHistoricalPullStatisticsErrorDetails.d.ts +5 -0
- package/dist/api/types/SingleHistoricalPullStatisticsErrorDetails.js +5 -0
- package/dist/api/types/index.d.ts +6 -0
- package/dist/api/types/index.js +6 -0
- package/dist/serialization/types/ClientFacingProviderWithStatus.d.ts +1 -0
- package/dist/serialization/types/ClientFacingProviderWithStatus.js +1 -0
- package/dist/serialization/types/ContinuousQueryTaskHistoryEntry.d.ts +20 -0
- package/dist/serialization/types/ContinuousQueryTaskHistoryEntry.js +41 -0
- package/dist/serialization/types/ContinuousQueryTaskHistoryResponse.d.ts +14 -0
- package/dist/serialization/types/ContinuousQueryTaskHistoryResponse.js +35 -0
- package/dist/serialization/types/ContinuousQueryTaskStatus.d.ts +10 -0
- package/dist/serialization/types/ContinuousQueryTaskStatus.js +31 -0
- package/dist/serialization/types/HistoricalPullNonRetriableErrorDetails.d.ts +10 -0
- package/dist/serialization/types/HistoricalPullNonRetriableErrorDetails.js +31 -0
- package/dist/serialization/types/HistoricalPullRetriableErrorDetails.d.ts +10 -0
- package/dist/serialization/types/HistoricalPullRetriableErrorDetails.js +36 -0
- package/dist/serialization/types/ProviderConnectionCreated.d.ts +1 -0
- package/dist/serialization/types/ProviderConnectionCreated.js +1 -0
- package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +2 -0
- package/dist/serialization/types/SingleHistoricalPullStatistics.js +2 -0
- package/dist/serialization/types/SingleHistoricalPullStatisticsErrorDetails.d.ts +12 -0
- package/dist/serialization/types/SingleHistoricalPullStatisticsErrorDetails.js +36 -0
- package/dist/serialization/types/index.d.ts +6 -0
- package/dist/serialization/types/index.js +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +64 -0
- package/serialization/types/ClientFacingProviderWithStatus.d.ts +1 -0
- package/serialization/types/ClientFacingProviderWithStatus.js +1 -0
- package/serialization/types/ContinuousQueryTaskHistoryEntry.d.ts +20 -0
- package/serialization/types/ContinuousQueryTaskHistoryEntry.js +41 -0
- package/serialization/types/ContinuousQueryTaskHistoryResponse.d.ts +14 -0
- package/serialization/types/ContinuousQueryTaskHistoryResponse.js +35 -0
- package/serialization/types/ContinuousQueryTaskStatus.d.ts +10 -0
- package/serialization/types/ContinuousQueryTaskStatus.js +31 -0
- package/serialization/types/HistoricalPullNonRetriableErrorDetails.d.ts +10 -0
- package/serialization/types/HistoricalPullNonRetriableErrorDetails.js +31 -0
- package/serialization/types/HistoricalPullRetriableErrorDetails.d.ts +10 -0
- package/serialization/types/HistoricalPullRetriableErrorDetails.js +36 -0
- package/serialization/types/ProviderConnectionCreated.d.ts +1 -0
- package/serialization/types/ProviderConnectionCreated.js +1 -0
- package/serialization/types/SingleHistoricalPullStatistics.d.ts +2 -0
- package/serialization/types/SingleHistoricalPullStatistics.js +2 -0
- package/serialization/types/SingleHistoricalPullStatisticsErrorDetails.d.ts +12 -0
- package/serialization/types/SingleHistoricalPullStatisticsErrorDetails.js +36 -0
- package/serialization/types/index.d.ts +6 -0
- package/serialization/types/index.js +6 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
@@ -78,7 +78,7 @@ class Workouts {
|
|
78
78
|
const _response = yield core.fetcher({
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}`),
|
80
80
|
method: "GET",
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
82
|
contentType: "application/json",
|
83
83
|
queryParameters: _queryParams,
|
84
84
|
requestType: "json",
|
@@ -154,7 +154,7 @@ class Workouts {
|
|
154
154
|
const _response = yield core.fetcher({
|
155
155
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}/raw`),
|
156
156
|
method: "GET",
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
157
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
158
158
|
contentType: "application/json",
|
159
159
|
queryParameters: _queryParams,
|
160
160
|
requestType: "json",
|
@@ -216,7 +216,7 @@ class Workouts {
|
|
216
216
|
const _response = yield core.fetcher({
|
217
217
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
|
218
218
|
method: "GET",
|
219
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
219
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
220
220
|
contentType: "application/json",
|
221
221
|
requestType: "json",
|
222
222
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -12,6 +12,15 @@ export interface ClientFacingProviderWithStatus {
|
|
12
12
|
createdOn: Date;
|
13
13
|
/** Status of source, either error or connected */
|
14
14
|
status: string;
|
15
|
+
/**
|
16
|
+
* The unique identifier of the associated external data provider user.
|
17
|
+
*
|
18
|
+
* * OAuth Providers: User unique identifier; provider-specific formats
|
19
|
+
* * Password Providers: Username
|
20
|
+
* * Email Providers: Email
|
21
|
+
* * Junction Mobile SDK Providers: `null` (not available)
|
22
|
+
*/
|
23
|
+
externalUserId?: string;
|
15
24
|
/** Details of the terminal connection error — populated only when the status is `error`. */
|
16
25
|
errorDetails?: Vital.ClientFacingConnectionErrorDetails;
|
17
26
|
resourceAvailability: Record<string, Vital.ResourceAvailability>;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Vital from "../index";
|
5
|
+
export interface ContinuousQueryTaskHistoryEntry {
|
6
|
+
taskerTodoId: number;
|
7
|
+
queryId: string;
|
8
|
+
userId: string;
|
9
|
+
status: Vital.ContinuousQueryTaskStatus;
|
10
|
+
scheduledAt: Date;
|
11
|
+
startedAt?: Date;
|
12
|
+
endedAt?: Date;
|
13
|
+
errorDetails?: string;
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* This has to match the `continuous_query_task_status` enum type in postgres. ℹ️ This enum is non-exhaustive.
|
6
|
+
*/
|
7
|
+
export declare type ContinuousQueryTaskStatus = "scheduled" | "started" | "completed" | "error";
|
8
|
+
export declare const ContinuousQueryTaskStatus: {
|
9
|
+
readonly Scheduled: "scheduled";
|
10
|
+
readonly Started: "started";
|
11
|
+
readonly Completed: "completed";
|
12
|
+
readonly Error: "error";
|
13
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.ContinuousQueryTaskStatus = void 0;
|
7
|
+
exports.ContinuousQueryTaskStatus = {
|
8
|
+
Scheduled: "scheduled",
|
9
|
+
Started: "started",
|
10
|
+
Completed: "completed",
|
11
|
+
Error: "error",
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* ℹ️ This enum is non-exhaustive.
|
6
|
+
*/
|
7
|
+
export declare type HistoricalPullNonRetriableErrorDetails = "non_retriable_error" | "unexpected_error" | "retry_quota_exhausted";
|
8
|
+
export declare const HistoricalPullNonRetriableErrorDetails: {
|
9
|
+
readonly NonRetriableError: "non_retriable_error";
|
10
|
+
readonly UnexpectedError: "unexpected_error";
|
11
|
+
readonly RetryQuotaExhausted: "retry_quota_exhausted";
|
12
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.HistoricalPullNonRetriableErrorDetails = void 0;
|
7
|
+
exports.HistoricalPullNonRetriableErrorDetails = {
|
8
|
+
NonRetriableError: "non_retriable_error",
|
9
|
+
UnexpectedError: "unexpected_error",
|
10
|
+
RetryQuotaExhausted: "retry_quota_exhausted",
|
11
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* ℹ️ This enum is non-exhaustive.
|
6
|
+
*/
|
7
|
+
export declare type HistoricalPullRetriableErrorDetails = "provider_rate_limit_exceeded" | "provider_unavailable" | "transport_failure" | "resource_contention";
|
8
|
+
export declare const HistoricalPullRetriableErrorDetails: {
|
9
|
+
readonly ProviderRateLimitExceeded: "provider_rate_limit_exceeded";
|
10
|
+
readonly ProviderUnavailable: "provider_unavailable";
|
11
|
+
readonly TransportFailure: "transport_failure";
|
12
|
+
readonly ResourceContention: "resource_contention";
|
13
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.HistoricalPullRetriableErrorDetails = void 0;
|
7
|
+
exports.HistoricalPullRetriableErrorDetails = {
|
8
|
+
ProviderRateLimitExceeded: "provider_rate_limit_exceeded",
|
9
|
+
ProviderUnavailable: "provider_unavailable",
|
10
|
+
TransportFailure: "transport_failure",
|
11
|
+
ResourceContention: "resource_contention",
|
12
|
+
};
|
@@ -7,5 +7,14 @@ export interface ProviderConnectionCreated {
|
|
7
7
|
/** Deprecated. Use `provider` instead. Subject to removal after 1 Jan 2024. */
|
8
8
|
source: Vital.ClientFacingProvider;
|
9
9
|
provider: Vital.ClientFacingProvider;
|
10
|
+
/**
|
11
|
+
* The unique identifier of the associated external data provider user.
|
12
|
+
*
|
13
|
+
* * OAuth Providers: User unique identifier; provider-specific formats
|
14
|
+
* * Password Providers: Username
|
15
|
+
* * Email Providers: Email
|
16
|
+
* * Junction Mobile SDK Providers: `null` (not available)
|
17
|
+
*/
|
18
|
+
externalUserId?: string;
|
10
19
|
resourceAvailability: Record<string, Vital.ResourceAvailability>;
|
11
20
|
}
|
package/api/types/index.d.ts
CHANGED
@@ -187,6 +187,9 @@ export * from "./ConnectionRecipe";
|
|
187
187
|
export * from "./Consent";
|
188
188
|
export * from "./ConsentType";
|
189
189
|
export * from "./ContinuousQueryResultTableChanges";
|
190
|
+
export * from "./ContinuousQueryTaskHistoryEntry";
|
191
|
+
export * from "./ContinuousQueryTaskHistoryResponse";
|
192
|
+
export * from "./ContinuousQueryTaskStatus";
|
190
193
|
export * from "./ContraceptiveEntryType";
|
191
194
|
export * from "./ContraceptiveEntry";
|
192
195
|
export * from "./DatePartExprArg";
|
@@ -224,6 +227,8 @@ export * from "./HealthInsuranceCreateRequestBackImage";
|
|
224
227
|
export * from "./HealthInsuranceCreateRequestPatientSignatureImage";
|
225
228
|
export * from "./HealthInsuranceCreateRequest";
|
226
229
|
export * from "./HistoricalPullCompleted";
|
230
|
+
export * from "./HistoricalPullNonRetriableErrorDetails";
|
231
|
+
export * from "./HistoricalPullRetriableErrorDetails";
|
227
232
|
export * from "./HistoricalPullStatus";
|
228
233
|
export * from "./HistoricalPullTimeline";
|
229
234
|
export * from "./HomePregnancyTestEntryTestResult";
|
@@ -329,6 +334,7 @@ export * from "./SexualActivityEntry";
|
|
329
334
|
export * from "./SexualOrientation";
|
330
335
|
export * from "./ShippingAddress";
|
331
336
|
export * from "./ShippingAddressWithValidation";
|
337
|
+
export * from "./SingleHistoricalPullStatisticsErrorDetails";
|
332
338
|
export * from "./SingleHistoricalPullStatistics";
|
333
339
|
export * from "./SingleProviderHistoricalPullResponse";
|
334
340
|
export * from "./SingleResourceStatistics";
|
package/api/types/index.js
CHANGED
@@ -203,6 +203,9 @@ __exportStar(require("./ConnectionRecipe"), exports);
|
|
203
203
|
__exportStar(require("./Consent"), exports);
|
204
204
|
__exportStar(require("./ConsentType"), exports);
|
205
205
|
__exportStar(require("./ContinuousQueryResultTableChanges"), exports);
|
206
|
+
__exportStar(require("./ContinuousQueryTaskHistoryEntry"), exports);
|
207
|
+
__exportStar(require("./ContinuousQueryTaskHistoryResponse"), exports);
|
208
|
+
__exportStar(require("./ContinuousQueryTaskStatus"), exports);
|
206
209
|
__exportStar(require("./ContraceptiveEntryType"), exports);
|
207
210
|
__exportStar(require("./ContraceptiveEntry"), exports);
|
208
211
|
__exportStar(require("./DatePartExprArg"), exports);
|
@@ -240,6 +243,8 @@ __exportStar(require("./HealthInsuranceCreateRequestBackImage"), exports);
|
|
240
243
|
__exportStar(require("./HealthInsuranceCreateRequestPatientSignatureImage"), exports);
|
241
244
|
__exportStar(require("./HealthInsuranceCreateRequest"), exports);
|
242
245
|
__exportStar(require("./HistoricalPullCompleted"), exports);
|
246
|
+
__exportStar(require("./HistoricalPullNonRetriableErrorDetails"), exports);
|
247
|
+
__exportStar(require("./HistoricalPullRetriableErrorDetails"), exports);
|
243
248
|
__exportStar(require("./HistoricalPullStatus"), exports);
|
244
249
|
__exportStar(require("./HistoricalPullTimeline"), exports);
|
245
250
|
__exportStar(require("./HomePregnancyTestEntryTestResult"), exports);
|
@@ -345,6 +350,7 @@ __exportStar(require("./SexualActivityEntry"), exports);
|
|
345
350
|
__exportStar(require("./SexualOrientation"), exports);
|
346
351
|
__exportStar(require("./ShippingAddress"), exports);
|
347
352
|
__exportStar(require("./ShippingAddressWithValidation"), exports);
|
353
|
+
__exportStar(require("./SingleHistoricalPullStatisticsErrorDetails"), exports);
|
348
354
|
__exportStar(require("./SingleHistoricalPullStatistics"), exports);
|
349
355
|
__exportStar(require("./SingleProviderHistoricalPullResponse"), exports);
|
350
356
|
__exportStar(require("./SingleResourceStatistics"), exports);
|
@@ -78,7 +78,7 @@ class Activity {
|
|
78
78
|
const _response = yield core.fetcher({
|
79
79
|
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/${encodeURIComponent(userId)}`),
|
80
80
|
method: "GET",
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
82
|
contentType: "application/json",
|
83
83
|
queryParameters: _queryParams,
|
84
84
|
requestType: "json",
|
@@ -154,7 +154,7 @@ class Activity {
|
|
154
154
|
const _response = yield core.fetcher({
|
155
155
|
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/${encodeURIComponent(userId)}/raw`),
|
156
156
|
method: "GET",
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
157
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
158
158
|
contentType: "application/json",
|
159
159
|
queryParameters: _queryParams,
|
160
160
|
requestType: "json",
|
@@ -59,6 +59,18 @@ export declare class Aggregate {
|
|
59
59
|
* await client.aggregate.getResultTableForContinuousQuery("user_id", "query_id_or_slug")
|
60
60
|
*/
|
61
61
|
getResultTableForContinuousQuery(userId: string, queryIdOrSlug: string, requestOptions?: Aggregate.RequestOptions): Promise<Vital.AggregationResult>;
|
62
|
+
/**
|
63
|
+
* @param {string} userId
|
64
|
+
* @param {string} queryIdOrSlug
|
65
|
+
* @param {Vital.AggregateGetTaskHistoryForContinuousQueryRequest} request
|
66
|
+
* @param {Aggregate.RequestOptions} requestOptions - Request-specific configuration.
|
67
|
+
*
|
68
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
69
|
+
*
|
70
|
+
* @example
|
71
|
+
* await client.aggregate.getTaskHistoryForContinuousQuery("user_id", "query_id_or_slug")
|
72
|
+
*/
|
73
|
+
getTaskHistoryForContinuousQuery(userId: string, queryIdOrSlug: string, request?: Vital.AggregateGetTaskHistoryForContinuousQueryRequest, requestOptions?: Aggregate.RequestOptions): Promise<Vital.ContinuousQueryTaskHistoryResponse>;
|
62
74
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
63
75
|
"x-vital-api-key": string | undefined;
|
64
76
|
}>;
|
@@ -81,7 +81,7 @@ class Aggregate {
|
|
81
81
|
const _response = yield core.fetcher({
|
82
82
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/query`),
|
83
83
|
method: "POST",
|
84
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
84
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
|
85
85
|
contentType: "application/json",
|
86
86
|
requestType: "json",
|
87
87
|
body: serializers.QueryBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -144,7 +144,7 @@ class Aggregate {
|
|
144
144
|
const _response = yield core.fetcher({
|
145
145
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/result_table`),
|
146
146
|
method: "GET",
|
147
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
147
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
|
148
148
|
contentType: "application/json",
|
149
149
|
requestType: "json",
|
150
150
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -190,6 +190,78 @@ class Aggregate {
|
|
190
190
|
}
|
191
191
|
});
|
192
192
|
}
|
193
|
+
/**
|
194
|
+
* @param {string} userId
|
195
|
+
* @param {string} queryIdOrSlug
|
196
|
+
* @param {Vital.AggregateGetTaskHistoryForContinuousQueryRequest} request
|
197
|
+
* @param {Aggregate.RequestOptions} requestOptions - Request-specific configuration.
|
198
|
+
*
|
199
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
200
|
+
*
|
201
|
+
* @example
|
202
|
+
* await client.aggregate.getTaskHistoryForContinuousQuery("user_id", "query_id_or_slug")
|
203
|
+
*/
|
204
|
+
getTaskHistoryForContinuousQuery(userId, queryIdOrSlug, request = {}, requestOptions) {
|
205
|
+
var _a;
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
207
|
+
const { nextCursor, limit } = request;
|
208
|
+
const _queryParams = {};
|
209
|
+
if (nextCursor != null) {
|
210
|
+
_queryParams["next_cursor"] = nextCursor;
|
211
|
+
}
|
212
|
+
if (limit != null) {
|
213
|
+
_queryParams["limit"] = limit.toString();
|
214
|
+
}
|
215
|
+
const _response = yield core.fetcher({
|
216
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/task_history`),
|
217
|
+
method: "GET",
|
218
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
219
|
+
contentType: "application/json",
|
220
|
+
queryParameters: _queryParams,
|
221
|
+
requestType: "json",
|
222
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
223
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
224
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
225
|
+
});
|
226
|
+
if (_response.ok) {
|
227
|
+
return serializers.ContinuousQueryTaskHistoryResponse.parseOrThrow(_response.body, {
|
228
|
+
unrecognizedObjectKeys: "passthrough",
|
229
|
+
allowUnrecognizedUnionMembers: true,
|
230
|
+
allowUnrecognizedEnumValues: true,
|
231
|
+
breadcrumbsPrefix: ["response"],
|
232
|
+
});
|
233
|
+
}
|
234
|
+
if (_response.error.reason === "status-code") {
|
235
|
+
switch (_response.error.statusCode) {
|
236
|
+
case 422:
|
237
|
+
throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
238
|
+
unrecognizedObjectKeys: "passthrough",
|
239
|
+
allowUnrecognizedUnionMembers: true,
|
240
|
+
allowUnrecognizedEnumValues: true,
|
241
|
+
breadcrumbsPrefix: ["response"],
|
242
|
+
}));
|
243
|
+
default:
|
244
|
+
throw new errors.VitalError({
|
245
|
+
statusCode: _response.error.statusCode,
|
246
|
+
body: _response.error.body,
|
247
|
+
});
|
248
|
+
}
|
249
|
+
}
|
250
|
+
switch (_response.error.reason) {
|
251
|
+
case "non-json":
|
252
|
+
throw new errors.VitalError({
|
253
|
+
statusCode: _response.error.statusCode,
|
254
|
+
body: _response.error.rawBody,
|
255
|
+
});
|
256
|
+
case "timeout":
|
257
|
+
throw new errors.VitalTimeoutError();
|
258
|
+
case "unknown":
|
259
|
+
throw new errors.VitalError({
|
260
|
+
message: _response.error.errorMessage,
|
261
|
+
});
|
262
|
+
}
|
263
|
+
});
|
264
|
+
}
|
193
265
|
_getCustomAuthorizationHeaders() {
|
194
266
|
return __awaiter(this, void 0, void 0, function* () {
|
195
267
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
@@ -78,7 +78,7 @@ class Body {
|
|
78
78
|
const _response = yield core.fetcher({
|
79
79
|
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/${encodeURIComponent(userId)}`),
|
80
80
|
method: "GET",
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
82
|
contentType: "application/json",
|
83
83
|
queryParameters: _queryParams,
|
84
84
|
requestType: "json",
|
@@ -154,7 +154,7 @@ class Body {
|
|
154
154
|
const _response = yield core.fetcher({
|
155
155
|
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/${encodeURIComponent(userId)}/raw`),
|
156
156
|
method: "GET",
|
157
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
157
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
158
158
|
contentType: "application/json",
|
159
159
|
queryParameters: _queryParams,
|
160
160
|
requestType: "json",
|
@@ -72,7 +72,7 @@ class Devices {
|
|
72
72
|
const _response = yield core.fetcher({
|
73
73
|
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/${encodeURIComponent(userId)}/raw`),
|
74
74
|
method: "GET",
|
75
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
76
76
|
contentType: "application/json",
|
77
77
|
queryParameters: _queryParams,
|
78
78
|
requestType: "json",
|
@@ -78,7 +78,7 @@ class Electrocardiogram {
|
|
78
78
|
const _response = yield core.fetcher({
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/electrocardiogram/${encodeURIComponent(userId)}`),
|
80
80
|
method: "GET",
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
82
82
|
contentType: "application/json",
|
83
83
|
queryParameters: _queryParams,
|
84
84
|
requestType: "json",
|
@@ -75,7 +75,7 @@ class Insurance {
|
|
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, "v3/insurance/search/payor"),
|
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.255", "User-Agent": "@tryvital/vital-node/3.1.255", "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
|
requestType: "json",
|
@@ -137,7 +137,7 @@ class Insurance {
|
|
137
137
|
const _response = yield core.fetcher({
|
138
138
|
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"),
|
139
139
|
method: "POST",
|
140
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
140
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
141
141
|
contentType: "application/json",
|
142
142
|
requestType: "json",
|
143
143
|
body: serializers.PayorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -204,7 +204,7 @@ class Insurance {
|
|
204
204
|
const _response = yield core.fetcher({
|
205
205
|
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"),
|
206
206
|
method: "GET",
|
207
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
207
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
208
208
|
contentType: "application/json",
|
209
209
|
queryParameters: _queryParams,
|
210
210
|
requestType: "json",
|
@@ -81,7 +81,7 @@ class Introspect {
|
|
81
81
|
const _response = yield core.fetcher({
|
82
82
|
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"),
|
83
83
|
method: "GET",
|
84
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
84
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
85
85
|
contentType: "application/json",
|
86
86
|
queryParameters: _queryParams,
|
87
87
|
requestType: "json",
|
@@ -160,7 +160,7 @@ class Introspect {
|
|
160
160
|
const _response = yield core.fetcher({
|
161
161
|
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"),
|
162
162
|
method: "GET",
|
163
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
163
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.255", "User-Agent": "@tryvital/vital-node/3.1.255", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
164
164
|
contentType: "application/json",
|
165
165
|
queryParameters: _queryParams,
|
166
166
|
requestType: "json",
|