@tennac-booking/sdk 1.0.18 → 1.0.19
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 +14 -0
- package/README.md +17 -0
- package/api.ts +1043 -52
- package/dist/api.d.ts +764 -29
- package/dist/api.js +454 -3
- package/dist/esm/api.d.ts +764 -29
- package/dist/esm/api.js +443 -0
- package/docs/BookingPaymentStatusResponse.md +24 -0
- package/docs/BookingPaymentStatusResponseBooking.md +26 -0
- package/docs/BookingPaymentStatusResponsePaymentStatusInner.md +36 -0
- package/docs/BookingPaymentStatusResponseSummary.md +28 -0
- package/docs/BookingsApi.md +68 -0
- package/docs/CancelBookingRequest.md +20 -0
- package/docs/CancelBookingResponse.md +2 -2
- package/docs/CancelBookingResponseBooking.md +6 -6
- package/docs/CheckInPlayersRequest.md +20 -0
- package/docs/CheckInPlayersResponse.md +30 -0
- package/docs/CheckInPlayersResponseCheckedInPlayersInner.md +34 -0
- package/docs/ClubInfoResponse.md +2 -0
- package/docs/ManagerBookingsApi.md +243 -0
- package/docs/ManagerCancelBookingRequest.md +20 -0
- package/docs/ManagerCancelBookingResponse.md +2 -2
- package/docs/ManagerCancelBookingResponseBooking.md +6 -6
- package/docs/NoShowFeeResponse.md +30 -0
- package/docs/NoShowFeeResponseCaptureResultsInner.md +30 -0
- package/docs/NoShowFeeResponseCreatorChargeResult.md +26 -0
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -22,15 +22,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.UserSubscriptionsApi = exports.UserSubscriptionsApiFactory = exports.UserSubscriptionsApiFp = exports.UserSubscriptionsApiAxiosParamCreator = exports.UserProfileApi = exports.UserProfileApiFactory = void 0;
|
|
25
|
+
exports.ManagerSportsApiAxiosParamCreator = exports.ManagerClubsApi = exports.ManagerClubsApiFactory = exports.ManagerClubsApiFp = exports.ManagerClubsApiAxiosParamCreator = exports.ManagerClubSubscriptionsApi = exports.ManagerClubSubscriptionsApiFactory = exports.ManagerClubSubscriptionsApiFp = exports.ManagerClubSubscriptionsApiAxiosParamCreator = exports.ManagerClubSlotsApi = exports.ManagerClubSlotsApiFactory = exports.ManagerClubSlotsApiFp = exports.ManagerClubSlotsApiAxiosParamCreator = exports.ManagerClubRolesApi = exports.ManagerClubRolesApiFactory = exports.ManagerClubRolesApiFp = exports.ManagerClubRolesApiAxiosParamCreator = exports.ManagerClubCourtsApi = exports.ManagerClubCourtsApiFactory = exports.ManagerClubCourtsApiFp = exports.ManagerClubCourtsApiAxiosParamCreator = exports.ManagerBookingsApi = exports.ManagerBookingsApiFactory = exports.ManagerBookingsApiFp = exports.ManagerBookingsApiAxiosParamCreator = exports.BookingsApi = exports.BookingsApiFactory = exports.BookingsApiFp = exports.BookingsApiAxiosParamCreator = exports.AdminClubsApi = exports.AdminClubsApiFactory = exports.AdminClubsApiFp = exports.AdminClubsApiAxiosParamCreator = exports.AdminClubSlotsApi = exports.AdminClubSlotsApiFactory = exports.AdminClubSlotsApiFp = exports.AdminClubSlotsApiAxiosParamCreator = exports.SubscriptionResponseStatusEnum = exports.StripeStatus = exports.PaymentMethod = exports.NoShowFeeResponseCaptureResultsInnerStatusEnum = exports.NoShowFeeResponseCaptureResultsInnerTypeEnum = exports.ManagerCancelBookingResponseBookingStatusEnum = exports.CreatePriceRequestIntervalEnum = exports.CourtStatus = exports.CourtResponseSurfaceEnum = exports.CourtResponseStatusEnum = exports.CancelBookingResponseBookingStatusEnum = exports.BookingStatus = exports.BookingPaymentStatusResponsePaymentStatusInnerPaymentMethodEnum = void 0;
|
|
26
|
+
exports.UserClubSportsApiFactory = exports.UserClubSportsApiFp = exports.UserClubSportsApiAxiosParamCreator = exports.UserClubSlotsApi = exports.UserClubSlotsApiFactory = exports.UserClubSlotsApiFp = exports.UserClubSlotsApiAxiosParamCreator = exports.UserClubCourtsApi = exports.UserClubCourtsApiFactory = exports.UserClubCourtsApiFp = exports.UserClubCourtsApiAxiosParamCreator = exports.UserBookingsApi = exports.UserBookingsApiFactory = exports.UserBookingsApiFp = exports.UserBookingsApiAxiosParamCreator = exports.UserAuthenticationApi = exports.UserAuthenticationApiFactory = exports.UserAuthenticationApiFp = exports.UserAuthenticationApiAxiosParamCreator = exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.StaffSportsApi = exports.StaffSportsApiFactory = exports.StaffSportsApiFp = exports.StaffSportsApiAxiosParamCreator = exports.StaffProfileApi = exports.StaffProfileApiFactory = exports.StaffProfileApiFp = exports.StaffProfileApiAxiosParamCreator = exports.StaffClubsApi = exports.StaffClubsApiFactory = exports.StaffClubsApiFp = exports.StaffClubsApiAxiosParamCreator = exports.StaffClubSettingsApi = exports.StaffClubSettingsApiFactory = exports.StaffClubSettingsApiFp = exports.StaffClubSettingsApiAxiosParamCreator = exports.StaffClubBookingsApi = exports.StaffClubBookingsApiFactory = exports.StaffClubBookingsApiFp = exports.StaffClubBookingsApiAxiosParamCreator = exports.StaffClubAnalyticsApi = exports.StaffClubAnalyticsApiFactory = exports.StaffClubAnalyticsApiFp = exports.StaffClubAnalyticsApiAxiosParamCreator = exports.ManagerSportsApi = exports.ManagerSportsApiFactory = exports.ManagerSportsApiFp = void 0;
|
|
27
|
+
exports.UserSubscriptionsApi = exports.UserSubscriptionsApiFactory = exports.UserSubscriptionsApiFp = exports.UserSubscriptionsApiAxiosParamCreator = exports.UserProfileApi = exports.UserProfileApiFactory = exports.UserProfileApiFp = exports.UserProfileApiAxiosParamCreator = exports.UserPaymentApi = exports.UserPaymentApiFactory = exports.UserPaymentApiFp = exports.UserPaymentApiAxiosParamCreator = exports.UserClubsApi = exports.UserClubsApiFactory = exports.UserClubsApiFp = exports.UserClubsApiAxiosParamCreator = exports.UserClubSportsApi = void 0;
|
|
28
28
|
const axios_1 = require("axios");
|
|
29
29
|
// Some imports not used depending on template conditions
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
const common_1 = require("./common");
|
|
32
32
|
// @ts-ignore
|
|
33
33
|
const base_1 = require("./base");
|
|
34
|
+
exports.BookingPaymentStatusResponsePaymentStatusInnerPaymentMethodEnum = {
|
|
35
|
+
Stripe: 'stripe',
|
|
36
|
+
Onsite: 'onsite'
|
|
37
|
+
};
|
|
34
38
|
/**
|
|
35
39
|
*
|
|
36
40
|
* @export
|
|
@@ -71,6 +75,14 @@ exports.CreatePriceRequestIntervalEnum = {
|
|
|
71
75
|
exports.ManagerCancelBookingResponseBookingStatusEnum = {
|
|
72
76
|
Cancelled: 'cancelled'
|
|
73
77
|
};
|
|
78
|
+
exports.NoShowFeeResponseCaptureResultsInnerTypeEnum = {
|
|
79
|
+
CreatorPayment: 'creator_payment',
|
|
80
|
+
PlayerPayment: 'player_payment'
|
|
81
|
+
};
|
|
82
|
+
exports.NoShowFeeResponseCaptureResultsInnerStatusEnum = {
|
|
83
|
+
Captured: 'captured',
|
|
84
|
+
Failed: 'failed'
|
|
85
|
+
};
|
|
74
86
|
/**
|
|
75
87
|
* Méthode de paiement
|
|
76
88
|
* @export
|
|
@@ -378,6 +390,445 @@ class AdminClubsApi extends base_1.BaseAPI {
|
|
|
378
390
|
}
|
|
379
391
|
}
|
|
380
392
|
exports.AdminClubsApi = AdminClubsApi;
|
|
393
|
+
/**
|
|
394
|
+
* BookingsApi - axios parameter creator
|
|
395
|
+
* @export
|
|
396
|
+
*/
|
|
397
|
+
const BookingsApiAxiosParamCreator = function (configuration) {
|
|
398
|
+
return {
|
|
399
|
+
/**
|
|
400
|
+
* Permet au créateur d\'une réservation de l\'annuler. Rouvre automatiquement le créneau et envoie des emails de notification à tous les participants.
|
|
401
|
+
* @summary Annuler une réservation (créateur uniquement)
|
|
402
|
+
* @param {string} bookingId ID MongoDB de la réservation à annuler
|
|
403
|
+
* @param {CancelBookingRequest} cancelBookingRequest
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
*/
|
|
407
|
+
cancelBooking: (bookingId_1, cancelBookingRequest_1, ...args_1) => __awaiter(this, [bookingId_1, cancelBookingRequest_1, ...args_1], void 0, function* (bookingId, cancelBookingRequest, options = {}) {
|
|
408
|
+
// verify required parameter 'bookingId' is not null or undefined
|
|
409
|
+
(0, common_1.assertParamExists)('cancelBooking', 'bookingId', bookingId);
|
|
410
|
+
// verify required parameter 'cancelBookingRequest' is not null or undefined
|
|
411
|
+
(0, common_1.assertParamExists)('cancelBooking', 'cancelBookingRequest', cancelBookingRequest);
|
|
412
|
+
const localVarPath = `/api/bookings/{bookingId}/cancel`
|
|
413
|
+
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
414
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
415
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
416
|
+
let baseOptions;
|
|
417
|
+
if (configuration) {
|
|
418
|
+
baseOptions = configuration.baseOptions;
|
|
419
|
+
}
|
|
420
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
421
|
+
const localVarHeaderParameter = {};
|
|
422
|
+
const localVarQueryParameter = {};
|
|
423
|
+
// authentication bearerAuth required
|
|
424
|
+
// http bearer authentication required
|
|
425
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
426
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
427
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
428
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
429
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
430
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cancelBookingRequest, localVarRequestOptions, configuration);
|
|
431
|
+
return {
|
|
432
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
433
|
+
options: localVarRequestOptions,
|
|
434
|
+
};
|
|
435
|
+
}),
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
exports.BookingsApiAxiosParamCreator = BookingsApiAxiosParamCreator;
|
|
439
|
+
/**
|
|
440
|
+
* BookingsApi - functional programming interface
|
|
441
|
+
* @export
|
|
442
|
+
*/
|
|
443
|
+
const BookingsApiFp = function (configuration) {
|
|
444
|
+
const localVarAxiosParamCreator = (0, exports.BookingsApiAxiosParamCreator)(configuration);
|
|
445
|
+
return {
|
|
446
|
+
/**
|
|
447
|
+
* Permet au créateur d\'une réservation de l\'annuler. Rouvre automatiquement le créneau et envoie des emails de notification à tous les participants.
|
|
448
|
+
* @summary Annuler une réservation (créateur uniquement)
|
|
449
|
+
* @param {string} bookingId ID MongoDB de la réservation à annuler
|
|
450
|
+
* @param {CancelBookingRequest} cancelBookingRequest
|
|
451
|
+
* @param {*} [options] Override http request option.
|
|
452
|
+
* @throws {RequiredError}
|
|
453
|
+
*/
|
|
454
|
+
cancelBooking(bookingId, cancelBookingRequest, options) {
|
|
455
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
+
var _a, _b, _c;
|
|
457
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelBooking(bookingId, cancelBookingRequest, options);
|
|
458
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
459
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BookingsApi.cancelBooking']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
460
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
461
|
+
});
|
|
462
|
+
},
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
exports.BookingsApiFp = BookingsApiFp;
|
|
466
|
+
/**
|
|
467
|
+
* BookingsApi - factory interface
|
|
468
|
+
* @export
|
|
469
|
+
*/
|
|
470
|
+
const BookingsApiFactory = function (configuration, basePath, axios) {
|
|
471
|
+
const localVarFp = (0, exports.BookingsApiFp)(configuration);
|
|
472
|
+
return {
|
|
473
|
+
/**
|
|
474
|
+
* Permet au créateur d\'une réservation de l\'annuler. Rouvre automatiquement le créneau et envoie des emails de notification à tous les participants.
|
|
475
|
+
* @summary Annuler une réservation (créateur uniquement)
|
|
476
|
+
* @param {BookingsApiCancelBookingRequest} requestParameters Request parameters.
|
|
477
|
+
* @param {*} [options] Override http request option.
|
|
478
|
+
* @throws {RequiredError}
|
|
479
|
+
*/
|
|
480
|
+
cancelBooking(requestParameters, options) {
|
|
481
|
+
return localVarFp.cancelBooking(requestParameters.bookingId, requestParameters.cancelBookingRequest, options).then((request) => request(axios, basePath));
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
exports.BookingsApiFactory = BookingsApiFactory;
|
|
486
|
+
/**
|
|
487
|
+
* BookingsApi - object-oriented interface
|
|
488
|
+
* @export
|
|
489
|
+
* @class BookingsApi
|
|
490
|
+
* @extends {BaseAPI}
|
|
491
|
+
*/
|
|
492
|
+
class BookingsApi extends base_1.BaseAPI {
|
|
493
|
+
/**
|
|
494
|
+
* Permet au créateur d\'une réservation de l\'annuler. Rouvre automatiquement le créneau et envoie des emails de notification à tous les participants.
|
|
495
|
+
* @summary Annuler une réservation (créateur uniquement)
|
|
496
|
+
* @param {BookingsApiCancelBookingRequest} requestParameters Request parameters.
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
* @memberof BookingsApi
|
|
500
|
+
*/
|
|
501
|
+
cancelBooking(requestParameters, options) {
|
|
502
|
+
return (0, exports.BookingsApiFp)(this.configuration).cancelBooking(requestParameters.bookingId, requestParameters.cancelBookingRequest, options).then((request) => request(this.axios, this.basePath));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
exports.BookingsApi = BookingsApi;
|
|
506
|
+
/**
|
|
507
|
+
* ManagerBookingsApi - axios parameter creator
|
|
508
|
+
* @export
|
|
509
|
+
*/
|
|
510
|
+
const ManagerBookingsApiAxiosParamCreator = function (configuration) {
|
|
511
|
+
return {
|
|
512
|
+
/**
|
|
513
|
+
* Applique les frais de no-show à une réservation. Capture automatiquement les paiements autorisés et charge le créateur pour le montant manquant.
|
|
514
|
+
* @summary Appliquer les frais de no-show
|
|
515
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
*/
|
|
519
|
+
applyNoShowFee: (bookingId_1, ...args_1) => __awaiter(this, [bookingId_1, ...args_1], void 0, function* (bookingId, options = {}) {
|
|
520
|
+
// verify required parameter 'bookingId' is not null or undefined
|
|
521
|
+
(0, common_1.assertParamExists)('applyNoShowFee', 'bookingId', bookingId);
|
|
522
|
+
const localVarPath = `/api/bookings/{bookingId}/apply-noshow-fee`
|
|
523
|
+
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
524
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
525
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
526
|
+
let baseOptions;
|
|
527
|
+
if (configuration) {
|
|
528
|
+
baseOptions = configuration.baseOptions;
|
|
529
|
+
}
|
|
530
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
531
|
+
const localVarHeaderParameter = {};
|
|
532
|
+
const localVarQueryParameter = {};
|
|
533
|
+
// authentication bearerAuth required
|
|
534
|
+
// http bearer authentication required
|
|
535
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
536
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
537
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
538
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
539
|
+
return {
|
|
540
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
541
|
+
options: localVarRequestOptions,
|
|
542
|
+
};
|
|
543
|
+
}),
|
|
544
|
+
/**
|
|
545
|
+
* Enregistre l\'arrivée et le paiement des joueurs pour une réservation avec paiement sur place. Met à jour le statut des factures.
|
|
546
|
+
* @summary Enregistrer l\'arrivée des joueurs
|
|
547
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
548
|
+
* @param {CheckInPlayersRequest} checkInPlayersRequest
|
|
549
|
+
* @param {*} [options] Override http request option.
|
|
550
|
+
* @throws {RequiredError}
|
|
551
|
+
*/
|
|
552
|
+
checkInPlayers: (bookingId_1, checkInPlayersRequest_1, ...args_1) => __awaiter(this, [bookingId_1, checkInPlayersRequest_1, ...args_1], void 0, function* (bookingId, checkInPlayersRequest, options = {}) {
|
|
553
|
+
// verify required parameter 'bookingId' is not null or undefined
|
|
554
|
+
(0, common_1.assertParamExists)('checkInPlayers', 'bookingId', bookingId);
|
|
555
|
+
// verify required parameter 'checkInPlayersRequest' is not null or undefined
|
|
556
|
+
(0, common_1.assertParamExists)('checkInPlayers', 'checkInPlayersRequest', checkInPlayersRequest);
|
|
557
|
+
const localVarPath = `/api/bookings/{bookingId}/checkin-players`
|
|
558
|
+
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
559
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
560
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
561
|
+
let baseOptions;
|
|
562
|
+
if (configuration) {
|
|
563
|
+
baseOptions = configuration.baseOptions;
|
|
564
|
+
}
|
|
565
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
566
|
+
const localVarHeaderParameter = {};
|
|
567
|
+
const localVarQueryParameter = {};
|
|
568
|
+
// authentication bearerAuth required
|
|
569
|
+
// http bearer authentication required
|
|
570
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
571
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
572
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
573
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
574
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
575
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(checkInPlayersRequest, localVarRequestOptions, configuration);
|
|
576
|
+
return {
|
|
577
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
578
|
+
options: localVarRequestOptions,
|
|
579
|
+
};
|
|
580
|
+
}),
|
|
581
|
+
/**
|
|
582
|
+
* Récupère le statut détaillé des paiements pour tous les joueurs d\'une réservation. Utile pour l\'interface de check-in.
|
|
583
|
+
* @summary Obtenir le statut des paiements d\'une réservation
|
|
584
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
585
|
+
* @param {*} [options] Override http request option.
|
|
586
|
+
* @throws {RequiredError}
|
|
587
|
+
*/
|
|
588
|
+
getBookingPaymentStatus: (bookingId_1, ...args_1) => __awaiter(this, [bookingId_1, ...args_1], void 0, function* (bookingId, options = {}) {
|
|
589
|
+
// verify required parameter 'bookingId' is not null or undefined
|
|
590
|
+
(0, common_1.assertParamExists)('getBookingPaymentStatus', 'bookingId', bookingId);
|
|
591
|
+
const localVarPath = `/api/bookings/{bookingId}/payment-status`
|
|
592
|
+
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
593
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
594
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
595
|
+
let baseOptions;
|
|
596
|
+
if (configuration) {
|
|
597
|
+
baseOptions = configuration.baseOptions;
|
|
598
|
+
}
|
|
599
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
600
|
+
const localVarHeaderParameter = {};
|
|
601
|
+
const localVarQueryParameter = {};
|
|
602
|
+
// authentication bearerAuth required
|
|
603
|
+
// http bearer authentication required
|
|
604
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
605
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
606
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
607
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
608
|
+
return {
|
|
609
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
610
|
+
options: localVarRequestOptions,
|
|
611
|
+
};
|
|
612
|
+
}),
|
|
613
|
+
/**
|
|
614
|
+
* Permet à un gestionnaire d\'annuler n\'importe quelle réservation avec une raison obligatoire. Effectue un remboursement automatique si le paiement a été fait en ligne.
|
|
615
|
+
* @summary Annuler une réservation (gestionnaire)
|
|
616
|
+
* @param {string} bookingId ID MongoDB de la réservation à annuler
|
|
617
|
+
* @param {ManagerCancelBookingRequest} managerCancelBookingRequest
|
|
618
|
+
* @param {*} [options] Override http request option.
|
|
619
|
+
* @throws {RequiredError}
|
|
620
|
+
*/
|
|
621
|
+
managerCancelBooking: (bookingId_1, managerCancelBookingRequest_1, ...args_1) => __awaiter(this, [bookingId_1, managerCancelBookingRequest_1, ...args_1], void 0, function* (bookingId, managerCancelBookingRequest, options = {}) {
|
|
622
|
+
// verify required parameter 'bookingId' is not null or undefined
|
|
623
|
+
(0, common_1.assertParamExists)('managerCancelBooking', 'bookingId', bookingId);
|
|
624
|
+
// verify required parameter 'managerCancelBookingRequest' is not null or undefined
|
|
625
|
+
(0, common_1.assertParamExists)('managerCancelBooking', 'managerCancelBookingRequest', managerCancelBookingRequest);
|
|
626
|
+
const localVarPath = `/api/bookings/{bookingId}/manager-cancel`
|
|
627
|
+
.replace(`{${"bookingId"}}`, encodeURIComponent(String(bookingId)));
|
|
628
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
629
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
630
|
+
let baseOptions;
|
|
631
|
+
if (configuration) {
|
|
632
|
+
baseOptions = configuration.baseOptions;
|
|
633
|
+
}
|
|
634
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
635
|
+
const localVarHeaderParameter = {};
|
|
636
|
+
const localVarQueryParameter = {};
|
|
637
|
+
// authentication bearerAuth required
|
|
638
|
+
// http bearer authentication required
|
|
639
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
640
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
641
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
642
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
643
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
644
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(managerCancelBookingRequest, localVarRequestOptions, configuration);
|
|
645
|
+
return {
|
|
646
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
647
|
+
options: localVarRequestOptions,
|
|
648
|
+
};
|
|
649
|
+
}),
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
exports.ManagerBookingsApiAxiosParamCreator = ManagerBookingsApiAxiosParamCreator;
|
|
653
|
+
/**
|
|
654
|
+
* ManagerBookingsApi - functional programming interface
|
|
655
|
+
* @export
|
|
656
|
+
*/
|
|
657
|
+
const ManagerBookingsApiFp = function (configuration) {
|
|
658
|
+
const localVarAxiosParamCreator = (0, exports.ManagerBookingsApiAxiosParamCreator)(configuration);
|
|
659
|
+
return {
|
|
660
|
+
/**
|
|
661
|
+
* Applique les frais de no-show à une réservation. Capture automatiquement les paiements autorisés et charge le créateur pour le montant manquant.
|
|
662
|
+
* @summary Appliquer les frais de no-show
|
|
663
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
664
|
+
* @param {*} [options] Override http request option.
|
|
665
|
+
* @throws {RequiredError}
|
|
666
|
+
*/
|
|
667
|
+
applyNoShowFee(bookingId, options) {
|
|
668
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
669
|
+
var _a, _b, _c;
|
|
670
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.applyNoShowFee(bookingId, options);
|
|
671
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
672
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ManagerBookingsApi.applyNoShowFee']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
673
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
674
|
+
});
|
|
675
|
+
},
|
|
676
|
+
/**
|
|
677
|
+
* Enregistre l\'arrivée et le paiement des joueurs pour une réservation avec paiement sur place. Met à jour le statut des factures.
|
|
678
|
+
* @summary Enregistrer l\'arrivée des joueurs
|
|
679
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
680
|
+
* @param {CheckInPlayersRequest} checkInPlayersRequest
|
|
681
|
+
* @param {*} [options] Override http request option.
|
|
682
|
+
* @throws {RequiredError}
|
|
683
|
+
*/
|
|
684
|
+
checkInPlayers(bookingId, checkInPlayersRequest, options) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
+
var _a, _b, _c;
|
|
687
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.checkInPlayers(bookingId, checkInPlayersRequest, options);
|
|
688
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
689
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ManagerBookingsApi.checkInPlayers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
690
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
691
|
+
});
|
|
692
|
+
},
|
|
693
|
+
/**
|
|
694
|
+
* Récupère le statut détaillé des paiements pour tous les joueurs d\'une réservation. Utile pour l\'interface de check-in.
|
|
695
|
+
* @summary Obtenir le statut des paiements d\'une réservation
|
|
696
|
+
* @param {string} bookingId ID MongoDB de la réservation
|
|
697
|
+
* @param {*} [options] Override http request option.
|
|
698
|
+
* @throws {RequiredError}
|
|
699
|
+
*/
|
|
700
|
+
getBookingPaymentStatus(bookingId, options) {
|
|
701
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
702
|
+
var _a, _b, _c;
|
|
703
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBookingPaymentStatus(bookingId, options);
|
|
704
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
705
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ManagerBookingsApi.getBookingPaymentStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
706
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
707
|
+
});
|
|
708
|
+
},
|
|
709
|
+
/**
|
|
710
|
+
* Permet à un gestionnaire d\'annuler n\'importe quelle réservation avec une raison obligatoire. Effectue un remboursement automatique si le paiement a été fait en ligne.
|
|
711
|
+
* @summary Annuler une réservation (gestionnaire)
|
|
712
|
+
* @param {string} bookingId ID MongoDB de la réservation à annuler
|
|
713
|
+
* @param {ManagerCancelBookingRequest} managerCancelBookingRequest
|
|
714
|
+
* @param {*} [options] Override http request option.
|
|
715
|
+
* @throws {RequiredError}
|
|
716
|
+
*/
|
|
717
|
+
managerCancelBooking(bookingId, managerCancelBookingRequest, options) {
|
|
718
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
719
|
+
var _a, _b, _c;
|
|
720
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.managerCancelBooking(bookingId, managerCancelBookingRequest, options);
|
|
721
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
722
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ManagerBookingsApi.managerCancelBooking']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
723
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
724
|
+
});
|
|
725
|
+
},
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
exports.ManagerBookingsApiFp = ManagerBookingsApiFp;
|
|
729
|
+
/**
|
|
730
|
+
* ManagerBookingsApi - factory interface
|
|
731
|
+
* @export
|
|
732
|
+
*/
|
|
733
|
+
const ManagerBookingsApiFactory = function (configuration, basePath, axios) {
|
|
734
|
+
const localVarFp = (0, exports.ManagerBookingsApiFp)(configuration);
|
|
735
|
+
return {
|
|
736
|
+
/**
|
|
737
|
+
* Applique les frais de no-show à une réservation. Capture automatiquement les paiements autorisés et charge le créateur pour le montant manquant.
|
|
738
|
+
* @summary Appliquer les frais de no-show
|
|
739
|
+
* @param {ManagerBookingsApiApplyNoShowFeeRequest} requestParameters Request parameters.
|
|
740
|
+
* @param {*} [options] Override http request option.
|
|
741
|
+
* @throws {RequiredError}
|
|
742
|
+
*/
|
|
743
|
+
applyNoShowFee(requestParameters, options) {
|
|
744
|
+
return localVarFp.applyNoShowFee(requestParameters.bookingId, options).then((request) => request(axios, basePath));
|
|
745
|
+
},
|
|
746
|
+
/**
|
|
747
|
+
* Enregistre l\'arrivée et le paiement des joueurs pour une réservation avec paiement sur place. Met à jour le statut des factures.
|
|
748
|
+
* @summary Enregistrer l\'arrivée des joueurs
|
|
749
|
+
* @param {ManagerBookingsApiCheckInPlayersRequest} requestParameters Request parameters.
|
|
750
|
+
* @param {*} [options] Override http request option.
|
|
751
|
+
* @throws {RequiredError}
|
|
752
|
+
*/
|
|
753
|
+
checkInPlayers(requestParameters, options) {
|
|
754
|
+
return localVarFp.checkInPlayers(requestParameters.bookingId, requestParameters.checkInPlayersRequest, options).then((request) => request(axios, basePath));
|
|
755
|
+
},
|
|
756
|
+
/**
|
|
757
|
+
* Récupère le statut détaillé des paiements pour tous les joueurs d\'une réservation. Utile pour l\'interface de check-in.
|
|
758
|
+
* @summary Obtenir le statut des paiements d\'une réservation
|
|
759
|
+
* @param {ManagerBookingsApiGetBookingPaymentStatusRequest} requestParameters Request parameters.
|
|
760
|
+
* @param {*} [options] Override http request option.
|
|
761
|
+
* @throws {RequiredError}
|
|
762
|
+
*/
|
|
763
|
+
getBookingPaymentStatus(requestParameters, options) {
|
|
764
|
+
return localVarFp.getBookingPaymentStatus(requestParameters.bookingId, options).then((request) => request(axios, basePath));
|
|
765
|
+
},
|
|
766
|
+
/**
|
|
767
|
+
* Permet à un gestionnaire d\'annuler n\'importe quelle réservation avec une raison obligatoire. Effectue un remboursement automatique si le paiement a été fait en ligne.
|
|
768
|
+
* @summary Annuler une réservation (gestionnaire)
|
|
769
|
+
* @param {ManagerBookingsApiManagerCancelBookingRequest} requestParameters Request parameters.
|
|
770
|
+
* @param {*} [options] Override http request option.
|
|
771
|
+
* @throws {RequiredError}
|
|
772
|
+
*/
|
|
773
|
+
managerCancelBooking(requestParameters, options) {
|
|
774
|
+
return localVarFp.managerCancelBooking(requestParameters.bookingId, requestParameters.managerCancelBookingRequest, options).then((request) => request(axios, basePath));
|
|
775
|
+
},
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
exports.ManagerBookingsApiFactory = ManagerBookingsApiFactory;
|
|
779
|
+
/**
|
|
780
|
+
* ManagerBookingsApi - object-oriented interface
|
|
781
|
+
* @export
|
|
782
|
+
* @class ManagerBookingsApi
|
|
783
|
+
* @extends {BaseAPI}
|
|
784
|
+
*/
|
|
785
|
+
class ManagerBookingsApi extends base_1.BaseAPI {
|
|
786
|
+
/**
|
|
787
|
+
* Applique les frais de no-show à une réservation. Capture automatiquement les paiements autorisés et charge le créateur pour le montant manquant.
|
|
788
|
+
* @summary Appliquer les frais de no-show
|
|
789
|
+
* @param {ManagerBookingsApiApplyNoShowFeeRequest} requestParameters Request parameters.
|
|
790
|
+
* @param {*} [options] Override http request option.
|
|
791
|
+
* @throws {RequiredError}
|
|
792
|
+
* @memberof ManagerBookingsApi
|
|
793
|
+
*/
|
|
794
|
+
applyNoShowFee(requestParameters, options) {
|
|
795
|
+
return (0, exports.ManagerBookingsApiFp)(this.configuration).applyNoShowFee(requestParameters.bookingId, options).then((request) => request(this.axios, this.basePath));
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Enregistre l\'arrivée et le paiement des joueurs pour une réservation avec paiement sur place. Met à jour le statut des factures.
|
|
799
|
+
* @summary Enregistrer l\'arrivée des joueurs
|
|
800
|
+
* @param {ManagerBookingsApiCheckInPlayersRequest} requestParameters Request parameters.
|
|
801
|
+
* @param {*} [options] Override http request option.
|
|
802
|
+
* @throws {RequiredError}
|
|
803
|
+
* @memberof ManagerBookingsApi
|
|
804
|
+
*/
|
|
805
|
+
checkInPlayers(requestParameters, options) {
|
|
806
|
+
return (0, exports.ManagerBookingsApiFp)(this.configuration).checkInPlayers(requestParameters.bookingId, requestParameters.checkInPlayersRequest, options).then((request) => request(this.axios, this.basePath));
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Récupère le statut détaillé des paiements pour tous les joueurs d\'une réservation. Utile pour l\'interface de check-in.
|
|
810
|
+
* @summary Obtenir le statut des paiements d\'une réservation
|
|
811
|
+
* @param {ManagerBookingsApiGetBookingPaymentStatusRequest} requestParameters Request parameters.
|
|
812
|
+
* @param {*} [options] Override http request option.
|
|
813
|
+
* @throws {RequiredError}
|
|
814
|
+
* @memberof ManagerBookingsApi
|
|
815
|
+
*/
|
|
816
|
+
getBookingPaymentStatus(requestParameters, options) {
|
|
817
|
+
return (0, exports.ManagerBookingsApiFp)(this.configuration).getBookingPaymentStatus(requestParameters.bookingId, options).then((request) => request(this.axios, this.basePath));
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Permet à un gestionnaire d\'annuler n\'importe quelle réservation avec une raison obligatoire. Effectue un remboursement automatique si le paiement a été fait en ligne.
|
|
821
|
+
* @summary Annuler une réservation (gestionnaire)
|
|
822
|
+
* @param {ManagerBookingsApiManagerCancelBookingRequest} requestParameters Request parameters.
|
|
823
|
+
* @param {*} [options] Override http request option.
|
|
824
|
+
* @throws {RequiredError}
|
|
825
|
+
* @memberof ManagerBookingsApi
|
|
826
|
+
*/
|
|
827
|
+
managerCancelBooking(requestParameters, options) {
|
|
828
|
+
return (0, exports.ManagerBookingsApiFp)(this.configuration).managerCancelBooking(requestParameters.bookingId, requestParameters.managerCancelBookingRequest, options).then((request) => request(this.axios, this.basePath));
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
exports.ManagerBookingsApi = ManagerBookingsApi;
|
|
381
832
|
/**
|
|
382
833
|
* ManagerClubCourtsApi - axios parameter creator
|
|
383
834
|
* @export
|