@tennac-booking/sdk 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.openapi-generator/FILES +71 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +111 -1
  4. package/api.ts +7434 -279
  5. package/common.ts +4 -4
  6. package/dist/api.d.ts +5034 -236
  7. package/dist/api.js +4004 -49
  8. package/dist/esm/api.d.ts +5034 -236
  9. package/dist/esm/api.js +3967 -48
  10. package/docs/ActiveClub.md +22 -0
  11. package/docs/ActiveClubListResponse.md +20 -0
  12. package/docs/AddClubMemberRequest.md +22 -0
  13. package/docs/AddClubMemberResponse.md +22 -0
  14. package/docs/BlockSlotResponse.md +22 -0
  15. package/docs/BookingResponse.md +28 -0
  16. package/docs/BookingsApi.md +120 -0
  17. package/docs/Club.md +46 -0
  18. package/docs/ClubCourtsApi.md +118 -0
  19. package/docs/ClubInfoResponse.md +46 -0
  20. package/docs/ClubListResponse.md +22 -0
  21. package/docs/ClubMember.md +34 -0
  22. package/docs/ClubMembersResponse.md +22 -0
  23. package/docs/ClubResponse.md +46 -0
  24. package/docs/ClubRole.md +30 -0
  25. package/docs/ClubRoleResponse.md +30 -0
  26. package/docs/ClubRolesApi.md +268 -0
  27. package/docs/ClubRolesResponse.md +22 -0
  28. package/docs/ClubSettings.md +28 -0
  29. package/docs/ClubSettingsApi.md +227 -0
  30. package/docs/ClubSlotsApi.md +353 -0
  31. package/docs/ClubSportsApi.md +118 -0
  32. package/docs/ClubSubscriptionsApi.md +408 -0
  33. package/docs/ClubsApi.md +478 -0
  34. package/docs/CourtResponse.md +44 -0
  35. package/docs/CourtsResponse.md +22 -0
  36. package/docs/CreateBookingRequest.md +28 -0
  37. package/docs/CreateClubRequest.md +38 -0
  38. package/docs/CreateClubRoleRequestBody.md +24 -0
  39. package/docs/CreateCourtRequest.md +34 -0
  40. package/docs/CreatePriceRequest.md +26 -0
  41. package/docs/CreateSportRequest.md +22 -0
  42. package/docs/CreateSubscriptionPlanRequest.md +24 -0
  43. package/docs/DeleteClub200Response.md +20 -0
  44. package/docs/DeleteClubRole200Response.md +20 -0
  45. package/docs/DeleteSlotsByClubInRange200Response.md +20 -0
  46. package/docs/GenerateSlotsForNextThreeWeeks201Response.md +20 -0
  47. package/docs/GetActiveClubs200Response.md +20 -0
  48. package/docs/GetAllSportsRequest.md +20 -0
  49. package/docs/GetClubSettingsRequest.md +20 -0
  50. package/docs/GetUserRolesResponse.md +20 -0
  51. package/docs/GetUserRolesResponseRolesInner.md +28 -0
  52. package/docs/GetUserSubscriptionsResponse.md +22 -0
  53. package/docs/GoogleSignInRequestBody.md +20 -0
  54. package/docs/GoogleSignInResponse.md +30 -0
  55. package/docs/InitiateSubscriptionSessionRequestBody.md +26 -0
  56. package/docs/InitiateSubscriptionSessionResponse.md +22 -0
  57. package/docs/PaymentMethod.md +11 -0
  58. package/docs/PlayerWithPaymentMethod.md +22 -0
  59. package/docs/PriceResponse.md +38 -0
  60. package/docs/RestoreSubscriptionPlanForClub200Response.md +20 -0
  61. package/docs/SlotResponse.md +40 -0
  62. package/docs/SlotsResponse.md +22 -0
  63. package/docs/Sport.md +24 -0
  64. package/docs/SportResponse.md +34 -0
  65. package/docs/SportsApi.md +229 -0
  66. package/docs/SportsResponse.md +22 -0
  67. package/docs/SubscribeToClubRequestBody.md +22 -0
  68. package/docs/SubscriptionPlan.md +36 -0
  69. package/docs/SubscriptionPlanResponse.md +36 -0
  70. package/docs/SubscriptionResponse.md +36 -0
  71. package/docs/UpdateClubRequest.md +40 -0
  72. package/docs/UpdateClubRoleRequestBody.md +24 -0
  73. package/docs/UpdateCustomerRequestBody.md +26 -0
  74. package/docs/UpdateCustomerRequestBodyAddress.md +30 -0
  75. package/docs/UpdateCustomerResponse.md +22 -0
  76. package/docs/UpdateCustomerResponseCustomer.md +28 -0
  77. package/docs/UpdateSportRequest.md +20 -0
  78. package/docs/UpdateSubscriptionPlanRequest.md +24 -0
  79. package/docs/UpdateSubscriptionPlanResponse.md +22 -0
  80. package/docs/UsersApi.md +491 -21
  81. package/package.json +1 -33
package/dist/esm/api.js CHANGED
@@ -44,6 +44,27 @@ export const CourtStatus = {
44
44
  Available: 'available',
45
45
  Unavailable: 'unavailable'
46
46
  };
47
+ export const CreatePriceRequestIntervalEnum = {
48
+ Day: 'day',
49
+ Week: 'week',
50
+ Month: 'month',
51
+ Year: 'year'
52
+ };
53
+ /**
54
+ * Méthode de paiement
55
+ * @export
56
+ * @enum {string}
57
+ */
58
+ export const PaymentMethod = {
59
+ Online: 'online',
60
+ Onsite: 'onsite'
61
+ };
62
+ export const PriceResponseIntervalEnum = {
63
+ Day: 'day',
64
+ Week: 'week',
65
+ Month: 'month',
66
+ Year: 'year'
67
+ };
47
68
  /**
48
69
  *
49
70
  * @export
@@ -56,30 +77,3602 @@ export const StripeStatus = {
56
77
  Refunded: 'refunded',
57
78
  Canceled: 'canceled'
58
79
  };
80
+ export const SubscriptionResponseStatusEnum = {
81
+ Active: 'active',
82
+ Canceled: 'canceled',
83
+ Incomplete: 'incomplete',
84
+ IncompleteExpired: 'incomplete_expired',
85
+ PastDue: 'past_due',
86
+ Trialing: 'trialing',
87
+ Unpaid: 'unpaid'
88
+ };
59
89
  /**
60
- * UsersApi - axios parameter creator
90
+ * BookingsApi - axios parameter creator
61
91
  * @export
62
92
  */
63
- export const UsersApiAxiosParamCreator = function (configuration) {
93
+ export const BookingsApiAxiosParamCreator = function (configuration) {
94
+ return {
95
+ /**
96
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
97
+ * @summary Créer une réservation
98
+ * @param {CreateBookingRequest} createBookingRequest
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ bookingsPost: (createBookingRequest_1, ...args_1) => __awaiter(this, [createBookingRequest_1, ...args_1], void 0, function* (createBookingRequest, options = {}) {
103
+ // verify required parameter 'createBookingRequest' is not null or undefined
104
+ assertParamExists('bookingsPost', 'createBookingRequest', createBookingRequest);
105
+ const localVarPath = `/bookings`;
106
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
107
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
108
+ let baseOptions;
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions;
111
+ }
112
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
113
+ const localVarHeaderParameter = {};
114
+ const localVarQueryParameter = {};
115
+ // authentication bearerAuth required
116
+ // http bearer authentication required
117
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
118
+ localVarHeaderParameter['Content-Type'] = 'application/json';
119
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
120
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
121
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
122
+ localVarRequestOptions.data = serializeDataIfNeeded(createBookingRequest, localVarRequestOptions, configuration);
123
+ return {
124
+ url: toPathString(localVarUrlObj),
125
+ options: localVarRequestOptions,
126
+ };
127
+ }),
128
+ /**
129
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
130
+ * @summary Bloquer un créneau
131
+ * @param {string} slotId ID MongoDB du créneau à bloquer
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ bookingsPreBookSlotIdPatch: (slotId_1, ...args_1) => __awaiter(this, [slotId_1, ...args_1], void 0, function* (slotId, options = {}) {
136
+ // verify required parameter 'slotId' is not null or undefined
137
+ assertParamExists('bookingsPreBookSlotIdPatch', 'slotId', slotId);
138
+ const localVarPath = `/bookings/pre-book/{slotId}`
139
+ .replace(`{${"slotId"}}`, encodeURIComponent(String(slotId)));
140
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
+ let baseOptions;
143
+ if (configuration) {
144
+ baseOptions = configuration.baseOptions;
145
+ }
146
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
147
+ const localVarHeaderParameter = {};
148
+ const localVarQueryParameter = {};
149
+ // authentication bearerAuth required
150
+ // http bearer authentication required
151
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ }),
160
+ };
161
+ };
162
+ /**
163
+ * BookingsApi - functional programming interface
164
+ * @export
165
+ */
166
+ export const BookingsApiFp = function (configuration) {
167
+ const localVarAxiosParamCreator = BookingsApiAxiosParamCreator(configuration);
168
+ return {
169
+ /**
170
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
171
+ * @summary Créer une réservation
172
+ * @param {CreateBookingRequest} createBookingRequest
173
+ * @param {*} [options] Override http request option.
174
+ * @throws {RequiredError}
175
+ */
176
+ bookingsPost(createBookingRequest, options) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ var _a, _b, _c;
179
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bookingsPost(createBookingRequest, options);
180
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
181
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BookingsApi.bookingsPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
182
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
183
+ });
184
+ },
185
+ /**
186
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
187
+ * @summary Bloquer un créneau
188
+ * @param {string} slotId ID MongoDB du créneau à bloquer
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ */
192
+ bookingsPreBookSlotIdPatch(slotId, options) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ var _a, _b, _c;
195
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bookingsPreBookSlotIdPatch(slotId, options);
196
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
197
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BookingsApi.bookingsPreBookSlotIdPatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
198
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
199
+ });
200
+ },
201
+ };
202
+ };
203
+ /**
204
+ * BookingsApi - factory interface
205
+ * @export
206
+ */
207
+ export const BookingsApiFactory = function (configuration, basePath, axios) {
208
+ const localVarFp = BookingsApiFp(configuration);
209
+ return {
210
+ /**
211
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
212
+ * @summary Créer une réservation
213
+ * @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ bookingsPost(requestParameters, options) {
218
+ return localVarFp.bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(axios, basePath));
219
+ },
220
+ /**
221
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
222
+ * @summary Bloquer un créneau
223
+ * @param {BookingsApiBookingsPreBookSlotIdPatchRequest} requestParameters Request parameters.
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ bookingsPreBookSlotIdPatch(requestParameters, options) {
228
+ return localVarFp.bookingsPreBookSlotIdPatch(requestParameters.slotId, options).then((request) => request(axios, basePath));
229
+ },
230
+ };
231
+ };
232
+ /**
233
+ * BookingsApi - object-oriented interface
234
+ * @export
235
+ * @class BookingsApi
236
+ * @extends {BaseAPI}
237
+ */
238
+ export class BookingsApi extends BaseAPI {
239
+ /**
240
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
241
+ * @summary Créer une réservation
242
+ * @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ * @memberof BookingsApi
246
+ */
247
+ bookingsPost(requestParameters, options) {
248
+ return BookingsApiFp(this.configuration).bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(this.axios, this.basePath));
249
+ }
250
+ /**
251
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
252
+ * @summary Bloquer un créneau
253
+ * @param {BookingsApiBookingsPreBookSlotIdPatchRequest} requestParameters Request parameters.
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ * @memberof BookingsApi
257
+ */
258
+ bookingsPreBookSlotIdPatch(requestParameters, options) {
259
+ return BookingsApiFp(this.configuration).bookingsPreBookSlotIdPatch(requestParameters.slotId, options).then((request) => request(this.axios, this.basePath));
260
+ }
261
+ }
262
+ /**
263
+ * ClubCourtsApi - axios parameter creator
264
+ * @export
265
+ */
266
+ export const ClubCourtsApiAxiosParamCreator = function (configuration) {
267
+ return {
268
+ /**
269
+ *
270
+ * @summary Créer un terrain pour un club
271
+ * @param {string} id ID du club
272
+ * @param {CreateCourtRequest} createCourtRequest
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ createCourtForClub: (id_1, createCourtRequest_1, ...args_1) => __awaiter(this, [id_1, createCourtRequest_1, ...args_1], void 0, function* (id, createCourtRequest, options = {}) {
277
+ // verify required parameter 'id' is not null or undefined
278
+ assertParamExists('createCourtForClub', 'id', id);
279
+ // verify required parameter 'createCourtRequest' is not null or undefined
280
+ assertParamExists('createCourtForClub', 'createCourtRequest', createCourtRequest);
281
+ const localVarPath = `/api/clubs/{id}/courts`
282
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
283
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
284
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
285
+ let baseOptions;
286
+ if (configuration) {
287
+ baseOptions = configuration.baseOptions;
288
+ }
289
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
290
+ const localVarHeaderParameter = {};
291
+ const localVarQueryParameter = {};
292
+ // authentication bearerAuth required
293
+ // http bearer authentication required
294
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
295
+ localVarHeaderParameter['Content-Type'] = 'application/json';
296
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
297
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
298
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
299
+ localVarRequestOptions.data = serializeDataIfNeeded(createCourtRequest, localVarRequestOptions, configuration);
300
+ return {
301
+ url: toPathString(localVarUrlObj),
302
+ options: localVarRequestOptions,
303
+ };
304
+ }),
305
+ /**
306
+ *
307
+ * @summary Récupérer tous les terrains pour un club
308
+ * @param {string} id ID du club
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ getCourtsByClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
313
+ // verify required parameter 'id' is not null or undefined
314
+ assertParamExists('getCourtsByClub', 'id', id);
315
+ const localVarPath = `/api/clubs/{id}/courts`
316
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
317
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
318
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
319
+ let baseOptions;
320
+ if (configuration) {
321
+ baseOptions = configuration.baseOptions;
322
+ }
323
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
324
+ const localVarHeaderParameter = {};
325
+ const localVarQueryParameter = {};
326
+ // authentication bearerAuth required
327
+ // http bearer authentication required
328
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
329
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
330
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
331
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
332
+ return {
333
+ url: toPathString(localVarUrlObj),
334
+ options: localVarRequestOptions,
335
+ };
336
+ }),
337
+ };
338
+ };
339
+ /**
340
+ * ClubCourtsApi - functional programming interface
341
+ * @export
342
+ */
343
+ export const ClubCourtsApiFp = function (configuration) {
344
+ const localVarAxiosParamCreator = ClubCourtsApiAxiosParamCreator(configuration);
345
+ return {
346
+ /**
347
+ *
348
+ * @summary Créer un terrain pour un club
349
+ * @param {string} id ID du club
350
+ * @param {CreateCourtRequest} createCourtRequest
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ */
354
+ createCourtForClub(id, createCourtRequest, options) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ var _a, _b, _c;
357
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCourtForClub(id, createCourtRequest, options);
358
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
359
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubCourtsApi.createCourtForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
360
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
361
+ });
362
+ },
363
+ /**
364
+ *
365
+ * @summary Récupérer tous les terrains pour un club
366
+ * @param {string} id ID du club
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ getCourtsByClub(id, options) {
371
+ return __awaiter(this, void 0, void 0, function* () {
372
+ var _a, _b, _c;
373
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCourtsByClub(id, options);
374
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
375
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubCourtsApi.getCourtsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
376
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
377
+ });
378
+ },
379
+ };
380
+ };
381
+ /**
382
+ * ClubCourtsApi - factory interface
383
+ * @export
384
+ */
385
+ export const ClubCourtsApiFactory = function (configuration, basePath, axios) {
386
+ const localVarFp = ClubCourtsApiFp(configuration);
387
+ return {
388
+ /**
389
+ *
390
+ * @summary Créer un terrain pour un club
391
+ * @param {ClubCourtsApiCreateCourtForClubRequest} requestParameters Request parameters.
392
+ * @param {*} [options] Override http request option.
393
+ * @throws {RequiredError}
394
+ */
395
+ createCourtForClub(requestParameters, options) {
396
+ return localVarFp.createCourtForClub(requestParameters.id, requestParameters.createCourtRequest, options).then((request) => request(axios, basePath));
397
+ },
398
+ /**
399
+ *
400
+ * @summary Récupérer tous les terrains pour un club
401
+ * @param {ClubCourtsApiGetCourtsByClubRequest} requestParameters Request parameters.
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
405
+ getCourtsByClub(requestParameters, options) {
406
+ return localVarFp.getCourtsByClub(requestParameters.id, options).then((request) => request(axios, basePath));
407
+ },
408
+ };
409
+ };
410
+ /**
411
+ * ClubCourtsApi - object-oriented interface
412
+ * @export
413
+ * @class ClubCourtsApi
414
+ * @extends {BaseAPI}
415
+ */
416
+ export class ClubCourtsApi extends BaseAPI {
417
+ /**
418
+ *
419
+ * @summary Créer un terrain pour un club
420
+ * @param {ClubCourtsApiCreateCourtForClubRequest} requestParameters Request parameters.
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ * @memberof ClubCourtsApi
424
+ */
425
+ createCourtForClub(requestParameters, options) {
426
+ return ClubCourtsApiFp(this.configuration).createCourtForClub(requestParameters.id, requestParameters.createCourtRequest, options).then((request) => request(this.axios, this.basePath));
427
+ }
428
+ /**
429
+ *
430
+ * @summary Récupérer tous les terrains pour un club
431
+ * @param {ClubCourtsApiGetCourtsByClubRequest} requestParameters Request parameters.
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ * @memberof ClubCourtsApi
435
+ */
436
+ getCourtsByClub(requestParameters, options) {
437
+ return ClubCourtsApiFp(this.configuration).getCourtsByClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
438
+ }
439
+ }
440
+ /**
441
+ * ClubRolesApi - axios parameter creator
442
+ * @export
443
+ */
444
+ export const ClubRolesApiAxiosParamCreator = function (configuration) {
64
445
  return {
65
446
  /**
66
447
  *
67
- * @summary Modifie le mot de passe de l\'utilisateur connecté
68
- * @param {ChangePasswordRequestBody} changePasswordRequestBody
448
+ * @summary Crée un nouveau rôle de club
449
+ * @param {CreateClubRoleRequestBody} createClubRoleRequestBody
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ createClubRole: (createClubRoleRequestBody_1, ...args_1) => __awaiter(this, [createClubRoleRequestBody_1, ...args_1], void 0, function* (createClubRoleRequestBody, options = {}) {
454
+ // verify required parameter 'createClubRoleRequestBody' is not null or undefined
455
+ assertParamExists('createClubRole', 'createClubRoleRequestBody', createClubRoleRequestBody);
456
+ const localVarPath = `/api/club-roles`;
457
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
458
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
459
+ let baseOptions;
460
+ if (configuration) {
461
+ baseOptions = configuration.baseOptions;
462
+ }
463
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
464
+ const localVarHeaderParameter = {};
465
+ const localVarQueryParameter = {};
466
+ // authentication bearerAuth required
467
+ // http bearer authentication required
468
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
469
+ localVarHeaderParameter['Content-Type'] = 'application/json';
470
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
471
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
472
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
473
+ localVarRequestOptions.data = serializeDataIfNeeded(createClubRoleRequestBody, localVarRequestOptions, configuration);
474
+ return {
475
+ url: toPathString(localVarUrlObj),
476
+ options: localVarRequestOptions,
477
+ };
478
+ }),
479
+ /**
480
+ *
481
+ * @summary Supprime un rôle de club
482
+ * @param {string} id ID du rôle de club
483
+ * @param {*} [options] Override http request option.
484
+ * @throws {RequiredError}
485
+ */
486
+ deleteClubRole: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
487
+ // verify required parameter 'id' is not null or undefined
488
+ assertParamExists('deleteClubRole', 'id', id);
489
+ const localVarPath = `/api/club-roles/{id}`
490
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
491
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
492
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
493
+ let baseOptions;
494
+ if (configuration) {
495
+ baseOptions = configuration.baseOptions;
496
+ }
497
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
498
+ const localVarHeaderParameter = {};
499
+ const localVarQueryParameter = {};
500
+ // authentication bearerAuth required
501
+ // http bearer authentication required
502
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
503
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
504
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
505
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
506
+ return {
507
+ url: toPathString(localVarUrlObj),
508
+ options: localVarRequestOptions,
509
+ };
510
+ }),
511
+ /**
512
+ *
513
+ * @summary Récupère tous les rôles de clubs
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ */
517
+ getAllClubRoles: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
518
+ const localVarPath = `/api/club-roles`;
519
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
520
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
521
+ let baseOptions;
522
+ if (configuration) {
523
+ baseOptions = configuration.baseOptions;
524
+ }
525
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
526
+ const localVarHeaderParameter = {};
527
+ const localVarQueryParameter = {};
528
+ // authentication bearerAuth required
529
+ // http bearer authentication required
530
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
531
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
532
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
533
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
534
+ return {
535
+ url: toPathString(localVarUrlObj),
536
+ options: localVarRequestOptions,
537
+ };
538
+ }),
539
+ /**
540
+ *
541
+ * @summary Récupère un rôle de club par son ID
542
+ * @param {string} id ID du rôle de club
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ getClubRoleById: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
547
+ // verify required parameter 'id' is not null or undefined
548
+ assertParamExists('getClubRoleById', 'id', id);
549
+ const localVarPath = `/api/club-roles/{id}`
550
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
551
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
552
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
553
+ let baseOptions;
554
+ if (configuration) {
555
+ baseOptions = configuration.baseOptions;
556
+ }
557
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
558
+ const localVarHeaderParameter = {};
559
+ const localVarQueryParameter = {};
560
+ // authentication bearerAuth required
561
+ // http bearer authentication required
562
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
563
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
564
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
565
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
566
+ return {
567
+ url: toPathString(localVarUrlObj),
568
+ options: localVarRequestOptions,
569
+ };
570
+ }),
571
+ /**
572
+ *
573
+ * @summary Met à jour un rôle de club
574
+ * @param {string} id ID du rôle de club
575
+ * @param {UpdateClubRoleRequestBody} updateClubRoleRequestBody
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ updateClubRole: (id_1, updateClubRoleRequestBody_1, ...args_1) => __awaiter(this, [id_1, updateClubRoleRequestBody_1, ...args_1], void 0, function* (id, updateClubRoleRequestBody, options = {}) {
580
+ // verify required parameter 'id' is not null or undefined
581
+ assertParamExists('updateClubRole', 'id', id);
582
+ // verify required parameter 'updateClubRoleRequestBody' is not null or undefined
583
+ assertParamExists('updateClubRole', 'updateClubRoleRequestBody', updateClubRoleRequestBody);
584
+ const localVarPath = `/api/club-roles/{id}`
585
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
586
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
587
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
588
+ let baseOptions;
589
+ if (configuration) {
590
+ baseOptions = configuration.baseOptions;
591
+ }
592
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
593
+ const localVarHeaderParameter = {};
594
+ const localVarQueryParameter = {};
595
+ // authentication bearerAuth required
596
+ // http bearer authentication required
597
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
598
+ localVarHeaderParameter['Content-Type'] = 'application/json';
599
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
600
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
601
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
602
+ localVarRequestOptions.data = serializeDataIfNeeded(updateClubRoleRequestBody, localVarRequestOptions, configuration);
603
+ return {
604
+ url: toPathString(localVarUrlObj),
605
+ options: localVarRequestOptions,
606
+ };
607
+ }),
608
+ };
609
+ };
610
+ /**
611
+ * ClubRolesApi - functional programming interface
612
+ * @export
613
+ */
614
+ export const ClubRolesApiFp = function (configuration) {
615
+ const localVarAxiosParamCreator = ClubRolesApiAxiosParamCreator(configuration);
616
+ return {
617
+ /**
618
+ *
619
+ * @summary Crée un nouveau rôle de club
620
+ * @param {CreateClubRoleRequestBody} createClubRoleRequestBody
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ createClubRole(createClubRoleRequestBody, options) {
625
+ return __awaiter(this, void 0, void 0, function* () {
626
+ var _a, _b, _c;
627
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClubRole(createClubRoleRequestBody, options);
628
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
629
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubRolesApi.createClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
630
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
631
+ });
632
+ },
633
+ /**
634
+ *
635
+ * @summary Supprime un rôle de club
636
+ * @param {string} id ID du rôle de club
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ deleteClubRole(id, options) {
641
+ return __awaiter(this, void 0, void 0, function* () {
642
+ var _a, _b, _c;
643
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClubRole(id, options);
644
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
645
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubRolesApi.deleteClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
646
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
647
+ });
648
+ },
649
+ /**
650
+ *
651
+ * @summary Récupère tous les rôles de clubs
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ */
655
+ getAllClubRoles(options) {
656
+ return __awaiter(this, void 0, void 0, function* () {
657
+ var _a, _b, _c;
658
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllClubRoles(options);
659
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
660
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubRolesApi.getAllClubRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
661
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
662
+ });
663
+ },
664
+ /**
665
+ *
666
+ * @summary Récupère un rôle de club par son ID
667
+ * @param {string} id ID du rôle de club
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ getClubRoleById(id, options) {
672
+ return __awaiter(this, void 0, void 0, function* () {
673
+ var _a, _b, _c;
674
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubRoleById(id, options);
675
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
676
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubRolesApi.getClubRoleById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
677
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
678
+ });
679
+ },
680
+ /**
681
+ *
682
+ * @summary Met à jour un rôle de club
683
+ * @param {string} id ID du rôle de club
684
+ * @param {UpdateClubRoleRequestBody} updateClubRoleRequestBody
685
+ * @param {*} [options] Override http request option.
686
+ * @throws {RequiredError}
687
+ */
688
+ updateClubRole(id, updateClubRoleRequestBody, options) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ var _a, _b, _c;
691
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClubRole(id, updateClubRoleRequestBody, options);
692
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
693
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubRolesApi.updateClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
694
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
695
+ });
696
+ },
697
+ };
698
+ };
699
+ /**
700
+ * ClubRolesApi - factory interface
701
+ * @export
702
+ */
703
+ export const ClubRolesApiFactory = function (configuration, basePath, axios) {
704
+ const localVarFp = ClubRolesApiFp(configuration);
705
+ return {
706
+ /**
707
+ *
708
+ * @summary Crée un nouveau rôle de club
709
+ * @param {ClubRolesApiCreateClubRoleRequest} requestParameters Request parameters.
710
+ * @param {*} [options] Override http request option.
711
+ * @throws {RequiredError}
712
+ */
713
+ createClubRole(requestParameters, options) {
714
+ return localVarFp.createClubRole(requestParameters.createClubRoleRequestBody, options).then((request) => request(axios, basePath));
715
+ },
716
+ /**
717
+ *
718
+ * @summary Supprime un rôle de club
719
+ * @param {ClubRolesApiDeleteClubRoleRequest} requestParameters Request parameters.
720
+ * @param {*} [options] Override http request option.
721
+ * @throws {RequiredError}
722
+ */
723
+ deleteClubRole(requestParameters, options) {
724
+ return localVarFp.deleteClubRole(requestParameters.id, options).then((request) => request(axios, basePath));
725
+ },
726
+ /**
727
+ *
728
+ * @summary Récupère tous les rôles de clubs
729
+ * @param {*} [options] Override http request option.
730
+ * @throws {RequiredError}
731
+ */
732
+ getAllClubRoles(options) {
733
+ return localVarFp.getAllClubRoles(options).then((request) => request(axios, basePath));
734
+ },
735
+ /**
736
+ *
737
+ * @summary Récupère un rôle de club par son ID
738
+ * @param {ClubRolesApiGetClubRoleByIdRequest} requestParameters Request parameters.
739
+ * @param {*} [options] Override http request option.
740
+ * @throws {RequiredError}
741
+ */
742
+ getClubRoleById(requestParameters, options) {
743
+ return localVarFp.getClubRoleById(requestParameters.id, options).then((request) => request(axios, basePath));
744
+ },
745
+ /**
746
+ *
747
+ * @summary Met à jour un rôle de club
748
+ * @param {ClubRolesApiUpdateClubRoleRequest} requestParameters Request parameters.
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ */
752
+ updateClubRole(requestParameters, options) {
753
+ return localVarFp.updateClubRole(requestParameters.id, requestParameters.updateClubRoleRequestBody, options).then((request) => request(axios, basePath));
754
+ },
755
+ };
756
+ };
757
+ /**
758
+ * ClubRolesApi - object-oriented interface
759
+ * @export
760
+ * @class ClubRolesApi
761
+ * @extends {BaseAPI}
762
+ */
763
+ export class ClubRolesApi extends BaseAPI {
764
+ /**
765
+ *
766
+ * @summary Crée un nouveau rôle de club
767
+ * @param {ClubRolesApiCreateClubRoleRequest} requestParameters Request parameters.
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ * @memberof ClubRolesApi
771
+ */
772
+ createClubRole(requestParameters, options) {
773
+ return ClubRolesApiFp(this.configuration).createClubRole(requestParameters.createClubRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
774
+ }
775
+ /**
776
+ *
777
+ * @summary Supprime un rôle de club
778
+ * @param {ClubRolesApiDeleteClubRoleRequest} requestParameters Request parameters.
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ * @memberof ClubRolesApi
782
+ */
783
+ deleteClubRole(requestParameters, options) {
784
+ return ClubRolesApiFp(this.configuration).deleteClubRole(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
785
+ }
786
+ /**
787
+ *
788
+ * @summary Récupère tous les rôles de clubs
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ * @memberof ClubRolesApi
792
+ */
793
+ getAllClubRoles(options) {
794
+ return ClubRolesApiFp(this.configuration).getAllClubRoles(options).then((request) => request(this.axios, this.basePath));
795
+ }
796
+ /**
797
+ *
798
+ * @summary Récupère un rôle de club par son ID
799
+ * @param {ClubRolesApiGetClubRoleByIdRequest} requestParameters Request parameters.
800
+ * @param {*} [options] Override http request option.
801
+ * @throws {RequiredError}
802
+ * @memberof ClubRolesApi
803
+ */
804
+ getClubRoleById(requestParameters, options) {
805
+ return ClubRolesApiFp(this.configuration).getClubRoleById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
806
+ }
807
+ /**
808
+ *
809
+ * @summary Met à jour un rôle de club
810
+ * @param {ClubRolesApiUpdateClubRoleRequest} requestParameters Request parameters.
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ * @memberof ClubRolesApi
814
+ */
815
+ updateClubRole(requestParameters, options) {
816
+ return ClubRolesApiFp(this.configuration).updateClubRole(requestParameters.id, requestParameters.updateClubRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
817
+ }
818
+ }
819
+ /**
820
+ * ClubSettingsApi - axios parameter creator
821
+ * @export
822
+ */
823
+ export const ClubSettingsApiAxiosParamCreator = function (configuration) {
824
+ return {
825
+ /**
826
+ *
827
+ * @summary Crée les paramètres d’un club
828
+ * @param {ClubSettings} clubSettings
829
+ * @param {*} [options] Override http request option.
830
+ * @throws {RequiredError}
831
+ */
832
+ createClubSettings: (clubSettings_1, ...args_1) => __awaiter(this, [clubSettings_1, ...args_1], void 0, function* (clubSettings, options = {}) {
833
+ // verify required parameter 'clubSettings' is not null or undefined
834
+ assertParamExists('createClubSettings', 'clubSettings', clubSettings);
835
+ const localVarPath = `/api/club-settings`;
836
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
837
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
838
+ let baseOptions;
839
+ if (configuration) {
840
+ baseOptions = configuration.baseOptions;
841
+ }
842
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
843
+ const localVarHeaderParameter = {};
844
+ const localVarQueryParameter = {};
845
+ // authentication bearerAuth required
846
+ // http bearer authentication required
847
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
848
+ localVarHeaderParameter['Content-Type'] = 'application/json';
849
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
850
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
851
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
852
+ localVarRequestOptions.data = serializeDataIfNeeded(clubSettings, localVarRequestOptions, configuration);
853
+ return {
854
+ url: toPathString(localVarUrlObj),
855
+ options: localVarRequestOptions,
856
+ };
857
+ }),
858
+ /**
859
+ *
860
+ * @summary Supprime les paramètres d’un club
861
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
862
+ * @param {*} [options] Override http request option.
863
+ * @throws {RequiredError}
864
+ */
865
+ deleteClubSettings: (getClubSettingsRequest_1, ...args_1) => __awaiter(this, [getClubSettingsRequest_1, ...args_1], void 0, function* (getClubSettingsRequest, options = {}) {
866
+ // verify required parameter 'getClubSettingsRequest' is not null or undefined
867
+ assertParamExists('deleteClubSettings', 'getClubSettingsRequest', getClubSettingsRequest);
868
+ const localVarPath = `/api/club-settings`;
869
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
870
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
871
+ let baseOptions;
872
+ if (configuration) {
873
+ baseOptions = configuration.baseOptions;
874
+ }
875
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
876
+ const localVarHeaderParameter = {};
877
+ const localVarQueryParameter = {};
878
+ // authentication bearerAuth required
879
+ // http bearer authentication required
880
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
881
+ localVarHeaderParameter['Content-Type'] = 'application/json';
882
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
883
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
884
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
885
+ localVarRequestOptions.data = serializeDataIfNeeded(getClubSettingsRequest, localVarRequestOptions, configuration);
886
+ return {
887
+ url: toPathString(localVarUrlObj),
888
+ options: localVarRequestOptions,
889
+ };
890
+ }),
891
+ /**
892
+ *
893
+ * @summary Récupère les paramètres d’un club
894
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
895
+ * @param {*} [options] Override http request option.
896
+ * @throws {RequiredError}
897
+ */
898
+ getClubSettings: (getClubSettingsRequest_1, ...args_1) => __awaiter(this, [getClubSettingsRequest_1, ...args_1], void 0, function* (getClubSettingsRequest, options = {}) {
899
+ // verify required parameter 'getClubSettingsRequest' is not null or undefined
900
+ assertParamExists('getClubSettings', 'getClubSettingsRequest', getClubSettingsRequest);
901
+ const localVarPath = `/api/club-settings`;
902
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
903
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
904
+ let baseOptions;
905
+ if (configuration) {
906
+ baseOptions = configuration.baseOptions;
907
+ }
908
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
909
+ const localVarHeaderParameter = {};
910
+ const localVarQueryParameter = {};
911
+ // authentication bearerAuth required
912
+ // http bearer authentication required
913
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
914
+ localVarHeaderParameter['Content-Type'] = 'application/json';
915
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
916
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
917
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
918
+ localVarRequestOptions.data = serializeDataIfNeeded(getClubSettingsRequest, localVarRequestOptions, configuration);
919
+ return {
920
+ url: toPathString(localVarUrlObj),
921
+ options: localVarRequestOptions,
922
+ };
923
+ }),
924
+ /**
925
+ *
926
+ * @summary Met à jour les paramètres d’un club
927
+ * @param {ClubSettings} clubSettings
928
+ * @param {*} [options] Override http request option.
929
+ * @throws {RequiredError}
930
+ */
931
+ updateClubSettings: (clubSettings_1, ...args_1) => __awaiter(this, [clubSettings_1, ...args_1], void 0, function* (clubSettings, options = {}) {
932
+ // verify required parameter 'clubSettings' is not null or undefined
933
+ assertParamExists('updateClubSettings', 'clubSettings', clubSettings);
934
+ const localVarPath = `/api/club-settings`;
935
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
936
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
937
+ let baseOptions;
938
+ if (configuration) {
939
+ baseOptions = configuration.baseOptions;
940
+ }
941
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
942
+ const localVarHeaderParameter = {};
943
+ const localVarQueryParameter = {};
944
+ // authentication bearerAuth required
945
+ // http bearer authentication required
946
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
947
+ localVarHeaderParameter['Content-Type'] = 'application/json';
948
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
949
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
950
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
951
+ localVarRequestOptions.data = serializeDataIfNeeded(clubSettings, localVarRequestOptions, configuration);
952
+ return {
953
+ url: toPathString(localVarUrlObj),
954
+ options: localVarRequestOptions,
955
+ };
956
+ }),
957
+ };
958
+ };
959
+ /**
960
+ * ClubSettingsApi - functional programming interface
961
+ * @export
962
+ */
963
+ export const ClubSettingsApiFp = function (configuration) {
964
+ const localVarAxiosParamCreator = ClubSettingsApiAxiosParamCreator(configuration);
965
+ return {
966
+ /**
967
+ *
968
+ * @summary Crée les paramètres d’un club
969
+ * @param {ClubSettings} clubSettings
970
+ * @param {*} [options] Override http request option.
971
+ * @throws {RequiredError}
972
+ */
973
+ createClubSettings(clubSettings, options) {
974
+ return __awaiter(this, void 0, void 0, function* () {
975
+ var _a, _b, _c;
976
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClubSettings(clubSettings, options);
977
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
978
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSettingsApi.createClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
979
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
980
+ });
981
+ },
982
+ /**
983
+ *
984
+ * @summary Supprime les paramètres d’un club
985
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
986
+ * @param {*} [options] Override http request option.
987
+ * @throws {RequiredError}
988
+ */
989
+ deleteClubSettings(getClubSettingsRequest, options) {
990
+ return __awaiter(this, void 0, void 0, function* () {
991
+ var _a, _b, _c;
992
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClubSettings(getClubSettingsRequest, options);
993
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
994
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSettingsApi.deleteClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
995
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
996
+ });
997
+ },
998
+ /**
999
+ *
1000
+ * @summary Récupère les paramètres d’un club
1001
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ getClubSettings(getClubSettingsRequest, options) {
1006
+ return __awaiter(this, void 0, void 0, function* () {
1007
+ var _a, _b, _c;
1008
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubSettings(getClubSettingsRequest, options);
1009
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1010
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSettingsApi.getClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1011
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1012
+ });
1013
+ },
1014
+ /**
1015
+ *
1016
+ * @summary Met à jour les paramètres d’un club
1017
+ * @param {ClubSettings} clubSettings
1018
+ * @param {*} [options] Override http request option.
1019
+ * @throws {RequiredError}
1020
+ */
1021
+ updateClubSettings(clubSettings, options) {
1022
+ return __awaiter(this, void 0, void 0, function* () {
1023
+ var _a, _b, _c;
1024
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClubSettings(clubSettings, options);
1025
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1026
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSettingsApi.updateClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1027
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1028
+ });
1029
+ },
1030
+ };
1031
+ };
1032
+ /**
1033
+ * ClubSettingsApi - factory interface
1034
+ * @export
1035
+ */
1036
+ export const ClubSettingsApiFactory = function (configuration, basePath, axios) {
1037
+ const localVarFp = ClubSettingsApiFp(configuration);
1038
+ return {
1039
+ /**
1040
+ *
1041
+ * @summary Crée les paramètres d’un club
1042
+ * @param {ClubSettingsApiCreateClubSettingsRequest} requestParameters Request parameters.
1043
+ * @param {*} [options] Override http request option.
1044
+ * @throws {RequiredError}
1045
+ */
1046
+ createClubSettings(requestParameters, options) {
1047
+ return localVarFp.createClubSettings(requestParameters.clubSettings, options).then((request) => request(axios, basePath));
1048
+ },
1049
+ /**
1050
+ *
1051
+ * @summary Supprime les paramètres d’un club
1052
+ * @param {ClubSettingsApiDeleteClubSettingsRequest} requestParameters Request parameters.
1053
+ * @param {*} [options] Override http request option.
1054
+ * @throws {RequiredError}
1055
+ */
1056
+ deleteClubSettings(requestParameters, options) {
1057
+ return localVarFp.deleteClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(axios, basePath));
1058
+ },
1059
+ /**
1060
+ *
1061
+ * @summary Récupère les paramètres d’un club
1062
+ * @param {ClubSettingsApiGetClubSettingsRequest} requestParameters Request parameters.
1063
+ * @param {*} [options] Override http request option.
1064
+ * @throws {RequiredError}
1065
+ */
1066
+ getClubSettings(requestParameters, options) {
1067
+ return localVarFp.getClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(axios, basePath));
1068
+ },
1069
+ /**
1070
+ *
1071
+ * @summary Met à jour les paramètres d’un club
1072
+ * @param {ClubSettingsApiUpdateClubSettingsRequest} requestParameters Request parameters.
1073
+ * @param {*} [options] Override http request option.
1074
+ * @throws {RequiredError}
1075
+ */
1076
+ updateClubSettings(requestParameters, options) {
1077
+ return localVarFp.updateClubSettings(requestParameters.clubSettings, options).then((request) => request(axios, basePath));
1078
+ },
1079
+ };
1080
+ };
1081
+ /**
1082
+ * ClubSettingsApi - object-oriented interface
1083
+ * @export
1084
+ * @class ClubSettingsApi
1085
+ * @extends {BaseAPI}
1086
+ */
1087
+ export class ClubSettingsApi extends BaseAPI {
1088
+ /**
1089
+ *
1090
+ * @summary Crée les paramètres d’un club
1091
+ * @param {ClubSettingsApiCreateClubSettingsRequest} requestParameters Request parameters.
1092
+ * @param {*} [options] Override http request option.
1093
+ * @throws {RequiredError}
1094
+ * @memberof ClubSettingsApi
1095
+ */
1096
+ createClubSettings(requestParameters, options) {
1097
+ return ClubSettingsApiFp(this.configuration).createClubSettings(requestParameters.clubSettings, options).then((request) => request(this.axios, this.basePath));
1098
+ }
1099
+ /**
1100
+ *
1101
+ * @summary Supprime les paramètres d’un club
1102
+ * @param {ClubSettingsApiDeleteClubSettingsRequest} requestParameters Request parameters.
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ * @memberof ClubSettingsApi
1106
+ */
1107
+ deleteClubSettings(requestParameters, options) {
1108
+ return ClubSettingsApiFp(this.configuration).deleteClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(this.axios, this.basePath));
1109
+ }
1110
+ /**
1111
+ *
1112
+ * @summary Récupère les paramètres d’un club
1113
+ * @param {ClubSettingsApiGetClubSettingsRequest} requestParameters Request parameters.
1114
+ * @param {*} [options] Override http request option.
1115
+ * @throws {RequiredError}
1116
+ * @memberof ClubSettingsApi
1117
+ */
1118
+ getClubSettings(requestParameters, options) {
1119
+ return ClubSettingsApiFp(this.configuration).getClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(this.axios, this.basePath));
1120
+ }
1121
+ /**
1122
+ *
1123
+ * @summary Met à jour les paramètres d’un club
1124
+ * @param {ClubSettingsApiUpdateClubSettingsRequest} requestParameters Request parameters.
1125
+ * @param {*} [options] Override http request option.
1126
+ * @throws {RequiredError}
1127
+ * @memberof ClubSettingsApi
1128
+ */
1129
+ updateClubSettings(requestParameters, options) {
1130
+ return ClubSettingsApiFp(this.configuration).updateClubSettings(requestParameters.clubSettings, options).then((request) => request(this.axios, this.basePath));
1131
+ }
1132
+ }
1133
+ /**
1134
+ * ClubSlotsApi - axios parameter creator
1135
+ * @export
1136
+ */
1137
+ export const ClubSlotsApiAxiosParamCreator = function (configuration) {
1138
+ return {
1139
+ /**
1140
+ *
1141
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1142
+ * @param {string} id ID du club
1143
+ * @param {string} start Date de début (format ISO)
1144
+ * @param {string} end Date de fin (format ISO)
1145
+ * @param {*} [options] Override http request option.
1146
+ * @throws {RequiredError}
1147
+ */
1148
+ deleteSlotsByClubInRange: (id_1, start_1, end_1, ...args_1) => __awaiter(this, [id_1, start_1, end_1, ...args_1], void 0, function* (id, start, end, options = {}) {
1149
+ // verify required parameter 'id' is not null or undefined
1150
+ assertParamExists('deleteSlotsByClubInRange', 'id', id);
1151
+ // verify required parameter 'start' is not null or undefined
1152
+ assertParamExists('deleteSlotsByClubInRange', 'start', start);
1153
+ // verify required parameter 'end' is not null or undefined
1154
+ assertParamExists('deleteSlotsByClubInRange', 'end', end);
1155
+ const localVarPath = `/api/clubs/{id}/slots`
1156
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1157
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1158
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1159
+ let baseOptions;
1160
+ if (configuration) {
1161
+ baseOptions = configuration.baseOptions;
1162
+ }
1163
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1164
+ const localVarHeaderParameter = {};
1165
+ const localVarQueryParameter = {};
1166
+ // authentication bearerAuth required
1167
+ // http bearer authentication required
1168
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1169
+ if (start !== undefined) {
1170
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1171
+ start.toISOString() :
1172
+ start;
1173
+ }
1174
+ if (end !== undefined) {
1175
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1176
+ end.toISOString() :
1177
+ end;
1178
+ }
1179
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1180
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1181
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1182
+ return {
1183
+ url: toPathString(localVarUrlObj),
1184
+ options: localVarRequestOptions,
1185
+ };
1186
+ }),
1187
+ /**
1188
+ *
1189
+ * @summary Générer les créneaux pour les 3 semaines à venir
1190
+ * @param {string} id ID du club
1191
+ * @param {*} [options] Override http request option.
1192
+ * @throws {RequiredError}
1193
+ */
1194
+ generateSlotsForNextThreeWeeks: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1195
+ // verify required parameter 'id' is not null or undefined
1196
+ assertParamExists('generateSlotsForNextThreeWeeks', 'id', id);
1197
+ const localVarPath = `/api/clubs/{id}/generate-slots`
1198
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1199
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1200
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1201
+ let baseOptions;
1202
+ if (configuration) {
1203
+ baseOptions = configuration.baseOptions;
1204
+ }
1205
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1206
+ const localVarHeaderParameter = {};
1207
+ const localVarQueryParameter = {};
1208
+ // authentication bearerAuth required
1209
+ // http bearer authentication required
1210
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1211
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1212
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1213
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1214
+ return {
1215
+ url: toPathString(localVarUrlObj),
1216
+ options: localVarRequestOptions,
1217
+ };
1218
+ }),
1219
+ /**
1220
+ *
1221
+ * @summary Obtenir tous les créneaux disponibles pour un club
1222
+ * @param {string} clubID ID du club
1223
+ * @param {*} [options] Override http request option.
1224
+ * @throws {RequiredError}
1225
+ */
1226
+ getAvailableSlotsByClub: (clubID_1, ...args_1) => __awaiter(this, [clubID_1, ...args_1], void 0, function* (clubID, options = {}) {
1227
+ // verify required parameter 'clubID' is not null or undefined
1228
+ assertParamExists('getAvailableSlotsByClub', 'clubID', clubID);
1229
+ const localVarPath = `/api/clubs/{clubID}/availableSlots/`
1230
+ .replace(`{${"clubID"}}`, encodeURIComponent(String(clubID)));
1231
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1232
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1233
+ let baseOptions;
1234
+ if (configuration) {
1235
+ baseOptions = configuration.baseOptions;
1236
+ }
1237
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1238
+ const localVarHeaderParameter = {};
1239
+ const localVarQueryParameter = {};
1240
+ // authentication bearerAuth required
1241
+ // http bearer authentication required
1242
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1243
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1244
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1245
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1246
+ return {
1247
+ url: toPathString(localVarUrlObj),
1248
+ options: localVarRequestOptions,
1249
+ };
1250
+ }),
1251
+ /**
1252
+ *
1253
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1254
+ * @param {string} id ID du club
1255
+ * @param {string} sportId ID du sport
1256
+ * @param {string} [start] Date de début (format ISO)
1257
+ * @param {string} [end] Date de fin (format ISO)
1258
+ * @param {*} [options] Override http request option.
1259
+ * @throws {RequiredError}
1260
+ */
1261
+ getAvailableSlotsBySports: (id_1, sportId_1, start_1, end_1, ...args_1) => __awaiter(this, [id_1, sportId_1, start_1, end_1, ...args_1], void 0, function* (id, sportId, start, end, options = {}) {
1262
+ // verify required parameter 'id' is not null or undefined
1263
+ assertParamExists('getAvailableSlotsBySports', 'id', id);
1264
+ // verify required parameter 'sportId' is not null or undefined
1265
+ assertParamExists('getAvailableSlotsBySports', 'sportId', sportId);
1266
+ const localVarPath = `/api/clubs/{id}/sports/{sportId}/slots`
1267
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1268
+ .replace(`{${"sportId"}}`, encodeURIComponent(String(sportId)));
1269
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1270
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1271
+ let baseOptions;
1272
+ if (configuration) {
1273
+ baseOptions = configuration.baseOptions;
1274
+ }
1275
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1276
+ const localVarHeaderParameter = {};
1277
+ const localVarQueryParameter = {};
1278
+ // authentication bearerAuth required
1279
+ // http bearer authentication required
1280
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1281
+ if (start !== undefined) {
1282
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1283
+ start.toISOString() :
1284
+ start;
1285
+ }
1286
+ if (end !== undefined) {
1287
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1288
+ end.toISOString() :
1289
+ end;
1290
+ }
1291
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1292
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1293
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1294
+ return {
1295
+ url: toPathString(localVarUrlObj),
1296
+ options: localVarRequestOptions,
1297
+ };
1298
+ }),
1299
+ /**
1300
+ *
1301
+ * @summary Obtenir les slots disponibles pour un jour donné
1302
+ * @param {string} id ID du club
1303
+ * @param {string} sportId ID du sport
1304
+ * @param {string} day Date du jour (format YYYY-MM-DD)
1305
+ * @param {*} [options] Override http request option.
1306
+ * @throws {RequiredError}
1307
+ */
1308
+ getAvailableSlotsBySportsAndDay: (id_1, sportId_1, day_1, ...args_1) => __awaiter(this, [id_1, sportId_1, day_1, ...args_1], void 0, function* (id, sportId, day, options = {}) {
1309
+ // verify required parameter 'id' is not null or undefined
1310
+ assertParamExists('getAvailableSlotsBySportsAndDay', 'id', id);
1311
+ // verify required parameter 'sportId' is not null or undefined
1312
+ assertParamExists('getAvailableSlotsBySportsAndDay', 'sportId', sportId);
1313
+ // verify required parameter 'day' is not null or undefined
1314
+ assertParamExists('getAvailableSlotsBySportsAndDay', 'day', day);
1315
+ const localVarPath = `/api/clubs/{id}/sports/{sportId}/slots/{day}`
1316
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1317
+ .replace(`{${"sportId"}}`, encodeURIComponent(String(sportId)))
1318
+ .replace(`{${"day"}}`, encodeURIComponent(String(day)));
1319
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1320
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1321
+ let baseOptions;
1322
+ if (configuration) {
1323
+ baseOptions = configuration.baseOptions;
1324
+ }
1325
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1326
+ const localVarHeaderParameter = {};
1327
+ const localVarQueryParameter = {};
1328
+ // authentication bearerAuth required
1329
+ // http bearer authentication required
1330
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1331
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1332
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1333
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1334
+ return {
1335
+ url: toPathString(localVarUrlObj),
1336
+ options: localVarRequestOptions,
1337
+ };
1338
+ }),
1339
+ /**
1340
+ *
1341
+ * @summary Récupérer tous les créneaux pour un club
1342
+ * @param {string} id ID du club
1343
+ * @param {string} [start] Date de début (format ISO)
1344
+ * @param {string} [end] Date de fin (format ISO)
1345
+ * @param {*} [options] Override http request option.
1346
+ * @throws {RequiredError}
1347
+ */
1348
+ getSlotsByClub: (id_1, start_1, end_1, ...args_1) => __awaiter(this, [id_1, start_1, end_1, ...args_1], void 0, function* (id, start, end, options = {}) {
1349
+ // verify required parameter 'id' is not null or undefined
1350
+ assertParamExists('getSlotsByClub', 'id', id);
1351
+ const localVarPath = `/api/clubs/{id}/slots`
1352
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1353
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1354
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1355
+ let baseOptions;
1356
+ if (configuration) {
1357
+ baseOptions = configuration.baseOptions;
1358
+ }
1359
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1360
+ const localVarHeaderParameter = {};
1361
+ const localVarQueryParameter = {};
1362
+ // authentication bearerAuth required
1363
+ // http bearer authentication required
1364
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1365
+ if (start !== undefined) {
1366
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1367
+ start.toISOString() :
1368
+ start;
1369
+ }
1370
+ if (end !== undefined) {
1371
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1372
+ end.toISOString() :
1373
+ end;
1374
+ }
1375
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1376
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1377
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1378
+ return {
1379
+ url: toPathString(localVarUrlObj),
1380
+ options: localVarRequestOptions,
1381
+ };
1382
+ }),
1383
+ };
1384
+ };
1385
+ /**
1386
+ * ClubSlotsApi - functional programming interface
1387
+ * @export
1388
+ */
1389
+ export const ClubSlotsApiFp = function (configuration) {
1390
+ const localVarAxiosParamCreator = ClubSlotsApiAxiosParamCreator(configuration);
1391
+ return {
1392
+ /**
1393
+ *
1394
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1395
+ * @param {string} id ID du club
1396
+ * @param {string} start Date de début (format ISO)
1397
+ * @param {string} end Date de fin (format ISO)
1398
+ * @param {*} [options] Override http request option.
1399
+ * @throws {RequiredError}
1400
+ */
1401
+ deleteSlotsByClubInRange(id, start, end, options) {
1402
+ return __awaiter(this, void 0, void 0, function* () {
1403
+ var _a, _b, _c;
1404
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSlotsByClubInRange(id, start, end, options);
1405
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1406
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.deleteSlotsByClubInRange']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1407
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1408
+ });
1409
+ },
1410
+ /**
1411
+ *
1412
+ * @summary Générer les créneaux pour les 3 semaines à venir
1413
+ * @param {string} id ID du club
1414
+ * @param {*} [options] Override http request option.
1415
+ * @throws {RequiredError}
1416
+ */
1417
+ generateSlotsForNextThreeWeeks(id, options) {
1418
+ return __awaiter(this, void 0, void 0, function* () {
1419
+ var _a, _b, _c;
1420
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateSlotsForNextThreeWeeks(id, options);
1421
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1422
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.generateSlotsForNextThreeWeeks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1423
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1424
+ });
1425
+ },
1426
+ /**
1427
+ *
1428
+ * @summary Obtenir tous les créneaux disponibles pour un club
1429
+ * @param {string} clubID ID du club
1430
+ * @param {*} [options] Override http request option.
1431
+ * @throws {RequiredError}
1432
+ */
1433
+ getAvailableSlotsByClub(clubID, options) {
1434
+ return __awaiter(this, void 0, void 0, function* () {
1435
+ var _a, _b, _c;
1436
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsByClub(clubID, options);
1437
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1438
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.getAvailableSlotsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1439
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1440
+ });
1441
+ },
1442
+ /**
1443
+ *
1444
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1445
+ * @param {string} id ID du club
1446
+ * @param {string} sportId ID du sport
1447
+ * @param {string} [start] Date de début (format ISO)
1448
+ * @param {string} [end] Date de fin (format ISO)
1449
+ * @param {*} [options] Override http request option.
1450
+ * @throws {RequiredError}
1451
+ */
1452
+ getAvailableSlotsBySports(id, sportId, start, end, options) {
1453
+ return __awaiter(this, void 0, void 0, function* () {
1454
+ var _a, _b, _c;
1455
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsBySports(id, sportId, start, end, options);
1456
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1457
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.getAvailableSlotsBySports']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1458
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1459
+ });
1460
+ },
1461
+ /**
1462
+ *
1463
+ * @summary Obtenir les slots disponibles pour un jour donné
1464
+ * @param {string} id ID du club
1465
+ * @param {string} sportId ID du sport
1466
+ * @param {string} day Date du jour (format YYYY-MM-DD)
1467
+ * @param {*} [options] Override http request option.
1468
+ * @throws {RequiredError}
1469
+ */
1470
+ getAvailableSlotsBySportsAndDay(id, sportId, day, options) {
1471
+ return __awaiter(this, void 0, void 0, function* () {
1472
+ var _a, _b, _c;
1473
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsBySportsAndDay(id, sportId, day, options);
1474
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1475
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.getAvailableSlotsBySportsAndDay']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1476
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1477
+ });
1478
+ },
1479
+ /**
1480
+ *
1481
+ * @summary Récupérer tous les créneaux pour un club
1482
+ * @param {string} id ID du club
1483
+ * @param {string} [start] Date de début (format ISO)
1484
+ * @param {string} [end] Date de fin (format ISO)
1485
+ * @param {*} [options] Override http request option.
1486
+ * @throws {RequiredError}
1487
+ */
1488
+ getSlotsByClub(id, start, end, options) {
1489
+ return __awaiter(this, void 0, void 0, function* () {
1490
+ var _a, _b, _c;
1491
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSlotsByClub(id, start, end, options);
1492
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1493
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSlotsApi.getSlotsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1494
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1495
+ });
1496
+ },
1497
+ };
1498
+ };
1499
+ /**
1500
+ * ClubSlotsApi - factory interface
1501
+ * @export
1502
+ */
1503
+ export const ClubSlotsApiFactory = function (configuration, basePath, axios) {
1504
+ const localVarFp = ClubSlotsApiFp(configuration);
1505
+ return {
1506
+ /**
1507
+ *
1508
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1509
+ * @param {ClubSlotsApiDeleteSlotsByClubInRangeRequest} requestParameters Request parameters.
1510
+ * @param {*} [options] Override http request option.
1511
+ * @throws {RequiredError}
1512
+ */
1513
+ deleteSlotsByClubInRange(requestParameters, options) {
1514
+ return localVarFp.deleteSlotsByClubInRange(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1515
+ },
1516
+ /**
1517
+ *
1518
+ * @summary Générer les créneaux pour les 3 semaines à venir
1519
+ * @param {ClubSlotsApiGenerateSlotsForNextThreeWeeksRequest} requestParameters Request parameters.
1520
+ * @param {*} [options] Override http request option.
1521
+ * @throws {RequiredError}
1522
+ */
1523
+ generateSlotsForNextThreeWeeks(requestParameters, options) {
1524
+ return localVarFp.generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(axios, basePath));
1525
+ },
1526
+ /**
1527
+ *
1528
+ * @summary Obtenir tous les créneaux disponibles pour un club
1529
+ * @param {ClubSlotsApiGetAvailableSlotsByClubRequest} requestParameters Request parameters.
1530
+ * @param {*} [options] Override http request option.
1531
+ * @throws {RequiredError}
1532
+ */
1533
+ getAvailableSlotsByClub(requestParameters, options) {
1534
+ return localVarFp.getAvailableSlotsByClub(requestParameters.clubID, options).then((request) => request(axios, basePath));
1535
+ },
1536
+ /**
1537
+ *
1538
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1539
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsRequest} requestParameters Request parameters.
1540
+ * @param {*} [options] Override http request option.
1541
+ * @throws {RequiredError}
1542
+ */
1543
+ getAvailableSlotsBySports(requestParameters, options) {
1544
+ return localVarFp.getAvailableSlotsBySports(requestParameters.id, requestParameters.sportId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1545
+ },
1546
+ /**
1547
+ *
1548
+ * @summary Obtenir les slots disponibles pour un jour donné
1549
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsAndDayRequest} requestParameters Request parameters.
1550
+ * @param {*} [options] Override http request option.
1551
+ * @throws {RequiredError}
1552
+ */
1553
+ getAvailableSlotsBySportsAndDay(requestParameters, options) {
1554
+ return localVarFp.getAvailableSlotsBySportsAndDay(requestParameters.id, requestParameters.sportId, requestParameters.day, options).then((request) => request(axios, basePath));
1555
+ },
1556
+ /**
1557
+ *
1558
+ * @summary Récupérer tous les créneaux pour un club
1559
+ * @param {ClubSlotsApiGetSlotsByClubRequest} requestParameters Request parameters.
1560
+ * @param {*} [options] Override http request option.
1561
+ * @throws {RequiredError}
1562
+ */
1563
+ getSlotsByClub(requestParameters, options) {
1564
+ return localVarFp.getSlotsByClub(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1565
+ },
1566
+ };
1567
+ };
1568
+ /**
1569
+ * ClubSlotsApi - object-oriented interface
1570
+ * @export
1571
+ * @class ClubSlotsApi
1572
+ * @extends {BaseAPI}
1573
+ */
1574
+ export class ClubSlotsApi extends BaseAPI {
1575
+ /**
1576
+ *
1577
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1578
+ * @param {ClubSlotsApiDeleteSlotsByClubInRangeRequest} requestParameters Request parameters.
1579
+ * @param {*} [options] Override http request option.
1580
+ * @throws {RequiredError}
1581
+ * @memberof ClubSlotsApi
1582
+ */
1583
+ deleteSlotsByClubInRange(requestParameters, options) {
1584
+ return ClubSlotsApiFp(this.configuration).deleteSlotsByClubInRange(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1585
+ }
1586
+ /**
1587
+ *
1588
+ * @summary Générer les créneaux pour les 3 semaines à venir
1589
+ * @param {ClubSlotsApiGenerateSlotsForNextThreeWeeksRequest} requestParameters Request parameters.
1590
+ * @param {*} [options] Override http request option.
1591
+ * @throws {RequiredError}
1592
+ * @memberof ClubSlotsApi
1593
+ */
1594
+ generateSlotsForNextThreeWeeks(requestParameters, options) {
1595
+ return ClubSlotsApiFp(this.configuration).generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
1596
+ }
1597
+ /**
1598
+ *
1599
+ * @summary Obtenir tous les créneaux disponibles pour un club
1600
+ * @param {ClubSlotsApiGetAvailableSlotsByClubRequest} requestParameters Request parameters.
1601
+ * @param {*} [options] Override http request option.
1602
+ * @throws {RequiredError}
1603
+ * @memberof ClubSlotsApi
1604
+ */
1605
+ getAvailableSlotsByClub(requestParameters, options) {
1606
+ return ClubSlotsApiFp(this.configuration).getAvailableSlotsByClub(requestParameters.clubID, options).then((request) => request(this.axios, this.basePath));
1607
+ }
1608
+ /**
1609
+ *
1610
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1611
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsRequest} requestParameters Request parameters.
1612
+ * @param {*} [options] Override http request option.
1613
+ * @throws {RequiredError}
1614
+ * @memberof ClubSlotsApi
1615
+ */
1616
+ getAvailableSlotsBySports(requestParameters, options) {
1617
+ return ClubSlotsApiFp(this.configuration).getAvailableSlotsBySports(requestParameters.id, requestParameters.sportId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1618
+ }
1619
+ /**
1620
+ *
1621
+ * @summary Obtenir les slots disponibles pour un jour donné
1622
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsAndDayRequest} requestParameters Request parameters.
1623
+ * @param {*} [options] Override http request option.
1624
+ * @throws {RequiredError}
1625
+ * @memberof ClubSlotsApi
1626
+ */
1627
+ getAvailableSlotsBySportsAndDay(requestParameters, options) {
1628
+ return ClubSlotsApiFp(this.configuration).getAvailableSlotsBySportsAndDay(requestParameters.id, requestParameters.sportId, requestParameters.day, options).then((request) => request(this.axios, this.basePath));
1629
+ }
1630
+ /**
1631
+ *
1632
+ * @summary Récupérer tous les créneaux pour un club
1633
+ * @param {ClubSlotsApiGetSlotsByClubRequest} requestParameters Request parameters.
1634
+ * @param {*} [options] Override http request option.
1635
+ * @throws {RequiredError}
1636
+ * @memberof ClubSlotsApi
1637
+ */
1638
+ getSlotsByClub(requestParameters, options) {
1639
+ return ClubSlotsApiFp(this.configuration).getSlotsByClub(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1640
+ }
1641
+ }
1642
+ /**
1643
+ * ClubSportsApi - axios parameter creator
1644
+ * @export
1645
+ */
1646
+ export const ClubSportsApiAxiosParamCreator = function (configuration) {
1647
+ return {
1648
+ /**
1649
+ *
1650
+ * @summary Créer un sport pour un club
1651
+ * @param {string} id ID du club
1652
+ * @param {CreateSportRequest} createSportRequest
1653
+ * @param {*} [options] Override http request option.
1654
+ * @throws {RequiredError}
1655
+ */
1656
+ createSportForClub: (id_1, createSportRequest_1, ...args_1) => __awaiter(this, [id_1, createSportRequest_1, ...args_1], void 0, function* (id, createSportRequest, options = {}) {
1657
+ // verify required parameter 'id' is not null or undefined
1658
+ assertParamExists('createSportForClub', 'id', id);
1659
+ // verify required parameter 'createSportRequest' is not null or undefined
1660
+ assertParamExists('createSportForClub', 'createSportRequest', createSportRequest);
1661
+ const localVarPath = `/api/clubs/{id}/sports`
1662
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1663
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1664
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1665
+ let baseOptions;
1666
+ if (configuration) {
1667
+ baseOptions = configuration.baseOptions;
1668
+ }
1669
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1670
+ const localVarHeaderParameter = {};
1671
+ const localVarQueryParameter = {};
1672
+ // authentication bearerAuth required
1673
+ // http bearer authentication required
1674
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1675
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1676
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1677
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1678
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1679
+ localVarRequestOptions.data = serializeDataIfNeeded(createSportRequest, localVarRequestOptions, configuration);
1680
+ return {
1681
+ url: toPathString(localVarUrlObj),
1682
+ options: localVarRequestOptions,
1683
+ };
1684
+ }),
1685
+ /**
1686
+ *
1687
+ * @summary Récupérer tous les sports pour un club
1688
+ * @param {string} id ID du club
1689
+ * @param {*} [options] Override http request option.
1690
+ * @throws {RequiredError}
1691
+ */
1692
+ getSportsByClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1693
+ // verify required parameter 'id' is not null or undefined
1694
+ assertParamExists('getSportsByClub', 'id', id);
1695
+ const localVarPath = `/api/clubs/{id}/sports`
1696
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1697
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1698
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1699
+ let baseOptions;
1700
+ if (configuration) {
1701
+ baseOptions = configuration.baseOptions;
1702
+ }
1703
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1704
+ const localVarHeaderParameter = {};
1705
+ const localVarQueryParameter = {};
1706
+ // authentication bearerAuth required
1707
+ // http bearer authentication required
1708
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1709
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1710
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1711
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1712
+ return {
1713
+ url: toPathString(localVarUrlObj),
1714
+ options: localVarRequestOptions,
1715
+ };
1716
+ }),
1717
+ };
1718
+ };
1719
+ /**
1720
+ * ClubSportsApi - functional programming interface
1721
+ * @export
1722
+ */
1723
+ export const ClubSportsApiFp = function (configuration) {
1724
+ const localVarAxiosParamCreator = ClubSportsApiAxiosParamCreator(configuration);
1725
+ return {
1726
+ /**
1727
+ *
1728
+ * @summary Créer un sport pour un club
1729
+ * @param {string} id ID du club
1730
+ * @param {CreateSportRequest} createSportRequest
1731
+ * @param {*} [options] Override http request option.
1732
+ * @throws {RequiredError}
1733
+ */
1734
+ createSportForClub(id, createSportRequest, options) {
1735
+ return __awaiter(this, void 0, void 0, function* () {
1736
+ var _a, _b, _c;
1737
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSportForClub(id, createSportRequest, options);
1738
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1739
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSportsApi.createSportForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1740
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1741
+ });
1742
+ },
1743
+ /**
1744
+ *
1745
+ * @summary Récupérer tous les sports pour un club
1746
+ * @param {string} id ID du club
1747
+ * @param {*} [options] Override http request option.
1748
+ * @throws {RequiredError}
1749
+ */
1750
+ getSportsByClub(id, options) {
1751
+ return __awaiter(this, void 0, void 0, function* () {
1752
+ var _a, _b, _c;
1753
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSportsByClub(id, options);
1754
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1755
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSportsApi.getSportsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1756
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1757
+ });
1758
+ },
1759
+ };
1760
+ };
1761
+ /**
1762
+ * ClubSportsApi - factory interface
1763
+ * @export
1764
+ */
1765
+ export const ClubSportsApiFactory = function (configuration, basePath, axios) {
1766
+ const localVarFp = ClubSportsApiFp(configuration);
1767
+ return {
1768
+ /**
1769
+ *
1770
+ * @summary Créer un sport pour un club
1771
+ * @param {ClubSportsApiCreateSportForClubRequest} requestParameters Request parameters.
1772
+ * @param {*} [options] Override http request option.
1773
+ * @throws {RequiredError}
1774
+ */
1775
+ createSportForClub(requestParameters, options) {
1776
+ return localVarFp.createSportForClub(requestParameters.id, requestParameters.createSportRequest, options).then((request) => request(axios, basePath));
1777
+ },
1778
+ /**
1779
+ *
1780
+ * @summary Récupérer tous les sports pour un club
1781
+ * @param {ClubSportsApiGetSportsByClubRequest} requestParameters Request parameters.
1782
+ * @param {*} [options] Override http request option.
1783
+ * @throws {RequiredError}
1784
+ */
1785
+ getSportsByClub(requestParameters, options) {
1786
+ return localVarFp.getSportsByClub(requestParameters.id, options).then((request) => request(axios, basePath));
1787
+ },
1788
+ };
1789
+ };
1790
+ /**
1791
+ * ClubSportsApi - object-oriented interface
1792
+ * @export
1793
+ * @class ClubSportsApi
1794
+ * @extends {BaseAPI}
1795
+ */
1796
+ export class ClubSportsApi extends BaseAPI {
1797
+ /**
1798
+ *
1799
+ * @summary Créer un sport pour un club
1800
+ * @param {ClubSportsApiCreateSportForClubRequest} requestParameters Request parameters.
1801
+ * @param {*} [options] Override http request option.
1802
+ * @throws {RequiredError}
1803
+ * @memberof ClubSportsApi
1804
+ */
1805
+ createSportForClub(requestParameters, options) {
1806
+ return ClubSportsApiFp(this.configuration).createSportForClub(requestParameters.id, requestParameters.createSportRequest, options).then((request) => request(this.axios, this.basePath));
1807
+ }
1808
+ /**
1809
+ *
1810
+ * @summary Récupérer tous les sports pour un club
1811
+ * @param {ClubSportsApiGetSportsByClubRequest} requestParameters Request parameters.
1812
+ * @param {*} [options] Override http request option.
1813
+ * @throws {RequiredError}
1814
+ * @memberof ClubSportsApi
1815
+ */
1816
+ getSportsByClub(requestParameters, options) {
1817
+ return ClubSportsApiFp(this.configuration).getSportsByClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
1818
+ }
1819
+ }
1820
+ /**
1821
+ * ClubSubscriptionsApi - axios parameter creator
1822
+ * @export
1823
+ */
1824
+ export const ClubSubscriptionsApiAxiosParamCreator = function (configuration) {
1825
+ return {
1826
+ /**
1827
+ *
1828
+ * @summary Archiver un prix
1829
+ * @param {string} id ID du club
1830
+ * @param {string} priceId ID du prix Stripe
1831
+ * @param {*} [options] Override http request option.
1832
+ * @throws {RequiredError}
1833
+ */
1834
+ archivePriceForSubscriptionPlan: (id_1, priceId_1, ...args_1) => __awaiter(this, [id_1, priceId_1, ...args_1], void 0, function* (id, priceId, options = {}) {
1835
+ // verify required parameter 'id' is not null or undefined
1836
+ assertParamExists('archivePriceForSubscriptionPlan', 'id', id);
1837
+ // verify required parameter 'priceId' is not null or undefined
1838
+ assertParamExists('archivePriceForSubscriptionPlan', 'priceId', priceId);
1839
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}/archive-price`
1840
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1841
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
1842
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1843
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1844
+ let baseOptions;
1845
+ if (configuration) {
1846
+ baseOptions = configuration.baseOptions;
1847
+ }
1848
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1849
+ const localVarHeaderParameter = {};
1850
+ const localVarQueryParameter = {};
1851
+ // authentication bearerAuth required
1852
+ // http bearer authentication required
1853
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1854
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1855
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1856
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1857
+ return {
1858
+ url: toPathString(localVarUrlObj),
1859
+ options: localVarRequestOptions,
1860
+ };
1861
+ }),
1862
+ /**
1863
+ *
1864
+ * @summary Créer un nouveau prix pour un plan
1865
+ * @param {string} id ID du club
1866
+ * @param {string} productId ID du produit Stripe
1867
+ * @param {CreatePriceRequest} createPriceRequest
1868
+ * @param {*} [options] Override http request option.
1869
+ * @throws {RequiredError}
1870
+ */
1871
+ createPriceForSubscriptionPlan: (id_1, productId_1, createPriceRequest_1, ...args_1) => __awaiter(this, [id_1, productId_1, createPriceRequest_1, ...args_1], void 0, function* (id, productId, createPriceRequest, options = {}) {
1872
+ // verify required parameter 'id' is not null or undefined
1873
+ assertParamExists('createPriceForSubscriptionPlan', 'id', id);
1874
+ // verify required parameter 'productId' is not null or undefined
1875
+ assertParamExists('createPriceForSubscriptionPlan', 'productId', productId);
1876
+ // verify required parameter 'createPriceRequest' is not null or undefined
1877
+ assertParamExists('createPriceForSubscriptionPlan', 'createPriceRequest', createPriceRequest);
1878
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}/prices`
1879
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1880
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1881
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1882
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1883
+ let baseOptions;
1884
+ if (configuration) {
1885
+ baseOptions = configuration.baseOptions;
1886
+ }
1887
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1888
+ const localVarHeaderParameter = {};
1889
+ const localVarQueryParameter = {};
1890
+ // authentication bearerAuth required
1891
+ // http bearer authentication required
1892
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1893
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1894
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1895
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1896
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1897
+ localVarRequestOptions.data = serializeDataIfNeeded(createPriceRequest, localVarRequestOptions, configuration);
1898
+ return {
1899
+ url: toPathString(localVarUrlObj),
1900
+ options: localVarRequestOptions,
1901
+ };
1902
+ }),
1903
+ /**
1904
+ *
1905
+ * @summary Créer un plan d\'abonnement pour un club
1906
+ * @param {string} id ID du club
1907
+ * @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
1908
+ * @param {*} [options] Override http request option.
1909
+ * @throws {RequiredError}
1910
+ */
1911
+ createSubscriptionPlanForClub: (id_1, createSubscriptionPlanRequest_1, ...args_1) => __awaiter(this, [id_1, createSubscriptionPlanRequest_1, ...args_1], void 0, function* (id, createSubscriptionPlanRequest, options = {}) {
1912
+ // verify required parameter 'id' is not null or undefined
1913
+ assertParamExists('createSubscriptionPlanForClub', 'id', id);
1914
+ // verify required parameter 'createSubscriptionPlanRequest' is not null or undefined
1915
+ assertParamExists('createSubscriptionPlanForClub', 'createSubscriptionPlanRequest', createSubscriptionPlanRequest);
1916
+ const localVarPath = `/api/clubs/{id}/subscription-plans`
1917
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1918
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1919
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1920
+ let baseOptions;
1921
+ if (configuration) {
1922
+ baseOptions = configuration.baseOptions;
1923
+ }
1924
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1925
+ const localVarHeaderParameter = {};
1926
+ const localVarQueryParameter = {};
1927
+ // authentication bearerAuth required
1928
+ // http bearer authentication required
1929
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1930
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1931
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1932
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1933
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1934
+ localVarRequestOptions.data = serializeDataIfNeeded(createSubscriptionPlanRequest, localVarRequestOptions, configuration);
1935
+ return {
1936
+ url: toPathString(localVarUrlObj),
1937
+ options: localVarRequestOptions,
1938
+ };
1939
+ }),
1940
+ /**
1941
+ *
1942
+ * @summary Supprimer un plan d\'abonnement pour un club
1943
+ * @param {string} id ID du club
1944
+ * @param {string} productId ID du produit Stripe
1945
+ * @param {*} [options] Override http request option.
1946
+ * @throws {RequiredError}
1947
+ */
1948
+ deleteSubscriptionPlanForClub: (id_1, productId_1, ...args_1) => __awaiter(this, [id_1, productId_1, ...args_1], void 0, function* (id, productId, options = {}) {
1949
+ // verify required parameter 'id' is not null or undefined
1950
+ assertParamExists('deleteSubscriptionPlanForClub', 'id', id);
1951
+ // verify required parameter 'productId' is not null or undefined
1952
+ assertParamExists('deleteSubscriptionPlanForClub', 'productId', productId);
1953
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}`
1954
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1955
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1956
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1957
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1958
+ let baseOptions;
1959
+ if (configuration) {
1960
+ baseOptions = configuration.baseOptions;
1961
+ }
1962
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1963
+ const localVarHeaderParameter = {};
1964
+ const localVarQueryParameter = {};
1965
+ // authentication bearerAuth required
1966
+ // http bearer authentication required
1967
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1968
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1969
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1970
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1971
+ return {
1972
+ url: toPathString(localVarUrlObj),
1973
+ options: localVarRequestOptions,
1974
+ };
1975
+ }),
1976
+ /**
1977
+ *
1978
+ * @summary Réactiver un plan d\'abonnement
1979
+ * @param {string} id ID du club
1980
+ * @param {string} productId ID du produit Stripe
1981
+ * @param {*} [options] Override http request option.
1982
+ * @throws {RequiredError}
1983
+ */
1984
+ restoreSubscriptionPlanForClub: (id_1, productId_1, ...args_1) => __awaiter(this, [id_1, productId_1, ...args_1], void 0, function* (id, productId, options = {}) {
1985
+ // verify required parameter 'id' is not null or undefined
1986
+ assertParamExists('restoreSubscriptionPlanForClub', 'id', id);
1987
+ // verify required parameter 'productId' is not null or undefined
1988
+ assertParamExists('restoreSubscriptionPlanForClub', 'productId', productId);
1989
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}/restore`
1990
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1991
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1992
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1993
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1994
+ let baseOptions;
1995
+ if (configuration) {
1996
+ baseOptions = configuration.baseOptions;
1997
+ }
1998
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1999
+ const localVarHeaderParameter = {};
2000
+ const localVarQueryParameter = {};
2001
+ // authentication bearerAuth required
2002
+ // http bearer authentication required
2003
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2004
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2005
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2006
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2007
+ return {
2008
+ url: toPathString(localVarUrlObj),
2009
+ options: localVarRequestOptions,
2010
+ };
2011
+ }),
2012
+ /**
2013
+ *
2014
+ * @summary Réactiver un prix
2015
+ * @param {string} id ID du club
2016
+ * @param {string} priceId ID du prix Stripe
2017
+ * @param {*} [options] Override http request option.
2018
+ * @throws {RequiredError}
2019
+ */
2020
+ restoreSubscriptionPriceForClub: (id_1, priceId_1, ...args_1) => __awaiter(this, [id_1, priceId_1, ...args_1], void 0, function* (id, priceId, options = {}) {
2021
+ // verify required parameter 'id' is not null or undefined
2022
+ assertParamExists('restoreSubscriptionPriceForClub', 'id', id);
2023
+ // verify required parameter 'priceId' is not null or undefined
2024
+ assertParamExists('restoreSubscriptionPriceForClub', 'priceId', priceId);
2025
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}/restore-price`
2026
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2027
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
2028
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2029
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2030
+ let baseOptions;
2031
+ if (configuration) {
2032
+ baseOptions = configuration.baseOptions;
2033
+ }
2034
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2035
+ const localVarHeaderParameter = {};
2036
+ const localVarQueryParameter = {};
2037
+ // authentication bearerAuth required
2038
+ // http bearer authentication required
2039
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2040
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2041
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2042
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2043
+ return {
2044
+ url: toPathString(localVarUrlObj),
2045
+ options: localVarRequestOptions,
2046
+ };
2047
+ }),
2048
+ /**
2049
+ *
2050
+ * @summary Mettre à jour un plan d\'abonnement
2051
+ * @param {string} id ID du club
2052
+ * @param {string} priceId ID du prix Stripe
2053
+ * @param {UpdateSubscriptionPlanRequest} updateSubscriptionPlanRequest
2054
+ * @param {*} [options] Override http request option.
2055
+ * @throws {RequiredError}
2056
+ */
2057
+ updateSubscriptionPlanForClub: (id_1, priceId_1, updateSubscriptionPlanRequest_1, ...args_1) => __awaiter(this, [id_1, priceId_1, updateSubscriptionPlanRequest_1, ...args_1], void 0, function* (id, priceId, updateSubscriptionPlanRequest, options = {}) {
2058
+ // verify required parameter 'id' is not null or undefined
2059
+ assertParamExists('updateSubscriptionPlanForClub', 'id', id);
2060
+ // verify required parameter 'priceId' is not null or undefined
2061
+ assertParamExists('updateSubscriptionPlanForClub', 'priceId', priceId);
2062
+ // verify required parameter 'updateSubscriptionPlanRequest' is not null or undefined
2063
+ assertParamExists('updateSubscriptionPlanForClub', 'updateSubscriptionPlanRequest', updateSubscriptionPlanRequest);
2064
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}`
2065
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2066
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
2067
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2068
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2069
+ let baseOptions;
2070
+ if (configuration) {
2071
+ baseOptions = configuration.baseOptions;
2072
+ }
2073
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2074
+ const localVarHeaderParameter = {};
2075
+ const localVarQueryParameter = {};
2076
+ // authentication bearerAuth required
2077
+ // http bearer authentication required
2078
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2079
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2080
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2081
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2082
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2083
+ localVarRequestOptions.data = serializeDataIfNeeded(updateSubscriptionPlanRequest, localVarRequestOptions, configuration);
2084
+ return {
2085
+ url: toPathString(localVarUrlObj),
2086
+ options: localVarRequestOptions,
2087
+ };
2088
+ }),
2089
+ };
2090
+ };
2091
+ /**
2092
+ * ClubSubscriptionsApi - functional programming interface
2093
+ * @export
2094
+ */
2095
+ export const ClubSubscriptionsApiFp = function (configuration) {
2096
+ const localVarAxiosParamCreator = ClubSubscriptionsApiAxiosParamCreator(configuration);
2097
+ return {
2098
+ /**
2099
+ *
2100
+ * @summary Archiver un prix
2101
+ * @param {string} id ID du club
2102
+ * @param {string} priceId ID du prix Stripe
2103
+ * @param {*} [options] Override http request option.
2104
+ * @throws {RequiredError}
2105
+ */
2106
+ archivePriceForSubscriptionPlan(id, priceId, options) {
2107
+ return __awaiter(this, void 0, void 0, function* () {
2108
+ var _a, _b, _c;
2109
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.archivePriceForSubscriptionPlan(id, priceId, options);
2110
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2111
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.archivePriceForSubscriptionPlan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2112
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2113
+ });
2114
+ },
2115
+ /**
2116
+ *
2117
+ * @summary Créer un nouveau prix pour un plan
2118
+ * @param {string} id ID du club
2119
+ * @param {string} productId ID du produit Stripe
2120
+ * @param {CreatePriceRequest} createPriceRequest
2121
+ * @param {*} [options] Override http request option.
2122
+ * @throws {RequiredError}
2123
+ */
2124
+ createPriceForSubscriptionPlan(id, productId, createPriceRequest, options) {
2125
+ return __awaiter(this, void 0, void 0, function* () {
2126
+ var _a, _b, _c;
2127
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPriceForSubscriptionPlan(id, productId, createPriceRequest, options);
2128
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2129
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.createPriceForSubscriptionPlan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2130
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2131
+ });
2132
+ },
2133
+ /**
2134
+ *
2135
+ * @summary Créer un plan d\'abonnement pour un club
2136
+ * @param {string} id ID du club
2137
+ * @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
2138
+ * @param {*} [options] Override http request option.
2139
+ * @throws {RequiredError}
2140
+ */
2141
+ createSubscriptionPlanForClub(id, createSubscriptionPlanRequest, options) {
2142
+ return __awaiter(this, void 0, void 0, function* () {
2143
+ var _a, _b, _c;
2144
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSubscriptionPlanForClub(id, createSubscriptionPlanRequest, options);
2145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2146
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.createSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2147
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2148
+ });
2149
+ },
2150
+ /**
2151
+ *
2152
+ * @summary Supprimer un plan d\'abonnement pour un club
2153
+ * @param {string} id ID du club
2154
+ * @param {string} productId ID du produit Stripe
2155
+ * @param {*} [options] Override http request option.
2156
+ * @throws {RequiredError}
2157
+ */
2158
+ deleteSubscriptionPlanForClub(id, productId, options) {
2159
+ return __awaiter(this, void 0, void 0, function* () {
2160
+ var _a, _b, _c;
2161
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSubscriptionPlanForClub(id, productId, options);
2162
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2163
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.deleteSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2164
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2165
+ });
2166
+ },
2167
+ /**
2168
+ *
2169
+ * @summary Réactiver un plan d\'abonnement
2170
+ * @param {string} id ID du club
2171
+ * @param {string} productId ID du produit Stripe
2172
+ * @param {*} [options] Override http request option.
2173
+ * @throws {RequiredError}
2174
+ */
2175
+ restoreSubscriptionPlanForClub(id, productId, options) {
2176
+ return __awaiter(this, void 0, void 0, function* () {
2177
+ var _a, _b, _c;
2178
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreSubscriptionPlanForClub(id, productId, options);
2179
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2180
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.restoreSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2181
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2182
+ });
2183
+ },
2184
+ /**
2185
+ *
2186
+ * @summary Réactiver un prix
2187
+ * @param {string} id ID du club
2188
+ * @param {string} priceId ID du prix Stripe
2189
+ * @param {*} [options] Override http request option.
2190
+ * @throws {RequiredError}
2191
+ */
2192
+ restoreSubscriptionPriceForClub(id, priceId, options) {
2193
+ return __awaiter(this, void 0, void 0, function* () {
2194
+ var _a, _b, _c;
2195
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreSubscriptionPriceForClub(id, priceId, options);
2196
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2197
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.restoreSubscriptionPriceForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2198
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2199
+ });
2200
+ },
2201
+ /**
2202
+ *
2203
+ * @summary Mettre à jour un plan d\'abonnement
2204
+ * @param {string} id ID du club
2205
+ * @param {string} priceId ID du prix Stripe
2206
+ * @param {UpdateSubscriptionPlanRequest} updateSubscriptionPlanRequest
2207
+ * @param {*} [options] Override http request option.
2208
+ * @throws {RequiredError}
2209
+ */
2210
+ updateSubscriptionPlanForClub(id, priceId, updateSubscriptionPlanRequest, options) {
2211
+ return __awaiter(this, void 0, void 0, function* () {
2212
+ var _a, _b, _c;
2213
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSubscriptionPlanForClub(id, priceId, updateSubscriptionPlanRequest, options);
2214
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2215
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubSubscriptionsApi.updateSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2216
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2217
+ });
2218
+ },
2219
+ };
2220
+ };
2221
+ /**
2222
+ * ClubSubscriptionsApi - factory interface
2223
+ * @export
2224
+ */
2225
+ export const ClubSubscriptionsApiFactory = function (configuration, basePath, axios) {
2226
+ const localVarFp = ClubSubscriptionsApiFp(configuration);
2227
+ return {
2228
+ /**
2229
+ *
2230
+ * @summary Archiver un prix
2231
+ * @param {ClubSubscriptionsApiArchivePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2232
+ * @param {*} [options] Override http request option.
2233
+ * @throws {RequiredError}
2234
+ */
2235
+ archivePriceForSubscriptionPlan(requestParameters, options) {
2236
+ return localVarFp.archivePriceForSubscriptionPlan(requestParameters.id, requestParameters.priceId, options).then((request) => request(axios, basePath));
2237
+ },
2238
+ /**
2239
+ *
2240
+ * @summary Créer un nouveau prix pour un plan
2241
+ * @param {ClubSubscriptionsApiCreatePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2242
+ * @param {*} [options] Override http request option.
2243
+ * @throws {RequiredError}
2244
+ */
2245
+ createPriceForSubscriptionPlan(requestParameters, options) {
2246
+ return localVarFp.createPriceForSubscriptionPlan(requestParameters.id, requestParameters.productId, requestParameters.createPriceRequest, options).then((request) => request(axios, basePath));
2247
+ },
2248
+ /**
2249
+ *
2250
+ * @summary Créer un plan d\'abonnement pour un club
2251
+ * @param {ClubSubscriptionsApiCreateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2252
+ * @param {*} [options] Override http request option.
2253
+ * @throws {RequiredError}
2254
+ */
2255
+ createSubscriptionPlanForClub(requestParameters, options) {
2256
+ return localVarFp.createSubscriptionPlanForClub(requestParameters.id, requestParameters.createSubscriptionPlanRequest, options).then((request) => request(axios, basePath));
2257
+ },
2258
+ /**
2259
+ *
2260
+ * @summary Supprimer un plan d\'abonnement pour un club
2261
+ * @param {ClubSubscriptionsApiDeleteSubscriptionPlanForClubRequest} requestParameters Request parameters.
2262
+ * @param {*} [options] Override http request option.
2263
+ * @throws {RequiredError}
2264
+ */
2265
+ deleteSubscriptionPlanForClub(requestParameters, options) {
2266
+ return localVarFp.deleteSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(axios, basePath));
2267
+ },
2268
+ /**
2269
+ *
2270
+ * @summary Réactiver un plan d\'abonnement
2271
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPlanForClubRequest} requestParameters Request parameters.
2272
+ * @param {*} [options] Override http request option.
2273
+ * @throws {RequiredError}
2274
+ */
2275
+ restoreSubscriptionPlanForClub(requestParameters, options) {
2276
+ return localVarFp.restoreSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(axios, basePath));
2277
+ },
2278
+ /**
2279
+ *
2280
+ * @summary Réactiver un prix
2281
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPriceForClubRequest} requestParameters Request parameters.
2282
+ * @param {*} [options] Override http request option.
2283
+ * @throws {RequiredError}
2284
+ */
2285
+ restoreSubscriptionPriceForClub(requestParameters, options) {
2286
+ return localVarFp.restoreSubscriptionPriceForClub(requestParameters.id, requestParameters.priceId, options).then((request) => request(axios, basePath));
2287
+ },
2288
+ /**
2289
+ *
2290
+ * @summary Mettre à jour un plan d\'abonnement
2291
+ * @param {ClubSubscriptionsApiUpdateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2292
+ * @param {*} [options] Override http request option.
2293
+ * @throws {RequiredError}
2294
+ */
2295
+ updateSubscriptionPlanForClub(requestParameters, options) {
2296
+ return localVarFp.updateSubscriptionPlanForClub(requestParameters.id, requestParameters.priceId, requestParameters.updateSubscriptionPlanRequest, options).then((request) => request(axios, basePath));
2297
+ },
2298
+ };
2299
+ };
2300
+ /**
2301
+ * ClubSubscriptionsApi - object-oriented interface
2302
+ * @export
2303
+ * @class ClubSubscriptionsApi
2304
+ * @extends {BaseAPI}
2305
+ */
2306
+ export class ClubSubscriptionsApi extends BaseAPI {
2307
+ /**
2308
+ *
2309
+ * @summary Archiver un prix
2310
+ * @param {ClubSubscriptionsApiArchivePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2311
+ * @param {*} [options] Override http request option.
2312
+ * @throws {RequiredError}
2313
+ * @memberof ClubSubscriptionsApi
2314
+ */
2315
+ archivePriceForSubscriptionPlan(requestParameters, options) {
2316
+ return ClubSubscriptionsApiFp(this.configuration).archivePriceForSubscriptionPlan(requestParameters.id, requestParameters.priceId, options).then((request) => request(this.axios, this.basePath));
2317
+ }
2318
+ /**
2319
+ *
2320
+ * @summary Créer un nouveau prix pour un plan
2321
+ * @param {ClubSubscriptionsApiCreatePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2322
+ * @param {*} [options] Override http request option.
2323
+ * @throws {RequiredError}
2324
+ * @memberof ClubSubscriptionsApi
2325
+ */
2326
+ createPriceForSubscriptionPlan(requestParameters, options) {
2327
+ return ClubSubscriptionsApiFp(this.configuration).createPriceForSubscriptionPlan(requestParameters.id, requestParameters.productId, requestParameters.createPriceRequest, options).then((request) => request(this.axios, this.basePath));
2328
+ }
2329
+ /**
2330
+ *
2331
+ * @summary Créer un plan d\'abonnement pour un club
2332
+ * @param {ClubSubscriptionsApiCreateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2333
+ * @param {*} [options] Override http request option.
2334
+ * @throws {RequiredError}
2335
+ * @memberof ClubSubscriptionsApi
2336
+ */
2337
+ createSubscriptionPlanForClub(requestParameters, options) {
2338
+ return ClubSubscriptionsApiFp(this.configuration).createSubscriptionPlanForClub(requestParameters.id, requestParameters.createSubscriptionPlanRequest, options).then((request) => request(this.axios, this.basePath));
2339
+ }
2340
+ /**
2341
+ *
2342
+ * @summary Supprimer un plan d\'abonnement pour un club
2343
+ * @param {ClubSubscriptionsApiDeleteSubscriptionPlanForClubRequest} requestParameters Request parameters.
2344
+ * @param {*} [options] Override http request option.
2345
+ * @throws {RequiredError}
2346
+ * @memberof ClubSubscriptionsApi
2347
+ */
2348
+ deleteSubscriptionPlanForClub(requestParameters, options) {
2349
+ return ClubSubscriptionsApiFp(this.configuration).deleteSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
2350
+ }
2351
+ /**
2352
+ *
2353
+ * @summary Réactiver un plan d\'abonnement
2354
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPlanForClubRequest} requestParameters Request parameters.
2355
+ * @param {*} [options] Override http request option.
2356
+ * @throws {RequiredError}
2357
+ * @memberof ClubSubscriptionsApi
2358
+ */
2359
+ restoreSubscriptionPlanForClub(requestParameters, options) {
2360
+ return ClubSubscriptionsApiFp(this.configuration).restoreSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
2361
+ }
2362
+ /**
2363
+ *
2364
+ * @summary Réactiver un prix
2365
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPriceForClubRequest} requestParameters Request parameters.
2366
+ * @param {*} [options] Override http request option.
2367
+ * @throws {RequiredError}
2368
+ * @memberof ClubSubscriptionsApi
2369
+ */
2370
+ restoreSubscriptionPriceForClub(requestParameters, options) {
2371
+ return ClubSubscriptionsApiFp(this.configuration).restoreSubscriptionPriceForClub(requestParameters.id, requestParameters.priceId, options).then((request) => request(this.axios, this.basePath));
2372
+ }
2373
+ /**
2374
+ *
2375
+ * @summary Mettre à jour un plan d\'abonnement
2376
+ * @param {ClubSubscriptionsApiUpdateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2377
+ * @param {*} [options] Override http request option.
2378
+ * @throws {RequiredError}
2379
+ * @memberof ClubSubscriptionsApi
2380
+ */
2381
+ updateSubscriptionPlanForClub(requestParameters, options) {
2382
+ return ClubSubscriptionsApiFp(this.configuration).updateSubscriptionPlanForClub(requestParameters.id, requestParameters.priceId, requestParameters.updateSubscriptionPlanRequest, options).then((request) => request(this.axios, this.basePath));
2383
+ }
2384
+ }
2385
+ /**
2386
+ * ClubsApi - axios parameter creator
2387
+ * @export
2388
+ */
2389
+ export const ClubsApiAxiosParamCreator = function (configuration) {
2390
+ return {
2391
+ /**
2392
+ *
2393
+ * @summary Ajouter un membre à un club
2394
+ * @param {string} id ID du club
2395
+ * @param {AddClubMemberRequest} addClubMemberRequest
2396
+ * @param {*} [options] Override http request option.
2397
+ * @throws {RequiredError}
2398
+ */
2399
+ addClubMember: (id_1, addClubMemberRequest_1, ...args_1) => __awaiter(this, [id_1, addClubMemberRequest_1, ...args_1], void 0, function* (id, addClubMemberRequest, options = {}) {
2400
+ // verify required parameter 'id' is not null or undefined
2401
+ assertParamExists('addClubMember', 'id', id);
2402
+ // verify required parameter 'addClubMemberRequest' is not null or undefined
2403
+ assertParamExists('addClubMember', 'addClubMemberRequest', addClubMemberRequest);
2404
+ const localVarPath = `/api/clubs/{id}/add_members`
2405
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2406
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2407
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2408
+ let baseOptions;
2409
+ if (configuration) {
2410
+ baseOptions = configuration.baseOptions;
2411
+ }
2412
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2413
+ const localVarHeaderParameter = {};
2414
+ const localVarQueryParameter = {};
2415
+ // authentication bearerAuth required
2416
+ // http bearer authentication required
2417
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2418
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2419
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2420
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2421
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2422
+ localVarRequestOptions.data = serializeDataIfNeeded(addClubMemberRequest, localVarRequestOptions, configuration);
2423
+ return {
2424
+ url: toPathString(localVarUrlObj),
2425
+ options: localVarRequestOptions,
2426
+ };
2427
+ }),
2428
+ /**
2429
+ *
2430
+ * @summary Créer un nouveau club
2431
+ * @param {CreateClubRequest} createClubRequest
2432
+ * @param {*} [options] Override http request option.
2433
+ * @throws {RequiredError}
2434
+ */
2435
+ createClub: (createClubRequest_1, ...args_1) => __awaiter(this, [createClubRequest_1, ...args_1], void 0, function* (createClubRequest, options = {}) {
2436
+ // verify required parameter 'createClubRequest' is not null or undefined
2437
+ assertParamExists('createClub', 'createClubRequest', createClubRequest);
2438
+ const localVarPath = `/api/clubs`;
2439
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2440
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2441
+ let baseOptions;
2442
+ if (configuration) {
2443
+ baseOptions = configuration.baseOptions;
2444
+ }
2445
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2446
+ const localVarHeaderParameter = {};
2447
+ const localVarQueryParameter = {};
2448
+ // authentication bearerAuth required
2449
+ // http bearer authentication required
2450
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2451
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2452
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2453
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2454
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2455
+ localVarRequestOptions.data = serializeDataIfNeeded(createClubRequest, localVarRequestOptions, configuration);
2456
+ return {
2457
+ url: toPathString(localVarUrlObj),
2458
+ options: localVarRequestOptions,
2459
+ };
2460
+ }),
2461
+ /**
2462
+ *
2463
+ * @summary Supprimer un club
2464
+ * @param {string} id ID du club
2465
+ * @param {*} [options] Override http request option.
2466
+ * @throws {RequiredError}
2467
+ */
2468
+ deleteClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2469
+ // verify required parameter 'id' is not null or undefined
2470
+ assertParamExists('deleteClub', 'id', id);
2471
+ const localVarPath = `/api/clubs/{id}`
2472
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2473
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2474
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2475
+ let baseOptions;
2476
+ if (configuration) {
2477
+ baseOptions = configuration.baseOptions;
2478
+ }
2479
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2480
+ const localVarHeaderParameter = {};
2481
+ const localVarQueryParameter = {};
2482
+ // authentication bearerAuth required
2483
+ // http bearer authentication required
2484
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2485
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2486
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2487
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2488
+ return {
2489
+ url: toPathString(localVarUrlObj),
2490
+ options: localVarRequestOptions,
2491
+ };
2492
+ }),
2493
+ /**
2494
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2495
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2496
+ * @param {*} [options] Override http request option.
2497
+ * @throws {RequiredError}
2498
+ */
2499
+ getActiveClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2500
+ const localVarPath = `/api/clubs/activeClubs/`;
2501
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2502
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2503
+ let baseOptions;
2504
+ if (configuration) {
2505
+ baseOptions = configuration.baseOptions;
2506
+ }
2507
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2508
+ const localVarHeaderParameter = {};
2509
+ const localVarQueryParameter = {};
2510
+ // authentication bearerAuth required
2511
+ // http bearer authentication required
2512
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2513
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2514
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2515
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2516
+ return {
2517
+ url: toPathString(localVarUrlObj),
2518
+ options: localVarRequestOptions,
2519
+ };
2520
+ }),
2521
+ /**
2522
+ *
2523
+ * @summary Récupérer tous les clubs
2524
+ * @param {*} [options] Override http request option.
2525
+ * @throws {RequiredError}
2526
+ */
2527
+ getAllClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2528
+ const localVarPath = `/api/clubs`;
2529
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2530
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2531
+ let baseOptions;
2532
+ if (configuration) {
2533
+ baseOptions = configuration.baseOptions;
2534
+ }
2535
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2536
+ const localVarHeaderParameter = {};
2537
+ const localVarQueryParameter = {};
2538
+ // authentication bearerAuth required
2539
+ // http bearer authentication required
2540
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2541
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2542
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2543
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2544
+ return {
2545
+ url: toPathString(localVarUrlObj),
2546
+ options: localVarRequestOptions,
2547
+ };
2548
+ }),
2549
+ /**
2550
+ *
2551
+ * @summary Récupérer les informations d\'un club
2552
+ * @param {string} id ID du club
2553
+ * @param {*} [options] Override http request option.
2554
+ * @throws {RequiredError}
2555
+ */
2556
+ getClubInfo: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2557
+ // verify required parameter 'id' is not null or undefined
2558
+ assertParamExists('getClubInfo', 'id', id);
2559
+ const localVarPath = `/api/clubs/{id}`
2560
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2561
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2562
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2563
+ let baseOptions;
2564
+ if (configuration) {
2565
+ baseOptions = configuration.baseOptions;
2566
+ }
2567
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2568
+ const localVarHeaderParameter = {};
2569
+ const localVarQueryParameter = {};
2570
+ // authentication bearerAuth required
2571
+ // http bearer authentication required
2572
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2573
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2574
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2575
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2576
+ return {
2577
+ url: toPathString(localVarUrlObj),
2578
+ options: localVarRequestOptions,
2579
+ };
2580
+ }),
2581
+ /**
2582
+ *
2583
+ * @summary Récupérer les membres d\'un club
2584
+ * @param {string} id ID du club
2585
+ * @param {*} [options] Override http request option.
2586
+ * @throws {RequiredError}
2587
+ */
2588
+ getClubMembers: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2589
+ // verify required parameter 'id' is not null or undefined
2590
+ assertParamExists('getClubMembers', 'id', id);
2591
+ const localVarPath = `/api/clubs/{id}/members`
2592
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2593
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2594
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2595
+ let baseOptions;
2596
+ if (configuration) {
2597
+ baseOptions = configuration.baseOptions;
2598
+ }
2599
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2600
+ const localVarHeaderParameter = {};
2601
+ const localVarQueryParameter = {};
2602
+ // authentication bearerAuth required
2603
+ // http bearer authentication required
2604
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2605
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2606
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2607
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2608
+ return {
2609
+ url: toPathString(localVarUrlObj),
2610
+ options: localVarRequestOptions,
2611
+ };
2612
+ }),
2613
+ /**
2614
+ *
2615
+ * @summary Récupérer les rôles d\'un club
2616
+ * @param {string} id ID du club
2617
+ * @param {*} [options] Override http request option.
2618
+ * @throws {RequiredError}
2619
+ */
2620
+ getClubRoles: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2621
+ // verify required parameter 'id' is not null or undefined
2622
+ assertParamExists('getClubRoles', 'id', id);
2623
+ const localVarPath = `/api/clubs/{id}/roles`
2624
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2625
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2626
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2627
+ let baseOptions;
2628
+ if (configuration) {
2629
+ baseOptions = configuration.baseOptions;
2630
+ }
2631
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2632
+ const localVarHeaderParameter = {};
2633
+ const localVarQueryParameter = {};
2634
+ // authentication bearerAuth required
2635
+ // http bearer authentication required
2636
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2637
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2638
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2639
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2640
+ return {
2641
+ url: toPathString(localVarUrlObj),
2642
+ options: localVarRequestOptions,
2643
+ };
2644
+ }),
2645
+ /**
2646
+ *
2647
+ * @summary Mettre à jour un club existant
2648
+ * @param {string} id ID du club
2649
+ * @param {UpdateClubRequest} updateClubRequest
2650
+ * @param {*} [options] Override http request option.
2651
+ * @throws {RequiredError}
2652
+ */
2653
+ updateClub: (id_1, updateClubRequest_1, ...args_1) => __awaiter(this, [id_1, updateClubRequest_1, ...args_1], void 0, function* (id, updateClubRequest, options = {}) {
2654
+ // verify required parameter 'id' is not null or undefined
2655
+ assertParamExists('updateClub', 'id', id);
2656
+ // verify required parameter 'updateClubRequest' is not null or undefined
2657
+ assertParamExists('updateClub', 'updateClubRequest', updateClubRequest);
2658
+ const localVarPath = `/api/clubs/{id}`
2659
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2660
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2661
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2662
+ let baseOptions;
2663
+ if (configuration) {
2664
+ baseOptions = configuration.baseOptions;
2665
+ }
2666
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2667
+ const localVarHeaderParameter = {};
2668
+ const localVarQueryParameter = {};
2669
+ // authentication bearerAuth required
2670
+ // http bearer authentication required
2671
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2672
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2673
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2674
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2675
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2676
+ localVarRequestOptions.data = serializeDataIfNeeded(updateClubRequest, localVarRequestOptions, configuration);
2677
+ return {
2678
+ url: toPathString(localVarUrlObj),
2679
+ options: localVarRequestOptions,
2680
+ };
2681
+ }),
2682
+ };
2683
+ };
2684
+ /**
2685
+ * ClubsApi - functional programming interface
2686
+ * @export
2687
+ */
2688
+ export const ClubsApiFp = function (configuration) {
2689
+ const localVarAxiosParamCreator = ClubsApiAxiosParamCreator(configuration);
2690
+ return {
2691
+ /**
2692
+ *
2693
+ * @summary Ajouter un membre à un club
2694
+ * @param {string} id ID du club
2695
+ * @param {AddClubMemberRequest} addClubMemberRequest
2696
+ * @param {*} [options] Override http request option.
2697
+ * @throws {RequiredError}
2698
+ */
2699
+ addClubMember(id, addClubMemberRequest, options) {
2700
+ return __awaiter(this, void 0, void 0, function* () {
2701
+ var _a, _b, _c;
2702
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.addClubMember(id, addClubMemberRequest, options);
2703
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2704
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.addClubMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2705
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2706
+ });
2707
+ },
2708
+ /**
2709
+ *
2710
+ * @summary Créer un nouveau club
2711
+ * @param {CreateClubRequest} createClubRequest
2712
+ * @param {*} [options] Override http request option.
2713
+ * @throws {RequiredError}
2714
+ */
2715
+ createClub(createClubRequest, options) {
2716
+ return __awaiter(this, void 0, void 0, function* () {
2717
+ var _a, _b, _c;
2718
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClub(createClubRequest, options);
2719
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2720
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.createClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2721
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2722
+ });
2723
+ },
2724
+ /**
2725
+ *
2726
+ * @summary Supprimer un club
2727
+ * @param {string} id ID du club
2728
+ * @param {*} [options] Override http request option.
2729
+ * @throws {RequiredError}
2730
+ */
2731
+ deleteClub(id, options) {
2732
+ return __awaiter(this, void 0, void 0, function* () {
2733
+ var _a, _b, _c;
2734
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClub(id, options);
2735
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2736
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.deleteClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2737
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2738
+ });
2739
+ },
2740
+ /**
2741
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2742
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2743
+ * @param {*} [options] Override http request option.
2744
+ * @throws {RequiredError}
2745
+ */
2746
+ getActiveClubs(options) {
2747
+ return __awaiter(this, void 0, void 0, function* () {
2748
+ var _a, _b, _c;
2749
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getActiveClubs(options);
2750
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2751
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.getActiveClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2752
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2753
+ });
2754
+ },
2755
+ /**
2756
+ *
2757
+ * @summary Récupérer tous les clubs
2758
+ * @param {*} [options] Override http request option.
2759
+ * @throws {RequiredError}
2760
+ */
2761
+ getAllClubs(options) {
2762
+ return __awaiter(this, void 0, void 0, function* () {
2763
+ var _a, _b, _c;
2764
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllClubs(options);
2765
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2766
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.getAllClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2767
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2768
+ });
2769
+ },
2770
+ /**
2771
+ *
2772
+ * @summary Récupérer les informations d\'un club
2773
+ * @param {string} id ID du club
2774
+ * @param {*} [options] Override http request option.
2775
+ * @throws {RequiredError}
2776
+ */
2777
+ getClubInfo(id, options) {
2778
+ return __awaiter(this, void 0, void 0, function* () {
2779
+ var _a, _b, _c;
2780
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubInfo(id, options);
2781
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2782
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.getClubInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2783
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2784
+ });
2785
+ },
2786
+ /**
2787
+ *
2788
+ * @summary Récupérer les membres d\'un club
2789
+ * @param {string} id ID du club
2790
+ * @param {*} [options] Override http request option.
2791
+ * @throws {RequiredError}
2792
+ */
2793
+ getClubMembers(id, options) {
2794
+ return __awaiter(this, void 0, void 0, function* () {
2795
+ var _a, _b, _c;
2796
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubMembers(id, options);
2797
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2798
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.getClubMembers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2799
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2800
+ });
2801
+ },
2802
+ /**
2803
+ *
2804
+ * @summary Récupérer les rôles d\'un club
2805
+ * @param {string} id ID du club
2806
+ * @param {*} [options] Override http request option.
2807
+ * @throws {RequiredError}
2808
+ */
2809
+ getClubRoles(id, options) {
2810
+ return __awaiter(this, void 0, void 0, function* () {
2811
+ var _a, _b, _c;
2812
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubRoles(id, options);
2813
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2814
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.getClubRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2815
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2816
+ });
2817
+ },
2818
+ /**
2819
+ *
2820
+ * @summary Mettre à jour un club existant
2821
+ * @param {string} id ID du club
2822
+ * @param {UpdateClubRequest} updateClubRequest
2823
+ * @param {*} [options] Override http request option.
2824
+ * @throws {RequiredError}
2825
+ */
2826
+ updateClub(id, updateClubRequest, options) {
2827
+ return __awaiter(this, void 0, void 0, function* () {
2828
+ var _a, _b, _c;
2829
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClub(id, updateClubRequest, options);
2830
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2831
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClubsApi.updateClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2832
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2833
+ });
2834
+ },
2835
+ };
2836
+ };
2837
+ /**
2838
+ * ClubsApi - factory interface
2839
+ * @export
2840
+ */
2841
+ export const ClubsApiFactory = function (configuration, basePath, axios) {
2842
+ const localVarFp = ClubsApiFp(configuration);
2843
+ return {
2844
+ /**
2845
+ *
2846
+ * @summary Ajouter un membre à un club
2847
+ * @param {ClubsApiAddClubMemberRequest} requestParameters Request parameters.
2848
+ * @param {*} [options] Override http request option.
2849
+ * @throws {RequiredError}
2850
+ */
2851
+ addClubMember(requestParameters, options) {
2852
+ return localVarFp.addClubMember(requestParameters.id, requestParameters.addClubMemberRequest, options).then((request) => request(axios, basePath));
2853
+ },
2854
+ /**
2855
+ *
2856
+ * @summary Créer un nouveau club
2857
+ * @param {ClubsApiCreateClubRequest} requestParameters Request parameters.
2858
+ * @param {*} [options] Override http request option.
2859
+ * @throws {RequiredError}
2860
+ */
2861
+ createClub(requestParameters, options) {
2862
+ return localVarFp.createClub(requestParameters.createClubRequest, options).then((request) => request(axios, basePath));
2863
+ },
2864
+ /**
2865
+ *
2866
+ * @summary Supprimer un club
2867
+ * @param {ClubsApiDeleteClubRequest} requestParameters Request parameters.
2868
+ * @param {*} [options] Override http request option.
2869
+ * @throws {RequiredError}
2870
+ */
2871
+ deleteClub(requestParameters, options) {
2872
+ return localVarFp.deleteClub(requestParameters.id, options).then((request) => request(axios, basePath));
2873
+ },
2874
+ /**
2875
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2876
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2877
+ * @param {*} [options] Override http request option.
2878
+ * @throws {RequiredError}
2879
+ */
2880
+ getActiveClubs(options) {
2881
+ return localVarFp.getActiveClubs(options).then((request) => request(axios, basePath));
2882
+ },
2883
+ /**
2884
+ *
2885
+ * @summary Récupérer tous les clubs
2886
+ * @param {*} [options] Override http request option.
2887
+ * @throws {RequiredError}
2888
+ */
2889
+ getAllClubs(options) {
2890
+ return localVarFp.getAllClubs(options).then((request) => request(axios, basePath));
2891
+ },
2892
+ /**
2893
+ *
2894
+ * @summary Récupérer les informations d\'un club
2895
+ * @param {ClubsApiGetClubInfoRequest} requestParameters Request parameters.
2896
+ * @param {*} [options] Override http request option.
2897
+ * @throws {RequiredError}
2898
+ */
2899
+ getClubInfo(requestParameters, options) {
2900
+ return localVarFp.getClubInfo(requestParameters.id, options).then((request) => request(axios, basePath));
2901
+ },
2902
+ /**
2903
+ *
2904
+ * @summary Récupérer les membres d\'un club
2905
+ * @param {ClubsApiGetClubMembersRequest} requestParameters Request parameters.
2906
+ * @param {*} [options] Override http request option.
2907
+ * @throws {RequiredError}
2908
+ */
2909
+ getClubMembers(requestParameters, options) {
2910
+ return localVarFp.getClubMembers(requestParameters.id, options).then((request) => request(axios, basePath));
2911
+ },
2912
+ /**
2913
+ *
2914
+ * @summary Récupérer les rôles d\'un club
2915
+ * @param {ClubsApiGetClubRolesRequest} requestParameters Request parameters.
2916
+ * @param {*} [options] Override http request option.
2917
+ * @throws {RequiredError}
2918
+ */
2919
+ getClubRoles(requestParameters, options) {
2920
+ return localVarFp.getClubRoles(requestParameters.id, options).then((request) => request(axios, basePath));
2921
+ },
2922
+ /**
2923
+ *
2924
+ * @summary Mettre à jour un club existant
2925
+ * @param {ClubsApiUpdateClubRequest} requestParameters Request parameters.
2926
+ * @param {*} [options] Override http request option.
2927
+ * @throws {RequiredError}
2928
+ */
2929
+ updateClub(requestParameters, options) {
2930
+ return localVarFp.updateClub(requestParameters.id, requestParameters.updateClubRequest, options).then((request) => request(axios, basePath));
2931
+ },
2932
+ };
2933
+ };
2934
+ /**
2935
+ * ClubsApi - object-oriented interface
2936
+ * @export
2937
+ * @class ClubsApi
2938
+ * @extends {BaseAPI}
2939
+ */
2940
+ export class ClubsApi extends BaseAPI {
2941
+ /**
2942
+ *
2943
+ * @summary Ajouter un membre à un club
2944
+ * @param {ClubsApiAddClubMemberRequest} requestParameters Request parameters.
2945
+ * @param {*} [options] Override http request option.
2946
+ * @throws {RequiredError}
2947
+ * @memberof ClubsApi
2948
+ */
2949
+ addClubMember(requestParameters, options) {
2950
+ return ClubsApiFp(this.configuration).addClubMember(requestParameters.id, requestParameters.addClubMemberRequest, options).then((request) => request(this.axios, this.basePath));
2951
+ }
2952
+ /**
2953
+ *
2954
+ * @summary Créer un nouveau club
2955
+ * @param {ClubsApiCreateClubRequest} requestParameters Request parameters.
2956
+ * @param {*} [options] Override http request option.
2957
+ * @throws {RequiredError}
2958
+ * @memberof ClubsApi
2959
+ */
2960
+ createClub(requestParameters, options) {
2961
+ return ClubsApiFp(this.configuration).createClub(requestParameters.createClubRequest, options).then((request) => request(this.axios, this.basePath));
2962
+ }
2963
+ /**
2964
+ *
2965
+ * @summary Supprimer un club
2966
+ * @param {ClubsApiDeleteClubRequest} requestParameters Request parameters.
2967
+ * @param {*} [options] Override http request option.
2968
+ * @throws {RequiredError}
2969
+ * @memberof ClubsApi
2970
+ */
2971
+ deleteClub(requestParameters, options) {
2972
+ return ClubsApiFp(this.configuration).deleteClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2973
+ }
2974
+ /**
2975
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2976
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2977
+ * @param {*} [options] Override http request option.
2978
+ * @throws {RequiredError}
2979
+ * @memberof ClubsApi
2980
+ */
2981
+ getActiveClubs(options) {
2982
+ return ClubsApiFp(this.configuration).getActiveClubs(options).then((request) => request(this.axios, this.basePath));
2983
+ }
2984
+ /**
2985
+ *
2986
+ * @summary Récupérer tous les clubs
2987
+ * @param {*} [options] Override http request option.
2988
+ * @throws {RequiredError}
2989
+ * @memberof ClubsApi
2990
+ */
2991
+ getAllClubs(options) {
2992
+ return ClubsApiFp(this.configuration).getAllClubs(options).then((request) => request(this.axios, this.basePath));
2993
+ }
2994
+ /**
2995
+ *
2996
+ * @summary Récupérer les informations d\'un club
2997
+ * @param {ClubsApiGetClubInfoRequest} requestParameters Request parameters.
2998
+ * @param {*} [options] Override http request option.
2999
+ * @throws {RequiredError}
3000
+ * @memberof ClubsApi
3001
+ */
3002
+ getClubInfo(requestParameters, options) {
3003
+ return ClubsApiFp(this.configuration).getClubInfo(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3004
+ }
3005
+ /**
3006
+ *
3007
+ * @summary Récupérer les membres d\'un club
3008
+ * @param {ClubsApiGetClubMembersRequest} requestParameters Request parameters.
3009
+ * @param {*} [options] Override http request option.
3010
+ * @throws {RequiredError}
3011
+ * @memberof ClubsApi
3012
+ */
3013
+ getClubMembers(requestParameters, options) {
3014
+ return ClubsApiFp(this.configuration).getClubMembers(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3015
+ }
3016
+ /**
3017
+ *
3018
+ * @summary Récupérer les rôles d\'un club
3019
+ * @param {ClubsApiGetClubRolesRequest} requestParameters Request parameters.
3020
+ * @param {*} [options] Override http request option.
3021
+ * @throws {RequiredError}
3022
+ * @memberof ClubsApi
3023
+ */
3024
+ getClubRoles(requestParameters, options) {
3025
+ return ClubsApiFp(this.configuration).getClubRoles(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3026
+ }
3027
+ /**
3028
+ *
3029
+ * @summary Mettre à jour un club existant
3030
+ * @param {ClubsApiUpdateClubRequest} requestParameters Request parameters.
3031
+ * @param {*} [options] Override http request option.
3032
+ * @throws {RequiredError}
3033
+ * @memberof ClubsApi
3034
+ */
3035
+ updateClub(requestParameters, options) {
3036
+ return ClubsApiFp(this.configuration).updateClub(requestParameters.id, requestParameters.updateClubRequest, options).then((request) => request(this.axios, this.basePath));
3037
+ }
3038
+ }
3039
+ /**
3040
+ * SportsApi - axios parameter creator
3041
+ * @export
3042
+ */
3043
+ export const SportsApiAxiosParamCreator = function (configuration) {
3044
+ return {
3045
+ /**
3046
+ *
3047
+ * @summary Crée un sport dans un club
3048
+ * @param {CreateSportRequest} createSportRequest
3049
+ * @param {*} [options] Override http request option.
3050
+ * @throws {RequiredError}
3051
+ */
3052
+ createSport: (createSportRequest_1, ...args_1) => __awaiter(this, [createSportRequest_1, ...args_1], void 0, function* (createSportRequest, options = {}) {
3053
+ // verify required parameter 'createSportRequest' is not null or undefined
3054
+ assertParamExists('createSport', 'createSportRequest', createSportRequest);
3055
+ const localVarPath = `/api/sports`;
3056
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3057
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3058
+ let baseOptions;
3059
+ if (configuration) {
3060
+ baseOptions = configuration.baseOptions;
3061
+ }
3062
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3063
+ const localVarHeaderParameter = {};
3064
+ const localVarQueryParameter = {};
3065
+ // authentication bearerAuth required
3066
+ // http bearer authentication required
3067
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3068
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3069
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3070
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3071
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3072
+ localVarRequestOptions.data = serializeDataIfNeeded(createSportRequest, localVarRequestOptions, configuration);
3073
+ return {
3074
+ url: toPathString(localVarUrlObj),
3075
+ options: localVarRequestOptions,
3076
+ };
3077
+ }),
3078
+ /**
3079
+ *
3080
+ * @summary Supprime un sport
3081
+ * @param {string} id ID du sport
3082
+ * @param {*} [options] Override http request option.
3083
+ * @throws {RequiredError}
3084
+ */
3085
+ deleteSport: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
3086
+ // verify required parameter 'id' is not null or undefined
3087
+ assertParamExists('deleteSport', 'id', id);
3088
+ const localVarPath = `/api/sports/{id}`
3089
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3090
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3091
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3092
+ let baseOptions;
3093
+ if (configuration) {
3094
+ baseOptions = configuration.baseOptions;
3095
+ }
3096
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3097
+ const localVarHeaderParameter = {};
3098
+ const localVarQueryParameter = {};
3099
+ // authentication bearerAuth required
3100
+ // http bearer authentication required
3101
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3102
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3104
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3105
+ return {
3106
+ url: toPathString(localVarUrlObj),
3107
+ options: localVarRequestOptions,
3108
+ };
3109
+ }),
3110
+ /**
3111
+ *
3112
+ * @summary Récupère la liste des sports d’un club
3113
+ * @param {GetAllSportsRequest} getAllSportsRequest
3114
+ * @param {*} [options] Override http request option.
3115
+ * @throws {RequiredError}
3116
+ */
3117
+ getAllSports: (getAllSportsRequest_1, ...args_1) => __awaiter(this, [getAllSportsRequest_1, ...args_1], void 0, function* (getAllSportsRequest, options = {}) {
3118
+ // verify required parameter 'getAllSportsRequest' is not null or undefined
3119
+ assertParamExists('getAllSports', 'getAllSportsRequest', getAllSportsRequest);
3120
+ const localVarPath = `/api/sports`;
3121
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3122
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3123
+ let baseOptions;
3124
+ if (configuration) {
3125
+ baseOptions = configuration.baseOptions;
3126
+ }
3127
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3128
+ const localVarHeaderParameter = {};
3129
+ const localVarQueryParameter = {};
3130
+ // authentication bearerAuth required
3131
+ // http bearer authentication required
3132
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3133
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3134
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3135
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3136
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3137
+ localVarRequestOptions.data = serializeDataIfNeeded(getAllSportsRequest, localVarRequestOptions, configuration);
3138
+ return {
3139
+ url: toPathString(localVarUrlObj),
3140
+ options: localVarRequestOptions,
3141
+ };
3142
+ }),
3143
+ /**
3144
+ *
3145
+ * @summary Met à jour un sport
3146
+ * @param {string} id ID du sport
3147
+ * @param {UpdateSportRequest} updateSportRequest
3148
+ * @param {*} [options] Override http request option.
3149
+ * @throws {RequiredError}
3150
+ */
3151
+ updateSport: (id_1, updateSportRequest_1, ...args_1) => __awaiter(this, [id_1, updateSportRequest_1, ...args_1], void 0, function* (id, updateSportRequest, options = {}) {
3152
+ // verify required parameter 'id' is not null or undefined
3153
+ assertParamExists('updateSport', 'id', id);
3154
+ // verify required parameter 'updateSportRequest' is not null or undefined
3155
+ assertParamExists('updateSport', 'updateSportRequest', updateSportRequest);
3156
+ const localVarPath = `/api/sports/{id}`
3157
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3158
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3159
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3160
+ let baseOptions;
3161
+ if (configuration) {
3162
+ baseOptions = configuration.baseOptions;
3163
+ }
3164
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3165
+ const localVarHeaderParameter = {};
3166
+ const localVarQueryParameter = {};
3167
+ // authentication bearerAuth required
3168
+ // http bearer authentication required
3169
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3170
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3171
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3172
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3173
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3174
+ localVarRequestOptions.data = serializeDataIfNeeded(updateSportRequest, localVarRequestOptions, configuration);
3175
+ return {
3176
+ url: toPathString(localVarUrlObj),
3177
+ options: localVarRequestOptions,
3178
+ };
3179
+ }),
3180
+ };
3181
+ };
3182
+ /**
3183
+ * SportsApi - functional programming interface
3184
+ * @export
3185
+ */
3186
+ export const SportsApiFp = function (configuration) {
3187
+ const localVarAxiosParamCreator = SportsApiAxiosParamCreator(configuration);
3188
+ return {
3189
+ /**
3190
+ *
3191
+ * @summary Crée un sport dans un club
3192
+ * @param {CreateSportRequest} createSportRequest
3193
+ * @param {*} [options] Override http request option.
3194
+ * @throws {RequiredError}
3195
+ */
3196
+ createSport(createSportRequest, options) {
3197
+ return __awaiter(this, void 0, void 0, function* () {
3198
+ var _a, _b, _c;
3199
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSport(createSportRequest, options);
3200
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3201
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SportsApi.createSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3202
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3203
+ });
3204
+ },
3205
+ /**
3206
+ *
3207
+ * @summary Supprime un sport
3208
+ * @param {string} id ID du sport
3209
+ * @param {*} [options] Override http request option.
3210
+ * @throws {RequiredError}
3211
+ */
3212
+ deleteSport(id, options) {
3213
+ return __awaiter(this, void 0, void 0, function* () {
3214
+ var _a, _b, _c;
3215
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSport(id, options);
3216
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3217
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SportsApi.deleteSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3218
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3219
+ });
3220
+ },
3221
+ /**
3222
+ *
3223
+ * @summary Récupère la liste des sports d’un club
3224
+ * @param {GetAllSportsRequest} getAllSportsRequest
3225
+ * @param {*} [options] Override http request option.
3226
+ * @throws {RequiredError}
3227
+ */
3228
+ getAllSports(getAllSportsRequest, options) {
3229
+ return __awaiter(this, void 0, void 0, function* () {
3230
+ var _a, _b, _c;
3231
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllSports(getAllSportsRequest, options);
3232
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3233
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SportsApi.getAllSports']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3234
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3235
+ });
3236
+ },
3237
+ /**
3238
+ *
3239
+ * @summary Met à jour un sport
3240
+ * @param {string} id ID du sport
3241
+ * @param {UpdateSportRequest} updateSportRequest
3242
+ * @param {*} [options] Override http request option.
3243
+ * @throws {RequiredError}
3244
+ */
3245
+ updateSport(id, updateSportRequest, options) {
3246
+ return __awaiter(this, void 0, void 0, function* () {
3247
+ var _a, _b, _c;
3248
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSport(id, updateSportRequest, options);
3249
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3250
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SportsApi.updateSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3251
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3252
+ });
3253
+ },
3254
+ };
3255
+ };
3256
+ /**
3257
+ * SportsApi - factory interface
3258
+ * @export
3259
+ */
3260
+ export const SportsApiFactory = function (configuration, basePath, axios) {
3261
+ const localVarFp = SportsApiFp(configuration);
3262
+ return {
3263
+ /**
3264
+ *
3265
+ * @summary Crée un sport dans un club
3266
+ * @param {SportsApiCreateSportRequest} requestParameters Request parameters.
3267
+ * @param {*} [options] Override http request option.
3268
+ * @throws {RequiredError}
3269
+ */
3270
+ createSport(requestParameters, options) {
3271
+ return localVarFp.createSport(requestParameters.createSportRequest, options).then((request) => request(axios, basePath));
3272
+ },
3273
+ /**
3274
+ *
3275
+ * @summary Supprime un sport
3276
+ * @param {SportsApiDeleteSportRequest} requestParameters Request parameters.
3277
+ * @param {*} [options] Override http request option.
3278
+ * @throws {RequiredError}
3279
+ */
3280
+ deleteSport(requestParameters, options) {
3281
+ return localVarFp.deleteSport(requestParameters.id, options).then((request) => request(axios, basePath));
3282
+ },
3283
+ /**
3284
+ *
3285
+ * @summary Récupère la liste des sports d’un club
3286
+ * @param {SportsApiGetAllSportsRequest} requestParameters Request parameters.
3287
+ * @param {*} [options] Override http request option.
3288
+ * @throws {RequiredError}
3289
+ */
3290
+ getAllSports(requestParameters, options) {
3291
+ return localVarFp.getAllSports(requestParameters.getAllSportsRequest, options).then((request) => request(axios, basePath));
3292
+ },
3293
+ /**
3294
+ *
3295
+ * @summary Met à jour un sport
3296
+ * @param {SportsApiUpdateSportRequest} requestParameters Request parameters.
3297
+ * @param {*} [options] Override http request option.
3298
+ * @throws {RequiredError}
3299
+ */
3300
+ updateSport(requestParameters, options) {
3301
+ return localVarFp.updateSport(requestParameters.id, requestParameters.updateSportRequest, options).then((request) => request(axios, basePath));
3302
+ },
3303
+ };
3304
+ };
3305
+ /**
3306
+ * SportsApi - object-oriented interface
3307
+ * @export
3308
+ * @class SportsApi
3309
+ * @extends {BaseAPI}
3310
+ */
3311
+ export class SportsApi extends BaseAPI {
3312
+ /**
3313
+ *
3314
+ * @summary Crée un sport dans un club
3315
+ * @param {SportsApiCreateSportRequest} requestParameters Request parameters.
3316
+ * @param {*} [options] Override http request option.
3317
+ * @throws {RequiredError}
3318
+ * @memberof SportsApi
3319
+ */
3320
+ createSport(requestParameters, options) {
3321
+ return SportsApiFp(this.configuration).createSport(requestParameters.createSportRequest, options).then((request) => request(this.axios, this.basePath));
3322
+ }
3323
+ /**
3324
+ *
3325
+ * @summary Supprime un sport
3326
+ * @param {SportsApiDeleteSportRequest} requestParameters Request parameters.
3327
+ * @param {*} [options] Override http request option.
3328
+ * @throws {RequiredError}
3329
+ * @memberof SportsApi
3330
+ */
3331
+ deleteSport(requestParameters, options) {
3332
+ return SportsApiFp(this.configuration).deleteSport(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3333
+ }
3334
+ /**
3335
+ *
3336
+ * @summary Récupère la liste des sports d’un club
3337
+ * @param {SportsApiGetAllSportsRequest} requestParameters Request parameters.
3338
+ * @param {*} [options] Override http request option.
3339
+ * @throws {RequiredError}
3340
+ * @memberof SportsApi
3341
+ */
3342
+ getAllSports(requestParameters, options) {
3343
+ return SportsApiFp(this.configuration).getAllSports(requestParameters.getAllSportsRequest, options).then((request) => request(this.axios, this.basePath));
3344
+ }
3345
+ /**
3346
+ *
3347
+ * @summary Met à jour un sport
3348
+ * @param {SportsApiUpdateSportRequest} requestParameters Request parameters.
3349
+ * @param {*} [options] Override http request option.
3350
+ * @throws {RequiredError}
3351
+ * @memberof SportsApi
3352
+ */
3353
+ updateSport(requestParameters, options) {
3354
+ return SportsApiFp(this.configuration).updateSport(requestParameters.id, requestParameters.updateSportRequest, options).then((request) => request(this.axios, this.basePath));
3355
+ }
3356
+ }
3357
+ /**
3358
+ * UsersApi - axios parameter creator
3359
+ * @export
3360
+ */
3361
+ export const UsersApiAxiosParamCreator = function (configuration) {
3362
+ return {
3363
+ /**
3364
+ *
3365
+ * @summary Annule un abonnement utilisateur
3366
+ * @param {string} clubId ID du club
3367
+ * @param {string} subscriptionId ID de l\'abonnement à annuler
3368
+ * @param {*} [options] Override http request option.
3369
+ * @throws {RequiredError}
3370
+ */
3371
+ cancelSubscription: (clubId_1, subscriptionId_1, ...args_1) => __awaiter(this, [clubId_1, subscriptionId_1, ...args_1], void 0, function* (clubId, subscriptionId, options = {}) {
3372
+ // verify required parameter 'clubId' is not null or undefined
3373
+ assertParamExists('cancelSubscription', 'clubId', clubId);
3374
+ // verify required parameter 'subscriptionId' is not null or undefined
3375
+ assertParamExists('cancelSubscription', 'subscriptionId', subscriptionId);
3376
+ const localVarPath = `/api/users/me/subscriptions/{clubId}/{subscriptionId}`
3377
+ .replace(`{${"clubId"}}`, encodeURIComponent(String(clubId)))
3378
+ .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
3379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3381
+ let baseOptions;
3382
+ if (configuration) {
3383
+ baseOptions = configuration.baseOptions;
3384
+ }
3385
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3386
+ const localVarHeaderParameter = {};
3387
+ const localVarQueryParameter = {};
3388
+ // authentication bearerAuth required
3389
+ // http bearer authentication required
3390
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3391
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3392
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3393
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3394
+ return {
3395
+ url: toPathString(localVarUrlObj),
3396
+ options: localVarRequestOptions,
3397
+ };
3398
+ }),
3399
+ /**
3400
+ *
3401
+ * @summary Modifie le mot de passe de l\'utilisateur connecté
3402
+ * @param {ChangePasswordRequestBody} changePasswordRequestBody
3403
+ * @param {*} [options] Override http request option.
3404
+ * @throws {RequiredError}
3405
+ */
3406
+ changePassword: (changePasswordRequestBody_1, ...args_1) => __awaiter(this, [changePasswordRequestBody_1, ...args_1], void 0, function* (changePasswordRequestBody, options = {}) {
3407
+ // verify required parameter 'changePasswordRequestBody' is not null or undefined
3408
+ assertParamExists('changePassword', 'changePasswordRequestBody', changePasswordRequestBody);
3409
+ const localVarPath = `/api/users/me/password`;
3410
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3411
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3412
+ let baseOptions;
3413
+ if (configuration) {
3414
+ baseOptions = configuration.baseOptions;
3415
+ }
3416
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3417
+ const localVarHeaderParameter = {};
3418
+ const localVarQueryParameter = {};
3419
+ // authentication bearerAuth required
3420
+ // http bearer authentication required
3421
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3422
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3423
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3424
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3425
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3426
+ localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequestBody, localVarRequestOptions, configuration);
3427
+ return {
3428
+ url: toPathString(localVarUrlObj),
3429
+ options: localVarRequestOptions,
3430
+ };
3431
+ }),
3432
+ /**
3433
+ *
3434
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
3435
+ * @param {number} [limit] Nombre maximum d\'utilisateurs à retourner
3436
+ * @param {number} [skip] Nombre d\'utilisateurs à ignorer (pagination)
3437
+ * @param {string} [search] Recherche dans firstName, lastName, email
3438
+ * @param {string} [sport] Filtre par sport
3439
+ * @param {string} [matchType] Filtre par type de match
3440
+ * @param {string} [niveau] Filtre par niveau
3441
+ * @param {string} [rank] Filtre par rang
3442
+ * @param {GetAllUsersIsLookingForPartnerEnum} [isLookingForPartner] Filtre par disponibilité pour partenaire
3443
+ * @param {string} [username] Filtre par nom d\'utilisateur
3444
+ * @param {string} [email] Filtre par email
3445
+ * @param {string} [description] Filtre par description
3446
+ * @param {string} [gender] Filtre par genre
3447
+ * @param {*} [options] Override http request option.
3448
+ * @throws {RequiredError}
3449
+ */
3450
+ getAllUsers: (limit_1, skip_1, search_1, sport_1, matchType_1, niveau_1, rank_1, isLookingForPartner_1, username_1, email_1, description_1, gender_1, ...args_1) => __awaiter(this, [limit_1, skip_1, search_1, sport_1, matchType_1, niveau_1, rank_1, isLookingForPartner_1, username_1, email_1, description_1, gender_1, ...args_1], void 0, function* (limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options = {}) {
3451
+ const localVarPath = `/api/users`;
3452
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3453
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3454
+ let baseOptions;
3455
+ if (configuration) {
3456
+ baseOptions = configuration.baseOptions;
3457
+ }
3458
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3459
+ const localVarHeaderParameter = {};
3460
+ const localVarQueryParameter = {};
3461
+ // authentication bearerAuth required
3462
+ // http bearer authentication required
3463
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3464
+ if (limit !== undefined) {
3465
+ localVarQueryParameter['limit'] = limit;
3466
+ }
3467
+ if (skip !== undefined) {
3468
+ localVarQueryParameter['skip'] = skip;
3469
+ }
3470
+ if (search !== undefined) {
3471
+ localVarQueryParameter['search'] = search;
3472
+ }
3473
+ if (sport !== undefined) {
3474
+ localVarQueryParameter['sport'] = sport;
3475
+ }
3476
+ if (matchType !== undefined) {
3477
+ localVarQueryParameter['matchType'] = matchType;
3478
+ }
3479
+ if (niveau !== undefined) {
3480
+ localVarQueryParameter['niveau'] = niveau;
3481
+ }
3482
+ if (rank !== undefined) {
3483
+ localVarQueryParameter['rank'] = rank;
3484
+ }
3485
+ if (isLookingForPartner !== undefined) {
3486
+ localVarQueryParameter['isLookingForPartner'] = isLookingForPartner;
3487
+ }
3488
+ if (username !== undefined) {
3489
+ localVarQueryParameter['username'] = username;
3490
+ }
3491
+ if (email !== undefined) {
3492
+ localVarQueryParameter['email'] = email;
3493
+ }
3494
+ if (description !== undefined) {
3495
+ localVarQueryParameter['description'] = description;
3496
+ }
3497
+ if (gender !== undefined) {
3498
+ localVarQueryParameter['gender'] = gender;
3499
+ }
3500
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3501
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3502
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3503
+ return {
3504
+ url: toPathString(localVarUrlObj),
3505
+ options: localVarRequestOptions,
3506
+ };
3507
+ }),
3508
+ /**
3509
+ *
3510
+ * @summary Récupère les informations de l\'utilisateur connecté
3511
+ * @param {*} [options] Override http request option.
3512
+ * @throws {RequiredError}
3513
+ */
3514
+ getUserInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3515
+ const localVarPath = `/api/users/me`;
3516
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3517
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3518
+ let baseOptions;
3519
+ if (configuration) {
3520
+ baseOptions = configuration.baseOptions;
3521
+ }
3522
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3523
+ const localVarHeaderParameter = {};
3524
+ const localVarQueryParameter = {};
3525
+ // authentication bearerAuth required
3526
+ // http bearer authentication required
3527
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3528
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3529
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3530
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3531
+ return {
3532
+ url: toPathString(localVarUrlObj),
3533
+ options: localVarRequestOptions,
3534
+ };
3535
+ }),
3536
+ /**
3537
+ *
3538
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3539
+ * @param {*} [options] Override http request option.
3540
+ * @throws {RequiredError}
3541
+ */
3542
+ getUserRolesInClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3543
+ const localVarPath = `/api/users/me/roles`;
3544
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3545
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3546
+ let baseOptions;
3547
+ if (configuration) {
3548
+ baseOptions = configuration.baseOptions;
3549
+ }
3550
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3551
+ const localVarHeaderParameter = {};
3552
+ const localVarQueryParameter = {};
3553
+ // authentication bearerAuth required
3554
+ // http bearer authentication required
3555
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3556
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3557
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3558
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3559
+ return {
3560
+ url: toPathString(localVarUrlObj),
3561
+ options: localVarRequestOptions,
3562
+ };
3563
+ }),
3564
+ /**
3565
+ *
3566
+ * @summary Récupère les abonnements de l\'utilisateur connecté
3567
+ * @param {*} [options] Override http request option.
3568
+ * @throws {RequiredError}
3569
+ */
3570
+ getUserSubscriptions: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3571
+ const localVarPath = `/api/users/me/subscriptions`;
3572
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3573
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3574
+ let baseOptions;
3575
+ if (configuration) {
3576
+ baseOptions = configuration.baseOptions;
3577
+ }
3578
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3579
+ const localVarHeaderParameter = {};
3580
+ const localVarQueryParameter = {};
3581
+ // authentication bearerAuth required
3582
+ // http bearer authentication required
3583
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3584
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3585
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3586
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3587
+ return {
3588
+ url: toPathString(localVarUrlObj),
3589
+ options: localVarRequestOptions,
3590
+ };
3591
+ }),
3592
+ /**
3593
+ *
3594
+ * @summary Initie une session d\'abonnement Stripe
3595
+ * @param {InitiateSubscriptionSessionRequestBody} initiateSubscriptionSessionRequestBody
3596
+ * @param {*} [options] Override http request option.
3597
+ * @throws {RequiredError}
3598
+ */
3599
+ initiateSubscriptionSession: (initiateSubscriptionSessionRequestBody_1, ...args_1) => __awaiter(this, [initiateSubscriptionSessionRequestBody_1, ...args_1], void 0, function* (initiateSubscriptionSessionRequestBody, options = {}) {
3600
+ // verify required parameter 'initiateSubscriptionSessionRequestBody' is not null or undefined
3601
+ assertParamExists('initiateSubscriptionSession', 'initiateSubscriptionSessionRequestBody', initiateSubscriptionSessionRequestBody);
3602
+ const localVarPath = `/api/users/me/subscription-session`;
3603
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3604
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3605
+ let baseOptions;
3606
+ if (configuration) {
3607
+ baseOptions = configuration.baseOptions;
3608
+ }
3609
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3610
+ const localVarHeaderParameter = {};
3611
+ const localVarQueryParameter = {};
3612
+ // authentication bearerAuth required
3613
+ // http bearer authentication required
3614
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3615
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3616
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3617
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3618
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3619
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateSubscriptionSessionRequestBody, localVarRequestOptions, configuration);
3620
+ return {
3621
+ url: toPathString(localVarUrlObj),
3622
+ options: localVarRequestOptions,
3623
+ };
3624
+ }),
3625
+ /**
3626
+ *
3627
+ * @summary Authentifie un utilisateur
3628
+ * @param {LoginRequestBody} loginRequestBody
3629
+ * @param {*} [options] Override http request option.
3630
+ * @throws {RequiredError}
3631
+ */
3632
+ login: (loginRequestBody_1, ...args_1) => __awaiter(this, [loginRequestBody_1, ...args_1], void 0, function* (loginRequestBody, options = {}) {
3633
+ // verify required parameter 'loginRequestBody' is not null or undefined
3634
+ assertParamExists('login', 'loginRequestBody', loginRequestBody);
3635
+ const localVarPath = `/api/users/login`;
3636
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3637
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3638
+ let baseOptions;
3639
+ if (configuration) {
3640
+ baseOptions = configuration.baseOptions;
3641
+ }
3642
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3643
+ const localVarHeaderParameter = {};
3644
+ const localVarQueryParameter = {};
3645
+ // authentication bearerAuth required
3646
+ // http bearer authentication required
3647
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3648
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3649
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3650
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3651
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3652
+ localVarRequestOptions.data = serializeDataIfNeeded(loginRequestBody, localVarRequestOptions, configuration);
3653
+ return {
3654
+ url: toPathString(localVarUrlObj),
3655
+ options: localVarRequestOptions,
3656
+ };
3657
+ }),
3658
+ /**
3659
+ *
3660
+ * @summary Rafraîchit le token d\'accès
3661
+ * @param {RefreshTokenRequestBody} refreshTokenRequestBody
69
3662
  * @param {*} [options] Override http request option.
70
3663
  * @throws {RequiredError}
71
3664
  */
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`;
3665
+ refreshToken: (refreshTokenRequestBody_1, ...args_1) => __awaiter(this, [refreshTokenRequestBody_1, ...args_1], void 0, function* (refreshTokenRequestBody, options = {}) {
3666
+ // verify required parameter 'refreshTokenRequestBody' is not null or undefined
3667
+ assertParamExists('refreshToken', 'refreshTokenRequestBody', refreshTokenRequestBody);
3668
+ const localVarPath = `/api/users/refresh-token`;
76
3669
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
77
3670
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
78
3671
  let baseOptions;
79
3672
  if (configuration) {
80
3673
  baseOptions = configuration.baseOptions;
81
3674
  }
82
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3675
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
83
3676
  const localVarHeaderParameter = {};
84
3677
  const localVarQueryParameter = {};
85
3678
  // authentication bearerAuth required
@@ -89,7 +3682,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
89
3682
  setSearchParams(localVarUrlObj, localVarQueryParameter);
90
3683
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
91
3684
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
92
- localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequestBody, localVarRequestOptions, configuration);
3685
+ localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenRequestBody, localVarRequestOptions, configuration);
93
3686
  return {
94
3687
  url: toPathString(localVarUrlObj),
95
3688
  options: localVarRequestOptions,
@@ -97,11 +3690,14 @@ export const UsersApiAxiosParamCreator = function (configuration) {
97
3690
  }),
98
3691
  /**
99
3692
  *
100
- * @summary Récupère la liste des utilisateurs
3693
+ * @summary Crée un nouvel utilisateur
3694
+ * @param {RegisterRequestBody} registerRequestBody
101
3695
  * @param {*} [options] Override http request option.
102
3696
  * @throws {RequiredError}
103
3697
  */
104
- getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3698
+ register: (registerRequestBody_1, ...args_1) => __awaiter(this, [registerRequestBody_1, ...args_1], void 0, function* (registerRequestBody, options = {}) {
3699
+ // verify required parameter 'registerRequestBody' is not null or undefined
3700
+ assertParamExists('register', 'registerRequestBody', registerRequestBody);
105
3701
  const localVarPath = `/api/users`;
106
3702
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
107
3703
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -109,15 +3705,17 @@ export const UsersApiAxiosParamCreator = function (configuration) {
109
3705
  if (configuration) {
110
3706
  baseOptions = configuration.baseOptions;
111
3707
  }
112
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3708
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
113
3709
  const localVarHeaderParameter = {};
114
3710
  const localVarQueryParameter = {};
115
3711
  // authentication bearerAuth required
116
3712
  // http bearer authentication required
117
3713
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3714
+ localVarHeaderParameter['Content-Type'] = 'application/json';
118
3715
  setSearchParams(localVarUrlObj, localVarQueryParameter);
119
3716
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
3717
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3718
+ localVarRequestOptions.data = serializeDataIfNeeded(registerRequestBody, localVarRequestOptions, configuration);
121
3719
  return {
122
3720
  url: toPathString(localVarUrlObj),
123
3721
  options: localVarRequestOptions,
@@ -125,19 +3723,27 @@ export const UsersApiAxiosParamCreator = function (configuration) {
125
3723
  }),
126
3724
  /**
127
3725
  *
128
- * @summary Récupère les informations de l\'utilisateur connecté
3726
+ * @summary Réactive un abonnement utilisateur
3727
+ * @param {string} clubId ID du club
3728
+ * @param {string} subscriptionId ID de l\'abonnement à réactiver
129
3729
  * @param {*} [options] Override http request option.
130
3730
  * @throws {RequiredError}
131
3731
  */
132
- getUserInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
133
- const localVarPath = `/api/users/me`;
3732
+ resumeSubscription: (clubId_1, subscriptionId_1, ...args_1) => __awaiter(this, [clubId_1, subscriptionId_1, ...args_1], void 0, function* (clubId, subscriptionId, options = {}) {
3733
+ // verify required parameter 'clubId' is not null or undefined
3734
+ assertParamExists('resumeSubscription', 'clubId', clubId);
3735
+ // verify required parameter 'subscriptionId' is not null or undefined
3736
+ assertParamExists('resumeSubscription', 'subscriptionId', subscriptionId);
3737
+ const localVarPath = `/api/users/me/subscriptions/{clubId}/{subscriptionId}/resume`
3738
+ .replace(`{${"clubId"}}`, encodeURIComponent(String(clubId)))
3739
+ .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
134
3740
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
135
3741
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
136
3742
  let baseOptions;
137
3743
  if (configuration) {
138
3744
  baseOptions = configuration.baseOptions;
139
3745
  }
140
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3746
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
141
3747
  const localVarHeaderParameter = {};
142
3748
  const localVarQueryParameter = {};
143
3749
  // authentication bearerAuth required
@@ -153,15 +3759,15 @@ export const UsersApiAxiosParamCreator = function (configuration) {
153
3759
  }),
154
3760
  /**
155
3761
  *
156
- * @summary Authentifie un utilisateur
157
- * @param {LoginRequestBody} loginRequestBody
3762
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
3763
+ * @param {GoogleSignInRequestBody} googleSignInRequestBody
158
3764
  * @param {*} [options] Override http request option.
159
3765
  * @throws {RequiredError}
160
3766
  */
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`;
3767
+ signInOrSignUpWithGoogle: (googleSignInRequestBody_1, ...args_1) => __awaiter(this, [googleSignInRequestBody_1, ...args_1], void 0, function* (googleSignInRequestBody, options = {}) {
3768
+ // verify required parameter 'googleSignInRequestBody' is not null or undefined
3769
+ assertParamExists('signInOrSignUpWithGoogle', 'googleSignInRequestBody', googleSignInRequestBody);
3770
+ const localVarPath = `/api/users/googleSignin`;
165
3771
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
3772
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
3773
  let baseOptions;
@@ -178,7 +3784,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
178
3784
  setSearchParams(localVarUrlObj, localVarQueryParameter);
179
3785
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
3786
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
181
- localVarRequestOptions.data = serializeDataIfNeeded(loginRequestBody, localVarRequestOptions, configuration);
3787
+ localVarRequestOptions.data = serializeDataIfNeeded(googleSignInRequestBody, localVarRequestOptions, configuration);
182
3788
  return {
183
3789
  url: toPathString(localVarUrlObj),
184
3790
  options: localVarRequestOptions,
@@ -186,15 +3792,15 @@ export const UsersApiAxiosParamCreator = function (configuration) {
186
3792
  }),
187
3793
  /**
188
3794
  *
189
- * @summary Rafraîchit le token d\'accès
190
- * @param {RefreshTokenRequestBody} refreshTokenRequestBody
3795
+ * @summary Abonne l\'utilisateur connecté à un club
3796
+ * @param {SubscribeToClubRequestBody} subscribeToClubRequestBody
191
3797
  * @param {*} [options] Override http request option.
192
3798
  * @throws {RequiredError}
193
3799
  */
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`;
3800
+ subscribeToClub: (subscribeToClubRequestBody_1, ...args_1) => __awaiter(this, [subscribeToClubRequestBody_1, ...args_1], void 0, function* (subscribeToClubRequestBody, options = {}) {
3801
+ // verify required parameter 'subscribeToClubRequestBody' is not null or undefined
3802
+ assertParamExists('subscribeToClub', 'subscribeToClubRequestBody', subscribeToClubRequestBody);
3803
+ const localVarPath = `/api/users/me/subscribe`;
198
3804
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
3805
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
200
3806
  let baseOptions;
@@ -211,7 +3817,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
211
3817
  setSearchParams(localVarUrlObj, localVarQueryParameter);
212
3818
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
213
3819
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
214
- localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenRequestBody, localVarRequestOptions, configuration);
3820
+ localVarRequestOptions.data = serializeDataIfNeeded(subscribeToClubRequestBody, localVarRequestOptions, configuration);
215
3821
  return {
216
3822
  url: toPathString(localVarUrlObj),
217
3823
  options: localVarRequestOptions,
@@ -219,22 +3825,22 @@ export const UsersApiAxiosParamCreator = function (configuration) {
219
3825
  }),
220
3826
  /**
221
3827
  *
222
- * @summary Crée un nouvel utilisateur
223
- * @param {RegisterRequestBody} registerRequestBody
3828
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
3829
+ * @param {UpdateCustomerRequestBody} updateCustomerRequestBody
224
3830
  * @param {*} [options] Override http request option.
225
3831
  * @throws {RequiredError}
226
3832
  */
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`;
3833
+ updateCustomer: (updateCustomerRequestBody_1, ...args_1) => __awaiter(this, [updateCustomerRequestBody_1, ...args_1], void 0, function* (updateCustomerRequestBody, options = {}) {
3834
+ // verify required parameter 'updateCustomerRequestBody' is not null or undefined
3835
+ assertParamExists('updateCustomer', 'updateCustomerRequestBody', updateCustomerRequestBody);
3836
+ const localVarPath = `/api/users/me/customer`;
231
3837
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
232
3838
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
233
3839
  let baseOptions;
234
3840
  if (configuration) {
235
3841
  baseOptions = configuration.baseOptions;
236
3842
  }
237
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3843
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
238
3844
  const localVarHeaderParameter = {};
239
3845
  const localVarQueryParameter = {};
240
3846
  // authentication bearerAuth required
@@ -244,7 +3850,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
244
3850
  setSearchParams(localVarUrlObj, localVarQueryParameter);
245
3851
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
246
3852
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
247
- localVarRequestOptions.data = serializeDataIfNeeded(registerRequestBody, localVarRequestOptions, configuration);
3853
+ localVarRequestOptions.data = serializeDataIfNeeded(updateCustomerRequestBody, localVarRequestOptions, configuration);
248
3854
  return {
249
3855
  url: toPathString(localVarUrlObj),
250
3856
  options: localVarRequestOptions,
@@ -292,6 +3898,23 @@ export const UsersApiAxiosParamCreator = function (configuration) {
292
3898
  export const UsersApiFp = function (configuration) {
293
3899
  const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration);
294
3900
  return {
3901
+ /**
3902
+ *
3903
+ * @summary Annule un abonnement utilisateur
3904
+ * @param {string} clubId ID du club
3905
+ * @param {string} subscriptionId ID de l\'abonnement à annuler
3906
+ * @param {*} [options] Override http request option.
3907
+ * @throws {RequiredError}
3908
+ */
3909
+ cancelSubscription(clubId, subscriptionId, options) {
3910
+ return __awaiter(this, void 0, void 0, function* () {
3911
+ var _a, _b, _c;
3912
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelSubscription(clubId, subscriptionId, options);
3913
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3914
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.cancelSubscription']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3915
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3916
+ });
3917
+ },
295
3918
  /**
296
3919
  *
297
3920
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -310,14 +3933,26 @@ export const UsersApiFp = function (configuration) {
310
3933
  },
311
3934
  /**
312
3935
  *
313
- * @summary Récupère la liste des utilisateurs
3936
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
3937
+ * @param {number} [limit] Nombre maximum d\'utilisateurs à retourner
3938
+ * @param {number} [skip] Nombre d\'utilisateurs à ignorer (pagination)
3939
+ * @param {string} [search] Recherche dans firstName, lastName, email
3940
+ * @param {string} [sport] Filtre par sport
3941
+ * @param {string} [matchType] Filtre par type de match
3942
+ * @param {string} [niveau] Filtre par niveau
3943
+ * @param {string} [rank] Filtre par rang
3944
+ * @param {GetAllUsersIsLookingForPartnerEnum} [isLookingForPartner] Filtre par disponibilité pour partenaire
3945
+ * @param {string} [username] Filtre par nom d\'utilisateur
3946
+ * @param {string} [email] Filtre par email
3947
+ * @param {string} [description] Filtre par description
3948
+ * @param {string} [gender] Filtre par genre
314
3949
  * @param {*} [options] Override http request option.
315
3950
  * @throws {RequiredError}
316
3951
  */
317
- getAllUsers(options) {
3952
+ getAllUsers(limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options) {
318
3953
  return __awaiter(this, void 0, void 0, function* () {
319
3954
  var _a, _b, _c;
320
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
3955
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options);
321
3956
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
322
3957
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
323
3958
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -338,6 +3973,52 @@ export const UsersApiFp = function (configuration) {
338
3973
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
339
3974
  });
340
3975
  },
3976
+ /**
3977
+ *
3978
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3979
+ * @param {*} [options] Override http request option.
3980
+ * @throws {RequiredError}
3981
+ */
3982
+ getUserRolesInClubs(options) {
3983
+ return __awaiter(this, void 0, void 0, function* () {
3984
+ var _a, _b, _c;
3985
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserRolesInClubs(options);
3986
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3987
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getUserRolesInClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3988
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3989
+ });
3990
+ },
3991
+ /**
3992
+ *
3993
+ * @summary Récupère les abonnements de l\'utilisateur connecté
3994
+ * @param {*} [options] Override http request option.
3995
+ * @throws {RequiredError}
3996
+ */
3997
+ getUserSubscriptions(options) {
3998
+ return __awaiter(this, void 0, void 0, function* () {
3999
+ var _a, _b, _c;
4000
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserSubscriptions(options);
4001
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4002
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getUserSubscriptions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4003
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4004
+ });
4005
+ },
4006
+ /**
4007
+ *
4008
+ * @summary Initie une session d\'abonnement Stripe
4009
+ * @param {InitiateSubscriptionSessionRequestBody} initiateSubscriptionSessionRequestBody
4010
+ * @param {*} [options] Override http request option.
4011
+ * @throws {RequiredError}
4012
+ */
4013
+ initiateSubscriptionSession(initiateSubscriptionSessionRequestBody, options) {
4014
+ return __awaiter(this, void 0, void 0, function* () {
4015
+ var _a, _b, _c;
4016
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateSubscriptionSession(initiateSubscriptionSessionRequestBody, options);
4017
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4018
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.initiateSubscriptionSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4019
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4020
+ });
4021
+ },
341
4022
  /**
342
4023
  *
343
4024
  * @summary Authentifie un utilisateur
@@ -386,6 +4067,71 @@ export const UsersApiFp = function (configuration) {
386
4067
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
387
4068
  });
388
4069
  },
4070
+ /**
4071
+ *
4072
+ * @summary Réactive un abonnement utilisateur
4073
+ * @param {string} clubId ID du club
4074
+ * @param {string} subscriptionId ID de l\'abonnement à réactiver
4075
+ * @param {*} [options] Override http request option.
4076
+ * @throws {RequiredError}
4077
+ */
4078
+ resumeSubscription(clubId, subscriptionId, options) {
4079
+ return __awaiter(this, void 0, void 0, function* () {
4080
+ var _a, _b, _c;
4081
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resumeSubscription(clubId, subscriptionId, options);
4082
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4083
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.resumeSubscription']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4084
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4085
+ });
4086
+ },
4087
+ /**
4088
+ *
4089
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4090
+ * @param {GoogleSignInRequestBody} googleSignInRequestBody
4091
+ * @param {*} [options] Override http request option.
4092
+ * @throws {RequiredError}
4093
+ */
4094
+ signInOrSignUpWithGoogle(googleSignInRequestBody, options) {
4095
+ return __awaiter(this, void 0, void 0, function* () {
4096
+ var _a, _b, _c;
4097
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.signInOrSignUpWithGoogle(googleSignInRequestBody, options);
4098
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4099
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.signInOrSignUpWithGoogle']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4100
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4101
+ });
4102
+ },
4103
+ /**
4104
+ *
4105
+ * @summary Abonne l\'utilisateur connecté à un club
4106
+ * @param {SubscribeToClubRequestBody} subscribeToClubRequestBody
4107
+ * @param {*} [options] Override http request option.
4108
+ * @throws {RequiredError}
4109
+ */
4110
+ subscribeToClub(subscribeToClubRequestBody, options) {
4111
+ return __awaiter(this, void 0, void 0, function* () {
4112
+ var _a, _b, _c;
4113
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.subscribeToClub(subscribeToClubRequestBody, options);
4114
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4115
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.subscribeToClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4116
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4117
+ });
4118
+ },
4119
+ /**
4120
+ *
4121
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4122
+ * @param {UpdateCustomerRequestBody} updateCustomerRequestBody
4123
+ * @param {*} [options] Override http request option.
4124
+ * @throws {RequiredError}
4125
+ */
4126
+ updateCustomer(updateCustomerRequestBody, options) {
4127
+ return __awaiter(this, void 0, void 0, function* () {
4128
+ var _a, _b, _c;
4129
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCustomer(updateCustomerRequestBody, options);
4130
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4131
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.updateCustomer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4132
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4133
+ });
4134
+ },
389
4135
  /**
390
4136
  *
391
4137
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -411,6 +4157,16 @@ export const UsersApiFp = function (configuration) {
411
4157
  export const UsersApiFactory = function (configuration, basePath, axios) {
412
4158
  const localVarFp = UsersApiFp(configuration);
413
4159
  return {
4160
+ /**
4161
+ *
4162
+ * @summary Annule un abonnement utilisateur
4163
+ * @param {UsersApiCancelSubscriptionRequest} requestParameters Request parameters.
4164
+ * @param {*} [options] Override http request option.
4165
+ * @throws {RequiredError}
4166
+ */
4167
+ cancelSubscription(requestParameters, options) {
4168
+ return localVarFp.cancelSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(axios, basePath));
4169
+ },
414
4170
  /**
415
4171
  *
416
4172
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -423,12 +4179,13 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
423
4179
  },
424
4180
  /**
425
4181
  *
426
- * @summary Récupère la liste des utilisateurs
4182
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
4183
+ * @param {UsersApiGetAllUsersRequest} requestParameters Request parameters.
427
4184
  * @param {*} [options] Override http request option.
428
4185
  * @throws {RequiredError}
429
4186
  */
430
- getAllUsers(options) {
431
- return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
4187
+ getAllUsers(requestParameters = {}, options) {
4188
+ return localVarFp.getAllUsers(requestParameters.limit, requestParameters.skip, requestParameters.search, requestParameters.sport, requestParameters.matchType, requestParameters.niveau, requestParameters.rank, requestParameters.isLookingForPartner, requestParameters.username, requestParameters.email, requestParameters.description, requestParameters.gender, options).then((request) => request(axios, basePath));
432
4189
  },
433
4190
  /**
434
4191
  *
@@ -439,6 +4196,34 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
439
4196
  getUserInfo(options) {
440
4197
  return localVarFp.getUserInfo(options).then((request) => request(axios, basePath));
441
4198
  },
4199
+ /**
4200
+ *
4201
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
4202
+ * @param {*} [options] Override http request option.
4203
+ * @throws {RequiredError}
4204
+ */
4205
+ getUserRolesInClubs(options) {
4206
+ return localVarFp.getUserRolesInClubs(options).then((request) => request(axios, basePath));
4207
+ },
4208
+ /**
4209
+ *
4210
+ * @summary Récupère les abonnements de l\'utilisateur connecté
4211
+ * @param {*} [options] Override http request option.
4212
+ * @throws {RequiredError}
4213
+ */
4214
+ getUserSubscriptions(options) {
4215
+ return localVarFp.getUserSubscriptions(options).then((request) => request(axios, basePath));
4216
+ },
4217
+ /**
4218
+ *
4219
+ * @summary Initie une session d\'abonnement Stripe
4220
+ * @param {UsersApiInitiateSubscriptionSessionRequest} requestParameters Request parameters.
4221
+ * @param {*} [options] Override http request option.
4222
+ * @throws {RequiredError}
4223
+ */
4224
+ initiateSubscriptionSession(requestParameters, options) {
4225
+ return localVarFp.initiateSubscriptionSession(requestParameters.initiateSubscriptionSessionRequestBody, options).then((request) => request(axios, basePath));
4226
+ },
442
4227
  /**
443
4228
  *
444
4229
  * @summary Authentifie un utilisateur
@@ -469,6 +4254,46 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
469
4254
  register(requestParameters, options) {
470
4255
  return localVarFp.register(requestParameters.registerRequestBody, options).then((request) => request(axios, basePath));
471
4256
  },
4257
+ /**
4258
+ *
4259
+ * @summary Réactive un abonnement utilisateur
4260
+ * @param {UsersApiResumeSubscriptionRequest} requestParameters Request parameters.
4261
+ * @param {*} [options] Override http request option.
4262
+ * @throws {RequiredError}
4263
+ */
4264
+ resumeSubscription(requestParameters, options) {
4265
+ return localVarFp.resumeSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(axios, basePath));
4266
+ },
4267
+ /**
4268
+ *
4269
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4270
+ * @param {UsersApiSignInOrSignUpWithGoogleRequest} requestParameters Request parameters.
4271
+ * @param {*} [options] Override http request option.
4272
+ * @throws {RequiredError}
4273
+ */
4274
+ signInOrSignUpWithGoogle(requestParameters, options) {
4275
+ return localVarFp.signInOrSignUpWithGoogle(requestParameters.googleSignInRequestBody, options).then((request) => request(axios, basePath));
4276
+ },
4277
+ /**
4278
+ *
4279
+ * @summary Abonne l\'utilisateur connecté à un club
4280
+ * @param {UsersApiSubscribeToClubRequest} requestParameters Request parameters.
4281
+ * @param {*} [options] Override http request option.
4282
+ * @throws {RequiredError}
4283
+ */
4284
+ subscribeToClub(requestParameters, options) {
4285
+ return localVarFp.subscribeToClub(requestParameters.subscribeToClubRequestBody, options).then((request) => request(axios, basePath));
4286
+ },
4287
+ /**
4288
+ *
4289
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4290
+ * @param {UsersApiUpdateCustomerRequest} requestParameters Request parameters.
4291
+ * @param {*} [options] Override http request option.
4292
+ * @throws {RequiredError}
4293
+ */
4294
+ updateCustomer(requestParameters, options) {
4295
+ return localVarFp.updateCustomer(requestParameters.updateCustomerRequestBody, options).then((request) => request(axios, basePath));
4296
+ },
472
4297
  /**
473
4298
  *
474
4299
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -488,6 +4313,17 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
488
4313
  * @extends {BaseAPI}
489
4314
  */
490
4315
  export class UsersApi extends BaseAPI {
4316
+ /**
4317
+ *
4318
+ * @summary Annule un abonnement utilisateur
4319
+ * @param {UsersApiCancelSubscriptionRequest} requestParameters Request parameters.
4320
+ * @param {*} [options] Override http request option.
4321
+ * @throws {RequiredError}
4322
+ * @memberof UsersApi
4323
+ */
4324
+ cancelSubscription(requestParameters, options) {
4325
+ return UsersApiFp(this.configuration).cancelSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(this.axios, this.basePath));
4326
+ }
491
4327
  /**
492
4328
  *
493
4329
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -501,13 +4337,14 @@ export class UsersApi extends BaseAPI {
501
4337
  }
502
4338
  /**
503
4339
  *
504
- * @summary Récupère la liste des utilisateurs
4340
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
4341
+ * @param {UsersApiGetAllUsersRequest} requestParameters Request parameters.
505
4342
  * @param {*} [options] Override http request option.
506
4343
  * @throws {RequiredError}
507
4344
  * @memberof UsersApi
508
4345
  */
509
- getAllUsers(options) {
510
- return UsersApiFp(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
4346
+ getAllUsers(requestParameters = {}, options) {
4347
+ return UsersApiFp(this.configuration).getAllUsers(requestParameters.limit, requestParameters.skip, requestParameters.search, requestParameters.sport, requestParameters.matchType, requestParameters.niveau, requestParameters.rank, requestParameters.isLookingForPartner, requestParameters.username, requestParameters.email, requestParameters.description, requestParameters.gender, options).then((request) => request(this.axios, this.basePath));
511
4348
  }
512
4349
  /**
513
4350
  *
@@ -519,6 +4356,37 @@ export class UsersApi extends BaseAPI {
519
4356
  getUserInfo(options) {
520
4357
  return UsersApiFp(this.configuration).getUserInfo(options).then((request) => request(this.axios, this.basePath));
521
4358
  }
4359
+ /**
4360
+ *
4361
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
4362
+ * @param {*} [options] Override http request option.
4363
+ * @throws {RequiredError}
4364
+ * @memberof UsersApi
4365
+ */
4366
+ getUserRolesInClubs(options) {
4367
+ return UsersApiFp(this.configuration).getUserRolesInClubs(options).then((request) => request(this.axios, this.basePath));
4368
+ }
4369
+ /**
4370
+ *
4371
+ * @summary Récupère les abonnements de l\'utilisateur connecté
4372
+ * @param {*} [options] Override http request option.
4373
+ * @throws {RequiredError}
4374
+ * @memberof UsersApi
4375
+ */
4376
+ getUserSubscriptions(options) {
4377
+ return UsersApiFp(this.configuration).getUserSubscriptions(options).then((request) => request(this.axios, this.basePath));
4378
+ }
4379
+ /**
4380
+ *
4381
+ * @summary Initie une session d\'abonnement Stripe
4382
+ * @param {UsersApiInitiateSubscriptionSessionRequest} requestParameters Request parameters.
4383
+ * @param {*} [options] Override http request option.
4384
+ * @throws {RequiredError}
4385
+ * @memberof UsersApi
4386
+ */
4387
+ initiateSubscriptionSession(requestParameters, options) {
4388
+ return UsersApiFp(this.configuration).initiateSubscriptionSession(requestParameters.initiateSubscriptionSessionRequestBody, options).then((request) => request(this.axios, this.basePath));
4389
+ }
522
4390
  /**
523
4391
  *
524
4392
  * @summary Authentifie un utilisateur
@@ -552,6 +4420,50 @@ export class UsersApi extends BaseAPI {
552
4420
  register(requestParameters, options) {
553
4421
  return UsersApiFp(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
554
4422
  }
4423
+ /**
4424
+ *
4425
+ * @summary Réactive un abonnement utilisateur
4426
+ * @param {UsersApiResumeSubscriptionRequest} requestParameters Request parameters.
4427
+ * @param {*} [options] Override http request option.
4428
+ * @throws {RequiredError}
4429
+ * @memberof UsersApi
4430
+ */
4431
+ resumeSubscription(requestParameters, options) {
4432
+ return UsersApiFp(this.configuration).resumeSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(this.axios, this.basePath));
4433
+ }
4434
+ /**
4435
+ *
4436
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4437
+ * @param {UsersApiSignInOrSignUpWithGoogleRequest} requestParameters Request parameters.
4438
+ * @param {*} [options] Override http request option.
4439
+ * @throws {RequiredError}
4440
+ * @memberof UsersApi
4441
+ */
4442
+ signInOrSignUpWithGoogle(requestParameters, options) {
4443
+ return UsersApiFp(this.configuration).signInOrSignUpWithGoogle(requestParameters.googleSignInRequestBody, options).then((request) => request(this.axios, this.basePath));
4444
+ }
4445
+ /**
4446
+ *
4447
+ * @summary Abonne l\'utilisateur connecté à un club
4448
+ * @param {UsersApiSubscribeToClubRequest} requestParameters Request parameters.
4449
+ * @param {*} [options] Override http request option.
4450
+ * @throws {RequiredError}
4451
+ * @memberof UsersApi
4452
+ */
4453
+ subscribeToClub(requestParameters, options) {
4454
+ return UsersApiFp(this.configuration).subscribeToClub(requestParameters.subscribeToClubRequestBody, options).then((request) => request(this.axios, this.basePath));
4455
+ }
4456
+ /**
4457
+ *
4458
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4459
+ * @param {UsersApiUpdateCustomerRequest} requestParameters Request parameters.
4460
+ * @param {*} [options] Override http request option.
4461
+ * @throws {RequiredError}
4462
+ * @memberof UsersApi
4463
+ */
4464
+ updateCustomer(requestParameters, options) {
4465
+ return UsersApiFp(this.configuration).updateCustomer(requestParameters.updateCustomerRequestBody, options).then((request) => request(this.axios, this.basePath));
4466
+ }
555
4467
  /**
556
4468
  *
557
4469
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -564,3 +4476,10 @@ export class UsersApi extends BaseAPI {
564
4476
  return UsersApiFp(this.configuration).updateUser(requestParameters.updateUserRequestBody, options).then((request) => request(this.axios, this.basePath));
565
4477
  }
566
4478
  }
4479
+ /**
4480
+ * @export
4481
+ */
4482
+ export const GetAllUsersIsLookingForPartnerEnum = {
4483
+ True: 'true',
4484
+ False: 'false'
4485
+ };