@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,115 +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 { IndividualProviderData } from '../models';
16
- import { LinkTokenExchange } from '../models';
17
- import { LinkTokenExchangeResponse } from '../models';
18
- import { ProviderLinkResponse } from '../models';
19
- import { ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift } from '../models';
20
- /**
21
- * LinkApi - axios parameter creator
22
- * @export
23
- */
24
- export declare const LinkApiAxiosParamCreator: (configuration?: Configuration) => {
25
- /**
26
- * Check token is valid and begin deletion for one time use token.
27
- * @summary Connect Individual Provider
28
- * @param {IndividualProviderData} body
29
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
30
- * @param {*} [options] Override http request option.
31
- * @throws {RequiredError}
32
- */
33
- connectIndividualProvider: (body: IndividualProviderData, provider: ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift, options?: any) => Promise<RequestArgs>;
34
- /**
35
- * POST Generate user Link token using user_key.
36
- * @summary Generate Temp Link Token
37
- * @param {LinkTokenExchange} body
38
- * @param {*} [options] Override http request option.
39
- * @throws {RequiredError}
40
- */
41
- generateTempLinkToken: (body: LinkTokenExchange, options?: any) => Promise<RequestArgs>;
42
- };
43
- /**
44
- * LinkApi - functional programming interface
45
- * @export
46
- */
47
- export declare const LinkApiFp: (configuration?: Configuration) => {
48
- /**
49
- * Check token is valid and begin deletion for one time use token.
50
- * @summary Connect Individual Provider
51
- * @param {IndividualProviderData} body
52
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
53
- * @param {*} [options] Override http request option.
54
- * @throws {RequiredError}
55
- */
56
- connectIndividualProvider(body: IndividualProviderData, provider: ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProviderLinkResponse>>;
57
- /**
58
- * POST Generate user Link token using user_key.
59
- * @summary Generate Temp Link Token
60
- * @param {LinkTokenExchange} body
61
- * @param {*} [options] Override http request option.
62
- * @throws {RequiredError}
63
- */
64
- generateTempLinkToken(body: LinkTokenExchange, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LinkTokenExchangeResponse>>;
65
- };
66
- /**
67
- * LinkApi - factory interface
68
- * @export
69
- */
70
- export declare const LinkApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
71
- /**
72
- * Check token is valid and begin deletion for one time use token.
73
- * @summary Connect Individual Provider
74
- * @param {IndividualProviderData} body
75
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
76
- * @param {*} [options] Override http request option.
77
- * @throws {RequiredError}
78
- */
79
- connectIndividualProvider(body: IndividualProviderData, provider: ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift, options?: any): AxiosPromise<ProviderLinkResponse>;
80
- /**
81
- * POST Generate user Link token using user_key.
82
- * @summary Generate Temp Link Token
83
- * @param {LinkTokenExchange} body
84
- * @param {*} [options] Override http request option.
85
- * @throws {RequiredError}
86
- */
87
- generateTempLinkToken(body: LinkTokenExchange, options?: any): AxiosPromise<LinkTokenExchangeResponse>;
88
- };
89
- /**
90
- * LinkApi - object-oriented interface
91
- * @export
92
- * @class LinkApi
93
- * @extends {BaseAPI}
94
- */
95
- export declare class LinkApi extends BaseAPI {
96
- /**
97
- * Check token is valid and begin deletion for one time use token.
98
- * @summary Connect Individual Provider
99
- * @param {IndividualProviderData} body
100
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
101
- * @param {*} [options] Override http request option.
102
- * @throws {RequiredError}
103
- * @memberof LinkApi
104
- */
105
- connectIndividualProvider(body: IndividualProviderData, provider: ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift, options?: any): Promise<import("axios").AxiosResponse<ProviderLinkResponse>>;
106
- /**
107
- * POST Generate user Link token using user_key.
108
- * @summary Generate Temp Link Token
109
- * @param {LinkTokenExchange} body
110
- * @param {*} [options] Override http request option.
111
- * @throws {RequiredError}
112
- * @memberof LinkApi
113
- */
114
- generateTempLinkToken(body: LinkTokenExchange, options?: any): Promise<import("axios").AxiosResponse<LinkTokenExchangeResponse>>;
115
- }
@@ -1,310 +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.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = 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
- * LinkApi - axios parameter creator
83
- * @export
84
- */
85
- exports.LinkApiAxiosParamCreator = function (configuration) {
86
- var _this = this;
87
- return {
88
- /**
89
- * Check token is valid and begin deletion for one time use token.
90
- * @summary Connect Individual Provider
91
- * @param {IndividualProviderData} body
92
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
93
- * @param {*} [options] Override http request option.
94
- * @throws {RequiredError}
95
- */
96
- connectIndividualProvider: function (body, provider, options) {
97
- if (options === void 0) { options = {}; }
98
- return __awaiter(_this, void 0, void 0, function () {
99
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
100
- return __generator(this, function (_a) {
101
- // verify required parameter 'body' is not null or undefined
102
- if (body === null || body === undefined) {
103
- throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling connectIndividualProvider.');
104
- }
105
- // verify required parameter 'provider' is not null or undefined
106
- if (provider === null || provider === undefined) {
107
- throw new base_1.RequiredError('provider', 'Required parameter provider was null or undefined when calling connectIndividualProvider.');
108
- }
109
- localVarPath = "/v1/link/provider/{provider}"
110
- .replace("{" + "provider" + "}", encodeURIComponent(String(provider)));
111
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
112
- if (configuration) {
113
- baseOptions = configuration.baseOptions;
114
- }
115
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
116
- localVarHeaderParameter = {};
117
- localVarQueryParameter = {};
118
- localVarHeaderParameter['Content-Type'] = 'application/json';
119
- query = new URLSearchParams(localVarUrlObj.search);
120
- for (key in localVarQueryParameter) {
121
- query.set(key, localVarQueryParameter[key]);
122
- }
123
- for (key in options.query) {
124
- query.set(key, options.query[key]);
125
- }
126
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
127
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
128
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
129
- needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
130
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
131
- return [2 /*return*/, {
132
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
133
- options: localVarRequestOptions,
134
- }];
135
- });
136
- });
137
- },
138
- /**
139
- * POST Generate user Link token using user_key.
140
- * @summary Generate Temp Link Token
141
- * @param {LinkTokenExchange} body
142
- * @param {*} [options] Override http request option.
143
- * @throws {RequiredError}
144
- */
145
- generateTempLinkToken: function (body, options) {
146
- if (options === void 0) { options = {}; }
147
- return __awaiter(_this, void 0, void 0, function () {
148
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
149
- return __generator(this, function (_a) {
150
- // verify required parameter 'body' is not null or undefined
151
- if (body === null || body === undefined) {
152
- throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling generateTempLinkToken.');
153
- }
154
- localVarPath = "/v1/link/token";
155
- localVarUrlObj = new URL(localVarPath, 'https://example.com');
156
- if (configuration) {
157
- baseOptions = configuration.baseOptions;
158
- }
159
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
160
- localVarHeaderParameter = {};
161
- localVarQueryParameter = {};
162
- localVarHeaderParameter['Content-Type'] = 'application/json';
163
- query = new URLSearchParams(localVarUrlObj.search);
164
- for (key in localVarQueryParameter) {
165
- query.set(key, localVarQueryParameter[key]);
166
- }
167
- for (key in options.query) {
168
- query.set(key, options.query[key]);
169
- }
170
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
171
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
173
- needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
174
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
175
- return [2 /*return*/, {
176
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
177
- options: localVarRequestOptions,
178
- }];
179
- });
180
- });
181
- },
182
- };
183
- };
184
- /**
185
- * LinkApi - functional programming interface
186
- * @export
187
- */
188
- exports.LinkApiFp = function (configuration) {
189
- return {
190
- /**
191
- * Check token is valid and begin deletion for one time use token.
192
- * @summary Connect Individual Provider
193
- * @param {IndividualProviderData} body
194
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
195
- * @param {*} [options] Override http request option.
196
- * @throws {RequiredError}
197
- */
198
- connectIndividualProvider: function (body, provider, options) {
199
- return __awaiter(this, void 0, void 0, function () {
200
- var localVarAxiosArgs;
201
- return __generator(this, function (_a) {
202
- switch (_a.label) {
203
- case 0: return [4 /*yield*/, exports.LinkApiAxiosParamCreator(configuration).connectIndividualProvider(body, provider, options)];
204
- case 1:
205
- localVarAxiosArgs = _a.sent();
206
- return [2 /*return*/, function (axios, basePath) {
207
- if (axios === void 0) { axios = axios_1.default; }
208
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
209
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
210
- return axios.request(axiosRequestArgs);
211
- }];
212
- }
213
- });
214
- });
215
- },
216
- /**
217
- * POST Generate user Link token using user_key.
218
- * @summary Generate Temp Link Token
219
- * @param {LinkTokenExchange} body
220
- * @param {*} [options] Override http request option.
221
- * @throws {RequiredError}
222
- */
223
- generateTempLinkToken: function (body, options) {
224
- return __awaiter(this, void 0, void 0, function () {
225
- var localVarAxiosArgs;
226
- return __generator(this, function (_a) {
227
- switch (_a.label) {
228
- case 0: return [4 /*yield*/, exports.LinkApiAxiosParamCreator(configuration).generateTempLinkToken(body, options)];
229
- case 1:
230
- localVarAxiosArgs = _a.sent();
231
- return [2 /*return*/, function (axios, basePath) {
232
- if (axios === void 0) { axios = axios_1.default; }
233
- if (basePath === void 0) { basePath = base_1.BASE_PATH; }
234
- var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
235
- return axios.request(axiosRequestArgs);
236
- }];
237
- }
238
- });
239
- });
240
- },
241
- };
242
- };
243
- /**
244
- * LinkApi - factory interface
245
- * @export
246
- */
247
- exports.LinkApiFactory = function (configuration, basePath, axios) {
248
- return {
249
- /**
250
- * Check token is valid and begin deletion for one time use token.
251
- * @summary Connect Individual Provider
252
- * @param {IndividualProviderData} body
253
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
254
- * @param {*} [options] Override http request option.
255
- * @throws {RequiredError}
256
- */
257
- connectIndividualProvider: function (body, provider, options) {
258
- return exports.LinkApiFp(configuration).connectIndividualProvider(body, provider, options).then(function (request) { return request(axios, basePath); });
259
- },
260
- /**
261
- * POST Generate user Link token using user_key.
262
- * @summary Generate Temp Link Token
263
- * @param {LinkTokenExchange} body
264
- * @param {*} [options] Override http request option.
265
- * @throws {RequiredError}
266
- */
267
- generateTempLinkToken: function (body, options) {
268
- return exports.LinkApiFp(configuration).generateTempLinkToken(body, options).then(function (request) { return request(axios, basePath); });
269
- },
270
- };
271
- };
272
- /**
273
- * LinkApi - object-oriented interface
274
- * @export
275
- * @class LinkApi
276
- * @extends {BaseAPI}
277
- */
278
- var LinkApi = /** @class */ (function (_super) {
279
- __extends(LinkApi, _super);
280
- function LinkApi() {
281
- return _super !== null && _super.apply(this, arguments) || this;
282
- }
283
- /**
284
- * Check token is valid and begin deletion for one time use token.
285
- * @summary Connect Individual Provider
286
- * @param {IndividualProviderData} body
287
- * @param {ProvidersThatRequirePasswordAuthWhoopRenphoPelotonZwift} provider
288
- * @param {*} [options] Override http request option.
289
- * @throws {RequiredError}
290
- * @memberof LinkApi
291
- */
292
- LinkApi.prototype.connectIndividualProvider = function (body, provider, options) {
293
- var _this = this;
294
- return exports.LinkApiFp(this.configuration).connectIndividualProvider(body, provider, options).then(function (request) { return request(_this.axios, _this.basePath); });
295
- };
296
- /**
297
- * POST Generate user Link token using user_key.
298
- * @summary Generate Temp Link Token
299
- * @param {LinkTokenExchange} body
300
- * @param {*} [options] Override http request option.
301
- * @throws {RequiredError}
302
- * @memberof LinkApi
303
- */
304
- LinkApi.prototype.generateTempLinkToken = function (body, options) {
305
- var _this = this;
306
- return exports.LinkApiFp(this.configuration).generateTempLinkToken(body, options).then(function (request) { return request(_this.axios, _this.basePath); });
307
- };
308
- return LinkApi;
309
- }(base_1.BaseAPI));
310
- exports.LinkApi = LinkApi;
@@ -1,90 +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 { ClientSourceSpecificResponse } from '../models';
16
- /**
17
- * ProviderSpecificApi - axios parameter creator
18
- * @export
19
- */
20
- export declare const ProviderSpecificApiAxiosParamCreator: (configuration?: Configuration) => {
21
- /**
22
- * Get Daily Source-specific data for user
23
- * @summary Get User Source Specfic
24
- * @param {string} userKey
25
- * @param {string} provider
26
- * @param {Date} startDate Date from in YYYY-MM-DD
27
- * @param {Date} endDate Date to in YYYY-MM-DD
28
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
29
- * @param {*} [options] Override http request option.
30
- * @throws {RequiredError}
31
- */
32
- getUserSourceSpecfic: (userKey: string, provider: string, startDate: Date, endDate: Date, dataType?: string, options?: any) => Promise<RequestArgs>;
33
- };
34
- /**
35
- * ProviderSpecificApi - functional programming interface
36
- * @export
37
- */
38
- export declare const ProviderSpecificApiFp: (configuration?: Configuration) => {
39
- /**
40
- * Get Daily Source-specific data for user
41
- * @summary Get User Source Specfic
42
- * @param {string} userKey
43
- * @param {string} provider
44
- * @param {Date} startDate Date from in YYYY-MM-DD
45
- * @param {Date} endDate Date to in YYYY-MM-DD
46
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
47
- * @param {*} [options] Override http request option.
48
- * @throws {RequiredError}
49
- */
50
- getUserSourceSpecfic(userKey: string, provider: string, startDate: Date, endDate: Date, dataType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ClientSourceSpecificResponse>>;
51
- };
52
- /**
53
- * ProviderSpecificApi - factory interface
54
- * @export
55
- */
56
- export declare const ProviderSpecificApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
57
- /**
58
- * Get Daily Source-specific data for user
59
- * @summary Get User Source Specfic
60
- * @param {string} userKey
61
- * @param {string} provider
62
- * @param {Date} startDate Date from in YYYY-MM-DD
63
- * @param {Date} endDate Date to in YYYY-MM-DD
64
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
65
- * @param {*} [options] Override http request option.
66
- * @throws {RequiredError}
67
- */
68
- getUserSourceSpecfic(userKey: string, provider: string, startDate: Date, endDate: Date, dataType?: string, options?: any): AxiosPromise<ClientSourceSpecificResponse>;
69
- };
70
- /**
71
- * ProviderSpecificApi - object-oriented interface
72
- * @export
73
- * @class ProviderSpecificApi
74
- * @extends {BaseAPI}
75
- */
76
- export declare class ProviderSpecificApi extends BaseAPI {
77
- /**
78
- * Get Daily Source-specific data for user
79
- * @summary Get User Source Specfic
80
- * @param {string} userKey
81
- * @param {string} provider
82
- * @param {Date} startDate Date from in YYYY-MM-DD
83
- * @param {Date} endDate Date to in YYYY-MM-DD
84
- * @param {string} [dataType] Type of data, activity/sleep/workouts/body
85
- * @param {*} [options] Override http request option.
86
- * @throws {RequiredError}
87
- * @memberof ProviderSpecificApi
88
- */
89
- getUserSourceSpecfic(userKey: string, provider: string, startDate: Date, endDate: Date, dataType?: string, options?: any): Promise<import("axios").AxiosResponse<ClientSourceSpecificResponse>>;
90
- }