@tennac-booking/sdk 1.0.11 → 1.0.12

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 (66) hide show
  1. package/.openapi-generator/FILES +56 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +86 -0
  4. package/api.ts +6087 -308
  5. package/common.ts +4 -4
  6. package/dist/api.d.ts +4105 -243
  7. package/dist/api.js +3265 -9
  8. package/dist/esm/api.d.ts +4105 -243
  9. package/dist/esm/api.js +3228 -8
  10. package/docs/AddClubMemberRequest.md +22 -0
  11. package/docs/AddClubMemberResponse.md +22 -0
  12. package/docs/BlockSlotResponse.md +22 -0
  13. package/docs/BookingResponse.md +28 -0
  14. package/docs/BookingsApi.md +120 -0
  15. package/docs/Club.md +46 -0
  16. package/docs/ClubCourtsApi.md +118 -0
  17. package/docs/ClubInfoResponse.md +46 -0
  18. package/docs/ClubListResponse.md +22 -0
  19. package/docs/ClubMember.md +34 -0
  20. package/docs/ClubMembersResponse.md +22 -0
  21. package/docs/ClubResponse.md +46 -0
  22. package/docs/ClubRole.md +30 -0
  23. package/docs/ClubRoleResponse.md +30 -0
  24. package/docs/ClubRolesApi.md +268 -0
  25. package/docs/ClubRolesResponse.md +22 -0
  26. package/docs/ClubSettings.md +28 -0
  27. package/docs/ClubSettingsApi.md +227 -0
  28. package/docs/ClubSlotsApi.md +300 -0
  29. package/docs/ClubSportsApi.md +118 -0
  30. package/docs/ClubSubscriptionsApi.md +408 -0
  31. package/docs/ClubsApi.md +432 -0
  32. package/docs/CourtResponse.md +44 -0
  33. package/docs/CourtsResponse.md +22 -0
  34. package/docs/CreateBookingRequest.md +28 -0
  35. package/docs/CreateClubRequest.md +38 -0
  36. package/docs/CreateClubRoleRequestBody.md +24 -0
  37. package/docs/CreateCourtRequest.md +34 -0
  38. package/docs/CreatePriceRequest.md +26 -0
  39. package/docs/CreateSportRequest.md +22 -0
  40. package/docs/CreateSubscriptionPlanRequest.md +24 -0
  41. package/docs/DeleteClub200Response.md +20 -0
  42. package/docs/DeleteClubRole200Response.md +20 -0
  43. package/docs/DeleteSlotsByClubInRange200Response.md +20 -0
  44. package/docs/GenerateSlotsForNextThreeWeeks201Response.md +20 -0
  45. package/docs/GetAllSportsRequest.md +20 -0
  46. package/docs/GetClubSettingsRequest.md +20 -0
  47. package/docs/GetUserRolesInClubs200Response.md +20 -0
  48. package/docs/PaymentMethod.md +11 -0
  49. package/docs/PlayerWithPaymentMethod.md +22 -0
  50. package/docs/PriceResponse.md +38 -0
  51. package/docs/RestoreSubscriptionPlanForClub200Response.md +20 -0
  52. package/docs/SlotResponse.md +40 -0
  53. package/docs/SlotsResponse.md +22 -0
  54. package/docs/Sport.md +24 -0
  55. package/docs/SportResponse.md +34 -0
  56. package/docs/SportsApi.md +229 -0
  57. package/docs/SportsResponse.md +22 -0
  58. package/docs/SubscriptionPlan.md +36 -0
  59. package/docs/SubscriptionPlanResponse.md +36 -0
  60. package/docs/UpdateClubRequest.md +40 -0
  61. package/docs/UpdateClubRoleRequestBody.md +24 -0
  62. package/docs/UpdateSportRequest.md +20 -0
  63. package/docs/UpdateSubscriptionPlanRequest.md +24 -0
  64. package/docs/UpdateSubscriptionPlanResponse.md +22 -0
  65. package/docs/UsersApi.md +65 -18
  66. package/package.json +1 -33
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.StripeStatus = exports.CourtStatus = exports.BookingStatus = void 0;
25
+ exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.SportsApi = exports.SportsApiFactory = exports.SportsApiFp = exports.SportsApiAxiosParamCreator = exports.ClubsApi = exports.ClubsApiFactory = exports.ClubsApiFp = exports.ClubsApiAxiosParamCreator = exports.ClubSubscriptionsApi = exports.ClubSubscriptionsApiFactory = exports.ClubSubscriptionsApiFp = exports.ClubSubscriptionsApiAxiosParamCreator = exports.ClubSportsApi = exports.ClubSportsApiFactory = exports.ClubSportsApiFp = exports.ClubSportsApiAxiosParamCreator = exports.ClubSlotsApi = exports.ClubSlotsApiFactory = exports.ClubSlotsApiFp = exports.ClubSlotsApiAxiosParamCreator = exports.ClubSettingsApi = exports.ClubSettingsApiFactory = exports.ClubSettingsApiFp = exports.ClubSettingsApiAxiosParamCreator = exports.ClubRolesApi = exports.ClubRolesApiFactory = exports.ClubRolesApiFp = exports.ClubRolesApiAxiosParamCreator = exports.ClubCourtsApi = exports.ClubCourtsApiFactory = exports.ClubCourtsApiFp = exports.ClubCourtsApiAxiosParamCreator = exports.BookingsApi = exports.BookingsApiFactory = exports.BookingsApiFp = exports.BookingsApiAxiosParamCreator = exports.StripeStatus = exports.PriceResponseIntervalEnum = exports.PaymentMethod = exports.CreatePriceRequestIntervalEnum = exports.CourtStatus = exports.BookingStatus = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -47,18 +47,3212 @@ exports.CourtStatus = {
47
47
  Available: 'available',
48
48
  Unavailable: 'unavailable'
49
49
  };
50
+ exports.CreatePriceRequestIntervalEnum = {
51
+ Day: 'day',
52
+ Week: 'week',
53
+ Month: 'month',
54
+ Year: 'year'
55
+ };
56
+ /**
57
+ * Méthode de paiement
58
+ * @export
59
+ * @enum {string}
60
+ */
61
+ exports.PaymentMethod = {
62
+ Online: 'online',
63
+ Onsite: 'onsite'
64
+ };
65
+ exports.PriceResponseIntervalEnum = {
66
+ Day: 'day',
67
+ Week: 'week',
68
+ Month: 'month',
69
+ Year: 'year'
70
+ };
71
+ /**
72
+ *
73
+ * @export
74
+ * @enum {string}
75
+ */
76
+ exports.StripeStatus = {
77
+ Pending: 'pending',
78
+ Paid: 'paid',
79
+ Failed: 'failed',
80
+ Refunded: 'refunded',
81
+ Canceled: 'canceled'
82
+ };
83
+ /**
84
+ * BookingsApi - axios parameter creator
85
+ * @export
86
+ */
87
+ const BookingsApiAxiosParamCreator = function (configuration) {
88
+ return {
89
+ /**
90
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
91
+ * @summary Créer une réservation
92
+ * @param {CreateBookingRequest} createBookingRequest
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ bookingsPost: (createBookingRequest_1, ...args_1) => __awaiter(this, [createBookingRequest_1, ...args_1], void 0, function* (createBookingRequest, options = {}) {
97
+ // verify required parameter 'createBookingRequest' is not null or undefined
98
+ (0, common_1.assertParamExists)('bookingsPost', 'createBookingRequest', createBookingRequest);
99
+ const localVarPath = `/bookings`;
100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
101
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
102
+ let baseOptions;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ }
106
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
107
+ const localVarHeaderParameter = {};
108
+ const localVarQueryParameter = {};
109
+ // authentication bearerAuth required
110
+ // http bearer authentication required
111
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
112
+ localVarHeaderParameter['Content-Type'] = 'application/json';
113
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
116
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createBookingRequest, localVarRequestOptions, configuration);
117
+ return {
118
+ url: (0, common_1.toPathString)(localVarUrlObj),
119
+ options: localVarRequestOptions,
120
+ };
121
+ }),
122
+ /**
123
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
124
+ * @summary Bloquer un créneau
125
+ * @param {string} slotId ID MongoDB du créneau à bloquer
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ bookingsPreBookSlotIdPatch: (slotId_1, ...args_1) => __awaiter(this, [slotId_1, ...args_1], void 0, function* (slotId, options = {}) {
130
+ // verify required parameter 'slotId' is not null or undefined
131
+ (0, common_1.assertParamExists)('bookingsPreBookSlotIdPatch', 'slotId', slotId);
132
+ const localVarPath = `/bookings/pre-book/{slotId}`
133
+ .replace(`{${"slotId"}}`, encodeURIComponent(String(slotId)));
134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
135
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
136
+ let baseOptions;
137
+ if (configuration) {
138
+ baseOptions = configuration.baseOptions;
139
+ }
140
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
141
+ const localVarHeaderParameter = {};
142
+ const localVarQueryParameter = {};
143
+ // authentication bearerAuth required
144
+ // http bearer authentication required
145
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
146
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
149
+ return {
150
+ url: (0, common_1.toPathString)(localVarUrlObj),
151
+ options: localVarRequestOptions,
152
+ };
153
+ }),
154
+ };
155
+ };
156
+ exports.BookingsApiAxiosParamCreator = BookingsApiAxiosParamCreator;
157
+ /**
158
+ * BookingsApi - functional programming interface
159
+ * @export
160
+ */
161
+ const BookingsApiFp = function (configuration) {
162
+ const localVarAxiosParamCreator = (0, exports.BookingsApiAxiosParamCreator)(configuration);
163
+ return {
164
+ /**
165
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
166
+ * @summary Créer une réservation
167
+ * @param {CreateBookingRequest} createBookingRequest
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ */
171
+ bookingsPost(createBookingRequest, options) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ var _a, _b, _c;
174
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bookingsPost(createBookingRequest, options);
175
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
176
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BookingsApi.bookingsPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
177
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
178
+ });
179
+ },
180
+ /**
181
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
182
+ * @summary Bloquer un créneau
183
+ * @param {string} slotId ID MongoDB du créneau à bloquer
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ bookingsPreBookSlotIdPatch(slotId, options) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ var _a, _b, _c;
190
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bookingsPreBookSlotIdPatch(slotId, options);
191
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
192
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BookingsApi.bookingsPreBookSlotIdPatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
193
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
194
+ });
195
+ },
196
+ };
197
+ };
198
+ exports.BookingsApiFp = BookingsApiFp;
199
+ /**
200
+ * BookingsApi - factory interface
201
+ * @export
202
+ */
203
+ const BookingsApiFactory = function (configuration, basePath, axios) {
204
+ const localVarFp = (0, exports.BookingsApiFp)(configuration);
205
+ return {
206
+ /**
207
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
208
+ * @summary Créer une réservation
209
+ * @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
210
+ * @param {*} [options] Override http request option.
211
+ * @throws {RequiredError}
212
+ */
213
+ bookingsPost(requestParameters, options) {
214
+ return localVarFp.bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(axios, basePath));
215
+ },
216
+ /**
217
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
218
+ * @summary Bloquer un créneau
219
+ * @param {BookingsApiBookingsPreBookSlotIdPatchRequest} requestParameters Request parameters.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ bookingsPreBookSlotIdPatch(requestParameters, options) {
224
+ return localVarFp.bookingsPreBookSlotIdPatch(requestParameters.slotId, options).then((request) => request(axios, basePath));
225
+ },
226
+ };
227
+ };
228
+ exports.BookingsApiFactory = BookingsApiFactory;
229
+ /**
230
+ * BookingsApi - object-oriented interface
231
+ * @export
232
+ * @class BookingsApi
233
+ * @extends {BaseAPI}
234
+ */
235
+ class BookingsApi extends base_1.BaseAPI {
236
+ /**
237
+ * Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
238
+ * @summary Créer une réservation
239
+ * @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ * @memberof BookingsApi
243
+ */
244
+ bookingsPost(requestParameters, options) {
245
+ return (0, exports.BookingsApiFp)(this.configuration).bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(this.axios, this.basePath));
246
+ }
247
+ /**
248
+ * Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
249
+ * @summary Bloquer un créneau
250
+ * @param {BookingsApiBookingsPreBookSlotIdPatchRequest} requestParameters Request parameters.
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ * @memberof BookingsApi
254
+ */
255
+ bookingsPreBookSlotIdPatch(requestParameters, options) {
256
+ return (0, exports.BookingsApiFp)(this.configuration).bookingsPreBookSlotIdPatch(requestParameters.slotId, options).then((request) => request(this.axios, this.basePath));
257
+ }
258
+ }
259
+ exports.BookingsApi = BookingsApi;
260
+ /**
261
+ * ClubCourtsApi - axios parameter creator
262
+ * @export
263
+ */
264
+ const ClubCourtsApiAxiosParamCreator = function (configuration) {
265
+ return {
266
+ /**
267
+ *
268
+ * @summary Créer un terrain pour un club
269
+ * @param {string} id ID du club
270
+ * @param {CreateCourtRequest} createCourtRequest
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ createCourtForClub: (id_1, createCourtRequest_1, ...args_1) => __awaiter(this, [id_1, createCourtRequest_1, ...args_1], void 0, function* (id, createCourtRequest, options = {}) {
275
+ // verify required parameter 'id' is not null or undefined
276
+ (0, common_1.assertParamExists)('createCourtForClub', 'id', id);
277
+ // verify required parameter 'createCourtRequest' is not null or undefined
278
+ (0, common_1.assertParamExists)('createCourtForClub', 'createCourtRequest', createCourtRequest);
279
+ const localVarPath = `/api/clubs/{id}/courts`
280
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
281
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
282
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
283
+ let baseOptions;
284
+ if (configuration) {
285
+ baseOptions = configuration.baseOptions;
286
+ }
287
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
288
+ const localVarHeaderParameter = {};
289
+ const localVarQueryParameter = {};
290
+ // authentication bearerAuth required
291
+ // http bearer authentication required
292
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
293
+ localVarHeaderParameter['Content-Type'] = 'application/json';
294
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
295
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
296
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
297
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCourtRequest, localVarRequestOptions, configuration);
298
+ return {
299
+ url: (0, common_1.toPathString)(localVarUrlObj),
300
+ options: localVarRequestOptions,
301
+ };
302
+ }),
303
+ /**
304
+ *
305
+ * @summary Récupérer tous les terrains pour un club
306
+ * @param {string} id ID du club
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ getCourtsByClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
311
+ // verify required parameter 'id' is not null or undefined
312
+ (0, common_1.assertParamExists)('getCourtsByClub', 'id', id);
313
+ const localVarPath = `/api/clubs/{id}/courts`
314
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
315
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
316
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
317
+ let baseOptions;
318
+ if (configuration) {
319
+ baseOptions = configuration.baseOptions;
320
+ }
321
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
322
+ const localVarHeaderParameter = {};
323
+ const localVarQueryParameter = {};
324
+ // authentication bearerAuth required
325
+ // http bearer authentication required
326
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
327
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
328
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ return {
331
+ url: (0, common_1.toPathString)(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ };
334
+ }),
335
+ };
336
+ };
337
+ exports.ClubCourtsApiAxiosParamCreator = ClubCourtsApiAxiosParamCreator;
338
+ /**
339
+ * ClubCourtsApi - functional programming interface
340
+ * @export
341
+ */
342
+ const ClubCourtsApiFp = function (configuration) {
343
+ const localVarAxiosParamCreator = (0, exports.ClubCourtsApiAxiosParamCreator)(configuration);
344
+ return {
345
+ /**
346
+ *
347
+ * @summary Créer un terrain pour un club
348
+ * @param {string} id ID du club
349
+ * @param {CreateCourtRequest} createCourtRequest
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ createCourtForClub(id, createCourtRequest, options) {
354
+ return __awaiter(this, void 0, void 0, function* () {
355
+ var _a, _b, _c;
356
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCourtForClub(id, createCourtRequest, options);
357
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
358
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubCourtsApi.createCourtForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
359
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
360
+ });
361
+ },
362
+ /**
363
+ *
364
+ * @summary Récupérer tous les terrains pour un club
365
+ * @param {string} id ID du club
366
+ * @param {*} [options] Override http request option.
367
+ * @throws {RequiredError}
368
+ */
369
+ getCourtsByClub(id, options) {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ var _a, _b, _c;
372
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCourtsByClub(id, options);
373
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
374
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubCourtsApi.getCourtsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
375
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
376
+ });
377
+ },
378
+ };
379
+ };
380
+ exports.ClubCourtsApiFp = ClubCourtsApiFp;
381
+ /**
382
+ * ClubCourtsApi - factory interface
383
+ * @export
384
+ */
385
+ const ClubCourtsApiFactory = function (configuration, basePath, axios) {
386
+ const localVarFp = (0, exports.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
+ exports.ClubCourtsApiFactory = ClubCourtsApiFactory;
411
+ /**
412
+ * ClubCourtsApi - object-oriented interface
413
+ * @export
414
+ * @class ClubCourtsApi
415
+ * @extends {BaseAPI}
416
+ */
417
+ class ClubCourtsApi extends base_1.BaseAPI {
418
+ /**
419
+ *
420
+ * @summary Créer un terrain pour un club
421
+ * @param {ClubCourtsApiCreateCourtForClubRequest} requestParameters Request parameters.
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ * @memberof ClubCourtsApi
425
+ */
426
+ createCourtForClub(requestParameters, options) {
427
+ return (0, exports.ClubCourtsApiFp)(this.configuration).createCourtForClub(requestParameters.id, requestParameters.createCourtRequest, options).then((request) => request(this.axios, this.basePath));
428
+ }
429
+ /**
430
+ *
431
+ * @summary Récupérer tous les terrains pour un club
432
+ * @param {ClubCourtsApiGetCourtsByClubRequest} requestParameters Request parameters.
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ * @memberof ClubCourtsApi
436
+ */
437
+ getCourtsByClub(requestParameters, options) {
438
+ return (0, exports.ClubCourtsApiFp)(this.configuration).getCourtsByClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
439
+ }
440
+ }
441
+ exports.ClubCourtsApi = ClubCourtsApi;
442
+ /**
443
+ * ClubRolesApi - axios parameter creator
444
+ * @export
445
+ */
446
+ const ClubRolesApiAxiosParamCreator = function (configuration) {
447
+ return {
448
+ /**
449
+ *
450
+ * @summary Crée un nouveau rôle de club
451
+ * @param {CreateClubRoleRequestBody} createClubRoleRequestBody
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ createClubRole: (createClubRoleRequestBody_1, ...args_1) => __awaiter(this, [createClubRoleRequestBody_1, ...args_1], void 0, function* (createClubRoleRequestBody, options = {}) {
456
+ // verify required parameter 'createClubRoleRequestBody' is not null or undefined
457
+ (0, common_1.assertParamExists)('createClubRole', 'createClubRoleRequestBody', createClubRoleRequestBody);
458
+ const localVarPath = `/api/club-roles`;
459
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
460
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
461
+ let baseOptions;
462
+ if (configuration) {
463
+ baseOptions = configuration.baseOptions;
464
+ }
465
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
466
+ const localVarHeaderParameter = {};
467
+ const localVarQueryParameter = {};
468
+ // authentication bearerAuth required
469
+ // http bearer authentication required
470
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
471
+ localVarHeaderParameter['Content-Type'] = 'application/json';
472
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
473
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
474
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
475
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createClubRoleRequestBody, localVarRequestOptions, configuration);
476
+ return {
477
+ url: (0, common_1.toPathString)(localVarUrlObj),
478
+ options: localVarRequestOptions,
479
+ };
480
+ }),
481
+ /**
482
+ *
483
+ * @summary Supprime un rôle de club
484
+ * @param {string} id ID du rôle de club
485
+ * @param {*} [options] Override http request option.
486
+ * @throws {RequiredError}
487
+ */
488
+ deleteClubRole: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
489
+ // verify required parameter 'id' is not null or undefined
490
+ (0, common_1.assertParamExists)('deleteClubRole', 'id', id);
491
+ const localVarPath = `/api/club-roles/{id}`
492
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
493
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
494
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
495
+ let baseOptions;
496
+ if (configuration) {
497
+ baseOptions = configuration.baseOptions;
498
+ }
499
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
500
+ const localVarHeaderParameter = {};
501
+ const localVarQueryParameter = {};
502
+ // authentication bearerAuth required
503
+ // http bearer authentication required
504
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
505
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
506
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
507
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
508
+ return {
509
+ url: (0, common_1.toPathString)(localVarUrlObj),
510
+ options: localVarRequestOptions,
511
+ };
512
+ }),
513
+ /**
514
+ *
515
+ * @summary Récupère tous les rôles de clubs
516
+ * @param {*} [options] Override http request option.
517
+ * @throws {RequiredError}
518
+ */
519
+ getAllClubRoles: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
520
+ const localVarPath = `/api/club-roles`;
521
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
522
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
523
+ let baseOptions;
524
+ if (configuration) {
525
+ baseOptions = configuration.baseOptions;
526
+ }
527
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
528
+ const localVarHeaderParameter = {};
529
+ const localVarQueryParameter = {};
530
+ // authentication bearerAuth required
531
+ // http bearer authentication required
532
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
533
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
534
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
535
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
536
+ return {
537
+ url: (0, common_1.toPathString)(localVarUrlObj),
538
+ options: localVarRequestOptions,
539
+ };
540
+ }),
541
+ /**
542
+ *
543
+ * @summary Récupère un rôle de club par son ID
544
+ * @param {string} id ID du rôle de club
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ getClubRoleById: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
549
+ // verify required parameter 'id' is not null or undefined
550
+ (0, common_1.assertParamExists)('getClubRoleById', 'id', id);
551
+ const localVarPath = `/api/club-roles/{id}`
552
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
553
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
554
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
555
+ let baseOptions;
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ }
559
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
560
+ const localVarHeaderParameter = {};
561
+ const localVarQueryParameter = {};
562
+ // authentication bearerAuth required
563
+ // http bearer authentication required
564
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
565
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
566
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
567
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
568
+ return {
569
+ url: (0, common_1.toPathString)(localVarUrlObj),
570
+ options: localVarRequestOptions,
571
+ };
572
+ }),
573
+ /**
574
+ *
575
+ * @summary Met à jour un rôle de club
576
+ * @param {string} id ID du rôle de club
577
+ * @param {UpdateClubRoleRequestBody} updateClubRoleRequestBody
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ updateClubRole: (id_1, updateClubRoleRequestBody_1, ...args_1) => __awaiter(this, [id_1, updateClubRoleRequestBody_1, ...args_1], void 0, function* (id, updateClubRoleRequestBody, options = {}) {
582
+ // verify required parameter 'id' is not null or undefined
583
+ (0, common_1.assertParamExists)('updateClubRole', 'id', id);
584
+ // verify required parameter 'updateClubRoleRequestBody' is not null or undefined
585
+ (0, common_1.assertParamExists)('updateClubRole', 'updateClubRoleRequestBody', updateClubRoleRequestBody);
586
+ const localVarPath = `/api/club-roles/{id}`
587
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
588
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
589
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
590
+ let baseOptions;
591
+ if (configuration) {
592
+ baseOptions = configuration.baseOptions;
593
+ }
594
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
595
+ const localVarHeaderParameter = {};
596
+ const localVarQueryParameter = {};
597
+ // authentication bearerAuth required
598
+ // http bearer authentication required
599
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
600
+ localVarHeaderParameter['Content-Type'] = 'application/json';
601
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
602
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
603
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
604
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClubRoleRequestBody, localVarRequestOptions, configuration);
605
+ return {
606
+ url: (0, common_1.toPathString)(localVarUrlObj),
607
+ options: localVarRequestOptions,
608
+ };
609
+ }),
610
+ };
611
+ };
612
+ exports.ClubRolesApiAxiosParamCreator = ClubRolesApiAxiosParamCreator;
613
+ /**
614
+ * ClubRolesApi - functional programming interface
615
+ * @export
616
+ */
617
+ const ClubRolesApiFp = function (configuration) {
618
+ const localVarAxiosParamCreator = (0, exports.ClubRolesApiAxiosParamCreator)(configuration);
619
+ return {
620
+ /**
621
+ *
622
+ * @summary Crée un nouveau rôle de club
623
+ * @param {CreateClubRoleRequestBody} createClubRoleRequestBody
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ */
627
+ createClubRole(createClubRoleRequestBody, options) {
628
+ return __awaiter(this, void 0, void 0, function* () {
629
+ var _a, _b, _c;
630
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClubRole(createClubRoleRequestBody, options);
631
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
632
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubRolesApi.createClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
633
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
634
+ });
635
+ },
636
+ /**
637
+ *
638
+ * @summary Supprime un rôle de club
639
+ * @param {string} id ID du rôle de club
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ */
643
+ deleteClubRole(id, options) {
644
+ return __awaiter(this, void 0, void 0, function* () {
645
+ var _a, _b, _c;
646
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClubRole(id, options);
647
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
648
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubRolesApi.deleteClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
649
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
650
+ });
651
+ },
652
+ /**
653
+ *
654
+ * @summary Récupère tous les rôles de clubs
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ getAllClubRoles(options) {
659
+ return __awaiter(this, void 0, void 0, function* () {
660
+ var _a, _b, _c;
661
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllClubRoles(options);
662
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
663
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubRolesApi.getAllClubRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
664
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
665
+ });
666
+ },
667
+ /**
668
+ *
669
+ * @summary Récupère un rôle de club par son ID
670
+ * @param {string} id ID du rôle de club
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ */
674
+ getClubRoleById(id, options) {
675
+ return __awaiter(this, void 0, void 0, function* () {
676
+ var _a, _b, _c;
677
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubRoleById(id, options);
678
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
679
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubRolesApi.getClubRoleById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
680
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
681
+ });
682
+ },
683
+ /**
684
+ *
685
+ * @summary Met à jour un rôle de club
686
+ * @param {string} id ID du rôle de club
687
+ * @param {UpdateClubRoleRequestBody} updateClubRoleRequestBody
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ updateClubRole(id, updateClubRoleRequestBody, options) {
692
+ return __awaiter(this, void 0, void 0, function* () {
693
+ var _a, _b, _c;
694
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClubRole(id, updateClubRoleRequestBody, options);
695
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
696
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubRolesApi.updateClubRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
697
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
698
+ });
699
+ },
700
+ };
701
+ };
702
+ exports.ClubRolesApiFp = ClubRolesApiFp;
703
+ /**
704
+ * ClubRolesApi - factory interface
705
+ * @export
706
+ */
707
+ const ClubRolesApiFactory = function (configuration, basePath, axios) {
708
+ const localVarFp = (0, exports.ClubRolesApiFp)(configuration);
709
+ return {
710
+ /**
711
+ *
712
+ * @summary Crée un nouveau rôle de club
713
+ * @param {ClubRolesApiCreateClubRoleRequest} requestParameters Request parameters.
714
+ * @param {*} [options] Override http request option.
715
+ * @throws {RequiredError}
716
+ */
717
+ createClubRole(requestParameters, options) {
718
+ return localVarFp.createClubRole(requestParameters.createClubRoleRequestBody, options).then((request) => request(axios, basePath));
719
+ },
720
+ /**
721
+ *
722
+ * @summary Supprime un rôle de club
723
+ * @param {ClubRolesApiDeleteClubRoleRequest} requestParameters Request parameters.
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ deleteClubRole(requestParameters, options) {
728
+ return localVarFp.deleteClubRole(requestParameters.id, options).then((request) => request(axios, basePath));
729
+ },
730
+ /**
731
+ *
732
+ * @summary Récupère tous les rôles de clubs
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ getAllClubRoles(options) {
737
+ return localVarFp.getAllClubRoles(options).then((request) => request(axios, basePath));
738
+ },
739
+ /**
740
+ *
741
+ * @summary Récupère un rôle de club par son ID
742
+ * @param {ClubRolesApiGetClubRoleByIdRequest} requestParameters Request parameters.
743
+ * @param {*} [options] Override http request option.
744
+ * @throws {RequiredError}
745
+ */
746
+ getClubRoleById(requestParameters, options) {
747
+ return localVarFp.getClubRoleById(requestParameters.id, options).then((request) => request(axios, basePath));
748
+ },
749
+ /**
750
+ *
751
+ * @summary Met à jour un rôle de club
752
+ * @param {ClubRolesApiUpdateClubRoleRequest} requestParameters Request parameters.
753
+ * @param {*} [options] Override http request option.
754
+ * @throws {RequiredError}
755
+ */
756
+ updateClubRole(requestParameters, options) {
757
+ return localVarFp.updateClubRole(requestParameters.id, requestParameters.updateClubRoleRequestBody, options).then((request) => request(axios, basePath));
758
+ },
759
+ };
760
+ };
761
+ exports.ClubRolesApiFactory = ClubRolesApiFactory;
762
+ /**
763
+ * ClubRolesApi - object-oriented interface
764
+ * @export
765
+ * @class ClubRolesApi
766
+ * @extends {BaseAPI}
767
+ */
768
+ class ClubRolesApi extends base_1.BaseAPI {
769
+ /**
770
+ *
771
+ * @summary Crée un nouveau rôle de club
772
+ * @param {ClubRolesApiCreateClubRoleRequest} requestParameters Request parameters.
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ * @memberof ClubRolesApi
776
+ */
777
+ createClubRole(requestParameters, options) {
778
+ return (0, exports.ClubRolesApiFp)(this.configuration).createClubRole(requestParameters.createClubRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
779
+ }
780
+ /**
781
+ *
782
+ * @summary Supprime un rôle de club
783
+ * @param {ClubRolesApiDeleteClubRoleRequest} requestParameters Request parameters.
784
+ * @param {*} [options] Override http request option.
785
+ * @throws {RequiredError}
786
+ * @memberof ClubRolesApi
787
+ */
788
+ deleteClubRole(requestParameters, options) {
789
+ return (0, exports.ClubRolesApiFp)(this.configuration).deleteClubRole(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
790
+ }
791
+ /**
792
+ *
793
+ * @summary Récupère tous les rôles de clubs
794
+ * @param {*} [options] Override http request option.
795
+ * @throws {RequiredError}
796
+ * @memberof ClubRolesApi
797
+ */
798
+ getAllClubRoles(options) {
799
+ return (0, exports.ClubRolesApiFp)(this.configuration).getAllClubRoles(options).then((request) => request(this.axios, this.basePath));
800
+ }
801
+ /**
802
+ *
803
+ * @summary Récupère un rôle de club par son ID
804
+ * @param {ClubRolesApiGetClubRoleByIdRequest} requestParameters Request parameters.
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ * @memberof ClubRolesApi
808
+ */
809
+ getClubRoleById(requestParameters, options) {
810
+ return (0, exports.ClubRolesApiFp)(this.configuration).getClubRoleById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
811
+ }
812
+ /**
813
+ *
814
+ * @summary Met à jour un rôle de club
815
+ * @param {ClubRolesApiUpdateClubRoleRequest} requestParameters Request parameters.
816
+ * @param {*} [options] Override http request option.
817
+ * @throws {RequiredError}
818
+ * @memberof ClubRolesApi
819
+ */
820
+ updateClubRole(requestParameters, options) {
821
+ return (0, exports.ClubRolesApiFp)(this.configuration).updateClubRole(requestParameters.id, requestParameters.updateClubRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
822
+ }
823
+ }
824
+ exports.ClubRolesApi = ClubRolesApi;
825
+ /**
826
+ * ClubSettingsApi - axios parameter creator
827
+ * @export
828
+ */
829
+ const ClubSettingsApiAxiosParamCreator = function (configuration) {
830
+ return {
831
+ /**
832
+ *
833
+ * @summary Crée les paramètres d’un club
834
+ * @param {ClubSettings} clubSettings
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ createClubSettings: (clubSettings_1, ...args_1) => __awaiter(this, [clubSettings_1, ...args_1], void 0, function* (clubSettings, options = {}) {
839
+ // verify required parameter 'clubSettings' is not null or undefined
840
+ (0, common_1.assertParamExists)('createClubSettings', 'clubSettings', clubSettings);
841
+ const localVarPath = `/api/club-settings`;
842
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
843
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
844
+ let baseOptions;
845
+ if (configuration) {
846
+ baseOptions = configuration.baseOptions;
847
+ }
848
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
849
+ const localVarHeaderParameter = {};
850
+ const localVarQueryParameter = {};
851
+ // authentication bearerAuth required
852
+ // http bearer authentication required
853
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
854
+ localVarHeaderParameter['Content-Type'] = 'application/json';
855
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
856
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
857
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
858
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(clubSettings, localVarRequestOptions, configuration);
859
+ return {
860
+ url: (0, common_1.toPathString)(localVarUrlObj),
861
+ options: localVarRequestOptions,
862
+ };
863
+ }),
864
+ /**
865
+ *
866
+ * @summary Supprime les paramètres d’un club
867
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
868
+ * @param {*} [options] Override http request option.
869
+ * @throws {RequiredError}
870
+ */
871
+ deleteClubSettings: (getClubSettingsRequest_1, ...args_1) => __awaiter(this, [getClubSettingsRequest_1, ...args_1], void 0, function* (getClubSettingsRequest, options = {}) {
872
+ // verify required parameter 'getClubSettingsRequest' is not null or undefined
873
+ (0, common_1.assertParamExists)('deleteClubSettings', 'getClubSettingsRequest', getClubSettingsRequest);
874
+ const localVarPath = `/api/club-settings`;
875
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
876
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
877
+ let baseOptions;
878
+ if (configuration) {
879
+ baseOptions = configuration.baseOptions;
880
+ }
881
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
882
+ const localVarHeaderParameter = {};
883
+ const localVarQueryParameter = {};
884
+ // authentication bearerAuth required
885
+ // http bearer authentication required
886
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
887
+ localVarHeaderParameter['Content-Type'] = 'application/json';
888
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
889
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
890
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
891
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getClubSettingsRequest, localVarRequestOptions, configuration);
892
+ return {
893
+ url: (0, common_1.toPathString)(localVarUrlObj),
894
+ options: localVarRequestOptions,
895
+ };
896
+ }),
897
+ /**
898
+ *
899
+ * @summary Récupère les paramètres d’un club
900
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ */
904
+ getClubSettings: (getClubSettingsRequest_1, ...args_1) => __awaiter(this, [getClubSettingsRequest_1, ...args_1], void 0, function* (getClubSettingsRequest, options = {}) {
905
+ // verify required parameter 'getClubSettingsRequest' is not null or undefined
906
+ (0, common_1.assertParamExists)('getClubSettings', 'getClubSettingsRequest', getClubSettingsRequest);
907
+ const localVarPath = `/api/club-settings`;
908
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
909
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
910
+ let baseOptions;
911
+ if (configuration) {
912
+ baseOptions = configuration.baseOptions;
913
+ }
914
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
915
+ const localVarHeaderParameter = {};
916
+ const localVarQueryParameter = {};
917
+ // authentication bearerAuth required
918
+ // http bearer authentication required
919
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
920
+ localVarHeaderParameter['Content-Type'] = 'application/json';
921
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
922
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
923
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
924
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getClubSettingsRequest, localVarRequestOptions, configuration);
925
+ return {
926
+ url: (0, common_1.toPathString)(localVarUrlObj),
927
+ options: localVarRequestOptions,
928
+ };
929
+ }),
930
+ /**
931
+ *
932
+ * @summary Met à jour les paramètres d’un club
933
+ * @param {ClubSettings} clubSettings
934
+ * @param {*} [options] Override http request option.
935
+ * @throws {RequiredError}
936
+ */
937
+ updateClubSettings: (clubSettings_1, ...args_1) => __awaiter(this, [clubSettings_1, ...args_1], void 0, function* (clubSettings, options = {}) {
938
+ // verify required parameter 'clubSettings' is not null or undefined
939
+ (0, common_1.assertParamExists)('updateClubSettings', 'clubSettings', clubSettings);
940
+ const localVarPath = `/api/club-settings`;
941
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
942
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
943
+ let baseOptions;
944
+ if (configuration) {
945
+ baseOptions = configuration.baseOptions;
946
+ }
947
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
948
+ const localVarHeaderParameter = {};
949
+ const localVarQueryParameter = {};
950
+ // authentication bearerAuth required
951
+ // http bearer authentication required
952
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
953
+ localVarHeaderParameter['Content-Type'] = 'application/json';
954
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
955
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
956
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
957
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(clubSettings, localVarRequestOptions, configuration);
958
+ return {
959
+ url: (0, common_1.toPathString)(localVarUrlObj),
960
+ options: localVarRequestOptions,
961
+ };
962
+ }),
963
+ };
964
+ };
965
+ exports.ClubSettingsApiAxiosParamCreator = ClubSettingsApiAxiosParamCreator;
966
+ /**
967
+ * ClubSettingsApi - functional programming interface
968
+ * @export
969
+ */
970
+ const ClubSettingsApiFp = function (configuration) {
971
+ const localVarAxiosParamCreator = (0, exports.ClubSettingsApiAxiosParamCreator)(configuration);
972
+ return {
973
+ /**
974
+ *
975
+ * @summary Crée les paramètres d’un club
976
+ * @param {ClubSettings} clubSettings
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ */
980
+ createClubSettings(clubSettings, options) {
981
+ return __awaiter(this, void 0, void 0, function* () {
982
+ var _a, _b, _c;
983
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClubSettings(clubSettings, options);
984
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
985
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSettingsApi.createClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
986
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
987
+ });
988
+ },
989
+ /**
990
+ *
991
+ * @summary Supprime les paramètres d’un club
992
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
993
+ * @param {*} [options] Override http request option.
994
+ * @throws {RequiredError}
995
+ */
996
+ deleteClubSettings(getClubSettingsRequest, options) {
997
+ return __awaiter(this, void 0, void 0, function* () {
998
+ var _a, _b, _c;
999
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClubSettings(getClubSettingsRequest, options);
1000
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1001
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSettingsApi.deleteClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1002
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1003
+ });
1004
+ },
1005
+ /**
1006
+ *
1007
+ * @summary Récupère les paramètres d’un club
1008
+ * @param {GetClubSettingsRequest} getClubSettingsRequest
1009
+ * @param {*} [options] Override http request option.
1010
+ * @throws {RequiredError}
1011
+ */
1012
+ getClubSettings(getClubSettingsRequest, options) {
1013
+ return __awaiter(this, void 0, void 0, function* () {
1014
+ var _a, _b, _c;
1015
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubSettings(getClubSettingsRequest, options);
1016
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1017
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSettingsApi.getClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1018
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1019
+ });
1020
+ },
1021
+ /**
1022
+ *
1023
+ * @summary Met à jour les paramètres d’un club
1024
+ * @param {ClubSettings} clubSettings
1025
+ * @param {*} [options] Override http request option.
1026
+ * @throws {RequiredError}
1027
+ */
1028
+ updateClubSettings(clubSettings, options) {
1029
+ return __awaiter(this, void 0, void 0, function* () {
1030
+ var _a, _b, _c;
1031
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClubSettings(clubSettings, options);
1032
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1033
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSettingsApi.updateClubSettings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1034
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1035
+ });
1036
+ },
1037
+ };
1038
+ };
1039
+ exports.ClubSettingsApiFp = ClubSettingsApiFp;
1040
+ /**
1041
+ * ClubSettingsApi - factory interface
1042
+ * @export
1043
+ */
1044
+ const ClubSettingsApiFactory = function (configuration, basePath, axios) {
1045
+ const localVarFp = (0, exports.ClubSettingsApiFp)(configuration);
1046
+ return {
1047
+ /**
1048
+ *
1049
+ * @summary Crée les paramètres d’un club
1050
+ * @param {ClubSettingsApiCreateClubSettingsRequest} requestParameters Request parameters.
1051
+ * @param {*} [options] Override http request option.
1052
+ * @throws {RequiredError}
1053
+ */
1054
+ createClubSettings(requestParameters, options) {
1055
+ return localVarFp.createClubSettings(requestParameters.clubSettings, options).then((request) => request(axios, basePath));
1056
+ },
1057
+ /**
1058
+ *
1059
+ * @summary Supprime les paramètres d’un club
1060
+ * @param {ClubSettingsApiDeleteClubSettingsRequest} requestParameters Request parameters.
1061
+ * @param {*} [options] Override http request option.
1062
+ * @throws {RequiredError}
1063
+ */
1064
+ deleteClubSettings(requestParameters, options) {
1065
+ return localVarFp.deleteClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(axios, basePath));
1066
+ },
1067
+ /**
1068
+ *
1069
+ * @summary Récupère les paramètres d’un club
1070
+ * @param {ClubSettingsApiGetClubSettingsRequest} requestParameters Request parameters.
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ getClubSettings(requestParameters, options) {
1075
+ return localVarFp.getClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(axios, basePath));
1076
+ },
1077
+ /**
1078
+ *
1079
+ * @summary Met à jour les paramètres d’un club
1080
+ * @param {ClubSettingsApiUpdateClubSettingsRequest} requestParameters Request parameters.
1081
+ * @param {*} [options] Override http request option.
1082
+ * @throws {RequiredError}
1083
+ */
1084
+ updateClubSettings(requestParameters, options) {
1085
+ return localVarFp.updateClubSettings(requestParameters.clubSettings, options).then((request) => request(axios, basePath));
1086
+ },
1087
+ };
1088
+ };
1089
+ exports.ClubSettingsApiFactory = ClubSettingsApiFactory;
1090
+ /**
1091
+ * ClubSettingsApi - object-oriented interface
1092
+ * @export
1093
+ * @class ClubSettingsApi
1094
+ * @extends {BaseAPI}
1095
+ */
1096
+ class ClubSettingsApi extends base_1.BaseAPI {
1097
+ /**
1098
+ *
1099
+ * @summary Crée les paramètres d’un club
1100
+ * @param {ClubSettingsApiCreateClubSettingsRequest} requestParameters Request parameters.
1101
+ * @param {*} [options] Override http request option.
1102
+ * @throws {RequiredError}
1103
+ * @memberof ClubSettingsApi
1104
+ */
1105
+ createClubSettings(requestParameters, options) {
1106
+ return (0, exports.ClubSettingsApiFp)(this.configuration).createClubSettings(requestParameters.clubSettings, options).then((request) => request(this.axios, this.basePath));
1107
+ }
1108
+ /**
1109
+ *
1110
+ * @summary Supprime les paramètres d’un club
1111
+ * @param {ClubSettingsApiDeleteClubSettingsRequest} requestParameters Request parameters.
1112
+ * @param {*} [options] Override http request option.
1113
+ * @throws {RequiredError}
1114
+ * @memberof ClubSettingsApi
1115
+ */
1116
+ deleteClubSettings(requestParameters, options) {
1117
+ return (0, exports.ClubSettingsApiFp)(this.configuration).deleteClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(this.axios, this.basePath));
1118
+ }
1119
+ /**
1120
+ *
1121
+ * @summary Récupère les paramètres d’un club
1122
+ * @param {ClubSettingsApiGetClubSettingsRequest} requestParameters Request parameters.
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ * @memberof ClubSettingsApi
1126
+ */
1127
+ getClubSettings(requestParameters, options) {
1128
+ return (0, exports.ClubSettingsApiFp)(this.configuration).getClubSettings(requestParameters.getClubSettingsRequest, options).then((request) => request(this.axios, this.basePath));
1129
+ }
1130
+ /**
1131
+ *
1132
+ * @summary Met à jour les paramètres d’un club
1133
+ * @param {ClubSettingsApiUpdateClubSettingsRequest} requestParameters Request parameters.
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ * @memberof ClubSettingsApi
1137
+ */
1138
+ updateClubSettings(requestParameters, options) {
1139
+ return (0, exports.ClubSettingsApiFp)(this.configuration).updateClubSettings(requestParameters.clubSettings, options).then((request) => request(this.axios, this.basePath));
1140
+ }
1141
+ }
1142
+ exports.ClubSettingsApi = ClubSettingsApi;
1143
+ /**
1144
+ * ClubSlotsApi - axios parameter creator
1145
+ * @export
1146
+ */
1147
+ const ClubSlotsApiAxiosParamCreator = function (configuration) {
1148
+ return {
1149
+ /**
1150
+ *
1151
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1152
+ * @param {string} id ID du club
1153
+ * @param {string} start Date de début (format ISO)
1154
+ * @param {string} end Date de fin (format ISO)
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ 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 = {}) {
1159
+ // verify required parameter 'id' is not null or undefined
1160
+ (0, common_1.assertParamExists)('deleteSlotsByClubInRange', 'id', id);
1161
+ // verify required parameter 'start' is not null or undefined
1162
+ (0, common_1.assertParamExists)('deleteSlotsByClubInRange', 'start', start);
1163
+ // verify required parameter 'end' is not null or undefined
1164
+ (0, common_1.assertParamExists)('deleteSlotsByClubInRange', 'end', end);
1165
+ const localVarPath = `/api/clubs/{id}/slots`
1166
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1167
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1168
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1169
+ let baseOptions;
1170
+ if (configuration) {
1171
+ baseOptions = configuration.baseOptions;
1172
+ }
1173
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1174
+ const localVarHeaderParameter = {};
1175
+ const localVarQueryParameter = {};
1176
+ // authentication bearerAuth required
1177
+ // http bearer authentication required
1178
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1179
+ if (start !== undefined) {
1180
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1181
+ start.toISOString() :
1182
+ start;
1183
+ }
1184
+ if (end !== undefined) {
1185
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1186
+ end.toISOString() :
1187
+ end;
1188
+ }
1189
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1190
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1191
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1192
+ return {
1193
+ url: (0, common_1.toPathString)(localVarUrlObj),
1194
+ options: localVarRequestOptions,
1195
+ };
1196
+ }),
1197
+ /**
1198
+ *
1199
+ * @summary Générer les créneaux pour les 3 semaines à venir
1200
+ * @param {string} id ID du club
1201
+ * @param {*} [options] Override http request option.
1202
+ * @throws {RequiredError}
1203
+ */
1204
+ generateSlotsForNextThreeWeeks: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1205
+ // verify required parameter 'id' is not null or undefined
1206
+ (0, common_1.assertParamExists)('generateSlotsForNextThreeWeeks', 'id', id);
1207
+ const localVarPath = `/api/clubs/{id}/generate-slots`
1208
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1209
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1210
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1211
+ let baseOptions;
1212
+ if (configuration) {
1213
+ baseOptions = configuration.baseOptions;
1214
+ }
1215
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1216
+ const localVarHeaderParameter = {};
1217
+ const localVarQueryParameter = {};
1218
+ // authentication bearerAuth required
1219
+ // http bearer authentication required
1220
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1221
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1222
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1223
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1224
+ return {
1225
+ url: (0, common_1.toPathString)(localVarUrlObj),
1226
+ options: localVarRequestOptions,
1227
+ };
1228
+ }),
1229
+ /**
1230
+ *
1231
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1232
+ * @param {string} id ID du club
1233
+ * @param {string} sportId ID du sport
1234
+ * @param {string} [start] Date de début (format ISO)
1235
+ * @param {string} [end] Date de fin (format ISO)
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ 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 = {}) {
1240
+ // verify required parameter 'id' is not null or undefined
1241
+ (0, common_1.assertParamExists)('getAvailableSlotsBySports', 'id', id);
1242
+ // verify required parameter 'sportId' is not null or undefined
1243
+ (0, common_1.assertParamExists)('getAvailableSlotsBySports', 'sportId', sportId);
1244
+ const localVarPath = `/api/clubs/{id}/sports/{sportId}/slots`
1245
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1246
+ .replace(`{${"sportId"}}`, encodeURIComponent(String(sportId)));
1247
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1248
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1249
+ let baseOptions;
1250
+ if (configuration) {
1251
+ baseOptions = configuration.baseOptions;
1252
+ }
1253
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1254
+ const localVarHeaderParameter = {};
1255
+ const localVarQueryParameter = {};
1256
+ // authentication bearerAuth required
1257
+ // http bearer authentication required
1258
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1259
+ if (start !== undefined) {
1260
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1261
+ start.toISOString() :
1262
+ start;
1263
+ }
1264
+ if (end !== undefined) {
1265
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1266
+ end.toISOString() :
1267
+ end;
1268
+ }
1269
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1270
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1271
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1272
+ return {
1273
+ url: (0, common_1.toPathString)(localVarUrlObj),
1274
+ options: localVarRequestOptions,
1275
+ };
1276
+ }),
1277
+ /**
1278
+ *
1279
+ * @summary Obtenir les slots disponibles pour un jour donné
1280
+ * @param {string} id ID du club
1281
+ * @param {string} sportId ID du sport
1282
+ * @param {string} day Date du jour (format YYYY-MM-DD)
1283
+ * @param {*} [options] Override http request option.
1284
+ * @throws {RequiredError}
1285
+ */
1286
+ 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 = {}) {
1287
+ // verify required parameter 'id' is not null or undefined
1288
+ (0, common_1.assertParamExists)('getAvailableSlotsBySportsAndDay', 'id', id);
1289
+ // verify required parameter 'sportId' is not null or undefined
1290
+ (0, common_1.assertParamExists)('getAvailableSlotsBySportsAndDay', 'sportId', sportId);
1291
+ // verify required parameter 'day' is not null or undefined
1292
+ (0, common_1.assertParamExists)('getAvailableSlotsBySportsAndDay', 'day', day);
1293
+ const localVarPath = `/api/clubs/{id}/sports/{sportId}/slots/{day}`
1294
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1295
+ .replace(`{${"sportId"}}`, encodeURIComponent(String(sportId)))
1296
+ .replace(`{${"day"}}`, encodeURIComponent(String(day)));
1297
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1298
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1299
+ let baseOptions;
1300
+ if (configuration) {
1301
+ baseOptions = configuration.baseOptions;
1302
+ }
1303
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1304
+ const localVarHeaderParameter = {};
1305
+ const localVarQueryParameter = {};
1306
+ // authentication bearerAuth required
1307
+ // http bearer authentication required
1308
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1309
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1310
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1311
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1312
+ return {
1313
+ url: (0, common_1.toPathString)(localVarUrlObj),
1314
+ options: localVarRequestOptions,
1315
+ };
1316
+ }),
1317
+ /**
1318
+ *
1319
+ * @summary Récupérer tous les créneaux pour un club
1320
+ * @param {string} id ID du club
1321
+ * @param {string} [start] Date de début (format ISO)
1322
+ * @param {string} [end] Date de fin (format ISO)
1323
+ * @param {*} [options] Override http request option.
1324
+ * @throws {RequiredError}
1325
+ */
1326
+ 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 = {}) {
1327
+ // verify required parameter 'id' is not null or undefined
1328
+ (0, common_1.assertParamExists)('getSlotsByClub', 'id', id);
1329
+ const localVarPath = `/api/clubs/{id}/slots`
1330
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1331
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1332
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1333
+ let baseOptions;
1334
+ if (configuration) {
1335
+ baseOptions = configuration.baseOptions;
1336
+ }
1337
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1338
+ const localVarHeaderParameter = {};
1339
+ const localVarQueryParameter = {};
1340
+ // authentication bearerAuth required
1341
+ // http bearer authentication required
1342
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1343
+ if (start !== undefined) {
1344
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1345
+ start.toISOString() :
1346
+ start;
1347
+ }
1348
+ if (end !== undefined) {
1349
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1350
+ end.toISOString() :
1351
+ end;
1352
+ }
1353
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1354
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1355
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1356
+ return {
1357
+ url: (0, common_1.toPathString)(localVarUrlObj),
1358
+ options: localVarRequestOptions,
1359
+ };
1360
+ }),
1361
+ };
1362
+ };
1363
+ exports.ClubSlotsApiAxiosParamCreator = ClubSlotsApiAxiosParamCreator;
1364
+ /**
1365
+ * ClubSlotsApi - functional programming interface
1366
+ * @export
1367
+ */
1368
+ const ClubSlotsApiFp = function (configuration) {
1369
+ const localVarAxiosParamCreator = (0, exports.ClubSlotsApiAxiosParamCreator)(configuration);
1370
+ return {
1371
+ /**
1372
+ *
1373
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1374
+ * @param {string} id ID du club
1375
+ * @param {string} start Date de début (format ISO)
1376
+ * @param {string} end Date de fin (format ISO)
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ */
1380
+ deleteSlotsByClubInRange(id, start, end, options) {
1381
+ return __awaiter(this, void 0, void 0, function* () {
1382
+ var _a, _b, _c;
1383
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSlotsByClubInRange(id, start, end, options);
1384
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1385
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSlotsApi.deleteSlotsByClubInRange']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1386
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1387
+ });
1388
+ },
1389
+ /**
1390
+ *
1391
+ * @summary Générer les créneaux pour les 3 semaines à venir
1392
+ * @param {string} id ID du club
1393
+ * @param {*} [options] Override http request option.
1394
+ * @throws {RequiredError}
1395
+ */
1396
+ generateSlotsForNextThreeWeeks(id, options) {
1397
+ return __awaiter(this, void 0, void 0, function* () {
1398
+ var _a, _b, _c;
1399
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateSlotsForNextThreeWeeks(id, options);
1400
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1401
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSlotsApi.generateSlotsForNextThreeWeeks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1402
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1403
+ });
1404
+ },
1405
+ /**
1406
+ *
1407
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1408
+ * @param {string} id ID du club
1409
+ * @param {string} sportId ID du sport
1410
+ * @param {string} [start] Date de début (format ISO)
1411
+ * @param {string} [end] Date de fin (format ISO)
1412
+ * @param {*} [options] Override http request option.
1413
+ * @throws {RequiredError}
1414
+ */
1415
+ getAvailableSlotsBySports(id, sportId, start, end, options) {
1416
+ return __awaiter(this, void 0, void 0, function* () {
1417
+ var _a, _b, _c;
1418
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsBySports(id, sportId, start, end, options);
1419
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1420
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSlotsApi.getAvailableSlotsBySports']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1421
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1422
+ });
1423
+ },
1424
+ /**
1425
+ *
1426
+ * @summary Obtenir les slots disponibles pour un jour donné
1427
+ * @param {string} id ID du club
1428
+ * @param {string} sportId ID du sport
1429
+ * @param {string} day Date du jour (format YYYY-MM-DD)
1430
+ * @param {*} [options] Override http request option.
1431
+ * @throws {RequiredError}
1432
+ */
1433
+ getAvailableSlotsBySportsAndDay(id, sportId, day, options) {
1434
+ return __awaiter(this, void 0, void 0, function* () {
1435
+ var _a, _b, _c;
1436
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsBySportsAndDay(id, sportId, day, 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 = base_1.operationServerMap['ClubSlotsApi.getAvailableSlotsBySportsAndDay']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1439
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1440
+ });
1441
+ },
1442
+ /**
1443
+ *
1444
+ * @summary Récupérer tous les créneaux pour un club
1445
+ * @param {string} id ID du club
1446
+ * @param {string} [start] Date de début (format ISO)
1447
+ * @param {string} [end] Date de fin (format ISO)
1448
+ * @param {*} [options] Override http request option.
1449
+ * @throws {RequiredError}
1450
+ */
1451
+ getSlotsByClub(id, start, end, options) {
1452
+ return __awaiter(this, void 0, void 0, function* () {
1453
+ var _a, _b, _c;
1454
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSlotsByClub(id, start, end, options);
1455
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1456
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSlotsApi.getSlotsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1457
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1458
+ });
1459
+ },
1460
+ };
1461
+ };
1462
+ exports.ClubSlotsApiFp = ClubSlotsApiFp;
1463
+ /**
1464
+ * ClubSlotsApi - factory interface
1465
+ * @export
1466
+ */
1467
+ const ClubSlotsApiFactory = function (configuration, basePath, axios) {
1468
+ const localVarFp = (0, exports.ClubSlotsApiFp)(configuration);
1469
+ return {
1470
+ /**
1471
+ *
1472
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1473
+ * @param {ClubSlotsApiDeleteSlotsByClubInRangeRequest} requestParameters Request parameters.
1474
+ * @param {*} [options] Override http request option.
1475
+ * @throws {RequiredError}
1476
+ */
1477
+ deleteSlotsByClubInRange(requestParameters, options) {
1478
+ return localVarFp.deleteSlotsByClubInRange(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1479
+ },
1480
+ /**
1481
+ *
1482
+ * @summary Générer les créneaux pour les 3 semaines à venir
1483
+ * @param {ClubSlotsApiGenerateSlotsForNextThreeWeeksRequest} requestParameters Request parameters.
1484
+ * @param {*} [options] Override http request option.
1485
+ * @throws {RequiredError}
1486
+ */
1487
+ generateSlotsForNextThreeWeeks(requestParameters, options) {
1488
+ return localVarFp.generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(axios, basePath));
1489
+ },
1490
+ /**
1491
+ *
1492
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1493
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsRequest} requestParameters Request parameters.
1494
+ * @param {*} [options] Override http request option.
1495
+ * @throws {RequiredError}
1496
+ */
1497
+ getAvailableSlotsBySports(requestParameters, options) {
1498
+ return localVarFp.getAvailableSlotsBySports(requestParameters.id, requestParameters.sportId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1499
+ },
1500
+ /**
1501
+ *
1502
+ * @summary Obtenir les slots disponibles pour un jour donné
1503
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsAndDayRequest} requestParameters Request parameters.
1504
+ * @param {*} [options] Override http request option.
1505
+ * @throws {RequiredError}
1506
+ */
1507
+ getAvailableSlotsBySportsAndDay(requestParameters, options) {
1508
+ return localVarFp.getAvailableSlotsBySportsAndDay(requestParameters.id, requestParameters.sportId, requestParameters.day, options).then((request) => request(axios, basePath));
1509
+ },
1510
+ /**
1511
+ *
1512
+ * @summary Récupérer tous les créneaux pour un club
1513
+ * @param {ClubSlotsApiGetSlotsByClubRequest} requestParameters Request parameters.
1514
+ * @param {*} [options] Override http request option.
1515
+ * @throws {RequiredError}
1516
+ */
1517
+ getSlotsByClub(requestParameters, options) {
1518
+ return localVarFp.getSlotsByClub(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1519
+ },
1520
+ };
1521
+ };
1522
+ exports.ClubSlotsApiFactory = ClubSlotsApiFactory;
1523
+ /**
1524
+ * ClubSlotsApi - object-oriented interface
1525
+ * @export
1526
+ * @class ClubSlotsApi
1527
+ * @extends {BaseAPI}
1528
+ */
1529
+ class ClubSlotsApi extends base_1.BaseAPI {
1530
+ /**
1531
+ *
1532
+ * @summary Supprimer des créneaux pour un club sur une plage de dates
1533
+ * @param {ClubSlotsApiDeleteSlotsByClubInRangeRequest} requestParameters Request parameters.
1534
+ * @param {*} [options] Override http request option.
1535
+ * @throws {RequiredError}
1536
+ * @memberof ClubSlotsApi
1537
+ */
1538
+ deleteSlotsByClubInRange(requestParameters, options) {
1539
+ return (0, exports.ClubSlotsApiFp)(this.configuration).deleteSlotsByClubInRange(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1540
+ }
1541
+ /**
1542
+ *
1543
+ * @summary Générer les créneaux pour les 3 semaines à venir
1544
+ * @param {ClubSlotsApiGenerateSlotsForNextThreeWeeksRequest} requestParameters Request parameters.
1545
+ * @param {*} [options] Override http request option.
1546
+ * @throws {RequiredError}
1547
+ * @memberof ClubSlotsApi
1548
+ */
1549
+ generateSlotsForNextThreeWeeks(requestParameters, options) {
1550
+ return (0, exports.ClubSlotsApiFp)(this.configuration).generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
1551
+ }
1552
+ /**
1553
+ *
1554
+ * @summary Obtenir tous les slots disponibles pour un sport dans un club
1555
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsRequest} requestParameters Request parameters.
1556
+ * @param {*} [options] Override http request option.
1557
+ * @throws {RequiredError}
1558
+ * @memberof ClubSlotsApi
1559
+ */
1560
+ getAvailableSlotsBySports(requestParameters, options) {
1561
+ return (0, exports.ClubSlotsApiFp)(this.configuration).getAvailableSlotsBySports(requestParameters.id, requestParameters.sportId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1562
+ }
1563
+ /**
1564
+ *
1565
+ * @summary Obtenir les slots disponibles pour un jour donné
1566
+ * @param {ClubSlotsApiGetAvailableSlotsBySportsAndDayRequest} requestParameters Request parameters.
1567
+ * @param {*} [options] Override http request option.
1568
+ * @throws {RequiredError}
1569
+ * @memberof ClubSlotsApi
1570
+ */
1571
+ getAvailableSlotsBySportsAndDay(requestParameters, options) {
1572
+ return (0, exports.ClubSlotsApiFp)(this.configuration).getAvailableSlotsBySportsAndDay(requestParameters.id, requestParameters.sportId, requestParameters.day, options).then((request) => request(this.axios, this.basePath));
1573
+ }
1574
+ /**
1575
+ *
1576
+ * @summary Récupérer tous les créneaux pour un club
1577
+ * @param {ClubSlotsApiGetSlotsByClubRequest} requestParameters Request parameters.
1578
+ * @param {*} [options] Override http request option.
1579
+ * @throws {RequiredError}
1580
+ * @memberof ClubSlotsApi
1581
+ */
1582
+ getSlotsByClub(requestParameters, options) {
1583
+ return (0, exports.ClubSlotsApiFp)(this.configuration).getSlotsByClub(requestParameters.id, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1584
+ }
1585
+ }
1586
+ exports.ClubSlotsApi = ClubSlotsApi;
1587
+ /**
1588
+ * ClubSportsApi - axios parameter creator
1589
+ * @export
1590
+ */
1591
+ const ClubSportsApiAxiosParamCreator = function (configuration) {
1592
+ return {
1593
+ /**
1594
+ *
1595
+ * @summary Créer un sport pour un club
1596
+ * @param {string} id ID du club
1597
+ * @param {CreateSportRequest} createSportRequest
1598
+ * @param {*} [options] Override http request option.
1599
+ * @throws {RequiredError}
1600
+ */
1601
+ createSportForClub: (id_1, createSportRequest_1, ...args_1) => __awaiter(this, [id_1, createSportRequest_1, ...args_1], void 0, function* (id, createSportRequest, options = {}) {
1602
+ // verify required parameter 'id' is not null or undefined
1603
+ (0, common_1.assertParamExists)('createSportForClub', 'id', id);
1604
+ // verify required parameter 'createSportRequest' is not null or undefined
1605
+ (0, common_1.assertParamExists)('createSportForClub', 'createSportRequest', createSportRequest);
1606
+ const localVarPath = `/api/clubs/{id}/sports`
1607
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1608
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1609
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1610
+ let baseOptions;
1611
+ if (configuration) {
1612
+ baseOptions = configuration.baseOptions;
1613
+ }
1614
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1615
+ const localVarHeaderParameter = {};
1616
+ const localVarQueryParameter = {};
1617
+ // authentication bearerAuth required
1618
+ // http bearer authentication required
1619
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1620
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1621
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1622
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1623
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1624
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createSportRequest, localVarRequestOptions, configuration);
1625
+ return {
1626
+ url: (0, common_1.toPathString)(localVarUrlObj),
1627
+ options: localVarRequestOptions,
1628
+ };
1629
+ }),
1630
+ /**
1631
+ *
1632
+ * @summary Récupérer tous les sports pour un club
1633
+ * @param {string} id ID du club
1634
+ * @param {*} [options] Override http request option.
1635
+ * @throws {RequiredError}
1636
+ */
1637
+ getSportsByClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1638
+ // verify required parameter 'id' is not null or undefined
1639
+ (0, common_1.assertParamExists)('getSportsByClub', 'id', id);
1640
+ const localVarPath = `/api/clubs/{id}/sports`
1641
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1642
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1643
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1644
+ let baseOptions;
1645
+ if (configuration) {
1646
+ baseOptions = configuration.baseOptions;
1647
+ }
1648
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1649
+ const localVarHeaderParameter = {};
1650
+ const localVarQueryParameter = {};
1651
+ // authentication bearerAuth required
1652
+ // http bearer authentication required
1653
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1654
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1655
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1656
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1657
+ return {
1658
+ url: (0, common_1.toPathString)(localVarUrlObj),
1659
+ options: localVarRequestOptions,
1660
+ };
1661
+ }),
1662
+ };
1663
+ };
1664
+ exports.ClubSportsApiAxiosParamCreator = ClubSportsApiAxiosParamCreator;
1665
+ /**
1666
+ * ClubSportsApi - functional programming interface
1667
+ * @export
1668
+ */
1669
+ const ClubSportsApiFp = function (configuration) {
1670
+ const localVarAxiosParamCreator = (0, exports.ClubSportsApiAxiosParamCreator)(configuration);
1671
+ return {
1672
+ /**
1673
+ *
1674
+ * @summary Créer un sport pour un club
1675
+ * @param {string} id ID du club
1676
+ * @param {CreateSportRequest} createSportRequest
1677
+ * @param {*} [options] Override http request option.
1678
+ * @throws {RequiredError}
1679
+ */
1680
+ createSportForClub(id, createSportRequest, options) {
1681
+ return __awaiter(this, void 0, void 0, function* () {
1682
+ var _a, _b, _c;
1683
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSportForClub(id, createSportRequest, options);
1684
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1685
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSportsApi.createSportForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1686
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1687
+ });
1688
+ },
1689
+ /**
1690
+ *
1691
+ * @summary Récupérer tous les sports pour un club
1692
+ * @param {string} id ID du club
1693
+ * @param {*} [options] Override http request option.
1694
+ * @throws {RequiredError}
1695
+ */
1696
+ getSportsByClub(id, options) {
1697
+ return __awaiter(this, void 0, void 0, function* () {
1698
+ var _a, _b, _c;
1699
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSportsByClub(id, options);
1700
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1701
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSportsApi.getSportsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1702
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1703
+ });
1704
+ },
1705
+ };
1706
+ };
1707
+ exports.ClubSportsApiFp = ClubSportsApiFp;
1708
+ /**
1709
+ * ClubSportsApi - factory interface
1710
+ * @export
1711
+ */
1712
+ const ClubSportsApiFactory = function (configuration, basePath, axios) {
1713
+ const localVarFp = (0, exports.ClubSportsApiFp)(configuration);
1714
+ return {
1715
+ /**
1716
+ *
1717
+ * @summary Créer un sport pour un club
1718
+ * @param {ClubSportsApiCreateSportForClubRequest} requestParameters Request parameters.
1719
+ * @param {*} [options] Override http request option.
1720
+ * @throws {RequiredError}
1721
+ */
1722
+ createSportForClub(requestParameters, options) {
1723
+ return localVarFp.createSportForClub(requestParameters.id, requestParameters.createSportRequest, options).then((request) => request(axios, basePath));
1724
+ },
1725
+ /**
1726
+ *
1727
+ * @summary Récupérer tous les sports pour un club
1728
+ * @param {ClubSportsApiGetSportsByClubRequest} requestParameters Request parameters.
1729
+ * @param {*} [options] Override http request option.
1730
+ * @throws {RequiredError}
1731
+ */
1732
+ getSportsByClub(requestParameters, options) {
1733
+ return localVarFp.getSportsByClub(requestParameters.id, options).then((request) => request(axios, basePath));
1734
+ },
1735
+ };
1736
+ };
1737
+ exports.ClubSportsApiFactory = ClubSportsApiFactory;
1738
+ /**
1739
+ * ClubSportsApi - object-oriented interface
1740
+ * @export
1741
+ * @class ClubSportsApi
1742
+ * @extends {BaseAPI}
1743
+ */
1744
+ class ClubSportsApi extends base_1.BaseAPI {
1745
+ /**
1746
+ *
1747
+ * @summary Créer un sport pour un club
1748
+ * @param {ClubSportsApiCreateSportForClubRequest} requestParameters Request parameters.
1749
+ * @param {*} [options] Override http request option.
1750
+ * @throws {RequiredError}
1751
+ * @memberof ClubSportsApi
1752
+ */
1753
+ createSportForClub(requestParameters, options) {
1754
+ return (0, exports.ClubSportsApiFp)(this.configuration).createSportForClub(requestParameters.id, requestParameters.createSportRequest, options).then((request) => request(this.axios, this.basePath));
1755
+ }
1756
+ /**
1757
+ *
1758
+ * @summary Récupérer tous les sports pour un club
1759
+ * @param {ClubSportsApiGetSportsByClubRequest} requestParameters Request parameters.
1760
+ * @param {*} [options] Override http request option.
1761
+ * @throws {RequiredError}
1762
+ * @memberof ClubSportsApi
1763
+ */
1764
+ getSportsByClub(requestParameters, options) {
1765
+ return (0, exports.ClubSportsApiFp)(this.configuration).getSportsByClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
1766
+ }
1767
+ }
1768
+ exports.ClubSportsApi = ClubSportsApi;
1769
+ /**
1770
+ * ClubSubscriptionsApi - axios parameter creator
1771
+ * @export
1772
+ */
1773
+ const ClubSubscriptionsApiAxiosParamCreator = function (configuration) {
1774
+ return {
1775
+ /**
1776
+ *
1777
+ * @summary Archiver un prix
1778
+ * @param {string} id ID du club
1779
+ * @param {string} priceId ID du prix Stripe
1780
+ * @param {*} [options] Override http request option.
1781
+ * @throws {RequiredError}
1782
+ */
1783
+ archivePriceForSubscriptionPlan: (id_1, priceId_1, ...args_1) => __awaiter(this, [id_1, priceId_1, ...args_1], void 0, function* (id, priceId, options = {}) {
1784
+ // verify required parameter 'id' is not null or undefined
1785
+ (0, common_1.assertParamExists)('archivePriceForSubscriptionPlan', 'id', id);
1786
+ // verify required parameter 'priceId' is not null or undefined
1787
+ (0, common_1.assertParamExists)('archivePriceForSubscriptionPlan', 'priceId', priceId);
1788
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}/archive-price`
1789
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1790
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
1791
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1792
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1793
+ let baseOptions;
1794
+ if (configuration) {
1795
+ baseOptions = configuration.baseOptions;
1796
+ }
1797
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1798
+ const localVarHeaderParameter = {};
1799
+ const localVarQueryParameter = {};
1800
+ // authentication bearerAuth required
1801
+ // http bearer authentication required
1802
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1803
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1804
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1805
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1806
+ return {
1807
+ url: (0, common_1.toPathString)(localVarUrlObj),
1808
+ options: localVarRequestOptions,
1809
+ };
1810
+ }),
1811
+ /**
1812
+ *
1813
+ * @summary Créer un nouveau prix pour un plan
1814
+ * @param {string} id ID du club
1815
+ * @param {string} productId ID du produit Stripe
1816
+ * @param {CreatePriceRequest} createPriceRequest
1817
+ * @param {*} [options] Override http request option.
1818
+ * @throws {RequiredError}
1819
+ */
1820
+ 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 = {}) {
1821
+ // verify required parameter 'id' is not null or undefined
1822
+ (0, common_1.assertParamExists)('createPriceForSubscriptionPlan', 'id', id);
1823
+ // verify required parameter 'productId' is not null or undefined
1824
+ (0, common_1.assertParamExists)('createPriceForSubscriptionPlan', 'productId', productId);
1825
+ // verify required parameter 'createPriceRequest' is not null or undefined
1826
+ (0, common_1.assertParamExists)('createPriceForSubscriptionPlan', 'createPriceRequest', createPriceRequest);
1827
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}/prices`
1828
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1829
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1830
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1831
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1832
+ let baseOptions;
1833
+ if (configuration) {
1834
+ baseOptions = configuration.baseOptions;
1835
+ }
1836
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1837
+ const localVarHeaderParameter = {};
1838
+ const localVarQueryParameter = {};
1839
+ // authentication bearerAuth required
1840
+ // http bearer authentication required
1841
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1842
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1843
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1844
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1845
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1846
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPriceRequest, localVarRequestOptions, configuration);
1847
+ return {
1848
+ url: (0, common_1.toPathString)(localVarUrlObj),
1849
+ options: localVarRequestOptions,
1850
+ };
1851
+ }),
1852
+ /**
1853
+ *
1854
+ * @summary Créer un plan d\'abonnement pour un club
1855
+ * @param {string} id ID du club
1856
+ * @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
1857
+ * @param {*} [options] Override http request option.
1858
+ * @throws {RequiredError}
1859
+ */
1860
+ createSubscriptionPlanForClub: (id_1, createSubscriptionPlanRequest_1, ...args_1) => __awaiter(this, [id_1, createSubscriptionPlanRequest_1, ...args_1], void 0, function* (id, createSubscriptionPlanRequest, options = {}) {
1861
+ // verify required parameter 'id' is not null or undefined
1862
+ (0, common_1.assertParamExists)('createSubscriptionPlanForClub', 'id', id);
1863
+ // verify required parameter 'createSubscriptionPlanRequest' is not null or undefined
1864
+ (0, common_1.assertParamExists)('createSubscriptionPlanForClub', 'createSubscriptionPlanRequest', createSubscriptionPlanRequest);
1865
+ const localVarPath = `/api/clubs/{id}/subscription-plans`
1866
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1867
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1868
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1869
+ let baseOptions;
1870
+ if (configuration) {
1871
+ baseOptions = configuration.baseOptions;
1872
+ }
1873
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1874
+ const localVarHeaderParameter = {};
1875
+ const localVarQueryParameter = {};
1876
+ // authentication bearerAuth required
1877
+ // http bearer authentication required
1878
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1879
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1880
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1881
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1882
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1883
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createSubscriptionPlanRequest, localVarRequestOptions, configuration);
1884
+ return {
1885
+ url: (0, common_1.toPathString)(localVarUrlObj),
1886
+ options: localVarRequestOptions,
1887
+ };
1888
+ }),
1889
+ /**
1890
+ *
1891
+ * @summary Supprimer un plan d\'abonnement pour un club
1892
+ * @param {string} id ID du club
1893
+ * @param {string} productId ID du produit Stripe
1894
+ * @param {*} [options] Override http request option.
1895
+ * @throws {RequiredError}
1896
+ */
1897
+ deleteSubscriptionPlanForClub: (id_1, productId_1, ...args_1) => __awaiter(this, [id_1, productId_1, ...args_1], void 0, function* (id, productId, options = {}) {
1898
+ // verify required parameter 'id' is not null or undefined
1899
+ (0, common_1.assertParamExists)('deleteSubscriptionPlanForClub', 'id', id);
1900
+ // verify required parameter 'productId' is not null or undefined
1901
+ (0, common_1.assertParamExists)('deleteSubscriptionPlanForClub', 'productId', productId);
1902
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}`
1903
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1904
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1905
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1906
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1907
+ let baseOptions;
1908
+ if (configuration) {
1909
+ baseOptions = configuration.baseOptions;
1910
+ }
1911
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1912
+ const localVarHeaderParameter = {};
1913
+ const localVarQueryParameter = {};
1914
+ // authentication bearerAuth required
1915
+ // http bearer authentication required
1916
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1917
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1918
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1919
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1920
+ return {
1921
+ url: (0, common_1.toPathString)(localVarUrlObj),
1922
+ options: localVarRequestOptions,
1923
+ };
1924
+ }),
1925
+ /**
1926
+ *
1927
+ * @summary Réactiver un plan d\'abonnement
1928
+ * @param {string} id ID du club
1929
+ * @param {string} productId ID du produit Stripe
1930
+ * @param {*} [options] Override http request option.
1931
+ * @throws {RequiredError}
1932
+ */
1933
+ restoreSubscriptionPlanForClub: (id_1, productId_1, ...args_1) => __awaiter(this, [id_1, productId_1, ...args_1], void 0, function* (id, productId, options = {}) {
1934
+ // verify required parameter 'id' is not null or undefined
1935
+ (0, common_1.assertParamExists)('restoreSubscriptionPlanForClub', 'id', id);
1936
+ // verify required parameter 'productId' is not null or undefined
1937
+ (0, common_1.assertParamExists)('restoreSubscriptionPlanForClub', 'productId', productId);
1938
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{productId}/restore`
1939
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1940
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1941
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1942
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1943
+ let baseOptions;
1944
+ if (configuration) {
1945
+ baseOptions = configuration.baseOptions;
1946
+ }
1947
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1948
+ const localVarHeaderParameter = {};
1949
+ const localVarQueryParameter = {};
1950
+ // authentication bearerAuth required
1951
+ // http bearer authentication required
1952
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1953
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1954
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1955
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1956
+ return {
1957
+ url: (0, common_1.toPathString)(localVarUrlObj),
1958
+ options: localVarRequestOptions,
1959
+ };
1960
+ }),
1961
+ /**
1962
+ *
1963
+ * @summary Réactiver un prix
1964
+ * @param {string} id ID du club
1965
+ * @param {string} priceId ID du prix Stripe
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ restoreSubscriptionPriceForClub: (id_1, priceId_1, ...args_1) => __awaiter(this, [id_1, priceId_1, ...args_1], void 0, function* (id, priceId, options = {}) {
1970
+ // verify required parameter 'id' is not null or undefined
1971
+ (0, common_1.assertParamExists)('restoreSubscriptionPriceForClub', 'id', id);
1972
+ // verify required parameter 'priceId' is not null or undefined
1973
+ (0, common_1.assertParamExists)('restoreSubscriptionPriceForClub', 'priceId', priceId);
1974
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}/restore-price`
1975
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
1976
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
1977
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1978
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1979
+ let baseOptions;
1980
+ if (configuration) {
1981
+ baseOptions = configuration.baseOptions;
1982
+ }
1983
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1984
+ const localVarHeaderParameter = {};
1985
+ const localVarQueryParameter = {};
1986
+ // authentication bearerAuth required
1987
+ // http bearer authentication required
1988
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1989
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1990
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1991
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1992
+ return {
1993
+ url: (0, common_1.toPathString)(localVarUrlObj),
1994
+ options: localVarRequestOptions,
1995
+ };
1996
+ }),
1997
+ /**
1998
+ *
1999
+ * @summary Mettre à jour un plan d\'abonnement
2000
+ * @param {string} id ID du club
2001
+ * @param {string} priceId ID du prix Stripe
2002
+ * @param {UpdateSubscriptionPlanRequest} updateSubscriptionPlanRequest
2003
+ * @param {*} [options] Override http request option.
2004
+ * @throws {RequiredError}
2005
+ */
2006
+ 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 = {}) {
2007
+ // verify required parameter 'id' is not null or undefined
2008
+ (0, common_1.assertParamExists)('updateSubscriptionPlanForClub', 'id', id);
2009
+ // verify required parameter 'priceId' is not null or undefined
2010
+ (0, common_1.assertParamExists)('updateSubscriptionPlanForClub', 'priceId', priceId);
2011
+ // verify required parameter 'updateSubscriptionPlanRequest' is not null or undefined
2012
+ (0, common_1.assertParamExists)('updateSubscriptionPlanForClub', 'updateSubscriptionPlanRequest', updateSubscriptionPlanRequest);
2013
+ const localVarPath = `/api/clubs/{id}/subscription-plans/{priceId}`
2014
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2015
+ .replace(`{${"priceId"}}`, encodeURIComponent(String(priceId)));
2016
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2017
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2018
+ let baseOptions;
2019
+ if (configuration) {
2020
+ baseOptions = configuration.baseOptions;
2021
+ }
2022
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2023
+ const localVarHeaderParameter = {};
2024
+ const localVarQueryParameter = {};
2025
+ // authentication bearerAuth required
2026
+ // http bearer authentication required
2027
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2028
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2029
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2030
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2031
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2032
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateSubscriptionPlanRequest, localVarRequestOptions, configuration);
2033
+ return {
2034
+ url: (0, common_1.toPathString)(localVarUrlObj),
2035
+ options: localVarRequestOptions,
2036
+ };
2037
+ }),
2038
+ };
2039
+ };
2040
+ exports.ClubSubscriptionsApiAxiosParamCreator = ClubSubscriptionsApiAxiosParamCreator;
2041
+ /**
2042
+ * ClubSubscriptionsApi - functional programming interface
2043
+ * @export
2044
+ */
2045
+ const ClubSubscriptionsApiFp = function (configuration) {
2046
+ const localVarAxiosParamCreator = (0, exports.ClubSubscriptionsApiAxiosParamCreator)(configuration);
2047
+ return {
2048
+ /**
2049
+ *
2050
+ * @summary Archiver un prix
2051
+ * @param {string} id ID du club
2052
+ * @param {string} priceId ID du prix Stripe
2053
+ * @param {*} [options] Override http request option.
2054
+ * @throws {RequiredError}
2055
+ */
2056
+ archivePriceForSubscriptionPlan(id, priceId, options) {
2057
+ return __awaiter(this, void 0, void 0, function* () {
2058
+ var _a, _b, _c;
2059
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.archivePriceForSubscriptionPlan(id, priceId, options);
2060
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2061
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.archivePriceForSubscriptionPlan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2062
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2063
+ });
2064
+ },
2065
+ /**
2066
+ *
2067
+ * @summary Créer un nouveau prix pour un plan
2068
+ * @param {string} id ID du club
2069
+ * @param {string} productId ID du produit Stripe
2070
+ * @param {CreatePriceRequest} createPriceRequest
2071
+ * @param {*} [options] Override http request option.
2072
+ * @throws {RequiredError}
2073
+ */
2074
+ createPriceForSubscriptionPlan(id, productId, createPriceRequest, options) {
2075
+ return __awaiter(this, void 0, void 0, function* () {
2076
+ var _a, _b, _c;
2077
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPriceForSubscriptionPlan(id, productId, createPriceRequest, options);
2078
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2079
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.createPriceForSubscriptionPlan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2080
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2081
+ });
2082
+ },
2083
+ /**
2084
+ *
2085
+ * @summary Créer un plan d\'abonnement pour un club
2086
+ * @param {string} id ID du club
2087
+ * @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
2088
+ * @param {*} [options] Override http request option.
2089
+ * @throws {RequiredError}
2090
+ */
2091
+ createSubscriptionPlanForClub(id, createSubscriptionPlanRequest, options) {
2092
+ return __awaiter(this, void 0, void 0, function* () {
2093
+ var _a, _b, _c;
2094
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSubscriptionPlanForClub(id, createSubscriptionPlanRequest, options);
2095
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2096
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.createSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2097
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2098
+ });
2099
+ },
2100
+ /**
2101
+ *
2102
+ * @summary Supprimer un plan d\'abonnement pour un club
2103
+ * @param {string} id ID du club
2104
+ * @param {string} productId ID du produit Stripe
2105
+ * @param {*} [options] Override http request option.
2106
+ * @throws {RequiredError}
2107
+ */
2108
+ deleteSubscriptionPlanForClub(id, productId, options) {
2109
+ return __awaiter(this, void 0, void 0, function* () {
2110
+ var _a, _b, _c;
2111
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSubscriptionPlanForClub(id, productId, options);
2112
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2113
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.deleteSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2114
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2115
+ });
2116
+ },
2117
+ /**
2118
+ *
2119
+ * @summary Réactiver un plan d\'abonnement
2120
+ * @param {string} id ID du club
2121
+ * @param {string} productId ID du produit Stripe
2122
+ * @param {*} [options] Override http request option.
2123
+ * @throws {RequiredError}
2124
+ */
2125
+ restoreSubscriptionPlanForClub(id, productId, options) {
2126
+ return __awaiter(this, void 0, void 0, function* () {
2127
+ var _a, _b, _c;
2128
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreSubscriptionPlanForClub(id, productId, options);
2129
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2130
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.restoreSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2131
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2132
+ });
2133
+ },
2134
+ /**
2135
+ *
2136
+ * @summary Réactiver un prix
2137
+ * @param {string} id ID du club
2138
+ * @param {string} priceId ID du prix Stripe
2139
+ * @param {*} [options] Override http request option.
2140
+ * @throws {RequiredError}
2141
+ */
2142
+ restoreSubscriptionPriceForClub(id, priceId, options) {
2143
+ return __awaiter(this, void 0, void 0, function* () {
2144
+ var _a, _b, _c;
2145
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreSubscriptionPriceForClub(id, priceId, options);
2146
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2147
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.restoreSubscriptionPriceForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2148
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2149
+ });
2150
+ },
2151
+ /**
2152
+ *
2153
+ * @summary Mettre à jour un plan d\'abonnement
2154
+ * @param {string} id ID du club
2155
+ * @param {string} priceId ID du prix Stripe
2156
+ * @param {UpdateSubscriptionPlanRequest} updateSubscriptionPlanRequest
2157
+ * @param {*} [options] Override http request option.
2158
+ * @throws {RequiredError}
2159
+ */
2160
+ updateSubscriptionPlanForClub(id, priceId, updateSubscriptionPlanRequest, options) {
2161
+ return __awaiter(this, void 0, void 0, function* () {
2162
+ var _a, _b, _c;
2163
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSubscriptionPlanForClub(id, priceId, updateSubscriptionPlanRequest, options);
2164
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2165
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSubscriptionsApi.updateSubscriptionPlanForClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2166
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2167
+ });
2168
+ },
2169
+ };
2170
+ };
2171
+ exports.ClubSubscriptionsApiFp = ClubSubscriptionsApiFp;
2172
+ /**
2173
+ * ClubSubscriptionsApi - factory interface
2174
+ * @export
2175
+ */
2176
+ const ClubSubscriptionsApiFactory = function (configuration, basePath, axios) {
2177
+ const localVarFp = (0, exports.ClubSubscriptionsApiFp)(configuration);
2178
+ return {
2179
+ /**
2180
+ *
2181
+ * @summary Archiver un prix
2182
+ * @param {ClubSubscriptionsApiArchivePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2183
+ * @param {*} [options] Override http request option.
2184
+ * @throws {RequiredError}
2185
+ */
2186
+ archivePriceForSubscriptionPlan(requestParameters, options) {
2187
+ return localVarFp.archivePriceForSubscriptionPlan(requestParameters.id, requestParameters.priceId, options).then((request) => request(axios, basePath));
2188
+ },
2189
+ /**
2190
+ *
2191
+ * @summary Créer un nouveau prix pour un plan
2192
+ * @param {ClubSubscriptionsApiCreatePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2193
+ * @param {*} [options] Override http request option.
2194
+ * @throws {RequiredError}
2195
+ */
2196
+ createPriceForSubscriptionPlan(requestParameters, options) {
2197
+ return localVarFp.createPriceForSubscriptionPlan(requestParameters.id, requestParameters.productId, requestParameters.createPriceRequest, options).then((request) => request(axios, basePath));
2198
+ },
2199
+ /**
2200
+ *
2201
+ * @summary Créer un plan d\'abonnement pour un club
2202
+ * @param {ClubSubscriptionsApiCreateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2203
+ * @param {*} [options] Override http request option.
2204
+ * @throws {RequiredError}
2205
+ */
2206
+ createSubscriptionPlanForClub(requestParameters, options) {
2207
+ return localVarFp.createSubscriptionPlanForClub(requestParameters.id, requestParameters.createSubscriptionPlanRequest, options).then((request) => request(axios, basePath));
2208
+ },
2209
+ /**
2210
+ *
2211
+ * @summary Supprimer un plan d\'abonnement pour un club
2212
+ * @param {ClubSubscriptionsApiDeleteSubscriptionPlanForClubRequest} requestParameters Request parameters.
2213
+ * @param {*} [options] Override http request option.
2214
+ * @throws {RequiredError}
2215
+ */
2216
+ deleteSubscriptionPlanForClub(requestParameters, options) {
2217
+ return localVarFp.deleteSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(axios, basePath));
2218
+ },
2219
+ /**
2220
+ *
2221
+ * @summary Réactiver un plan d\'abonnement
2222
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPlanForClubRequest} requestParameters Request parameters.
2223
+ * @param {*} [options] Override http request option.
2224
+ * @throws {RequiredError}
2225
+ */
2226
+ restoreSubscriptionPlanForClub(requestParameters, options) {
2227
+ return localVarFp.restoreSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(axios, basePath));
2228
+ },
2229
+ /**
2230
+ *
2231
+ * @summary Réactiver un prix
2232
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPriceForClubRequest} requestParameters Request parameters.
2233
+ * @param {*} [options] Override http request option.
2234
+ * @throws {RequiredError}
2235
+ */
2236
+ restoreSubscriptionPriceForClub(requestParameters, options) {
2237
+ return localVarFp.restoreSubscriptionPriceForClub(requestParameters.id, requestParameters.priceId, options).then((request) => request(axios, basePath));
2238
+ },
2239
+ /**
2240
+ *
2241
+ * @summary Mettre à jour un plan d\'abonnement
2242
+ * @param {ClubSubscriptionsApiUpdateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2243
+ * @param {*} [options] Override http request option.
2244
+ * @throws {RequiredError}
2245
+ */
2246
+ updateSubscriptionPlanForClub(requestParameters, options) {
2247
+ return localVarFp.updateSubscriptionPlanForClub(requestParameters.id, requestParameters.priceId, requestParameters.updateSubscriptionPlanRequest, options).then((request) => request(axios, basePath));
2248
+ },
2249
+ };
2250
+ };
2251
+ exports.ClubSubscriptionsApiFactory = ClubSubscriptionsApiFactory;
2252
+ /**
2253
+ * ClubSubscriptionsApi - object-oriented interface
2254
+ * @export
2255
+ * @class ClubSubscriptionsApi
2256
+ * @extends {BaseAPI}
2257
+ */
2258
+ class ClubSubscriptionsApi extends base_1.BaseAPI {
2259
+ /**
2260
+ *
2261
+ * @summary Archiver un prix
2262
+ * @param {ClubSubscriptionsApiArchivePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2263
+ * @param {*} [options] Override http request option.
2264
+ * @throws {RequiredError}
2265
+ * @memberof ClubSubscriptionsApi
2266
+ */
2267
+ archivePriceForSubscriptionPlan(requestParameters, options) {
2268
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).archivePriceForSubscriptionPlan(requestParameters.id, requestParameters.priceId, options).then((request) => request(this.axios, this.basePath));
2269
+ }
2270
+ /**
2271
+ *
2272
+ * @summary Créer un nouveau prix pour un plan
2273
+ * @param {ClubSubscriptionsApiCreatePriceForSubscriptionPlanRequest} requestParameters Request parameters.
2274
+ * @param {*} [options] Override http request option.
2275
+ * @throws {RequiredError}
2276
+ * @memberof ClubSubscriptionsApi
2277
+ */
2278
+ createPriceForSubscriptionPlan(requestParameters, options) {
2279
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).createPriceForSubscriptionPlan(requestParameters.id, requestParameters.productId, requestParameters.createPriceRequest, options).then((request) => request(this.axios, this.basePath));
2280
+ }
2281
+ /**
2282
+ *
2283
+ * @summary Créer un plan d\'abonnement pour un club
2284
+ * @param {ClubSubscriptionsApiCreateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2285
+ * @param {*} [options] Override http request option.
2286
+ * @throws {RequiredError}
2287
+ * @memberof ClubSubscriptionsApi
2288
+ */
2289
+ createSubscriptionPlanForClub(requestParameters, options) {
2290
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).createSubscriptionPlanForClub(requestParameters.id, requestParameters.createSubscriptionPlanRequest, options).then((request) => request(this.axios, this.basePath));
2291
+ }
2292
+ /**
2293
+ *
2294
+ * @summary Supprimer un plan d\'abonnement pour un club
2295
+ * @param {ClubSubscriptionsApiDeleteSubscriptionPlanForClubRequest} requestParameters Request parameters.
2296
+ * @param {*} [options] Override http request option.
2297
+ * @throws {RequiredError}
2298
+ * @memberof ClubSubscriptionsApi
2299
+ */
2300
+ deleteSubscriptionPlanForClub(requestParameters, options) {
2301
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).deleteSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
2302
+ }
2303
+ /**
2304
+ *
2305
+ * @summary Réactiver un plan d\'abonnement
2306
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPlanForClubRequest} requestParameters Request parameters.
2307
+ * @param {*} [options] Override http request option.
2308
+ * @throws {RequiredError}
2309
+ * @memberof ClubSubscriptionsApi
2310
+ */
2311
+ restoreSubscriptionPlanForClub(requestParameters, options) {
2312
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).restoreSubscriptionPlanForClub(requestParameters.id, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
2313
+ }
2314
+ /**
2315
+ *
2316
+ * @summary Réactiver un prix
2317
+ * @param {ClubSubscriptionsApiRestoreSubscriptionPriceForClubRequest} requestParameters Request parameters.
2318
+ * @param {*} [options] Override http request option.
2319
+ * @throws {RequiredError}
2320
+ * @memberof ClubSubscriptionsApi
2321
+ */
2322
+ restoreSubscriptionPriceForClub(requestParameters, options) {
2323
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).restoreSubscriptionPriceForClub(requestParameters.id, requestParameters.priceId, options).then((request) => request(this.axios, this.basePath));
2324
+ }
2325
+ /**
2326
+ *
2327
+ * @summary Mettre à jour un plan d\'abonnement
2328
+ * @param {ClubSubscriptionsApiUpdateSubscriptionPlanForClubRequest} requestParameters Request parameters.
2329
+ * @param {*} [options] Override http request option.
2330
+ * @throws {RequiredError}
2331
+ * @memberof ClubSubscriptionsApi
2332
+ */
2333
+ updateSubscriptionPlanForClub(requestParameters, options) {
2334
+ return (0, exports.ClubSubscriptionsApiFp)(this.configuration).updateSubscriptionPlanForClub(requestParameters.id, requestParameters.priceId, requestParameters.updateSubscriptionPlanRequest, options).then((request) => request(this.axios, this.basePath));
2335
+ }
2336
+ }
2337
+ exports.ClubSubscriptionsApi = ClubSubscriptionsApi;
2338
+ /**
2339
+ * ClubsApi - axios parameter creator
2340
+ * @export
2341
+ */
2342
+ const ClubsApiAxiosParamCreator = function (configuration) {
2343
+ return {
2344
+ /**
2345
+ *
2346
+ * @summary Ajouter un membre à un club
2347
+ * @param {string} id ID du club
2348
+ * @param {AddClubMemberRequest} addClubMemberRequest
2349
+ * @param {*} [options] Override http request option.
2350
+ * @throws {RequiredError}
2351
+ */
2352
+ addClubMember: (id_1, addClubMemberRequest_1, ...args_1) => __awaiter(this, [id_1, addClubMemberRequest_1, ...args_1], void 0, function* (id, addClubMemberRequest, options = {}) {
2353
+ // verify required parameter 'id' is not null or undefined
2354
+ (0, common_1.assertParamExists)('addClubMember', 'id', id);
2355
+ // verify required parameter 'addClubMemberRequest' is not null or undefined
2356
+ (0, common_1.assertParamExists)('addClubMember', 'addClubMemberRequest', addClubMemberRequest);
2357
+ const localVarPath = `/api/clubs/{id}/add_members`
2358
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2359
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2360
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2361
+ let baseOptions;
2362
+ if (configuration) {
2363
+ baseOptions = configuration.baseOptions;
2364
+ }
2365
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2366
+ const localVarHeaderParameter = {};
2367
+ const localVarQueryParameter = {};
2368
+ // authentication bearerAuth required
2369
+ // http bearer authentication required
2370
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2371
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2372
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2373
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2374
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2375
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(addClubMemberRequest, localVarRequestOptions, configuration);
2376
+ return {
2377
+ url: (0, common_1.toPathString)(localVarUrlObj),
2378
+ options: localVarRequestOptions,
2379
+ };
2380
+ }),
2381
+ /**
2382
+ *
2383
+ * @summary Créer un nouveau club
2384
+ * @param {CreateClubRequest} createClubRequest
2385
+ * @param {*} [options] Override http request option.
2386
+ * @throws {RequiredError}
2387
+ */
2388
+ createClub: (createClubRequest_1, ...args_1) => __awaiter(this, [createClubRequest_1, ...args_1], void 0, function* (createClubRequest, options = {}) {
2389
+ // verify required parameter 'createClubRequest' is not null or undefined
2390
+ (0, common_1.assertParamExists)('createClub', 'createClubRequest', createClubRequest);
2391
+ const localVarPath = `/api/clubs`;
2392
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2393
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2394
+ let baseOptions;
2395
+ if (configuration) {
2396
+ baseOptions = configuration.baseOptions;
2397
+ }
2398
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2399
+ const localVarHeaderParameter = {};
2400
+ const localVarQueryParameter = {};
2401
+ // authentication bearerAuth required
2402
+ // http bearer authentication required
2403
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2404
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2405
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2406
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2407
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2408
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createClubRequest, localVarRequestOptions, configuration);
2409
+ return {
2410
+ url: (0, common_1.toPathString)(localVarUrlObj),
2411
+ options: localVarRequestOptions,
2412
+ };
2413
+ }),
2414
+ /**
2415
+ *
2416
+ * @summary Supprimer un club
2417
+ * @param {string} id ID du club
2418
+ * @param {*} [options] Override http request option.
2419
+ * @throws {RequiredError}
2420
+ */
2421
+ deleteClub: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2422
+ // verify required parameter 'id' is not null or undefined
2423
+ (0, common_1.assertParamExists)('deleteClub', 'id', id);
2424
+ const localVarPath = `/api/clubs/{id}`
2425
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2426
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2427
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2428
+ let baseOptions;
2429
+ if (configuration) {
2430
+ baseOptions = configuration.baseOptions;
2431
+ }
2432
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2433
+ const localVarHeaderParameter = {};
2434
+ const localVarQueryParameter = {};
2435
+ // authentication bearerAuth required
2436
+ // http bearer authentication required
2437
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2438
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2439
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2440
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2441
+ return {
2442
+ url: (0, common_1.toPathString)(localVarUrlObj),
2443
+ options: localVarRequestOptions,
2444
+ };
2445
+ }),
2446
+ /**
2447
+ *
2448
+ * @summary Récupérer tous les clubs
2449
+ * @param {*} [options] Override http request option.
2450
+ * @throws {RequiredError}
2451
+ */
2452
+ getAllClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2453
+ const localVarPath = `/api/clubs`;
2454
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2455
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2456
+ let baseOptions;
2457
+ if (configuration) {
2458
+ baseOptions = configuration.baseOptions;
2459
+ }
2460
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2461
+ const localVarHeaderParameter = {};
2462
+ const localVarQueryParameter = {};
2463
+ // authentication bearerAuth required
2464
+ // http bearer authentication required
2465
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2466
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2467
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2468
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2469
+ return {
2470
+ url: (0, common_1.toPathString)(localVarUrlObj),
2471
+ options: localVarRequestOptions,
2472
+ };
2473
+ }),
2474
+ /**
2475
+ *
2476
+ * @summary Récupérer les informations d\'un club
2477
+ * @param {string} id ID du club
2478
+ * @param {*} [options] Override http request option.
2479
+ * @throws {RequiredError}
2480
+ */
2481
+ getClubInfo: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2482
+ // verify required parameter 'id' is not null or undefined
2483
+ (0, common_1.assertParamExists)('getClubInfo', 'id', id);
2484
+ const localVarPath = `/api/clubs/{id}`
2485
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2486
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2487
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2488
+ let baseOptions;
2489
+ if (configuration) {
2490
+ baseOptions = configuration.baseOptions;
2491
+ }
2492
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2493
+ const localVarHeaderParameter = {};
2494
+ const localVarQueryParameter = {};
2495
+ // authentication bearerAuth required
2496
+ // http bearer authentication required
2497
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2498
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2499
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2500
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2501
+ return {
2502
+ url: (0, common_1.toPathString)(localVarUrlObj),
2503
+ options: localVarRequestOptions,
2504
+ };
2505
+ }),
2506
+ /**
2507
+ *
2508
+ * @summary Récupérer les membres d\'un club
2509
+ * @param {string} id ID du club
2510
+ * @param {*} [options] Override http request option.
2511
+ * @throws {RequiredError}
2512
+ */
2513
+ getClubMembers: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2514
+ // verify required parameter 'id' is not null or undefined
2515
+ (0, common_1.assertParamExists)('getClubMembers', 'id', id);
2516
+ const localVarPath = `/api/clubs/{id}/members`
2517
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2518
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2519
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2520
+ let baseOptions;
2521
+ if (configuration) {
2522
+ baseOptions = configuration.baseOptions;
2523
+ }
2524
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2525
+ const localVarHeaderParameter = {};
2526
+ const localVarQueryParameter = {};
2527
+ // authentication bearerAuth required
2528
+ // http bearer authentication required
2529
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2530
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2531
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2532
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2533
+ return {
2534
+ url: (0, common_1.toPathString)(localVarUrlObj),
2535
+ options: localVarRequestOptions,
2536
+ };
2537
+ }),
2538
+ /**
2539
+ *
2540
+ * @summary Récupérer les rôles d\'un club
2541
+ * @param {string} id ID du club
2542
+ * @param {*} [options] Override http request option.
2543
+ * @throws {RequiredError}
2544
+ */
2545
+ getClubRoles: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2546
+ // verify required parameter 'id' is not null or undefined
2547
+ (0, common_1.assertParamExists)('getClubRoles', 'id', id);
2548
+ const localVarPath = `/api/clubs/{id}/roles`
2549
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2550
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2551
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2552
+ let baseOptions;
2553
+ if (configuration) {
2554
+ baseOptions = configuration.baseOptions;
2555
+ }
2556
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2557
+ const localVarHeaderParameter = {};
2558
+ const localVarQueryParameter = {};
2559
+ // authentication bearerAuth required
2560
+ // http bearer authentication required
2561
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2562
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2563
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2564
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2565
+ return {
2566
+ url: (0, common_1.toPathString)(localVarUrlObj),
2567
+ options: localVarRequestOptions,
2568
+ };
2569
+ }),
2570
+ /**
2571
+ *
2572
+ * @summary Mettre à jour un club existant
2573
+ * @param {string} id ID du club
2574
+ * @param {UpdateClubRequest} updateClubRequest
2575
+ * @param {*} [options] Override http request option.
2576
+ * @throws {RequiredError}
2577
+ */
2578
+ updateClub: (id_1, updateClubRequest_1, ...args_1) => __awaiter(this, [id_1, updateClubRequest_1, ...args_1], void 0, function* (id, updateClubRequest, options = {}) {
2579
+ // verify required parameter 'id' is not null or undefined
2580
+ (0, common_1.assertParamExists)('updateClub', 'id', id);
2581
+ // verify required parameter 'updateClubRequest' is not null or undefined
2582
+ (0, common_1.assertParamExists)('updateClub', 'updateClubRequest', updateClubRequest);
2583
+ const localVarPath = `/api/clubs/{id}`
2584
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2585
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2586
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2587
+ let baseOptions;
2588
+ if (configuration) {
2589
+ baseOptions = configuration.baseOptions;
2590
+ }
2591
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2592
+ const localVarHeaderParameter = {};
2593
+ const localVarQueryParameter = {};
2594
+ // authentication bearerAuth required
2595
+ // http bearer authentication required
2596
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2597
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2598
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2599
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2600
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2601
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClubRequest, localVarRequestOptions, configuration);
2602
+ return {
2603
+ url: (0, common_1.toPathString)(localVarUrlObj),
2604
+ options: localVarRequestOptions,
2605
+ };
2606
+ }),
2607
+ };
2608
+ };
2609
+ exports.ClubsApiAxiosParamCreator = ClubsApiAxiosParamCreator;
2610
+ /**
2611
+ * ClubsApi - functional programming interface
2612
+ * @export
2613
+ */
2614
+ const ClubsApiFp = function (configuration) {
2615
+ const localVarAxiosParamCreator = (0, exports.ClubsApiAxiosParamCreator)(configuration);
2616
+ return {
2617
+ /**
2618
+ *
2619
+ * @summary Ajouter un membre à un club
2620
+ * @param {string} id ID du club
2621
+ * @param {AddClubMemberRequest} addClubMemberRequest
2622
+ * @param {*} [options] Override http request option.
2623
+ * @throws {RequiredError}
2624
+ */
2625
+ addClubMember(id, addClubMemberRequest, options) {
2626
+ return __awaiter(this, void 0, void 0, function* () {
2627
+ var _a, _b, _c;
2628
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.addClubMember(id, addClubMemberRequest, options);
2629
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2630
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.addClubMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2631
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2632
+ });
2633
+ },
2634
+ /**
2635
+ *
2636
+ * @summary Créer un nouveau club
2637
+ * @param {CreateClubRequest} createClubRequest
2638
+ * @param {*} [options] Override http request option.
2639
+ * @throws {RequiredError}
2640
+ */
2641
+ createClub(createClubRequest, options) {
2642
+ return __awaiter(this, void 0, void 0, function* () {
2643
+ var _a, _b, _c;
2644
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClub(createClubRequest, options);
2645
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2646
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.createClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2647
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2648
+ });
2649
+ },
2650
+ /**
2651
+ *
2652
+ * @summary Supprimer un club
2653
+ * @param {string} id ID du club
2654
+ * @param {*} [options] Override http request option.
2655
+ * @throws {RequiredError}
2656
+ */
2657
+ deleteClub(id, options) {
2658
+ return __awaiter(this, void 0, void 0, function* () {
2659
+ var _a, _b, _c;
2660
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteClub(id, options);
2661
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2662
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.deleteClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2663
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2664
+ });
2665
+ },
2666
+ /**
2667
+ *
2668
+ * @summary Récupérer tous les clubs
2669
+ * @param {*} [options] Override http request option.
2670
+ * @throws {RequiredError}
2671
+ */
2672
+ getAllClubs(options) {
2673
+ return __awaiter(this, void 0, void 0, function* () {
2674
+ var _a, _b, _c;
2675
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllClubs(options);
2676
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2677
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.getAllClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2678
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2679
+ });
2680
+ },
2681
+ /**
2682
+ *
2683
+ * @summary Récupérer les informations d\'un club
2684
+ * @param {string} id ID du club
2685
+ * @param {*} [options] Override http request option.
2686
+ * @throws {RequiredError}
2687
+ */
2688
+ getClubInfo(id, options) {
2689
+ return __awaiter(this, void 0, void 0, function* () {
2690
+ var _a, _b, _c;
2691
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubInfo(id, options);
2692
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2693
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.getClubInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2694
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2695
+ });
2696
+ },
2697
+ /**
2698
+ *
2699
+ * @summary Récupérer les membres d\'un club
2700
+ * @param {string} id ID du club
2701
+ * @param {*} [options] Override http request option.
2702
+ * @throws {RequiredError}
2703
+ */
2704
+ getClubMembers(id, options) {
2705
+ return __awaiter(this, void 0, void 0, function* () {
2706
+ var _a, _b, _c;
2707
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubMembers(id, options);
2708
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2709
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.getClubMembers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2710
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2711
+ });
2712
+ },
2713
+ /**
2714
+ *
2715
+ * @summary Récupérer les rôles d\'un club
2716
+ * @param {string} id ID du club
2717
+ * @param {*} [options] Override http request option.
2718
+ * @throws {RequiredError}
2719
+ */
2720
+ getClubRoles(id, options) {
2721
+ return __awaiter(this, void 0, void 0, function* () {
2722
+ var _a, _b, _c;
2723
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClubRoles(id, options);
2724
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2725
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.getClubRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2726
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2727
+ });
2728
+ },
2729
+ /**
2730
+ *
2731
+ * @summary Mettre à jour un club existant
2732
+ * @param {string} id ID du club
2733
+ * @param {UpdateClubRequest} updateClubRequest
2734
+ * @param {*} [options] Override http request option.
2735
+ * @throws {RequiredError}
2736
+ */
2737
+ updateClub(id, updateClubRequest, options) {
2738
+ return __awaiter(this, void 0, void 0, function* () {
2739
+ var _a, _b, _c;
2740
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClub(id, updateClubRequest, options);
2741
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2742
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.updateClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2743
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2744
+ });
2745
+ },
2746
+ };
2747
+ };
2748
+ exports.ClubsApiFp = ClubsApiFp;
2749
+ /**
2750
+ * ClubsApi - factory interface
2751
+ * @export
2752
+ */
2753
+ const ClubsApiFactory = function (configuration, basePath, axios) {
2754
+ const localVarFp = (0, exports.ClubsApiFp)(configuration);
2755
+ return {
2756
+ /**
2757
+ *
2758
+ * @summary Ajouter un membre à un club
2759
+ * @param {ClubsApiAddClubMemberRequest} requestParameters Request parameters.
2760
+ * @param {*} [options] Override http request option.
2761
+ * @throws {RequiredError}
2762
+ */
2763
+ addClubMember(requestParameters, options) {
2764
+ return localVarFp.addClubMember(requestParameters.id, requestParameters.addClubMemberRequest, options).then((request) => request(axios, basePath));
2765
+ },
2766
+ /**
2767
+ *
2768
+ * @summary Créer un nouveau club
2769
+ * @param {ClubsApiCreateClubRequest} requestParameters Request parameters.
2770
+ * @param {*} [options] Override http request option.
2771
+ * @throws {RequiredError}
2772
+ */
2773
+ createClub(requestParameters, options) {
2774
+ return localVarFp.createClub(requestParameters.createClubRequest, options).then((request) => request(axios, basePath));
2775
+ },
2776
+ /**
2777
+ *
2778
+ * @summary Supprimer un club
2779
+ * @param {ClubsApiDeleteClubRequest} requestParameters Request parameters.
2780
+ * @param {*} [options] Override http request option.
2781
+ * @throws {RequiredError}
2782
+ */
2783
+ deleteClub(requestParameters, options) {
2784
+ return localVarFp.deleteClub(requestParameters.id, options).then((request) => request(axios, basePath));
2785
+ },
2786
+ /**
2787
+ *
2788
+ * @summary Récupérer tous les clubs
2789
+ * @param {*} [options] Override http request option.
2790
+ * @throws {RequiredError}
2791
+ */
2792
+ getAllClubs(options) {
2793
+ return localVarFp.getAllClubs(options).then((request) => request(axios, basePath));
2794
+ },
2795
+ /**
2796
+ *
2797
+ * @summary Récupérer les informations d\'un club
2798
+ * @param {ClubsApiGetClubInfoRequest} requestParameters Request parameters.
2799
+ * @param {*} [options] Override http request option.
2800
+ * @throws {RequiredError}
2801
+ */
2802
+ getClubInfo(requestParameters, options) {
2803
+ return localVarFp.getClubInfo(requestParameters.id, options).then((request) => request(axios, basePath));
2804
+ },
2805
+ /**
2806
+ *
2807
+ * @summary Récupérer les membres d\'un club
2808
+ * @param {ClubsApiGetClubMembersRequest} requestParameters Request parameters.
2809
+ * @param {*} [options] Override http request option.
2810
+ * @throws {RequiredError}
2811
+ */
2812
+ getClubMembers(requestParameters, options) {
2813
+ return localVarFp.getClubMembers(requestParameters.id, options).then((request) => request(axios, basePath));
2814
+ },
2815
+ /**
2816
+ *
2817
+ * @summary Récupérer les rôles d\'un club
2818
+ * @param {ClubsApiGetClubRolesRequest} requestParameters Request parameters.
2819
+ * @param {*} [options] Override http request option.
2820
+ * @throws {RequiredError}
2821
+ */
2822
+ getClubRoles(requestParameters, options) {
2823
+ return localVarFp.getClubRoles(requestParameters.id, options).then((request) => request(axios, basePath));
2824
+ },
2825
+ /**
2826
+ *
2827
+ * @summary Mettre à jour un club existant
2828
+ * @param {ClubsApiUpdateClubRequest} requestParameters Request parameters.
2829
+ * @param {*} [options] Override http request option.
2830
+ * @throws {RequiredError}
2831
+ */
2832
+ updateClub(requestParameters, options) {
2833
+ return localVarFp.updateClub(requestParameters.id, requestParameters.updateClubRequest, options).then((request) => request(axios, basePath));
2834
+ },
2835
+ };
2836
+ };
2837
+ exports.ClubsApiFactory = ClubsApiFactory;
2838
+ /**
2839
+ * ClubsApi - object-oriented interface
2840
+ * @export
2841
+ * @class ClubsApi
2842
+ * @extends {BaseAPI}
2843
+ */
2844
+ class ClubsApi extends base_1.BaseAPI {
2845
+ /**
2846
+ *
2847
+ * @summary Ajouter un membre à un club
2848
+ * @param {ClubsApiAddClubMemberRequest} requestParameters Request parameters.
2849
+ * @param {*} [options] Override http request option.
2850
+ * @throws {RequiredError}
2851
+ * @memberof ClubsApi
2852
+ */
2853
+ addClubMember(requestParameters, options) {
2854
+ return (0, exports.ClubsApiFp)(this.configuration).addClubMember(requestParameters.id, requestParameters.addClubMemberRequest, options).then((request) => request(this.axios, this.basePath));
2855
+ }
2856
+ /**
2857
+ *
2858
+ * @summary Créer un nouveau club
2859
+ * @param {ClubsApiCreateClubRequest} requestParameters Request parameters.
2860
+ * @param {*} [options] Override http request option.
2861
+ * @throws {RequiredError}
2862
+ * @memberof ClubsApi
2863
+ */
2864
+ createClub(requestParameters, options) {
2865
+ return (0, exports.ClubsApiFp)(this.configuration).createClub(requestParameters.createClubRequest, options).then((request) => request(this.axios, this.basePath));
2866
+ }
2867
+ /**
2868
+ *
2869
+ * @summary Supprimer un club
2870
+ * @param {ClubsApiDeleteClubRequest} requestParameters Request parameters.
2871
+ * @param {*} [options] Override http request option.
2872
+ * @throws {RequiredError}
2873
+ * @memberof ClubsApi
2874
+ */
2875
+ deleteClub(requestParameters, options) {
2876
+ return (0, exports.ClubsApiFp)(this.configuration).deleteClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2877
+ }
2878
+ /**
2879
+ *
2880
+ * @summary Récupérer tous les clubs
2881
+ * @param {*} [options] Override http request option.
2882
+ * @throws {RequiredError}
2883
+ * @memberof ClubsApi
2884
+ */
2885
+ getAllClubs(options) {
2886
+ return (0, exports.ClubsApiFp)(this.configuration).getAllClubs(options).then((request) => request(this.axios, this.basePath));
2887
+ }
2888
+ /**
2889
+ *
2890
+ * @summary Récupérer les informations d\'un club
2891
+ * @param {ClubsApiGetClubInfoRequest} requestParameters Request parameters.
2892
+ * @param {*} [options] Override http request option.
2893
+ * @throws {RequiredError}
2894
+ * @memberof ClubsApi
2895
+ */
2896
+ getClubInfo(requestParameters, options) {
2897
+ return (0, exports.ClubsApiFp)(this.configuration).getClubInfo(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2898
+ }
2899
+ /**
2900
+ *
2901
+ * @summary Récupérer les membres d\'un club
2902
+ * @param {ClubsApiGetClubMembersRequest} requestParameters Request parameters.
2903
+ * @param {*} [options] Override http request option.
2904
+ * @throws {RequiredError}
2905
+ * @memberof ClubsApi
2906
+ */
2907
+ getClubMembers(requestParameters, options) {
2908
+ return (0, exports.ClubsApiFp)(this.configuration).getClubMembers(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2909
+ }
2910
+ /**
2911
+ *
2912
+ * @summary Récupérer les rôles d\'un club
2913
+ * @param {ClubsApiGetClubRolesRequest} requestParameters Request parameters.
2914
+ * @param {*} [options] Override http request option.
2915
+ * @throws {RequiredError}
2916
+ * @memberof ClubsApi
2917
+ */
2918
+ getClubRoles(requestParameters, options) {
2919
+ return (0, exports.ClubsApiFp)(this.configuration).getClubRoles(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2920
+ }
2921
+ /**
2922
+ *
2923
+ * @summary Mettre à jour un club existant
2924
+ * @param {ClubsApiUpdateClubRequest} requestParameters Request parameters.
2925
+ * @param {*} [options] Override http request option.
2926
+ * @throws {RequiredError}
2927
+ * @memberof ClubsApi
2928
+ */
2929
+ updateClub(requestParameters, options) {
2930
+ return (0, exports.ClubsApiFp)(this.configuration).updateClub(requestParameters.id, requestParameters.updateClubRequest, options).then((request) => request(this.axios, this.basePath));
2931
+ }
2932
+ }
2933
+ exports.ClubsApi = ClubsApi;
2934
+ /**
2935
+ * SportsApi - axios parameter creator
2936
+ * @export
2937
+ */
2938
+ const SportsApiAxiosParamCreator = function (configuration) {
2939
+ return {
2940
+ /**
2941
+ *
2942
+ * @summary Crée un sport dans un club
2943
+ * @param {CreateSportRequest} createSportRequest
2944
+ * @param {*} [options] Override http request option.
2945
+ * @throws {RequiredError}
2946
+ */
2947
+ createSport: (createSportRequest_1, ...args_1) => __awaiter(this, [createSportRequest_1, ...args_1], void 0, function* (createSportRequest, options = {}) {
2948
+ // verify required parameter 'createSportRequest' is not null or undefined
2949
+ (0, common_1.assertParamExists)('createSport', 'createSportRequest', createSportRequest);
2950
+ const localVarPath = `/api/sports`;
2951
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2952
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2953
+ let baseOptions;
2954
+ if (configuration) {
2955
+ baseOptions = configuration.baseOptions;
2956
+ }
2957
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2958
+ const localVarHeaderParameter = {};
2959
+ const localVarQueryParameter = {};
2960
+ // authentication bearerAuth required
2961
+ // http bearer authentication required
2962
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2963
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2964
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2965
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2966
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2967
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createSportRequest, localVarRequestOptions, configuration);
2968
+ return {
2969
+ url: (0, common_1.toPathString)(localVarUrlObj),
2970
+ options: localVarRequestOptions,
2971
+ };
2972
+ }),
2973
+ /**
2974
+ *
2975
+ * @summary Supprime un sport
2976
+ * @param {string} id ID du sport
2977
+ * @param {*} [options] Override http request option.
2978
+ * @throws {RequiredError}
2979
+ */
2980
+ deleteSport: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2981
+ // verify required parameter 'id' is not null or undefined
2982
+ (0, common_1.assertParamExists)('deleteSport', 'id', id);
2983
+ const localVarPath = `/api/sports/{id}`
2984
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2985
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2986
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2987
+ let baseOptions;
2988
+ if (configuration) {
2989
+ baseOptions = configuration.baseOptions;
2990
+ }
2991
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2992
+ const localVarHeaderParameter = {};
2993
+ const localVarQueryParameter = {};
2994
+ // authentication bearerAuth required
2995
+ // http bearer authentication required
2996
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2997
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2998
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2999
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3000
+ return {
3001
+ url: (0, common_1.toPathString)(localVarUrlObj),
3002
+ options: localVarRequestOptions,
3003
+ };
3004
+ }),
3005
+ /**
3006
+ *
3007
+ * @summary Récupère la liste des sports d’un club
3008
+ * @param {GetAllSportsRequest} getAllSportsRequest
3009
+ * @param {*} [options] Override http request option.
3010
+ * @throws {RequiredError}
3011
+ */
3012
+ getAllSports: (getAllSportsRequest_1, ...args_1) => __awaiter(this, [getAllSportsRequest_1, ...args_1], void 0, function* (getAllSportsRequest, options = {}) {
3013
+ // verify required parameter 'getAllSportsRequest' is not null or undefined
3014
+ (0, common_1.assertParamExists)('getAllSports', 'getAllSportsRequest', getAllSportsRequest);
3015
+ const localVarPath = `/api/sports`;
3016
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3017
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3018
+ let baseOptions;
3019
+ if (configuration) {
3020
+ baseOptions = configuration.baseOptions;
3021
+ }
3022
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3023
+ const localVarHeaderParameter = {};
3024
+ const localVarQueryParameter = {};
3025
+ // authentication bearerAuth required
3026
+ // http bearer authentication required
3027
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3028
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3029
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3030
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3031
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3032
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getAllSportsRequest, localVarRequestOptions, configuration);
3033
+ return {
3034
+ url: (0, common_1.toPathString)(localVarUrlObj),
3035
+ options: localVarRequestOptions,
3036
+ };
3037
+ }),
3038
+ /**
3039
+ *
3040
+ * @summary Met à jour un sport
3041
+ * @param {string} id ID du sport
3042
+ * @param {UpdateSportRequest} updateSportRequest
3043
+ * @param {*} [options] Override http request option.
3044
+ * @throws {RequiredError}
3045
+ */
3046
+ updateSport: (id_1, updateSportRequest_1, ...args_1) => __awaiter(this, [id_1, updateSportRequest_1, ...args_1], void 0, function* (id, updateSportRequest, options = {}) {
3047
+ // verify required parameter 'id' is not null or undefined
3048
+ (0, common_1.assertParamExists)('updateSport', 'id', id);
3049
+ // verify required parameter 'updateSportRequest' is not null or undefined
3050
+ (0, common_1.assertParamExists)('updateSport', 'updateSportRequest', updateSportRequest);
3051
+ const localVarPath = `/api/sports/{id}`
3052
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3053
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3054
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3055
+ let baseOptions;
3056
+ if (configuration) {
3057
+ baseOptions = configuration.baseOptions;
3058
+ }
3059
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3060
+ const localVarHeaderParameter = {};
3061
+ const localVarQueryParameter = {};
3062
+ // authentication bearerAuth required
3063
+ // http bearer authentication required
3064
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3065
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3066
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3067
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3068
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3069
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateSportRequest, localVarRequestOptions, configuration);
3070
+ return {
3071
+ url: (0, common_1.toPathString)(localVarUrlObj),
3072
+ options: localVarRequestOptions,
3073
+ };
3074
+ }),
3075
+ };
3076
+ };
3077
+ exports.SportsApiAxiosParamCreator = SportsApiAxiosParamCreator;
50
3078
  /**
51
- *
3079
+ * SportsApi - functional programming interface
52
3080
  * @export
53
- * @enum {string}
54
3081
  */
55
- exports.StripeStatus = {
56
- Pending: 'pending',
57
- Paid: 'paid',
58
- Failed: 'failed',
59
- Refunded: 'refunded',
60
- Canceled: 'canceled'
3082
+ const SportsApiFp = function (configuration) {
3083
+ const localVarAxiosParamCreator = (0, exports.SportsApiAxiosParamCreator)(configuration);
3084
+ return {
3085
+ /**
3086
+ *
3087
+ * @summary Crée un sport dans un club
3088
+ * @param {CreateSportRequest} createSportRequest
3089
+ * @param {*} [options] Override http request option.
3090
+ * @throws {RequiredError}
3091
+ */
3092
+ createSport(createSportRequest, options) {
3093
+ return __awaiter(this, void 0, void 0, function* () {
3094
+ var _a, _b, _c;
3095
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createSport(createSportRequest, options);
3096
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3097
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SportsApi.createSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3098
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3099
+ });
3100
+ },
3101
+ /**
3102
+ *
3103
+ * @summary Supprime un sport
3104
+ * @param {string} id ID du sport
3105
+ * @param {*} [options] Override http request option.
3106
+ * @throws {RequiredError}
3107
+ */
3108
+ deleteSport(id, options) {
3109
+ return __awaiter(this, void 0, void 0, function* () {
3110
+ var _a, _b, _c;
3111
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteSport(id, options);
3112
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3113
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SportsApi.deleteSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3114
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3115
+ });
3116
+ },
3117
+ /**
3118
+ *
3119
+ * @summary Récupère la liste des sports d’un club
3120
+ * @param {GetAllSportsRequest} getAllSportsRequest
3121
+ * @param {*} [options] Override http request option.
3122
+ * @throws {RequiredError}
3123
+ */
3124
+ getAllSports(getAllSportsRequest, options) {
3125
+ return __awaiter(this, void 0, void 0, function* () {
3126
+ var _a, _b, _c;
3127
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllSports(getAllSportsRequest, options);
3128
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3129
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SportsApi.getAllSports']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3130
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3131
+ });
3132
+ },
3133
+ /**
3134
+ *
3135
+ * @summary Met à jour un sport
3136
+ * @param {string} id ID du sport
3137
+ * @param {UpdateSportRequest} updateSportRequest
3138
+ * @param {*} [options] Override http request option.
3139
+ * @throws {RequiredError}
3140
+ */
3141
+ updateSport(id, updateSportRequest, options) {
3142
+ return __awaiter(this, void 0, void 0, function* () {
3143
+ var _a, _b, _c;
3144
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSport(id, updateSportRequest, options);
3145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3146
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SportsApi.updateSport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3147
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3148
+ });
3149
+ },
3150
+ };
3151
+ };
3152
+ exports.SportsApiFp = SportsApiFp;
3153
+ /**
3154
+ * SportsApi - factory interface
3155
+ * @export
3156
+ */
3157
+ const SportsApiFactory = function (configuration, basePath, axios) {
3158
+ const localVarFp = (0, exports.SportsApiFp)(configuration);
3159
+ return {
3160
+ /**
3161
+ *
3162
+ * @summary Crée un sport dans un club
3163
+ * @param {SportsApiCreateSportRequest} requestParameters Request parameters.
3164
+ * @param {*} [options] Override http request option.
3165
+ * @throws {RequiredError}
3166
+ */
3167
+ createSport(requestParameters, options) {
3168
+ return localVarFp.createSport(requestParameters.createSportRequest, options).then((request) => request(axios, basePath));
3169
+ },
3170
+ /**
3171
+ *
3172
+ * @summary Supprime un sport
3173
+ * @param {SportsApiDeleteSportRequest} requestParameters Request parameters.
3174
+ * @param {*} [options] Override http request option.
3175
+ * @throws {RequiredError}
3176
+ */
3177
+ deleteSport(requestParameters, options) {
3178
+ return localVarFp.deleteSport(requestParameters.id, options).then((request) => request(axios, basePath));
3179
+ },
3180
+ /**
3181
+ *
3182
+ * @summary Récupère la liste des sports d’un club
3183
+ * @param {SportsApiGetAllSportsRequest} requestParameters Request parameters.
3184
+ * @param {*} [options] Override http request option.
3185
+ * @throws {RequiredError}
3186
+ */
3187
+ getAllSports(requestParameters, options) {
3188
+ return localVarFp.getAllSports(requestParameters.getAllSportsRequest, options).then((request) => request(axios, basePath));
3189
+ },
3190
+ /**
3191
+ *
3192
+ * @summary Met à jour un sport
3193
+ * @param {SportsApiUpdateSportRequest} requestParameters Request parameters.
3194
+ * @param {*} [options] Override http request option.
3195
+ * @throws {RequiredError}
3196
+ */
3197
+ updateSport(requestParameters, options) {
3198
+ return localVarFp.updateSport(requestParameters.id, requestParameters.updateSportRequest, options).then((request) => request(axios, basePath));
3199
+ },
3200
+ };
61
3201
  };
3202
+ exports.SportsApiFactory = SportsApiFactory;
3203
+ /**
3204
+ * SportsApi - object-oriented interface
3205
+ * @export
3206
+ * @class SportsApi
3207
+ * @extends {BaseAPI}
3208
+ */
3209
+ class SportsApi extends base_1.BaseAPI {
3210
+ /**
3211
+ *
3212
+ * @summary Crée un sport dans un club
3213
+ * @param {SportsApiCreateSportRequest} requestParameters Request parameters.
3214
+ * @param {*} [options] Override http request option.
3215
+ * @throws {RequiredError}
3216
+ * @memberof SportsApi
3217
+ */
3218
+ createSport(requestParameters, options) {
3219
+ return (0, exports.SportsApiFp)(this.configuration).createSport(requestParameters.createSportRequest, options).then((request) => request(this.axios, this.basePath));
3220
+ }
3221
+ /**
3222
+ *
3223
+ * @summary Supprime un sport
3224
+ * @param {SportsApiDeleteSportRequest} requestParameters Request parameters.
3225
+ * @param {*} [options] Override http request option.
3226
+ * @throws {RequiredError}
3227
+ * @memberof SportsApi
3228
+ */
3229
+ deleteSport(requestParameters, options) {
3230
+ return (0, exports.SportsApiFp)(this.configuration).deleteSport(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3231
+ }
3232
+ /**
3233
+ *
3234
+ * @summary Récupère la liste des sports d’un club
3235
+ * @param {SportsApiGetAllSportsRequest} requestParameters Request parameters.
3236
+ * @param {*} [options] Override http request option.
3237
+ * @throws {RequiredError}
3238
+ * @memberof SportsApi
3239
+ */
3240
+ getAllSports(requestParameters, options) {
3241
+ return (0, exports.SportsApiFp)(this.configuration).getAllSports(requestParameters.getAllSportsRequest, options).then((request) => request(this.axios, this.basePath));
3242
+ }
3243
+ /**
3244
+ *
3245
+ * @summary Met à jour un sport
3246
+ * @param {SportsApiUpdateSportRequest} requestParameters Request parameters.
3247
+ * @param {*} [options] Override http request option.
3248
+ * @throws {RequiredError}
3249
+ * @memberof SportsApi
3250
+ */
3251
+ updateSport(requestParameters, options) {
3252
+ return (0, exports.SportsApiFp)(this.configuration).updateSport(requestParameters.id, requestParameters.updateSportRequest, options).then((request) => request(this.axios, this.basePath));
3253
+ }
3254
+ }
3255
+ exports.SportsApi = SportsApi;
62
3256
  /**
63
3257
  * UsersApi - axios parameter creator
64
3258
  * @export
@@ -154,6 +3348,34 @@ const UsersApiAxiosParamCreator = function (configuration) {
154
3348
  options: localVarRequestOptions,
155
3349
  };
156
3350
  }),
3351
+ /**
3352
+ *
3353
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3354
+ * @param {*} [options] Override http request option.
3355
+ * @throws {RequiredError}
3356
+ */
3357
+ getUserRolesInClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3358
+ const localVarPath = `/api/users/me/roles`;
3359
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3360
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3361
+ let baseOptions;
3362
+ if (configuration) {
3363
+ baseOptions = configuration.baseOptions;
3364
+ }
3365
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3366
+ const localVarHeaderParameter = {};
3367
+ const localVarQueryParameter = {};
3368
+ // authentication bearerAuth required
3369
+ // http bearer authentication required
3370
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3371
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3372
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3373
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3374
+ return {
3375
+ url: (0, common_1.toPathString)(localVarUrlObj),
3376
+ options: localVarRequestOptions,
3377
+ };
3378
+ }),
157
3379
  /**
158
3380
  *
159
3381
  * @summary Authentifie un utilisateur
@@ -342,6 +3564,21 @@ const UsersApiFp = function (configuration) {
342
3564
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
343
3565
  });
344
3566
  },
3567
+ /**
3568
+ *
3569
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3570
+ * @param {*} [options] Override http request option.
3571
+ * @throws {RequiredError}
3572
+ */
3573
+ getUserRolesInClubs(options) {
3574
+ return __awaiter(this, void 0, void 0, function* () {
3575
+ var _a, _b, _c;
3576
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserRolesInClubs(options);
3577
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3578
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getUserRolesInClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3579
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3580
+ });
3581
+ },
345
3582
  /**
346
3583
  *
347
3584
  * @summary Authentifie un utilisateur
@@ -444,6 +3681,15 @@ const UsersApiFactory = function (configuration, basePath, axios) {
444
3681
  getUserInfo(options) {
445
3682
  return localVarFp.getUserInfo(options).then((request) => request(axios, basePath));
446
3683
  },
3684
+ /**
3685
+ *
3686
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3687
+ * @param {*} [options] Override http request option.
3688
+ * @throws {RequiredError}
3689
+ */
3690
+ getUserRolesInClubs(options) {
3691
+ return localVarFp.getUserRolesInClubs(options).then((request) => request(axios, basePath));
3692
+ },
447
3693
  /**
448
3694
  *
449
3695
  * @summary Authentifie un utilisateur
@@ -525,6 +3771,16 @@ class UsersApi extends base_1.BaseAPI {
525
3771
  getUserInfo(options) {
526
3772
  return (0, exports.UsersApiFp)(this.configuration).getUserInfo(options).then((request) => request(this.axios, this.basePath));
527
3773
  }
3774
+ /**
3775
+ *
3776
+ * @summary Récupère les rôles de l\'utilisateur dans les clubs
3777
+ * @param {*} [options] Override http request option.
3778
+ * @throws {RequiredError}
3779
+ * @memberof UsersApi
3780
+ */
3781
+ getUserRolesInClubs(options) {
3782
+ return (0, exports.UsersApiFp)(this.configuration).getUserRolesInClubs(options).then((request) => request(this.axios, this.basePath));
3783
+ }
528
3784
  /**
529
3785
  *
530
3786
  * @summary Authentifie un utilisateur