@tennac-booking/sdk 1.0.123 → 1.0.125
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 +343 -331
- package/README.md +16 -4
- package/api.ts +569 -226
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +449 -141
- package/dist/api.js +136 -79
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +449 -141
- package/dist/esm/api.js +132 -75
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/CreateSubscriptionPlanRequestDiscount.md +0 -2
- package/docs/DeleteSubscriptionPlanResponse.md +0 -2
- package/docs/EventBookingDetailSummary.md +40 -0
- package/docs/EventBookingResponse.md +36 -0
- package/docs/EventBookingResponsePlayersInner.md +28 -0
- package/docs/EventBookingResponsePlayersInnerInvoiceStatus.md +18 -0
- package/docs/EventBookingResponseSetupStatus.md +18 -0
- package/docs/EventBookingStatus.md +16 -0
- package/docs/EventsApi.md +4 -1
- package/docs/InvoiceStatusSETUPPENDING.md +8 -0
- package/docs/InvoiceStatusSETUPSUCCESS.md +8 -0
- package/docs/OffPeakRule.md +0 -2
- package/docs/ParticipationType.md +10 -0
- package/docs/PublicSubscriptionPlanResponse.md +0 -2
- package/docs/PublishEventResponse.md +2 -0
- package/docs/SubscriptionPlanResponse.md +0 -4
- package/docs/SubscriptionsManagerApi.md +1 -55
- package/docs/UserEventParticipation.md +22 -0
- package/docs/UserEventSummary.md +44 -0
- package/docs/UserEventsResponse.md +28 -0
- package/docs/UsersApi.md +54 -0
- package/docs/VisibilityType.md +12 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/SubscriptionPlanDiscountResponse.md +0 -34
package/docs/EventsApi.md
CHANGED
|
@@ -141,9 +141,11 @@ const configuration = new Configuration();
|
|
|
141
141
|
const apiInstance = new EventsApi(configuration);
|
|
142
142
|
|
|
143
143
|
let eventId: string; // (default to undefined)
|
|
144
|
+
let userId: string; // (optional) (default to undefined)
|
|
144
145
|
|
|
145
146
|
const { status, data } = await apiInstance.getEventById(
|
|
146
|
-
eventId
|
|
147
|
+
eventId,
|
|
148
|
+
userId
|
|
147
149
|
);
|
|
148
150
|
```
|
|
149
151
|
|
|
@@ -152,6 +154,7 @@ const { status, data } = await apiInstance.getEventById(
|
|
|
152
154
|
|Name | Type | Description | Notes|
|
|
153
155
|
|------------- | ------------- | ------------- | -------------|
|
|
154
156
|
| **eventId** | [**string**] | | defaults to undefined|
|
|
157
|
+
| **userId** | [**string**] | | (optional) defaults to undefined|
|
|
155
158
|
|
|
156
159
|
|
|
157
160
|
### Return type
|
package/docs/OffPeakRule.md
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**pricingPeriodName** | **string** | | [optional] [default to undefined]
|
|
9
8
|
**percentage** | **number** | | [default to undefined]
|
|
10
9
|
**endHour** | **number** | | [default to undefined]
|
|
11
10
|
**startHour** | **number** | | [default to undefined]
|
|
@@ -17,7 +16,6 @@ Name | Type | Description | Notes
|
|
|
17
16
|
import { OffPeakRule } from '@tennac-booking/sdk';
|
|
18
17
|
|
|
19
18
|
const instance: OffPeakRule = {
|
|
20
|
-
pricingPeriodName,
|
|
21
19
|
percentage,
|
|
22
20
|
endHour,
|
|
23
21
|
startHour,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# ParticipationType
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Enum
|
|
5
|
+
|
|
6
|
+
* `Solo` (value: `'solo'`)
|
|
7
|
+
|
|
8
|
+
* `Team` (value: `'team'`)
|
|
9
|
+
|
|
10
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -11,7 +11,6 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**currency** | **string** | | [default to undefined]
|
|
12
12
|
**interval** | [**PlanInterval**](PlanInterval.md) | | [optional] [default to undefined]
|
|
13
13
|
**description** | **string** | | [optional] [default to undefined]
|
|
14
|
-
**discount** | [**SubscriptionPlanDiscountResponse**](SubscriptionPlanDiscountResponse.md) | | [optional] [default to undefined]
|
|
15
14
|
|
|
16
15
|
## Example
|
|
17
16
|
|
|
@@ -25,7 +24,6 @@ const instance: PublicSubscriptionPlanResponse = {
|
|
|
25
24
|
currency,
|
|
26
25
|
interval,
|
|
27
26
|
description,
|
|
28
|
-
discount,
|
|
29
27
|
};
|
|
30
28
|
```
|
|
31
29
|
|
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**event** | [**EventResponse**](EventResponse.md) | | [default to undefined]
|
|
9
9
|
**refundedBookingIds** | **Array<string>** | | [optional] [default to undefined]
|
|
10
|
+
**userBooking** | [**EventBookingResponse**](EventBookingResponse.md) | | [optional] [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ import { PublishEventResponse } from '@tennac-booking/sdk';
|
|
|
16
17
|
const instance: PublishEventResponse = {
|
|
17
18
|
event,
|
|
18
19
|
refundedBookingIds,
|
|
20
|
+
userBooking,
|
|
19
21
|
};
|
|
20
22
|
```
|
|
21
23
|
|
|
@@ -13,8 +13,6 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**currency** | **string** | | [default to undefined]
|
|
14
14
|
**interval** | [**PlanInterval**](PlanInterval.md) | | [optional] [default to undefined]
|
|
15
15
|
**priceActive** | **boolean** | | [default to undefined]
|
|
16
|
-
**description** | **string** | | [optional] [default to undefined]
|
|
17
|
-
**discount** | [**SubscriptionPlanDiscountResponse**](SubscriptionPlanDiscountResponse.md) | | [optional] [default to undefined]
|
|
18
16
|
|
|
19
17
|
## Example
|
|
20
18
|
|
|
@@ -30,8 +28,6 @@ const instance: SubscriptionPlanResponse = {
|
|
|
30
28
|
currency,
|
|
31
29
|
interval,
|
|
32
30
|
priceActive,
|
|
33
|
-
description,
|
|
34
|
-
discount,
|
|
35
31
|
};
|
|
36
32
|
```
|
|
37
33
|
|
|
@@ -4,64 +4,10 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
|[**archivePlan**](#archiveplan) | **POST** /api/subscriptions/plans/{productId}/archive | |
|
|
8
7
|
|[**createPlan**](#createplan) | **POST** /api/subscriptions/plans | |
|
|
9
8
|
|[**deletePlan**](#deleteplan) | **DELETE** /api/subscriptions/plans/{productId} | |
|
|
10
9
|
|[**updatePlan**](#updateplan) | **PUT** /api/subscriptions/plans | |
|
|
11
10
|
|
|
12
|
-
# **archivePlan**
|
|
13
|
-
> DeleteSubscriptionPlanResponse archivePlan()
|
|
14
|
-
|
|
15
|
-
Supprime (archive) un plan par productId (manager)
|
|
16
|
-
|
|
17
|
-
### Example
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import {
|
|
21
|
-
SubscriptionsManagerApi,
|
|
22
|
-
Configuration
|
|
23
|
-
} from '@tennac-booking/sdk';
|
|
24
|
-
|
|
25
|
-
const configuration = new Configuration();
|
|
26
|
-
const apiInstance = new SubscriptionsManagerApi(configuration);
|
|
27
|
-
|
|
28
|
-
let productId: string; // (default to undefined)
|
|
29
|
-
|
|
30
|
-
const { status, data } = await apiInstance.archivePlan(
|
|
31
|
-
productId
|
|
32
|
-
);
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Parameters
|
|
36
|
-
|
|
37
|
-
|Name | Type | Description | Notes|
|
|
38
|
-
|------------- | ------------- | ------------- | -------------|
|
|
39
|
-
| **productId** | [**string**] | | defaults to undefined|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Return type
|
|
43
|
-
|
|
44
|
-
**DeleteSubscriptionPlanResponse**
|
|
45
|
-
|
|
46
|
-
### Authorization
|
|
47
|
-
|
|
48
|
-
[bearerAuth](../README.md#bearerAuth)
|
|
49
|
-
|
|
50
|
-
### HTTP request headers
|
|
51
|
-
|
|
52
|
-
- **Content-Type**: Not defined
|
|
53
|
-
- **Accept**: application/json
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### HTTP response details
|
|
57
|
-
| Status code | Description | Response headers |
|
|
58
|
-
|-------------|-------------|------------------|
|
|
59
|
-
|**200** | Plan archivé | - |
|
|
60
|
-
|**400** | Bad Request | - |
|
|
61
|
-
|**401** | Unauthorized | - |
|
|
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
|
-
|
|
65
11
|
# **createPlan**
|
|
66
12
|
> CreatePlan201Response createPlan(createSubscriptionPlanRequest)
|
|
67
13
|
|
|
@@ -119,7 +65,7 @@ const { status, data } = await apiInstance.createPlan(
|
|
|
119
65
|
# **deletePlan**
|
|
120
66
|
> DeleteSubscriptionPlanResponse deletePlan()
|
|
121
67
|
|
|
122
|
-
Supprime un plan par productId (manager)
|
|
68
|
+
Supprime (archive) un plan par productId (manager)
|
|
123
69
|
|
|
124
70
|
### Example
|
|
125
71
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UserEventParticipation
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**event** | [**UserEventSummary**](UserEventSummary.md) | | [default to undefined]
|
|
9
|
+
**booking** | [**EventBookingDetailSummary**](EventBookingDetailSummary.md) | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { UserEventParticipation } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: UserEventParticipation = {
|
|
17
|
+
event,
|
|
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,44 @@
|
|
|
1
|
+
# UserEventSummary
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | | [default to undefined]
|
|
9
|
+
**clubId** | **string** | | [default to undefined]
|
|
10
|
+
**title** | **string** | | [default to undefined]
|
|
11
|
+
**description** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**photoUrl** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**startDate** | **string** | | [default to undefined]
|
|
14
|
+
**endDate** | **string** | | [default to undefined]
|
|
15
|
+
**participationType** | [**ParticipationType**](ParticipationType.md) | | [default to undefined]
|
|
16
|
+
**visibilityType** | [**VisibilityType**](VisibilityType.md) | | [default to undefined]
|
|
17
|
+
**isActive** | **boolean** | | [default to undefined]
|
|
18
|
+
**price** | **number** | | [optional] [default to undefined]
|
|
19
|
+
**sports** | **Array<string>** | | [optional] [default to undefined]
|
|
20
|
+
**courts** | **Array<string>** | | [optional] [default to undefined]
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { UserEventSummary } from '@tennac-booking/sdk';
|
|
26
|
+
|
|
27
|
+
const instance: UserEventSummary = {
|
|
28
|
+
id,
|
|
29
|
+
clubId,
|
|
30
|
+
title,
|
|
31
|
+
description,
|
|
32
|
+
photoUrl,
|
|
33
|
+
startDate,
|
|
34
|
+
endDate,
|
|
35
|
+
participationType,
|
|
36
|
+
visibilityType,
|
|
37
|
+
isActive,
|
|
38
|
+
price,
|
|
39
|
+
sports,
|
|
40
|
+
courts,
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[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
|
+
# UserEventsResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**total** | **number** | | [default to undefined]
|
|
9
|
+
**limit** | **number** | | [default to undefined]
|
|
10
|
+
**skip** | **number** | | [default to undefined]
|
|
11
|
+
**hasMore** | **boolean** | | [default to undefined]
|
|
12
|
+
**participations** | [**Array<UserEventParticipation>**](UserEventParticipation.md) | | [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { UserEventsResponse } from '@tennac-booking/sdk';
|
|
18
|
+
|
|
19
|
+
const instance: UserEventsResponse = {
|
|
20
|
+
total,
|
|
21
|
+
limit,
|
|
22
|
+
skip,
|
|
23
|
+
hasMore,
|
|
24
|
+
participations,
|
|
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)
|
package/docs/UsersApi.md
CHANGED
|
@@ -22,6 +22,7 @@ All URIs are relative to *http://localhost*
|
|
|
22
22
|
|[**getNearestUsersFromCoordinates**](#getnearestusersfromcoordinates) | **GET** /api/users/nearest-players/coordinates | |
|
|
23
23
|
|[**getPlayerCategories**](#getplayercategories) | **GET** /api/users/players/categories | |
|
|
24
24
|
|[**getUserBookings**](#getuserbookings) | **GET** /api/users/me/bookings | |
|
|
25
|
+
|[**getUserEvents**](#getuserevents) | **GET** /api/users/me/events | |
|
|
25
26
|
|[**getUserProfileById**](#getuserprofilebyid) | **GET** /api/users/profile/{id} | |
|
|
26
27
|
|[**listPlayers**](#listplayers) | **GET** /api/users/players | |
|
|
27
28
|
|[**login**](#login) | **POST** /api/users/login | |
|
|
@@ -911,6 +912,59 @@ const { status, data } = await apiInstance.getUserBookings(
|
|
|
911
912
|
- **Accept**: application/json
|
|
912
913
|
|
|
913
914
|
|
|
915
|
+
### HTTP response details
|
|
916
|
+
| Status code | Description | Response headers |
|
|
917
|
+
|-------------|-------------|------------------|
|
|
918
|
+
|**200** | Ok | - |
|
|
919
|
+
|
|
920
|
+
[[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)
|
|
921
|
+
|
|
922
|
+
# **getUserEvents**
|
|
923
|
+
> UserEventsResponse getUserEvents()
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
### Example
|
|
927
|
+
|
|
928
|
+
```typescript
|
|
929
|
+
import {
|
|
930
|
+
UsersApi,
|
|
931
|
+
Configuration
|
|
932
|
+
} from '@tennac-booking/sdk';
|
|
933
|
+
|
|
934
|
+
const configuration = new Configuration();
|
|
935
|
+
const apiInstance = new UsersApi(configuration);
|
|
936
|
+
|
|
937
|
+
let limit: number; // (optional) (default to undefined)
|
|
938
|
+
let skip: number; // (optional) (default to undefined)
|
|
939
|
+
|
|
940
|
+
const { status, data } = await apiInstance.getUserEvents(
|
|
941
|
+
limit,
|
|
942
|
+
skip
|
|
943
|
+
);
|
|
944
|
+
```
|
|
945
|
+
|
|
946
|
+
### Parameters
|
|
947
|
+
|
|
948
|
+
|Name | Type | Description | Notes|
|
|
949
|
+
|------------- | ------------- | ------------- | -------------|
|
|
950
|
+
| **limit** | [**number**] | | (optional) defaults to undefined|
|
|
951
|
+
| **skip** | [**number**] | | (optional) defaults to undefined|
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
### Return type
|
|
955
|
+
|
|
956
|
+
**UserEventsResponse**
|
|
957
|
+
|
|
958
|
+
### Authorization
|
|
959
|
+
|
|
960
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
961
|
+
|
|
962
|
+
### HTTP request headers
|
|
963
|
+
|
|
964
|
+
- **Content-Type**: Not defined
|
|
965
|
+
- **Accept**: application/json
|
|
966
|
+
|
|
967
|
+
|
|
914
968
|
### HTTP response details
|
|
915
969
|
| Status code | Description | Response headers |
|
|
916
970
|
|-------------|-------------|------------------|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# VisibilityType
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Enum
|
|
5
|
+
|
|
6
|
+
* `Public` (value: `'public'`)
|
|
7
|
+
|
|
8
|
+
* `Private` (value: `'private'`)
|
|
9
|
+
|
|
10
|
+
* `Invitation` (value: `'invitation'`)
|
|
11
|
+
|
|
12
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# SubscriptionPlanDiscountResponse
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**type** | [**DiscountType**](DiscountType.md) | | [default to undefined]
|
|
9
|
-
**percentage** | **number** | | [optional] [default to undefined]
|
|
10
|
-
**maxDiscountAmountInCents** | **number** | | [optional] [default to undefined]
|
|
11
|
-
**validFrom** | **string** | | [optional] [default to undefined]
|
|
12
|
-
**validTo** | **string** | | [optional] [default to undefined]
|
|
13
|
-
**offPeakRuleNames** | **Array<string>** | | [optional] [default to undefined]
|
|
14
|
-
**offPeakRules** | [**Array<OffPeakRule>**](OffPeakRule.md) | | [optional] [default to undefined]
|
|
15
|
-
**bookingFree** | **boolean** | | [optional] [default to undefined]
|
|
16
|
-
|
|
17
|
-
## Example
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { SubscriptionPlanDiscountResponse } from '@tennac-booking/sdk';
|
|
21
|
-
|
|
22
|
-
const instance: SubscriptionPlanDiscountResponse = {
|
|
23
|
-
type,
|
|
24
|
-
percentage,
|
|
25
|
-
maxDiscountAmountInCents,
|
|
26
|
-
validFrom,
|
|
27
|
-
validTo,
|
|
28
|
-
offPeakRuleNames,
|
|
29
|
-
offPeakRules,
|
|
30
|
-
bookingFree,
|
|
31
|
-
};
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|