@tennac-booking/sdk 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ # ActiveClub
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **_id** | **string** | | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { ActiveClub } from '@tennac-booking/sdk';
15
+
16
+ const instance: ActiveClub = {
17
+ _id,
18
+ name,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,20 @@
1
+ # ActiveClubListResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **clubs** | [**Array<ActiveClub>**](ActiveClub.md) | | [optional] [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { ActiveClubListResponse } from '@tennac-booking/sdk';
14
+
15
+ const instance: ActiveClubListResponse = {
16
+ clubs,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.mon-domaine.com*
6
6
  |------------- | ------------- | -------------|
7
7
  |[**deleteSlotsByClubInRange**](#deleteslotsbyclubinrange) | **DELETE** /api/clubs/{id}/slots | Supprimer des créneaux pour un club sur une plage de dates|
8
8
  |[**generateSlotsForNextThreeWeeks**](#generateslotsfornextthreeweeks) | **POST** /api/clubs/{id}/generate-slots | Générer les créneaux pour les 3 semaines à venir|
9
+ |[**getAvailableSlotsByClub**](#getavailableslotsbyclub) | **GET** /api/clubs/{clubID}/availableSlots/ | Obtenir tous les créneaux disponibles pour un club|
9
10
  |[**getAvailableSlotsBySports**](#getavailableslotsbysports) | **GET** /api/clubs/{id}/sports/{sportId}/slots | Obtenir tous les slots disponibles pour un sport dans un club|
10
11
  |[**getAvailableSlotsBySportsAndDay**](#getavailableslotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day} | Obtenir les slots disponibles pour un jour donné|
11
12
  |[**getSlotsByClub**](#getslotsbyclub) | **GET** /api/clubs/{id}/slots | Récupérer tous les créneaux pour un club|
@@ -121,6 +122,58 @@ const { status, data } = await apiInstance.generateSlotsForNextThreeWeeks(
121
122
 
122
123
  [[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)
123
124
 
125
+ # **getAvailableSlotsByClub**
126
+ > SlotsResponse getAvailableSlotsByClub()
127
+
128
+
129
+ ### Example
130
+
131
+ ```typescript
132
+ import {
133
+ ClubSlotsApi,
134
+ Configuration
135
+ } from '@tennac-booking/sdk';
136
+
137
+ const configuration = new Configuration();
138
+ const apiInstance = new ClubSlotsApi(configuration);
139
+
140
+ let clubID: string; //ID du club (default to undefined)
141
+
142
+ const { status, data } = await apiInstance.getAvailableSlotsByClub(
143
+ clubID
144
+ );
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+ |Name | Type | Description | Notes|
150
+ |------------- | ------------- | ------------- | -------------|
151
+ | **clubID** | [**string**] | ID du club | defaults to undefined|
152
+
153
+
154
+ ### Return type
155
+
156
+ **SlotsResponse**
157
+
158
+ ### Authorization
159
+
160
+ [bearerAuth](../README.md#bearerAuth)
161
+
162
+ ### HTTP request headers
163
+
164
+ - **Content-Type**: Not defined
165
+ - **Accept**: application/json
166
+
167
+
168
+ ### HTTP response details
169
+ | Status code | Description | Response headers |
170
+ |-------------|-------------|------------------|
171
+ |**200** | Liste des créneaux disponibles pour le club | - |
172
+ |**400** | Requête invalide | - |
173
+ |**500** | Erreur serveur interne | - |
174
+
175
+ [[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)
176
+
124
177
  # **getAvailableSlotsBySports**
125
178
  > SlotsResponse getAvailableSlotsBySports()
126
179
 
package/docs/ClubsApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.mon-domaine.com*
7
7
  |[**addClubMember**](#addclubmember) | **PUT** /api/clubs/{id}/add_members | Ajouter un membre à un club|
8
8
  |[**createClub**](#createclub) | **POST** /api/clubs | Créer un nouveau club|
9
9
  |[**deleteClub**](#deleteclub) | **DELETE** /api/clubs/{id} | Supprimer un club|
10
+ |[**getActiveClubs**](#getactiveclubs) | **GET** /api/clubs/activeClubs/ | Obtenir la liste des clubs actifs (seulement id et nom)|
10
11
  |[**getAllClubs**](#getallclubs) | **GET** /api/clubs | Récupérer tous les clubs|
11
12
  |[**getClubInfo**](#getclubinfo) | **GET** /api/clubs/{id} | Récupérer les informations d\'un club|
12
13
  |[**getClubMembers**](#getclubmembers) | **GET** /api/clubs/{id}/members | Récupérer les membres d\'un club|
@@ -175,6 +176,51 @@ const { status, data } = await apiInstance.deleteClub(
175
176
 
176
177
  [[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)
177
178
 
179
+ # **getActiveClubs**
180
+ > GetActiveClubs200Response getActiveClubs()
181
+
182
+ Retourne une liste des clubs dont la propriété `isActive` est `true`. Chaque club contient uniquement son `id` et son `name`.
183
+
184
+ ### Example
185
+
186
+ ```typescript
187
+ import {
188
+ ClubsApi,
189
+ Configuration
190
+ } from '@tennac-booking/sdk';
191
+
192
+ const configuration = new Configuration();
193
+ const apiInstance = new ClubsApi(configuration);
194
+
195
+ const { status, data } = await apiInstance.getActiveClubs();
196
+ ```
197
+
198
+ ### Parameters
199
+ This endpoint does not have any parameters.
200
+
201
+
202
+ ### Return type
203
+
204
+ **GetActiveClubs200Response**
205
+
206
+ ### Authorization
207
+
208
+ [bearerAuth](../README.md#bearerAuth)
209
+
210
+ ### HTTP request headers
211
+
212
+ - **Content-Type**: Not defined
213
+ - **Accept**: application/json
214
+
215
+
216
+ ### HTTP response details
217
+ | Status code | Description | Response headers |
218
+ |-------------|-------------|------------------|
219
+ |**200** | Liste des clubs actifs | - |
220
+ |**500** | Erreur serveur interne | - |
221
+
222
+ [[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)
223
+
178
224
  # **getAllClubs**
179
225
  > ClubListResponse getAllClubs()
180
226
 
@@ -0,0 +1,20 @@
1
+ # GetActiveClubs200Response
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **clubs** | [**Array<ActiveClub>**](ActiveClub.md) | | [optional] [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { GetActiveClubs200Response } from '@tennac-booking/sdk';
14
+
15
+ const instance: GetActiveClubs200Response = {
16
+ clubs,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,18 +1,18 @@
1
- # GetUserRolesInClubs200Response
1
+ # GetUserRolesResponse
2
2
 
3
3
 
4
4
  ## Properties
5
5
 
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
- **roles** | [**Array<ClubRole>**](ClubRole.md) | | [optional] [default to undefined]
8
+ **roles** | [**Array<GetUserRolesResponseRolesInner>**](GetUserRolesResponseRolesInner.md) | | [optional] [default to undefined]
9
9
 
10
10
  ## Example
11
11
 
12
12
  ```typescript
13
- import { GetUserRolesInClubs200Response } from '@tennac-booking/sdk';
13
+ import { GetUserRolesResponse } from '@tennac-booking/sdk';
14
14
 
15
- const instance: GetUserRolesInClubs200Response = {
15
+ const instance: GetUserRolesResponse = {
16
16
  roles,
17
17
  };
18
18
  ```
@@ -0,0 +1,28 @@
1
+ # GetUserRolesResponseRolesInner
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **clubId** | **string** | ID du club | [optional] [default to undefined]
9
+ **clubName** | **string** | Nom du club | [optional] [default to undefined]
10
+ **roleId** | **string** | ID du rôle | [optional] [default to undefined]
11
+ **roleName** | **string** | Nom du rôle | [optional] [default to undefined]
12
+ **permissions** | **Array<string>** | Permissions associées au rôle | [optional] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { GetUserRolesResponseRolesInner } from '@tennac-booking/sdk';
18
+
19
+ const instance: GetUserRolesResponseRolesInner = {
20
+ clubId,
21
+ clubName,
22
+ roleId,
23
+ roleName,
24
+ permissions,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # GetUserSubscriptionsResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **subscriptions** | [**Array<SubscriptionResponse>**](SubscriptionResponse.md) | | [optional] [default to undefined]
9
+ **total** | **number** | Nombre total d\'abonnements | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { GetUserSubscriptionsResponse } from '@tennac-booking/sdk';
15
+
16
+ const instance: GetUserSubscriptionsResponse = {
17
+ subscriptions,
18
+ total,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,20 @@
1
+ # GoogleSignInRequestBody
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **credential** | **string** | Token JWT Google | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { GoogleSignInRequestBody } from '@tennac-booking/sdk';
14
+
15
+ const instance: GoogleSignInRequestBody = {
16
+ credential,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,30 @@
1
+ # GoogleSignInResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **token** | **string** | Token d\'accès JWT | [optional] [default to undefined]
9
+ **refreshToken** | **string** | Token de rafraîchissement | [optional] [default to undefined]
10
+ **sessionDuration** | **number** | Durée de la session en secondes | [optional] [default to undefined]
11
+ **sessionEnd** | **number** | Timestamp de fin de session | [optional] [default to undefined]
12
+ **user** | [**UserResponse**](UserResponse.md) | | [optional] [default to undefined]
13
+ **isNewUser** | **boolean** | Indique si c\'est un nouvel utilisateur | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { GoogleSignInResponse } from '@tennac-booking/sdk';
19
+
20
+ const instance: GoogleSignInResponse = {
21
+ token,
22
+ refreshToken,
23
+ sessionDuration,
24
+ sessionEnd,
25
+ user,
26
+ isNewUser,
27
+ };
28
+ ```
29
+
30
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,26 @@
1
+ # InitiateSubscriptionSessionRequestBody
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **clubId** | **string** | ID du club | [default to undefined]
9
+ **priceId** | **string** | ID du prix d\'abonnement | [default to undefined]
10
+ **successUrl** | **string** | URL de redirection en cas de succès | [optional] [default to undefined]
11
+ **cancelUrl** | **string** | URL de redirection en cas d\'annulation | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { InitiateSubscriptionSessionRequestBody } from '@tennac-booking/sdk';
17
+
18
+ const instance: InitiateSubscriptionSessionRequestBody = {
19
+ clubId,
20
+ priceId,
21
+ successUrl,
22
+ cancelUrl,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # InitiateSubscriptionSessionResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **sessionId** | **string** | ID de la session Stripe | [optional] [default to undefined]
9
+ **url** | **string** | URL de la session de paiement | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { InitiateSubscriptionSessionResponse } from '@tennac-booking/sdk';
15
+
16
+ const instance: InitiateSubscriptionSessionResponse = {
17
+ sessionId,
18
+ url,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # SubscribeToClubRequestBody
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **clubId** | **string** | ID du club | [default to undefined]
9
+ **roleId** | **string** | ID du rôle dans le club | [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { SubscribeToClubRequestBody } from '@tennac-booking/sdk';
15
+
16
+ const instance: SubscribeToClubRequestBody = {
17
+ clubId,
18
+ roleId,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,36 @@
1
+ # SubscriptionResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | ID de l\'abonnement | [optional] [default to undefined]
9
+ **userId** | **string** | ID de l\'utilisateur | [optional] [default to undefined]
10
+ **clubId** | **string** | ID du club | [optional] [default to undefined]
11
+ **stripeSubscriptionId** | **string** | ID de l\'abonnement Stripe | [optional] [default to undefined]
12
+ **status** | **string** | Statut de l\'abonnement | [optional] [default to undefined]
13
+ **currentPeriodStart** | **string** | Début de la période courante | [optional] [default to undefined]
14
+ **currentPeriodEnd** | **string** | Fin de la période courante | [optional] [default to undefined]
15
+ **createdAt** | **string** | | [optional] [default to undefined]
16
+ **updatedAt** | **string** | | [optional] [default to undefined]
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import { SubscriptionResponse } from '@tennac-booking/sdk';
22
+
23
+ const instance: SubscriptionResponse = {
24
+ id,
25
+ userId,
26
+ clubId,
27
+ stripeSubscriptionId,
28
+ status,
29
+ currentPeriodStart,
30
+ currentPeriodEnd,
31
+ createdAt,
32
+ updatedAt,
33
+ };
34
+ ```
35
+
36
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,26 @@
1
+ # UpdateCustomerRequestBody
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **name** | **string** | Nom du client | [optional] [default to undefined]
9
+ **email** | **string** | Email du client | [optional] [default to undefined]
10
+ **phone** | **string** | Téléphone du client | [optional] [default to undefined]
11
+ **address** | [**UpdateCustomerRequestBodyAddress**](UpdateCustomerRequestBodyAddress.md) | | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { UpdateCustomerRequestBody } from '@tennac-booking/sdk';
17
+
18
+ const instance: UpdateCustomerRequestBody = {
19
+ name,
20
+ email,
21
+ phone,
22
+ address,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,30 @@
1
+ # UpdateCustomerRequestBodyAddress
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **line1** | **string** | | [optional] [default to undefined]
9
+ **line2** | **string** | | [optional] [default to undefined]
10
+ **city** | **string** | | [optional] [default to undefined]
11
+ **state** | **string** | | [optional] [default to undefined]
12
+ **postal_code** | **string** | | [optional] [default to undefined]
13
+ **country** | **string** | | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { UpdateCustomerRequestBodyAddress } from '@tennac-booking/sdk';
19
+
20
+ const instance: UpdateCustomerRequestBodyAddress = {
21
+ line1,
22
+ line2,
23
+ city,
24
+ state,
25
+ postal_code,
26
+ country,
27
+ };
28
+ ```
29
+
30
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # UpdateCustomerResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **message** | **string** | Message de confirmation | [optional] [default to undefined]
9
+ **customer** | [**UpdateCustomerResponseCustomer**](UpdateCustomerResponseCustomer.md) | | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { UpdateCustomerResponse } from '@tennac-booking/sdk';
15
+
16
+ const instance: UpdateCustomerResponse = {
17
+ message,
18
+ customer,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,28 @@
1
+ # UpdateCustomerResponseCustomer
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **email** | **string** | | [optional] [default to undefined]
11
+ **phone** | **string** | | [optional] [default to undefined]
12
+ **address** | **object** | | [optional] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { UpdateCustomerResponseCustomer } from '@tennac-booking/sdk';
18
+
19
+ const instance: UpdateCustomerResponseCustomer = {
20
+ id,
21
+ name,
22
+ email,
23
+ phone,
24
+ address,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)