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