@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
858 lines (569 loc) • 22.9 kB
Markdown
# EventsApi
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**checkTeamNameAvailability**](#checkteamnameavailability) | **GET** /api/events/{eventId}/team-name-availability | |
|[**estimateEventPrice**](#estimateeventprice) | **POST** /api/events/{eventId}/estimate-price | |
|[**estimateOpenEventBookingJoinPrice**](#estimateopeneventbookingjoinprice) | **GET** /api/events/{eventBookingId}/open/estimate | |
|[**getComingEvent**](#getcomingevent) | **GET** /api/events/coming | |
|[**getEventById**](#geteventbyid) | **GET** /api/events/{eventId} | |
|[**getEventDetailById**](#geteventdetailbyid) | **GET** /api/events/{eventId}/detail | |
|[**getOpenEventBookingJoinPrice**](#getopeneventbookingjoinprice) | **GET** /api/events/{eventBookingId}/open/join-price | |
|[**getOpenEventBookings**](#getopeneventbookings) | **GET** /api/events/open | |
|[**getOpenEventBookingsBySport**](#getopeneventbookingsbysport) | **GET** /api/events/open/by-sport | |
|[**getPublishedEventsByClubId**](#getpublishedeventsbyclubid) | **GET** /api/events | |
|[**joinEvent**](#joinevent) | **POST** /api/events/{eventId}/join | |
|[**joinOpenEventBooking**](#joinopeneventbooking) | **POST** /api/events/{eventBookingId}/open/join | |
|[**leaveEvent**](#leaveevent) | **DELETE** /api/events/{eventId}/leave | |
|[**leaveOpenEventBooking**](#leaveopeneventbooking) | **DELETE** /api/events/{eventBookingId}/open/leave | |
|[**respondToEventBookingInvitation**](#respondtoeventbookinginvitation) | **POST** /api/events/{eventBookingId}/respond-invitation | |
# **checkTeamNameAvailability**
> CheckTeamNameAvailability200Response checkTeamNameAvailability()
Check team name availability for TEAM participation events
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
let teamName: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.checkTeamNameAvailability(
eventId,
teamName
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | | defaults to undefined|
| **teamName** | [**string**] | | (optional) defaults to undefined|
### Return type
**CheckTeamNameAvailability200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Team name availability | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **estimateEventPrice**
> EstimateEventPriceResponse estimateEventPrice(estimateEventPriceRequest)
Estime le prix de participation à un événement pour une liste de joueurs
### Example
```typescript
import {
EventsApi,
Configuration,
EstimateEventPriceRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
let estimateEventPriceRequest: EstimateEventPriceRequest; //
const { status, data } = await apiInstance.estimateEventPrice(
eventId,
estimateEventPriceRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **estimateEventPriceRequest** | **EstimateEventPriceRequest**| | |
| **eventId** | [**string**] | | defaults to undefined|
### Return type
**EstimateEventPriceResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Prix estimé pour l\'événement | - |
|**400** | Requête invalide | - |
|**404** | Événement introuvable | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **estimateOpenEventBookingJoinPrice**
> EstimateOpenEventBookingJoinPrice200Response estimateOpenEventBookingJoinPrice()
Estimer le prix pour rejoindre un événement ouvert
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventBookingId: string; // (default to undefined)
let creditToUseInCents: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.estimateOpenEventBookingJoinPrice(
eventBookingId,
creditToUseInCents
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventBookingId** | [**string**] | | defaults to undefined|
| **creditToUseInCents** | [**number**] | | (optional) defaults to undefined|
### Return type
**EstimateOpenEventBookingJoinPrice200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Estimation du prix calculée | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getComingEvent**
> ComingEventsPageResponse getComingEvent()
Get upcoming events for a club with pagination (max 10 per page)
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let clubId: string; // (optional) (default to undefined)
let page: number; // (optional) (default to undefined)
const { status, data } = await apiInstance.getComingEvent(
clubId,
page
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
### Return type
**ComingEventsPageResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List of upcoming events | - |
|**400** | Bad Request | - |
|**401** | Unauthorized | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getEventById**
> PublishEventResponse getEventById()
Get a specific event by ID
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
let userId: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.getEventById(
eventId,
userId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | | defaults to undefined|
| **userId** | [**string**] | | (optional) defaults to undefined|
### Return type
**PublishEventResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Event details | - |
|**404** | Not Found | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getEventDetailById**
> EventDetailResponse getEventDetailById()
Get detailed event information for a user
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
const { status, data } = await apiInstance.getEventDetailById(
eventId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | | defaults to undefined|
### Return type
**EventDetailResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Event detail | - |
|**401** | Unauthorized | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getOpenEventBookingJoinPrice**
> GetOpenEventBookingJoinPrice200Response getOpenEventBookingJoinPrice()
Estimer simplement le prix à payer pour rejoindre un événement ouvert
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventBookingId: string; // (default to undefined)
const { status, data } = await apiInstance.getOpenEventBookingJoinPrice(
eventBookingId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**GetOpenEventBookingJoinPrice200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Prix à payer calculé | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getOpenEventBookings**
> GetOpenEventBookings200Response getOpenEventBookings()
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let clubId: string; // (optional) (default to undefined)
let eventId: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.getOpenEventBookings(
clubId,
eventId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **eventId** | [**string**] | | (optional) defaults to undefined|
### Return type
**GetOpenEventBookings200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List of open event bookings | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getOpenEventBookingsBySport**
> GetOpenEventBookingsBySport200Response getOpenEventBookingsBySport()
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let clubId: string; // (optional) (default to undefined)
let sportId: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.getOpenEventBookingsBySport(
clubId,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **sportId** | [**string**] | | (optional) defaults to undefined|
### Return type
**GetOpenEventBookingsBySport200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List of open event bookings filtered by sport | - |
|**400** | Bad Request | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getPublishedEventsByClubId**
> EventsListResponse getPublishedEventsByClubId()
Get all published events for a club
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let clubId: string; // (optional) (default to undefined)
let visibilityType: 'public' | 'private' | 'invitation'; // (optional) (default to undefined)
let type: 'event' | 'closure'; // (optional) (default to undefined)
let sportId: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.getPublishedEventsByClubId(
clubId,
visibilityType,
type,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **visibilityType** | [**'public' | 'private' | 'invitation'**]**Array<'public' | 'private' | 'invitation'>** | | (optional) defaults to undefined|
| **type** | [**'event' | 'closure'**]**Array<'event' | 'closure'>** | | (optional) defaults to undefined|
| **sportId** | [**string**] | | (optional) defaults to undefined|
### Return type
**EventsListResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List of published events | - |
|**400** | Bad Request | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **joinEvent**
> JoinEventResponse joinEvent(joinEventRequest)
Join an event (user)
### Example
```typescript
import {
EventsApi,
Configuration,
JoinEventRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
let joinEventRequest: JoinEventRequest; //
const { status, data } = await apiInstance.joinEvent(
eventId,
joinEventRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **joinEventRequest** | **JoinEventRequest**| | |
| **eventId** | [**string**] | | defaults to undefined|
### Return type
**JoinEventResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successfully joined event | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **joinOpenEventBooking**
> JoinOpenEventResponse joinOpenEventBooking(joinOpenEventBookingRequest)
### Example
```typescript
import {
EventsApi,
Configuration,
JoinOpenEventBookingRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventBookingId: string; // (default to undefined)
let joinOpenEventBookingRequest: JoinOpenEventBookingRequest; //
const { status, data } = await apiInstance.joinOpenEventBooking(
eventBookingId,
joinOpenEventBookingRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **joinOpenEventBookingRequest** | **JoinOpenEventBookingRequest**| | |
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**JoinOpenEventResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Joined open event booking | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **leaveEvent**
> JoinEventResponse leaveEvent()
Leave an event (user)
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventId: string; // (default to undefined)
const { status, data } = await apiInstance.leaveEvent(
eventId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | | defaults to undefined|
### Return type
**JoinEventResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successfully left event | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **leaveOpenEventBooking**
> LeaveEventWaitList200Response leaveOpenEventBooking()
### Example
```typescript
import {
EventsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventBookingId: string; // (default to undefined)
const { status, data } = await apiInstance.leaveOpenEventBooking(
eventBookingId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**LeaveEventWaitList200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Left open event booking | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **respondToEventBookingInvitation**
> RespondToEventBookingInvitation200Response respondToEventBookingInvitation(respondToEventBookingInvitationRequest)
Répondre à une invitation d\'EventBooking (accepter ou refuser)
### Example
```typescript
import {
EventsApi,
Configuration,
RespondToEventBookingInvitationRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsApi(configuration);
let eventBookingId: string; // (default to undefined)
let respondToEventBookingInvitationRequest: RespondToEventBookingInvitationRequest; //
const { status, data } = await apiInstance.respondToEventBookingInvitation(
eventBookingId,
respondToEventBookingInvitationRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **respondToEventBookingInvitationRequest** | **RespondToEventBookingInvitationRequest**| | |
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**RespondToEventBookingInvitation200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successfully responded to event booking invitation | - |
|**400** | Bad Request | - |
|**404** | Not Found | - |
|**500** | Server Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)