@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.
- package/.openapi-generator/FILES +10 -1
- package/README.md +17 -2
- package/api.ts +831 -224
- package/dist/api.d.ts +589 -109
- package/dist/api.js +394 -148
- package/dist/esm/api.d.ts +589 -109
- package/dist/esm/api.js +394 -144
- 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 +345 -6
- package/package.json +1 -4
- package/apis/AuthApi.ts +0 -157
- package/apis/UsersApi.ts +0 -56
- package/apis/index.ts +0 -4
- package/dist/apis/AuthApi.d.ts +0 -39
- package/dist/apis/AuthApi.js +0 -117
- package/dist/apis/UsersApi.d.ts +0 -26
- package/dist/apis/UsersApi.js +0 -58
- package/dist/apis/index.d.ts +0 -2
- package/dist/apis/index.js +0 -20
- package/dist/esm/apis/AuthApi.d.ts +0 -39
- package/dist/esm/apis/AuthApi.js +0 -113
- package/dist/esm/apis/UsersApi.d.ts +0 -26
- package/dist/esm/apis/UsersApi.js +0 -54
- package/dist/esm/apis/index.d.ts +0 -2
- package/dist/esm/apis/index.js +0 -4
- package/dist/esm/models/Booking.d.ts +0 -87
- package/dist/esm/models/Booking.js +0 -82
- package/dist/esm/models/Court.d.ts +0 -76
- package/dist/esm/models/Court.js +0 -72
- package/dist/esm/models/Slot.d.ts +0 -44
- package/dist/esm/models/Slot.js +0 -51
- package/dist/esm/models/SlotException.d.ts +0 -50
- package/dist/esm/models/SlotException.js +0 -55
- package/dist/esm/models/User.d.ts +0 -92
- package/dist/esm/models/User.js +0 -69
- package/dist/esm/models/index.d.ts +0 -5
- package/dist/esm/models/index.js +0 -7
- package/dist/esm/runtime.d.ts +0 -184
- package/dist/esm/runtime.js +0 -334
- package/dist/esm/src/apis/AuthApi.d.ts +0 -39
- package/dist/esm/src/apis/AuthApi.js +0 -113
- package/dist/esm/src/apis/UsersApi.d.ts +0 -26
- package/dist/esm/src/apis/UsersApi.js +0 -54
- package/dist/esm/src/apis/index.d.ts +0 -2
- package/dist/esm/src/apis/index.js +0 -4
- package/dist/esm/src/index.d.ts +0 -3
- package/dist/esm/src/index.js +0 -5
- package/dist/esm/src/models/Booking.d.ts +0 -87
- package/dist/esm/src/models/Booking.js +0 -82
- package/dist/esm/src/models/BookingStatus.d.ts +0 -25
- package/dist/esm/src/models/BookingStatus.js +0 -43
- package/dist/esm/src/models/Court.d.ts +0 -76
- package/dist/esm/src/models/Court.js +0 -72
- package/dist/esm/src/models/CourtStatus.d.ts +0 -25
- package/dist/esm/src/models/CourtStatus.js +0 -43
- package/dist/esm/src/models/Slot.d.ts +0 -44
- package/dist/esm/src/models/Slot.js +0 -51
- package/dist/esm/src/models/SlotException.d.ts +0 -50
- package/dist/esm/src/models/SlotException.js +0 -55
- package/dist/esm/src/models/StripeStatus.d.ts +0 -28
- package/dist/esm/src/models/StripeStatus.js +0 -46
- package/dist/esm/src/models/User.d.ts +0 -92
- package/dist/esm/src/models/User.js +0 -69
- package/dist/esm/src/models/index.d.ts +0 -5
- package/dist/esm/src/models/index.js +0 -7
- package/dist/esm/src/runtime.d.ts +0 -184
- package/dist/esm/src/runtime.js +0 -334
- package/dist/models/Booking.d.ts +0 -87
- package/dist/models/Booking.js +0 -90
- package/dist/models/Court.d.ts +0 -76
- package/dist/models/Court.js +0 -80
- package/dist/models/Slot.d.ts +0 -44
- package/dist/models/Slot.js +0 -58
- package/dist/models/SlotException.d.ts +0 -50
- package/dist/models/SlotException.js +0 -62
- package/dist/models/User.d.ts +0 -92
- package/dist/models/User.js +0 -76
- package/dist/models/index.d.ts +0 -5
- package/dist/models/index.js +0 -23
- package/dist/runtime.d.ts +0 -184
- package/dist/runtime.js +0 -350
- package/dist/src/apis/AuthApi.d.ts +0 -39
- package/dist/src/apis/AuthApi.js +0 -117
- package/dist/src/apis/UsersApi.d.ts +0 -26
- package/dist/src/apis/UsersApi.js +0 -58
- package/dist/src/apis/index.d.ts +0 -2
- package/dist/src/apis/index.js +0 -20
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -21
- package/dist/src/models/Booking.d.ts +0 -87
- package/dist/src/models/Booking.js +0 -90
- package/dist/src/models/BookingStatus.d.ts +0 -25
- package/dist/src/models/BookingStatus.js +0 -51
- package/dist/src/models/Court.d.ts +0 -76
- package/dist/src/models/Court.js +0 -80
- package/dist/src/models/CourtStatus.d.ts +0 -25
- package/dist/src/models/CourtStatus.js +0 -51
- package/dist/src/models/Slot.d.ts +0 -44
- package/dist/src/models/Slot.js +0 -58
- package/dist/src/models/SlotException.d.ts +0 -50
- package/dist/src/models/SlotException.js +0 -62
- package/dist/src/models/StripeStatus.d.ts +0 -28
- package/dist/src/models/StripeStatus.js +0 -54
- package/dist/src/models/User.d.ts +0 -92
- package/dist/src/models/User.js +0 -76
- package/dist/src/models/index.d.ts +0 -5
- package/dist/src/models/index.js +0 -23
- package/dist/src/runtime.d.ts +0 -184
- package/dist/src/runtime.js +0 -350
- package/docs/AuthApi.md +0 -88
- package/models/Booking.ts +0 -142
- package/models/Court.ts +0 -130
- package/models/Slot.ts +0 -84
- package/models/SlotException.ts +0 -93
- package/models/User.ts +0 -149
- package/models/index.ts +0 -7
- package/runtime.ts +0 -432
- package/src/apis/AuthApi.ts +0 -157
- package/src/apis/UsersApi.ts +0 -56
- package/src/apis/index.ts +0 -4
- package/src/index.ts +0 -5
- package/src/models/Booking.ts +0 -142
- package/src/models/BookingStatus.ts +0 -53
- package/src/models/Court.ts +0 -130
- package/src/models/CourtStatus.ts +0 -53
- package/src/models/Slot.ts +0 -84
- package/src/models/SlotException.ts +0 -93
- package/src/models/StripeStatus.ts +0 -56
- package/src/models/User.ts +0 -149
- package/src/models/index.ts +0 -7
- package/src/runtime.ts +0 -432
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, assertParamExists, 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
|
/**
|
|
@@ -57,179 +57,169 @@ export const StripeStatus = {
|
|
|
57
57
|
Canceled: 'canceled'
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* UsersApi - axios parameter creator
|
|
61
61
|
* @export
|
|
62
62
|
*/
|
|
63
|
-
export const
|
|
63
|
+
export const UsersApiAxiosParamCreator = function (configuration) {
|
|
64
64
|
return {
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
|
-
* @summary
|
|
68
|
-
* @param {string}
|
|
69
|
-
* @param {
|
|
70
|
-
* @param {string} email
|
|
71
|
-
* @param {string} password
|
|
72
|
-
* @param {string} [username]
|
|
73
|
-
* @param {boolean} [isAccountVerified]
|
|
74
|
-
* @param {string} [level]
|
|
75
|
-
* @param {string} [stripeCustomerId]
|
|
76
|
-
* @param {string} [phone]
|
|
77
|
-
* @param {string} [profilePicture]
|
|
78
|
-
* @param {boolean} [isAdmin]
|
|
67
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
68
|
+
* @param {string} id ID de l\'utilisateur
|
|
69
|
+
* @param {ChangePasswordRequestBody} changePasswordRequestBody
|
|
79
70
|
* @param {*} [options] Override http request option.
|
|
80
71
|
* @throws {RequiredError}
|
|
81
72
|
*/
|
|
82
|
-
|
|
83
|
-
// verify required parameter '
|
|
84
|
-
assertParamExists('
|
|
85
|
-
// verify required parameter '
|
|
86
|
-
assertParamExists('
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// verify required parameter 'password' is not null or undefined
|
|
90
|
-
assertParamExists('apiAuthRegisterPost', 'password', password);
|
|
91
|
-
const localVarPath = `/api/auth/register`;
|
|
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)));
|
|
92
80
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
93
81
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
94
82
|
let baseOptions;
|
|
95
83
|
if (configuration) {
|
|
96
84
|
baseOptions = configuration.baseOptions;
|
|
97
85
|
}
|
|
98
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
86
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
99
87
|
const localVarHeaderParameter = {};
|
|
100
88
|
const localVarQueryParameter = {};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
localVarFormParams.append('phone', phone);
|
|
125
|
-
}
|
|
126
|
-
if (password !== undefined) {
|
|
127
|
-
localVarFormParams.append('password', password);
|
|
128
|
-
}
|
|
129
|
-
if (profilePicture !== undefined) {
|
|
130
|
-
localVarFormParams.append('profilePicture', profilePicture);
|
|
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
|
|
102
|
+
* @param {*} [options] Override http request option.
|
|
103
|
+
* @throws {RequiredError}
|
|
104
|
+
*/
|
|
105
|
+
getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
106
|
+
const localVarPath = `/api/users`;
|
|
107
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
108
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
109
|
+
let baseOptions;
|
|
110
|
+
if (configuration) {
|
|
111
|
+
baseOptions = configuration.baseOptions;
|
|
131
112
|
}
|
|
132
|
-
|
|
133
|
-
|
|
113
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
114
|
+
const localVarHeaderParameter = {};
|
|
115
|
+
const localVarQueryParameter = {};
|
|
116
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
117
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
118
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
119
|
+
return {
|
|
120
|
+
url: toPathString(localVarUrlObj),
|
|
121
|
+
options: localVarRequestOptions,
|
|
122
|
+
};
|
|
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;
|
|
134
141
|
}
|
|
135
|
-
|
|
142
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
143
|
+
const localVarHeaderParameter = {};
|
|
144
|
+
const localVarQueryParameter = {};
|
|
136
145
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
137
146
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
147
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
-
localVarRequestOptions.data = localVarFormParams;
|
|
140
148
|
return {
|
|
141
149
|
url: toPathString(localVarUrlObj),
|
|
142
150
|
options: localVarRequestOptions,
|
|
143
151
|
};
|
|
144
152
|
}),
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* AuthApi - functional programming interface
|
|
149
|
-
* @export
|
|
150
|
-
*/
|
|
151
|
-
export const AuthApiFp = function (configuration) {
|
|
152
|
-
const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
|
|
153
|
-
return {
|
|
154
153
|
/**
|
|
155
154
|
*
|
|
156
|
-
* @summary
|
|
157
|
-
* @param {
|
|
158
|
-
* @param {string} lastName
|
|
159
|
-
* @param {string} email
|
|
160
|
-
* @param {string} password
|
|
161
|
-
* @param {string} [username]
|
|
162
|
-
* @param {boolean} [isAccountVerified]
|
|
163
|
-
* @param {string} [level]
|
|
164
|
-
* @param {string} [stripeCustomerId]
|
|
165
|
-
* @param {string} [phone]
|
|
166
|
-
* @param {string} [profilePicture]
|
|
167
|
-
* @param {boolean} [isAdmin]
|
|
155
|
+
* @summary Authentifie un utilisateur
|
|
156
|
+
* @param {LoginRequestBody} loginRequestBody
|
|
168
157
|
* @param {*} [options] Override http request option.
|
|
169
158
|
* @throws {RequiredError}
|
|
170
159
|
*/
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
+
}),
|
|
189
183
|
/**
|
|
190
184
|
*
|
|
191
|
-
* @summary
|
|
192
|
-
* @param {
|
|
185
|
+
* @summary Rafraîchit le token d\'accès
|
|
186
|
+
* @param {RefreshTokenRequestBody} refreshTokenRequestBody
|
|
193
187
|
* @param {*} [options] Override http request option.
|
|
194
188
|
* @throws {RequiredError}
|
|
195
189
|
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* UsersApi - axios parameter creator
|
|
222
|
-
* @export
|
|
223
|
-
*/
|
|
224
|
-
export const UsersApiAxiosParamCreator = function (configuration) {
|
|
225
|
-
return {
|
|
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
|
+
}),
|
|
226
213
|
/**
|
|
227
214
|
*
|
|
228
|
-
* @summary
|
|
215
|
+
* @summary Crée un nouvel utilisateur
|
|
216
|
+
* @param {RegisterRequestBody} registerRequestBody
|
|
229
217
|
* @param {*} [options] Override http request option.
|
|
230
218
|
* @throws {RequiredError}
|
|
231
219
|
*/
|
|
232
|
-
|
|
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);
|
|
233
223
|
const localVarPath = `/api/users`;
|
|
234
224
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
235
225
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -237,12 +227,48 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
237
227
|
if (configuration) {
|
|
238
228
|
baseOptions = configuration.baseOptions;
|
|
239
229
|
}
|
|
240
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
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);
|
|
241
265
|
const localVarHeaderParameter = {};
|
|
242
266
|
const localVarQueryParameter = {};
|
|
267
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
243
268
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
244
269
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
245
270
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
271
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateUserRequestBody, localVarRequestOptions, configuration);
|
|
246
272
|
return {
|
|
247
273
|
url: toPathString(localVarUrlObj),
|
|
248
274
|
options: localVarRequestOptions,
|
|
@@ -259,16 +285,114 @@ export const UsersApiFp = function (configuration) {
|
|
|
259
285
|
return {
|
|
260
286
|
/**
|
|
261
287
|
*
|
|
262
|
-
* @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
|
|
306
|
+
* @param {*} [options] Override http request option.
|
|
307
|
+
* @throws {RequiredError}
|
|
308
|
+
*/
|
|
309
|
+
getAllUsers(options) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
var _a, _b, _c;
|
|
312
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
|
|
313
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
314
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
315
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
316
|
+
});
|
|
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
|
|
263
354
|
* @param {*} [options] Override http request option.
|
|
264
355
|
* @throws {RequiredError}
|
|
265
356
|
*/
|
|
266
|
-
|
|
357
|
+
refreshToken(refreshTokenRequestBody, options) {
|
|
267
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
268
359
|
var _a, _b, _c;
|
|
269
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
360
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshTokenRequestBody, options);
|
|
270
361
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
271
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.
|
|
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;
|
|
272
396
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
273
397
|
});
|
|
274
398
|
},
|
|
@@ -283,12 +407,72 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
283
407
|
return {
|
|
284
408
|
/**
|
|
285
409
|
*
|
|
286
|
-
* @summary
|
|
410
|
+
* @summary Modifie le mot de passe d\'un utilisateur
|
|
411
|
+
* @param {UsersApiChangePasswordRequest} requestParameters Request parameters.
|
|
287
412
|
* @param {*} [options] Override http request option.
|
|
288
413
|
* @throws {RequiredError}
|
|
289
414
|
*/
|
|
290
|
-
|
|
291
|
-
return localVarFp.
|
|
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
|
|
421
|
+
* @param {*} [options] Override http request option.
|
|
422
|
+
* @throws {RequiredError}
|
|
423
|
+
*/
|
|
424
|
+
getAllUsers(options) {
|
|
425
|
+
return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
|
|
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));
|
|
292
476
|
},
|
|
293
477
|
};
|
|
294
478
|
};
|
|
@@ -301,12 +485,78 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
|
301
485
|
export class UsersApi extends BaseAPI {
|
|
302
486
|
/**
|
|
303
487
|
*
|
|
304
|
-
* @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
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
* @memberof UsersApi
|
|
503
|
+
*/
|
|
504
|
+
getAllUsers(options) {
|
|
505
|
+
return UsersApiFp(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
|
|
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.
|
|
305
555
|
* @param {*} [options] Override http request option.
|
|
306
556
|
* @throws {RequiredError}
|
|
307
557
|
* @memberof UsersApi
|
|
308
558
|
*/
|
|
309
|
-
|
|
310
|
-
return UsersApiFp(this.configuration).
|
|
559
|
+
updateUser(requestParameters, options) {
|
|
560
|
+
return UsersApiFp(this.configuration).updateUser(requestParameters.id, requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
311
561
|
}
|
|
312
562
|
}
|