UNPKG

@tennac-booking/sdk

Version:

OpenAPI client for @tennac-booking/sdk

619 lines (406 loc) 15.9 kB
# EventsManagerApi All URIs are relative to *http://localhost* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**applyEventNoShowFee**](#applyeventnoshowfee) | **POST** /api/events/{eventBookingId}/no-show | | |[**checkEventConflicts**](#checkeventconflicts) | **POST** /api/events/manager/checkConflicts | | |[**createEvent**](#createevent) | **POST** /api/events/manager/createEvent | | |[**deleteEvent**](#deleteevent) | **DELETE** /api/events/manager/deleteEvent/{eventId} | | |[**deleteEventSeries**](#deleteeventseries) | **DELETE** /api/events/manager/deleteSeries/{seriesId} | | |[**getExpiringRecurringDefinitions**](#getexpiringrecurringdefinitions) | **GET** /api/events/manager/recurring/expiring | | |[**publishEvent**](#publishevent) | **PUT** /api/events/manager/publishEvent/{eventId} | | |[**unpublishEvent**](#unpublishevent) | **PUT** /api/events/manager/unpublishEvent/{eventId} | | |[**updateEvent**](#updateevent) | **PUT** /api/events/manager/updateEvent/{eventId} | | |[**updatePublishedEvent**](#updatepublishedevent) | **PUT** /api/events/manager/updatePublishedEvent/{eventId} | | |[**updateRecurringDefinition**](#updaterecurringdefinition) | **PUT** /api/events/manager/recurring/{definitionId} | | # **applyEventNoShowFee** > NoShowFeeResponse applyEventNoShowFee() Appliquer des frais de no-show pour une réservation d\'événement ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventBookingId: string; // (default to undefined) const { status, data } = await apiInstance.applyEventNoShowFee( eventBookingId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **eventBookingId** | [**string**] | | defaults to undefined| ### Return type **NoShowFeeResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Frais de no-show appliqués avec succès | - | |**400** | Requête invalide | - | |**404** | Réservation d\&#39;événement non trouvée | - | |**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) # **checkEventConflicts** > EventConflictCheckResponse checkEventConflicts(eventConflictCheckRequest) Check if there are bookings overlapping an event window (for create/update/delete) ### Example ```typescript import { EventsManagerApi, Configuration, EventConflictCheckRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventConflictCheckRequest: EventConflictCheckRequest; // const { status, data } = await apiInstance.checkEventConflicts( eventConflictCheckRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **eventConflictCheckRequest** | **EventConflictCheckRequest**| | | ### Return type **EventConflictCheckResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Conflict counts retrieved | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | |**404** | Not Found | - | [[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) # **createEvent** > PublishEventResponse createEvent(createEventRequest) Create a new event (manager) ### Example ```typescript import { EventsManagerApi, Configuration, CreateEventRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let createEventRequest: CreateEventRequest; // const { status, data } = await apiInstance.createEvent( createEventRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **createEventRequest** | **CreateEventRequest**| | | ### Return type **PublishEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**201** | Event created | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | |**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) # **deleteEvent** > DeleteEventResponse deleteEvent() Delete an event (manager) ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventId: string; // (default to undefined) const { status, data } = await apiInstance.deleteEvent( eventId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **eventId** | [**string**] | | defaults to undefined| ### Return type **DeleteEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Event deleted | - | |**404** | Not Found | - | |**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) # **deleteEventSeries** > DeleteEventSeriesResponse deleteEventSeries() Delete all events of a series (manager) ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let seriesId: string; // (default to undefined) const { status, data } = await apiInstance.deleteEventSeries( seriesId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **seriesId** | [**string**] | | defaults to undefined| ### Return type **DeleteEventSeriesResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Event series deleted | - | |**400** | Bad Request | - | |**404** | Not Found | - | |**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) # **getExpiringRecurringDefinitions** > Array<RecurringDefinitionResponse> getExpiringRecurringDefinitions() List recurring definitions about to expire within `days` (manager) ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let days: number; // (optional) (default to undefined) const { status, data } = await apiInstance.getExpiringRecurringDefinitions( days ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **days** | [**number**] | | (optional) defaults to undefined| ### Return type **Array<RecurringDefinitionResponse>** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | List of expiring recurring definitions | - | [[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) # **publishEvent** > PublishEventResponse publishEvent() Publish an event (manager) ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventId: string; // (default to undefined) const { status, data } = await apiInstance.publishEvent( eventId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **eventId** | [**string**] | | defaults to undefined| ### Return type **PublishEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Event published | - | |**404** | Not Found | - | |**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) # **unpublishEvent** > PublishEventResponse unpublishEvent() Unpublish an event (manager) ### Example ```typescript import { EventsManagerApi, Configuration } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventId: string; // (default to undefined) const { status, data } = await apiInstance.unpublishEvent( eventId ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **eventId** | [**string**] | | defaults to undefined| ### Return type **PublishEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Event unpublished | - | |**404** | Not Found | - | |**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) # **updateEvent** > PublishEventResponse updateEvent(updateEventRequest) Update an event (manager) ### Example ```typescript import { EventsManagerApi, Configuration, UpdateEventRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventId: string; // (default to undefined) let updateEventRequest: UpdateEventRequest; // const { status, data } = await apiInstance.updateEvent( eventId, updateEventRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **updateEventRequest** | **UpdateEventRequest**| | | | **eventId** | [**string**] | | defaults to undefined| ### Return type **PublishEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Event updated | - | |**400** | Bad Request | - | |**404** | Not Found | - | |**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) # **updatePublishedEvent** > PublishEventResponse updatePublishedEvent(updateEventRequest) Update a published event (manager) and propagate slot changes and conflicts ### Example ```typescript import { EventsManagerApi, Configuration, UpdateEventRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let eventId: string; // (default to undefined) let updateEventRequest: UpdateEventRequest; // const { status, data } = await apiInstance.updatePublishedEvent( eventId, updateEventRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **updateEventRequest** | **UpdateEventRequest**| | | | **eventId** | [**string**] | | defaults to undefined| ### Return type **PublishEventResponse** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Published event updated | - | |**404** | Not Found | - | |**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) # **updateRecurringDefinition** > UpdateRecurringDefinition200Response updateRecurringDefinition(updateRecurringDefinitionRequest) Update a recurring event definition (manager) and propagate changes to generated Events ### Example ```typescript import { EventsManagerApi, Configuration, UpdateRecurringDefinitionRequest } from '@tennac-booking/sdk'; const configuration = new Configuration(); const apiInstance = new EventsManagerApi(configuration); let definitionId: string; // (default to undefined) let updateRecurringDefinitionRequest: UpdateRecurringDefinitionRequest; // const { status, data } = await apiInstance.updateRecurringDefinition( definitionId, updateRecurringDefinitionRequest ); ``` ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **updateRecurringDefinitionRequest** | **UpdateRecurringDefinitionRequest**| | | | **definitionId** | [**string**] | | defaults to undefined| ### Return type **UpdateRecurringDefinition200Response** ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Recurring definition updated | - | |**400** | Bad Request | - | |**404** | Not Found | - | [[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)