@tennac-booking/sdk
Version:
OpenAPI client for @tennac-booking/sdk
958 lines (620 loc) • 24.2 kB
Markdown
# ClubsApi
All URIs are relative to *http://localhost*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getActiveClubs**](#getactiveclubs) | **GET** /api/clubs/active | |
|[**getAllClubs**](#getallclubs) | **GET** /api/clubs | |
|[**getAvailableSlotAndMultiSlotsBySportsAndDay**](#getavailableslotandmultislotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day}/multi | |
|[**getAvailableSlotsBySports**](#getavailableslotsbysports) | **GET** /api/clubs/{id}/sports/{sportId}/slots | |
|[**getAvailableSlotsBySportsAndDay**](#getavailableslotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day} | |
|[**getAvailableSlotsDaysByClubById**](#getavailableslotsdaysbyclubbyid) | **GET** /api/clubs/{clubID}/availableSlotsDays | |
|[**getClubInfo**](#getclubinfo) | **GET** /api/clubs/info | |
|[**getClubMetadata**](#getclubmetadata) | **GET** /api/clubs/{clubId}/metadata | |
|[**getClubPageInfo**](#getclubpageinfo) | **GET** /api/clubs/club-page/{clubId} | |
|[**getClubTimezone**](#getclubtimezone) | **GET** /api/clubs/{id}/timezone | |
|[**getClubUsersById**](#getclubusersbyid) | **GET** /api/clubs/{id}/users | |
|[**getClubsWithVerificationDomains**](#getclubswithverificationdomains) | **GET** /api/clubs/verification-domains | |
|[**getCourtsByClubAndSportById**](#getcourtsbyclubandsportbyid) | **GET** /api/clubs/{id}/sports/{sportId}/courts | |
|[**getPublicClubInfo**](#getpublicclubinfo) | **GET** /api/clubs/clubInfo/{clubId} | |
|[**getPublishedActualities**](#getpublishedactualities) | **GET** /api/clubs/{id}/actualities | |
|[**getSlotsByClubById**](#getslotsbyclubbyid) | **GET** /api/clubs/{id}/slots | |
|[**getSportsByClubById**](#getsportsbyclubbyid) | **GET** /api/clubs/{id}/sports | |
|[**refreshOnboardingLink**](#refreshonboardinglink) | **GET** /api/clubs/onboarding/refresh | |
# **getActiveClubs**
> Array<PartialClubActiveResponse> getActiveClubs()
Récupère la liste des clubs actifs publics Authentification optionnelle : si authentifié, retourne aussi les clubs vérifiés
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
const { status, data } = await apiInstance.getActiveClubs();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**Array<PartialClubActiveResponse>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des clubs actifs | - |
|**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)
# **getAllClubs**
> Array<ClubResponse> getAllClubs()
Récupère la liste de tous les clubs
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
const { status, data } = await apiInstance.getAllClubs();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**Array<ClubResponse>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des clubs | - |
|**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)
# **getAvailableSlotAndMultiSlotsBySportsAndDay**
> GetAvailableSlotsBySportsAndDay200Response getAvailableSlotAndMultiSlotsBySportsAndDay()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
let sportId: string; // (default to undefined)
let day: string; // (default to undefined)
let excludePastCancellationSlots: boolean; // (optional) (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotAndMultiSlotsBySportsAndDay(
id,
sportId,
day,
excludePastCancellationSlots
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
| **sportId** | [**string**] | | defaults to undefined|
| **day** | [**string**] | | defaults to undefined|
| **excludePastCancellationSlots** | [**boolean**] | | (optional) defaults to undefined|
### Return type
**GetAvailableSlotsBySportsAndDay200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Available multi-slots by sport and day | - |
[[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)
# **getAvailableSlotsBySports**
> GetAvailableSlotsBySports200Response getAvailableSlotsBySports()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
let sportId: string; // (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotsBySports(
id,
sportId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
| **sportId** | [**string**] | | defaults to undefined|
### Return type
**GetAvailableSlotsBySports200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Available slots by sport | - |
[[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)
# **getAvailableSlotsBySportsAndDay**
> GetAvailableSlotsBySportsAndDay200Response getAvailableSlotsBySportsAndDay()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
let sportId: string; // (default to undefined)
let day: string; // (default to undefined)
let excludePastCancellationSlots: boolean; // (optional) (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotsBySportsAndDay(
id,
sportId,
day,
excludePastCancellationSlots
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
| **sportId** | [**string**] | | defaults to undefined|
| **day** | [**string**] | | defaults to undefined|
| **excludePastCancellationSlots** | [**boolean**] | | (optional) defaults to undefined|
### Return type
**GetAvailableSlotsBySportsAndDay200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Available slots by sport and day | - |
[[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)
# **getAvailableSlotsDaysByClubById**
> GetAvailableSlotsDaysByClubById200Response getAvailableSlotsDaysByClubById()
reference to artillery tests
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let clubID: string; // (default to undefined)
const { status, data } = await apiInstance.getAvailableSlotsDaysByClubById(
clubID
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubID** | [**string**] | | defaults to undefined|
### Return type
**GetAvailableSlotsDaysByClubById200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Available slots days | - |
[[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)
# **getClubInfo**
> ClubResponse getClubInfo()
Récupère les informations d\'un club spécifique
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
const { status, data } = await apiInstance.getClubInfo();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**ClubResponse**
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Informations du club | - |
|**404** | Club non trouvé | - |
|**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)
# **getClubMetadata**
> ClubMetadataResponse getClubMetadata()
Récupère les métadonnées publiques d\'un club
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let clubId: string; // (default to undefined)
const { status, data } = await apiInstance.getClubMetadata(
clubId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | defaults to undefined|
### Return type
**ClubMetadataResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Métadonnées publiques du club | - |
|**400** | Bad Request | - |
|**404** | Club non trouvé | - |
|**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)
# **getClubPageInfo**
> ClubPageResponse getClubPageInfo()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let clubId: string; // (default to undefined)
const { status, data } = await apiInstance.getClubPageInfo(
clubId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | defaults to undefined|
### Return type
**ClubPageResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Informations de la page club | - |
|**400** | Bad Request | - |
|**404** | Club non trouvé | - |
|**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)
# **getClubTimezone**
> GetClubTimezone200Response getClubTimezone()
Récupère le fuseau horaire d\'un club
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
const { status, data } = await apiInstance.getClubTimezone(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
### Return type
**GetClubTimezone200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Fuseau horaire du club | - |
|**400** | Bad Request | - |
|**404** | Club non trouvé | - |
[[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)
# **getClubUsersById**
> GetClubUsersById200Response getClubUsersById()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
const { status, data } = await apiInstance.getClubUsersById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
### Return type
**GetClubUsersById200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Utilisateurs du club récupérés | - |
|**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)
# **getClubsWithVerificationDomains**
> Array<GetClubsWithVerificationDomains200ResponseInner> getClubsWithVerificationDomains()
Récupère la liste des clubs qui ont des domaines d\'email pour vérification Accessible sans token
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
const { status, data } = await apiInstance.getClubsWithVerificationDomains();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**Array<GetClubsWithVerificationDomains200ResponseInner>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des clubs avec domaines de vérification | - |
|**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)
# **getCourtsByClubAndSportById**
> GetCourtsByClubAndSportById200Response getCourtsByClubAndSportById()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
let sportId: string; // (default to undefined)
let startDate: string; // (optional) (default to undefined)
let endDate: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.getCourtsByClubAndSportById(
id,
sportId,
startDate,
endDate
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
| **sportId** | [**string**] | | defaults to undefined|
| **startDate** | [**string**] | | (optional) defaults to undefined|
| **endDate** | [**string**] | | (optional) defaults to undefined|
### Return type
**GetCourtsByClubAndSportById200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Terrains par club et sport | - |
[[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)
# **getPublicClubInfo**
> ClubResponse getPublicClubInfo()
Récupère les informations publiques d\'un club en fonction de son ID
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let clubId: string; // (default to undefined)
const { status, data } = await apiInstance.getPublicClubInfo(
clubId
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **clubId** | [**string**] | | defaults to undefined|
### Return type
**ClubResponse**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Informations du club | - |
|**400** | clubId invalide | - |
|**404** | Club 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)
# **getPublishedActualities**
> GetPublishedActualities200Response getPublishedActualities()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
const { status, data } = await apiInstance.getPublishedActualities(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
### Return type
**GetPublishedActualities200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Actualités publiées | - |
[[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)
# **getSlotsByClubById**
> GetSlotsByClubById200Response getSlotsByClubById()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
const { status, data } = await apiInstance.getSlotsByClubById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
### Return type
**GetSlotsByClubById200Response**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Slots du club | - |
[[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)
# **getSportsByClubById**
> Array<SportResponse> getSportsByClubById()
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let id: string; // (default to undefined)
const { status, data } = await apiInstance.getSportsByClubById(
id
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | | defaults to undefined|
### Return type
**Array<SportResponse>**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Liste des sports du club | - |
[[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)
# **refreshOnboardingLink**
> refreshOnboardingLink()
Rafraîchit le lien d\'onboarding Stripe Connect pour un club Cet endpoint est appelé automatiquement par Stripe lorsque le lien d\'onboarding expire
### Example
```typescript
import {
ClubsApi,
Configuration
} from '@tennac-booking/sdk';
const configuration = new Configuration();
const apiInstance = new ClubsApi(configuration);
let account: string; // (optional) (default to undefined)
const { status, data } = await apiInstance.refreshOnboardingLink(
account
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **account** | [**string**] | | (optional) defaults to undefined|
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**303** | Redirection vers le nouveau lien d\'onboarding | - |
|**400** | Paramètres manquants | - |
|**404** | Club 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)