@tryvital/vital-node 0.3.8 → 1.0.2
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/Activity.ts +1 -1
- package/client/Body.ts +1 -1
- package/client/Profile.ts +25 -0
- package/client/Sleep.ts +2 -2
- package/client/Testkits.ts +11 -1
- package/client/Vitals.ts +45 -45
- package/client/Webhooks.ts +7 -58
- package/client/Workouts.ts +3 -3
- package/client/index.ts +1 -1
- package/client/models/activity.ts +7 -0
- package/client/models/body_model.ts +0 -18
- package/client/models/profile_model.ts +34 -0
- package/client/models/testkit_models.ts +9 -0
- package/dist/client/Activity.js +1 -1
- package/dist/client/Body.js +1 -1
- package/dist/client/Profile.d.ts +8 -0
- package/dist/client/{ProviderSpecific.js → Profile.js} +8 -12
- package/dist/client/Sleep.js +2 -2
- package/dist/client/Testkits.d.ts +1 -0
- package/dist/client/Testkits.js +16 -0
- package/dist/client/Vitals.d.ts +7 -6
- package/dist/client/Vitals.js +16 -41
- package/dist/client/Webhooks.d.ts +1 -7
- package/dist/client/Webhooks.js +4 -102
- package/dist/client/Workouts.d.ts +1 -1
- package/dist/client/Workouts.js +3 -3
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +3 -3
- package/dist/client/models/activity.d.ts +6 -0
- package/dist/client/models/body_model.d.ts +0 -18
- package/dist/client/models/profile_model.d.ts +33 -0
- package/dist/{swagger_client/models/client-activity-response.js → client/models/profile_model.js} +0 -0
- package/dist/client/models/testkit_models.d.ts +9 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/lib/config.d.ts +0 -1
- package/dist/lib/config.js +0 -1
- package/index.ts +14 -14
- package/lib/config.ts +0 -1
- package/package.json +3 -2
- package/client/ProviderSpecific.ts +0 -31
- package/dist/client/ProviderSpecific.d.ts +0 -8
- package/dist/swagger_client/api.d.ts +0 -18
- package/dist/swagger_client/api.js +0 -32
- package/dist/swagger_client/apis/activity-api.d.ts +0 -86
- package/dist/swagger_client/apis/activity-api.js +0 -241
- package/dist/swagger_client/apis/body-api.d.ts +0 -86
- package/dist/swagger_client/apis/body-api.js +0 -241
- package/dist/swagger_client/apis/link-api.d.ts +0 -115
- package/dist/swagger_client/apis/link-api.js +0 -310
- package/dist/swagger_client/apis/provider-specific-api.d.ts +0 -90
- package/dist/swagger_client/apis/provider-specific-api.js +0 -250
- package/dist/swagger_client/apis/sleep-api.d.ts +0 -120
- package/dist/swagger_client/apis/sleep-api.js +0 -330
- package/dist/swagger_client/apis/user-api.d.ts +0 -243
- package/dist/swagger_client/apis/user-api.js +0 -657
- package/dist/swagger_client/apis/webhooks-api.d.ts +0 -138
- package/dist/swagger_client/apis/webhooks-api.js +0 -379
- package/dist/swagger_client/apis/workouts-api.d.ts +0 -120
- package/dist/swagger_client/apis/workouts-api.js +0 -330
- package/dist/swagger_client/base.d.ts +0 -55
- package/dist/swagger_client/base.js +0 -67
- package/dist/swagger_client/configuration.d.ts +0 -63
- package/dist/swagger_client/configuration.js +0 -16
- package/dist/swagger_client/index.d.ts +0 -13
- package/dist/swagger_client/index.js +0 -27
- package/dist/swagger_client/models/client-activity-response.d.ts +0 -24
- package/dist/swagger_client/models/client-body-response.d.ts +0 -24
- package/dist/swagger_client/models/client-body-response.js +0 -2
- package/dist/swagger_client/models/client-facing-activity.d.ts +0 -84
- package/dist/swagger_client/models/client-facing-activity.js +0 -2
- package/dist/swagger_client/models/client-facing-body.d.ts +0 -72
- package/dist/swagger_client/models/client-facing-body.js +0 -2
- package/dist/swagger_client/models/client-facing-sleep-stream.d.ts +0 -48
- package/dist/swagger_client/models/client-facing-sleep-stream.js +0 -2
- package/dist/swagger_client/models/client-facing-sleep.d.ts +0 -138
- package/dist/swagger_client/models/client-facing-sleep.js +0 -2
- package/dist/swagger_client/models/client-facing-source-specific.d.ts +0 -48
- package/dist/swagger_client/models/client-facing-source-specific.js +0 -2
- package/dist/swagger_client/models/client-facing-sport.d.ts +0 -30
- package/dist/swagger_client/models/client-facing-sport.js +0 -2
- package/dist/swagger_client/models/client-facing-stream.d.ts +0 -84
- package/dist/swagger_client/models/client-facing-stream.js +0 -2
- package/dist/swagger_client/models/client-facing-user.d.ts +0 -48
- package/dist/swagger_client/models/client-facing-user.js +0 -2
- package/dist/swagger_client/models/client-facing-webhook.d.ts +0 -42
- package/dist/swagger_client/models/client-facing-webhook.js +0 -2
- package/dist/swagger_client/models/client-facing-workout.d.ts +0 -150
- package/dist/swagger_client/models/client-facing-workout.js +0 -2
- package/dist/swagger_client/models/client-sleep-response.d.ts +0 -24
- package/dist/swagger_client/models/client-sleep-response.js +0 -2
- package/dist/swagger_client/models/client-source-specific-response.d.ts +0 -24
- package/dist/swagger_client/models/client-source-specific-response.js +0 -2
- package/dist/swagger_client/models/client-webhook-response.d.ts +0 -24
- package/dist/swagger_client/models/client-webhook-response.js +0 -2
- package/dist/swagger_client/models/client-workout-response.d.ts +0 -24
- package/dist/swagger_client/models/client-workout-response.js +0 -2
- package/dist/swagger_client/models/connected-source-client-facing.d.ts +0 -24
- package/dist/swagger_client/models/connected-source-client-facing.js +0 -2
- package/dist/swagger_client/models/httpvalidation-error.d.ts +0 -24
- package/dist/swagger_client/models/httpvalidation-error.js +0 -2
- package/dist/swagger_client/models/index.d.ts +0 -32
- package/dist/swagger_client/models/index.js +0 -44
- package/dist/swagger_client/models/individual-provider-data.d.ts +0 -30
- package/dist/swagger_client/models/individual-provider-data.js +0 -2
- package/dist/swagger_client/models/link-token-exchange-response.d.ts +0 -24
- package/dist/swagger_client/models/link-token-exchange-response.js +0 -2
- package/dist/swagger_client/models/link-token-exchange.d.ts +0 -30
- package/dist/swagger_client/models/link-token-exchange.js +0 -2
- package/dist/swagger_client/models/password-providers.d.ts +0 -22
- package/dist/swagger_client/models/password-providers.js +0 -28
- package/dist/swagger_client/models/provider-link-response.d.ts +0 -30
- package/dist/swagger_client/models/provider-link-response.js +0 -2
- package/dist/swagger_client/models/providers-that-require-password-auth-whoop-renpho-peloton-zwift.d.ts +0 -18
- package/dist/swagger_client/models/providers-that-require-password-auth-whoop-renpho-peloton-zwift.js +0 -2
- package/dist/swagger_client/models/providers.d.ts +0 -27
- package/dist/swagger_client/models/providers.js +0 -33
- package/dist/swagger_client/models/source-client-facing.d.ts +0 -36
- package/dist/swagger_client/models/source-client-facing.js +0 -2
- package/dist/swagger_client/models/user-create.d.ts +0 -24
- package/dist/swagger_client/models/user-create.js +0 -2
- package/dist/swagger_client/models/user-key-response.d.ts +0 -30
- package/dist/swagger_client/models/user-key-response.js +0 -2
- package/dist/swagger_client/models/user-success-response.d.ts +0 -24
- package/dist/swagger_client/models/user-success-response.js +0 -2
- package/dist/swagger_client/models/validation-error.d.ts +0 -36
- package/dist/swagger_client/models/validation-error.js +0 -2
- package/dist/swagger_client/models/webhook-register.d.ts +0 -36
- package/dist/swagger_client/models/webhook-register.js +0 -2
- package/dist/swagger_client/models/webhook-type.d.ts +0 -24
- package/dist/swagger_client/models/webhook-type.js +0 -30
- package/dist/test/data/mock_webhook.d.ts +0 -49
- package/dist/test/data/mock_webhook.js +0 -170
- package/dist/test/webhook.spec.d.ts +0 -1
- package/dist/test/webhook.spec.js +0 -160
- package/test/data/mock_webhook.ts +0 -167
- package/test/webhook.spec.ts +0 -254
@@ -1,330 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
16
|
-
__assign = Object.assign || function(t) {
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
18
|
-
s = arguments[i];
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
20
|
-
t[p] = s[p];
|
21
|
-
}
|
22
|
-
return t;
|
23
|
-
};
|
24
|
-
return __assign.apply(this, arguments);
|
25
|
-
};
|
26
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
29
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
30
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
31
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
32
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
33
|
-
});
|
34
|
-
};
|
35
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
36
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
37
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
38
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
39
|
-
function step(op) {
|
40
|
-
if (f) throw new TypeError("Generator is already executing.");
|
41
|
-
while (_) try {
|
42
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
43
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
44
|
-
switch (op[0]) {
|
45
|
-
case 0: case 1: t = op; break;
|
46
|
-
case 4: _.label++; return { value: op[1], done: false };
|
47
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
48
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
49
|
-
default:
|
50
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
51
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
52
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
53
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
54
|
-
if (t[2]) _.ops.pop();
|
55
|
-
_.trys.pop(); continue;
|
56
|
-
}
|
57
|
-
op = body.call(thisArg, _);
|
58
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
59
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
60
|
-
}
|
61
|
-
};
|
62
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
63
|
-
exports.WorkoutsApi = exports.WorkoutsApiFactory = exports.WorkoutsApiFp = exports.WorkoutsApiAxiosParamCreator = void 0;
|
64
|
-
/* tslint:disable */
|
65
|
-
/* eslint-disable */
|
66
|
-
/**
|
67
|
-
* Vital
|
68
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
69
|
-
*
|
70
|
-
* OpenAPI spec version: 0.1.0
|
71
|
-
*
|
72
|
-
*
|
73
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
74
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
75
|
-
* Do not edit the class manually.
|
76
|
-
*/
|
77
|
-
var axios_1 = require("axios");
|
78
|
-
// Some imports not used depending on template conditions
|
79
|
-
// @ts-ignore
|
80
|
-
var base_1 = require("../base");
|
81
|
-
/**
|
82
|
-
* WorkoutsApi - axios parameter creator
|
83
|
-
* @export
|
84
|
-
*/
|
85
|
-
exports.WorkoutsApiAxiosParamCreator = function (configuration) {
|
86
|
-
var _this = this;
|
87
|
-
return {
|
88
|
-
/**
|
89
|
-
* GET workouts for user_key between dates.
|
90
|
-
* @summary Get User Workouts
|
91
|
-
* @param {string} userKey
|
92
|
-
* @param {Date} startDate Date from in YYYY-MM-DD
|
93
|
-
* @param {Date} endDate Date to in YYYY-MM-DD
|
94
|
-
* @param {string} [provider] Provider oura/strava etc.
|
95
|
-
* @param {*} [options] Override http request option.
|
96
|
-
* @throws {RequiredError}
|
97
|
-
*/
|
98
|
-
getUserWorkouts: function (userKey, startDate, endDate, provider, options) {
|
99
|
-
if (options === void 0) { options = {}; }
|
100
|
-
return __awaiter(_this, void 0, void 0, function () {
|
101
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
102
|
-
return __generator(this, function (_a) {
|
103
|
-
// verify required parameter 'userKey' is not null or undefined
|
104
|
-
if (userKey === null || userKey === undefined) {
|
105
|
-
throw new base_1.RequiredError('userKey', 'Required parameter userKey was null or undefined when calling getUserWorkouts.');
|
106
|
-
}
|
107
|
-
// verify required parameter 'startDate' is not null or undefined
|
108
|
-
if (startDate === null || startDate === undefined) {
|
109
|
-
throw new base_1.RequiredError('startDate', 'Required parameter startDate was null or undefined when calling getUserWorkouts.');
|
110
|
-
}
|
111
|
-
// verify required parameter 'endDate' is not null or undefined
|
112
|
-
if (endDate === null || endDate === undefined) {
|
113
|
-
throw new base_1.RequiredError('endDate', 'Required parameter endDate was null or undefined when calling getUserWorkouts.');
|
114
|
-
}
|
115
|
-
localVarPath = "/v1/workouts/{user_key}"
|
116
|
-
.replace("{" + "user_key" + "}", encodeURIComponent(String(userKey)));
|
117
|
-
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
118
|
-
if (configuration) {
|
119
|
-
baseOptions = configuration.baseOptions;
|
120
|
-
}
|
121
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
122
|
-
localVarHeaderParameter = {};
|
123
|
-
localVarQueryParameter = {};
|
124
|
-
if (startDate !== undefined) {
|
125
|
-
localVarQueryParameter['start_date'] = (startDate instanceof Date) ?
|
126
|
-
startDate.toISOString() :
|
127
|
-
startDate;
|
128
|
-
}
|
129
|
-
if (endDate !== undefined) {
|
130
|
-
localVarQueryParameter['end_date'] = (endDate instanceof Date) ?
|
131
|
-
endDate.toISOString() :
|
132
|
-
endDate;
|
133
|
-
}
|
134
|
-
if (provider !== undefined) {
|
135
|
-
localVarQueryParameter['provider'] = provider;
|
136
|
-
}
|
137
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
138
|
-
for (key in localVarQueryParameter) {
|
139
|
-
query.set(key, localVarQueryParameter[key]);
|
140
|
-
}
|
141
|
-
for (key in options.query) {
|
142
|
-
query.set(key, options.query[key]);
|
143
|
-
}
|
144
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
145
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
146
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
147
|
-
return [2 /*return*/, {
|
148
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
149
|
-
options: localVarRequestOptions,
|
150
|
-
}];
|
151
|
-
});
|
152
|
-
});
|
153
|
-
},
|
154
|
-
/**
|
155
|
-
* GET Stream Data for workout
|
156
|
-
* @summary Get Workout Stream
|
157
|
-
* @param {string} workoutId
|
158
|
-
* @param {*} [options] Override http request option.
|
159
|
-
* @throws {RequiredError}
|
160
|
-
*/
|
161
|
-
getWorkoutStream: function (workoutId, options) {
|
162
|
-
if (options === void 0) { options = {}; }
|
163
|
-
return __awaiter(_this, void 0, void 0, function () {
|
164
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
165
|
-
return __generator(this, function (_a) {
|
166
|
-
// verify required parameter 'workoutId' is not null or undefined
|
167
|
-
if (workoutId === null || workoutId === undefined) {
|
168
|
-
throw new base_1.RequiredError('workoutId', 'Required parameter workoutId was null or undefined when calling getWorkoutStream.');
|
169
|
-
}
|
170
|
-
localVarPath = "/v1/workouts/{workout_id}/stream/data"
|
171
|
-
.replace("{" + "workout_id" + "}", encodeURIComponent(String(workoutId)));
|
172
|
-
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
173
|
-
if (configuration) {
|
174
|
-
baseOptions = configuration.baseOptions;
|
175
|
-
}
|
176
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
177
|
-
localVarHeaderParameter = {};
|
178
|
-
localVarQueryParameter = {};
|
179
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
180
|
-
for (key in localVarQueryParameter) {
|
181
|
-
query.set(key, localVarQueryParameter[key]);
|
182
|
-
}
|
183
|
-
for (key in options.query) {
|
184
|
-
query.set(key, options.query[key]);
|
185
|
-
}
|
186
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
187
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
188
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
189
|
-
return [2 /*return*/, {
|
190
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
191
|
-
options: localVarRequestOptions,
|
192
|
-
}];
|
193
|
-
});
|
194
|
-
});
|
195
|
-
},
|
196
|
-
};
|
197
|
-
};
|
198
|
-
/**
|
199
|
-
* WorkoutsApi - functional programming interface
|
200
|
-
* @export
|
201
|
-
*/
|
202
|
-
exports.WorkoutsApiFp = function (configuration) {
|
203
|
-
return {
|
204
|
-
/**
|
205
|
-
* GET workouts for user_key between dates.
|
206
|
-
* @summary Get User Workouts
|
207
|
-
* @param {string} userKey
|
208
|
-
* @param {Date} startDate Date from in YYYY-MM-DD
|
209
|
-
* @param {Date} endDate Date to in YYYY-MM-DD
|
210
|
-
* @param {string} [provider] Provider oura/strava etc.
|
211
|
-
* @param {*} [options] Override http request option.
|
212
|
-
* @throws {RequiredError}
|
213
|
-
*/
|
214
|
-
getUserWorkouts: function (userKey, startDate, endDate, provider, options) {
|
215
|
-
return __awaiter(this, void 0, void 0, function () {
|
216
|
-
var localVarAxiosArgs;
|
217
|
-
return __generator(this, function (_a) {
|
218
|
-
switch (_a.label) {
|
219
|
-
case 0: return [4 /*yield*/, exports.WorkoutsApiAxiosParamCreator(configuration).getUserWorkouts(userKey, startDate, endDate, provider, options)];
|
220
|
-
case 1:
|
221
|
-
localVarAxiosArgs = _a.sent();
|
222
|
-
return [2 /*return*/, function (axios, basePath) {
|
223
|
-
if (axios === void 0) { axios = axios_1.default; }
|
224
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
225
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
226
|
-
return axios.request(axiosRequestArgs);
|
227
|
-
}];
|
228
|
-
}
|
229
|
-
});
|
230
|
-
});
|
231
|
-
},
|
232
|
-
/**
|
233
|
-
* GET Stream Data for workout
|
234
|
-
* @summary Get Workout Stream
|
235
|
-
* @param {string} workoutId
|
236
|
-
* @param {*} [options] Override http request option.
|
237
|
-
* @throws {RequiredError}
|
238
|
-
*/
|
239
|
-
getWorkoutStream: function (workoutId, options) {
|
240
|
-
return __awaiter(this, void 0, void 0, function () {
|
241
|
-
var localVarAxiosArgs;
|
242
|
-
return __generator(this, function (_a) {
|
243
|
-
switch (_a.label) {
|
244
|
-
case 0: return [4 /*yield*/, exports.WorkoutsApiAxiosParamCreator(configuration).getWorkoutStream(workoutId, options)];
|
245
|
-
case 1:
|
246
|
-
localVarAxiosArgs = _a.sent();
|
247
|
-
return [2 /*return*/, function (axios, basePath) {
|
248
|
-
if (axios === void 0) { axios = axios_1.default; }
|
249
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
250
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
251
|
-
return axios.request(axiosRequestArgs);
|
252
|
-
}];
|
253
|
-
}
|
254
|
-
});
|
255
|
-
});
|
256
|
-
},
|
257
|
-
};
|
258
|
-
};
|
259
|
-
/**
|
260
|
-
* WorkoutsApi - factory interface
|
261
|
-
* @export
|
262
|
-
*/
|
263
|
-
exports.WorkoutsApiFactory = function (configuration, basePath, axios) {
|
264
|
-
return {
|
265
|
-
/**
|
266
|
-
* GET workouts for user_key between dates.
|
267
|
-
* @summary Get User Workouts
|
268
|
-
* @param {string} userKey
|
269
|
-
* @param {Date} startDate Date from in YYYY-MM-DD
|
270
|
-
* @param {Date} endDate Date to in YYYY-MM-DD
|
271
|
-
* @param {string} [provider] Provider oura/strava etc.
|
272
|
-
* @param {*} [options] Override http request option.
|
273
|
-
* @throws {RequiredError}
|
274
|
-
*/
|
275
|
-
getUserWorkouts: function (userKey, startDate, endDate, provider, options) {
|
276
|
-
return exports.WorkoutsApiFp(configuration).getUserWorkouts(userKey, startDate, endDate, provider, options).then(function (request) { return request(axios, basePath); });
|
277
|
-
},
|
278
|
-
/**
|
279
|
-
* GET Stream Data for workout
|
280
|
-
* @summary Get Workout Stream
|
281
|
-
* @param {string} workoutId
|
282
|
-
* @param {*} [options] Override http request option.
|
283
|
-
* @throws {RequiredError}
|
284
|
-
*/
|
285
|
-
getWorkoutStream: function (workoutId, options) {
|
286
|
-
return exports.WorkoutsApiFp(configuration).getWorkoutStream(workoutId, options).then(function (request) { return request(axios, basePath); });
|
287
|
-
},
|
288
|
-
};
|
289
|
-
};
|
290
|
-
/**
|
291
|
-
* WorkoutsApi - object-oriented interface
|
292
|
-
* @export
|
293
|
-
* @class WorkoutsApi
|
294
|
-
* @extends {BaseAPI}
|
295
|
-
*/
|
296
|
-
var WorkoutsApi = /** @class */ (function (_super) {
|
297
|
-
__extends(WorkoutsApi, _super);
|
298
|
-
function WorkoutsApi() {
|
299
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
300
|
-
}
|
301
|
-
/**
|
302
|
-
* GET workouts for user_key between dates.
|
303
|
-
* @summary Get User Workouts
|
304
|
-
* @param {string} userKey
|
305
|
-
* @param {Date} startDate Date from in YYYY-MM-DD
|
306
|
-
* @param {Date} endDate Date to in YYYY-MM-DD
|
307
|
-
* @param {string} [provider] Provider oura/strava etc.
|
308
|
-
* @param {*} [options] Override http request option.
|
309
|
-
* @throws {RequiredError}
|
310
|
-
* @memberof WorkoutsApi
|
311
|
-
*/
|
312
|
-
WorkoutsApi.prototype.getUserWorkouts = function (userKey, startDate, endDate, provider, options) {
|
313
|
-
var _this = this;
|
314
|
-
return exports.WorkoutsApiFp(this.configuration).getUserWorkouts(userKey, startDate, endDate, provider, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
315
|
-
};
|
316
|
-
/**
|
317
|
-
* GET Stream Data for workout
|
318
|
-
* @summary Get Workout Stream
|
319
|
-
* @param {string} workoutId
|
320
|
-
* @param {*} [options] Override http request option.
|
321
|
-
* @throws {RequiredError}
|
322
|
-
* @memberof WorkoutsApi
|
323
|
-
*/
|
324
|
-
WorkoutsApi.prototype.getWorkoutStream = function (workoutId, options) {
|
325
|
-
var _this = this;
|
326
|
-
return exports.WorkoutsApiFp(this.configuration).getWorkoutStream(workoutId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
327
|
-
};
|
328
|
-
return WorkoutsApi;
|
329
|
-
}(base_1.BaseAPI));
|
330
|
-
exports.WorkoutsApi = WorkoutsApi;
|
@@ -1,55 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Vital
|
3
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
4
|
-
*
|
5
|
-
* OpenAPI spec version: 0.1.0
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
10
|
-
* Do not edit the class manually.
|
11
|
-
*/
|
12
|
-
import { Configuration } from "./configuration";
|
13
|
-
import { AxiosInstance } from 'axios';
|
14
|
-
export declare const BASE_PATH: string;
|
15
|
-
/**
|
16
|
-
*
|
17
|
-
* @export
|
18
|
-
*/
|
19
|
-
export declare const COLLECTION_FORMATS: {
|
20
|
-
csv: string;
|
21
|
-
ssv: string;
|
22
|
-
tsv: string;
|
23
|
-
pipes: string;
|
24
|
-
};
|
25
|
-
/**
|
26
|
-
*
|
27
|
-
* @export
|
28
|
-
* @interface RequestArgs
|
29
|
-
*/
|
30
|
-
export interface RequestArgs {
|
31
|
-
url: string;
|
32
|
-
options: any;
|
33
|
-
}
|
34
|
-
/**
|
35
|
-
*
|
36
|
-
* @export
|
37
|
-
* @class BaseAPI
|
38
|
-
*/
|
39
|
-
export declare class BaseAPI {
|
40
|
-
protected basePath: string;
|
41
|
-
protected axios: AxiosInstance;
|
42
|
-
protected configuration: Configuration | undefined;
|
43
|
-
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
44
|
-
}
|
45
|
-
/**
|
46
|
-
*
|
47
|
-
* @export
|
48
|
-
* @class RequiredError
|
49
|
-
* @extends {Error}
|
50
|
-
*/
|
51
|
-
export declare class RequiredError extends Error {
|
52
|
-
field: string;
|
53
|
-
name: "RequiredError";
|
54
|
-
constructor(field: string, msg?: string);
|
55
|
-
}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
17
|
-
// Some imports not used depending on template conditions
|
18
|
-
// @ts-ignore
|
19
|
-
var axios_1 = require("axios");
|
20
|
-
exports.BASE_PATH = "/".replace(/\/+$/, "");
|
21
|
-
/**
|
22
|
-
*
|
23
|
-
* @export
|
24
|
-
*/
|
25
|
-
exports.COLLECTION_FORMATS = {
|
26
|
-
csv: ",",
|
27
|
-
ssv: " ",
|
28
|
-
tsv: "\t",
|
29
|
-
pipes: "|",
|
30
|
-
};
|
31
|
-
/**
|
32
|
-
*
|
33
|
-
* @export
|
34
|
-
* @class BaseAPI
|
35
|
-
*/
|
36
|
-
var BaseAPI = /** @class */ (function () {
|
37
|
-
function BaseAPI(configuration, basePath, axios) {
|
38
|
-
if (basePath === void 0) { basePath = exports.BASE_PATH; }
|
39
|
-
if (axios === void 0) { axios = axios_1.default; }
|
40
|
-
this.basePath = basePath;
|
41
|
-
this.axios = axios;
|
42
|
-
if (configuration) {
|
43
|
-
this.configuration = configuration;
|
44
|
-
this.basePath = configuration.basePath || this.basePath;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
return BaseAPI;
|
48
|
-
}());
|
49
|
-
exports.BaseAPI = BaseAPI;
|
50
|
-
;
|
51
|
-
/**
|
52
|
-
*
|
53
|
-
* @export
|
54
|
-
* @class RequiredError
|
55
|
-
* @extends {Error}
|
56
|
-
*/
|
57
|
-
var RequiredError = /** @class */ (function (_super) {
|
58
|
-
__extends(RequiredError, _super);
|
59
|
-
function RequiredError(field, msg) {
|
60
|
-
var _this = _super.call(this, msg) || this;
|
61
|
-
_this.field = field;
|
62
|
-
_this.name = "RequiredError";
|
63
|
-
return _this;
|
64
|
-
}
|
65
|
-
return RequiredError;
|
66
|
-
}(Error));
|
67
|
-
exports.RequiredError = RequiredError;
|
@@ -1,63 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Vital
|
3
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
4
|
-
*
|
5
|
-
* OpenAPI spec version: 0.1.0
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
10
|
-
* Do not edit the class manually.
|
11
|
-
*/
|
12
|
-
export interface ConfigurationParameters {
|
13
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
14
|
-
username?: string;
|
15
|
-
password?: string;
|
16
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
17
|
-
basePath?: string;
|
18
|
-
baseOptions?: any;
|
19
|
-
}
|
20
|
-
export declare class Configuration {
|
21
|
-
/**
|
22
|
-
* parameter for apiKey security
|
23
|
-
* @param name security name
|
24
|
-
* @memberof Configuration
|
25
|
-
*/
|
26
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
27
|
-
/**
|
28
|
-
* parameter for basic security
|
29
|
-
*
|
30
|
-
* @type {string}
|
31
|
-
* @memberof Configuration
|
32
|
-
*/
|
33
|
-
username?: string;
|
34
|
-
/**
|
35
|
-
* parameter for basic security
|
36
|
-
*
|
37
|
-
* @type {string}
|
38
|
-
* @memberof Configuration
|
39
|
-
*/
|
40
|
-
password?: string;
|
41
|
-
/**
|
42
|
-
* parameter for oauth2 security
|
43
|
-
* @param name security name
|
44
|
-
* @param scopes oauth2 scope
|
45
|
-
* @memberof Configuration
|
46
|
-
*/
|
47
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
48
|
-
/**
|
49
|
-
* override base path
|
50
|
-
*
|
51
|
-
* @type {string}
|
52
|
-
* @memberof Configuration
|
53
|
-
*/
|
54
|
-
basePath?: string;
|
55
|
-
/**
|
56
|
-
* base options for axios calls
|
57
|
-
*
|
58
|
-
* @type {any}
|
59
|
-
* @memberof Configuration
|
60
|
-
*/
|
61
|
-
baseOptions?: any;
|
62
|
-
constructor(param?: ConfigurationParameters);
|
63
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Configuration = void 0;
|
4
|
-
var Configuration = /** @class */ (function () {
|
5
|
-
function Configuration(param) {
|
6
|
-
if (param === void 0) { param = {}; }
|
7
|
-
this.apiKey = param.apiKey;
|
8
|
-
this.username = param.username;
|
9
|
-
this.password = param.password;
|
10
|
-
this.accessToken = param.accessToken;
|
11
|
-
this.basePath = param.basePath;
|
12
|
-
this.baseOptions = param.baseOptions;
|
13
|
-
}
|
14
|
-
return Configuration;
|
15
|
-
}());
|
16
|
-
exports.Configuration = Configuration;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Vital
|
3
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
4
|
-
*
|
5
|
-
* OpenAPI spec version: 0.1.0
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
10
|
-
* Do not edit the class manually.
|
11
|
-
*/
|
12
|
-
export * from "./api";
|
13
|
-
export * from "./configuration";
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
-
}) : (function(o, m, k, k2) {
|
6
|
-
if (k2 === undefined) k2 = k;
|
7
|
-
o[k2] = m[k];
|
8
|
-
}));
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
11
|
-
};
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
-
/* tslint:disable */
|
14
|
-
/* eslint-disable */
|
15
|
-
/**
|
16
|
-
* Vital
|
17
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
18
|
-
*
|
19
|
-
* OpenAPI spec version: 0.1.0
|
20
|
-
*
|
21
|
-
*
|
22
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
23
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
24
|
-
* Do not edit the class manually.
|
25
|
-
*/
|
26
|
-
__exportStar(require("./api"), exports);
|
27
|
-
__exportStar(require("./configuration"), exports);
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Vital
|
3
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
4
|
-
*
|
5
|
-
* OpenAPI spec version: 0.1.0
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
10
|
-
* Do not edit the class manually.
|
11
|
-
*/
|
12
|
-
/**
|
13
|
-
*
|
14
|
-
* @export
|
15
|
-
* @interface ClientActivityResponse
|
16
|
-
*/
|
17
|
-
export interface ClientActivityResponse {
|
18
|
-
/**
|
19
|
-
*
|
20
|
-
* @type {Array<ClientFacingActivity>}
|
21
|
-
* @memberof ClientActivityResponse
|
22
|
-
*/
|
23
|
-
activity: any;
|
24
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Vital
|
3
|
-
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
4
|
-
*
|
5
|
-
* OpenAPI spec version: 0.1.0
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* NOTE: This class is auto generated by the swagger code generator program.
|
9
|
-
* https://github.com/swagger-api/swagger-codegen.git
|
10
|
-
* Do not edit the class manually.
|
11
|
-
*/
|
12
|
-
/**
|
13
|
-
*
|
14
|
-
* @export
|
15
|
-
* @interface ClientBodyResponse
|
16
|
-
*/
|
17
|
-
export interface ClientBodyResponse {
|
18
|
-
/**
|
19
|
-
*
|
20
|
-
* @type {Array<ClientFacingBody>}
|
21
|
-
* @memberof ClientBodyResponse
|
22
|
-
*/
|
23
|
-
body: any;
|
24
|
-
}
|