@tennac-booking/sdk 1.0.6 → 1.0.10

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 (140) hide show
  1. package/.openapi-generator/FILES +10 -1
  2. package/README.md +17 -2
  3. package/api.ts +831 -224
  4. package/dist/api.d.ts +589 -109
  5. package/dist/api.js +394 -148
  6. package/dist/esm/api.d.ts +589 -109
  7. package/dist/esm/api.js +394 -144
  8. package/docs/ApiErrorResponse.md +22 -0
  9. package/docs/ChangePasswordRequestBody.md +22 -0
  10. package/docs/ChangePasswordResponse.md +20 -0
  11. package/docs/LoginRequestBody.md +22 -0
  12. package/docs/LoginResponse.md +26 -0
  13. package/docs/RefreshTokenRequestBody.md +20 -0
  14. package/docs/RefreshTokenResponse.md +26 -0
  15. package/docs/RegisterRequestBody.md +36 -0
  16. package/docs/UpdateUserRequestBody.md +32 -0
  17. package/docs/UserResponse.md +44 -0
  18. package/docs/UsersApi.md +345 -6
  19. package/package.json +1 -4
  20. package/apis/AuthApi.ts +0 -157
  21. package/apis/UsersApi.ts +0 -56
  22. package/apis/index.ts +0 -4
  23. package/dist/apis/AuthApi.d.ts +0 -39
  24. package/dist/apis/AuthApi.js +0 -117
  25. package/dist/apis/UsersApi.d.ts +0 -26
  26. package/dist/apis/UsersApi.js +0 -58
  27. package/dist/apis/index.d.ts +0 -2
  28. package/dist/apis/index.js +0 -20
  29. package/dist/esm/apis/AuthApi.d.ts +0 -39
  30. package/dist/esm/apis/AuthApi.js +0 -113
  31. package/dist/esm/apis/UsersApi.d.ts +0 -26
  32. package/dist/esm/apis/UsersApi.js +0 -54
  33. package/dist/esm/apis/index.d.ts +0 -2
  34. package/dist/esm/apis/index.js +0 -4
  35. package/dist/esm/models/Booking.d.ts +0 -87
  36. package/dist/esm/models/Booking.js +0 -82
  37. package/dist/esm/models/Court.d.ts +0 -76
  38. package/dist/esm/models/Court.js +0 -72
  39. package/dist/esm/models/Slot.d.ts +0 -44
  40. package/dist/esm/models/Slot.js +0 -51
  41. package/dist/esm/models/SlotException.d.ts +0 -50
  42. package/dist/esm/models/SlotException.js +0 -55
  43. package/dist/esm/models/User.d.ts +0 -92
  44. package/dist/esm/models/User.js +0 -69
  45. package/dist/esm/models/index.d.ts +0 -5
  46. package/dist/esm/models/index.js +0 -7
  47. package/dist/esm/runtime.d.ts +0 -184
  48. package/dist/esm/runtime.js +0 -334
  49. package/dist/esm/src/apis/AuthApi.d.ts +0 -39
  50. package/dist/esm/src/apis/AuthApi.js +0 -113
  51. package/dist/esm/src/apis/UsersApi.d.ts +0 -26
  52. package/dist/esm/src/apis/UsersApi.js +0 -54
  53. package/dist/esm/src/apis/index.d.ts +0 -2
  54. package/dist/esm/src/apis/index.js +0 -4
  55. package/dist/esm/src/index.d.ts +0 -3
  56. package/dist/esm/src/index.js +0 -5
  57. package/dist/esm/src/models/Booking.d.ts +0 -87
  58. package/dist/esm/src/models/Booking.js +0 -82
  59. package/dist/esm/src/models/BookingStatus.d.ts +0 -25
  60. package/dist/esm/src/models/BookingStatus.js +0 -43
  61. package/dist/esm/src/models/Court.d.ts +0 -76
  62. package/dist/esm/src/models/Court.js +0 -72
  63. package/dist/esm/src/models/CourtStatus.d.ts +0 -25
  64. package/dist/esm/src/models/CourtStatus.js +0 -43
  65. package/dist/esm/src/models/Slot.d.ts +0 -44
  66. package/dist/esm/src/models/Slot.js +0 -51
  67. package/dist/esm/src/models/SlotException.d.ts +0 -50
  68. package/dist/esm/src/models/SlotException.js +0 -55
  69. package/dist/esm/src/models/StripeStatus.d.ts +0 -28
  70. package/dist/esm/src/models/StripeStatus.js +0 -46
  71. package/dist/esm/src/models/User.d.ts +0 -92
  72. package/dist/esm/src/models/User.js +0 -69
  73. package/dist/esm/src/models/index.d.ts +0 -5
  74. package/dist/esm/src/models/index.js +0 -7
  75. package/dist/esm/src/runtime.d.ts +0 -184
  76. package/dist/esm/src/runtime.js +0 -334
  77. package/dist/models/Booking.d.ts +0 -87
  78. package/dist/models/Booking.js +0 -90
  79. package/dist/models/Court.d.ts +0 -76
  80. package/dist/models/Court.js +0 -80
  81. package/dist/models/Slot.d.ts +0 -44
  82. package/dist/models/Slot.js +0 -58
  83. package/dist/models/SlotException.d.ts +0 -50
  84. package/dist/models/SlotException.js +0 -62
  85. package/dist/models/User.d.ts +0 -92
  86. package/dist/models/User.js +0 -76
  87. package/dist/models/index.d.ts +0 -5
  88. package/dist/models/index.js +0 -23
  89. package/dist/runtime.d.ts +0 -184
  90. package/dist/runtime.js +0 -350
  91. package/dist/src/apis/AuthApi.d.ts +0 -39
  92. package/dist/src/apis/AuthApi.js +0 -117
  93. package/dist/src/apis/UsersApi.d.ts +0 -26
  94. package/dist/src/apis/UsersApi.js +0 -58
  95. package/dist/src/apis/index.d.ts +0 -2
  96. package/dist/src/apis/index.js +0 -20
  97. package/dist/src/index.d.ts +0 -3
  98. package/dist/src/index.js +0 -21
  99. package/dist/src/models/Booking.d.ts +0 -87
  100. package/dist/src/models/Booking.js +0 -90
  101. package/dist/src/models/BookingStatus.d.ts +0 -25
  102. package/dist/src/models/BookingStatus.js +0 -51
  103. package/dist/src/models/Court.d.ts +0 -76
  104. package/dist/src/models/Court.js +0 -80
  105. package/dist/src/models/CourtStatus.d.ts +0 -25
  106. package/dist/src/models/CourtStatus.js +0 -51
  107. package/dist/src/models/Slot.d.ts +0 -44
  108. package/dist/src/models/Slot.js +0 -58
  109. package/dist/src/models/SlotException.d.ts +0 -50
  110. package/dist/src/models/SlotException.js +0 -62
  111. package/dist/src/models/StripeStatus.d.ts +0 -28
  112. package/dist/src/models/StripeStatus.js +0 -54
  113. package/dist/src/models/User.d.ts +0 -92
  114. package/dist/src/models/User.js +0 -76
  115. package/dist/src/models/index.d.ts +0 -5
  116. package/dist/src/models/index.js +0 -23
  117. package/dist/src/runtime.d.ts +0 -184
  118. package/dist/src/runtime.js +0 -350
  119. package/docs/AuthApi.md +0 -88
  120. package/models/Booking.ts +0 -142
  121. package/models/Court.ts +0 -130
  122. package/models/Slot.ts +0 -84
  123. package/models/SlotException.ts +0 -93
  124. package/models/User.ts +0 -149
  125. package/models/index.ts +0 -7
  126. package/runtime.ts +0 -432
  127. package/src/apis/AuthApi.ts +0 -157
  128. package/src/apis/UsersApi.ts +0 -56
  129. package/src/apis/index.ts +0 -4
  130. package/src/index.ts +0 -5
  131. package/src/models/Booking.ts +0 -142
  132. package/src/models/BookingStatus.ts +0 -53
  133. package/src/models/Court.ts +0 -130
  134. package/src/models/CourtStatus.ts +0 -53
  135. package/src/models/Slot.ts +0 -84
  136. package/src/models/SlotException.ts +0 -93
  137. package/src/models/StripeStatus.ts +0 -56
  138. package/src/models/User.ts +0 -149
  139. package/src/models/index.ts +0 -7
  140. package/src/runtime.ts +0 -432
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.StripeStatus = exports.CourtStatus = exports.BookingStatus = void 0;
25
+ exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.StripeStatus = exports.CourtStatus = exports.BookingStatus = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -60,183 +60,169 @@ exports.StripeStatus = {
60
60
  Canceled: 'canceled'
61
61
  };
62
62
  /**
63
- * AuthApi - axios parameter creator
63
+ * UsersApi - axios parameter creator
64
64
  * @export
65
65
  */
66
- const AuthApiAxiosParamCreator = function (configuration) {
66
+ const UsersApiAxiosParamCreator = function (configuration) {
67
67
  return {
68
68
  /**
69
69
  *
70
- * @summary Register a new user
71
- * @param {string} firstName
72
- * @param {string} lastName
73
- * @param {string} email
74
- * @param {string} password
75
- * @param {string} [username]
76
- * @param {boolean} [isAccountVerified]
77
- * @param {string} [level]
78
- * @param {string} [stripeCustomerId]
79
- * @param {string} [phone]
80
- * @param {string} [profilePicture]
81
- * @param {boolean} [isAdmin]
70
+ * @summary Modifie le mot de passe d\'un utilisateur
71
+ * @param {string} id ID de l\'utilisateur
72
+ * @param {ChangePasswordRequestBody} changePasswordRequestBody
82
73
  * @param {*} [options] Override http request option.
83
74
  * @throws {RequiredError}
84
75
  */
85
- apiAuthRegisterPost: (firstName_1, lastName_1, email_1, password_1, username_1, isAccountVerified_1, level_1, stripeCustomerId_1, phone_1, profilePicture_1, isAdmin_1, ...args_1) => __awaiter(this, [firstName_1, lastName_1, email_1, password_1, username_1, isAccountVerified_1, level_1, stripeCustomerId_1, phone_1, profilePicture_1, isAdmin_1, ...args_1], void 0, function* (firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options = {}) {
86
- // verify required parameter 'firstName' is not null or undefined
87
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'firstName', firstName);
88
- // verify required parameter 'lastName' is not null or undefined
89
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'lastName', lastName);
90
- // verify required parameter 'email' is not null or undefined
91
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'email', email);
92
- // verify required parameter 'password' is not null or undefined
93
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'password', password);
94
- const localVarPath = `/api/auth/register`;
76
+ changePassword: (id_1, changePasswordRequestBody_1, ...args_1) => __awaiter(this, [id_1, changePasswordRequestBody_1, ...args_1], void 0, function* (id, changePasswordRequestBody, options = {}) {
77
+ // verify required parameter 'id' is not null or undefined
78
+ (0, common_1.assertParamExists)('changePassword', 'id', id);
79
+ // verify required parameter 'changePasswordRequestBody' is not null or undefined
80
+ (0, common_1.assertParamExists)('changePassword', 'changePasswordRequestBody', changePasswordRequestBody);
81
+ const localVarPath = `/api/users/{id}/password`
82
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
95
83
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
84
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
97
85
  let baseOptions;
98
86
  if (configuration) {
99
87
  baseOptions = configuration.baseOptions;
100
88
  }
101
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
89
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
102
90
  const localVarHeaderParameter = {};
103
91
  const localVarQueryParameter = {};
104
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
105
- if (username !== undefined) {
106
- localVarFormParams.append('username', username);
107
- }
108
- if (firstName !== undefined) {
109
- localVarFormParams.append('firstName', firstName);
110
- }
111
- if (lastName !== undefined) {
112
- localVarFormParams.append('lastName', lastName);
113
- }
114
- if (email !== undefined) {
115
- localVarFormParams.append('email', email);
116
- }
117
- if (isAccountVerified !== undefined) {
118
- localVarFormParams.append('isAccountVerified', String(isAccountVerified));
119
- }
120
- if (level !== undefined) {
121
- localVarFormParams.append('level', level);
122
- }
123
- if (stripeCustomerId !== undefined) {
124
- localVarFormParams.append('stripeCustomerId', stripeCustomerId);
125
- }
126
- if (phone !== undefined) {
127
- localVarFormParams.append('phone', phone);
128
- }
129
- if (password !== undefined) {
130
- localVarFormParams.append('password', password);
131
- }
132
- if (profilePicture !== undefined) {
133
- localVarFormParams.append('profilePicture', profilePicture);
92
+ localVarHeaderParameter['Content-Type'] = 'application/json';
93
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
94
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
96
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(changePasswordRequestBody, localVarRequestOptions, configuration);
97
+ return {
98
+ url: (0, common_1.toPathString)(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ /**
103
+ *
104
+ * @summary Récupère la liste des utilisateurs
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
109
+ const localVarPath = `/api/users`;
110
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
111
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
112
+ let baseOptions;
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
134
115
  }
135
- if (isAdmin !== undefined) {
136
- localVarFormParams.append('isAdmin', String(isAdmin));
116
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
117
+ const localVarHeaderParameter = {};
118
+ const localVarQueryParameter = {};
119
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
120
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
121
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
122
+ return {
123
+ url: (0, common_1.toPathString)(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ }),
127
+ /**
128
+ *
129
+ * @summary Récupère un utilisateur par ID
130
+ * @param {string} id ID de l\'utilisateur
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ */
134
+ getUserInfo: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
135
+ // verify required parameter 'id' is not null or undefined
136
+ (0, common_1.assertParamExists)('getUserInfo', 'id', id);
137
+ const localVarPath = `/api/users/{id}`
138
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
139
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
140
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
141
+ let baseOptions;
142
+ if (configuration) {
143
+ baseOptions = configuration.baseOptions;
137
144
  }
138
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
145
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
146
+ const localVarHeaderParameter = {};
147
+ const localVarQueryParameter = {};
139
148
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
149
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
150
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
- localVarRequestOptions.data = localVarFormParams;
143
151
  return {
144
152
  url: (0, common_1.toPathString)(localVarUrlObj),
145
153
  options: localVarRequestOptions,
146
154
  };
147
155
  }),
148
- };
149
- };
150
- exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
151
- /**
152
- * AuthApi - functional programming interface
153
- * @export
154
- */
155
- const AuthApiFp = function (configuration) {
156
- const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
157
- return {
158
156
  /**
159
157
  *
160
- * @summary Register a new user
161
- * @param {string} firstName
162
- * @param {string} lastName
163
- * @param {string} email
164
- * @param {string} password
165
- * @param {string} [username]
166
- * @param {boolean} [isAccountVerified]
167
- * @param {string} [level]
168
- * @param {string} [stripeCustomerId]
169
- * @param {string} [phone]
170
- * @param {string} [profilePicture]
171
- * @param {boolean} [isAdmin]
158
+ * @summary Authentifie un utilisateur
159
+ * @param {LoginRequestBody} loginRequestBody
172
160
  * @param {*} [options] Override http request option.
173
161
  * @throws {RequiredError}
174
162
  */
175
- apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- var _a, _b, _c;
178
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options);
179
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
180
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.apiAuthRegisterPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
181
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
182
- });
183
- },
184
- };
185
- };
186
- exports.AuthApiFp = AuthApiFp;
187
- /**
188
- * AuthApi - factory interface
189
- * @export
190
- */
191
- const AuthApiFactory = function (configuration, basePath, axios) {
192
- const localVarFp = (0, exports.AuthApiFp)(configuration);
193
- return {
163
+ login: (loginRequestBody_1, ...args_1) => __awaiter(this, [loginRequestBody_1, ...args_1], void 0, function* (loginRequestBody, options = {}) {
164
+ // verify required parameter 'loginRequestBody' is not null or undefined
165
+ (0, common_1.assertParamExists)('login', 'loginRequestBody', loginRequestBody);
166
+ const localVarPath = `/api/users/login`;
167
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
168
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
169
+ let baseOptions;
170
+ if (configuration) {
171
+ baseOptions = configuration.baseOptions;
172
+ }
173
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
174
+ const localVarHeaderParameter = {};
175
+ const localVarQueryParameter = {};
176
+ localVarHeaderParameter['Content-Type'] = 'application/json';
177
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
178
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
179
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
180
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(loginRequestBody, localVarRequestOptions, configuration);
181
+ return {
182
+ url: (0, common_1.toPathString)(localVarUrlObj),
183
+ options: localVarRequestOptions,
184
+ };
185
+ }),
194
186
  /**
195
187
  *
196
- * @summary Register a new user
197
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
188
+ * @summary Rafraîchit le token d\'accès
189
+ * @param {RefreshTokenRequestBody} refreshTokenRequestBody
198
190
  * @param {*} [options] Override http request option.
199
191
  * @throws {RequiredError}
200
192
  */
201
- apiAuthRegisterPost(requestParameters, options) {
202
- return localVarFp.apiAuthRegisterPost(requestParameters.firstName, requestParameters.lastName, requestParameters.email, requestParameters.password, requestParameters.username, requestParameters.isAccountVerified, requestParameters.level, requestParameters.stripeCustomerId, requestParameters.phone, requestParameters.profilePicture, requestParameters.isAdmin, options).then((request) => request(axios, basePath));
203
- },
204
- };
205
- };
206
- exports.AuthApiFactory = AuthApiFactory;
207
- /**
208
- * AuthApi - object-oriented interface
209
- * @export
210
- * @class AuthApi
211
- * @extends {BaseAPI}
212
- */
213
- class AuthApi extends base_1.BaseAPI {
214
- /**
215
- *
216
- * @summary Register a new user
217
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
218
- * @param {*} [options] Override http request option.
219
- * @throws {RequiredError}
220
- * @memberof AuthApi
221
- */
222
- apiAuthRegisterPost(requestParameters, options) {
223
- return (0, exports.AuthApiFp)(this.configuration).apiAuthRegisterPost(requestParameters.firstName, requestParameters.lastName, requestParameters.email, requestParameters.password, requestParameters.username, requestParameters.isAccountVerified, requestParameters.level, requestParameters.stripeCustomerId, requestParameters.phone, requestParameters.profilePicture, requestParameters.isAdmin, options).then((request) => request(this.axios, this.basePath));
224
- }
225
- }
226
- exports.AuthApi = AuthApi;
227
- /**
228
- * UsersApi - axios parameter creator
229
- * @export
230
- */
231
- const UsersApiAxiosParamCreator = function (configuration) {
232
- return {
193
+ refreshToken: (refreshTokenRequestBody_1, ...args_1) => __awaiter(this, [refreshTokenRequestBody_1, ...args_1], void 0, function* (refreshTokenRequestBody, options = {}) {
194
+ // verify required parameter 'refreshTokenRequestBody' is not null or undefined
195
+ (0, common_1.assertParamExists)('refreshToken', 'refreshTokenRequestBody', refreshTokenRequestBody);
196
+ const localVarPath = `/api/users/refresh-token`;
197
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
199
+ let baseOptions;
200
+ if (configuration) {
201
+ baseOptions = configuration.baseOptions;
202
+ }
203
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
204
+ const localVarHeaderParameter = {};
205
+ const localVarQueryParameter = {};
206
+ localVarHeaderParameter['Content-Type'] = 'application/json';
207
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
210
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenRequestBody, localVarRequestOptions, configuration);
211
+ return {
212
+ url: (0, common_1.toPathString)(localVarUrlObj),
213
+ options: localVarRequestOptions,
214
+ };
215
+ }),
233
216
  /**
234
217
  *
235
- * @summary Retrieve all users
218
+ * @summary Crée un nouvel utilisateur
219
+ * @param {RegisterRequestBody} registerRequestBody
236
220
  * @param {*} [options] Override http request option.
237
221
  * @throws {RequiredError}
238
222
  */
239
- apiUsersGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
223
+ register: (registerRequestBody_1, ...args_1) => __awaiter(this, [registerRequestBody_1, ...args_1], void 0, function* (registerRequestBody, options = {}) {
224
+ // verify required parameter 'registerRequestBody' is not null or undefined
225
+ (0, common_1.assertParamExists)('register', 'registerRequestBody', registerRequestBody);
240
226
  const localVarPath = `/api/users`;
241
227
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
228
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -244,12 +230,48 @@ const UsersApiAxiosParamCreator = function (configuration) {
244
230
  if (configuration) {
245
231
  baseOptions = configuration.baseOptions;
246
232
  }
247
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
233
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
234
+ const localVarHeaderParameter = {};
235
+ const localVarQueryParameter = {};
236
+ localVarHeaderParameter['Content-Type'] = 'application/json';
237
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
240
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(registerRequestBody, localVarRequestOptions, configuration);
241
+ return {
242
+ url: (0, common_1.toPathString)(localVarUrlObj),
243
+ options: localVarRequestOptions,
244
+ };
245
+ }),
246
+ /**
247
+ *
248
+ * @summary Met à jour un utilisateur
249
+ * @param {string} id ID de l\'utilisateur
250
+ * @param {UpdateUserRequestBody} updateUserRequestBody
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ updateUser: (id_1, updateUserRequestBody_1, ...args_1) => __awaiter(this, [id_1, updateUserRequestBody_1, ...args_1], void 0, function* (id, updateUserRequestBody, options = {}) {
255
+ // verify required parameter 'id' is not null or undefined
256
+ (0, common_1.assertParamExists)('updateUser', 'id', id);
257
+ // verify required parameter 'updateUserRequestBody' is not null or undefined
258
+ (0, common_1.assertParamExists)('updateUser', 'updateUserRequestBody', updateUserRequestBody);
259
+ const localVarPath = `/api/users/{id}`
260
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
261
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
262
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
263
+ let baseOptions;
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ }
267
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
248
268
  const localVarHeaderParameter = {};
249
269
  const localVarQueryParameter = {};
270
+ localVarHeaderParameter['Content-Type'] = 'application/json';
250
271
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
251
272
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
273
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
274
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateUserRequestBody, localVarRequestOptions, configuration);
253
275
  return {
254
276
  url: (0, common_1.toPathString)(localVarUrlObj),
255
277
  options: localVarRequestOptions,
@@ -267,16 +289,114 @@ const UsersApiFp = function (configuration) {
267
289
  return {
268
290
  /**
269
291
  *
270
- * @summary Retrieve all users
292
+ * @summary Modifie le mot de passe d\'un utilisateur
293
+ * @param {string} id ID de l\'utilisateur
294
+ * @param {ChangePasswordRequestBody} changePasswordRequestBody
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ changePassword(id, changePasswordRequestBody, options) {
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ var _a, _b, _c;
301
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.changePassword(id, changePasswordRequestBody, options);
302
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
303
+ 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;
304
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
305
+ });
306
+ },
307
+ /**
308
+ *
309
+ * @summary Récupère la liste des utilisateurs
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ getAllUsers(options) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ var _a, _b, _c;
316
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
317
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
318
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
319
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
320
+ });
321
+ },
322
+ /**
323
+ *
324
+ * @summary Récupère un utilisateur par ID
325
+ * @param {string} id ID de l\'utilisateur
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ getUserInfo(id, options) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ var _a, _b, _c;
332
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserInfo(id, options);
333
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
334
+ 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;
335
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
336
+ });
337
+ },
338
+ /**
339
+ *
340
+ * @summary Authentifie un utilisateur
341
+ * @param {LoginRequestBody} loginRequestBody
342
+ * @param {*} [options] Override http request option.
343
+ * @throws {RequiredError}
344
+ */
345
+ login(loginRequestBody, options) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ var _a, _b, _c;
348
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.login(loginRequestBody, options);
349
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
350
+ 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;
351
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
352
+ });
353
+ },
354
+ /**
355
+ *
356
+ * @summary Rafraîchit le token d\'accès
357
+ * @param {RefreshTokenRequestBody} refreshTokenRequestBody
271
358
  * @param {*} [options] Override http request option.
272
359
  * @throws {RequiredError}
273
360
  */
274
- apiUsersGet(options) {
361
+ refreshToken(refreshTokenRequestBody, options) {
275
362
  return __awaiter(this, void 0, void 0, function* () {
276
363
  var _a, _b, _c;
277
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiUsersGet(options);
364
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshTokenRequestBody, options);
278
365
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
279
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.apiUsersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
366
+ 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;
367
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
368
+ });
369
+ },
370
+ /**
371
+ *
372
+ * @summary Crée un nouvel utilisateur
373
+ * @param {RegisterRequestBody} registerRequestBody
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ register(registerRequestBody, options) {
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ var _a, _b, _c;
380
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.register(registerRequestBody, options);
381
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
382
+ 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;
383
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
384
+ });
385
+ },
386
+ /**
387
+ *
388
+ * @summary Met à jour un utilisateur
389
+ * @param {string} id ID de l\'utilisateur
390
+ * @param {UpdateUserRequestBody} updateUserRequestBody
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ updateUser(id, updateUserRequestBody, options) {
395
+ return __awaiter(this, void 0, void 0, function* () {
396
+ var _a, _b, _c;
397
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateUser(id, updateUserRequestBody, options);
398
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
399
+ 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;
280
400
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
281
401
  });
282
402
  },
@@ -292,12 +412,72 @@ const UsersApiFactory = function (configuration, basePath, axios) {
292
412
  return {
293
413
  /**
294
414
  *
295
- * @summary Retrieve all users
415
+ * @summary Modifie le mot de passe d\'un utilisateur
416
+ * @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
296
417
  * @param {*} [options] Override http request option.
297
418
  * @throws {RequiredError}
298
419
  */
299
- apiUsersGet(options) {
300
- return localVarFp.apiUsersGet(options).then((request) => request(axios, basePath));
420
+ changePassword(requestParameters, options) {
421
+ return localVarFp.changePassword(requestParameters.id, requestParameters.changePasswordRequestBody, options).then((request) => request(axios, basePath));
422
+ },
423
+ /**
424
+ *
425
+ * @summary Récupère la liste des utilisateurs
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ getAllUsers(options) {
430
+ return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
431
+ },
432
+ /**
433
+ *
434
+ * @summary Récupère un utilisateur par ID
435
+ * @param {UsersApiGetUserInfoRequest} requestParameters Request parameters.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ getUserInfo(requestParameters, options) {
440
+ return localVarFp.getUserInfo(requestParameters.id, options).then((request) => request(axios, basePath));
441
+ },
442
+ /**
443
+ *
444
+ * @summary Authentifie un utilisateur
445
+ * @param {UsersApiLoginRequest} requestParameters Request parameters.
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ login(requestParameters, options) {
450
+ return localVarFp.login(requestParameters.loginRequestBody, options).then((request) => request(axios, basePath));
451
+ },
452
+ /**
453
+ *
454
+ * @summary Rafraîchit le token d\'accès
455
+ * @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ refreshToken(requestParameters, options) {
460
+ return localVarFp.refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(axios, basePath));
461
+ },
462
+ /**
463
+ *
464
+ * @summary Crée un nouvel utilisateur
465
+ * @param {UsersApiRegisterRequest} requestParameters Request parameters.
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ register(requestParameters, options) {
470
+ return localVarFp.register(requestParameters.registerRequestBody, options).then((request) => request(axios, basePath));
471
+ },
472
+ /**
473
+ *
474
+ * @summary Met à jour un utilisateur
475
+ * @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ updateUser(requestParameters, options) {
480
+ return localVarFp.updateUser(requestParameters.id, requestParameters.updateUserRequestBody, options).then((request) => request(axios, basePath));
301
481
  },
302
482
  };
303
483
  };
@@ -311,13 +491,79 @@ exports.UsersApiFactory = UsersApiFactory;
311
491
  class UsersApi extends base_1.BaseAPI {
312
492
  /**
313
493
  *
314
- * @summary Retrieve all users
494
+ * @summary Modifie le mot de passe d\'un utilisateur
495
+ * @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
496
+ * @param {*} [options] Override http request option.
497
+ * @throws {RequiredError}
498
+ * @memberof UsersApi
499
+ */
500
+ changePassword(requestParameters, options) {
501
+ return (0, exports.UsersApiFp)(this.configuration).changePassword(requestParameters.id, requestParameters.changePasswordRequestBody, options).then((request) => request(this.axios, this.basePath));
502
+ }
503
+ /**
504
+ *
505
+ * @summary Récupère la liste des utilisateurs
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ * @memberof UsersApi
509
+ */
510
+ getAllUsers(options) {
511
+ return (0, exports.UsersApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
512
+ }
513
+ /**
514
+ *
515
+ * @summary Récupère un utilisateur par ID
516
+ * @param {UsersApiGetUserInfoRequest} requestParameters Request parameters.
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ * @memberof UsersApi
520
+ */
521
+ getUserInfo(requestParameters, options) {
522
+ return (0, exports.UsersApiFp)(this.configuration).getUserInfo(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
523
+ }
524
+ /**
525
+ *
526
+ * @summary Authentifie un utilisateur
527
+ * @param {UsersApiLoginRequest} requestParameters Request parameters.
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ * @memberof UsersApi
531
+ */
532
+ login(requestParameters, options) {
533
+ return (0, exports.UsersApiFp)(this.configuration).login(requestParameters.loginRequestBody, options).then((request) => request(this.axios, this.basePath));
534
+ }
535
+ /**
536
+ *
537
+ * @summary Rafraîchit le token d\'accès
538
+ * @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ * @memberof UsersApi
542
+ */
543
+ refreshToken(requestParameters, options) {
544
+ return (0, exports.UsersApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(this.axios, this.basePath));
545
+ }
546
+ /**
547
+ *
548
+ * @summary Crée un nouvel utilisateur
549
+ * @param {UsersApiRegisterRequest} requestParameters Request parameters.
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ * @memberof UsersApi
553
+ */
554
+ register(requestParameters, options) {
555
+ return (0, exports.UsersApiFp)(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
556
+ }
557
+ /**
558
+ *
559
+ * @summary Met à jour un utilisateur
560
+ * @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
315
561
  * @param {*} [options] Override http request option.
316
562
  * @throws {RequiredError}
317
563
  * @memberof UsersApi
318
564
  */
319
- apiUsersGet(options) {
320
- return (0, exports.UsersApiFp)(this.configuration).apiUsersGet(options).then((request) => request(this.axios, this.basePath));
565
+ updateUser(requestParameters, options) {
566
+ return (0, exports.UsersApiFp)(this.configuration).updateUser(requestParameters.id, requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
321
567
  }
322
568
  }
323
569
  exports.UsersApi = UsersApi;