@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
2,510 lines (2,453 loc) • 261 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Pickle Ball API
* API for managing pickle ball games and players
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
import type { RequestArgs } from './base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
/**
*
* @export
* @interface AddClubMemberRequest
*/
export interface AddClubMemberRequest {
/**
*
* @type {string}
* @memberof AddClubMemberRequest
*/
'userId': string;
/**
*
* @type {string}
* @memberof AddClubMemberRequest
*/
'roleId': string;
}
/**
*
* @export
* @interface AddClubMemberResponse
*/
export interface AddClubMemberResponse {
/**
*
* @type {string}
* @memberof AddClubMemberResponse
*/
'message'?: string;
/**
*
* @type {ClubMember}
* @memberof AddClubMemberResponse
*/
'member'?: ClubMember;
}
/**
*
* @export
* @interface ApiErrorResponse
*/
export interface ApiErrorResponse {
/**
*
* @type {string}
* @memberof ApiErrorResponse
*/
'message': string;
/**
*
* @type {string}
* @memberof ApiErrorResponse
*/
'error'?: string;
}
/**
*
* @export
* @interface BlockSlotResponse
*/
export interface BlockSlotResponse {
/**
* Message de confirmation
* @type {string}
* @memberof BlockSlotResponse
*/
'message'?: string;
/**
*
* @type {Slot}
* @memberof BlockSlotResponse
*/
'slot'?: Slot;
}
/**
*
* @export
* @interface Booking
*/
export interface Booking {
/**
*
* @type {string}
* @memberof Booking
*/
'userId': string;
/**
*
* @type {Array<string>}
* @memberof Booking
*/
'playersIds'?: Array<string>;
/**
*
* @type {BookingStatus}
* @memberof Booking
*/
'status': BookingStatus;
/**
*
* @type {StripeStatus}
* @memberof Booking
*/
'stripeStatus': StripeStatus;
/**
*
* @type {string}
* @memberof Booking
*/
'stripePaymentIntentId': string;
/**
*
* @type {number}
* @memberof Booking
*/
'totalPrice': number;
/**
*
* @type {string}
* @memberof Booking
*/
'slotId': string;
}
/**
*
* @export
* @interface BookingResponse
*/
export interface BookingResponse {
/**
*
* @type {Booking}
* @memberof BookingResponse
*/
'booking'?: Booking;
/**
* URL de la facture (pour paiement en ligne)
* @type {string}
* @memberof BookingResponse
*/
'invoiceUrl'?: string;
/**
* Liens de paiement par joueur (pour paiement divisé)
* @type {object}
* @memberof BookingResponse
*/
'paymentLinks'?: object;
/**
* Paiements sur place requis
* @type {Array<object>}
* @memberof BookingResponse
*/
'onsitePayments'?: Array<object>;
/**
* Message de confirmation
* @type {string}
* @memberof BookingResponse
*/
'message'?: string;
}
/**
*
* @export
* @enum {string}
*/
export const BookingStatus = {
Active: 'active',
Inactive: 'inactive'
} as const;
export type BookingStatus = typeof BookingStatus[keyof typeof BookingStatus];
/**
*
* @export
* @interface ChangePasswordRequestBody
*/
export interface ChangePasswordRequestBody {
/**
*
* @type {string}
* @memberof ChangePasswordRequestBody
*/
'currentPassword': string;
/**
*
* @type {string}
* @memberof ChangePasswordRequestBody
*/
'newPassword': string;
}
/**
*
* @export
* @interface ChangePasswordResponse
*/
export interface ChangePasswordResponse {
/**
*
* @type {string}
* @memberof ChangePasswordResponse
*/
'message': string;
}
/**
*
* @export
* @interface Club
*/
export interface Club {
/**
*
* @type {string}
* @memberof Club
*/
'id'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'name': string;
/**
*
* @type {string}
* @memberof Club
*/
'address': string;
/**
*
* @type {string}
* @memberof Club
*/
'city': string;
/**
*
* @type {string}
* @memberof Club
*/
'zipCode': string;
/**
*
* @type {string}
* @memberof Club
*/
'country': string;
/**
*
* @type {string}
* @memberof Club
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'email'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'website'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'description'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'logo'?: string;
/**
*
* @type {boolean}
* @memberof Club
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof Club
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof Club
*/
'updatedAt'?: string;
}
/**
*
* @export
* @interface ClubInfoResponse
*/
export interface ClubInfoResponse {
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'name': string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'address': string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'city': string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'zipCode': string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'country': string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'email'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'website'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'description'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'logo'?: string;
/**
*
* @type {boolean}
* @memberof ClubInfoResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof ClubInfoResponse
*/
'updatedAt'?: string;
}
/**
*
* @export
* @interface ClubListResponse
*/
export interface ClubListResponse {
/**
*
* @type {Array<Club>}
* @memberof ClubListResponse
*/
'clubs'?: Array<Club>;
/**
*
* @type {number}
* @memberof ClubListResponse
*/
'total'?: number;
}
/**
*
* @export
* @interface ClubMember
*/
export interface ClubMember {
/**
*
* @type {string}
* @memberof ClubMember
*/
'id'?: string;
/**
*
* @type {string}
* @memberof ClubMember
*/
'userId'?: string;
/**
*
* @type {string}
* @memberof ClubMember
*/
'clubId'?: string;
/**
*
* @type {string}
* @memberof ClubMember
*/
'roleId'?: string;
/**
*
* @type {string}
* @memberof ClubMember
*/
'joinedAt'?: string;
/**
*
* @type {boolean}
* @memberof ClubMember
*/
'isActive'?: boolean;
/**
*
* @type {UserResponse}
* @memberof ClubMember
*/
'user'?: UserResponse;
/**
*
* @type {ClubRoleResponse}
* @memberof ClubMember
*/
'role'?: ClubRoleResponse;
}
/**
*
* @export
* @interface ClubMembersResponse
*/
export interface ClubMembersResponse {
/**
*
* @type {Array<ClubMember>}
* @memberof ClubMembersResponse
*/
'members'?: Array<ClubMember>;
/**
*
* @type {number}
* @memberof ClubMembersResponse
*/
'total'?: number;
}
/**
*
* @export
* @interface ClubResponse
*/
export interface ClubResponse {
/**
*
* @type {string}
* @memberof ClubResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'name': string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'address': string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'city': string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'zipCode': string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'country': string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'email'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'website'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'description'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'logo'?: string;
/**
*
* @type {boolean}
* @memberof ClubResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof ClubResponse
*/
'updatedAt'?: string;
}
/**
*
* @export
* @interface ClubRole
*/
export interface ClubRole {
/**
* Identifiant unique du rôle dans le club
* @type {string}
* @memberof ClubRole
*/
'id': string;
/**
* Nom du rôle (ex: joueur, coach, admin)
* @type {string}
* @memberof ClubRole
*/
'name': string;
/**
* Description textuelle du rôle
* @type {string}
* @memberof ClubRole
*/
'description': string;
/**
* Liste des permissions associées à ce rôle
* @type {Array<string>}
* @memberof ClubRole
*/
'permissions'?: Array<string>;
/**
* Date de création du rôle
* @type {string}
* @memberof ClubRole
*/
'createdAt': string;
/**
* Date de dernière mise à jour du rôle
* @type {string}
* @memberof ClubRole
*/
'updatedAt': string;
}
/**
*
* @export
* @interface ClubRoleResponse
*/
export interface ClubRoleResponse {
/**
* Identifiant unique du rôle dans le club
* @type {string}
* @memberof ClubRoleResponse
*/
'id': string;
/**
* Nom du rôle (ex: joueur, coach, admin)
* @type {string}
* @memberof ClubRoleResponse
*/
'name': string;
/**
* Description textuelle du rôle
* @type {string}
* @memberof ClubRoleResponse
*/
'description': string;
/**
* Liste des permissions associées à ce rôle
* @type {Array<string>}
* @memberof ClubRoleResponse
*/
'permissions'?: Array<string>;
/**
* Date de création du rôle
* @type {string}
* @memberof ClubRoleResponse
*/
'createdAt': string;
/**
* Date de dernière mise à jour du rôle
* @type {string}
* @memberof ClubRoleResponse
*/
'updatedAt': string;
}
/**
*
* @export
* @interface ClubRolesResponse
*/
export interface ClubRolesResponse {
/**
*
* @type {Array<ClubRoleResponse>}
* @memberof ClubRolesResponse
*/
'roles'?: Array<ClubRoleResponse>;
/**
*
* @type {number}
* @memberof ClubRolesResponse
*/
'total'?: number;
}
/**
*
* @export
* @interface ClubSettings
*/
export interface ClubSettings {
/**
*
* @type {string}
* @memberof ClubSettings
*/
'clubId': string;
/**
*
* @type {string}
* @memberof ClubSettings
*/
'reservationStartTime'?: string;
/**
*
* @type {string}
* @memberof ClubSettings
*/
'reservationEndTime'?: string;
/**
*
* @type {number}
* @memberof ClubSettings
*/
'maxSimultaneousReservations'?: number;
/**
*
* @type {boolean}
* @memberof ClubSettings
*/
'allowWeekendReservations'?: boolean;
}
/**
*
* @export
* @interface Court
*/
export interface Court {
/**
*
* @type {string}
* @memberof Court
*/
'name': string;
/**
*
* @type {CourtStatus}
* @memberof Court
*/
'status': CourtStatus;
/**
*
* @type {string}
* @memberof Court
*/
'comments'?: string;
/**
*
* @type {number}
* @memberof Court
*/
'pricePerSlot': number;
/**
*
* @type {number}
* @memberof Court
*/
'slotDefaultDuration': number;
/**
*
* @type {number}
* @memberof Court
*/
'startTimeInTheDayInMinutes': number;
/**
*
* @type {number}
* @memberof Court
*/
'endTimeInTheDayInMinutes': number;
}
/**
*
* @export
* @interface CourtResponse
*/
export interface CourtResponse {
/**
*
* @type {string}
* @memberof CourtResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'name'?: string;
/**
*
* @type {CourtStatus}
* @memberof CourtResponse
*/
'status'?: CourtStatus;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'comments'?: string;
/**
*
* @type {number}
* @memberof CourtResponse
*/
'pricePerSlot'?: number;
/**
*
* @type {number}
* @memberof CourtResponse
*/
'slotDefaultDuration'?: number;
/**
*
* @type {number}
* @memberof CourtResponse
*/
'startTimeInTheDayInMinutes'?: number;
/**
*
* @type {number}
* @memberof CourtResponse
*/
'endTimeInTheDayInMinutes'?: number;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'clubId'?: string;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'sportId'?: string;
/**
*
* @type {boolean}
* @memberof CourtResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof CourtResponse
*/
'updatedAt'?: string;
}
/**
*
* @export
* @enum {string}
*/
export const CourtStatus = {
Available: 'available',
Unavailable: 'unavailable'
} as const;
export type CourtStatus = typeof CourtStatus[keyof typeof CourtStatus];
/**
*
* @export
* @interface CourtsResponse
*/
export interface CourtsResponse {
/**
*
* @type {Array<CourtResponse>}
* @memberof CourtsResponse
*/
'courts'?: Array<CourtResponse>;
/**
*
* @type {number}
* @memberof CourtsResponse
*/
'total'?: number;
}
/**
*
* @export
* @interface CreateBookingRequest
*/
export interface CreateBookingRequest {
/**
* ID de l\'utilisateur créateur de la réservation
* @type {string}
* @memberof CreateBookingRequest
*/
'userId': string;
/**
* ID du créneau à réserver
* @type {string}
* @memberof CreateBookingRequest
*/
'slotId': string;
/**
* Liste des joueurs avec leurs méthodes de paiement
* @type {Array<PlayerWithPaymentMethod>}
* @memberof CreateBookingRequest
*/
'players': Array<PlayerWithPaymentMethod>;
/**
* Indique si le créateur paie pour tous les joueurs
* @type {boolean}
* @memberof CreateBookingRequest
*/
'isCreatorPayingAll'?: boolean;
/**
*
* @type {PaymentMethod}
* @memberof CreateBookingRequest
*/
'paymentMethod'?: PaymentMethod;
}
/**
*
* @export
* @interface CreateClubRequest
*/
export interface CreateClubRequest {
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'address': string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'city': string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'zipCode': string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'country': string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'email'?: string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'website'?: string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'description'?: string;
/**
*
* @type {string}
* @memberof CreateClubRequest
*/
'logo'?: string;
}
/**
*
* @export
* @interface CreateClubRoleRequestBody
*/
export interface CreateClubRoleRequestBody {
/**
* Nom du rôle à créer (ex: joueur, coach, admin)
* @type {string}
* @memberof CreateClubRoleRequestBody
*/
'name': string;
/**
* Description du rôle
* @type {string}
* @memberof CreateClubRoleRequestBody
*/
'description': string;
/**
* Permissions associées à ce rôle
* @type {Array<string>}
* @memberof CreateClubRoleRequestBody
*/
'permissions'?: Array<string>;
}
/**
*
* @export
* @interface CreateCourtRequest
*/
export interface CreateCourtRequest {
/**
*
* @type {string}
* @memberof CreateCourtRequest
*/
'name': string;
/**
*
* @type {CourtStatus}
* @memberof CreateCourtRequest
*/
'status': CourtStatus;
/**
*
* @type {string}
* @memberof CreateCourtRequest
*/
'comments'?: string;
/**
*
* @type {number}
* @memberof CreateCourtRequest
*/
'pricePerSlot': number;
/**
*
* @type {number}
* @memberof CreateCourtRequest
*/
'slotDefaultDuration': number;
/**
*
* @type {number}
* @memberof CreateCourtRequest
*/
'startTimeInTheDayInMinutes': number;
/**
*
* @type {number}
* @memberof CreateCourtRequest
*/
'endTimeInTheDayInMinutes': number;
/**
*
* @type {string}
* @memberof CreateCourtRequest
*/
'sportId': string;
}
/**
*
* @export
* @interface CreatePriceRequest
*/
export interface CreatePriceRequest {
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
'amount': number;
/**
*
* @type {string}
* @memberof CreatePriceRequest
*/
'currency': string;
/**
*
* @type {string}
* @memberof CreatePriceRequest
*/
'interval': CreatePriceRequestIntervalEnum;
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
'intervalCount'?: number;
}
export const CreatePriceRequestIntervalEnum = {
Day: 'day',
Week: 'week',
Month: 'month',
Year: 'year'
} as const;
export type CreatePriceRequestIntervalEnum = typeof CreatePriceRequestIntervalEnum[keyof typeof CreatePriceRequestIntervalEnum];
/**
*
* @export
* @interface CreateSportRequest
*/
export interface CreateSportRequest {
/**
*
* @type {string}
* @memberof CreateSportRequest
*/
'clubId': string;
/**
*
* @type {string}
* @memberof CreateSportRequest
*/
'key': string;
}
/**
*
* @export
* @interface CreateSubscriptionPlanRequest
*/
export interface CreateSubscriptionPlanRequest {
/**
*
* @type {string}
* @memberof CreateSubscriptionPlanRequest
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateSubscriptionPlanRequest
*/
'description': string;
/**
*
* @type {object}
* @memberof CreateSubscriptionPlanRequest
*/
'metadata'?: object;
}
/**
*
* @export
* @interface DeleteClub200Response
*/
export interface DeleteClub200Response {
/**
*
* @type {string}
* @memberof DeleteClub200Response
*/
'message'?: string;
}
/**
*
* @export
* @interface DeleteClubRole200Response
*/
export interface DeleteClubRole200Response {
/**
*
* @type {string}
* @memberof DeleteClubRole200Response
*/
'message'?: string;
}
/**
*
* @export
* @interface DeleteSlotsByClubInRange200Response
*/
export interface DeleteSlotsByClubInRange200Response {
/**
*
* @type {string}
* @memberof DeleteSlotsByClubInRange200Response
*/
'message'?: string;
}
/**
*
* @export
* @interface GenerateSlotsForNextThreeWeeks201Response
*/
export interface GenerateSlotsForNextThreeWeeks201Response {
/**
*
* @type {string}
* @memberof GenerateSlotsForNextThreeWeeks201Response
*/
'message'?: string;
}
/**
*
* @export
* @interface GetAllSportsRequest
*/
export interface GetAllSportsRequest {
/**
*
* @type {string}
* @memberof GetAllSportsRequest
*/
'clubId'?: string;
}
/**
*
* @export
* @interface GetClubSettingsRequest
*/
export interface GetClubSettingsRequest {
/**
*
* @type {string}
* @memberof GetClubSettingsRequest
*/
'clubId': string;
}
/**
*
* @export
* @interface GetUserRolesInClubs200Response
*/
export interface GetUserRolesInClubs200Response {
/**
*
* @type {Array<ClubRole>}
* @memberof GetUserRolesInClubs200Response
*/
'roles'?: Array<ClubRole>;
}
/**
*
* @export
* @interface LoginRequestBody
*/
export interface LoginRequestBody {
/**
*
* @type {string}
* @memberof LoginRequestBody
*/
'email': string;
/**
*
* @type {string}
* @memberof LoginRequestBody
*/
'password': string;
}
/**
*
* @export
* @interface LoginResponse
*/
export interface LoginResponse {
/**
*
* @type {string}
* @memberof LoginResponse
*/
'token': string;
/**
*
* @type {string}
* @memberof LoginResponse
*/
'refreshToken': string;
/**
*
* @type {number}
* @memberof LoginResponse
*/
'sessionDuration': number;
/**
*
* @type {number}
* @memberof LoginResponse
*/
'sessionEnd': number;
}
/**
* Méthode de paiement
* @export
* @enum {string}
*/
export const PaymentMethod = {
Online: 'online',
Onsite: 'onsite'
} as const;
export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];
/**
*
* @export
* @interface PlayerWithPaymentMethod
*/
export interface PlayerWithPaymentMethod {
/**
* ID du joueur
* @type {string}
* @memberof PlayerWithPaymentMethod
*/
'id': string;
/**
*
* @type {PaymentMethod}
* @memberof PlayerWithPaymentMethod
*/
'paymentMethod': PaymentMethod;
}
/**
*
* @export
* @interface PriceResponse
*/
export interface PriceResponse {
/**
*
* @type {string}
* @memberof PriceResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'stripePriceId'?: string;
/**
*
* @type {number}
* @memberof PriceResponse
*/
'amount'?: number;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'currency'?: string;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'interval'?: PriceResponseIntervalEnum;
/**
*
* @type {number}
* @memberof PriceResponse
*/
'intervalCount'?: number;
/**
*
* @type {boolean}
* @memberof PriceResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'productId'?: string;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof PriceResponse
*/
'updatedAt'?: string;
}
export const PriceResponseIntervalEnum = {
Day: 'day',
Week: 'week',
Month: 'month',
Year: 'year'
} as const;
export type PriceResponseIntervalEnum = typeof PriceResponseIntervalEnum[keyof typeof PriceResponseIntervalEnum];
/**
*
* @export
* @interface RefreshTokenRequestBody
*/
export interface RefreshTokenRequestBody {
/**
*
* @type {string}
* @memberof RefreshTokenRequestBody
*/
'refreshToken': string;
}
/**
*
* @export
* @interface RefreshTokenResponse
*/
export interface RefreshTokenResponse {
/**
*
* @type {string}
* @memberof RefreshTokenResponse
*/
'token': string;
/**
*
* @type {string}
* @memberof RefreshTokenResponse
*/
'refreshToken': string;
/**
*
* @type {number}
* @memberof RefreshTokenResponse
*/
'sessionDuration': number;
/**
*
* @type {number}
* @memberof RefreshTokenResponse
*/
'sessionEnd': number;
}
/**
*
* @export
* @interface RegisterRequestBody
*/
export interface RegisterRequestBody {
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'username'?: string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'firstName': string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'lastName': string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'email': string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'password': string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'level'?: string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'stripeCustomerId'?: string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof RegisterRequestBody
*/
'profilePicture'?: string;
}
/**
*
* @export
* @interface RestoreSubscriptionPlanForClub200Response
*/
export interface RestoreSubscriptionPlanForClub200Response {
/**
*
* @type {string}
* @memberof RestoreSubscriptionPlanForClub200Response
*/
'message'?: string;
}
/**
*
* @export
* @interface Slot
*/
export interface Slot {
/**
*
* @type {string}
* @memberof Slot
*/
'startDate': string;
/**
*
* @type {string}
* @memberof Slot
*/
'endDate': string;
/**
*
* @type {string}
* @memberof Slot
*/
'courtId': string;
}
/**
*
* @export
* @interface SlotException
*/
export interface SlotException {
/**
*
* @type {string}
* @memberof SlotException
*/
'startDate': string;
/**
*
* @type {string}
* @memberof SlotException
*/
'endDate': string;
/**
*
* @type {string}
* @memberof SlotException
*/
'courtId': string;
/**
*
* @type {string}
* @memberof SlotException
*/
'reason': string;
}
/**
*
* @export
* @interface SlotResponse
*/
export interface SlotResponse {
/**
*
* @type {string}
* @memberof SlotResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'startDate'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'endDate'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'courtId'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'clubId'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'sportId'?: string;
/**
*
* @type {boolean}
* @memberof SlotResponse
*/
'isAvailable'?: boolean;
/**
*
* @type {number}
* @memberof SlotResponse
*/
'price'?: number;
/**
*
* @type {CourtResponse}
* @memberof SlotResponse
*/
'court'?: CourtResponse;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof SlotResponse
*/
'updatedAt'?: string;
}
/**
*
* @export
* @interface SlotsResponse
*/
export interface SlotsResponse {
/**
*
* @type {Array<SlotResponse>}
* @memberof SlotsResponse
*/
'slots'?: Array<SlotResponse>;
/**
*
* @type {number}
* @memberof SlotsResponse
*/
'total'?: number;
}
/**
*
* @export
* @interface Sport
*/
export interface Sport {
/**
*
* @type {string}
* @memberof Sport
*/
'_id'?: string;
/**
*
* @type {string}
* @memberof Sport
*/
'key'?: string;
/**
*
* @type {string}
* @memberof Sport
*/
'clubId'?: string;
}
/**
*
* @export
* @interface SportResponse
*/
export interface SportResponse {
/**
*
* @type {string}
* @memberof SportResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof SportResponse
*/
'key'?: string;
/**
*
* @type {string}
* @memberof SportResponse
*/
'name'?: string;
/**
*
* @type {string}
* @memberof SportResponse
*/
'description'?: string;
/**
*
* @type {string}
* @memberof SportResponse
*/
'clubId'?: string;
/**
*
* @type {boolean}
* @memberof SportResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof SportResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof SportResponse
*/
'updatedAt'?: string;
}
/**
*
* @export
* @interface SportsResponse
*/
export interface SportsResponse {
/**
*
* @type {Array<SportResponse>}
* @memberof SportsResponse
*/
'sports'?: Array<SportResponse>;
/**
*
* @type {number}
* @memberof SportsResponse
*/
'total'?: number;
}
/**
*
* @export
* @enum {string}
*/
export const StripeStatus = {
Pending: 'pending',
Paid: 'paid',
Failed: 'failed',
Refunded: 'refunded',
Canceled: 'canceled'
} as const;
export type StripeStatus = typeof StripeStatus[keyof typeof StripeStatus];
/**
*
* @export
* @interface SubscriptionPlan
*/
export interface SubscriptionPlan {
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'id'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'stripeProductId'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'name'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'description'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'clubId'?: string;
/**
*
* @type {boolean}
* @memberof SubscriptionPlan
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlan
*/
'updatedAt'?: string;
/**
*
* @type {Array<PriceResponse>}
* @memberof SubscriptionPlan
*/
'prices'?: Array<PriceResponse>;
}
/**
*
* @export
* @interface SubscriptionPlanResponse
*/
export interface SubscriptionPlanResponse {
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'id'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'stripeProductId'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'name'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'description'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'clubId'?: string;
/**
*
* @type {boolean}
* @memberof SubscriptionPlanResponse
*/
'isActive'?: boolean;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'createdAt'?: string;
/**
*
* @type {string}
* @memberof SubscriptionPlanResponse
*/
'updatedAt'?: string;
/**
*
* @type {Array<PriceResponse>}
* @memberof SubscriptionPlanResponse
*/
'prices'?: Array<PriceResponse>;
}
/**
*
* @export
* @interface UpdateClubRequest
*/
export interface UpdateClubRequest {
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'name'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'address'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'city'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'zipCode'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'country'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'email'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'website'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'description'?: string;
/**
*
* @type {string}
* @memberof UpdateClubRequest
*/
'logo'?: string;
/**
*
* @type {boolean}
* @memberof UpdateClubRequest
*/
'isActive'?: boolean;
}
/**
*
* @export
* @interface UpdateClubRoleRequestBody
*/
export interface UpdateClubRoleRequestBody {
/**
* Nouveau nom du rôle (optionnel)
* @type {string}
* @memberof UpdateClubRoleRequestBody
*/
'name'?: string;
/**
* Nouvelle description du rôle (optionnel)
* @type {string}
* @memberof UpdateClubRoleRequestBody
*/
'description'?: string;
/**
* Nouvelle liste de permissions (optionnel)
* @type {Array<string>}
* @memberof UpdateClubRoleRequestBody
*/
'permissions'?: Array<string>;
}
/**
*
* @export
* @interface UpdateSportRequest
*/
export interface UpdateSportRequest {
/**
*
* @type {string}
* @memberof UpdateSportRequest
*/
'key'?: string;
}
/**
*
* @export
* @interface UpdateSubscriptionPlanRequest
*/
export interface UpdateSubscriptionPlanRequest {
/**
*
* @type {string}
* @memberof UpdateSubscriptionPlanRequest
*/
'name'?: string;
/**
*
* @type {string}
* @memberof UpdateSubscriptionPlanRequest
*/
'description'?: string;
/**
*
* @type {object}
* @memberof UpdateSubscriptionPlanRequest
*/
'metadata'?: object;
}
/**
*
* @export
* @interface UpdateSubscriptionPlanResponse
*/
export interface UpdateSubscriptionPlanResponse {
/**
*
* @type {string}
* @memberof UpdateSubscriptionPlanResponse
*/
'message'?: string;
/**
*
* @type {SubscriptionPlanResponse}
* @memberof UpdateSubscriptionPlanResponse
*/
'plan'?: SubscriptionPlanResponse;
}
/**
*
* @export
* @interface UpdateUserRequestBody
*/
export interface UpdateUserRequestBody {
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'username'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'firstName'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'lastName'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'email'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'profilePicture'?: string;
/**
*
* @type {string}
* @memberof UpdateUserRequestBody
*/
'level'?: string;
}
/**
*
* @export
* @interface User
*/
export interface User {
/**
*
* @type {string}
* @memberof User
*/
'username'?: string;
/**
*
* @type {string}
* @memberof User
*/
'firstName': string;
/**
*
* @type {string}
* @memberof User
*/
'lastName': string;
/**
*
* @type {string}
* @memberof User
*/
'email': string;
/**
*
* @type {boolean}
* @memberof User
*/
'isAccountVerified'?: boolean;
/**
*
* @type {string}
* @memberof User
*/
'level'?: string;
/**
*
* @type {string}
* @memberof User
*/
'stripeCustomerId'?: string;
/**
*
* @type {string}
* @memberof User
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof User
*/
'password': string;
/**
*
* @type {string}
* @memberof User
*/
'profilePicture'?: string;
/**
*
* @type {boolean}
* @memberof User
*/
'isAdmin'?: boolean;
}
/**
*
* @export
* @interface UserResponse
*/
export interface UserResponse {
/**
*
* @type {string}
* @memberof UserResponse
*/
'id': string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'username'?: string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'firstName': string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'lastName': string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'email': string;
/**
*
* @type {boolean}
* @memberof UserResponse
*/
'isAccountVerified': boolean;
/**
*
* @type {string}
* @memberof UserResponse
*/
'level'?: string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'stripeCustomerId'?: string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'phone'?: string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'profilePicture'?: string;
/**
*
* @type {boolean}
* @memberof UserResponse
*/
'isAdmin': boolean;
/**
*
* @type {string}
* @memberof UserResponse
*/
'createdAt': string;
/**
*
* @type {string}
* @memberof UserResponse
*/
'updatedAt': string;
}
/**
* BookingsApi - axios parameter creator
* @export
*/
export const BookingsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
* @summary Créer une réservation
* @param {CreateBookingRequest} createBookingRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
bookingsPost: async (createBookingRequest: CreateBookingRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'createBookingRequest' is not null or undefined
assertParamExists('bookingsPost', 'createBookingRequest', createBookingRequest)
const localVarPath = `/bookings`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createBookingRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
* @summary Bloquer un créneau
* @param {string} slotId ID MongoDB du créneau à bloquer
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
bookingsPreBookSlotIdPatch: async (slotId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'slotId' is not null or undefined
assertParamExists('bookingsPreBookSlotIdPatch', 'slotId', slotId)
const localVarPath = `/bookings/pre-book/{slotId}`
.replace(`{${"slotId"}}`, encodeURIComponent(String(slotId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* BookingsApi - functional programming interface
* @export
*/
export const BookingsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = BookingsApiAxiosParamCreator(configuration)
return {
/**
* Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
* @summary Créer une réservation
* @param {CreateBookingRequest} createBookingRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async bookingsPost(createBookingRequest: CreateBookingRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BookingResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingsPost(createBookingRequest, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BookingsApi.bookingsPost']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
* @summary Bloquer un créneau
* @param {string} slotId ID MongoDB du créneau à bloquer
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async bookingsPreBookSlotIdPatch(slotId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BlockSlotResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.bookingsPreBookSlotIdPatch(slotId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BookingsApi.bookingsPreBookSlotIdPatch']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* BookingsApi - factory interface
* @export
*/
export const BookingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = BookingsApiFp(configuration)
return {
/**
* Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
* @summary Créer une réservation
* @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
bookingsPost(requestParameters: BookingsApiBookingsPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<BookingResponse> {
return localVarFp.bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(axios, basePath));
},
/**
* Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
* @summary Bloquer un créneau
* @param {BookingsApiBookingsPreBookSlotIdPatchRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
bookingsPreBookSlotIdPatch(requestParameters: BookingsApiBookingsPreBookSlotIdPatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<BlockSlotResponse> {
return localVarFp.bookingsPreBookSlotIdPatch(requestParameters.slotId, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for bookingsPost operation in BookingsApi.
* @export
* @interface BookingsApiBookingsPostRequest
*/
export interface BookingsApiBookingsPostRequest {
/**
*
* @type {CreateBookingRequest}
* @memberof BookingsApiBookingsPost
*/
readonly createBookingRequest: CreateBookingRequest
}
/**
* Request parameters for bookingsPreBookSlotIdPatch operation in BookingsApi.
* @export
* @interface BookingsApiBookingsPreBookSlotIdPatchRequest
*/
export interface BookingsApiBookingsPreBookSlotIdPatchRequest {
/**
* ID MongoDB du créneau à bloquer
* @type {string}
* @memberof BookingsApiBookingsPreBookSlotIdPatch
*/
readonly slotId: string
}
/**
* BookingsApi - object-oriented interface
* @export
* @class BookingsApi
* @extends {BaseAPI}
*/
export class BookingsApi extends BaseAPI {
/**
* Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
* @summary Créer une réservation
* @param {BookingsApiBookingsPostRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BookingsApi
*/
public bookingsPost(requestParameters: BookingsApiBookingsPostRequest, options?: RawAxiosRequestConfig) {
return BookingsApiFp(this.configuration).bookingsPost(requestParameters.createBookingRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
* Bloque temporairement un créneau pour éviter les réservations simultanées pendant le processus de réservation
* @summary Bloqu