@tennac-booking/sdk 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.SportsApi = exports.SportsApiFactory = exports.SportsApiFp = exports.SportsApiAxiosParamCreator = exports.ClubsApi = exports.ClubsApiFactory = exports.ClubsApiFp = exports.ClubsApiAxiosParamCreator = exports.ClubSubscriptionsApi = exports.ClubSubscriptionsApiFactory = exports.ClubSubscriptionsApiFp = exports.ClubSubscriptionsApiAxiosParamCreator = exports.ClubSportsApi = exports.ClubSportsApiFactory = exports.ClubSportsApiFp = exports.ClubSportsApiAxiosParamCreator = exports.ClubSlotsApi = exports.ClubSlotsApiFactory = exports.ClubSlotsApiFp = exports.ClubSlotsApiAxiosParamCreator = exports.ClubSettingsApi = exports.ClubSettingsApiFactory = exports.ClubSettingsApiFp = exports.ClubSettingsApiAxiosParamCreator = exports.ClubRolesApi = exports.ClubRolesApiFactory = exports.ClubRolesApiFp = exports.ClubRolesApiAxiosParamCreator = exports.ClubCourtsApi = exports.ClubCourtsApiFactory = exports.ClubCourtsApiFp = exports.ClubCourtsApiAxiosParamCreator = exports.BookingsApi = exports.BookingsApiFactory = exports.BookingsApiFp = exports.BookingsApiAxiosParamCreator = exports.StripeStatus = exports.PriceResponseIntervalEnum = exports.PaymentMethod = exports.CreatePriceRequestIntervalEnum = exports.CourtStatus = exports.BookingStatus = void 0;
25
+ exports.GetAllUsersIsLookingForPartnerEnum = exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.SportsApi = exports.SportsApiFactory = exports.SportsApiFp = exports.SportsApiAxiosParamCreator = exports.ClubsApi = exports.ClubsApiFactory = exports.ClubsApiFp = exports.ClubsApiAxiosParamCreator = exports.ClubSubscriptionsApi = exports.ClubSubscriptionsApiFactory = exports.ClubSubscriptionsApiFp = exports.ClubSubscriptionsApiAxiosParamCreator = exports.ClubSportsApi = exports.ClubSportsApiFactory = exports.ClubSportsApiFp = exports.ClubSportsApiAxiosParamCreator = exports.ClubSlotsApi = exports.ClubSlotsApiFactory = exports.ClubSlotsApiFp = exports.ClubSlotsApiAxiosParamCreator = exports.ClubSettingsApi = exports.ClubSettingsApiFactory = exports.ClubSettingsApiFp = exports.ClubSettingsApiAxiosParamCreator = exports.ClubRolesApi = exports.ClubRolesApiFactory = exports.ClubRolesApiFp = exports.ClubRolesApiAxiosParamCreator = exports.ClubCourtsApi = exports.ClubCourtsApiFactory = exports.ClubCourtsApiFp = exports.ClubCourtsApiAxiosParamCreator = exports.BookingsApi = exports.BookingsApiFactory = exports.BookingsApiFp = exports.BookingsApiAxiosParamCreator = exports.SubscriptionResponseStatusEnum = exports.StripeStatus = exports.PriceResponseIntervalEnum = exports.PaymentMethod = exports.CreatePriceRequestIntervalEnum = exports.CourtStatus = exports.BookingStatus = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -80,6 +80,15 @@ exports.StripeStatus = {
80
80
  Refunded: 'refunded',
81
81
  Canceled: 'canceled'
82
82
  };
83
+ exports.SubscriptionResponseStatusEnum = {
84
+ Active: 'active',
85
+ Canceled: 'canceled',
86
+ Incomplete: 'incomplete',
87
+ IncompleteExpired: 'incomplete_expired',
88
+ PastDue: 'past_due',
89
+ Trialing: 'trialing',
90
+ Unpaid: 'unpaid'
91
+ };
83
92
  /**
84
93
  * BookingsApi - axios parameter creator
85
94
  * @export
@@ -1226,6 +1235,38 @@ const ClubSlotsApiAxiosParamCreator = function (configuration) {
1226
1235
  options: localVarRequestOptions,
1227
1236
  };
1228
1237
  }),
1238
+ /**
1239
+ *
1240
+ * @summary Obtenir tous les créneaux disponibles pour un club
1241
+ * @param {string} clubID ID du club
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ */
1245
+ getAvailableSlotsByClub: (clubID_1, ...args_1) => __awaiter(this, [clubID_1, ...args_1], void 0, function* (clubID, options = {}) {
1246
+ // verify required parameter 'clubID' is not null or undefined
1247
+ (0, common_1.assertParamExists)('getAvailableSlotsByClub', 'clubID', clubID);
1248
+ const localVarPath = `/api/clubs/{clubID}/availableSlots/`
1249
+ .replace(`{${"clubID"}}`, encodeURIComponent(String(clubID)));
1250
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1251
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1252
+ let baseOptions;
1253
+ if (configuration) {
1254
+ baseOptions = configuration.baseOptions;
1255
+ }
1256
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1257
+ const localVarHeaderParameter = {};
1258
+ const localVarQueryParameter = {};
1259
+ // authentication bearerAuth required
1260
+ // http bearer authentication required
1261
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1262
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1263
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1264
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1265
+ return {
1266
+ url: (0, common_1.toPathString)(localVarUrlObj),
1267
+ options: localVarRequestOptions,
1268
+ };
1269
+ }),
1229
1270
  /**
1230
1271
  *
1231
1272
  * @summary Obtenir tous les slots disponibles pour un sport dans un club
@@ -1402,6 +1443,22 @@ const ClubSlotsApiFp = function (configuration) {
1402
1443
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1403
1444
  });
1404
1445
  },
1446
+ /**
1447
+ *
1448
+ * @summary Obtenir tous les créneaux disponibles pour un club
1449
+ * @param {string} clubID ID du club
1450
+ * @param {*} [options] Override http request option.
1451
+ * @throws {RequiredError}
1452
+ */
1453
+ getAvailableSlotsByClub(clubID, options) {
1454
+ return __awaiter(this, void 0, void 0, function* () {
1455
+ var _a, _b, _c;
1456
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAvailableSlotsByClub(clubID, options);
1457
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1458
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubSlotsApi.getAvailableSlotsByClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1459
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1460
+ });
1461
+ },
1405
1462
  /**
1406
1463
  *
1407
1464
  * @summary Obtenir tous les slots disponibles pour un sport dans un club
@@ -1487,6 +1544,16 @@ const ClubSlotsApiFactory = function (configuration, basePath, axios) {
1487
1544
  generateSlotsForNextThreeWeeks(requestParameters, options) {
1488
1545
  return localVarFp.generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(axios, basePath));
1489
1546
  },
1547
+ /**
1548
+ *
1549
+ * @summary Obtenir tous les créneaux disponibles pour un club
1550
+ * @param {ClubSlotsApiGetAvailableSlotsByClubRequest} requestParameters Request parameters.
1551
+ * @param {*} [options] Override http request option.
1552
+ * @throws {RequiredError}
1553
+ */
1554
+ getAvailableSlotsByClub(requestParameters, options) {
1555
+ return localVarFp.getAvailableSlotsByClub(requestParameters.clubID, options).then((request) => request(axios, basePath));
1556
+ },
1490
1557
  /**
1491
1558
  *
1492
1559
  * @summary Obtenir tous les slots disponibles pour un sport dans un club
@@ -1549,6 +1616,17 @@ class ClubSlotsApi extends base_1.BaseAPI {
1549
1616
  generateSlotsForNextThreeWeeks(requestParameters, options) {
1550
1617
  return (0, exports.ClubSlotsApiFp)(this.configuration).generateSlotsForNextThreeWeeks(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
1551
1618
  }
1619
+ /**
1620
+ *
1621
+ * @summary Obtenir tous les créneaux disponibles pour un club
1622
+ * @param {ClubSlotsApiGetAvailableSlotsByClubRequest} requestParameters Request parameters.
1623
+ * @param {*} [options] Override http request option.
1624
+ * @throws {RequiredError}
1625
+ * @memberof ClubSlotsApi
1626
+ */
1627
+ getAvailableSlotsByClub(requestParameters, options) {
1628
+ return (0, exports.ClubSlotsApiFp)(this.configuration).getAvailableSlotsByClub(requestParameters.clubID, options).then((request) => request(this.axios, this.basePath));
1629
+ }
1552
1630
  /**
1553
1631
  *
1554
1632
  * @summary Obtenir tous les slots disponibles pour un sport dans un club
@@ -2443,6 +2521,34 @@ const ClubsApiAxiosParamCreator = function (configuration) {
2443
2521
  options: localVarRequestOptions,
2444
2522
  };
2445
2523
  }),
2524
+ /**
2525
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2526
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2527
+ * @param {*} [options] Override http request option.
2528
+ * @throws {RequiredError}
2529
+ */
2530
+ getActiveClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2531
+ const localVarPath = `/api/clubs/activeClubs/`;
2532
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2533
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2534
+ let baseOptions;
2535
+ if (configuration) {
2536
+ baseOptions = configuration.baseOptions;
2537
+ }
2538
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2539
+ const localVarHeaderParameter = {};
2540
+ const localVarQueryParameter = {};
2541
+ // authentication bearerAuth required
2542
+ // http bearer authentication required
2543
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2544
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2545
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2546
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2547
+ return {
2548
+ url: (0, common_1.toPathString)(localVarUrlObj),
2549
+ options: localVarRequestOptions,
2550
+ };
2551
+ }),
2446
2552
  /**
2447
2553
  *
2448
2554
  * @summary Récupérer tous les clubs
@@ -2663,6 +2769,21 @@ const ClubsApiFp = function (configuration) {
2663
2769
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2664
2770
  });
2665
2771
  },
2772
+ /**
2773
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2774
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2775
+ * @param {*} [options] Override http request option.
2776
+ * @throws {RequiredError}
2777
+ */
2778
+ getActiveClubs(options) {
2779
+ return __awaiter(this, void 0, void 0, function* () {
2780
+ var _a, _b, _c;
2781
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getActiveClubs(options);
2782
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2783
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClubsApi.getActiveClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2784
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2785
+ });
2786
+ },
2666
2787
  /**
2667
2788
  *
2668
2789
  * @summary Récupérer tous les clubs
@@ -2783,6 +2904,15 @@ const ClubsApiFactory = function (configuration, basePath, axios) {
2783
2904
  deleteClub(requestParameters, options) {
2784
2905
  return localVarFp.deleteClub(requestParameters.id, options).then((request) => request(axios, basePath));
2785
2906
  },
2907
+ /**
2908
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
2909
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
2910
+ * @param {*} [options] Override http request option.
2911
+ * @throws {RequiredError}
2912
+ */
2913
+ getActiveClubs(options) {
2914
+ return localVarFp.getActiveClubs(options).then((request) => request(axios, basePath));
2915
+ },
2786
2916
  /**
2787
2917
  *
2788
2918
  * @summary Récupérer tous les clubs
@@ -2875,6 +3005,16 @@ class ClubsApi extends base_1.BaseAPI {
2875
3005
  deleteClub(requestParameters, options) {
2876
3006
  return (0, exports.ClubsApiFp)(this.configuration).deleteClub(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2877
3007
  }
3008
+ /**
3009
+ * Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
3010
+ * @summary Obtenir la liste des clubs actifs (seulement id et nom)
3011
+ * @param {*} [options] Override http request option.
3012
+ * @throws {RequiredError}
3013
+ * @memberof ClubsApi
3014
+ */
3015
+ getActiveClubs(options) {
3016
+ return (0, exports.ClubsApiFp)(this.configuration).getActiveClubs(options).then((request) => request(this.axios, this.basePath));
3017
+ }
2878
3018
  /**
2879
3019
  *
2880
3020
  * @summary Récupérer tous les clubs
@@ -3259,6 +3399,42 @@ exports.SportsApi = SportsApi;
3259
3399
  */
3260
3400
  const UsersApiAxiosParamCreator = function (configuration) {
3261
3401
  return {
3402
+ /**
3403
+ *
3404
+ * @summary Annule un abonnement utilisateur
3405
+ * @param {string} clubId ID du club
3406
+ * @param {string} subscriptionId ID de l\'abonnement à annuler
3407
+ * @param {*} [options] Override http request option.
3408
+ * @throws {RequiredError}
3409
+ */
3410
+ cancelSubscription: (clubId_1, subscriptionId_1, ...args_1) => __awaiter(this, [clubId_1, subscriptionId_1, ...args_1], void 0, function* (clubId, subscriptionId, options = {}) {
3411
+ // verify required parameter 'clubId' is not null or undefined
3412
+ (0, common_1.assertParamExists)('cancelSubscription', 'clubId', clubId);
3413
+ // verify required parameter 'subscriptionId' is not null or undefined
3414
+ (0, common_1.assertParamExists)('cancelSubscription', 'subscriptionId', subscriptionId);
3415
+ const localVarPath = `/api/users/me/subscriptions/{clubId}/{subscriptionId}`
3416
+ .replace(`{${"clubId"}}`, encodeURIComponent(String(clubId)))
3417
+ .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
3418
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3419
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3420
+ let baseOptions;
3421
+ if (configuration) {
3422
+ baseOptions = configuration.baseOptions;
3423
+ }
3424
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3425
+ const localVarHeaderParameter = {};
3426
+ const localVarQueryParameter = {};
3427
+ // authentication bearerAuth required
3428
+ // http bearer authentication required
3429
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3430
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3431
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3432
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3433
+ return {
3434
+ url: (0, common_1.toPathString)(localVarUrlObj),
3435
+ options: localVarRequestOptions,
3436
+ };
3437
+ }),
3262
3438
  /**
3263
3439
  *
3264
3440
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -3294,11 +3470,23 @@ const UsersApiAxiosParamCreator = function (configuration) {
3294
3470
  }),
3295
3471
  /**
3296
3472
  *
3297
- * @summary Récupère la liste des utilisateurs
3473
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
3474
+ * @param {number} [limit] Nombre maximum d\'utilisateurs à retourner
3475
+ * @param {number} [skip] Nombre d\'utilisateurs à ignorer (pagination)
3476
+ * @param {string} [search] Recherche dans firstName, lastName, email
3477
+ * @param {string} [sport] Filtre par sport
3478
+ * @param {string} [matchType] Filtre par type de match
3479
+ * @param {string} [niveau] Filtre par niveau
3480
+ * @param {string} [rank] Filtre par rang
3481
+ * @param {GetAllUsersIsLookingForPartnerEnum} [isLookingForPartner] Filtre par disponibilité pour partenaire
3482
+ * @param {string} [username] Filtre par nom d\'utilisateur
3483
+ * @param {string} [email] Filtre par email
3484
+ * @param {string} [description] Filtre par description
3485
+ * @param {string} [gender] Filtre par genre
3298
3486
  * @param {*} [options] Override http request option.
3299
3487
  * @throws {RequiredError}
3300
3488
  */
3301
- getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3489
+ getAllUsers: (limit_1, skip_1, search_1, sport_1, matchType_1, niveau_1, rank_1, isLookingForPartner_1, username_1, email_1, description_1, gender_1, ...args_1) => __awaiter(this, [limit_1, skip_1, search_1, sport_1, matchType_1, niveau_1, rank_1, isLookingForPartner_1, username_1, email_1, description_1, gender_1, ...args_1], void 0, function* (limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options = {}) {
3302
3490
  const localVarPath = `/api/users`;
3303
3491
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3304
3492
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -3312,6 +3500,42 @@ const UsersApiAxiosParamCreator = function (configuration) {
3312
3500
  // authentication bearerAuth required
3313
3501
  // http bearer authentication required
3314
3502
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3503
+ if (limit !== undefined) {
3504
+ localVarQueryParameter['limit'] = limit;
3505
+ }
3506
+ if (skip !== undefined) {
3507
+ localVarQueryParameter['skip'] = skip;
3508
+ }
3509
+ if (search !== undefined) {
3510
+ localVarQueryParameter['search'] = search;
3511
+ }
3512
+ if (sport !== undefined) {
3513
+ localVarQueryParameter['sport'] = sport;
3514
+ }
3515
+ if (matchType !== undefined) {
3516
+ localVarQueryParameter['matchType'] = matchType;
3517
+ }
3518
+ if (niveau !== undefined) {
3519
+ localVarQueryParameter['niveau'] = niveau;
3520
+ }
3521
+ if (rank !== undefined) {
3522
+ localVarQueryParameter['rank'] = rank;
3523
+ }
3524
+ if (isLookingForPartner !== undefined) {
3525
+ localVarQueryParameter['isLookingForPartner'] = isLookingForPartner;
3526
+ }
3527
+ if (username !== undefined) {
3528
+ localVarQueryParameter['username'] = username;
3529
+ }
3530
+ if (email !== undefined) {
3531
+ localVarQueryParameter['email'] = email;
3532
+ }
3533
+ if (description !== undefined) {
3534
+ localVarQueryParameter['description'] = description;
3535
+ }
3536
+ if (gender !== undefined) {
3537
+ localVarQueryParameter['gender'] = gender;
3538
+ }
3315
3539
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3316
3540
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3317
3541
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -3376,6 +3600,67 @@ const UsersApiAxiosParamCreator = function (configuration) {
3376
3600
  options: localVarRequestOptions,
3377
3601
  };
3378
3602
  }),
3603
+ /**
3604
+ *
3605
+ * @summary Récupère les abonnements de l\'utilisateur connecté
3606
+ * @param {*} [options] Override http request option.
3607
+ * @throws {RequiredError}
3608
+ */
3609
+ getUserSubscriptions: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3610
+ const localVarPath = `/api/users/me/subscriptions`;
3611
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3612
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3613
+ let baseOptions;
3614
+ if (configuration) {
3615
+ baseOptions = configuration.baseOptions;
3616
+ }
3617
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3618
+ const localVarHeaderParameter = {};
3619
+ const localVarQueryParameter = {};
3620
+ // authentication bearerAuth required
3621
+ // http bearer authentication required
3622
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3623
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3624
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3625
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3626
+ return {
3627
+ url: (0, common_1.toPathString)(localVarUrlObj),
3628
+ options: localVarRequestOptions,
3629
+ };
3630
+ }),
3631
+ /**
3632
+ *
3633
+ * @summary Initie une session d\'abonnement Stripe
3634
+ * @param {InitiateSubscriptionSessionRequestBody} initiateSubscriptionSessionRequestBody
3635
+ * @param {*} [options] Override http request option.
3636
+ * @throws {RequiredError}
3637
+ */
3638
+ initiateSubscriptionSession: (initiateSubscriptionSessionRequestBody_1, ...args_1) => __awaiter(this, [initiateSubscriptionSessionRequestBody_1, ...args_1], void 0, function* (initiateSubscriptionSessionRequestBody, options = {}) {
3639
+ // verify required parameter 'initiateSubscriptionSessionRequestBody' is not null or undefined
3640
+ (0, common_1.assertParamExists)('initiateSubscriptionSession', 'initiateSubscriptionSessionRequestBody', initiateSubscriptionSessionRequestBody);
3641
+ const localVarPath = `/api/users/me/subscription-session`;
3642
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3643
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3644
+ let baseOptions;
3645
+ if (configuration) {
3646
+ baseOptions = configuration.baseOptions;
3647
+ }
3648
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3649
+ const localVarHeaderParameter = {};
3650
+ const localVarQueryParameter = {};
3651
+ // authentication bearerAuth required
3652
+ // http bearer authentication required
3653
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3654
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3655
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3656
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3657
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3658
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateSubscriptionSessionRequestBody, localVarRequestOptions, configuration);
3659
+ return {
3660
+ url: (0, common_1.toPathString)(localVarUrlObj),
3661
+ options: localVarRequestOptions,
3662
+ };
3663
+ }),
3379
3664
  /**
3380
3665
  *
3381
3666
  * @summary Authentifie un utilisateur
@@ -3475,6 +3760,141 @@ const UsersApiAxiosParamCreator = function (configuration) {
3475
3760
  options: localVarRequestOptions,
3476
3761
  };
3477
3762
  }),
3763
+ /**
3764
+ *
3765
+ * @summary Réactive un abonnement utilisateur
3766
+ * @param {string} clubId ID du club
3767
+ * @param {string} subscriptionId ID de l\'abonnement à réactiver
3768
+ * @param {*} [options] Override http request option.
3769
+ * @throws {RequiredError}
3770
+ */
3771
+ resumeSubscription: (clubId_1, subscriptionId_1, ...args_1) => __awaiter(this, [clubId_1, subscriptionId_1, ...args_1], void 0, function* (clubId, subscriptionId, options = {}) {
3772
+ // verify required parameter 'clubId' is not null or undefined
3773
+ (0, common_1.assertParamExists)('resumeSubscription', 'clubId', clubId);
3774
+ // verify required parameter 'subscriptionId' is not null or undefined
3775
+ (0, common_1.assertParamExists)('resumeSubscription', 'subscriptionId', subscriptionId);
3776
+ const localVarPath = `/api/users/me/subscriptions/{clubId}/{subscriptionId}/resume`
3777
+ .replace(`{${"clubId"}}`, encodeURIComponent(String(clubId)))
3778
+ .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
3779
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3780
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3781
+ let baseOptions;
3782
+ if (configuration) {
3783
+ baseOptions = configuration.baseOptions;
3784
+ }
3785
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3786
+ const localVarHeaderParameter = {};
3787
+ const localVarQueryParameter = {};
3788
+ // authentication bearerAuth required
3789
+ // http bearer authentication required
3790
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3791
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3792
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3793
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3794
+ return {
3795
+ url: (0, common_1.toPathString)(localVarUrlObj),
3796
+ options: localVarRequestOptions,
3797
+ };
3798
+ }),
3799
+ /**
3800
+ *
3801
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
3802
+ * @param {GoogleSignInRequestBody} googleSignInRequestBody
3803
+ * @param {*} [options] Override http request option.
3804
+ * @throws {RequiredError}
3805
+ */
3806
+ signInOrSignUpWithGoogle: (googleSignInRequestBody_1, ...args_1) => __awaiter(this, [googleSignInRequestBody_1, ...args_1], void 0, function* (googleSignInRequestBody, options = {}) {
3807
+ // verify required parameter 'googleSignInRequestBody' is not null or undefined
3808
+ (0, common_1.assertParamExists)('signInOrSignUpWithGoogle', 'googleSignInRequestBody', googleSignInRequestBody);
3809
+ const localVarPath = `/api/users/googleSignin`;
3810
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3811
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3812
+ let baseOptions;
3813
+ if (configuration) {
3814
+ baseOptions = configuration.baseOptions;
3815
+ }
3816
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3817
+ const localVarHeaderParameter = {};
3818
+ const localVarQueryParameter = {};
3819
+ // authentication bearerAuth required
3820
+ // http bearer authentication required
3821
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3822
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3823
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3824
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3825
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3826
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(googleSignInRequestBody, localVarRequestOptions, configuration);
3827
+ return {
3828
+ url: (0, common_1.toPathString)(localVarUrlObj),
3829
+ options: localVarRequestOptions,
3830
+ };
3831
+ }),
3832
+ /**
3833
+ *
3834
+ * @summary Abonne l\'utilisateur connecté à un club
3835
+ * @param {SubscribeToClubRequestBody} subscribeToClubRequestBody
3836
+ * @param {*} [options] Override http request option.
3837
+ * @throws {RequiredError}
3838
+ */
3839
+ subscribeToClub: (subscribeToClubRequestBody_1, ...args_1) => __awaiter(this, [subscribeToClubRequestBody_1, ...args_1], void 0, function* (subscribeToClubRequestBody, options = {}) {
3840
+ // verify required parameter 'subscribeToClubRequestBody' is not null or undefined
3841
+ (0, common_1.assertParamExists)('subscribeToClub', 'subscribeToClubRequestBody', subscribeToClubRequestBody);
3842
+ const localVarPath = `/api/users/me/subscribe`;
3843
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3844
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3845
+ let baseOptions;
3846
+ if (configuration) {
3847
+ baseOptions = configuration.baseOptions;
3848
+ }
3849
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3850
+ const localVarHeaderParameter = {};
3851
+ const localVarQueryParameter = {};
3852
+ // authentication bearerAuth required
3853
+ // http bearer authentication required
3854
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3855
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3856
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3857
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3858
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3859
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(subscribeToClubRequestBody, localVarRequestOptions, configuration);
3860
+ return {
3861
+ url: (0, common_1.toPathString)(localVarUrlObj),
3862
+ options: localVarRequestOptions,
3863
+ };
3864
+ }),
3865
+ /**
3866
+ *
3867
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
3868
+ * @param {UpdateCustomerRequestBody} updateCustomerRequestBody
3869
+ * @param {*} [options] Override http request option.
3870
+ * @throws {RequiredError}
3871
+ */
3872
+ updateCustomer: (updateCustomerRequestBody_1, ...args_1) => __awaiter(this, [updateCustomerRequestBody_1, ...args_1], void 0, function* (updateCustomerRequestBody, options = {}) {
3873
+ // verify required parameter 'updateCustomerRequestBody' is not null or undefined
3874
+ (0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestBody', updateCustomerRequestBody);
3875
+ const localVarPath = `/api/users/me/customer`;
3876
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3877
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3878
+ let baseOptions;
3879
+ if (configuration) {
3880
+ baseOptions = configuration.baseOptions;
3881
+ }
3882
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
3883
+ const localVarHeaderParameter = {};
3884
+ const localVarQueryParameter = {};
3885
+ // authentication bearerAuth required
3886
+ // http bearer authentication required
3887
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3888
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3889
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3890
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3891
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3892
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestBody, localVarRequestOptions, configuration);
3893
+ return {
3894
+ url: (0, common_1.toPathString)(localVarUrlObj),
3895
+ options: localVarRequestOptions,
3896
+ };
3897
+ }),
3478
3898
  /**
3479
3899
  *
3480
3900
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -3518,6 +3938,23 @@ exports.UsersApiAxiosParamCreator = UsersApiAxiosParamCreator;
3518
3938
  const UsersApiFp = function (configuration) {
3519
3939
  const localVarAxiosParamCreator = (0, exports.UsersApiAxiosParamCreator)(configuration);
3520
3940
  return {
3941
+ /**
3942
+ *
3943
+ * @summary Annule un abonnement utilisateur
3944
+ * @param {string} clubId ID du club
3945
+ * @param {string} subscriptionId ID de l\'abonnement à annuler
3946
+ * @param {*} [options] Override http request option.
3947
+ * @throws {RequiredError}
3948
+ */
3949
+ cancelSubscription(clubId, subscriptionId, options) {
3950
+ return __awaiter(this, void 0, void 0, function* () {
3951
+ var _a, _b, _c;
3952
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelSubscription(clubId, subscriptionId, options);
3953
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3954
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.cancelSubscription']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3955
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3956
+ });
3957
+ },
3521
3958
  /**
3522
3959
  *
3523
3960
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -3536,14 +3973,26 @@ const UsersApiFp = function (configuration) {
3536
3973
  },
3537
3974
  /**
3538
3975
  *
3539
- * @summary Récupère la liste des utilisateurs
3976
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
3977
+ * @param {number} [limit] Nombre maximum d\'utilisateurs à retourner
3978
+ * @param {number} [skip] Nombre d\'utilisateurs à ignorer (pagination)
3979
+ * @param {string} [search] Recherche dans firstName, lastName, email
3980
+ * @param {string} [sport] Filtre par sport
3981
+ * @param {string} [matchType] Filtre par type de match
3982
+ * @param {string} [niveau] Filtre par niveau
3983
+ * @param {string} [rank] Filtre par rang
3984
+ * @param {GetAllUsersIsLookingForPartnerEnum} [isLookingForPartner] Filtre par disponibilité pour partenaire
3985
+ * @param {string} [username] Filtre par nom d\'utilisateur
3986
+ * @param {string} [email] Filtre par email
3987
+ * @param {string} [description] Filtre par description
3988
+ * @param {string} [gender] Filtre par genre
3540
3989
  * @param {*} [options] Override http request option.
3541
3990
  * @throws {RequiredError}
3542
3991
  */
3543
- getAllUsers(options) {
3992
+ getAllUsers(limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options) {
3544
3993
  return __awaiter(this, void 0, void 0, function* () {
3545
3994
  var _a, _b, _c;
3546
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
3995
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(limit, skip, search, sport, matchType, niveau, rank, isLookingForPartner, username, email, description, gender, options);
3547
3996
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3548
3997
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3549
3998
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -3579,6 +4028,37 @@ const UsersApiFp = function (configuration) {
3579
4028
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3580
4029
  });
3581
4030
  },
4031
+ /**
4032
+ *
4033
+ * @summary Récupère les abonnements de l\'utilisateur connecté
4034
+ * @param {*} [options] Override http request option.
4035
+ * @throws {RequiredError}
4036
+ */
4037
+ getUserSubscriptions(options) {
4038
+ return __awaiter(this, void 0, void 0, function* () {
4039
+ var _a, _b, _c;
4040
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserSubscriptions(options);
4041
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4042
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getUserSubscriptions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4043
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4044
+ });
4045
+ },
4046
+ /**
4047
+ *
4048
+ * @summary Initie une session d\'abonnement Stripe
4049
+ * @param {InitiateSubscriptionSessionRequestBody} initiateSubscriptionSessionRequestBody
4050
+ * @param {*} [options] Override http request option.
4051
+ * @throws {RequiredError}
4052
+ */
4053
+ initiateSubscriptionSession(initiateSubscriptionSessionRequestBody, options) {
4054
+ return __awaiter(this, void 0, void 0, function* () {
4055
+ var _a, _b, _c;
4056
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateSubscriptionSession(initiateSubscriptionSessionRequestBody, options);
4057
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4058
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.initiateSubscriptionSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4059
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4060
+ });
4061
+ },
3582
4062
  /**
3583
4063
  *
3584
4064
  * @summary Authentifie un utilisateur
@@ -3627,6 +4107,71 @@ const UsersApiFp = function (configuration) {
3627
4107
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3628
4108
  });
3629
4109
  },
4110
+ /**
4111
+ *
4112
+ * @summary Réactive un abonnement utilisateur
4113
+ * @param {string} clubId ID du club
4114
+ * @param {string} subscriptionId ID de l\'abonnement à réactiver
4115
+ * @param {*} [options] Override http request option.
4116
+ * @throws {RequiredError}
4117
+ */
4118
+ resumeSubscription(clubId, subscriptionId, options) {
4119
+ return __awaiter(this, void 0, void 0, function* () {
4120
+ var _a, _b, _c;
4121
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resumeSubscription(clubId, subscriptionId, options);
4122
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4123
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.resumeSubscription']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4124
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4125
+ });
4126
+ },
4127
+ /**
4128
+ *
4129
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4130
+ * @param {GoogleSignInRequestBody} googleSignInRequestBody
4131
+ * @param {*} [options] Override http request option.
4132
+ * @throws {RequiredError}
4133
+ */
4134
+ signInOrSignUpWithGoogle(googleSignInRequestBody, options) {
4135
+ return __awaiter(this, void 0, void 0, function* () {
4136
+ var _a, _b, _c;
4137
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.signInOrSignUpWithGoogle(googleSignInRequestBody, options);
4138
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4139
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.signInOrSignUpWithGoogle']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4140
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4141
+ });
4142
+ },
4143
+ /**
4144
+ *
4145
+ * @summary Abonne l\'utilisateur connecté à un club
4146
+ * @param {SubscribeToClubRequestBody} subscribeToClubRequestBody
4147
+ * @param {*} [options] Override http request option.
4148
+ * @throws {RequiredError}
4149
+ */
4150
+ subscribeToClub(subscribeToClubRequestBody, options) {
4151
+ return __awaiter(this, void 0, void 0, function* () {
4152
+ var _a, _b, _c;
4153
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.subscribeToClub(subscribeToClubRequestBody, options);
4154
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4155
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.subscribeToClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4156
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4157
+ });
4158
+ },
4159
+ /**
4160
+ *
4161
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4162
+ * @param {UpdateCustomerRequestBody} updateCustomerRequestBody
4163
+ * @param {*} [options] Override http request option.
4164
+ * @throws {RequiredError}
4165
+ */
4166
+ updateCustomer(updateCustomerRequestBody, options) {
4167
+ return __awaiter(this, void 0, void 0, function* () {
4168
+ var _a, _b, _c;
4169
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCustomer(updateCustomerRequestBody, options);
4170
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4171
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.updateCustomer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4172
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4173
+ });
4174
+ },
3630
4175
  /**
3631
4176
  *
3632
4177
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -3653,6 +4198,16 @@ exports.UsersApiFp = UsersApiFp;
3653
4198
  const UsersApiFactory = function (configuration, basePath, axios) {
3654
4199
  const localVarFp = (0, exports.UsersApiFp)(configuration);
3655
4200
  return {
4201
+ /**
4202
+ *
4203
+ * @summary Annule un abonnement utilisateur
4204
+ * @param {UsersApiCancelSubscriptionRequest} requestParameters Request parameters.
4205
+ * @param {*} [options] Override http request option.
4206
+ * @throws {RequiredError}
4207
+ */
4208
+ cancelSubscription(requestParameters, options) {
4209
+ return localVarFp.cancelSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(axios, basePath));
4210
+ },
3656
4211
  /**
3657
4212
  *
3658
4213
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -3665,12 +4220,13 @@ const UsersApiFactory = function (configuration, basePath, axios) {
3665
4220
  },
3666
4221
  /**
3667
4222
  *
3668
- * @summary Récupère la liste des utilisateurs
4223
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
4224
+ * @param {UsersApiGetAllUsersRequest} requestParameters Request parameters.
3669
4225
  * @param {*} [options] Override http request option.
3670
4226
  * @throws {RequiredError}
3671
4227
  */
3672
- getAllUsers(options) {
3673
- return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
4228
+ getAllUsers(requestParameters = {}, options) {
4229
+ return localVarFp.getAllUsers(requestParameters.limit, requestParameters.skip, requestParameters.search, requestParameters.sport, requestParameters.matchType, requestParameters.niveau, requestParameters.rank, requestParameters.isLookingForPartner, requestParameters.username, requestParameters.email, requestParameters.description, requestParameters.gender, options).then((request) => request(axios, basePath));
3674
4230
  },
3675
4231
  /**
3676
4232
  *
@@ -3690,6 +4246,25 @@ const UsersApiFactory = function (configuration, basePath, axios) {
3690
4246
  getUserRolesInClubs(options) {
3691
4247
  return localVarFp.getUserRolesInClubs(options).then((request) => request(axios, basePath));
3692
4248
  },
4249
+ /**
4250
+ *
4251
+ * @summary Récupère les abonnements de l\'utilisateur connecté
4252
+ * @param {*} [options] Override http request option.
4253
+ * @throws {RequiredError}
4254
+ */
4255
+ getUserSubscriptions(options) {
4256
+ return localVarFp.getUserSubscriptions(options).then((request) => request(axios, basePath));
4257
+ },
4258
+ /**
4259
+ *
4260
+ * @summary Initie une session d\'abonnement Stripe
4261
+ * @param {UsersApiInitiateSubscriptionSessionRequest} requestParameters Request parameters.
4262
+ * @param {*} [options] Override http request option.
4263
+ * @throws {RequiredError}
4264
+ */
4265
+ initiateSubscriptionSession(requestParameters, options) {
4266
+ return localVarFp.initiateSubscriptionSession(requestParameters.initiateSubscriptionSessionRequestBody, options).then((request) => request(axios, basePath));
4267
+ },
3693
4268
  /**
3694
4269
  *
3695
4270
  * @summary Authentifie un utilisateur
@@ -3720,6 +4295,46 @@ const UsersApiFactory = function (configuration, basePath, axios) {
3720
4295
  register(requestParameters, options) {
3721
4296
  return localVarFp.register(requestParameters.registerRequestBody, options).then((request) => request(axios, basePath));
3722
4297
  },
4298
+ /**
4299
+ *
4300
+ * @summary Réactive un abonnement utilisateur
4301
+ * @param {UsersApiResumeSubscriptionRequest} requestParameters Request parameters.
4302
+ * @param {*} [options] Override http request option.
4303
+ * @throws {RequiredError}
4304
+ */
4305
+ resumeSubscription(requestParameters, options) {
4306
+ return localVarFp.resumeSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(axios, basePath));
4307
+ },
4308
+ /**
4309
+ *
4310
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4311
+ * @param {UsersApiSignInOrSignUpWithGoogleRequest} requestParameters Request parameters.
4312
+ * @param {*} [options] Override http request option.
4313
+ * @throws {RequiredError}
4314
+ */
4315
+ signInOrSignUpWithGoogle(requestParameters, options) {
4316
+ return localVarFp.signInOrSignUpWithGoogle(requestParameters.googleSignInRequestBody, options).then((request) => request(axios, basePath));
4317
+ },
4318
+ /**
4319
+ *
4320
+ * @summary Abonne l\'utilisateur connecté à un club
4321
+ * @param {UsersApiSubscribeToClubRequest} requestParameters Request parameters.
4322
+ * @param {*} [options] Override http request option.
4323
+ * @throws {RequiredError}
4324
+ */
4325
+ subscribeToClub(requestParameters, options) {
4326
+ return localVarFp.subscribeToClub(requestParameters.subscribeToClubRequestBody, options).then((request) => request(axios, basePath));
4327
+ },
4328
+ /**
4329
+ *
4330
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4331
+ * @param {UsersApiUpdateCustomerRequest} requestParameters Request parameters.
4332
+ * @param {*} [options] Override http request option.
4333
+ * @throws {RequiredError}
4334
+ */
4335
+ updateCustomer(requestParameters, options) {
4336
+ return localVarFp.updateCustomer(requestParameters.updateCustomerRequestBody, options).then((request) => request(axios, basePath));
4337
+ },
3723
4338
  /**
3724
4339
  *
3725
4340
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -3740,6 +4355,17 @@ exports.UsersApiFactory = UsersApiFactory;
3740
4355
  * @extends {BaseAPI}
3741
4356
  */
3742
4357
  class UsersApi extends base_1.BaseAPI {
4358
+ /**
4359
+ *
4360
+ * @summary Annule un abonnement utilisateur
4361
+ * @param {UsersApiCancelSubscriptionRequest} requestParameters Request parameters.
4362
+ * @param {*} [options] Override http request option.
4363
+ * @throws {RequiredError}
4364
+ * @memberof UsersApi
4365
+ */
4366
+ cancelSubscription(requestParameters, options) {
4367
+ return (0, exports.UsersApiFp)(this.configuration).cancelSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(this.axios, this.basePath));
4368
+ }
3743
4369
  /**
3744
4370
  *
3745
4371
  * @summary Modifie le mot de passe de l\'utilisateur connecté
@@ -3753,13 +4379,14 @@ class UsersApi extends base_1.BaseAPI {
3753
4379
  }
3754
4380
  /**
3755
4381
  *
3756
- * @summary Récupère la liste des utilisateurs
4382
+ * @summary Récupère la liste des utilisateurs avec filtres et pagination
4383
+ * @param {UsersApiGetAllUsersRequest} requestParameters Request parameters.
3757
4384
  * @param {*} [options] Override http request option.
3758
4385
  * @throws {RequiredError}
3759
4386
  * @memberof UsersApi
3760
4387
  */
3761
- getAllUsers(options) {
3762
- return (0, exports.UsersApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
4388
+ getAllUsers(requestParameters = {}, options) {
4389
+ return (0, exports.UsersApiFp)(this.configuration).getAllUsers(requestParameters.limit, requestParameters.skip, requestParameters.search, requestParameters.sport, requestParameters.matchType, requestParameters.niveau, requestParameters.rank, requestParameters.isLookingForPartner, requestParameters.username, requestParameters.email, requestParameters.description, requestParameters.gender, options).then((request) => request(this.axios, this.basePath));
3763
4390
  }
3764
4391
  /**
3765
4392
  *
@@ -3781,6 +4408,27 @@ class UsersApi extends base_1.BaseAPI {
3781
4408
  getUserRolesInClubs(options) {
3782
4409
  return (0, exports.UsersApiFp)(this.configuration).getUserRolesInClubs(options).then((request) => request(this.axios, this.basePath));
3783
4410
  }
4411
+ /**
4412
+ *
4413
+ * @summary Récupère les abonnements de l\'utilisateur connecté
4414
+ * @param {*} [options] Override http request option.
4415
+ * @throws {RequiredError}
4416
+ * @memberof UsersApi
4417
+ */
4418
+ getUserSubscriptions(options) {
4419
+ return (0, exports.UsersApiFp)(this.configuration).getUserSubscriptions(options).then((request) => request(this.axios, this.basePath));
4420
+ }
4421
+ /**
4422
+ *
4423
+ * @summary Initie une session d\'abonnement Stripe
4424
+ * @param {UsersApiInitiateSubscriptionSessionRequest} requestParameters Request parameters.
4425
+ * @param {*} [options] Override http request option.
4426
+ * @throws {RequiredError}
4427
+ * @memberof UsersApi
4428
+ */
4429
+ initiateSubscriptionSession(requestParameters, options) {
4430
+ return (0, exports.UsersApiFp)(this.configuration).initiateSubscriptionSession(requestParameters.initiateSubscriptionSessionRequestBody, options).then((request) => request(this.axios, this.basePath));
4431
+ }
3784
4432
  /**
3785
4433
  *
3786
4434
  * @summary Authentifie un utilisateur
@@ -3814,6 +4462,50 @@ class UsersApi extends base_1.BaseAPI {
3814
4462
  register(requestParameters, options) {
3815
4463
  return (0, exports.UsersApiFp)(this.configuration).register(requestParameters.registerRequestBody, options).then((request) => request(this.axios, this.basePath));
3816
4464
  }
4465
+ /**
4466
+ *
4467
+ * @summary Réactive un abonnement utilisateur
4468
+ * @param {UsersApiResumeSubscriptionRequest} requestParameters Request parameters.
4469
+ * @param {*} [options] Override http request option.
4470
+ * @throws {RequiredError}
4471
+ * @memberof UsersApi
4472
+ */
4473
+ resumeSubscription(requestParameters, options) {
4474
+ return (0, exports.UsersApiFp)(this.configuration).resumeSubscription(requestParameters.clubId, requestParameters.subscriptionId, options).then((request) => request(this.axios, this.basePath));
4475
+ }
4476
+ /**
4477
+ *
4478
+ * @summary Authentifie ou crée un utilisateur via Google OAuth
4479
+ * @param {UsersApiSignInOrSignUpWithGoogleRequest} requestParameters Request parameters.
4480
+ * @param {*} [options] Override http request option.
4481
+ * @throws {RequiredError}
4482
+ * @memberof UsersApi
4483
+ */
4484
+ signInOrSignUpWithGoogle(requestParameters, options) {
4485
+ return (0, exports.UsersApiFp)(this.configuration).signInOrSignUpWithGoogle(requestParameters.googleSignInRequestBody, options).then((request) => request(this.axios, this.basePath));
4486
+ }
4487
+ /**
4488
+ *
4489
+ * @summary Abonne l\'utilisateur connecté à un club
4490
+ * @param {UsersApiSubscribeToClubRequest} requestParameters Request parameters.
4491
+ * @param {*} [options] Override http request option.
4492
+ * @throws {RequiredError}
4493
+ * @memberof UsersApi
4494
+ */
4495
+ subscribeToClub(requestParameters, options) {
4496
+ return (0, exports.UsersApiFp)(this.configuration).subscribeToClub(requestParameters.subscribeToClubRequestBody, options).then((request) => request(this.axios, this.basePath));
4497
+ }
4498
+ /**
4499
+ *
4500
+ * @summary Met à jour le Customer Stripe de l\'utilisateur
4501
+ * @param {UsersApiUpdateCustomerRequest} requestParameters Request parameters.
4502
+ * @param {*} [options] Override http request option.
4503
+ * @throws {RequiredError}
4504
+ * @memberof UsersApi
4505
+ */
4506
+ updateCustomer(requestParameters, options) {
4507
+ return (0, exports.UsersApiFp)(this.configuration).updateCustomer(requestParameters.updateCustomerRequestBody, options).then((request) => request(this.axios, this.basePath));
4508
+ }
3817
4509
  /**
3818
4510
  *
3819
4511
  * @summary Met à jour les données de l\'utilisateur connecté
@@ -3827,3 +4519,10 @@ class UsersApi extends base_1.BaseAPI {
3827
4519
  }
3828
4520
  }
3829
4521
  exports.UsersApi = UsersApi;
4522
+ /**
4523
+ * @export
4524
+ */
4525
+ exports.GetAllUsersIsLookingForPartnerEnum = {
4526
+ True: 'true',
4527
+ False: 'false'
4528
+ };