import { authenticateRequest } from "./utils/authenticate-request";
import { createResource as _createResource, getResource as _getResource, searchResources as _searchResources, deleteResource as _deleteResource, } from "./orval/api/orval-resources";
/**
 * create a resource
 *
 * @param {ICreateResourceParams} options
 * @return {Promise<IResource>}
 */
export async function createResource(options) {
    options.token = await authenticateRequest(options);
    return _createResource(options.data, options);
}
/**
 * get a resource by id
 *
 * @param {IGetResourceParams} options
 * @return {Promise<IResource>}
 */
export async function getResource(options) {
    options.token = await authenticateRequest(options);
    return _getResource(options.id, options);
}
/**
 * delete a resource by id
 *
 * @param {IDeleteResourceParams} options
 * @return {Promise<IResource>}
 */
export async function deleteResource(options) {
    options.token = await authenticateRequest(options);
    return _deleteResource(options.id, options);
}
/**
 * search resources
 *
 * @param {ISearchResourcesParams} options
 * @return {Promise<IResource>}
 */
export async function searchResources(options) {
    options.token = await authenticateRequest(options);
    return _searchResources(options.params, options);
}
//# sourceMappingURL=resources.js.map