@tryvital/vital-node 0.3.9 → 1.0.0

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.
Files changed (135) hide show
  1. package/client/Activity.ts +1 -1
  2. package/client/Body.ts +1 -1
  3. package/client/Profile.ts +25 -0
  4. package/client/Sleep.ts +2 -2
  5. package/client/Testkits.ts +7 -1
  6. package/client/Vitals.ts +45 -45
  7. package/client/Webhooks.ts +7 -58
  8. package/client/Workouts.ts +3 -3
  9. package/client/index.ts +1 -1
  10. package/client/models/activity.ts +7 -0
  11. package/client/models/body_model.ts +0 -18
  12. package/client/models/profile_model.ts +34 -0
  13. package/dist/client/Activity.js +1 -1
  14. package/dist/client/Body.js +1 -1
  15. package/dist/client/Profile.d.ts +8 -0
  16. package/dist/client/{ProviderSpecific.js → Profile.js} +8 -12
  17. package/dist/client/Sleep.js +2 -2
  18. package/dist/client/Testkits.d.ts +1 -0
  19. package/dist/client/Testkits.js +13 -0
  20. package/dist/client/Vitals.d.ts +7 -6
  21. package/dist/client/Vitals.js +16 -41
  22. package/dist/client/Webhooks.d.ts +1 -7
  23. package/dist/client/Webhooks.js +4 -102
  24. package/dist/client/Workouts.d.ts +1 -1
  25. package/dist/client/Workouts.js +3 -3
  26. package/dist/client/index.d.ts +1 -1
  27. package/dist/client/index.js +3 -3
  28. package/dist/client/models/activity.d.ts +6 -0
  29. package/dist/client/models/body_model.d.ts +0 -18
  30. package/dist/client/models/profile_model.d.ts +33 -0
  31. package/dist/{swagger_client/models/client-activity-response.js → client/models/profile_model.js} +0 -0
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +11 -11
  34. package/dist/lib/config.d.ts +0 -1
  35. package/dist/lib/config.js +0 -1
  36. package/index.ts +14 -14
  37. package/lib/config.ts +0 -1
  38. package/package.json +3 -2
  39. package/client/ProviderSpecific.ts +0 -31
  40. package/dist/client/ProviderSpecific.d.ts +0 -8
  41. package/dist/swagger_client/api.d.ts +0 -18
  42. package/dist/swagger_client/api.js +0 -32
  43. package/dist/swagger_client/apis/activity-api.d.ts +0 -86
  44. package/dist/swagger_client/apis/activity-api.js +0 -241
  45. package/dist/swagger_client/apis/body-api.d.ts +0 -86
  46. package/dist/swagger_client/apis/body-api.js +0 -241
  47. package/dist/swagger_client/apis/link-api.d.ts +0 -115
  48. package/dist/swagger_client/apis/link-api.js +0 -310
  49. package/dist/swagger_client/apis/provider-specific-api.d.ts +0 -90
  50. package/dist/swagger_client/apis/provider-specific-api.js +0 -250
  51. package/dist/swagger_client/apis/sleep-api.d.ts +0 -120
  52. package/dist/swagger_client/apis/sleep-api.js +0 -330
  53. package/dist/swagger_client/apis/user-api.d.ts +0 -243
  54. package/dist/swagger_client/apis/user-api.js +0 -657
  55. package/dist/swagger_client/apis/webhooks-api.d.ts +0 -138
  56. package/dist/swagger_client/apis/webhooks-api.js +0 -379
  57. package/dist/swagger_client/apis/workouts-api.d.ts +0 -120
  58. package/dist/swagger_client/apis/workouts-api.js +0 -330
  59. package/dist/swagger_client/base.d.ts +0 -55
  60. package/dist/swagger_client/base.js +0 -67
  61. package/dist/swagger_client/configuration.d.ts +0 -63
  62. package/dist/swagger_client/configuration.js +0 -16
  63. package/dist/swagger_client/index.d.ts +0 -13
  64. package/dist/swagger_client/index.js +0 -27
  65. package/dist/swagger_client/models/client-activity-response.d.ts +0 -24
  66. package/dist/swagger_client/models/client-body-response.d.ts +0 -24
  67. package/dist/swagger_client/models/client-body-response.js +0 -2
  68. package/dist/swagger_client/models/client-facing-activity.d.ts +0 -84
  69. package/dist/swagger_client/models/client-facing-activity.js +0 -2
  70. package/dist/swagger_client/models/client-facing-body.d.ts +0 -72
  71. package/dist/swagger_client/models/client-facing-body.js +0 -2
  72. package/dist/swagger_client/models/client-facing-sleep-stream.d.ts +0 -48
  73. package/dist/swagger_client/models/client-facing-sleep-stream.js +0 -2
  74. package/dist/swagger_client/models/client-facing-sleep.d.ts +0 -138
  75. package/dist/swagger_client/models/client-facing-sleep.js +0 -2
  76. package/dist/swagger_client/models/client-facing-source-specific.d.ts +0 -48
  77. package/dist/swagger_client/models/client-facing-source-specific.js +0 -2
  78. package/dist/swagger_client/models/client-facing-sport.d.ts +0 -30
  79. package/dist/swagger_client/models/client-facing-sport.js +0 -2
  80. package/dist/swagger_client/models/client-facing-stream.d.ts +0 -84
  81. package/dist/swagger_client/models/client-facing-stream.js +0 -2
  82. package/dist/swagger_client/models/client-facing-user.d.ts +0 -48
  83. package/dist/swagger_client/models/client-facing-user.js +0 -2
  84. package/dist/swagger_client/models/client-facing-webhook.d.ts +0 -42
  85. package/dist/swagger_client/models/client-facing-webhook.js +0 -2
  86. package/dist/swagger_client/models/client-facing-workout.d.ts +0 -150
  87. package/dist/swagger_client/models/client-facing-workout.js +0 -2
  88. package/dist/swagger_client/models/client-sleep-response.d.ts +0 -24
  89. package/dist/swagger_client/models/client-sleep-response.js +0 -2
  90. package/dist/swagger_client/models/client-source-specific-response.d.ts +0 -24
  91. package/dist/swagger_client/models/client-source-specific-response.js +0 -2
  92. package/dist/swagger_client/models/client-webhook-response.d.ts +0 -24
  93. package/dist/swagger_client/models/client-webhook-response.js +0 -2
  94. package/dist/swagger_client/models/client-workout-response.d.ts +0 -24
  95. package/dist/swagger_client/models/client-workout-response.js +0 -2
  96. package/dist/swagger_client/models/connected-source-client-facing.d.ts +0 -24
  97. package/dist/swagger_client/models/connected-source-client-facing.js +0 -2
  98. package/dist/swagger_client/models/httpvalidation-error.d.ts +0 -24
  99. package/dist/swagger_client/models/httpvalidation-error.js +0 -2
  100. package/dist/swagger_client/models/index.d.ts +0 -32
  101. package/dist/swagger_client/models/index.js +0 -44
  102. package/dist/swagger_client/models/individual-provider-data.d.ts +0 -30
  103. package/dist/swagger_client/models/individual-provider-data.js +0 -2
  104. package/dist/swagger_client/models/link-token-exchange-response.d.ts +0 -24
  105. package/dist/swagger_client/models/link-token-exchange-response.js +0 -2
  106. package/dist/swagger_client/models/link-token-exchange.d.ts +0 -30
  107. package/dist/swagger_client/models/link-token-exchange.js +0 -2
  108. package/dist/swagger_client/models/password-providers.d.ts +0 -22
  109. package/dist/swagger_client/models/password-providers.js +0 -28
  110. package/dist/swagger_client/models/provider-link-response.d.ts +0 -30
  111. package/dist/swagger_client/models/provider-link-response.js +0 -2
  112. package/dist/swagger_client/models/providers-that-require-password-auth-whoop-renpho-peloton-zwift.d.ts +0 -18
  113. package/dist/swagger_client/models/providers-that-require-password-auth-whoop-renpho-peloton-zwift.js +0 -2
  114. package/dist/swagger_client/models/providers.d.ts +0 -27
  115. package/dist/swagger_client/models/providers.js +0 -33
  116. package/dist/swagger_client/models/source-client-facing.d.ts +0 -36
  117. package/dist/swagger_client/models/source-client-facing.js +0 -2
  118. package/dist/swagger_client/models/user-create.d.ts +0 -24
  119. package/dist/swagger_client/models/user-create.js +0 -2
  120. package/dist/swagger_client/models/user-key-response.d.ts +0 -30
  121. package/dist/swagger_client/models/user-key-response.js +0 -2
  122. package/dist/swagger_client/models/user-success-response.d.ts +0 -24
  123. package/dist/swagger_client/models/user-success-response.js +0 -2
  124. package/dist/swagger_client/models/validation-error.d.ts +0 -36
  125. package/dist/swagger_client/models/validation-error.js +0 -2
  126. package/dist/swagger_client/models/webhook-register.d.ts +0 -36
  127. package/dist/swagger_client/models/webhook-register.js +0 -2
  128. package/dist/swagger_client/models/webhook-type.d.ts +0 -24
  129. package/dist/swagger_client/models/webhook-type.js +0 -30
  130. package/dist/test/data/mock_webhook.d.ts +0 -49
  131. package/dist/test/data/mock_webhook.js +0 -170
  132. package/dist/test/webhook.spec.d.ts +0 -1
  133. package/dist/test/webhook.spec.js +0 -160
  134. package/test/data/mock_webhook.ts +0 -167
  135. package/test/webhook.spec.ts +0 -254
@@ -1,250 +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.ProviderSpecificApi = exports.ProviderSpecificApiFactory = exports.ProviderSpecificApiFp = exports.ProviderSpecificApiAxiosParamCreator = 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
- * ProviderSpecificApi - axios parameter creator
83
- * @export
84
- */
85
- exports.ProviderSpecificApiAxiosParamCreator = function (configuration) {
86
- var _this = this;
87
- return {
88
- /**
89
- * Get Daily Source-specific data for user
90
- * @summary Get User Source Specfic
91
- * @param {string} userKey
92
- * @param {string} provider
93
- * @param {Date} startDate Date from in YYYY-MM-DD
94
- * @param {Date} endDate Date to in YYYY-MM-DD
95
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
96
- * @param {*} [options] Override http request option.
97
- * @throws {RequiredError}
98
- */
99
- getUserSourceSpecfic: function (userKey, provider, startDate, endDate, dataType, options) {
100
- if (options === void 0) { options = {}; }
101
- return __awaiter(_this, void 0, void 0, function () {
102
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
103
- return __generator(this, function (_a) {
104
- // verify required parameter 'userKey' is not null or undefined
105
- if (userKey === null || userKey === undefined) {
106
- throw new base_1.RequiredError('userKey', 'Required parameter userKey was null or undefined when calling getUserSourceSpecfic.');
107
- }
108
- // verify required parameter 'provider' is not null or undefined
109
- if (provider === null || provider === undefined) {
110
- throw new base_1.RequiredError('provider', 'Required parameter provider was null or undefined when calling getUserSourceSpecfic.');
111
- }
112
- // verify required parameter 'startDate' is not null or undefined
113
- if (startDate === null || startDate === undefined) {
114
- throw new base_1.RequiredError('startDate', 'Required parameter startDate was null or undefined when calling getUserSourceSpecfic.');
115
- }
116
- // verify required parameter 'endDate' is not null or undefined
117
- if (endDate === null || endDate === undefined) {
118
- throw new base_1.RequiredError('endDate', 'Required parameter endDate was null or undefined when calling getUserSourceSpecfic.');
119
- }
120
- localVarPath = "/v1/provider-specific/{user_key}/{provider}"
121
- .replace("{" + "user_key" + "}", encodeURIComponent(String(userKey)))
122
- .replace("{" + "provider" + "}", encodeURIComponent(String(provider)));
123
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
124
- if (configuration) {
125
- baseOptions = configuration.baseOptions;
126
- }
127
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
128
- localVarHeaderParameter = {};
129
- localVarQueryParameter = {};
130
- if (startDate !== undefined) {
131
- localVarQueryParameter['start_date'] = (startDate instanceof Date) ?
132
- startDate.toISOString() :
133
- startDate;
134
- }
135
- if (endDate !== undefined) {
136
- localVarQueryParameter['end_date'] = (endDate instanceof Date) ?
137
- endDate.toISOString() :
138
- endDate;
139
- }
140
- if (dataType !== undefined) {
141
- localVarQueryParameter['data_type'] = dataType;
142
- }
143
- query = new URLSearchParams(localVarUrlObj.search);
144
- for (key in localVarQueryParameter) {
145
- query.set(key, localVarQueryParameter[key]);
146
- }
147
- for (key in options.query) {
148
- query.set(key, options.query[key]);
149
- }
150
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
151
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
152
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
153
- return [2 /*return*/, {
154
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
155
- options: localVarRequestOptions,
156
- }];
157
- });
158
- });
159
- },
160
- };
161
- };
162
- /**
163
- * ProviderSpecificApi - functional programming interface
164
- * @export
165
- */
166
- exports.ProviderSpecificApiFp = function (configuration) {
167
- return {
168
- /**
169
- * Get Daily Source-specific data for user
170
- * @summary Get User Source Specfic
171
- * @param {string} userKey
172
- * @param {string} provider
173
- * @param {Date} startDate Date from in YYYY-MM-DD
174
- * @param {Date} endDate Date to in YYYY-MM-DD
175
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
176
- * @param {*} [options] Override http request option.
177
- * @throws {RequiredError}
178
- */
179
- getUserSourceSpecfic: function (userKey, provider, startDate, endDate, dataType, options) {
180
- return __awaiter(this, void 0, void 0, function () {
181
- var localVarAxiosArgs;
182
- return __generator(this, function (_a) {
183
- switch (_a.label) {
184
- case 0: return [4 /*yield*/, exports.ProviderSpecificApiAxiosParamCreator(configuration).getUserSourceSpecfic(userKey, provider, startDate, endDate, dataType, options)];
185
- case 1:
186
- localVarAxiosArgs = _a.sent();
187
- return [2 /*return*/, function (axios, basePath) {
188
- if (axios === void 0) { axios = axios_1.default; }
189
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
190
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
191
- return axios.request(axiosRequestArgs);
192
- }];
193
- }
194
- });
195
- });
196
- },
197
- };
198
- };
199
- /**
200
- * ProviderSpecificApi - factory interface
201
- * @export
202
- */
203
- exports.ProviderSpecificApiFactory = function (configuration, basePath, axios) {
204
- return {
205
- /**
206
- * Get Daily Source-specific data for user
207
- * @summary Get User Source Specfic
208
- * @param {string} userKey
209
- * @param {string} provider
210
- * @param {Date} startDate Date from in YYYY-MM-DD
211
- * @param {Date} endDate Date to in YYYY-MM-DD
212
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
213
- * @param {*} [options] Override http request option.
214
- * @throws {RequiredError}
215
- */
216
- getUserSourceSpecfic: function (userKey, provider, startDate, endDate, dataType, options) {
217
- return exports.ProviderSpecificApiFp(configuration).getUserSourceSpecfic(userKey, provider, startDate, endDate, dataType, options).then(function (request) { return request(axios, basePath); });
218
- },
219
- };
220
- };
221
- /**
222
- * ProviderSpecificApi - object-oriented interface
223
- * @export
224
- * @class ProviderSpecificApi
225
- * @extends {BaseAPI}
226
- */
227
- var ProviderSpecificApi = /** @class */ (function (_super) {
228
- __extends(ProviderSpecificApi, _super);
229
- function ProviderSpecificApi() {
230
- return _super !== null && _super.apply(this, arguments) || this;
231
- }
232
- /**
233
- * Get Daily Source-specific data for user
234
- * @summary Get User Source Specfic
235
- * @param {string} userKey
236
- * @param {string} provider
237
- * @param {Date} startDate Date from in YYYY-MM-DD
238
- * @param {Date} endDate Date to in YYYY-MM-DD
239
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
240
- * @param {*} [options] Override http request option.
241
- * @throws {RequiredError}
242
- * @memberof ProviderSpecificApi
243
- */
244
- ProviderSpecificApi.prototype.getUserSourceSpecfic = function (userKey, provider, startDate, endDate, dataType, options) {
245
- var _this = this;
246
- return exports.ProviderSpecificApiFp(this.configuration).getUserSourceSpecfic(userKey, provider, startDate, endDate, dataType, options).then(function (request) { return request(_this.axios, _this.basePath); });
247
- };
248
- return ProviderSpecificApi;
249
- }(base_1.BaseAPI));
250
- exports.ProviderSpecificApi = ProviderSpecificApi;
@@ -1,120 +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 { AxiosPromise, AxiosInstance } from 'axios';
13
- import { Configuration } from '../configuration';
14
- import { RequestArgs, BaseAPI } from '../base';
15
- import { ClientFacingSleepStream } from '../models';
16
- import { ClientSleepResponse } from '../models';
17
- /**
18
- * SleepApi - axios parameter creator
19
- * @export
20
- */
21
- export declare const SleepApiAxiosParamCreator: (configuration?: Configuration) => {
22
- /**
23
- * Get Daily Sleep data for user_key
24
- * @summary Get User Sleep
25
- * @param {string} userKey
26
- * @param {Date} startDate Date from in YYYY-MM-DD
27
- * @param {Date} endDate Date to in YYYY-MM-DD
28
- * @param {string} [provider] Provider oura/strava etc.
29
- * @param {*} [options] Override http request option.
30
- * @throws {RequiredError}
31
- */
32
- getUserSleep: (userKey: string, startDate: Date, endDate: Date, provider?: string, options?: any) => Promise<RequestArgs>;
33
- /**
34
- * GET Sleep Stream Data for sleep_id
35
- * @summary Get Workout Stream
36
- * @param {string} sleepId
37
- * @param {*} [options] Override http request option.
38
- * @throws {RequiredError}
39
- */
40
- getWorkoutStream: (sleepId: string, options?: any) => Promise<RequestArgs>;
41
- };
42
- /**
43
- * SleepApi - functional programming interface
44
- * @export
45
- */
46
- export declare const SleepApiFp: (configuration?: Configuration) => {
47
- /**
48
- * Get Daily Sleep data for user_key
49
- * @summary Get User Sleep
50
- * @param {string} userKey
51
- * @param {Date} startDate Date from in YYYY-MM-DD
52
- * @param {Date} endDate Date to in YYYY-MM-DD
53
- * @param {string} [provider] Provider oura/strava etc.
54
- * @param {*} [options] Override http request option.
55
- * @throws {RequiredError}
56
- */
57
- getUserSleep(userKey: string, startDate: Date, endDate: Date, provider?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClientSleepResponse>>;
58
- /**
59
- * GET Sleep Stream Data for sleep_id
60
- * @summary Get Workout Stream
61
- * @param {string} sleepId
62
- * @param {*} [options] Override http request option.
63
- * @throws {RequiredError}
64
- */
65
- getWorkoutStream(sleepId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClientFacingSleepStream>>;
66
- };
67
- /**
68
- * SleepApi - factory interface
69
- * @export
70
- */
71
- export declare const SleepApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
72
- /**
73
- * Get Daily Sleep data for user_key
74
- * @summary Get User Sleep
75
- * @param {string} userKey
76
- * @param {Date} startDate Date from in YYYY-MM-DD
77
- * @param {Date} endDate Date to in YYYY-MM-DD
78
- * @param {string} [provider] Provider oura/strava etc.
79
- * @param {*} [options] Override http request option.
80
- * @throws {RequiredError}
81
- */
82
- getUserSleep(userKey: string, startDate: Date, endDate: Date, provider?: string, options?: any): AxiosPromise<ClientSleepResponse>;
83
- /**
84
- * GET Sleep Stream Data for sleep_id
85
- * @summary Get Workout Stream
86
- * @param {string} sleepId
87
- * @param {*} [options] Override http request option.
88
- * @throws {RequiredError}
89
- */
90
- getWorkoutStream(sleepId: string, options?: any): AxiosPromise<ClientFacingSleepStream>;
91
- };
92
- /**
93
- * SleepApi - object-oriented interface
94
- * @export
95
- * @class SleepApi
96
- * @extends {BaseAPI}
97
- */
98
- export declare class SleepApi extends BaseAPI {
99
- /**
100
- * Get Daily Sleep data for user_key
101
- * @summary Get User Sleep
102
- * @param {string} userKey
103
- * @param {Date} startDate Date from in YYYY-MM-DD
104
- * @param {Date} endDate Date to in YYYY-MM-DD
105
- * @param {string} [provider] Provider oura/strava etc.
106
- * @param {*} [options] Override http request option.
107
- * @throws {RequiredError}
108
- * @memberof SleepApi
109
- */
110
- getUserSleep(userKey: string, startDate: Date, endDate: Date, provider?: string, options?: any): Promise<import("axios").AxiosResponse<ClientSleepResponse>>;
111
- /**
112
- * GET Sleep Stream Data for sleep_id
113
- * @summary Get Workout Stream
114
- * @param {string} sleepId
115
- * @param {*} [options] Override http request option.
116
- * @throws {RequiredError}
117
- * @memberof SleepApi
118
- */
119
- getWorkoutStream(sleepId: string, options?: any): Promise<import("axios").AxiosResponse<ClientFacingSleepStream>>;
120
- }