@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
643 lines (436 loc) • 19 kB
Markdown
# EventsStaffApi
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**cancelEventRegistrationAsStaff**](#canceleventregistrationasstaff) | **POST** /api/events/staff/{eventId}/bookings/{eventBookingId}/cancel | |
|[**checkInEventParticipants**](#checkineventparticipants) | **POST** /api/events/{eventBookingId}/check-in | |
|[**getDailyEvents**](#getdailyevents) | **GET** /api/events/calendar/daily | |
|[**getDraftEventsByClub**](#getdrafteventsbyclub) | **GET** /api/events/staff/getEvents/drafts | |
|[**getEventByIdForStaff**](#geteventbyidforstaff) | **GET** /api/events/staff/{eventId} | |
|[**getEventSeriesForStaff**](#geteventseriesforstaff) | **GET** /api/events/staff/series/{seriesId} | |
|[**getMonthlyEvents**](#getmonthlyevents) | **GET** /api/events/calendar/monthly | |
|[**getPastEventsByClub**](#getpasteventsbyclub) | **GET** /api/events/staff/getEvents/past | |
|[**getUpcomingEventsByClub**](#getupcomingeventsbyclub) | **GET** /api/events/staff/getEvents/upcoming | |
|[**getWeeklyEvents**](#getweeklyevents) | **GET** /api/events/calendar/weekly | |
|[**registerPlayerToEventAsStaff**](#registerplayertoeventasstaff) | **POST** /api/events/staff/{eventId}/register-player | |
# **cancelEventRegistrationAsStaff**
> StaffCancelEventRegistrationResponse cancelEventRegistrationAsStaff()
Annuler une inscription à un événement depuis l\'espace staff et rembourser automatiquement si nécessaire.
### Example
```typescript
import {
EventsStaffApi,
Configuration,
StaffCancelEventRegistrationRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let eventId: string; // (default to undefined)
let eventBookingId: string; // (default to undefined)
let staffCancelEventRegistrationRequest: StaffCancelEventRegistrationRequest; // (optional)
const { status, data } = await apiInstance.cancelEventRegistrationAsStaff(
eventId,
eventBookingId,
staffCancelEventRegistrationRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **staffCancelEventRegistrationRequest** | **StaffCancelEventRegistrationRequest**| | |
| **eventId** | [**string**] | | defaults to undefined|
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**StaffCancelEventRegistrationResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Inscription annulée | - |
|**400** | Requête invalide | - |
|**404** | Événement ou inscription 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)
# **checkInEventParticipants**
> CheckInEventParticipants200Response checkInEventParticipants(checkInEventParticipantsRequest)
Check-in des participants d\'un EventBooking (clubs avec paiements)
### Example
```typescript
import {
EventsStaffApi,
Configuration,
CheckInEventParticipantsRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let eventBookingId: string; // (default to undefined)
let checkInEventParticipantsRequest: CheckInEventParticipantsRequest; //
const { status, data } = await apiInstance.checkInEventParticipants(
eventBookingId,
checkInEventParticipantsRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **checkInEventParticipantsRequest** | **CheckInEventParticipantsRequest**| | |
| **eventBookingId** | [**string**] | | defaults to undefined|
### Return type
**CheckInEventParticipants200Response**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Check-in effectué avec succès | - |
|**400** | Requête invalide | - |
|**404** | EventBooking non trouvé | - |
|**500** | Erreur serveur | - |
[[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)
# **getDailyEvents**
> EventsListResponse getDailyEvents()
Get events for the day view (entire week)
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let clubId: string; // (optional) (default to undefined)
let date: 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.getDailyEvents(
clubId,
date,
visibilityType,
type,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **date** | [**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
[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 events for the daily view | - |
|**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)
# **getDraftEventsByClub**
> StaffEventsPageResponse getDraftEventsByClub()
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
const { status, data } = await apiInstance.getDraftEventsByClub();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**StaffEventsPageResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Draft 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)
# **getEventByIdForStaff**
> StaffEventDetailResponse getEventByIdForStaff()
Get a specific event by ID (staff)
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let eventId: string; // (default to undefined)
const { status, data } = await apiInstance.getEventByIdForStaff(
eventId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | | defaults to undefined|
### Return type
**StaffEventDetailResponse**
### 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 details | - |
|**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)
# **getEventSeriesForStaff**
> StaffEventSeriesResponse getEventSeriesForStaff()
Get all occurrences for a staff event series
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let seriesId: string; // (default to undefined)
let page: number; // (optional) (default to undefined)
let limit: number; // (optional) (default to undefined)
let status: 'all' | 'upcoming' | 'past' | 'drafts'; // (optional) (default to undefined)
const { status, data } = await apiInstance.getEventSeriesForStaff(
seriesId,
page,
limit,
status
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **seriesId** | [**string**] | | defaults to undefined|
| **page** | [**number**] | | (optional) defaults to undefined|
| **limit** | [**number**] | | (optional) defaults to undefined|
| **status** | [**'all' | 'upcoming' | 'past' | 'drafts'**]**Array<'all' | 'upcoming' | 'past' | 'drafts'>** | | (optional) defaults to undefined|
### Return type
**StaffEventSeriesResponse**
### 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 series details | - |
|**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)
# **getMonthlyEvents**
> EventsListResponse getMonthlyEvents()
Get events for the entire month view (including recurring occurrences)
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let clubId: string; // (optional) (default to undefined)
let date: 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.getMonthlyEvents(
clubId,
date,
visibilityType,
type,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **date** | [**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
[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 events for the selected month | - |
|**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)
# **getPastEventsByClub**
> StaffEventsPageResponse getPastEventsByClub()
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
const { status, data } = await apiInstance.getPastEventsByClub();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**StaffEventsPageResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Past 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)
# **getUpcomingEventsByClub**
> StaffEventsPageResponse getUpcomingEventsByClub()
// Use service to validate booking openness, team participation, and capacity const { event, booking: eb } = await this.eventService.joinEventBooking( eventBookingId, userId );
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
const { status, data } = await apiInstance.getUpcomingEventsByClub();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**StaffEventsPageResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | 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)
# **getWeeklyEvents**
> EventsListResponse getWeeklyEvents()
Get events for the week view (30 day sliding window)
### Example
```typescript
import {
EventsStaffApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let clubId: string; // (optional) (default to undefined)
let date: 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.getWeeklyEvents(
clubId,
date,
visibilityType,
type,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | (optional) defaults to undefined|
| **date** | [**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
[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 events for the weekly view | - |
|**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)
# **registerPlayerToEventAsStaff**
> JoinEventResponse registerPlayerToEventAsStaff(staffRegisterPlayerToEventRequest)
Inscrire un joueur existant à un événement depuis l\'espace staff Le paiement est automatiquement positionné en paiement sur place.
### Example
```typescript
import {
EventsStaffApi,
Configuration,
StaffRegisterPlayerToEventRequest
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new EventsStaffApi(configuration);
let eventId: string; // (default to undefined)
let staffRegisterPlayerToEventRequest: StaffRegisterPlayerToEventRequest; //
const { status, data } = await apiInstance.registerPlayerToEventAsStaff(
eventId,
staffRegisterPlayerToEventRequest
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **staffRegisterPlayerToEventRequest** | **StaffRegisterPlayerToEventRequest**| | |
| **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** | Joueur inscrit avec paiement sur place | - |
|**400** | Requête invalide | - |
|**404** | Événement ou joueur 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)