@tennac-booking/sdk 1.0.8 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -67,7 +67,40 @@ const UsersApiAxiosParamCreator = function (configuration) {
67
67
  return {
68
68
  /**
69
69
  *
70
- * @summary Retrieve all users
70
+ * @summary Modifie le mot de passe de l\'utilisateur connecté
71
+ * @param {ChangePasswordRequestBody} changePasswordRequestBody
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ changePassword: (changePasswordRequestBody_1, ...args_1) => __awaiter(this, [changePasswordRequestBody_1, ...args_1], void 0, function* (changePasswordRequestBody, options = {}) {
76
+ // verify required parameter 'changePasswordRequestBody' is not null or undefined
77
+ (0, common_1.assertParamExists)('changePassword', 'changePasswordRequestBody', changePasswordRequestBody);
78
+ const localVarPath = `/api/users/me/password`;
79
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
81
+ let baseOptions;
82
+ if (configuration) {
83
+ baseOptions = configuration.baseOptions;
84
+ }
85
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ // authentication bearerAuth required
89
+ // http bearer authentication required
90
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
91
+ localVarHeaderParameter['Content-Type'] = 'application/json';
92
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
95
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(changePasswordRequestBody, localVarRequestOptions, configuration);
96
+ return {
97
+ url: (0, common_1.toPathString)(localVarUrlObj),
98
+ options: localVarRequestOptions,
99
+ };
100
+ }),
101
+ /**
102
+ *
103
+ * @summary Récupère la liste des utilisateurs
71
104
  * @param {*} [options] Override http request option.
72
105
  * @throws {RequiredError}
73
106
  */
@@ -82,9 +115,172 @@ const UsersApiAxiosParamCreator = function (configuration) {
82
115
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
83
116
  const localVarHeaderParameter = {};
84
117
  const localVarQueryParameter = {};
118
+ // authentication bearerAuth required
119
+ // http bearer authentication required
120
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
121
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
122
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
123
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
124
+ return {
125
+ url: (0, common_1.toPathString)(localVarUrlObj),
126
+ options: localVarRequestOptions,
127
+ };
128
+ }),
129
+ /**
130
+ *
131
+ * @summary Récupère les informations de l\'utilisateur connecté
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ getUserInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
136
+ const localVarPath = `/api/users/me`;
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
144
+ const localVarHeaderParameter = {};
145
+ const localVarQueryParameter = {};
146
+ // authentication bearerAuth required
147
+ // http bearer authentication required
148
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
149
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
150
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
151
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
152
+ return {
153
+ url: (0, common_1.toPathString)(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ }),
157
+ /**
158
+ *
159
+ * @summary Authentifie un utilisateur
160
+ * @param {LoginRequestBody} loginRequestBody
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ login: (loginRequestBody_1, ...args_1) => __awaiter(this, [loginRequestBody_1, ...args_1], void 0, function* (loginRequestBody, options = {}) {
165
+ // verify required parameter 'loginRequestBody' is not null or undefined
166
+ (0, common_1.assertParamExists)('login', 'loginRequestBody', loginRequestBody);
167
+ const localVarPath = `/api/users/login`;
168
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
169
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
170
+ let baseOptions;
171
+ if (configuration) {
172
+ baseOptions = configuration.baseOptions;
173
+ }
174
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
175
+ const localVarHeaderParameter = {};
176
+ const localVarQueryParameter = {};
177
+ // authentication bearerAuth required
178
+ // http bearer authentication required
179
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
180
+ localVarHeaderParameter['Content-Type'] = 'application/json';
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequestBody, localVarRequestOptions, configuration);
185
+ return {
186
+ url: (0, common_1.toPathString)(localVarUrlObj),
187
+ options: localVarRequestOptions,
188
+ };
189
+ }),
190
+ /**
191
+ *
192
+ * @summary Rafraîchit le token d\'accès
193
+ * @param {RefreshTokenRequestBody} refreshTokenRequestBody
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ refreshToken: (refreshTokenRequestBody_1, ...args_1) => __awaiter(this, [refreshTokenRequestBody_1, ...args_1], void 0, function* (refreshTokenRequestBody, options = {}) {
198
+ // verify required parameter 'refreshTokenRequestBody' is not null or undefined
199
+ (0, common_1.assertParamExists)('refreshToken', 'refreshTokenRequestBody', refreshTokenRequestBody);
200
+ const localVarPath = `/api/users/refresh-token`;
201
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
203
+ let baseOptions;
204
+ if (configuration) {
205
+ baseOptions = configuration.baseOptions;
206
+ }
207
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
208
+ const localVarHeaderParameter = {};
209
+ const localVarQueryParameter = {};
210
+ // authentication bearerAuth required
211
+ // http bearer authentication required
212
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
213
+ localVarHeaderParameter['Content-Type'] = 'application/json';
214
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
215
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
216
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
217
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenRequestBody, localVarRequestOptions, configuration);
218
+ return {
219
+ url: (0, common_1.toPathString)(localVarUrlObj),
220
+ options: localVarRequestOptions,
221
+ };
222
+ }),
223
+ /**
224
+ *
225
+ * @summary Crée un nouvel utilisateur
226
+ * @param {RegisterRequestBody} registerRequestBody
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ register: (registerRequestBody_1, ...args_1) => __awaiter(this, [registerRequestBody_1, ...args_1], void 0, function* (registerRequestBody, options = {}) {
231
+ // verify required parameter 'registerRequestBody' is not null or undefined
232
+ (0, common_1.assertParamExists)('register', 'registerRequestBody', registerRequestBody);
233
+ const localVarPath = `/api/users`;
234
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
235
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
236
+ let baseOptions;
237
+ if (configuration) {
238
+ baseOptions = configuration.baseOptions;
239
+ }
240
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
241
+ const localVarHeaderParameter = {};
242
+ const localVarQueryParameter = {};
243
+ // authentication bearerAuth required
244
+ // http bearer authentication required
245
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
246
+ localVarHeaderParameter['Content-Type'] = 'application/json';
247
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
248
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
249
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
250
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(registerRequestBody, localVarRequestOptions, configuration);
251
+ return {
252
+ url: (0, common_1.toPathString)(localVarUrlObj),
253
+ options: localVarRequestOptions,
254
+ };
255
+ }),
256
+ /**
257
+ *
258
+ * @summary Met à jour les données de l\'utilisateur connecté
259
+ * @param {UpdateUserRequestBody} updateUserRequestBody
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ updateUser: (updateUserRequestBody_1, ...args_1) => __awaiter(this, [updateUserRequestBody_1, ...args_1], void 0, function* (updateUserRequestBody, options = {}) {
264
+ // verify required parameter 'updateUserRequestBody' is not null or undefined
265
+ (0, common_1.assertParamExists)('updateUser', 'updateUserRequestBody', updateUserRequestBody);
266
+ const localVarPath = `/api/users/me`;
267
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
268
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
269
+ let baseOptions;
270
+ if (configuration) {
271
+ baseOptions = configuration.baseOptions;
272
+ }
273
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
274
+ const localVarHeaderParameter = {};
275
+ const localVarQueryParameter = {};
276
+ // authentication bearerAuth required
277
+ // http bearer authentication required
278
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
279
+ localVarHeaderParameter['Content-Type'] = 'application/json';
85
280
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
86
281
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
87
282
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
283
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateUserRequestBody, localVarRequestOptions, configuration);
88
284
  return {
89
285
  url: (0, common_1.toPathString)(localVarUrlObj),
90
286
  options: localVarRequestOptions,
@@ -102,7 +298,23 @@ const UsersApiFp = function (configuration) {
102
298
  return {
103
299
  /**
104
300
  *
105
- * @summary Retrieve all users
301
+ * @summary Modifie le mot de passe de l\'utilisateur connecté
302
+ * @param {ChangePasswordRequestBody} changePasswordRequestBody
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ changePassword(changePasswordRequestBody, options) {
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ var _a, _b, _c;
309
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.changePassword(changePasswordRequestBody, options);
310
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
311
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.changePassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
312
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
313
+ });
314
+ },
315
+ /**
316
+ *
317
+ * @summary Récupère la liste des utilisateurs
106
318
  * @param {*} [options] Override http request option.
107
319
  * @throws {RequiredError}
108
320
  */
@@ -115,6 +327,85 @@ const UsersApiFp = function (configuration) {
115
327
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
116
328
  });
117
329
  },
330
+ /**
331
+ *
332
+ * @summary Récupère les informations de l\'utilisateur connecté
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ getUserInfo(options) {
337
+ return __awaiter(this, void 0, void 0, function* () {
338
+ var _a, _b, _c;
339
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserInfo(options);
340
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
341
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getUserInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
342
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
343
+ });
344
+ },
345
+ /**
346
+ *
347
+ * @summary Authentifie un utilisateur
348
+ * @param {LoginRequestBody} loginRequestBody
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ */
352
+ login(loginRequestBody, options) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ var _a, _b, _c;
355
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.login(loginRequestBody, options);
356
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
357
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.login']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
358
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
359
+ });
360
+ },
361
+ /**
362
+ *
363
+ * @summary Rafraîchit le token d\'accès
364
+ * @param {RefreshTokenRequestBody} refreshTokenRequestBody
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ refreshToken(refreshTokenRequestBody, options) {
369
+ return __awaiter(this, void 0, void 0, function* () {
370
+ var _a, _b, _c;
371
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshTokenRequestBody, options);
372
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
373
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.refreshToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
374
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
375
+ });
376
+ },
377
+ /**
378
+ *
379
+ * @summary Crée un nouvel utilisateur
380
+ * @param {RegisterRequestBody} registerRequestBody
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ register(registerRequestBody, options) {
385
+ return __awaiter(this, void 0, void 0, function* () {
386
+ var _a, _b, _c;
387
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.register(registerRequestBody, options);
388
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
389
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.register']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
390
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
391
+ });
392
+ },
393
+ /**
394
+ *
395
+ * @summary Met à jour les données de l\'utilisateur connecté
396
+ * @param {UpdateUserRequestBody} updateUserRequestBody
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ updateUser(updateUserRequestBody, options) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ var _a, _b, _c;
403
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateUser(updateUserRequestBody, options);
404
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
405
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.updateUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
406
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
407
+ });
408
+ },
118
409
  };
119
410
  };
120
411
  exports.UsersApiFp = UsersApiFp;
@@ -127,13 +418,72 @@ const UsersApiFactory = function (configuration, basePath, axios) {
127
418
  return {
128
419
  /**
129
420
  *
130
- * @summary Retrieve all users
421
+ * @summary Modifie le mot de passe de l\'utilisateur connecté
422
+ * @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ changePassword(requestParameters, options) {
427
+ return localVarFp.changePassword(requestParameters.changePasswordRequestBody, options).then((request) => request(axios, basePath));
428
+ },
429
+ /**
430
+ *
431
+ * @summary Récupère la liste des utilisateurs
131
432
  * @param {*} [options] Override http request option.
132
433
  * @throws {RequiredError}
133
434
  */
134
435
  getAllUsers(options) {
135
436
  return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
136
437
  },
438
+ /**
439
+ *
440
+ * @summary Récupère les informations de l\'utilisateur connecté
441
+ * @param {*} [options] Override http request option.
442
+ * @throws {RequiredError}
443
+ */
444
+ getUserInfo(options) {
445
+ return localVarFp.getUserInfo(options).then((request) => request(axios, basePath));
446
+ },
447
+ /**
448
+ *
449
+ * @summary Authentifie un utilisateur
450
+ * @param {UsersApiLoginRequest} requestParameters Request parameters.
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ login(requestParameters, options) {
455
+ return localVarFp.login(requestParameters.loginRequestBody, options).then((request) => request(axios, basePath));
456
+ },
457
+ /**
458
+ *
459
+ * @summary Rafraîchit le token d\'accès
460
+ * @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ refreshToken(requestParameters, options) {
465
+ return localVarFp.refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(axios, basePath));
466
+ },
467
+ /**
468
+ *
469
+ * @summary Crée un nouvel utilisateur
470
+ * @param {UsersApiRegisterRequest} requestParameters Request parameters.
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ register(requestParameters, options) {
475
+ return localVarFp.register(requestParameters.registerRequestBody, options).then((request) => request(axios, basePath));
476
+ },
477
+ /**
478
+ *
479
+ * @summary Met à jour les données de l\'utilisateur connecté
480
+ * @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ updateUser(requestParameters, options) {
485
+ return localVarFp.updateUser(requestParameters.updateUserRequestBody, options).then((request) => request(axios, basePath));
486
+ },
137
487
  };
138
488
  };
139
489
  exports.UsersApiFactory = UsersApiFactory;
@@ -146,7 +496,18 @@ exports.UsersApiFactory = UsersApiFactory;
146
496
  class UsersApi extends base_1.BaseAPI {
147
497
  /**
148
498
  *
149
- * @summary Retrieve all users
499
+ * @summary Modifie le mot de passe de l\'utilisateur connecté
500
+ * @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ * @memberof UsersApi
504
+ */
505
+ changePassword(requestParameters, options) {
506
+ return (0, exports.UsersApiFp)(this.configuration).changePassword(requestParameters.changePasswordRequestBody, options).then((request) => request(this.axios, this.basePath));
507
+ }
508
+ /**
509
+ *
510
+ * @summary Récupère la liste des utilisateurs
150
511
  * @param {*} [options] Override http request option.
151
512
  * @throws {RequiredError}
152
513
  * @memberof UsersApi
@@ -154,5 +515,59 @@ class UsersApi extends base_1.BaseAPI {
154
515
  getAllUsers(options) {
155
516
  return (0, exports.UsersApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
156
517
  }
518
+ /**
519
+ *
520
+ * @summary Récupère les informations de l\'utilisateur connecté
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ * @memberof UsersApi
524
+ */
525
+ getUserInfo(options) {
526
+ return (0, exports.UsersApiFp)(this.configuration).getUserInfo(options).then((request) => request(this.axios, this.basePath));
527
+ }
528
+ /**
529
+ *
530
+ * @summary Authentifie un utilisateur
531
+ * @param {UsersApiLoginRequest} requestParameters Request parameters.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ * @memberof UsersApi
535
+ */
536
+ login(requestParameters, options) {
537
+ return (0, exports.UsersApiFp)(this.configuration).login(requestParameters.loginRequestBody, options).then((request) => request(this.axios, this.basePath));
538
+ }
539
+ /**
540
+ *
541
+ * @summary Rafraîchit le token d\'accès
542
+ * @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ * @memberof UsersApi
546
+ */
547
+ refreshToken(requestParameters, options) {
548
+ return (0, exports.UsersApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(this.axios, this.basePath));
549
+ }
550
+ /**
551
+ *
552
+ * @summary Crée un nouvel utilisateur
553
+ * @param {UsersApiRegisterRequest} requestParameters Request parameters.
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ * @memberof UsersApi
557
+ */
558
+ register(requestParameters, options) {
559
+ return (0, exports.UsersApiFp)(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
560
+ }
561
+ /**
562
+ *
563
+ * @summary Met à jour les données de l\'utilisateur connecté
564
+ * @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
565
+ * @param {*} [options] Override http request option.
566
+ * @throws {RequiredError}
567
+ * @memberof UsersApi
568
+ */
569
+ updateUser(requestParameters, options) {
570
+ return (0, exports.UsersApiFp)(this.configuration).updateUser(requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
571
+ }
157
572
  }
158
573
  exports.UsersApi = UsersApi;