@tennac-booking/sdk 1.0.15 → 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.
- package/.openapi-generator/FILES +134 -125
- package/README.md +10 -0
- package/api.ts +443 -0
- package/dist/api.d.ts +338 -0
- package/dist/api.js +187 -2
- package/dist/esm/api.d.ts +338 -0
- package/dist/esm/api.js +180 -0
- package/docs/CancelBookingResponse.md +22 -0
- package/docs/CancelBookingResponseBooking.md +30 -0
- package/docs/ConfirmPaymentMethodSetupRequestBody.md +22 -0
- package/docs/ConfirmPaymentMethodSetupResponse.md +22 -0
- package/docs/CourtResponse.md +2 -0
- package/docs/ManagerCancelBookingResponse.md +22 -0
- package/docs/ManagerCancelBookingResponseBooking.md +30 -0
- package/docs/SetupPaymentMethodRequestBody.md +22 -0
- package/docs/SetupPaymentMethodResponse.md +24 -0
- package/docs/UserPaymentApi.md +121 -0
- package/package.json +1 -1
package/docs/CourtResponse.md
CHANGED
|
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**slotDefaultDuration** | **number** | | [optional] [default to undefined]
|
|
13
13
|
**startTimeInTheDayInMinutes** | **number** | | [optional] [default to undefined]
|
|
14
14
|
**endTimeInTheDayInMinutes** | **number** | | [optional] [default to undefined]
|
|
15
|
+
**pricePerSlotInCents** | **number** | | [optional] [default to undefined]
|
|
15
16
|
**sportId** | **string** | | [optional] [default to undefined]
|
|
16
17
|
**clubId** | **string** | | [optional] [default to undefined]
|
|
17
18
|
**surface** | **string** | | [optional] [default to undefined]
|
|
@@ -32,6 +33,7 @@ const instance: CourtResponse = {
|
|
|
32
33
|
slotDefaultDuration,
|
|
33
34
|
startTimeInTheDayInMinutes,
|
|
34
35
|
endTimeInTheDayInMinutes,
|
|
36
|
+
pricePerSlotInCents,
|
|
35
37
|
sportId,
|
|
36
38
|
clubId,
|
|
37
39
|
surface,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ManagerCancelBookingResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**message** | **string** | Message de confirmation | [default to undefined]
|
|
9
|
+
**booking** | [**ManagerCancelBookingResponseBooking**](ManagerCancelBookingResponseBooking.md) | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ManagerCancelBookingResponse } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ManagerCancelBookingResponse = {
|
|
17
|
+
message,
|
|
18
|
+
booking,
|
|
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,30 @@
|
|
|
1
|
+
# ManagerCancelBookingResponseBooking
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | ID de la réservation | [default to undefined]
|
|
9
|
+
**status** | **string** | Nouveau statut de la réservation | [default to undefined]
|
|
10
|
+
**cancellationReason** | **string** | Raison de l\'annulation par le gestionnaire | [default to undefined]
|
|
11
|
+
**cancelledAt** | **string** | Date et heure d\'annulation | [default to undefined]
|
|
12
|
+
**cancelledBy** | **string** | ID du gestionnaire qui a annulé | [default to undefined]
|
|
13
|
+
**cancelledByManager** | **boolean** | Toujours true pour les annulations par gestionnaire | [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ManagerCancelBookingResponseBooking } from '@tennac-booking/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: ManagerCancelBookingResponseBooking = {
|
|
21
|
+
id,
|
|
22
|
+
status,
|
|
23
|
+
cancellationReason,
|
|
24
|
+
cancelledAt,
|
|
25
|
+
cancelledBy,
|
|
26
|
+
cancelledByManager,
|
|
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
|
+
# SetupPaymentMethodRequestBody
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**userId** | **string** | ID de l\'utilisateur | [default to undefined]
|
|
9
|
+
**clubId** | **string** | ID du club | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { SetupPaymentMethodRequestBody } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: SetupPaymentMethodRequestBody = {
|
|
17
|
+
userId,
|
|
18
|
+
clubId,
|
|
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,24 @@
|
|
|
1
|
+
# SetupPaymentMethodResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**setupIntentId** | **string** | ID du Setup Intent Stripe | [optional] [default to undefined]
|
|
9
|
+
**clientSecret** | **string** | Client secret pour la configuration côté client | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | Message de confirmation | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { SetupPaymentMethodResponse } from '@tennac-booking/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: SetupPaymentMethodResponse = {
|
|
18
|
+
setupIntentId,
|
|
19
|
+
clientSecret,
|
|
20
|
+
message,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[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,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
|
+
|