@tennac-booking/sdk 1.0.14 → 1.0.16

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.
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.mon-domaine.com*
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
7
  |[**blockSlot**](#blockslot) | **PATCH** /api/bookings/pre-book/{slotId} | Bloquer un créneau|
8
+ |[**createBooking**](#createbooking) | **POST** /api/bookings | Créer une réservation|
8
9
 
9
10
  # **blockSlot**
10
11
  > BlockSlotResponse blockSlot()
@@ -61,3 +62,59 @@ const { status, data } = await apiInstance.blockSlot(
61
62
 
62
63
  [[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)
63
64
 
65
+ # **createBooking**
66
+ > BookingResponse createBooking(createBookingRequest)
67
+
68
+ Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
69
+
70
+ ### Example
71
+
72
+ ```typescript
73
+ import {
74
+ UserBookingsApi,
75
+ Configuration,
76
+ CreateBookingRequest
77
+ } from '@tennac-booking/sdk';
78
+
79
+ const configuration = new Configuration();
80
+ const apiInstance = new UserBookingsApi(configuration);
81
+
82
+ let createBookingRequest: CreateBookingRequest; //
83
+
84
+ const { status, data } = await apiInstance.createBooking(
85
+ createBookingRequest
86
+ );
87
+ ```
88
+
89
+ ### Parameters
90
+
91
+ |Name | Type | Description | Notes|
92
+ |------------- | ------------- | ------------- | -------------|
93
+ | **createBookingRequest** | **CreateBookingRequest**| | |
94
+
95
+
96
+ ### Return type
97
+
98
+ **BookingResponse**
99
+
100
+ ### Authorization
101
+
102
+ [bearerAuth](../README.md#bearerAuth)
103
+
104
+ ### HTTP request headers
105
+
106
+ - **Content-Type**: application/json
107
+ - **Accept**: application/json
108
+
109
+
110
+ ### HTTP response details
111
+ | Status code | Description | Response headers |
112
+ |-------------|-------------|------------------|
113
+ |**201** | Réservation créée avec succès | - |
114
+ |**400** | Requête invalide | - |
115
+ |**401** | Non autorisé | - |
116
+ |**404** | Ressource non trouvée | - |
117
+ |**500** | Erreur serveur interne | - |
118
+
119
+ [[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)
120
+
@@ -5,6 +5,8 @@ All URIs are relative to *https://api.mon-domaine.com*
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
7
  |[**getAvailableSlotsByClub**](#getavailableslotsbyclub) | **GET** /api/clubs/{clubID}/availableSlots | Obtenir tous les créneaux disponibles pour un club|
8
+ |[**getAvailableSlotsBySports**](#getavailableslotsbysports) | **GET** /api/clubs/{id}/sports/{sportId}/slots | Obtenir tous les slots disponibles pour un sport dans un club|
9
+ |[**getAvailableSlotsBySportsAndDay**](#getavailableslotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day} | Obtenir les slots disponibles pour un jour donné|
8
10
 
9
11
  # **getAvailableSlotsByClub**
10
12
  > SlotsResponse getAvailableSlotsByClub()
@@ -58,3 +60,122 @@ const { status, data } = await apiInstance.getAvailableSlotsByClub(
58
60
 
59
61
  [[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)
60
62
 
63
+ # **getAvailableSlotsBySports**
64
+ > SlotsResponse getAvailableSlotsBySports()
65
+
66
+
67
+ ### Example
68
+
69
+ ```typescript
70
+ import {
71
+ UserClubSlotsApi,
72
+ Configuration
73
+ } from '@tennac-booking/sdk';
74
+
75
+ const configuration = new Configuration();
76
+ const apiInstance = new UserClubSlotsApi(configuration);
77
+
78
+ let id: string; //ID du club (default to undefined)
79
+ let sportId: string; //ID du sport (default to undefined)
80
+ let start: string; //Date de début (format ISO) (optional) (default to undefined)
81
+ let end: string; //Date de fin (format ISO) (optional) (default to undefined)
82
+
83
+ const { status, data } = await apiInstance.getAvailableSlotsBySports(
84
+ id,
85
+ sportId,
86
+ start,
87
+ end
88
+ );
89
+ ```
90
+
91
+ ### Parameters
92
+
93
+ |Name | Type | Description | Notes|
94
+ |------------- | ------------- | ------------- | -------------|
95
+ | **id** | [**string**] | ID du club | defaults to undefined|
96
+ | **sportId** | [**string**] | ID du sport | defaults to undefined|
97
+ | **start** | [**string**] | Date de début (format ISO) | (optional) defaults to undefined|
98
+ | **end** | [**string**] | Date de fin (format ISO) | (optional) defaults to undefined|
99
+
100
+
101
+ ### Return type
102
+
103
+ **SlotsResponse**
104
+
105
+ ### Authorization
106
+
107
+ [bearerAuth](../README.md#bearerAuth)
108
+
109
+ ### HTTP request headers
110
+
111
+ - **Content-Type**: Not defined
112
+ - **Accept**: application/json
113
+
114
+
115
+ ### HTTP response details
116
+ | Status code | Description | Response headers |
117
+ |-------------|-------------|------------------|
118
+ |**200** | Liste des créneaux disponibles | - |
119
+ |**400** | Requête invalide | - |
120
+ |**500** | Erreur serveur interne | - |
121
+
122
+ [[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
+ # **getAvailableSlotsBySportsAndDay**
125
+ > SlotsResponse getAvailableSlotsBySportsAndDay()
126
+
127
+
128
+ ### Example
129
+
130
+ ```typescript
131
+ import {
132
+ UserClubSlotsApi,
133
+ Configuration
134
+ } from '@tennac-booking/sdk';
135
+
136
+ const configuration = new Configuration();
137
+ const apiInstance = new UserClubSlotsApi(configuration);
138
+
139
+ let id: string; //ID du club (default to undefined)
140
+ let sportId: string; //ID du sport (default to undefined)
141
+ let day: string; //Date du jour (format YYYY-MM-DD) (default to undefined)
142
+
143
+ const { status, data } = await apiInstance.getAvailableSlotsBySportsAndDay(
144
+ id,
145
+ sportId,
146
+ day
147
+ );
148
+ ```
149
+
150
+ ### Parameters
151
+
152
+ |Name | Type | Description | Notes|
153
+ |------------- | ------------- | ------------- | -------------|
154
+ | **id** | [**string**] | ID du club | defaults to undefined|
155
+ | **sportId** | [**string**] | ID du sport | defaults to undefined|
156
+ | **day** | [**string**] | Date du jour (format YYYY-MM-DD) | defaults to undefined|
157
+
158
+
159
+ ### Return type
160
+
161
+ **SlotsResponse**
162
+
163
+ ### Authorization
164
+
165
+ [bearerAuth](../README.md#bearerAuth)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: Not defined
170
+ - **Accept**: application/json
171
+
172
+
173
+ ### HTTP response details
174
+ | Status code | Description | Response headers |
175
+ |-------------|-------------|------------------|
176
+ |**200** | Liste des créneaux disponibles pour le jour donné | - |
177
+ |**400** | Requête invalide | - |
178
+ |**500** | Erreur serveur interne | - |
179
+
180
+ [[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)
181
+
@@ -0,0 +1,121 @@
1
+ # UserPaymentApi
2
+
3
+ All URIs are relative to *https://api.mon-domaine.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**confirmPaymentMethodSetup**](#confirmpaymentmethodsetup) | **POST** /api/users/confirmPaymentMethodSetup | Confirme la configuration d\'une méthode de paiement|
8
+ |[**setupPaymentMethod**](#setuppaymentmethod) | **POST** /api/users/setupPaymentMethod | Configure une méthode de paiement pour un utilisateur|
9
+
10
+ # **confirmPaymentMethodSetup**
11
+ > ConfirmPaymentMethodSetupResponse confirmPaymentMethodSetup(confirmPaymentMethodSetupRequestBody)
12
+
13
+ Confirme que la méthode de paiement a été configurée avec succès et la sauvegarde pour l\'utilisateur
14
+
15
+ ### Example
16
+
17
+ ```typescript
18
+ import {
19
+ UserPaymentApi,
20
+ Configuration,
21
+ ConfirmPaymentMethodSetupRequestBody
22
+ } from '@tennac-booking/sdk';
23
+
24
+ const configuration = new Configuration();
25
+ const apiInstance = new UserPaymentApi(configuration);
26
+
27
+ let confirmPaymentMethodSetupRequestBody: ConfirmPaymentMethodSetupRequestBody; //
28
+
29
+ const { status, data } = await apiInstance.confirmPaymentMethodSetup(
30
+ confirmPaymentMethodSetupRequestBody
31
+ );
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ |Name | Type | Description | Notes|
37
+ |------------- | ------------- | ------------- | -------------|
38
+ | **confirmPaymentMethodSetupRequestBody** | **ConfirmPaymentMethodSetupRequestBody**| | |
39
+
40
+
41
+ ### Return type
42
+
43
+ **ConfirmPaymentMethodSetupResponse**
44
+
45
+ ### Authorization
46
+
47
+ [bearerAuth](../README.md#bearerAuth)
48
+
49
+ ### HTTP request headers
50
+
51
+ - **Content-Type**: application/json
52
+ - **Accept**: application/json
53
+
54
+
55
+ ### HTTP response details
56
+ | Status code | Description | Response headers |
57
+ |-------------|-------------|------------------|
58
+ |**200** | Méthode de paiement confirmée avec succès | - |
59
+ |**400** | Requête invalide | - |
60
+ |**401** | Non autorisé | - |
61
+ |**404** | Ressource non trouvée | - |
62
+ |**500** | Erreur serveur interne | - |
63
+
64
+ [[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)
65
+
66
+ # **setupPaymentMethod**
67
+ > SetupPaymentMethodResponse setupPaymentMethod(setupPaymentMethodRequestBody)
68
+
69
+ Initie la configuration d\'une méthode de paiement via Stripe Setup Intent pour permettre les futurs paiements
70
+
71
+ ### Example
72
+
73
+ ```typescript
74
+ import {
75
+ UserPaymentApi,
76
+ Configuration,
77
+ SetupPaymentMethodRequestBody
78
+ } from '@tennac-booking/sdk';
79
+
80
+ const configuration = new Configuration();
81
+ const apiInstance = new UserPaymentApi(configuration);
82
+
83
+ let setupPaymentMethodRequestBody: SetupPaymentMethodRequestBody; //
84
+
85
+ const { status, data } = await apiInstance.setupPaymentMethod(
86
+ setupPaymentMethodRequestBody
87
+ );
88
+ ```
89
+
90
+ ### Parameters
91
+
92
+ |Name | Type | Description | Notes|
93
+ |------------- | ------------- | ------------- | -------------|
94
+ | **setupPaymentMethodRequestBody** | **SetupPaymentMethodRequestBody**| | |
95
+
96
+
97
+ ### Return type
98
+
99
+ **SetupPaymentMethodResponse**
100
+
101
+ ### Authorization
102
+
103
+ [bearerAuth](../README.md#bearerAuth)
104
+
105
+ ### HTTP request headers
106
+
107
+ - **Content-Type**: application/json
108
+ - **Accept**: application/json
109
+
110
+
111
+ ### HTTP response details
112
+ | Status code | Description | Response headers |
113
+ |-------------|-------------|------------------|
114
+ |**200** | Setup Intent créé avec succès | - |
115
+ |**400** | Requête invalide | - |
116
+ |**401** | Non autorisé | - |
117
+ |**404** | Ressource non trouvée | - |
118
+ |**500** | Erreur serveur interne | - |
119
+
120
+ [[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)
121
+
@@ -7,7 +7,6 @@ All URIs are relative to *https://api.mon-domaine.com*
7
7
  |[**changePassword**](#changepassword) | **PUT** /api/users/me/password | Modifie le mot de passe de l\'utilisateur connecté|
8
8
  |[**getAllUsers**](#getallusers) | **GET** /api/users | Récupère la liste des utilisateurs avec filtres et pagination|
9
9
  |[**getUserInfo**](#getuserinfo) | **GET** /api/users/me | Récupère les informations de l\'utilisateur connecté|
10
- |[**getUserRolesInClubs**](#getuserrolesinclubs) | **GET** /api/users/me/roles | Récupère les rôles de l\'utilisateur dans les clubs|
11
10
  |[**updateUser**](#updateuser) | **PUT** /api/users/me | Met à jour les données de l\'utilisateur connecté|
12
11
 
13
12
  # **changePassword**
@@ -169,52 +168,6 @@ This endpoint does not have any parameters.
169
168
 
170
169
  [[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)
171
170
 
172
- # **getUserRolesInClubs**
173
- > GetUserRolesResponse getUserRolesInClubs()
174
-
175
-
176
- ### Example
177
-
178
- ```typescript
179
- import {
180
- UserProfileApi,
181
- Configuration
182
- } from '@tennac-booking/sdk';
183
-
184
- const configuration = new Configuration();
185
- const apiInstance = new UserProfileApi(configuration);
186
-
187
- const { status, data } = await apiInstance.getUserRolesInClubs();
188
- ```
189
-
190
- ### Parameters
191
- This endpoint does not have any parameters.
192
-
193
-
194
- ### Return type
195
-
196
- **GetUserRolesResponse**
197
-
198
- ### Authorization
199
-
200
- [bearerAuth](../README.md#bearerAuth)
201
-
202
- ### HTTP request headers
203
-
204
- - **Content-Type**: Not defined
205
- - **Accept**: application/json
206
-
207
-
208
- ### HTTP response details
209
- | Status code | Description | Response headers |
210
- |-------------|-------------|------------------|
211
- |**200** | Liste des rôles dans les clubs | - |
212
- |**400** | Requête invalide | - |
213
- |**401** | Non autorisé | - |
214
- |**500** | Erreur serveur interne | - |
215
-
216
- [[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)
217
-
218
171
  # **updateUser**
219
172
  > UserResponse updateUser(updateUserRequestBody)
220
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tennac-booking/sdk",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "OpenAPI client for @tennac-booking/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "publishConfig": {
@@ -1,64 +0,0 @@
1
- # BookingsApi
2
-
3
- All URIs are relative to *https://api.mon-domaine.com*
4
-
5
- |Method | HTTP request | Description|
6
- |------------- | ------------- | -------------|
7
- |[**createBooking**](#createbooking) | **POST** /api/bookings | Créer une réservation|
8
-
9
- # **createBooking**
10
- > BookingResponse createBooking(createBookingRequest)
11
-
12
- Crée une nouvelle réservation avec gestion des paiements (créateur paie tout ou paiement divisé)
13
-
14
- ### Example
15
-
16
- ```typescript
17
- import {
18
- BookingsApi,
19
- Configuration,
20
- CreateBookingRequest
21
- } from '@tennac-booking/sdk';
22
-
23
- const configuration = new Configuration();
24
- const apiInstance = new BookingsApi(configuration);
25
-
26
- let createBookingRequest: CreateBookingRequest; //
27
-
28
- const { status, data } = await apiInstance.createBooking(
29
- createBookingRequest
30
- );
31
- ```
32
-
33
- ### Parameters
34
-
35
- |Name | Type | Description | Notes|
36
- |------------- | ------------- | ------------- | -------------|
37
- | **createBookingRequest** | **CreateBookingRequest**| | |
38
-
39
-
40
- ### Return type
41
-
42
- **BookingResponse**
43
-
44
- ### Authorization
45
-
46
- [bearerAuth](../README.md#bearerAuth)
47
-
48
- ### HTTP request headers
49
-
50
- - **Content-Type**: application/json
51
- - **Accept**: application/json
52
-
53
-
54
- ### HTTP response details
55
- | Status code | Description | Response headers |
56
- |-------------|-------------|------------------|
57
- |**201** | Réservation créée avec succès | - |
58
- |**400** | Requête invalide | - |
59
- |**401** | Non autorisé | - |
60
- |**404** | Ressource non trouvée | - |
61
- |**500** | Erreur serveur interne | - |
62
-
63
- [[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)
64
-
@@ -1,128 +0,0 @@
1
- # ClubSlotsApi
2
-
3
- All URIs are relative to *https://api.mon-domaine.com*
4
-
5
- |Method | HTTP request | Description|
6
- |------------- | ------------- | -------------|
7
- |[**getAvailableSlotsBySports**](#getavailableslotsbysports) | **GET** /api/clubs/{id}/sports/{sportId}/slots | Obtenir tous les slots disponibles pour un sport dans un club|
8
- |[**getAvailableSlotsBySportsAndDay**](#getavailableslotsbysportsandday) | **GET** /api/clubs/{id}/sports/{sportId}/slots/{day} | Obtenir les slots disponibles pour un jour donné|
9
-
10
- # **getAvailableSlotsBySports**
11
- > SlotsResponse getAvailableSlotsBySports()
12
-
13
-
14
- ### Example
15
-
16
- ```typescript
17
- import {
18
- ClubSlotsApi,
19
- Configuration
20
- } from '@tennac-booking/sdk';
21
-
22
- const configuration = new Configuration();
23
- const apiInstance = new ClubSlotsApi(configuration);
24
-
25
- let id: string; //ID du club (default to undefined)
26
- let sportId: string; //ID du sport (default to undefined)
27
- let start: string; //Date de début (format ISO) (optional) (default to undefined)
28
- let end: string; //Date de fin (format ISO) (optional) (default to undefined)
29
-
30
- const { status, data } = await apiInstance.getAvailableSlotsBySports(
31
- id,
32
- sportId,
33
- start,
34
- end
35
- );
36
- ```
37
-
38
- ### Parameters
39
-
40
- |Name | Type | Description | Notes|
41
- |------------- | ------------- | ------------- | -------------|
42
- | **id** | [**string**] | ID du club | defaults to undefined|
43
- | **sportId** | [**string**] | ID du sport | defaults to undefined|
44
- | **start** | [**string**] | Date de début (format ISO) | (optional) defaults to undefined|
45
- | **end** | [**string**] | Date de fin (format ISO) | (optional) defaults to undefined|
46
-
47
-
48
- ### Return type
49
-
50
- **SlotsResponse**
51
-
52
- ### Authorization
53
-
54
- [bearerAuth](../README.md#bearerAuth)
55
-
56
- ### HTTP request headers
57
-
58
- - **Content-Type**: Not defined
59
- - **Accept**: application/json
60
-
61
-
62
- ### HTTP response details
63
- | Status code | Description | Response headers |
64
- |-------------|-------------|------------------|
65
- |**200** | Liste des créneaux disponibles | - |
66
- |**400** | Requête invalide | - |
67
- |**500** | Erreur serveur interne | - |
68
-
69
- [[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)
70
-
71
- # **getAvailableSlotsBySportsAndDay**
72
- > SlotsResponse getAvailableSlotsBySportsAndDay()
73
-
74
-
75
- ### Example
76
-
77
- ```typescript
78
- import {
79
- ClubSlotsApi,
80
- Configuration
81
- } from '@tennac-booking/sdk';
82
-
83
- const configuration = new Configuration();
84
- const apiInstance = new ClubSlotsApi(configuration);
85
-
86
- let id: string; //ID du club (default to undefined)
87
- let sportId: string; //ID du sport (default to undefined)
88
- let day: string; //Date du jour (format YYYY-MM-DD) (default to undefined)
89
-
90
- const { status, data } = await apiInstance.getAvailableSlotsBySportsAndDay(
91
- id,
92
- sportId,
93
- day
94
- );
95
- ```
96
-
97
- ### Parameters
98
-
99
- |Name | Type | Description | Notes|
100
- |------------- | ------------- | ------------- | -------------|
101
- | **id** | [**string**] | ID du club | defaults to undefined|
102
- | **sportId** | [**string**] | ID du sport | defaults to undefined|
103
- | **day** | [**string**] | Date du jour (format YYYY-MM-DD) | defaults to undefined|
104
-
105
-
106
- ### Return type
107
-
108
- **SlotsResponse**
109
-
110
- ### Authorization
111
-
112
- [bearerAuth](../README.md#bearerAuth)
113
-
114
- ### HTTP request headers
115
-
116
- - **Content-Type**: Not defined
117
- - **Accept**: application/json
118
-
119
-
120
- ### HTTP response details
121
- | Status code | Description | Response headers |
122
- |-------------|-------------|------------------|
123
- |**200** | Liste des créneaux disponibles pour le jour donné | - |
124
- |**400** | Requête invalide | - |
125
- |**500** | Erreur serveur interne | - |
126
-
127
- [[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)
128
-