@tennac-booking/sdk 1.0.8 → 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.
- package/.openapi-generator/FILES +10 -1
- package/README.md +17 -1
- package/api.ts +881 -9
- package/dist/api.d.ts +639 -7
- package/dist/api.js +415 -4
- package/dist/esm/api.d.ts +639 -7
- package/dist/esm/api.js +416 -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 +343 -4
- package/package.json +1 -4
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, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
29
|
/**
|
|
@@ -64,7 +64,41 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
64
64
|
return {
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
|
-
* @summary
|
|
67
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
68
|
+
* @param {string} id ID de l\'utilisateur
|
|
69
|
+
* @param {ChangePasswordRequestBody} changePasswordRequestBody
|
|
70
|
+
* @param {*} [options] Override http request option.
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
*/
|
|
73
|
+
changePassword: (id_1, changePasswordRequestBody_1, ...args_1) => __awaiter(this, [id_1, changePasswordRequestBody_1, ...args_1], void 0, function* (id, changePasswordRequestBody, options = {}) {
|
|
74
|
+
// verify required parameter 'id' is not null or undefined
|
|
75
|
+
assertParamExists('changePassword', 'id', id);
|
|
76
|
+
// verify required parameter 'changePasswordRequestBody' is not null or undefined
|
|
77
|
+
assertParamExists('changePassword', 'changePasswordRequestBody', changePasswordRequestBody);
|
|
78
|
+
const localVarPath = `/api/users/{id}/password`
|
|
79
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
80
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
81
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
82
|
+
let baseOptions;
|
|
83
|
+
if (configuration) {
|
|
84
|
+
baseOptions = configuration.baseOptions;
|
|
85
|
+
}
|
|
86
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
87
|
+
const localVarHeaderParameter = {};
|
|
88
|
+
const localVarQueryParameter = {};
|
|
89
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
90
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
91
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
92
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
93
|
+
localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequestBody, localVarRequestOptions, configuration);
|
|
94
|
+
return {
|
|
95
|
+
url: toPathString(localVarUrlObj),
|
|
96
|
+
options: localVarRequestOptions,
|
|
97
|
+
};
|
|
98
|
+
}),
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @summary Récupère la liste des utilisateurs
|
|
68
102
|
* @param {*} [options] Override http request option.
|
|
69
103
|
* @throws {RequiredError}
|
|
70
104
|
*/
|
|
@@ -87,6 +121,159 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
87
121
|
options: localVarRequestOptions,
|
|
88
122
|
};
|
|
89
123
|
}),
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @summary Récupère un utilisateur par ID
|
|
127
|
+
* @param {string} id ID de l\'utilisateur
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
getUserInfo: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
132
|
+
// verify required parameter 'id' is not null or undefined
|
|
133
|
+
assertParamExists('getUserInfo', 'id', id);
|
|
134
|
+
const localVarPath = `/api/users/{id}`
|
|
135
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
136
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
137
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
138
|
+
let baseOptions;
|
|
139
|
+
if (configuration) {
|
|
140
|
+
baseOptions = configuration.baseOptions;
|
|
141
|
+
}
|
|
142
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
143
|
+
const localVarHeaderParameter = {};
|
|
144
|
+
const localVarQueryParameter = {};
|
|
145
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
146
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
147
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
148
|
+
return {
|
|
149
|
+
url: toPathString(localVarUrlObj),
|
|
150
|
+
options: localVarRequestOptions,
|
|
151
|
+
};
|
|
152
|
+
}),
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @summary Authentifie un utilisateur
|
|
156
|
+
* @param {LoginRequestBody} loginRequestBody
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
*/
|
|
160
|
+
login: (loginRequestBody_1, ...args_1) => __awaiter(this, [loginRequestBody_1, ...args_1], void 0, function* (loginRequestBody, options = {}) {
|
|
161
|
+
// verify required parameter 'loginRequestBody' is not null or undefined
|
|
162
|
+
assertParamExists('login', 'loginRequestBody', loginRequestBody);
|
|
163
|
+
const localVarPath = `/api/users/login`;
|
|
164
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
165
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
166
|
+
let baseOptions;
|
|
167
|
+
if (configuration) {
|
|
168
|
+
baseOptions = configuration.baseOptions;
|
|
169
|
+
}
|
|
170
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
171
|
+
const localVarHeaderParameter = {};
|
|
172
|
+
const localVarQueryParameter = {};
|
|
173
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
174
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
175
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
176
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
177
|
+
localVarRequestOptions.data = serializeDataIfNeeded(loginRequestBody, localVarRequestOptions, configuration);
|
|
178
|
+
return {
|
|
179
|
+
url: toPathString(localVarUrlObj),
|
|
180
|
+
options: localVarRequestOptions,
|
|
181
|
+
};
|
|
182
|
+
}),
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @summary Rafraîchit le token d\'accès
|
|
186
|
+
* @param {RefreshTokenRequestBody} refreshTokenRequestBody
|
|
187
|
+
* @param {*} [options] Override http request option.
|
|
188
|
+
* @throws {RequiredError}
|
|
189
|
+
*/
|
|
190
|
+
refreshToken: (refreshTokenRequestBody_1, ...args_1) => __awaiter(this, [refreshTokenRequestBody_1, ...args_1], void 0, function* (refreshTokenRequestBody, options = {}) {
|
|
191
|
+
// verify required parameter 'refreshTokenRequestBody' is not null or undefined
|
|
192
|
+
assertParamExists('refreshToken', 'refreshTokenRequestBody', refreshTokenRequestBody);
|
|
193
|
+
const localVarPath = `/api/users/refresh-token`;
|
|
194
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
195
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
196
|
+
let baseOptions;
|
|
197
|
+
if (configuration) {
|
|
198
|
+
baseOptions = configuration.baseOptions;
|
|
199
|
+
}
|
|
200
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
201
|
+
const localVarHeaderParameter = {};
|
|
202
|
+
const localVarQueryParameter = {};
|
|
203
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
204
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
205
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
206
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
207
|
+
localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenRequestBody, localVarRequestOptions, configuration);
|
|
208
|
+
return {
|
|
209
|
+
url: toPathString(localVarUrlObj),
|
|
210
|
+
options: localVarRequestOptions,
|
|
211
|
+
};
|
|
212
|
+
}),
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
* @summary Crée un nouvel utilisateur
|
|
216
|
+
* @param {RegisterRequestBody} registerRequestBody
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
register: (registerRequestBody_1, ...args_1) => __awaiter(this, [registerRequestBody_1, ...args_1], void 0, function* (registerRequestBody, options = {}) {
|
|
221
|
+
// verify required parameter 'registerRequestBody' is not null or undefined
|
|
222
|
+
assertParamExists('register', 'registerRequestBody', registerRequestBody);
|
|
223
|
+
const localVarPath = `/api/users`;
|
|
224
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
225
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
226
|
+
let baseOptions;
|
|
227
|
+
if (configuration) {
|
|
228
|
+
baseOptions = configuration.baseOptions;
|
|
229
|
+
}
|
|
230
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
231
|
+
const localVarHeaderParameter = {};
|
|
232
|
+
const localVarQueryParameter = {};
|
|
233
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
234
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
235
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
236
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
237
|
+
localVarRequestOptions.data = serializeDataIfNeeded(registerRequestBody, localVarRequestOptions, configuration);
|
|
238
|
+
return {
|
|
239
|
+
url: toPathString(localVarUrlObj),
|
|
240
|
+
options: localVarRequestOptions,
|
|
241
|
+
};
|
|
242
|
+
}),
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @summary Met à jour un utilisateur
|
|
246
|
+
* @param {string} id ID de l\'utilisateur
|
|
247
|
+
* @param {UpdateUserRequestBody} updateUserRequestBody
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
updateUser: (id_1, updateUserRequestBody_1, ...args_1) => __awaiter(this, [id_1, updateUserRequestBody_1, ...args_1], void 0, function* (id, updateUserRequestBody, options = {}) {
|
|
252
|
+
// verify required parameter 'id' is not null or undefined
|
|
253
|
+
assertParamExists('updateUser', 'id', id);
|
|
254
|
+
// verify required parameter 'updateUserRequestBody' is not null or undefined
|
|
255
|
+
assertParamExists('updateUser', 'updateUserRequestBody', updateUserRequestBody);
|
|
256
|
+
const localVarPath = `/api/users/{id}`
|
|
257
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
258
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
259
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
260
|
+
let baseOptions;
|
|
261
|
+
if (configuration) {
|
|
262
|
+
baseOptions = configuration.baseOptions;
|
|
263
|
+
}
|
|
264
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
265
|
+
const localVarHeaderParameter = {};
|
|
266
|
+
const localVarQueryParameter = {};
|
|
267
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
268
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
269
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
270
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
271
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateUserRequestBody, localVarRequestOptions, configuration);
|
|
272
|
+
return {
|
|
273
|
+
url: toPathString(localVarUrlObj),
|
|
274
|
+
options: localVarRequestOptions,
|
|
275
|
+
};
|
|
276
|
+
}),
|
|
90
277
|
};
|
|
91
278
|
};
|
|
92
279
|
/**
|
|
@@ -98,7 +285,24 @@ export const UsersApiFp = function (configuration) {
|
|
|
98
285
|
return {
|
|
99
286
|
/**
|
|
100
287
|
*
|
|
101
|
-
* @summary
|
|
288
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
289
|
+
* @param {string} id ID de l\'utilisateur
|
|
290
|
+
* @param {ChangePasswordRequestBody} changePasswordRequestBody
|
|
291
|
+
* @param {*} [options] Override http request option.
|
|
292
|
+
* @throws {RequiredError}
|
|
293
|
+
*/
|
|
294
|
+
changePassword(id, changePasswordRequestBody, options) {
|
|
295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
var _a, _b, _c;
|
|
297
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.changePassword(id, changePasswordRequestBody, options);
|
|
298
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
299
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.changePassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
300
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
* @summary Récupère la liste des utilisateurs
|
|
102
306
|
* @param {*} [options] Override http request option.
|
|
103
307
|
* @throws {RequiredError}
|
|
104
308
|
*/
|
|
@@ -111,6 +315,87 @@ export const UsersApiFp = function (configuration) {
|
|
|
111
315
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
112
316
|
});
|
|
113
317
|
},
|
|
318
|
+
/**
|
|
319
|
+
*
|
|
320
|
+
* @summary Récupère un utilisateur par ID
|
|
321
|
+
* @param {string} id ID de l\'utilisateur
|
|
322
|
+
* @param {*} [options] Override http request option.
|
|
323
|
+
* @throws {RequiredError}
|
|
324
|
+
*/
|
|
325
|
+
getUserInfo(id, options) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
var _a, _b, _c;
|
|
328
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserInfo(id, options);
|
|
329
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
330
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getUserInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
331
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
/**
|
|
335
|
+
*
|
|
336
|
+
* @summary Authentifie un utilisateur
|
|
337
|
+
* @param {LoginRequestBody} loginRequestBody
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
login(loginRequestBody, options) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
var _a, _b, _c;
|
|
344
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.login(loginRequestBody, options);
|
|
345
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
346
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.login']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
347
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @summary Rafraîchit le token d\'accès
|
|
353
|
+
* @param {RefreshTokenRequestBody} refreshTokenRequestBody
|
|
354
|
+
* @param {*} [options] Override http request option.
|
|
355
|
+
* @throws {RequiredError}
|
|
356
|
+
*/
|
|
357
|
+
refreshToken(refreshTokenRequestBody, options) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
359
|
+
var _a, _b, _c;
|
|
360
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshTokenRequestBody, options);
|
|
361
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
362
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.refreshToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
363
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
/**
|
|
367
|
+
*
|
|
368
|
+
* @summary Crée un nouvel utilisateur
|
|
369
|
+
* @param {RegisterRequestBody} registerRequestBody
|
|
370
|
+
* @param {*} [options] Override http request option.
|
|
371
|
+
* @throws {RequiredError}
|
|
372
|
+
*/
|
|
373
|
+
register(registerRequestBody, options) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
var _a, _b, _c;
|
|
376
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.register(registerRequestBody, options);
|
|
377
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
378
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.register']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
379
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
* @summary Met à jour un utilisateur
|
|
385
|
+
* @param {string} id ID de l\'utilisateur
|
|
386
|
+
* @param {UpdateUserRequestBody} updateUserRequestBody
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
*/
|
|
390
|
+
updateUser(id, updateUserRequestBody, options) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
var _a, _b, _c;
|
|
393
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateUser(id, updateUserRequestBody, options);
|
|
394
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
395
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.updateUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
396
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
397
|
+
});
|
|
398
|
+
},
|
|
114
399
|
};
|
|
115
400
|
};
|
|
116
401
|
/**
|
|
@@ -122,13 +407,73 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
122
407
|
return {
|
|
123
408
|
/**
|
|
124
409
|
*
|
|
125
|
-
* @summary
|
|
410
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
411
|
+
* @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
|
|
412
|
+
* @param {*} [options] Override http request option.
|
|
413
|
+
* @throws {RequiredError}
|
|
414
|
+
*/
|
|
415
|
+
changePassword(requestParameters, options) {
|
|
416
|
+
return localVarFp.changePassword(requestParameters.id, requestParameters.changePasswordRequestBody, options).then((request) => request(axios, basePath));
|
|
417
|
+
},
|
|
418
|
+
/**
|
|
419
|
+
*
|
|
420
|
+
* @summary Récupère la liste des utilisateurs
|
|
126
421
|
* @param {*} [options] Override http request option.
|
|
127
422
|
* @throws {RequiredError}
|
|
128
423
|
*/
|
|
129
424
|
getAllUsers(options) {
|
|
130
425
|
return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
|
|
131
426
|
},
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @summary Récupère un utilisateur par ID
|
|
430
|
+
* @param {UsersApiGetUserInfoRequest} requestParameters Request parameters.
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
*/
|
|
434
|
+
getUserInfo(requestParameters, options) {
|
|
435
|
+
return localVarFp.getUserInfo(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
436
|
+
},
|
|
437
|
+
/**
|
|
438
|
+
*
|
|
439
|
+
* @summary Authentifie un utilisateur
|
|
440
|
+
* @param {UsersApiLoginRequest} requestParameters Request parameters.
|
|
441
|
+
* @param {*} [options] Override http request option.
|
|
442
|
+
* @throws {RequiredError}
|
|
443
|
+
*/
|
|
444
|
+
login(requestParameters, options) {
|
|
445
|
+
return localVarFp.login(requestParameters.loginRequestBody, options).then((request) => request(axios, basePath));
|
|
446
|
+
},
|
|
447
|
+
/**
|
|
448
|
+
*
|
|
449
|
+
* @summary Rafraîchit le token d\'accès
|
|
450
|
+
* @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
|
|
451
|
+
* @param {*} [options] Override http request option.
|
|
452
|
+
* @throws {RequiredError}
|
|
453
|
+
*/
|
|
454
|
+
refreshToken(requestParameters, options) {
|
|
455
|
+
return localVarFp.refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(axios, basePath));
|
|
456
|
+
},
|
|
457
|
+
/**
|
|
458
|
+
*
|
|
459
|
+
* @summary Crée un nouvel utilisateur
|
|
460
|
+
* @param {UsersApiRegisterRequest} requestParameters Request parameters.
|
|
461
|
+
* @param {*} [options] Override http request option.
|
|
462
|
+
* @throws {RequiredError}
|
|
463
|
+
*/
|
|
464
|
+
register(requestParameters, options) {
|
|
465
|
+
return localVarFp.register(requestParameters.registerRequestBody, options).then((request) => request(axios, basePath));
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
*
|
|
469
|
+
* @summary Met à jour un utilisateur
|
|
470
|
+
* @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
|
|
471
|
+
* @param {*} [options] Override http request option.
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
updateUser(requestParameters, options) {
|
|
475
|
+
return localVarFp.updateUser(requestParameters.id, requestParameters.updateUserRequestBody, options).then((request) => request(axios, basePath));
|
|
476
|
+
},
|
|
132
477
|
};
|
|
133
478
|
};
|
|
134
479
|
/**
|
|
@@ -140,7 +485,18 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
140
485
|
export class UsersApi extends BaseAPI {
|
|
141
486
|
/**
|
|
142
487
|
*
|
|
143
|
-
* @summary
|
|
488
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
489
|
+
* @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
|
|
490
|
+
* @param {*} [options] Override http request option.
|
|
491
|
+
* @throws {RequiredError}
|
|
492
|
+
* @memberof UsersApi
|
|
493
|
+
*/
|
|
494
|
+
changePassword(requestParameters, options) {
|
|
495
|
+
return UsersApiFp(this.configuration).changePassword(requestParameters.id, requestParameters.changePasswordRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
*
|
|
499
|
+
* @summary Récupère la liste des utilisateurs
|
|
144
500
|
* @param {*} [options] Override http request option.
|
|
145
501
|
* @throws {RequiredError}
|
|
146
502
|
* @memberof UsersApi
|
|
@@ -148,4 +504,59 @@ export class UsersApi extends BaseAPI {
|
|
|
148
504
|
getAllUsers(options) {
|
|
149
505
|
return UsersApiFp(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
|
|
150
506
|
}
|
|
507
|
+
/**
|
|
508
|
+
*
|
|
509
|
+
* @summary Récupère un utilisateur par ID
|
|
510
|
+
* @param {UsersApiGetUserInfoRequest} requestParameters Request parameters.
|
|
511
|
+
* @param {*} [options] Override http request option.
|
|
512
|
+
* @throws {RequiredError}
|
|
513
|
+
* @memberof UsersApi
|
|
514
|
+
*/
|
|
515
|
+
getUserInfo(requestParameters, options) {
|
|
516
|
+
return UsersApiFp(this.configuration).getUserInfo(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
*
|
|
520
|
+
* @summary Authentifie un utilisateur
|
|
521
|
+
* @param {UsersApiLoginRequest} requestParameters Request parameters.
|
|
522
|
+
* @param {*} [options] Override http request option.
|
|
523
|
+
* @throws {RequiredError}
|
|
524
|
+
* @memberof UsersApi
|
|
525
|
+
*/
|
|
526
|
+
login(requestParameters, options) {
|
|
527
|
+
return UsersApiFp(this.configuration).login(requestParameters.loginRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
*
|
|
531
|
+
* @summary Rafraîchit le token d\'accès
|
|
532
|
+
* @param {UsersApiRefreshTokenRequest} requestParameters Request parameters.
|
|
533
|
+
* @param {*} [options] Override http request option.
|
|
534
|
+
* @throws {RequiredError}
|
|
535
|
+
* @memberof UsersApi
|
|
536
|
+
*/
|
|
537
|
+
refreshToken(requestParameters, options) {
|
|
538
|
+
return UsersApiFp(this.configuration).refreshToken(requestParameters.refreshTokenRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
*
|
|
542
|
+
* @summary Crée un nouvel utilisateur
|
|
543
|
+
* @param {UsersApiRegisterRequest} requestParameters Request parameters.
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
* @memberof UsersApi
|
|
547
|
+
*/
|
|
548
|
+
register(requestParameters, options) {
|
|
549
|
+
return UsersApiFp(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @summary Met à jour un utilisateur
|
|
554
|
+
* @param {UsersApiUpdateUserRequest} requestParameters Request parameters.
|
|
555
|
+
* @param {*} [options] Override http request option.
|
|
556
|
+
* @throws {RequiredError}
|
|
557
|
+
* @memberof UsersApi
|
|
558
|
+
*/
|
|
559
|
+
updateUser(requestParameters, options) {
|
|
560
|
+
return UsersApiFp(this.configuration).updateUser(requestParameters.id, requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
561
|
+
}
|
|
151
562
|
}
|
|
@@ -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)
|