@tryvital/vital-node 3.0.7 → 3.0.8
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/Client.d.ts +1 -0
- package/api/errors/BadRequestError.js +1 -0
- package/api/errors/UnprocessableEntityError.js +1 -0
- package/api/resources/activity/client/Client.d.ts +11 -0
- package/api/resources/activity/client/Client.js +22 -11
- package/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
- package/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
- package/api/resources/body/client/Client.d.ts +11 -0
- package/api/resources/body/client/Client.js +22 -11
- package/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
- package/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
- package/api/resources/devices/client/Client.d.ts +4 -0
- package/api/resources/devices/client/Client.js +7 -4
- package/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
- package/api/resources/insurance/client/Client.d.ts +6 -0
- package/api/resources/insurance/client/Client.js +11 -5
- package/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
- package/api/resources/introspect/client/Client.d.ts +11 -0
- package/api/resources/introspect/client/Client.js +24 -13
- package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
- package/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
- package/api/resources/labTests/client/Client.d.ts +21 -1
- package/api/resources/labTests/client/Client.js +115 -59
- package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
- package/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
- package/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/api/resources/link/client/Client.d.ts +7 -0
- package/api/resources/link/client/Client.js +35 -17
- package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
- package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
- package/api/resources/meal/client/Client.d.ts +6 -0
- package/api/resources/meal/client/Client.js +11 -6
- package/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
- package/api/resources/profile/client/Client.d.ts +1 -0
- package/api/resources/profile/client/Client.js +8 -7
- package/api/resources/providers/client/Client.d.ts +4 -0
- package/api/resources/providers/client/Client.js +5 -1
- package/api/resources/sleep/client/Client.d.ts +19 -0
- package/api/resources/sleep/client/Client.js +38 -17
- package/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
- package/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
- package/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
- package/api/resources/team/client/Client.d.ts +18 -0
- package/api/resources/team/client/Client.js +37 -14
- package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
- package/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
- package/api/resources/testkit/client/Client.d.ts +1 -0
- package/api/resources/testkit/client/Client.js +4 -2
- package/api/resources/user/client/Client.d.ts +7 -0
- package/api/resources/user/client/Client.js +33 -17
- package/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
- package/api/resources/vitals/client/Client.d.ts +116 -0
- package/api/resources/vitals/client/Client.js +253 -116
- package/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
- package/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
- package/api/resources/workouts/client/Client.d.ts +14 -0
- package/api/resources/workouts/client/Client.js +27 -12
- package/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
- package/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
- package/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
- package/api/types/ClientFacingLabTest.d.ts +1 -1
- package/api/types/ClientFacingOrder.d.ts +1 -1
- package/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
- package/api/types/ClientFacingSleep.d.ts +1 -1
- package/api/types/ClientFacingUser.d.ts +0 -1
- package/api/types/FallbackTimeZone.d.ts +0 -1
- package/api/types/index.d.ts +7 -7
- package/api/types/index.js +7 -7
- package/core/fetcher/APIResponse.d.ts +1 -0
- package/core/fetcher/Fetcher.d.ts +3 -6
- package/core/fetcher/Fetcher.js +70 -26
- package/core/fetcher/getHeader.d.ts +1 -0
- package/{dist/core/streaming-fetcher → core/fetcher}/getHeader.js +2 -2
- package/core/fetcher/index.d.ts +1 -0
- package/core/fetcher/index.js +3 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +1 -0
- package/core/schemas/builders/literals/index.js +3 -1
- package/core/schemas/builders/object/index.d.ts +2 -0
- package/core/schemas/builders/object/index.js +3 -1
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/Client.d.ts +1 -0
- package/dist/api/errors/BadRequestError.js +1 -0
- package/dist/api/errors/UnprocessableEntityError.js +1 -0
- package/dist/api/resources/activity/client/Client.d.ts +11 -0
- package/dist/api/resources/activity/client/Client.js +22 -11
- package/dist/api/resources/activity/client/requests/ActivityGetRawRequest.d.ts +6 -0
- package/dist/api/resources/activity/client/requests/ActivityGetRequest.d.ts +6 -0
- package/dist/api/resources/body/client/Client.d.ts +11 -0
- package/dist/api/resources/body/client/Client.js +22 -11
- package/dist/api/resources/body/client/requests/BodyGetRawRequest.d.ts +6 -0
- package/dist/api/resources/body/client/requests/BodyGetRequest.d.ts +6 -0
- package/dist/api/resources/devices/client/Client.d.ts +4 -0
- package/dist/api/resources/devices/client/Client.js +7 -4
- package/dist/api/resources/devices/client/requests/DevicesGetRawRequest.d.ts +4 -0
- package/dist/api/resources/insurance/client/Client.d.ts +6 -0
- package/dist/api/resources/insurance/client/Client.js +11 -5
- package/dist/api/resources/insurance/client/requests/InsuranceSearchDiagnosisRequest.d.ts +6 -0
- package/dist/api/resources/introspect/client/Client.d.ts +11 -0
- package/dist/api/resources/introspect/client/Client.js +24 -13
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +6 -0
- package/dist/api/resources/introspect/client/requests/IntrospectGetUserResourcesRequest.d.ts +6 -0
- package/dist/api/resources/labTests/client/Client.d.ts +21 -1
- package/dist/api/resources/labTests/client/Client.js +115 -59
- package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersForLabTestRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +4 -0
- package/dist/api/resources/labTests/client/requests/LabTestsGetOrdersRequest.d.ts +4 -0
- package/dist/api/resources/link/client/Client.d.ts +7 -0
- package/dist/api/resources/link/client/Client.js +35 -17
- package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +4 -0
- package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +4 -0
- package/dist/api/resources/meal/client/Client.d.ts +6 -0
- package/dist/api/resources/meal/client/Client.js +11 -6
- package/dist/api/resources/meal/client/requests/MealGetRequest.d.ts +6 -0
- package/dist/api/resources/profile/client/Client.d.ts +1 -0
- package/dist/api/resources/profile/client/Client.js +8 -7
- package/dist/api/resources/providers/client/Client.d.ts +4 -0
- package/dist/api/resources/providers/client/Client.js +5 -1
- package/dist/api/resources/sleep/client/Client.d.ts +19 -0
- package/dist/api/resources/sleep/client/Client.js +38 -17
- package/dist/api/resources/sleep/client/requests/SleepGetRawRequest.d.ts +6 -0
- package/dist/api/resources/sleep/client/requests/SleepGetRequest.d.ts +6 -0
- package/dist/api/resources/sleep/client/requests/SleepGetStreamRequest.d.ts +6 -0
- package/dist/api/resources/team/client/Client.d.ts +18 -0
- package/dist/api/resources/team/client/Client.js +37 -14
- package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamGetSourcePrioritiesRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamGetUserByIdRequest.d.ts +4 -0
- package/dist/api/resources/team/client/requests/TeamUpdateSourcePrioritiesRequest.d.ts +6 -0
- package/dist/api/resources/testkit/client/Client.d.ts +1 -0
- package/dist/api/resources/testkit/client/Client.js +4 -2
- package/dist/api/resources/user/client/Client.d.ts +7 -0
- package/dist/api/resources/user/client/Client.js +33 -17
- package/dist/api/resources/user/client/requests/UserPatchBody.d.ts +4 -0
- package/dist/api/resources/vitals/client/Client.d.ts +116 -0
- package/dist/api/resources/vitals/client/Client.js +253 -116
- package/dist/api/resources/vitals/client/requests/VitalsBloodOxygenRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsBloodPressureRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaffeineRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesActiveRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCaloriesBasalRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolHdlRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolLdlRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsCholesterolTotalRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsDistanceRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsElectrocardiogramVoltageRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsFloorsClimbedRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsGlucoseRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHeartrateRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHrvRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsHypnogramRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsIgeRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsIggRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsMindfulnessMinutesRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsRespiratoryRateRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsStepsRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsTriglyceridesRequest.d.ts +6 -0
- package/dist/api/resources/vitals/client/requests/VitalsWaterRequest.d.ts +6 -0
- package/dist/api/resources/workouts/client/Client.d.ts +14 -0
- package/dist/api/resources/workouts/client/Client.js +27 -12
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRawRequest.d.ts +6 -0
- package/dist/api/resources/workouts/client/requests/WorkoutsGetRequest.d.ts +6 -0
- package/dist/api/types/ClientFacingDiagnosisInformation.d.ts +2 -2
- package/dist/api/types/ClientFacingLabTest.d.ts +1 -1
- package/dist/api/types/ClientFacingOrder.d.ts +1 -1
- package/dist/api/types/ClientFacingPayorSearchResponse.d.ts +3 -3
- package/dist/api/types/ClientFacingSleep.d.ts +1 -1
- package/dist/api/types/ClientFacingUser.d.ts +0 -1
- package/dist/api/types/FallbackTimeZone.d.ts +0 -1
- package/dist/api/types/index.d.ts +7 -7
- package/dist/api/types/index.js +7 -7
- package/dist/core/fetcher/APIResponse.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +3 -6
- package/dist/core/fetcher/Fetcher.js +70 -26
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/{core/streaming-fetcher → dist/core/fetcher}/getHeader.js +2 -2
- package/dist/core/fetcher/index.d.ts +1 -0
- package/dist/core/fetcher/index.js +3 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +1 -0
- package/dist/core/schemas/builders/literals/index.js +3 -1
- package/dist/core/schemas/builders/object/index.d.ts +2 -0
- package/dist/core/schemas/builders/object/index.js +3 -1
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/serialization/types/index.d.ts +7 -7
- package/dist/serialization/types/index.js +7 -7
- package/package.json +7 -4
- package/serialization/types/index.d.ts +7 -7
- package/serialization/types/index.js +7 -7
- package/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
- package/core/streaming-fetcher/StreamingFetcher.js +0 -79
- package/core/streaming-fetcher/getHeader.d.ts +0 -2
- package/core/streaming-fetcher/index.d.ts +0 -3
- package/core/streaming-fetcher/index.js +0 -7
- package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +0 -30
- package/dist/core/streaming-fetcher/StreamingFetcher.js +0 -79
- package/dist/core/streaming-fetcher/getHeader.d.ts +0 -2
- package/dist/core/streaming-fetcher/index.d.ts +0 -3
- package/dist/core/streaming-fetcher/index.js +0 -7
@@ -11,6 +11,7 @@ export declare namespace Team {
|
|
11
11
|
}
|
12
12
|
interface RequestOptions {
|
13
13
|
timeoutInSeconds?: number;
|
14
|
+
maxRetries?: number;
|
14
15
|
}
|
15
16
|
}
|
16
17
|
export declare class Team {
|
@@ -19,6 +20,9 @@ export declare class Team {
|
|
19
20
|
/**
|
20
21
|
* Post teams.
|
21
22
|
* @throws {@link Vital.UnprocessableEntityError}
|
23
|
+
*
|
24
|
+
* @example
|
25
|
+
* await vital.team.getLinkConfig({})
|
22
26
|
*/
|
23
27
|
getLinkConfig(request?: Vital.TeamGetLinkConfigRequest, requestOptions?: Team.RequestOptions): Promise<Record<string, unknown>>;
|
24
28
|
/**
|
@@ -29,21 +33,35 @@ export declare class Team {
|
|
29
33
|
/**
|
30
34
|
* Search team users by user_id
|
31
35
|
* @throws {@link Vital.UnprocessableEntityError}
|
36
|
+
*
|
37
|
+
* @example
|
38
|
+
* await vital.team.getUserById({})
|
32
39
|
*/
|
33
40
|
getUserById(request?: Vital.TeamGetUserByIdRequest, requestOptions?: Team.RequestOptions): Promise<Vital.ClientFacingUser[]>;
|
34
41
|
getSvixUrl(requestOptions?: Team.RequestOptions): Promise<Record<string, unknown>>;
|
35
42
|
/**
|
36
43
|
* GET source priorities.
|
37
44
|
* @throws {@link Vital.UnprocessableEntityError}
|
45
|
+
*
|
46
|
+
* @example
|
47
|
+
* await vital.team.getSourcePriorities({})
|
38
48
|
*/
|
39
49
|
getSourcePriorities(request?: Vital.TeamGetSourcePrioritiesRequest, requestOptions?: Team.RequestOptions): Promise<Record<string, unknown>[]>;
|
40
50
|
/**
|
41
51
|
* Patch source priorities.
|
42
52
|
* @throws {@link Vital.UnprocessableEntityError}
|
53
|
+
*
|
54
|
+
* @example
|
55
|
+
* await vital.team.updateSourcePriorities({
|
56
|
+
* teamId: "team-id"
|
57
|
+
* })
|
43
58
|
*/
|
44
59
|
updateSourcePriorities(request: Vital.TeamUpdateSourcePrioritiesRequest, requestOptions?: Team.RequestOptions): Promise<Record<string, unknown>[]>;
|
45
60
|
/**
|
46
61
|
* @throws {@link Vital.UnprocessableEntityError}
|
62
|
+
*
|
63
|
+
* @example
|
64
|
+
* await vital.team.getPhysicians("team-id")
|
47
65
|
*/
|
48
66
|
getPhysicians(teamId: string, requestOptions?: Team.RequestOptions): Promise<Vital.ClientFacingPhysician[]>;
|
49
67
|
}
|
@@ -45,7 +45,6 @@ const Vital = __importStar(require("../../.."));
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
46
46
|
const serializers = __importStar(require("../../../../serialization"));
|
47
47
|
const errors = __importStar(require("../../../../errors"));
|
48
|
-
const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
|
49
48
|
class Team {
|
50
49
|
constructor(_options) {
|
51
50
|
this._options = _options;
|
@@ -53,6 +52,9 @@ class Team {
|
|
53
52
|
/**
|
54
53
|
* Post teams.
|
55
54
|
* @throws {@link Vital.UnprocessableEntityError}
|
55
|
+
*
|
56
|
+
* @example
|
57
|
+
* await vital.team.getLinkConfig({})
|
56
58
|
*/
|
57
59
|
getLinkConfig(request = {}, requestOptions) {
|
58
60
|
var _a;
|
@@ -65,11 +67,12 @@ class Team {
|
|
65
67
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
66
68
|
"X-Fern-Language": "JavaScript",
|
67
69
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
68
|
-
"X-Fern-SDK-Version": "3.0.
|
70
|
+
"X-Fern-SDK-Version": "3.0.8",
|
69
71
|
"x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined,
|
70
72
|
},
|
71
73
|
contentType: "application/json",
|
72
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
75
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
73
76
|
});
|
74
77
|
if (_response.ok) {
|
75
78
|
return yield serializers.team.getLinkConfig.Response.parseOrThrow(_response.body, {
|
@@ -124,10 +127,11 @@ class Team {
|
|
124
127
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
125
128
|
"X-Fern-Language": "JavaScript",
|
126
129
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
127
|
-
"X-Fern-SDK-Version": "3.0.
|
130
|
+
"X-Fern-SDK-Version": "3.0.8",
|
128
131
|
},
|
129
132
|
contentType: "application/json",
|
130
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
134
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
131
135
|
});
|
132
136
|
if (_response.ok) {
|
133
137
|
return yield serializers.ClientFacingTeam.parseOrThrow(_response.body, {
|
@@ -171,14 +175,17 @@ class Team {
|
|
171
175
|
/**
|
172
176
|
* Search team users by user_id
|
173
177
|
* @throws {@link Vital.UnprocessableEntityError}
|
178
|
+
*
|
179
|
+
* @example
|
180
|
+
* await vital.team.getUserById({})
|
174
181
|
*/
|
175
182
|
getUserById(request = {}, requestOptions) {
|
176
183
|
var _a;
|
177
184
|
return __awaiter(this, void 0, void 0, function* () {
|
178
185
|
const { queryId } = request;
|
179
|
-
const _queryParams =
|
186
|
+
const _queryParams = {};
|
180
187
|
if (queryId != null) {
|
181
|
-
_queryParams
|
188
|
+
_queryParams["query_id"] = queryId;
|
182
189
|
}
|
183
190
|
const _response = yield core.fetcher({
|
184
191
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/users/search"),
|
@@ -187,11 +194,12 @@ class Team {
|
|
187
194
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
188
195
|
"X-Fern-Language": "JavaScript",
|
189
196
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
190
|
-
"X-Fern-SDK-Version": "3.0.
|
197
|
+
"X-Fern-SDK-Version": "3.0.8",
|
191
198
|
},
|
192
199
|
contentType: "application/json",
|
193
200
|
queryParameters: _queryParams,
|
194
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
202
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
195
203
|
});
|
196
204
|
if (_response.ok) {
|
197
205
|
return yield serializers.team.getUserById.Response.parseOrThrow(_response.body, {
|
@@ -242,10 +250,11 @@ class Team {
|
|
242
250
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
243
251
|
"X-Fern-Language": "JavaScript",
|
244
252
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
245
|
-
"X-Fern-SDK-Version": "3.0.
|
253
|
+
"X-Fern-SDK-Version": "3.0.8",
|
246
254
|
},
|
247
255
|
contentType: "application/json",
|
248
256
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
257
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
249
258
|
});
|
250
259
|
if (_response.ok) {
|
251
260
|
return yield serializers.team.getSvixUrl.Response.parseOrThrow(_response.body, {
|
@@ -279,14 +288,17 @@ class Team {
|
|
279
288
|
/**
|
280
289
|
* GET source priorities.
|
281
290
|
* @throws {@link Vital.UnprocessableEntityError}
|
291
|
+
*
|
292
|
+
* @example
|
293
|
+
* await vital.team.getSourcePriorities({})
|
282
294
|
*/
|
283
295
|
getSourcePriorities(request = {}, requestOptions) {
|
284
296
|
var _a;
|
285
297
|
return __awaiter(this, void 0, void 0, function* () {
|
286
298
|
const { dataType } = request;
|
287
|
-
const _queryParams =
|
299
|
+
const _queryParams = {};
|
288
300
|
if (dataType != null) {
|
289
|
-
_queryParams
|
301
|
+
_queryParams["data_type"] = dataType;
|
290
302
|
}
|
291
303
|
const _response = yield core.fetcher({
|
292
304
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/source/priorities"),
|
@@ -295,11 +307,12 @@ class Team {
|
|
295
307
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
296
308
|
"X-Fern-Language": "JavaScript",
|
297
309
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
298
|
-
"X-Fern-SDK-Version": "3.0.
|
310
|
+
"X-Fern-SDK-Version": "3.0.8",
|
299
311
|
},
|
300
312
|
contentType: "application/json",
|
301
313
|
queryParameters: _queryParams,
|
302
314
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
315
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
303
316
|
});
|
304
317
|
if (_response.ok) {
|
305
318
|
return yield serializers.team.getSourcePriorities.Response.parseOrThrow(_response.body, {
|
@@ -343,13 +356,18 @@ class Team {
|
|
343
356
|
/**
|
344
357
|
* Patch source priorities.
|
345
358
|
* @throws {@link Vital.UnprocessableEntityError}
|
359
|
+
*
|
360
|
+
* @example
|
361
|
+
* await vital.team.updateSourcePriorities({
|
362
|
+
* teamId: "team-id"
|
363
|
+
* })
|
346
364
|
*/
|
347
365
|
updateSourcePriorities(request, requestOptions) {
|
348
366
|
var _a;
|
349
367
|
return __awaiter(this, void 0, void 0, function* () {
|
350
368
|
const { teamId } = request;
|
351
|
-
const _queryParams =
|
352
|
-
_queryParams
|
369
|
+
const _queryParams = {};
|
370
|
+
_queryParams["team_id"] = teamId;
|
353
371
|
const _response = yield core.fetcher({
|
354
372
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/source/priorities"),
|
355
373
|
method: "PATCH",
|
@@ -357,11 +375,12 @@ class Team {
|
|
357
375
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
358
376
|
"X-Fern-Language": "JavaScript",
|
359
377
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
360
|
-
"X-Fern-SDK-Version": "3.0.
|
378
|
+
"X-Fern-SDK-Version": "3.0.8",
|
361
379
|
},
|
362
380
|
contentType: "application/json",
|
363
381
|
queryParameters: _queryParams,
|
364
382
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
383
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
365
384
|
});
|
366
385
|
if (_response.ok) {
|
367
386
|
return yield serializers.team.updateSourcePriorities.Response.parseOrThrow(_response.body, {
|
@@ -404,6 +423,9 @@ class Team {
|
|
404
423
|
}
|
405
424
|
/**
|
406
425
|
* @throws {@link Vital.UnprocessableEntityError}
|
426
|
+
*
|
427
|
+
* @example
|
428
|
+
* await vital.team.getPhysicians("team-id")
|
407
429
|
*/
|
408
430
|
getPhysicians(teamId, requestOptions) {
|
409
431
|
var _a;
|
@@ -415,10 +437,11 @@ class Team {
|
|
415
437
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
416
438
|
"X-Fern-Language": "JavaScript",
|
417
439
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
418
|
-
"X-Fern-SDK-Version": "3.0.
|
440
|
+
"X-Fern-SDK-Version": "3.0.8",
|
419
441
|
},
|
420
442
|
contentType: "application/json",
|
421
443
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
444
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
422
445
|
});
|
423
446
|
if (_response.ok) {
|
424
447
|
return yield serializers.team.getPhysicians.Response.parseOrThrow(_response.body, {
|
@@ -62,11 +62,12 @@ class Testkit {
|
|
62
62
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
63
63
|
"X-Fern-Language": "JavaScript",
|
64
64
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
65
|
-
"X-Fern-SDK-Version": "3.0.
|
65
|
+
"X-Fern-SDK-Version": "3.0.8",
|
66
66
|
},
|
67
67
|
contentType: "application/json",
|
68
68
|
body: yield serializers.RegisterTestkitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
69
69
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
70
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
70
71
|
});
|
71
72
|
if (_response.ok) {
|
72
73
|
return yield serializers.PostOrderResponse.parseOrThrow(_response.body, {
|
@@ -121,13 +122,14 @@ class Testkit {
|
|
121
122
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
122
123
|
"X-Fern-Language": "JavaScript",
|
123
124
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
124
|
-
"X-Fern-SDK-Version": "3.0.
|
125
|
+
"X-Fern-SDK-Version": "3.0.8",
|
125
126
|
},
|
126
127
|
contentType: "application/json",
|
127
128
|
body: yield serializers.CreateRegistrableTestkitOrderRequest.jsonOrThrow(request, {
|
128
129
|
unrecognizedObjectKeys: "strip",
|
129
130
|
}),
|
130
131
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
132
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
131
133
|
});
|
132
134
|
if (_response.ok) {
|
133
135
|
return yield serializers.PostOrderResponse.parseOrThrow(_response.body, {
|
@@ -11,6 +11,7 @@ export declare namespace User {
|
|
11
11
|
}
|
12
12
|
interface RequestOptions {
|
13
13
|
timeoutInSeconds?: number;
|
14
|
+
maxRetries?: number;
|
14
15
|
}
|
15
16
|
}
|
16
17
|
export declare class User {
|
@@ -37,6 +38,9 @@ export declare class User {
|
|
37
38
|
/**
|
38
39
|
* GET Users connected providers
|
39
40
|
* @throws {@link Vital.UnprocessableEntityError}
|
41
|
+
*
|
42
|
+
* @example
|
43
|
+
* await vital.user.getConnectedProviders("user-id")
|
40
44
|
*/
|
41
45
|
getConnectedProviders(userId: string, requestOptions?: User.RequestOptions): Promise<Record<string, Vital.ClientFacingProviderWithStatus[]>>;
|
42
46
|
/**
|
@@ -50,6 +54,9 @@ export declare class User {
|
|
50
54
|
delete(userId: string, requestOptions?: User.RequestOptions): Promise<Vital.UserSuccessResponse>;
|
51
55
|
/**
|
52
56
|
* @throws {@link Vital.UnprocessableEntityError}
|
57
|
+
*
|
58
|
+
* @example
|
59
|
+
* await vital.user.patch("user-id", {})
|
53
60
|
*/
|
54
61
|
patch(userId: string, request?: Vital.UserPatchBody, requestOptions?: User.RequestOptions): Promise<void>;
|
55
62
|
/**
|
@@ -42,7 +42,6 @@ exports.User = void 0;
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
43
43
|
const core = __importStar(require("../../../../core"));
|
44
44
|
const Vital = __importStar(require("../../.."));
|
45
|
-
const url_search_params_1 = __importDefault(require("@ungap/url-search-params"));
|
46
45
|
const url_join_1 = __importDefault(require("url-join"));
|
47
46
|
const serializers = __importStar(require("../../../../serialization"));
|
48
47
|
const errors = __importStar(require("../../../../errors"));
|
@@ -58,12 +57,12 @@ class User {
|
|
58
57
|
var _a;
|
59
58
|
return __awaiter(this, void 0, void 0, function* () {
|
60
59
|
const { offset, limit } = request;
|
61
|
-
const _queryParams =
|
60
|
+
const _queryParams = {};
|
62
61
|
if (offset != null) {
|
63
|
-
_queryParams
|
62
|
+
_queryParams["offset"] = offset.toString();
|
64
63
|
}
|
65
64
|
if (limit != null) {
|
66
|
-
_queryParams
|
65
|
+
_queryParams["limit"] = limit.toString();
|
67
66
|
}
|
68
67
|
const _response = yield core.fetcher({
|
69
68
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/user"),
|
@@ -72,11 +71,12 @@ class User {
|
|
72
71
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
73
72
|
"X-Fern-Language": "JavaScript",
|
74
73
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
75
|
-
"X-Fern-SDK-Version": "3.0.
|
74
|
+
"X-Fern-SDK-Version": "3.0.8",
|
76
75
|
},
|
77
76
|
contentType: "application/json",
|
78
77
|
queryParameters: _queryParams,
|
79
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
79
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
80
80
|
});
|
81
81
|
if (_response.ok) {
|
82
82
|
return yield serializers.PaginatedUsersResponse.parseOrThrow(_response.body, {
|
@@ -131,11 +131,12 @@ class User {
|
|
131
131
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
132
132
|
"X-Fern-Language": "JavaScript",
|
133
133
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
134
|
-
"X-Fern-SDK-Version": "3.0.
|
134
|
+
"X-Fern-SDK-Version": "3.0.8",
|
135
135
|
},
|
136
136
|
contentType: "application/json",
|
137
137
|
body: yield serializers.UserCreateBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
139
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
139
140
|
});
|
140
141
|
if (_response.ok) {
|
141
142
|
return yield serializers.ClientFacingUserKey.parseOrThrow(_response.body, {
|
@@ -189,10 +190,11 @@ class User {
|
|
189
190
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
190
191
|
"X-Fern-Language": "JavaScript",
|
191
192
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
192
|
-
"X-Fern-SDK-Version": "3.0.
|
193
|
+
"X-Fern-SDK-Version": "3.0.8",
|
193
194
|
},
|
194
195
|
contentType: "application/json",
|
195
196
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
197
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
196
198
|
});
|
197
199
|
if (_response.ok) {
|
198
200
|
return yield serializers.MetricsResult.parseOrThrow(_response.body, {
|
@@ -236,10 +238,11 @@ class User {
|
|
236
238
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
237
239
|
"X-Fern-Language": "JavaScript",
|
238
240
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
239
|
-
"X-Fern-SDK-Version": "3.0.
|
241
|
+
"X-Fern-SDK-Version": "3.0.8",
|
240
242
|
},
|
241
243
|
contentType: "application/json",
|
242
244
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
245
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
243
246
|
});
|
244
247
|
if (_response.ok) {
|
245
248
|
return yield serializers.UserSignInTokenResponse.parseOrThrow(_response.body, {
|
@@ -283,6 +286,9 @@ class User {
|
|
283
286
|
/**
|
284
287
|
* GET Users connected providers
|
285
288
|
* @throws {@link Vital.UnprocessableEntityError}
|
289
|
+
*
|
290
|
+
* @example
|
291
|
+
* await vital.user.getConnectedProviders("user-id")
|
286
292
|
*/
|
287
293
|
getConnectedProviders(userId, requestOptions) {
|
288
294
|
var _a;
|
@@ -294,10 +300,11 @@ class User {
|
|
294
300
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
295
301
|
"X-Fern-Language": "JavaScript",
|
296
302
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
297
|
-
"X-Fern-SDK-Version": "3.0.
|
303
|
+
"X-Fern-SDK-Version": "3.0.8",
|
298
304
|
},
|
299
305
|
contentType: "application/json",
|
300
306
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
307
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
301
308
|
});
|
302
309
|
if (_response.ok) {
|
303
310
|
return yield serializers.user.getConnectedProviders.Response.parseOrThrow(_response.body, {
|
@@ -352,10 +359,11 @@ class User {
|
|
352
359
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
353
360
|
"X-Fern-Language": "JavaScript",
|
354
361
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
355
|
-
"X-Fern-SDK-Version": "3.0.
|
362
|
+
"X-Fern-SDK-Version": "3.0.8",
|
356
363
|
},
|
357
364
|
contentType: "application/json",
|
358
365
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
366
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
359
367
|
});
|
360
368
|
if (_response.ok) {
|
361
369
|
return yield serializers.ClientFacingUser.parseOrThrow(_response.body, {
|
@@ -409,10 +417,11 @@ class User {
|
|
409
417
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
410
418
|
"X-Fern-Language": "JavaScript",
|
411
419
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
412
|
-
"X-Fern-SDK-Version": "3.0.
|
420
|
+
"X-Fern-SDK-Version": "3.0.8",
|
413
421
|
},
|
414
422
|
contentType: "application/json",
|
415
423
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
424
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
416
425
|
});
|
417
426
|
if (_response.ok) {
|
418
427
|
return yield serializers.UserSuccessResponse.parseOrThrow(_response.body, {
|
@@ -455,6 +464,9 @@ class User {
|
|
455
464
|
}
|
456
465
|
/**
|
457
466
|
* @throws {@link Vital.UnprocessableEntityError}
|
467
|
+
*
|
468
|
+
* @example
|
469
|
+
* await vital.user.patch("user-id", {})
|
458
470
|
*/
|
459
471
|
patch(userId, request = {}, requestOptions) {
|
460
472
|
var _a;
|
@@ -466,11 +478,12 @@ class User {
|
|
466
478
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
467
479
|
"X-Fern-Language": "JavaScript",
|
468
480
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
469
|
-
"X-Fern-SDK-Version": "3.0.
|
481
|
+
"X-Fern-SDK-Version": "3.0.8",
|
470
482
|
},
|
471
483
|
contentType: "application/json",
|
472
484
|
body: yield serializers.UserPatchBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
473
485
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
486
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
474
487
|
});
|
475
488
|
if (_response.ok) {
|
476
489
|
return;
|
@@ -520,10 +533,11 @@ class User {
|
|
520
533
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
521
534
|
"X-Fern-Language": "JavaScript",
|
522
535
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
523
|
-
"X-Fern-SDK-Version": "3.0.
|
536
|
+
"X-Fern-SDK-Version": "3.0.8",
|
524
537
|
},
|
525
538
|
contentType: "application/json",
|
526
539
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
540
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
527
541
|
});
|
528
542
|
if (_response.ok) {
|
529
543
|
return yield serializers.ClientFacingUser.parseOrThrow(_response.body, {
|
@@ -577,10 +591,11 @@ class User {
|
|
577
591
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
578
592
|
"X-Fern-Language": "JavaScript",
|
579
593
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
580
|
-
"X-Fern-SDK-Version": "3.0.
|
594
|
+
"X-Fern-SDK-Version": "3.0.8",
|
581
595
|
},
|
582
596
|
contentType: "application/json",
|
583
597
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
598
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
584
599
|
});
|
585
600
|
if (_response.ok) {
|
586
601
|
return yield serializers.UserSuccessResponse.parseOrThrow(_response.body, {
|
@@ -630,9 +645,9 @@ class User {
|
|
630
645
|
var _a;
|
631
646
|
return __awaiter(this, void 0, void 0, function* () {
|
632
647
|
const { timeout } = request;
|
633
|
-
const _queryParams =
|
648
|
+
const _queryParams = {};
|
634
649
|
if (timeout != null) {
|
635
|
-
_queryParams
|
650
|
+
_queryParams["timeout"] = timeout.toString();
|
636
651
|
}
|
637
652
|
const _response = yield core.fetcher({
|
638
653
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/refresh/${userId}`),
|
@@ -641,11 +656,12 @@ class User {
|
|
641
656
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
642
657
|
"X-Fern-Language": "JavaScript",
|
643
658
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
644
|
-
"X-Fern-SDK-Version": "3.0.
|
659
|
+
"X-Fern-SDK-Version": "3.0.8",
|
645
660
|
},
|
646
661
|
contentType: "application/json",
|
647
662
|
queryParameters: _queryParams,
|
648
663
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
664
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
649
665
|
});
|
650
666
|
if (_response.ok) {
|
651
667
|
return yield serializers.UserRefreshSuccessResponse.parseOrThrow(_response.body, {
|
@@ -1,6 +1,10 @@
|
|
1
1
|
/**
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
* {}
|
7
|
+
*/
|
4
8
|
export interface UserPatchBody {
|
5
9
|
/**
|
6
10
|
* Fallback time zone of the user, in the form of a valid IANA tzdatabase identifier (e.g., `Europe/London` or `America/Los_Angeles`).
|