"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRegistration = createRegistration;
exports.getRegistrations = getRegistrations;
exports.getRegistration = getRegistration;
exports.updateRegistration = updateRegistration;
exports.deleteRegistration = deleteRegistration;
const authenticate_request_1 = require("./utils/authenticate-request");
const orval_events_1 = require("./orval/api/orval-events");
/**
 * create an event registration
 *
 * @param {ICreateRegistrationParams} options
 * @return {Promise<IRegistration>}
 */
async function createRegistration(options) {
    options.token = await (0, authenticate_request_1.authenticateRequest)(options);
    return (0, orval_events_1.createRegistration)(options.data, options);
}
/**
 * get registrations
 *
 * @param {IGetRegistrationsParams} options
 * @return {Promise<IPagedRegistrationResponse>}
 */
async function getRegistrations(options) {
    options.token = await (0, authenticate_request_1.authenticateRequest)(options);
    return (0, orval_events_1.getRegistrations)(options.data, options);
}
/**
 * get a registration
 *
 * @param {IGetRegistrationParams} options
 * @return {Promise<IRegistration>}
 */
async function getRegistration(options) {
    options.token = await (0, authenticate_request_1.authenticateRequest)(options);
    return (0, orval_events_1.getRegistration)(options.registrationId, options);
}
/**
 * update a registration
 *
 * @param {IUpdateRegistrationParams} options
 * @return {Promise<IRegistration>}
 */
async function updateRegistration(options) {
    options.token = await (0, authenticate_request_1.authenticateRequest)(options);
    return (0, orval_events_1.updateRegistration)(options.registrationId, options.data, options);
}
/**
 * delete a registration
 *
 * @param {IDeleteRegistrationParams} options
 * @return {Promise<IRegistration>}
 */
async function deleteRegistration(options) {
    options.token = await (0, authenticate_request_1.authenticateRequest)(options);
    return (0, orval_events_1.deleteRegistration)(options.registrationId, options);
}
//# sourceMappingURL=registrations.js.map