@tryvital/vital-node 3.1.41 → 3.1.43
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 +3 -0
- package/Client.js +21 -16
- 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/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labTests/client/Client.js +27 -27
- package/api/resources/link/client/Client.js +14 -14
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/client/Client.d.ts +32 -0
- package/api/resources/menstrualCycle/client/Client.js +127 -0
- package/api/resources/menstrualCycle/client/index.d.ts +1 -0
- package/api/resources/menstrualCycle/client/index.js +17 -0
- package/api/resources/menstrualCycle/client/requests/MenstrualCycleGetRequest.d.ts +17 -0
- package/api/resources/menstrualCycle/client/requests/MenstrualCycleGetRequest.js +5 -0
- package/api/resources/menstrualCycle/client/requests/index.d.ts +1 -0
- package/api/resources/menstrualCycle/client/requests/index.js +2 -0
- package/api/resources/menstrualCycle/index.d.ts +1 -0
- package/api/resources/menstrualCycle/index.js +17 -0
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.js +4 -4
- package/api/resources/team/client/Client.js +7 -7
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +12 -12
- package/api/resources/vitals/client/Client.js +52 -52
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/BasalBodyTemperatureEntry.d.ts +7 -0
- package/api/types/BasalBodyTemperatureEntry.js +5 -0
- package/api/types/CervicalMucusEntry.d.ts +8 -0
- package/api/types/CervicalMucusEntry.js +5 -0
- package/api/types/CervicalMucusEntryQuality.d.ts +11 -0
- package/api/types/CervicalMucusEntryQuality.js +13 -0
- package/api/types/ClientFacingSource.d.ts +3 -3
- package/api/types/ContraceptiveEntry.d.ts +8 -0
- package/api/types/ContraceptiveEntry.js +5 -0
- package/api/types/ContraceptiveEntryType.d.ts +13 -0
- package/api/types/ContraceptiveEntryType.js +15 -0
- package/api/types/DetectedDeviationEntry.d.ts +8 -0
- package/api/types/DetectedDeviationEntry.js +5 -0
- package/api/types/DetectedDeviationEntryDeviation.d.ts +10 -0
- package/api/types/DetectedDeviationEntryDeviation.js +12 -0
- package/api/types/HomePregnancyTestEntry.d.ts +8 -0
- package/api/types/HomePregnancyTestEntry.js +5 -0
- package/api/types/HomePregnancyTestEntryTestResult.d.ts +9 -0
- package/api/types/HomePregnancyTestEntryTestResult.js +11 -0
- package/api/types/HomeProgesteroneTestEntry.d.ts +8 -0
- package/api/types/HomeProgesteroneTestEntry.js +5 -0
- package/api/types/HomeProgesteroneTestEntryTestResult.d.ts +9 -0
- package/api/types/HomeProgesteroneTestEntryTestResult.js +11 -0
- package/api/types/IntermenstrualBleedingEntry.d.ts +6 -0
- package/api/types/IntermenstrualBleedingEntry.js +5 -0
- package/api/types/MenstrualCycle.d.ts +21 -0
- package/api/types/MenstrualCycle.js +5 -0
- package/api/types/MenstrualCycleResponse.d.ts +7 -0
- package/api/types/MenstrualCycleResponse.js +5 -0
- package/api/types/MenstrualFlowEntry.d.ts +8 -0
- package/api/types/MenstrualFlowEntry.js +5 -0
- package/api/types/MenstrualFlowEntryFlow.d.ts +11 -0
- package/api/types/MenstrualFlowEntryFlow.js +13 -0
- package/api/types/OvulationTestEntry.d.ts +8 -0
- package/api/types/OvulationTestEntry.js +5 -0
- package/api/types/OvulationTestEntryTestResult.d.ts +10 -0
- package/api/types/OvulationTestEntryTestResult.js +12 -0
- package/api/types/PscInfo.d.ts +1 -1
- package/api/types/SexualActivityEntry.d.ts +7 -0
- package/api/types/SexualActivityEntry.js +5 -0
- package/api/types/index.d.ts +19 -0
- package/api/types/index.js +19 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +21 -16
- 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/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labTests/client/Client.js +27 -27
- package/dist/api/resources/link/client/Client.js +14 -14
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/client/Client.d.ts +32 -0
- package/dist/api/resources/menstrualCycle/client/Client.js +127 -0
- package/dist/api/resources/menstrualCycle/client/index.d.ts +1 -0
- package/dist/api/resources/menstrualCycle/client/index.js +17 -0
- package/dist/api/resources/menstrualCycle/client/requests/MenstrualCycleGetRequest.d.ts +17 -0
- package/dist/api/resources/menstrualCycle/client/requests/MenstrualCycleGetRequest.js +5 -0
- package/dist/api/resources/menstrualCycle/client/requests/index.d.ts +1 -0
- package/dist/api/resources/menstrualCycle/client/requests/index.js +2 -0
- package/dist/api/resources/menstrualCycle/index.d.ts +1 -0
- package/dist/api/resources/menstrualCycle/index.js +17 -0
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.js +4 -4
- package/dist/api/resources/team/client/Client.js +7 -7
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +12 -12
- package/dist/api/resources/vitals/client/Client.js +52 -52
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/BasalBodyTemperatureEntry.d.ts +7 -0
- package/dist/api/types/BasalBodyTemperatureEntry.js +5 -0
- package/dist/api/types/CervicalMucusEntry.d.ts +8 -0
- package/dist/api/types/CervicalMucusEntry.js +5 -0
- package/dist/api/types/CervicalMucusEntryQuality.d.ts +11 -0
- package/dist/api/types/CervicalMucusEntryQuality.js +13 -0
- package/dist/api/types/ClientFacingSource.d.ts +3 -3
- package/dist/api/types/ContraceptiveEntry.d.ts +8 -0
- package/dist/api/types/ContraceptiveEntry.js +5 -0
- package/dist/api/types/ContraceptiveEntryType.d.ts +13 -0
- package/dist/api/types/ContraceptiveEntryType.js +15 -0
- package/dist/api/types/DetectedDeviationEntry.d.ts +8 -0
- package/dist/api/types/DetectedDeviationEntry.js +5 -0
- package/dist/api/types/DetectedDeviationEntryDeviation.d.ts +10 -0
- package/dist/api/types/DetectedDeviationEntryDeviation.js +12 -0
- package/dist/api/types/HomePregnancyTestEntry.d.ts +8 -0
- package/dist/api/types/HomePregnancyTestEntry.js +5 -0
- package/dist/api/types/HomePregnancyTestEntryTestResult.d.ts +9 -0
- package/dist/api/types/HomePregnancyTestEntryTestResult.js +11 -0
- package/dist/api/types/HomeProgesteroneTestEntry.d.ts +8 -0
- package/dist/api/types/HomeProgesteroneTestEntry.js +5 -0
- package/dist/api/types/HomeProgesteroneTestEntryTestResult.d.ts +9 -0
- package/dist/api/types/HomeProgesteroneTestEntryTestResult.js +11 -0
- package/dist/api/types/IntermenstrualBleedingEntry.d.ts +6 -0
- package/dist/api/types/IntermenstrualBleedingEntry.js +5 -0
- package/dist/api/types/MenstrualCycle.d.ts +21 -0
- package/dist/api/types/MenstrualCycle.js +5 -0
- package/dist/api/types/MenstrualCycleResponse.d.ts +7 -0
- package/dist/api/types/MenstrualCycleResponse.js +5 -0
- package/dist/api/types/MenstrualFlowEntry.d.ts +8 -0
- package/dist/api/types/MenstrualFlowEntry.js +5 -0
- package/dist/api/types/MenstrualFlowEntryFlow.d.ts +11 -0
- package/dist/api/types/MenstrualFlowEntryFlow.js +13 -0
- package/dist/api/types/OvulationTestEntry.d.ts +8 -0
- package/dist/api/types/OvulationTestEntry.js +5 -0
- package/dist/api/types/OvulationTestEntryTestResult.d.ts +10 -0
- package/dist/api/types/OvulationTestEntryTestResult.js +12 -0
- package/dist/api/types/PscInfo.d.ts +1 -1
- package/dist/api/types/SexualActivityEntry.d.ts +7 -0
- package/dist/api/types/SexualActivityEntry.js +5 -0
- package/dist/api/types/index.d.ts +19 -0
- package/dist/api/types/index.js +19 -0
- package/dist/serialization/types/BasalBodyTemperatureEntry.d.ts +13 -0
- package/dist/serialization/types/BasalBodyTemperatureEntry.js +34 -0
- package/dist/serialization/types/CervicalMucusEntry.d.ts +14 -0
- package/dist/serialization/types/CervicalMucusEntry.js +35 -0
- package/dist/serialization/types/CervicalMucusEntryQuality.d.ts +10 -0
- package/dist/serialization/types/CervicalMucusEntryQuality.js +31 -0
- package/dist/serialization/types/ClientFacingSource.d.ts +3 -3
- package/dist/serialization/types/ClientFacingSource.js +3 -3
- package/dist/serialization/types/ContraceptiveEntry.d.ts +14 -0
- package/dist/serialization/types/ContraceptiveEntry.js +35 -0
- package/dist/serialization/types/ContraceptiveEntryType.d.ts +10 -0
- package/dist/serialization/types/ContraceptiveEntryType.js +31 -0
- package/dist/serialization/types/DetectedDeviationEntry.d.ts +14 -0
- package/dist/serialization/types/DetectedDeviationEntry.js +35 -0
- package/dist/serialization/types/DetectedDeviationEntryDeviation.d.ts +10 -0
- package/dist/serialization/types/DetectedDeviationEntryDeviation.js +36 -0
- package/dist/serialization/types/HomePregnancyTestEntry.d.ts +14 -0
- package/dist/serialization/types/HomePregnancyTestEntry.js +35 -0
- package/dist/serialization/types/HomePregnancyTestEntryTestResult.d.ts +10 -0
- package/dist/serialization/types/HomePregnancyTestEntryTestResult.js +31 -0
- package/dist/serialization/types/HomeProgesteroneTestEntry.d.ts +14 -0
- package/dist/serialization/types/HomeProgesteroneTestEntry.js +35 -0
- package/dist/serialization/types/HomeProgesteroneTestEntryTestResult.d.ts +10 -0
- package/dist/serialization/types/HomeProgesteroneTestEntryTestResult.js +31 -0
- package/dist/serialization/types/IntermenstrualBleedingEntry.d.ts +12 -0
- package/dist/serialization/types/IntermenstrualBleedingEntry.js +33 -0
- package/dist/serialization/types/MenstrualCycle.d.ts +37 -0
- package/dist/serialization/types/MenstrualCycle.js +58 -0
- package/dist/serialization/types/MenstrualCycleResponse.d.ts +13 -0
- package/dist/serialization/types/MenstrualCycleResponse.js +34 -0
- package/dist/serialization/types/MenstrualFlowEntry.d.ts +14 -0
- package/dist/serialization/types/MenstrualFlowEntry.js +35 -0
- package/dist/serialization/types/MenstrualFlowEntryFlow.d.ts +10 -0
- package/dist/serialization/types/MenstrualFlowEntryFlow.js +31 -0
- package/dist/serialization/types/OvulationTestEntry.d.ts +14 -0
- package/dist/serialization/types/OvulationTestEntry.js +35 -0
- package/dist/serialization/types/OvulationTestEntryTestResult.d.ts +10 -0
- package/dist/serialization/types/OvulationTestEntryTestResult.js +31 -0
- package/dist/serialization/types/PscInfo.d.ts +1 -1
- package/dist/serialization/types/PscInfo.js +1 -1
- package/dist/serialization/types/SexualActivityEntry.d.ts +13 -0
- package/dist/serialization/types/SexualActivityEntry.js +34 -0
- package/dist/serialization/types/index.d.ts +19 -0
- package/dist/serialization/types/index.js +19 -0
- package/package.json +1 -1
- package/serialization/types/BasalBodyTemperatureEntry.d.ts +13 -0
- package/serialization/types/BasalBodyTemperatureEntry.js +34 -0
- package/serialization/types/CervicalMucusEntry.d.ts +14 -0
- package/serialization/types/CervicalMucusEntry.js +35 -0
- package/serialization/types/CervicalMucusEntryQuality.d.ts +10 -0
- package/serialization/types/CervicalMucusEntryQuality.js +31 -0
- package/serialization/types/ClientFacingSource.d.ts +3 -3
- package/serialization/types/ClientFacingSource.js +3 -3
- package/serialization/types/ContraceptiveEntry.d.ts +14 -0
- package/serialization/types/ContraceptiveEntry.js +35 -0
- package/serialization/types/ContraceptiveEntryType.d.ts +10 -0
- package/serialization/types/ContraceptiveEntryType.js +31 -0
- package/serialization/types/DetectedDeviationEntry.d.ts +14 -0
- package/serialization/types/DetectedDeviationEntry.js +35 -0
- package/serialization/types/DetectedDeviationEntryDeviation.d.ts +10 -0
- package/serialization/types/DetectedDeviationEntryDeviation.js +36 -0
- package/serialization/types/HomePregnancyTestEntry.d.ts +14 -0
- package/serialization/types/HomePregnancyTestEntry.js +35 -0
- package/serialization/types/HomePregnancyTestEntryTestResult.d.ts +10 -0
- package/serialization/types/HomePregnancyTestEntryTestResult.js +31 -0
- package/serialization/types/HomeProgesteroneTestEntry.d.ts +14 -0
- package/serialization/types/HomeProgesteroneTestEntry.js +35 -0
- package/serialization/types/HomeProgesteroneTestEntryTestResult.d.ts +10 -0
- package/serialization/types/HomeProgesteroneTestEntryTestResult.js +31 -0
- package/serialization/types/IntermenstrualBleedingEntry.d.ts +12 -0
- package/serialization/types/IntermenstrualBleedingEntry.js +33 -0
- package/serialization/types/MenstrualCycle.d.ts +37 -0
- package/serialization/types/MenstrualCycle.js +58 -0
- package/serialization/types/MenstrualCycleResponse.d.ts +13 -0
- package/serialization/types/MenstrualCycleResponse.js +34 -0
- package/serialization/types/MenstrualFlowEntry.d.ts +14 -0
- package/serialization/types/MenstrualFlowEntry.js +35 -0
- package/serialization/types/MenstrualFlowEntryFlow.d.ts +10 -0
- package/serialization/types/MenstrualFlowEntryFlow.js +31 -0
- package/serialization/types/OvulationTestEntry.d.ts +14 -0
- package/serialization/types/OvulationTestEntry.js +35 -0
- package/serialization/types/OvulationTestEntryTestResult.d.ts +10 -0
- package/serialization/types/OvulationTestEntryTestResult.js +31 -0
- package/serialization/types/PscInfo.d.ts +1 -1
- package/serialization/types/PscInfo.js +1 -1
- package/serialization/types/SexualActivityEntry.d.ts +13 -0
- package/serialization/types/SexualActivityEntry.js +34 -0
- package/serialization/types/index.d.ts +19 -0
- package/serialization/types/index.js +19 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.MenstrualCycle = void 0;
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
43
|
+
const core = __importStar(require("../../../../core"));
|
44
|
+
const Vital = __importStar(require("../../.."));
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
46
|
+
const serializers = __importStar(require("../../../../serialization"));
|
47
|
+
const errors = __importStar(require("../../../../errors"));
|
48
|
+
class MenstrualCycle {
|
49
|
+
constructor(_options) {
|
50
|
+
this._options = _options;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
54
|
+
*
|
55
|
+
* @example
|
56
|
+
* await vital.menstrualCycle.get("user_id", {
|
57
|
+
* startDate: "start_date"
|
58
|
+
* })
|
59
|
+
*/
|
60
|
+
get(userId, request, requestOptions) {
|
61
|
+
var _a;
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
63
|
+
const { provider, startDate, endDate } = request;
|
64
|
+
const _queryParams = {};
|
65
|
+
if (provider != null) {
|
66
|
+
_queryParams["provider"] = provider;
|
67
|
+
}
|
68
|
+
_queryParams["start_date"] = startDate;
|
69
|
+
if (endDate != null) {
|
70
|
+
_queryParams["end_date"] = endDate;
|
71
|
+
}
|
72
|
+
const _response = yield core.fetcher({
|
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/menstrual_cycle/${userId}`),
|
74
|
+
method: "GET",
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
76
|
+
contentType: "application/json",
|
77
|
+
queryParameters: _queryParams,
|
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
|
+
});
|
81
|
+
if (_response.ok) {
|
82
|
+
return yield serializers.MenstrualCycleResponse.parseOrThrow(_response.body, {
|
83
|
+
unrecognizedObjectKeys: "passthrough",
|
84
|
+
allowUnrecognizedUnionMembers: true,
|
85
|
+
allowUnrecognizedEnumValues: true,
|
86
|
+
breadcrumbsPrefix: ["response"],
|
87
|
+
});
|
88
|
+
}
|
89
|
+
if (_response.error.reason === "status-code") {
|
90
|
+
switch (_response.error.statusCode) {
|
91
|
+
case 422:
|
92
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
93
|
+
unrecognizedObjectKeys: "passthrough",
|
94
|
+
allowUnrecognizedUnionMembers: true,
|
95
|
+
allowUnrecognizedEnumValues: true,
|
96
|
+
breadcrumbsPrefix: ["response"],
|
97
|
+
}));
|
98
|
+
default:
|
99
|
+
throw new errors.VitalError({
|
100
|
+
statusCode: _response.error.statusCode,
|
101
|
+
body: _response.error.body,
|
102
|
+
});
|
103
|
+
}
|
104
|
+
}
|
105
|
+
switch (_response.error.reason) {
|
106
|
+
case "non-json":
|
107
|
+
throw new errors.VitalError({
|
108
|
+
statusCode: _response.error.statusCode,
|
109
|
+
body: _response.error.rawBody,
|
110
|
+
});
|
111
|
+
case "timeout":
|
112
|
+
throw new errors.VitalTimeoutError();
|
113
|
+
case "unknown":
|
114
|
+
throw new errors.VitalError({
|
115
|
+
message: _response.error.errorMessage,
|
116
|
+
});
|
117
|
+
}
|
118
|
+
});
|
119
|
+
}
|
120
|
+
_getCustomAuthorizationHeaders() {
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
122
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
123
|
+
return { "x-vital-api-key": apiKeyValue };
|
124
|
+
});
|
125
|
+
}
|
126
|
+
}
|
127
|
+
exports.MenstrualCycle = MenstrualCycle;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./requests";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./requests"), exports);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
* {
|
7
|
+
* startDate: "start_date"
|
8
|
+
* }
|
9
|
+
*/
|
10
|
+
export interface MenstrualCycleGetRequest {
|
11
|
+
/**
|
12
|
+
* Provider oura/strava etc
|
13
|
+
*/
|
14
|
+
provider?: string;
|
15
|
+
startDate: string;
|
16
|
+
endDate?: string;
|
17
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { MenstrualCycleGetRequest } from "./MenstrualCycleGetRequest";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./client";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./client"), exports);
|
@@ -67,7 +67,7 @@ class Profile {
|
|
67
67
|
const _response = yield core.fetcher({
|
68
68
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/profile/${userId}`),
|
69
69
|
method: "GET",
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
70
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
71
71
|
contentType: "application/json",
|
72
72
|
queryParameters: _queryParams,
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -130,7 +130,7 @@ class Profile {
|
|
130
130
|
const _response = yield core.fetcher({
|
131
131
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/profile/${userId}/raw`),
|
132
132
|
method: "GET",
|
133
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
133
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
134
134
|
contentType: "application/json",
|
135
135
|
queryParameters: _queryParams,
|
136
136
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -67,7 +67,7 @@ class Providers {
|
|
67
67
|
const _response = yield core.fetcher({
|
68
68
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/providers"),
|
69
69
|
method: "GET",
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
70
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
71
71
|
contentType: "application/json",
|
72
72
|
queryParameters: _queryParams,
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -73,7 +73,7 @@ class Sleep {
|
|
73
73
|
const _response = yield core.fetcher({
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${userId}`),
|
75
75
|
method: "GET",
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
77
77
|
contentType: "application/json",
|
78
78
|
queryParameters: _queryParams,
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -142,7 +142,7 @@ class Sleep {
|
|
142
142
|
const _response = yield core.fetcher({
|
143
143
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${userId}/stream`),
|
144
144
|
method: "GET",
|
145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
146
146
|
contentType: "application/json",
|
147
147
|
queryParameters: _queryParams,
|
148
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -211,7 +211,7 @@ class Sleep {
|
|
211
211
|
const _response = yield core.fetcher({
|
212
212
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${userId}/raw`),
|
213
213
|
method: "GET",
|
214
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
214
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
215
215
|
contentType: "application/json",
|
216
216
|
queryParameters: _queryParams,
|
217
217
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -269,7 +269,7 @@ class Sleep {
|
|
269
269
|
const _response = yield core.fetcher({
|
270
270
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/sleep/${sleepId}/stream`),
|
271
271
|
method: "GET",
|
272
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
272
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
273
273
|
contentType: "application/json",
|
274
274
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
275
275
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -63,7 +63,7 @@ class Team {
|
|
63
63
|
const _response = yield core.fetcher({
|
64
64
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/link/config"),
|
65
65
|
method: "GET",
|
66
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
66
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
67
67
|
contentType: "application/json",
|
68
68
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
69
69
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -120,7 +120,7 @@ class Team {
|
|
120
120
|
const _response = yield core.fetcher({
|
121
121
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/team/${teamId}`),
|
122
122
|
method: "GET",
|
123
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
123
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
124
124
|
contentType: "application/json",
|
125
125
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
126
126
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -182,7 +182,7 @@ class Team {
|
|
182
182
|
const _response = yield core.fetcher({
|
183
183
|
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"),
|
184
184
|
method: "GET",
|
185
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
185
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
186
186
|
contentType: "application/json",
|
187
187
|
queryParameters: _queryParams,
|
188
188
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -233,7 +233,7 @@ class Team {
|
|
233
233
|
const _response = yield core.fetcher({
|
234
234
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/team/svix/url"),
|
235
235
|
method: "GET",
|
236
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
236
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
237
237
|
contentType: "application/json",
|
238
238
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
239
239
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -285,7 +285,7 @@ class Team {
|
|
285
285
|
const _response = yield core.fetcher({
|
286
286
|
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"),
|
287
287
|
method: "GET",
|
288
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
288
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
289
289
|
contentType: "application/json",
|
290
290
|
queryParameters: _queryParams,
|
291
291
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -342,7 +342,7 @@ class Team {
|
|
342
342
|
const _response = yield core.fetcher({
|
343
343
|
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"),
|
344
344
|
method: "PATCH",
|
345
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
345
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
346
346
|
contentType: "application/json",
|
347
347
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
348
348
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -388,7 +388,7 @@ class Team {
|
|
388
388
|
const _response = yield core.fetcher({
|
389
389
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/team/${teamId}/physicians`),
|
390
390
|
method: "GET",
|
391
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
391
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
392
392
|
contentType: "application/json",
|
393
393
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
394
394
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -58,7 +58,7 @@ class Testkit {
|
|
58
58
|
const _response = yield core.fetcher({
|
59
59
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/testkit/register"),
|
60
60
|
method: "POST",
|
61
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
61
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
62
62
|
contentType: "application/json",
|
63
63
|
body: yield serializers.RegisterTestkitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
64
64
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -113,7 +113,7 @@ class Testkit {
|
|
113
113
|
const _response = yield core.fetcher({
|
114
114
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/testkit"),
|
115
115
|
method: "POST",
|
116
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
116
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
117
117
|
contentType: "application/json",
|
118
118
|
body: yield serializers.CreateRegistrableTestkitOrderRequest.jsonOrThrow(request, {
|
119
119
|
unrecognizedObjectKeys: "strip",
|
@@ -70,7 +70,7 @@ class User {
|
|
70
70
|
const _response = yield core.fetcher({
|
71
71
|
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
72
|
method: "GET",
|
73
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
74
74
|
contentType: "application/json",
|
75
75
|
queryParameters: _queryParams,
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -131,7 +131,7 @@ class User {
|
|
131
131
|
const _response = yield core.fetcher({
|
132
132
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/user"),
|
133
133
|
method: "POST",
|
134
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
134
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
135
135
|
contentType: "application/json",
|
136
136
|
body: yield serializers.UserCreateBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
137
137
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -190,7 +190,7 @@ class User {
|
|
190
190
|
const _response = yield core.fetcher({
|
191
191
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/user/metrics"),
|
192
192
|
method: "GET",
|
193
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
193
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
194
194
|
contentType: "application/json",
|
195
195
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
196
196
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -236,7 +236,7 @@ class User {
|
|
236
236
|
const _response = yield core.fetcher({
|
237
237
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/${userId}/sign_in_token`),
|
238
238
|
method: "POST",
|
239
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
239
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
240
240
|
contentType: "application/json",
|
241
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
242
242
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -293,7 +293,7 @@ class User {
|
|
293
293
|
const _response = yield core.fetcher({
|
294
294
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/providers/${userId}`),
|
295
295
|
method: "GET",
|
296
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
296
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
297
297
|
contentType: "application/json",
|
298
298
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
299
299
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -350,7 +350,7 @@ class User {
|
|
350
350
|
const _response = yield core.fetcher({
|
351
351
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/${userId}`),
|
352
352
|
method: "GET",
|
353
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
353
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
354
354
|
contentType: "application/json",
|
355
355
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
356
356
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -406,7 +406,7 @@ class User {
|
|
406
406
|
const _response = yield core.fetcher({
|
407
407
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/${userId}`),
|
408
408
|
method: "DELETE",
|
409
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
409
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
410
410
|
contentType: "application/json",
|
411
411
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
412
412
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -462,7 +462,7 @@ class User {
|
|
462
462
|
const _response = yield core.fetcher({
|
463
463
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/${userId}`),
|
464
464
|
method: "PATCH",
|
465
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
465
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
466
466
|
contentType: "application/json",
|
467
467
|
body: yield serializers.UserPatchBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
468
468
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -515,7 +515,7 @@ class User {
|
|
515
515
|
const _response = yield core.fetcher({
|
516
516
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/resolve/${clientUserId}`),
|
517
517
|
method: "GET",
|
518
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
518
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
519
519
|
contentType: "application/json",
|
520
520
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
521
521
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -571,7 +571,7 @@ class User {
|
|
571
571
|
const _response = yield core.fetcher({
|
572
572
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/user/${userId}/${yield serializers.Providers.jsonOrThrow(provider)}`),
|
573
573
|
method: "DELETE",
|
574
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
574
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
575
575
|
contentType: "application/json",
|
576
576
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
577
577
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -635,7 +635,7 @@ class User {
|
|
635
635
|
const _response = yield core.fetcher({
|
636
636
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/user/undo_delete"),
|
637
637
|
method: "POST",
|
638
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
638
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
639
639
|
contentType: "application/json",
|
640
640
|
queryParameters: _queryParams,
|
641
641
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -699,7 +699,7 @@ class User {
|
|
699
699
|
const _response = yield core.fetcher({
|
700
700
|
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}`),
|
701
701
|
method: "POST",
|
702
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.
|
702
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
703
703
|
contentType: "application/json",
|
704
704
|
queryParameters: _queryParams,
|
705
705
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|