import { authenticateRequest } from "./utils/authenticate-request";
import { createEvent as _createEvent, searchEvents as _searchEvents, getEvent as _getEvent, updateEvent as _updateEvent, deleteEvent as _deleteEvent, createEventResource as _createEventResource, deleteEventResource as _deleteEventResource, } from "./orval/api/orval-events";
/**
 * create an event
 *
 * @param {ICreateEventParams} options
 * @return {Promise<IEvent>}
 */
export async function createEvent(options) {
    options.token = await authenticateRequest(options);
    return _createEvent(options.data, options);
}
/**
 * search events
 *
 * @param {ISearchEventsParams} options
 * @return {Promise<IPagedEventResponse>}
 */
export async function searchEvents(options) {
    options.token = await authenticateRequest(options);
    return _searchEvents(options.data, options);
}
/**
 * get an event
 *
 * @param {IGetEventParams} options
 * @return {Promise<IEvent>}
 */
export async function getEvent(options) {
    options.token = await authenticateRequest(options);
    const params = options.include ? { include: options.include } : undefined;
    return _getEvent(options.eventId, params, options);
}
/**
 * update an event
 *
 * @param {IUpdateEventParams} options
 * @return {Promise<IEvent>}
 */
export async function updateEvent(options) {
    options.token = await authenticateRequest(options);
    return _updateEvent(options.eventId, options.data, options);
}
/**
 * delete an event
 *
 * @param {IDeleteEventParams} options
 * @return {Promise<IEvent>}
 */
export async function deleteEvent(options) {
    options.token = await authenticateRequest(options);
    return _deleteEvent(options.eventId, options);
}
/**
 * create an event resource
 *
 * @param {ICreateEventResourceParams} options
 * @return {Promise<IEvent>}
 */
export async function createEventResource(options) {
    options.token = await authenticateRequest(options);
    return _createEventResource(options.eventId, options.data, options);
}
/**
 * delete an event resource
 *
 * @param {IDeleteEventResourceParams} options
 * @return {Promise<IEvent>}
 */
export async function deleteEventResource(options) {
    options.token = await authenticateRequest(options);
    return _deleteEventResource(options.eventId, options.resourceId, options);
}
//# sourceMappingURL=events.js.map