@dimrev4/fitness-v3-backend 0.0.3

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 (51) hide show
  1. package/.openapi-generator/FILES +30 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +423 -0
  5. package/api.ts +1870 -0
  6. package/base.ts +86 -0
  7. package/common.ts +150 -0
  8. package/configuration.ts +115 -0
  9. package/dist/api.d.ts +1285 -0
  10. package/dist/api.js +970 -0
  11. package/dist/base.d.ts +66 -0
  12. package/dist/base.js +65 -0
  13. package/dist/common.d.ts +65 -0
  14. package/dist/common.js +161 -0
  15. package/dist/configuration.d.ts +91 -0
  16. package/dist/configuration.js +44 -0
  17. package/dist/esm/api.d.ts +1285 -0
  18. package/dist/esm/api.js +959 -0
  19. package/dist/esm/base.d.ts +66 -0
  20. package/dist/esm/base.js +60 -0
  21. package/dist/esm/common.d.ts +65 -0
  22. package/dist/esm/common.js +149 -0
  23. package/dist/esm/configuration.d.ts +91 -0
  24. package/dist/esm/configuration.js +40 -0
  25. package/dist/esm/index.d.ts +13 -0
  26. package/dist/esm/index.js +15 -0
  27. package/dist/index.d.ts +13 -0
  28. package/dist/index.js +31 -0
  29. package/docs/AuthV1Api.md +257 -0
  30. package/docs/ConfirmOtpRequestDto.md +22 -0
  31. package/docs/CreateMeasurementRequestDto.md +26 -0
  32. package/docs/DeleteMeasurementResponseDto.md +22 -0
  33. package/docs/GetMeResponseDto.md +20 -0
  34. package/docs/GetMeasurementsResponseDto.md +30 -0
  35. package/docs/GroupDto.md +28 -0
  36. package/docs/LoginRequestDto.md +22 -0
  37. package/docs/LoginResponseDto.md +22 -0
  38. package/docs/LogoutResponseDto.md +20 -0
  39. package/docs/MeasurementDto.md +36 -0
  40. package/docs/MeasurementsV1Api.md +414 -0
  41. package/docs/RegisterRequestDto.md +24 -0
  42. package/docs/RegisterResponseDto.md +20 -0
  43. package/docs/UpdateMeasurementRequestDto.md +24 -0
  44. package/docs/UserDetailsDto.md +32 -0
  45. package/docs/UserDto.md +30 -0
  46. package/docs/UserToGroupDetailsDto.md +42 -0
  47. package/git_push.sh +57 -0
  48. package/index.ts +18 -0
  49. package/package.json +38 -0
  50. package/tsconfig.esm.json +7 -0
  51. package/tsconfig.json +18 -0
@@ -0,0 +1,959 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Fitness Backend
5
+ * Fitness Backend API
6
+ *
7
+ * The version of the OpenAPI document: 0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ /**
30
+ * AuthV1Api - axios parameter creator
31
+ * @export
32
+ */
33
+ export const AuthV1ApiAxiosParamCreator = function (configuration) {
34
+ return {
35
+ /**
36
+ *
37
+ * @summary Confirm OTP
38
+ * @param {ConfirmOtpRequestDto} confirmOtpRequestDto
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ authV1ControllerConfirmOtp: (confirmOtpRequestDto_1, ...args_1) => __awaiter(this, [confirmOtpRequestDto_1, ...args_1], void 0, function* (confirmOtpRequestDto, options = {}) {
43
+ // verify required parameter 'confirmOtpRequestDto' is not null or undefined
44
+ assertParamExists('authV1ControllerConfirmOtp', 'confirmOtpRequestDto', confirmOtpRequestDto);
45
+ const localVarPath = `/api/auth/v1/confirm-otp`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ localVarHeaderParameter['Content-Type'] = 'application/json';
56
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
59
+ localVarRequestOptions.data = serializeDataIfNeeded(confirmOtpRequestDto, localVarRequestOptions, configuration);
60
+ return {
61
+ url: toPathString(localVarUrlObj),
62
+ options: localVarRequestOptions,
63
+ };
64
+ }),
65
+ /**
66
+ *
67
+ * @summary Get Me
68
+ * @param {*} [options] Override http request option.
69
+ * @throws {RequiredError}
70
+ */
71
+ authV1ControllerGetMe: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
72
+ const localVarPath = `/api/auth/v1/get-me`;
73
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
74
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
75
+ let baseOptions;
76
+ if (configuration) {
77
+ baseOptions = configuration.baseOptions;
78
+ }
79
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
80
+ const localVarHeaderParameter = {};
81
+ const localVarQueryParameter = {};
82
+ // authentication bearer required
83
+ // http bearer authentication required
84
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
85
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
86
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
87
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
88
+ return {
89
+ url: toPathString(localVarUrlObj),
90
+ options: localVarRequestOptions,
91
+ };
92
+ }),
93
+ /**
94
+ *
95
+ * @summary Login
96
+ * @param {LoginRequestDto} loginRequestDto
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ authV1ControllerLogin: (loginRequestDto_1, ...args_1) => __awaiter(this, [loginRequestDto_1, ...args_1], void 0, function* (loginRequestDto, options = {}) {
101
+ // verify required parameter 'loginRequestDto' is not null or undefined
102
+ assertParamExists('authV1ControllerLogin', 'loginRequestDto', loginRequestDto);
103
+ const localVarPath = `/api/auth/v1/login`;
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
111
+ const localVarHeaderParameter = {};
112
+ const localVarQueryParameter = {};
113
+ localVarHeaderParameter['Content-Type'] = 'application/json';
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
117
+ localVarRequestOptions.data = serializeDataIfNeeded(loginRequestDto, localVarRequestOptions, configuration);
118
+ return {
119
+ url: toPathString(localVarUrlObj),
120
+ options: localVarRequestOptions,
121
+ };
122
+ }),
123
+ /**
124
+ *
125
+ * @summary Logout
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ authV1ControllerLogout: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
130
+ const localVarPath = `/api/auth/v1/logout`;
131
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
132
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
133
+ let baseOptions;
134
+ if (configuration) {
135
+ baseOptions = configuration.baseOptions;
136
+ }
137
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
138
+ const localVarHeaderParameter = {};
139
+ const localVarQueryParameter = {};
140
+ // authentication bearer required
141
+ // http bearer authentication required
142
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
143
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
144
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
146
+ return {
147
+ url: toPathString(localVarUrlObj),
148
+ options: localVarRequestOptions,
149
+ };
150
+ }),
151
+ /**
152
+ *
153
+ * @summary Register
154
+ * @param {RegisterRequestDto} registerRequestDto
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ authV1ControllerRegister: (registerRequestDto_1, ...args_1) => __awaiter(this, [registerRequestDto_1, ...args_1], void 0, function* (registerRequestDto, options = {}) {
159
+ // verify required parameter 'registerRequestDto' is not null or undefined
160
+ assertParamExists('authV1ControllerRegister', 'registerRequestDto', registerRequestDto);
161
+ const localVarPath = `/api/auth/v1/register`;
162
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
163
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
164
+ let baseOptions;
165
+ if (configuration) {
166
+ baseOptions = configuration.baseOptions;
167
+ }
168
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
169
+ const localVarHeaderParameter = {};
170
+ const localVarQueryParameter = {};
171
+ localVarHeaderParameter['Content-Type'] = 'application/json';
172
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
173
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
174
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
175
+ localVarRequestOptions.data = serializeDataIfNeeded(registerRequestDto, localVarRequestOptions, configuration);
176
+ return {
177
+ url: toPathString(localVarUrlObj),
178
+ options: localVarRequestOptions,
179
+ };
180
+ }),
181
+ };
182
+ };
183
+ /**
184
+ * AuthV1Api - functional programming interface
185
+ * @export
186
+ */
187
+ export const AuthV1ApiFp = function (configuration) {
188
+ const localVarAxiosParamCreator = AuthV1ApiAxiosParamCreator(configuration);
189
+ return {
190
+ /**
191
+ *
192
+ * @summary Confirm OTP
193
+ * @param {ConfirmOtpRequestDto} confirmOtpRequestDto
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ authV1ControllerConfirmOtp(confirmOtpRequestDto, options) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ var _a, _b, _c;
200
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authV1ControllerConfirmOtp(confirmOtpRequestDto, options);
201
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
202
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthV1Api.authV1ControllerConfirmOtp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
203
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
204
+ });
205
+ },
206
+ /**
207
+ *
208
+ * @summary Get Me
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ authV1ControllerGetMe(options) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ var _a, _b, _c;
215
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authV1ControllerGetMe(options);
216
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
217
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthV1Api.authV1ControllerGetMe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
218
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
219
+ });
220
+ },
221
+ /**
222
+ *
223
+ * @summary Login
224
+ * @param {LoginRequestDto} loginRequestDto
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ authV1ControllerLogin(loginRequestDto, options) {
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ var _a, _b, _c;
231
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authV1ControllerLogin(loginRequestDto, options);
232
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
233
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthV1Api.authV1ControllerLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
234
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
235
+ });
236
+ },
237
+ /**
238
+ *
239
+ * @summary Logout
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ authV1ControllerLogout(options) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ var _a, _b, _c;
246
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authV1ControllerLogout(options);
247
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
248
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthV1Api.authV1ControllerLogout']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
249
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
250
+ });
251
+ },
252
+ /**
253
+ *
254
+ * @summary Register
255
+ * @param {RegisterRequestDto} registerRequestDto
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ authV1ControllerRegister(registerRequestDto, options) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ var _a, _b, _c;
262
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authV1ControllerRegister(registerRequestDto, options);
263
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
264
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthV1Api.authV1ControllerRegister']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
265
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
266
+ });
267
+ },
268
+ };
269
+ };
270
+ /**
271
+ * AuthV1Api - factory interface
272
+ * @export
273
+ */
274
+ export const AuthV1ApiFactory = function (configuration, basePath, axios) {
275
+ const localVarFp = AuthV1ApiFp(configuration);
276
+ return {
277
+ /**
278
+ *
279
+ * @summary Confirm OTP
280
+ * @param {AuthV1ApiAuthV1ControllerConfirmOtpRequest} requestParameters Request parameters.
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ authV1ControllerConfirmOtp(requestParameters, options) {
285
+ return localVarFp.authV1ControllerConfirmOtp(requestParameters.confirmOtpRequestDto, options).then((request) => request(axios, basePath));
286
+ },
287
+ /**
288
+ *
289
+ * @summary Get Me
290
+ * @param {*} [options] Override http request option.
291
+ * @throws {RequiredError}
292
+ */
293
+ authV1ControllerGetMe(options) {
294
+ return localVarFp.authV1ControllerGetMe(options).then((request) => request(axios, basePath));
295
+ },
296
+ /**
297
+ *
298
+ * @summary Login
299
+ * @param {AuthV1ApiAuthV1ControllerLoginRequest} requestParameters Request parameters.
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ authV1ControllerLogin(requestParameters, options) {
304
+ return localVarFp.authV1ControllerLogin(requestParameters.loginRequestDto, options).then((request) => request(axios, basePath));
305
+ },
306
+ /**
307
+ *
308
+ * @summary Logout
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ authV1ControllerLogout(options) {
313
+ return localVarFp.authV1ControllerLogout(options).then((request) => request(axios, basePath));
314
+ },
315
+ /**
316
+ *
317
+ * @summary Register
318
+ * @param {AuthV1ApiAuthV1ControllerRegisterRequest} requestParameters Request parameters.
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ authV1ControllerRegister(requestParameters, options) {
323
+ return localVarFp.authV1ControllerRegister(requestParameters.registerRequestDto, options).then((request) => request(axios, basePath));
324
+ },
325
+ };
326
+ };
327
+ /**
328
+ * AuthV1Api - object-oriented interface
329
+ * @export
330
+ * @class AuthV1Api
331
+ * @extends {BaseAPI}
332
+ */
333
+ export class AuthV1Api extends BaseAPI {
334
+ /**
335
+ *
336
+ * @summary Confirm OTP
337
+ * @param {AuthV1ApiAuthV1ControllerConfirmOtpRequest} requestParameters Request parameters.
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ * @memberof AuthV1Api
341
+ */
342
+ authV1ControllerConfirmOtp(requestParameters, options) {
343
+ return AuthV1ApiFp(this.configuration).authV1ControllerConfirmOtp(requestParameters.confirmOtpRequestDto, options).then((request) => request(this.axios, this.basePath));
344
+ }
345
+ /**
346
+ *
347
+ * @summary Get Me
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ * @memberof AuthV1Api
351
+ */
352
+ authV1ControllerGetMe(options) {
353
+ return AuthV1ApiFp(this.configuration).authV1ControllerGetMe(options).then((request) => request(this.axios, this.basePath));
354
+ }
355
+ /**
356
+ *
357
+ * @summary Login
358
+ * @param {AuthV1ApiAuthV1ControllerLoginRequest} requestParameters Request parameters.
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ * @memberof AuthV1Api
362
+ */
363
+ authV1ControllerLogin(requestParameters, options) {
364
+ return AuthV1ApiFp(this.configuration).authV1ControllerLogin(requestParameters.loginRequestDto, options).then((request) => request(this.axios, this.basePath));
365
+ }
366
+ /**
367
+ *
368
+ * @summary Logout
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ * @memberof AuthV1Api
372
+ */
373
+ authV1ControllerLogout(options) {
374
+ return AuthV1ApiFp(this.configuration).authV1ControllerLogout(options).then((request) => request(this.axios, this.basePath));
375
+ }
376
+ /**
377
+ *
378
+ * @summary Register
379
+ * @param {AuthV1ApiAuthV1ControllerRegisterRequest} requestParameters Request parameters.
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ * @memberof AuthV1Api
383
+ */
384
+ authV1ControllerRegister(requestParameters, options) {
385
+ return AuthV1ApiFp(this.configuration).authV1ControllerRegister(requestParameters.registerRequestDto, options).then((request) => request(this.axios, this.basePath));
386
+ }
387
+ }
388
+ /**
389
+ * MeasurementsV1Api - axios parameter creator
390
+ * @export
391
+ */
392
+ export const MeasurementsV1ApiAxiosParamCreator = function (configuration) {
393
+ return {
394
+ /**
395
+ *
396
+ * @summary Create a new measurement for the authenticated user
397
+ * @param {CreateMeasurementRequestDto} createMeasurementRequestDto
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ */
401
+ measurementsV1ControllerCreateMeasurement: (createMeasurementRequestDto_1, ...args_1) => __awaiter(this, [createMeasurementRequestDto_1, ...args_1], void 0, function* (createMeasurementRequestDto, options = {}) {
402
+ // verify required parameter 'createMeasurementRequestDto' is not null or undefined
403
+ assertParamExists('measurementsV1ControllerCreateMeasurement', 'createMeasurementRequestDto', createMeasurementRequestDto);
404
+ const localVarPath = `/api/measurements/v1`;
405
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
406
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
407
+ let baseOptions;
408
+ if (configuration) {
409
+ baseOptions = configuration.baseOptions;
410
+ }
411
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
412
+ const localVarHeaderParameter = {};
413
+ const localVarQueryParameter = {};
414
+ // authentication bearer required
415
+ // http bearer authentication required
416
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
417
+ localVarHeaderParameter['Content-Type'] = 'application/json';
418
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
419
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
420
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
421
+ localVarRequestOptions.data = serializeDataIfNeeded(createMeasurementRequestDto, localVarRequestOptions, configuration);
422
+ return {
423
+ url: toPathString(localVarUrlObj),
424
+ options: localVarRequestOptions,
425
+ };
426
+ }),
427
+ /**
428
+ *
429
+ * @summary Soft delete a specific measurement for the authenticated user
430
+ * @param {string} measurementId
431
+ * @param {*} [options] Override http request option.
432
+ * @throws {RequiredError}
433
+ */
434
+ measurementsV1ControllerDeleteMeasurement: (measurementId_1, ...args_1) => __awaiter(this, [measurementId_1, ...args_1], void 0, function* (measurementId, options = {}) {
435
+ // verify required parameter 'measurementId' is not null or undefined
436
+ assertParamExists('measurementsV1ControllerDeleteMeasurement', 'measurementId', measurementId);
437
+ const localVarPath = `/api/measurements/v1/{measurementId}`
438
+ .replace(`{${"measurementId"}}`, encodeURIComponent(String(measurementId)));
439
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
440
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
441
+ let baseOptions;
442
+ if (configuration) {
443
+ baseOptions = configuration.baseOptions;
444
+ }
445
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
446
+ const localVarHeaderParameter = {};
447
+ const localVarQueryParameter = {};
448
+ // authentication bearer required
449
+ // http bearer authentication required
450
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
451
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
452
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
453
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
454
+ return {
455
+ url: toPathString(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ };
458
+ }),
459
+ /**
460
+ *
461
+ * @summary Get all measurements for the authenticated user
462
+ * @param {number} [limit] Limit
463
+ * @param {number} [offset] Offset
464
+ * @param {string} [fromDate] From date
465
+ * @param {string} [toDate] To date
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ measurementsV1ControllerGetAllByUserId: (limit_1, offset_1, fromDate_1, toDate_1, ...args_1) => __awaiter(this, [limit_1, offset_1, fromDate_1, toDate_1, ...args_1], void 0, function* (limit, offset, fromDate, toDate, options = {}) {
470
+ const localVarPath = `/api/measurements/v1`;
471
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
472
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
473
+ let baseOptions;
474
+ if (configuration) {
475
+ baseOptions = configuration.baseOptions;
476
+ }
477
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
478
+ const localVarHeaderParameter = {};
479
+ const localVarQueryParameter = {};
480
+ // authentication bearer required
481
+ // http bearer authentication required
482
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
483
+ if (limit !== undefined) {
484
+ localVarQueryParameter['limit'] = limit;
485
+ }
486
+ if (offset !== undefined) {
487
+ localVarQueryParameter['offset'] = offset;
488
+ }
489
+ if (fromDate !== undefined) {
490
+ localVarQueryParameter['fromDate'] = (fromDate instanceof Date) ?
491
+ fromDate.toISOString() :
492
+ fromDate;
493
+ }
494
+ if (toDate !== undefined) {
495
+ localVarQueryParameter['toDate'] = (toDate instanceof Date) ?
496
+ toDate.toISOString() :
497
+ toDate;
498
+ }
499
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
500
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
501
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
502
+ return {
503
+ url: toPathString(localVarUrlObj),
504
+ options: localVarRequestOptions,
505
+ };
506
+ }),
507
+ /**
508
+ *
509
+ * @summary Get all measurements for the group
510
+ * @param {string} groupId
511
+ * @param {number} [limit] Limit
512
+ * @param {number} [offset] Offset
513
+ * @param {string} [fromDate] From date
514
+ * @param {string} [toDate] To date
515
+ * @param {*} [options] Override http request option.
516
+ * @throws {RequiredError}
517
+ */
518
+ measurementsV1ControllerGetAllByUserIdAdmin: (groupId_1, limit_1, offset_1, fromDate_1, toDate_1, ...args_1) => __awaiter(this, [groupId_1, limit_1, offset_1, fromDate_1, toDate_1, ...args_1], void 0, function* (groupId, limit, offset, fromDate, toDate, options = {}) {
519
+ // verify required parameter 'groupId' is not null or undefined
520
+ assertParamExists('measurementsV1ControllerGetAllByUserIdAdmin', 'groupId', groupId);
521
+ const localVarPath = `/api/measurements/v1/group/{groupId}`
522
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
523
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
524
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
525
+ let baseOptions;
526
+ if (configuration) {
527
+ baseOptions = configuration.baseOptions;
528
+ }
529
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
530
+ const localVarHeaderParameter = {};
531
+ const localVarQueryParameter = {};
532
+ // authentication bearer required
533
+ // http bearer authentication required
534
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
535
+ if (limit !== undefined) {
536
+ localVarQueryParameter['limit'] = limit;
537
+ }
538
+ if (offset !== undefined) {
539
+ localVarQueryParameter['offset'] = offset;
540
+ }
541
+ if (fromDate !== undefined) {
542
+ localVarQueryParameter['fromDate'] = (fromDate instanceof Date) ?
543
+ fromDate.toISOString() :
544
+ fromDate;
545
+ }
546
+ if (toDate !== undefined) {
547
+ localVarQueryParameter['toDate'] = (toDate instanceof Date) ?
548
+ toDate.toISOString() :
549
+ toDate;
550
+ }
551
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
552
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
553
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
554
+ return {
555
+ url: toPathString(localVarUrlObj),
556
+ options: localVarRequestOptions,
557
+ };
558
+ }),
559
+ /**
560
+ *
561
+ * @summary Get a measurement by group and measurement ID
562
+ * @param {string} groupId
563
+ * @param {string} measurementId
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ */
567
+ measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId: (groupId_1, measurementId_1, ...args_1) => __awaiter(this, [groupId_1, measurementId_1, ...args_1], void 0, function* (groupId, measurementId, options = {}) {
568
+ // verify required parameter 'groupId' is not null or undefined
569
+ assertParamExists('measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId', 'groupId', groupId);
570
+ // verify required parameter 'measurementId' is not null or undefined
571
+ assertParamExists('measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId', 'measurementId', measurementId);
572
+ const localVarPath = `/api/measurements/v1/group/{groupId}/{measurementId}`
573
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)))
574
+ .replace(`{${"measurementId"}}`, encodeURIComponent(String(measurementId)));
575
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
576
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
577
+ let baseOptions;
578
+ if (configuration) {
579
+ baseOptions = configuration.baseOptions;
580
+ }
581
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
582
+ const localVarHeaderParameter = {};
583
+ const localVarQueryParameter = {};
584
+ // authentication bearer required
585
+ // http bearer authentication required
586
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
587
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
588
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
589
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
590
+ return {
591
+ url: toPathString(localVarUrlObj),
592
+ options: localVarRequestOptions,
593
+ };
594
+ }),
595
+ /**
596
+ *
597
+ * @summary Get a specific measurement by ID for the authenticated user
598
+ * @param {string} measurementId
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ */
602
+ measurementsV1ControllerGetMeasurementById: (measurementId_1, ...args_1) => __awaiter(this, [measurementId_1, ...args_1], void 0, function* (measurementId, options = {}) {
603
+ // verify required parameter 'measurementId' is not null or undefined
604
+ assertParamExists('measurementsV1ControllerGetMeasurementById', 'measurementId', measurementId);
605
+ const localVarPath = `/api/measurements/v1/{measurementId}`
606
+ .replace(`{${"measurementId"}}`, encodeURIComponent(String(measurementId)));
607
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
608
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
609
+ let baseOptions;
610
+ if (configuration) {
611
+ baseOptions = configuration.baseOptions;
612
+ }
613
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
614
+ const localVarHeaderParameter = {};
615
+ const localVarQueryParameter = {};
616
+ // authentication bearer required
617
+ // http bearer authentication required
618
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
619
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
620
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
621
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
622
+ return {
623
+ url: toPathString(localVarUrlObj),
624
+ options: localVarRequestOptions,
625
+ };
626
+ }),
627
+ /**
628
+ *
629
+ * @summary Update a specific measurement for the authenticated user
630
+ * @param {string} measurementId
631
+ * @param {UpdateMeasurementRequestDto} updateMeasurementRequestDto
632
+ * @param {*} [options] Override http request option.
633
+ * @throws {RequiredError}
634
+ */
635
+ measurementsV1ControllerUpdateMeasurement: (measurementId_1, updateMeasurementRequestDto_1, ...args_1) => __awaiter(this, [measurementId_1, updateMeasurementRequestDto_1, ...args_1], void 0, function* (measurementId, updateMeasurementRequestDto, options = {}) {
636
+ // verify required parameter 'measurementId' is not null or undefined
637
+ assertParamExists('measurementsV1ControllerUpdateMeasurement', 'measurementId', measurementId);
638
+ // verify required parameter 'updateMeasurementRequestDto' is not null or undefined
639
+ assertParamExists('measurementsV1ControllerUpdateMeasurement', 'updateMeasurementRequestDto', updateMeasurementRequestDto);
640
+ const localVarPath = `/api/measurements/v1/{measurementId}`
641
+ .replace(`{${"measurementId"}}`, encodeURIComponent(String(measurementId)));
642
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
643
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
644
+ let baseOptions;
645
+ if (configuration) {
646
+ baseOptions = configuration.baseOptions;
647
+ }
648
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
649
+ const localVarHeaderParameter = {};
650
+ const localVarQueryParameter = {};
651
+ // authentication bearer required
652
+ // http bearer authentication required
653
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
654
+ localVarHeaderParameter['Content-Type'] = 'application/json';
655
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
656
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
657
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
658
+ localVarRequestOptions.data = serializeDataIfNeeded(updateMeasurementRequestDto, localVarRequestOptions, configuration);
659
+ return {
660
+ url: toPathString(localVarUrlObj),
661
+ options: localVarRequestOptions,
662
+ };
663
+ }),
664
+ };
665
+ };
666
+ /**
667
+ * MeasurementsV1Api - functional programming interface
668
+ * @export
669
+ */
670
+ export const MeasurementsV1ApiFp = function (configuration) {
671
+ const localVarAxiosParamCreator = MeasurementsV1ApiAxiosParamCreator(configuration);
672
+ return {
673
+ /**
674
+ *
675
+ * @summary Create a new measurement for the authenticated user
676
+ * @param {CreateMeasurementRequestDto} createMeasurementRequestDto
677
+ * @param {*} [options] Override http request option.
678
+ * @throws {RequiredError}
679
+ */
680
+ measurementsV1ControllerCreateMeasurement(createMeasurementRequestDto, options) {
681
+ return __awaiter(this, void 0, void 0, function* () {
682
+ var _a, _b, _c;
683
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerCreateMeasurement(createMeasurementRequestDto, options);
684
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
685
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerCreateMeasurement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
686
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
687
+ });
688
+ },
689
+ /**
690
+ *
691
+ * @summary Soft delete a specific measurement for the authenticated user
692
+ * @param {string} measurementId
693
+ * @param {*} [options] Override http request option.
694
+ * @throws {RequiredError}
695
+ */
696
+ measurementsV1ControllerDeleteMeasurement(measurementId, options) {
697
+ return __awaiter(this, void 0, void 0, function* () {
698
+ var _a, _b, _c;
699
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerDeleteMeasurement(measurementId, options);
700
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
701
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerDeleteMeasurement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
702
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
703
+ });
704
+ },
705
+ /**
706
+ *
707
+ * @summary Get all measurements for the authenticated user
708
+ * @param {number} [limit] Limit
709
+ * @param {number} [offset] Offset
710
+ * @param {string} [fromDate] From date
711
+ * @param {string} [toDate] To date
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ */
715
+ measurementsV1ControllerGetAllByUserId(limit, offset, fromDate, toDate, options) {
716
+ return __awaiter(this, void 0, void 0, function* () {
717
+ var _a, _b, _c;
718
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerGetAllByUserId(limit, offset, fromDate, toDate, options);
719
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
720
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerGetAllByUserId']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
721
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
722
+ });
723
+ },
724
+ /**
725
+ *
726
+ * @summary Get all measurements for the group
727
+ * @param {string} groupId
728
+ * @param {number} [limit] Limit
729
+ * @param {number} [offset] Offset
730
+ * @param {string} [fromDate] From date
731
+ * @param {string} [toDate] To date
732
+ * @param {*} [options] Override http request option.
733
+ * @throws {RequiredError}
734
+ */
735
+ measurementsV1ControllerGetAllByUserIdAdmin(groupId, limit, offset, fromDate, toDate, options) {
736
+ return __awaiter(this, void 0, void 0, function* () {
737
+ var _a, _b, _c;
738
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerGetAllByUserIdAdmin(groupId, limit, offset, fromDate, toDate, options);
739
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
740
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerGetAllByUserIdAdmin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
741
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
742
+ });
743
+ },
744
+ /**
745
+ *
746
+ * @summary Get a measurement by group and measurement ID
747
+ * @param {string} groupId
748
+ * @param {string} measurementId
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ */
752
+ measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(groupId, measurementId, options) {
753
+ return __awaiter(this, void 0, void 0, function* () {
754
+ var _a, _b, _c;
755
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(groupId, measurementId, options);
756
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
757
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
758
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
759
+ });
760
+ },
761
+ /**
762
+ *
763
+ * @summary Get a specific measurement by ID for the authenticated user
764
+ * @param {string} measurementId
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ measurementsV1ControllerGetMeasurementById(measurementId, options) {
769
+ return __awaiter(this, void 0, void 0, function* () {
770
+ var _a, _b, _c;
771
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerGetMeasurementById(measurementId, options);
772
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
773
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerGetMeasurementById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
774
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
775
+ });
776
+ },
777
+ /**
778
+ *
779
+ * @summary Update a specific measurement for the authenticated user
780
+ * @param {string} measurementId
781
+ * @param {UpdateMeasurementRequestDto} updateMeasurementRequestDto
782
+ * @param {*} [options] Override http request option.
783
+ * @throws {RequiredError}
784
+ */
785
+ measurementsV1ControllerUpdateMeasurement(measurementId, updateMeasurementRequestDto, options) {
786
+ return __awaiter(this, void 0, void 0, function* () {
787
+ var _a, _b, _c;
788
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.measurementsV1ControllerUpdateMeasurement(measurementId, updateMeasurementRequestDto, options);
789
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
790
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MeasurementsV1Api.measurementsV1ControllerUpdateMeasurement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
791
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
792
+ });
793
+ },
794
+ };
795
+ };
796
+ /**
797
+ * MeasurementsV1Api - factory interface
798
+ * @export
799
+ */
800
+ export const MeasurementsV1ApiFactory = function (configuration, basePath, axios) {
801
+ const localVarFp = MeasurementsV1ApiFp(configuration);
802
+ return {
803
+ /**
804
+ *
805
+ * @summary Create a new measurement for the authenticated user
806
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerCreateMeasurementRequest} requestParameters Request parameters.
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ measurementsV1ControllerCreateMeasurement(requestParameters, options) {
811
+ return localVarFp.measurementsV1ControllerCreateMeasurement(requestParameters.createMeasurementRequestDto, options).then((request) => request(axios, basePath));
812
+ },
813
+ /**
814
+ *
815
+ * @summary Soft delete a specific measurement for the authenticated user
816
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerDeleteMeasurementRequest} requestParameters Request parameters.
817
+ * @param {*} [options] Override http request option.
818
+ * @throws {RequiredError}
819
+ */
820
+ measurementsV1ControllerDeleteMeasurement(requestParameters, options) {
821
+ return localVarFp.measurementsV1ControllerDeleteMeasurement(requestParameters.measurementId, options).then((request) => request(axios, basePath));
822
+ },
823
+ /**
824
+ *
825
+ * @summary Get all measurements for the authenticated user
826
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetAllByUserIdRequest} requestParameters Request parameters.
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ measurementsV1ControllerGetAllByUserId(requestParameters = {}, options) {
831
+ return localVarFp.measurementsV1ControllerGetAllByUserId(requestParameters.limit, requestParameters.offset, requestParameters.fromDate, requestParameters.toDate, options).then((request) => request(axios, basePath));
832
+ },
833
+ /**
834
+ *
835
+ * @summary Get all measurements for the group
836
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetAllByUserIdAdminRequest} requestParameters Request parameters.
837
+ * @param {*} [options] Override http request option.
838
+ * @throws {RequiredError}
839
+ */
840
+ measurementsV1ControllerGetAllByUserIdAdmin(requestParameters, options) {
841
+ return localVarFp.measurementsV1ControllerGetAllByUserIdAdmin(requestParameters.groupId, requestParameters.limit, requestParameters.offset, requestParameters.fromDate, requestParameters.toDate, options).then((request) => request(axios, basePath));
842
+ },
843
+ /**
844
+ *
845
+ * @summary Get a measurement by group and measurement ID
846
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetMeasurementByGroupIdAndMeasurementIdRequest} requestParameters Request parameters.
847
+ * @param {*} [options] Override http request option.
848
+ * @throws {RequiredError}
849
+ */
850
+ measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(requestParameters, options) {
851
+ return localVarFp.measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(requestParameters.groupId, requestParameters.measurementId, options).then((request) => request(axios, basePath));
852
+ },
853
+ /**
854
+ *
855
+ * @summary Get a specific measurement by ID for the authenticated user
856
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetMeasurementByIdRequest} requestParameters Request parameters.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ */
860
+ measurementsV1ControllerGetMeasurementById(requestParameters, options) {
861
+ return localVarFp.measurementsV1ControllerGetMeasurementById(requestParameters.measurementId, options).then((request) => request(axios, basePath));
862
+ },
863
+ /**
864
+ *
865
+ * @summary Update a specific measurement for the authenticated user
866
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerUpdateMeasurementRequest} requestParameters Request parameters.
867
+ * @param {*} [options] Override http request option.
868
+ * @throws {RequiredError}
869
+ */
870
+ measurementsV1ControllerUpdateMeasurement(requestParameters, options) {
871
+ return localVarFp.measurementsV1ControllerUpdateMeasurement(requestParameters.measurementId, requestParameters.updateMeasurementRequestDto, options).then((request) => request(axios, basePath));
872
+ },
873
+ };
874
+ };
875
+ /**
876
+ * MeasurementsV1Api - object-oriented interface
877
+ * @export
878
+ * @class MeasurementsV1Api
879
+ * @extends {BaseAPI}
880
+ */
881
+ export class MeasurementsV1Api extends BaseAPI {
882
+ /**
883
+ *
884
+ * @summary Create a new measurement for the authenticated user
885
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerCreateMeasurementRequest} requestParameters Request parameters.
886
+ * @param {*} [options] Override http request option.
887
+ * @throws {RequiredError}
888
+ * @memberof MeasurementsV1Api
889
+ */
890
+ measurementsV1ControllerCreateMeasurement(requestParameters, options) {
891
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerCreateMeasurement(requestParameters.createMeasurementRequestDto, options).then((request) => request(this.axios, this.basePath));
892
+ }
893
+ /**
894
+ *
895
+ * @summary Soft delete a specific measurement for the authenticated user
896
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerDeleteMeasurementRequest} requestParameters Request parameters.
897
+ * @param {*} [options] Override http request option.
898
+ * @throws {RequiredError}
899
+ * @memberof MeasurementsV1Api
900
+ */
901
+ measurementsV1ControllerDeleteMeasurement(requestParameters, options) {
902
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerDeleteMeasurement(requestParameters.measurementId, options).then((request) => request(this.axios, this.basePath));
903
+ }
904
+ /**
905
+ *
906
+ * @summary Get all measurements for the authenticated user
907
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetAllByUserIdRequest} requestParameters Request parameters.
908
+ * @param {*} [options] Override http request option.
909
+ * @throws {RequiredError}
910
+ * @memberof MeasurementsV1Api
911
+ */
912
+ measurementsV1ControllerGetAllByUserId(requestParameters = {}, options) {
913
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerGetAllByUserId(requestParameters.limit, requestParameters.offset, requestParameters.fromDate, requestParameters.toDate, options).then((request) => request(this.axios, this.basePath));
914
+ }
915
+ /**
916
+ *
917
+ * @summary Get all measurements for the group
918
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetAllByUserIdAdminRequest} requestParameters Request parameters.
919
+ * @param {*} [options] Override http request option.
920
+ * @throws {RequiredError}
921
+ * @memberof MeasurementsV1Api
922
+ */
923
+ measurementsV1ControllerGetAllByUserIdAdmin(requestParameters, options) {
924
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerGetAllByUserIdAdmin(requestParameters.groupId, requestParameters.limit, requestParameters.offset, requestParameters.fromDate, requestParameters.toDate, options).then((request) => request(this.axios, this.basePath));
925
+ }
926
+ /**
927
+ *
928
+ * @summary Get a measurement by group and measurement ID
929
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetMeasurementByGroupIdAndMeasurementIdRequest} requestParameters Request parameters.
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ * @memberof MeasurementsV1Api
933
+ */
934
+ measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(requestParameters, options) {
935
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerGetMeasurementByGroupIdAndMeasurementId(requestParameters.groupId, requestParameters.measurementId, options).then((request) => request(this.axios, this.basePath));
936
+ }
937
+ /**
938
+ *
939
+ * @summary Get a specific measurement by ID for the authenticated user
940
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerGetMeasurementByIdRequest} requestParameters Request parameters.
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ * @memberof MeasurementsV1Api
944
+ */
945
+ measurementsV1ControllerGetMeasurementById(requestParameters, options) {
946
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerGetMeasurementById(requestParameters.measurementId, options).then((request) => request(this.axios, this.basePath));
947
+ }
948
+ /**
949
+ *
950
+ * @summary Update a specific measurement for the authenticated user
951
+ * @param {MeasurementsV1ApiMeasurementsV1ControllerUpdateMeasurementRequest} requestParameters Request parameters.
952
+ * @param {*} [options] Override http request option.
953
+ * @throws {RequiredError}
954
+ * @memberof MeasurementsV1Api
955
+ */
956
+ measurementsV1ControllerUpdateMeasurement(requestParameters, options) {
957
+ return MeasurementsV1ApiFp(this.configuration).measurementsV1ControllerUpdateMeasurement(requestParameters.measurementId, requestParameters.updateMeasurementRequestDto, options).then((request) => request(this.axios, this.basePath));
958
+ }
959
+ }