@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/.openapi-generator/FILES +10 -1
- package/README.md +23 -2
- package/api.ts +864 -9
- package/dist/api.d.ts +606 -7
- package/dist/api.js +419 -4
- package/dist/esm/api.d.ts +606 -7
- package/dist/esm/api.js +420 -5
- package/docs/ApiErrorResponse.md +22 -0
- package/docs/ChangePasswordRequestBody.md +22 -0
- package/docs/ChangePasswordResponse.md +20 -0
- package/docs/LoginRequestBody.md +22 -0
- package/docs/LoginResponse.md +26 -0
- package/docs/RefreshTokenRequestBody.md +20 -0
- package/docs/RefreshTokenResponse.md +26 -0
- package/docs/RegisterRequestBody.md +36 -0
- package/docs/UpdateUserRequestBody.md +32 -0
- package/docs/UserResponse.md +44 -0
- package/docs/UsersApi.md +328 -5
- package/package.json +4 -3
package/dist/esm/api.js
CHANGED
|
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
import globalAxios from 'axios';
|
|
24
24
|
// Some imports not used depending on template conditions
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
import { DUMMY_BASE_URL, setSearchParams, toPathString, createRequestFunction } from './common';
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
29
|
/**
|
|
@@ -64,7 +64,40 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
64
64
|
return {
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
|
-
* @summary
|
|
67
|
+
* @summary Modifie le mot de passe de l\'utilisateur connecté
|
|
68
|
+
* @param {ChangePasswordRequestBody} changePasswordRequestBody
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
*/
|
|
72
|
+
changePassword: (changePasswordRequestBody_1, ...args_1) => __awaiter(this, [changePasswordRequestBody_1, ...args_1], void 0, function* (changePasswordRequestBody, options = {}) {
|
|
73
|
+
// verify required parameter 'changePasswordRequestBody' is not null or undefined
|
|
74
|
+
assertParamExists('changePassword', 'changePasswordRequestBody', changePasswordRequestBody);
|
|
75
|
+
const localVarPath = `/api/users/me/password`;
|
|
76
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
77
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
78
|
+
let baseOptions;
|
|
79
|
+
if (configuration) {
|
|
80
|
+
baseOptions = configuration.baseOptions;
|
|
81
|
+
}
|
|
82
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
83
|
+
const localVarHeaderParameter = {};
|
|
84
|
+
const localVarQueryParameter = {};
|
|
85
|
+
// authentication bearerAuth required
|
|
86
|
+
// http bearer authentication required
|
|
87
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
88
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
89
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
90
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
91
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
92
|
+
localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequestBody, localVarRequestOptions, configuration);
|
|
93
|
+
return {
|
|
94
|
+
url: toPathString(localVarUrlObj),
|
|
95
|
+
options: localVarRequestOptions,
|
|
96
|
+
};
|
|
97
|
+
}),
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Récupère la liste des utilisateurs
|
|
68
101
|
* @param {*} [options] Override http request option.
|
|
69
102
|
* @throws {RequiredError}
|
|
70
103
|
*/
|
|
@@ -79,9 +112,172 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
79
112
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
80
113
|
const localVarHeaderParameter = {};
|
|
81
114
|
const localVarQueryParameter = {};
|
|
115
|
+
// authentication bearerAuth required
|
|
116
|
+
// http bearer authentication required
|
|
117
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
120
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
121
|
+
return {
|
|
122
|
+
url: toPathString(localVarUrlObj),
|
|
123
|
+
options: localVarRequestOptions,
|
|
124
|
+
};
|
|
125
|
+
}),
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @summary Récupère les informations de l\'utilisateur connecté
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
*/
|
|
132
|
+
getUserInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
133
|
+
const localVarPath = `/api/users/me`;
|
|
134
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
135
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
136
|
+
let baseOptions;
|
|
137
|
+
if (configuration) {
|
|
138
|
+
baseOptions = configuration.baseOptions;
|
|
139
|
+
}
|
|
140
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
141
|
+
const localVarHeaderParameter = {};
|
|
142
|
+
const localVarQueryParameter = {};
|
|
143
|
+
// authentication bearerAuth required
|
|
144
|
+
// http bearer authentication required
|
|
145
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
146
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
147
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
148
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
149
|
+
return {
|
|
150
|
+
url: toPathString(localVarUrlObj),
|
|
151
|
+
options: localVarRequestOptions,
|
|
152
|
+
};
|
|
153
|
+
}),
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @summary Authentifie un utilisateur
|
|
157
|
+
* @param {LoginRequestBody} loginRequestBody
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
*/
|
|
161
|
+
login: (loginRequestBody_1, ...args_1) => __awaiter(this, [loginRequestBody_1, ...args_1], void 0, function* (loginRequestBody, options = {}) {
|
|
162
|
+
// verify required parameter 'loginRequestBody' is not null or undefined
|
|
163
|
+
assertParamExists('login', 'loginRequestBody', loginRequestBody);
|
|
164
|
+
const localVarPath = `/api/users/login`;
|
|
165
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
166
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
167
|
+
let baseOptions;
|
|
168
|
+
if (configuration) {
|
|
169
|
+
baseOptions = configuration.baseOptions;
|
|
170
|
+
}
|
|
171
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
172
|
+
const localVarHeaderParameter = {};
|
|
173
|
+
const localVarQueryParameter = {};
|
|
174
|
+
// authentication bearerAuth required
|
|
175
|
+
// http bearer authentication required
|
|
176
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
177
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
178
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
179
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
180
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
181
|
+
localVarRequestOptions.data = serializeDataIfNeeded(loginRequestBody, localVarRequestOptions, configuration);
|
|
182
|
+
return {
|
|
183
|
+
url: toPathString(localVarUrlObj),
|
|
184
|
+
options: localVarRequestOptions,
|
|
185
|
+
};
|
|
186
|
+
}),
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* @summary Rafraîchit le token d\'accès
|
|
190
|
+
* @param {RefreshTokenRequestBody} refreshTokenRequestBody
|
|
191
|
+
* @param {*} [options] Override http request option.
|
|
192
|
+
* @throws {RequiredError}
|
|
193
|
+
*/
|
|
194
|
+
refreshToken: (refreshTokenRequestBody_1, ...args_1) => __awaiter(this, [refreshTokenRequestBody_1, ...args_1], void 0, function* (refreshTokenRequestBody, options = {}) {
|
|
195
|
+
// verify required parameter 'refreshTokenRequestBody' is not null or undefined
|
|
196
|
+
assertParamExists('refreshToken', 'refreshTokenRequestBody', refreshTokenRequestBody);
|
|
197
|
+
const localVarPath = `/api/users/refresh-token`;
|
|
198
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
199
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
200
|
+
let baseOptions;
|
|
201
|
+
if (configuration) {
|
|
202
|
+
baseOptions = configuration.baseOptions;
|
|
203
|
+
}
|
|
204
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
205
|
+
const localVarHeaderParameter = {};
|
|
206
|
+
const localVarQueryParameter = {};
|
|
207
|
+
// authentication bearerAuth required
|
|
208
|
+
// http bearer authentication required
|
|
209
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
210
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
211
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
212
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
213
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
214
|
+
localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenRequestBody, localVarRequestOptions, configuration);
|
|
215
|
+
return {
|
|
216
|
+
url: toPathString(localVarUrlObj),
|
|
217
|
+
options: localVarRequestOptions,
|
|
218
|
+
};
|
|
219
|
+
}),
|
|
220
|
+
/**
|
|
221
|
+
*
|
|
222
|
+
* @summary Crée un nouvel utilisateur
|
|
223
|
+
* @param {RegisterRequestBody} registerRequestBody
|
|
224
|
+
* @param {*} [options] Override http request option.
|
|
225
|
+
* @throws {RequiredError}
|
|
226
|
+
*/
|
|
227
|
+
register: (registerRequestBody_1, ...args_1) => __awaiter(this, [registerRequestBody_1, ...args_1], void 0, function* (registerRequestBody, options = {}) {
|
|
228
|
+
// verify required parameter 'registerRequestBody' is not null or undefined
|
|
229
|
+
assertParamExists('register', 'registerRequestBody', registerRequestBody);
|
|
230
|
+
const localVarPath = `/api/users`;
|
|
231
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
232
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
233
|
+
let baseOptions;
|
|
234
|
+
if (configuration) {
|
|
235
|
+
baseOptions = configuration.baseOptions;
|
|
236
|
+
}
|
|
237
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
238
|
+
const localVarHeaderParameter = {};
|
|
239
|
+
const localVarQueryParameter = {};
|
|
240
|
+
// authentication bearerAuth required
|
|
241
|
+
// http bearer authentication required
|
|
242
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
243
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
244
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
245
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
246
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
247
|
+
localVarRequestOptions.data = serializeDataIfNeeded(registerRequestBody, localVarRequestOptions, configuration);
|
|
248
|
+
return {
|
|
249
|
+
url: toPathString(localVarUrlObj),
|
|
250
|
+
options: localVarRequestOptions,
|
|
251
|
+
};
|
|
252
|
+
}),
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @summary Met à jour les données de l\'utilisateur connecté
|
|
256
|
+
* @param {UpdateUserRequestBody} updateUserRequestBody
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
*/
|
|
260
|
+
updateUser: (updateUserRequestBody_1, ...args_1) => __awaiter(this, [updateUserRequestBody_1, ...args_1], void 0, function* (updateUserRequestBody, options = {}) {
|
|
261
|
+
// verify required parameter 'updateUserRequestBody' is not null or undefined
|
|
262
|
+
assertParamExists('updateUser', 'updateUserRequestBody', updateUserRequestBody);
|
|
263
|
+
const localVarPath = `/api/users/me`;
|
|
264
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
265
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
266
|
+
let baseOptions;
|
|
267
|
+
if (configuration) {
|
|
268
|
+
baseOptions = configuration.baseOptions;
|
|
269
|
+
}
|
|
270
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
271
|
+
const localVarHeaderParameter = {};
|
|
272
|
+
const localVarQueryParameter = {};
|
|
273
|
+
// authentication bearerAuth required
|
|
274
|
+
// http bearer authentication required
|
|
275
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
276
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
82
277
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
83
278
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
84
279
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
280
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateUserRequestBody, localVarRequestOptions, configuration);
|
|
85
281
|
return {
|
|
86
282
|
url: toPathString(localVarUrlObj),
|
|
87
283
|
options: localVarRequestOptions,
|
|
@@ -98,7 +294,23 @@ export const UsersApiFp = function (configuration) {
|
|
|
98
294
|
return {
|
|
99
295
|
/**
|
|
100
296
|
*
|
|
101
|
-
* @summary
|
|
297
|
+
* @summary Modifie le mot de passe de l\'utilisateur connecté
|
|
298
|
+
* @param {ChangePasswordRequestBody} changePasswordRequestBody
|
|
299
|
+
* @param {*} [options] Override http request option.
|
|
300
|
+
* @throws {RequiredError}
|
|
301
|
+
*/
|
|
302
|
+
changePassword(changePasswordRequestBody, options) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
var _a, _b, _c;
|
|
305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.changePassword(changePasswordRequestBody, options);
|
|
306
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
307
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.changePassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
308
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
309
|
+
});
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* @summary Récupère la liste des utilisateurs
|
|
102
314
|
* @param {*} [options] Override http request option.
|
|
103
315
|
* @throws {RequiredError}
|
|
104
316
|
*/
|
|
@@ -111,6 +323,85 @@ export const UsersApiFp = function (configuration) {
|
|
|
111
323
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
112
324
|
});
|
|
113
325
|
},
|
|
326
|
+
/**
|
|
327
|
+
*
|
|
328
|
+
* @summary Récupère les informations de l\'utilisateur connecté
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
getUserInfo(options) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
var _a, _b, _c;
|
|
335
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserInfo(options);
|
|
336
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
337
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getUserInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
338
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
*
|
|
343
|
+
* @summary Authentifie un utilisateur
|
|
344
|
+
* @param {LoginRequestBody} loginRequestBody
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
login(loginRequestBody, options) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
var _a, _b, _c;
|
|
351
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.login(loginRequestBody, options);
|
|
352
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
353
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.login']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
354
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
355
|
+
});
|
|
356
|
+
},
|
|
357
|
+
/**
|
|
358
|
+
*
|
|
359
|
+
* @summary Rafraîchit le token d\'accès
|
|
360
|
+
* @param {RefreshTokenRequestBody} refreshTokenRequestBody
|
|
361
|
+
* @param {*} [options] Override http request option.
|
|
362
|
+
* @throws {RequiredError}
|
|
363
|
+
*/
|
|
364
|
+
refreshToken(refreshTokenRequestBody, options) {
|
|
365
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
366
|
+
var _a, _b, _c;
|
|
367
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshTokenRequestBody, options);
|
|
368
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
369
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.refreshToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
370
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @summary Crée un nouvel utilisateur
|
|
376
|
+
* @param {RegisterRequestBody} registerRequestBody
|
|
377
|
+
* @param {*} [options] Override http request option.
|
|
378
|
+
* @throws {RequiredError}
|
|
379
|
+
*/
|
|
380
|
+
register(registerRequestBody, options) {
|
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
382
|
+
var _a, _b, _c;
|
|
383
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.register(registerRequestBody, options);
|
|
384
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
385
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.register']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
386
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
387
|
+
});
|
|
388
|
+
},
|
|
389
|
+
/**
|
|
390
|
+
*
|
|
391
|
+
* @summary Met à jour les données de l\'utilisateur connecté
|
|
392
|
+
* @param {UpdateUserRequestBody} updateUserRequestBody
|
|
393
|
+
* @param {*} [options] Override http request option.
|
|
394
|
+
* @throws {RequiredError}
|
|
395
|
+
*/
|
|
396
|
+
updateUser(updateUserRequestBody, options) {
|
|
397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
398
|
+
var _a, _b, _c;
|
|
399
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateUser(updateUserRequestBody, options);
|
|
400
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
401
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.updateUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
402
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
403
|
+
});
|
|
404
|
+
},
|
|
114
405
|
};
|
|
115
406
|
};
|
|
116
407
|
/**
|
|
@@ -122,13 +413,72 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
122
413
|
return {
|
|
123
414
|
/**
|
|
124
415
|
*
|
|
125
|
-
* @summary
|
|
416
|
+
* @summary Modifie le mot de passe de l\'utilisateur connecté
|
|
417
|
+
* @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
|
|
418
|
+
* @param {*} [options] Override http request option.
|
|
419
|
+
* @throws {RequiredError}
|
|
420
|
+
*/
|
|
421
|
+
changePassword(requestParameters, options) {
|
|
422
|
+
return localVarFp.changePassword(requestParameters.changePasswordRequestBody, options).then((request) => request(axios, basePath));
|
|
423
|
+
},
|
|
424
|
+
/**
|
|
425
|
+
*
|
|
426
|
+
* @summary Récupère la liste des utilisateurs
|
|
126
427
|
* @param {*} [options] Override http request option.
|
|
127
428
|
* @throws {RequiredError}
|
|
128
429
|
*/
|
|
129
430
|
getAllUsers(options) {
|
|
130
431
|
return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
|
|
131
432
|
},
|
|
433
|
+
/**
|
|
434
|
+
*
|
|
435
|
+
* @summary Récupère les informations de l\'utilisateur connecté
|
|
436
|
+
* @param {*} [options] Override http request option.
|
|
437
|
+
* @throws {RequiredError}
|
|
438
|
+
*/
|
|
439
|
+
getUserInfo(options) {
|
|
440
|
+
return localVarFp.getUserInfo(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 les données de l\'utilisateur connecté
|
|
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.updateUserRequestBody, options).then((request) => request(axios, basePath));
|
|
481
|
+
},
|
|
132
482
|
};
|
|
133
483
|
};
|
|
134
484
|
/**
|
|
@@ -140,7 +490,18 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
140
490
|
export class UsersApi extends BaseAPI {
|
|
141
491
|
/**
|
|
142
492
|
*
|
|
143
|
-
* @summary
|
|
493
|
+
* @summary Modifie le mot de passe de l\'utilisateur connecté
|
|
494
|
+
* @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
|
|
495
|
+
* @param {*} [options] Override http request option.
|
|
496
|
+
* @throws {RequiredError}
|
|
497
|
+
* @memberof UsersApi
|
|
498
|
+
*/
|
|
499
|
+
changePassword(requestParameters, options) {
|
|
500
|
+
return UsersApiFp(this.configuration).changePassword(requestParameters.changePasswordRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @summary Récupère la liste des utilisateurs
|
|
144
505
|
* @param {*} [options] Override http request option.
|
|
145
506
|
* @throws {RequiredError}
|
|
146
507
|
* @memberof UsersApi
|
|
@@ -148,4 +509,58 @@ export class UsersApi extends BaseAPI {
|
|
|
148
509
|
getAllUsers(options) {
|
|
149
510
|
return UsersApiFp(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
|
|
150
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* @summary Récupère les informations de l\'utilisateur connecté
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
* @memberof UsersApi
|
|
518
|
+
*/
|
|
519
|
+
getUserInfo(options) {
|
|
520
|
+
return UsersApiFp(this.configuration).getUserInfo(options).then((request) => request(this.axios, this.basePath));
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
*
|
|
524
|
+
* @summary Authentifie un utilisateur
|
|
525
|
+
* @param {UsersApiLoginRequest} requestParameters Request parameters.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
* @memberof UsersApi
|
|
529
|
+
*/
|
|
530
|
+
login(requestParameters, options) {
|
|
531
|
+
return UsersApiFp(this.configuration).login(requestParameters.loginRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
*
|
|
535
|
+
* @summary Rafraîchit le token d\'accès
|
|
536
|
+
* @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
|
|
537
|
+
* @param {*} [options] Override http request option.
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
* @memberof UsersApi
|
|
540
|
+
*/
|
|
541
|
+
refreshToken(requestParameters, options) {
|
|
542
|
+
return UsersApiFp(this.configuration).refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
*
|
|
546
|
+
* @summary Crée un nouvel utilisateur
|
|
547
|
+
* @param {UsersApiRegisterRequest} requestParameters Request parameters.
|
|
548
|
+
* @param {*} [options] Override http request option.
|
|
549
|
+
* @throws {RequiredError}
|
|
550
|
+
* @memberof UsersApi
|
|
551
|
+
*/
|
|
552
|
+
register(requestParameters, options) {
|
|
553
|
+
return UsersApiFp(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
*
|
|
557
|
+
* @summary Met à jour les données de l\'utilisateur connecté
|
|
558
|
+
* @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
|
|
559
|
+
* @param {*} [options] Override http request option.
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
* @memberof UsersApi
|
|
562
|
+
*/
|
|
563
|
+
updateUser(requestParameters, options) {
|
|
564
|
+
return UsersApiFp(this.configuration).updateUser(requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
565
|
+
}
|
|
151
566
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ApiErrorResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**message** | **string** | | [default to undefined]
|
|
9
|
+
**error** | **string** | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ApiErrorResponse } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ApiErrorResponse = {
|
|
17
|
+
message,
|
|
18
|
+
error,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ChangePasswordRequestBody
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**currentPassword** | **string** | | [default to undefined]
|
|
9
|
+
**newPassword** | **string** | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ChangePasswordRequestBody } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ChangePasswordRequestBody = {
|
|
17
|
+
currentPassword,
|
|
18
|
+
newPassword,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ChangePasswordResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**message** | **string** | | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { ChangePasswordResponse } from '@tennac-booking/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: ChangePasswordResponse = {
|
|
16
|
+
message,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# LoginRequestBody
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**email** | **string** | | [default to undefined]
|
|
9
|
+
**password** | **string** | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { LoginRequestBody } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: LoginRequestBody = {
|
|
17
|
+
email,
|
|
18
|
+
password,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# LoginResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**token** | **string** | | [default to undefined]
|
|
9
|
+
**refreshToken** | **string** | | [default to undefined]
|
|
10
|
+
**sessionDuration** | **number** | | [default to undefined]
|
|
11
|
+
**sessionEnd** | **number** | | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { LoginResponse } from '@tennac-booking/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: LoginResponse = {
|
|
19
|
+
token,
|
|
20
|
+
refreshToken,
|
|
21
|
+
sessionDuration,
|
|
22
|
+
sessionEnd,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# RefreshTokenRequestBody
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**refreshToken** | **string** | | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { RefreshTokenRequestBody } from '@tennac-booking/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: RefreshTokenRequestBody = {
|
|
16
|
+
refreshToken,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# RefreshTokenResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**token** | **string** | | [default to undefined]
|
|
9
|
+
**refreshToken** | **string** | | [default to undefined]
|
|
10
|
+
**sessionDuration** | **number** | | [default to undefined]
|
|
11
|
+
**sessionEnd** | **number** | | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { RefreshTokenResponse } from '@tennac-booking/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: RefreshTokenResponse = {
|
|
19
|
+
token,
|
|
20
|
+
refreshToken,
|
|
21
|
+
sessionDuration,
|
|
22
|
+
sessionEnd,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|