"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteResource = exports.updateResource = exports.getResource = exports.searchResources = exports.createResource = exports.ICreateResourceEntityType = exports.ICreateResourceMimeType = exports.ResourceStatus = exports.AllowedResourceEntityType = exports.ResourceSort = exports.ResourceSortOrder = void 0;
/**
 * Generated by orval v6.31.0 🍺
 * Do not edit manually.
 * Hub Resources Service
 * OpenAPI spec version: 0.0.1
 */
const custom_client_1 = require("../custom-client");
var ResourceSortOrder;
(function (ResourceSortOrder) {
    ResourceSortOrder["asc"] = "asc";
    ResourceSortOrder["desc"] = "desc";
})(ResourceSortOrder || (exports.ResourceSortOrder = ResourceSortOrder = {}));
var ResourceSort;
(function (ResourceSort) {
    ResourceSort["createdAt"] = "createdAt";
    ResourceSort["updatedAt"] = "updatedAt";
})(ResourceSort || (exports.ResourceSort = ResourceSort = {}));
var AllowedResourceEntityType;
(function (AllowedResourceEntityType) {
    AllowedResourceEntityType["event"] = "event";
})(AllowedResourceEntityType || (exports.AllowedResourceEntityType = AllowedResourceEntityType = {}));
var ResourceStatus;
(function (ResourceStatus) {
    ResourceStatus["PENDING"] = "PENDING";
    ResourceStatus["UPLOADED"] = "UPLOADED";
    ResourceStatus["FAILED"] = "FAILED";
})(ResourceStatus || (exports.ResourceStatus = ResourceStatus = {}));
/**
 * MIME type of the resource
 */
var ICreateResourceMimeType;
(function (ICreateResourceMimeType) {
    ICreateResourceMimeType["image/jpeg"] = "image/jpeg";
    ICreateResourceMimeType["image/png"] = "image/png";
    ICreateResourceMimeType["image/webp"] = "image/webp";
})(ICreateResourceMimeType || (exports.ICreateResourceMimeType = ICreateResourceMimeType = {}));
/**
 * Type of entity associated with the resource
 */
var ICreateResourceEntityType;
(function (ICreateResourceEntityType) {
    ICreateResourceEntityType["event"] = "event";
})(ICreateResourceEntityType || (exports.ICreateResourceEntityType = ICreateResourceEntityType = {}));
/**
 * Create a new resource.
 */
const createResource = (iCreateResource, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/resources/v1/resources/init`,
        method: "POST",
        headers: { "Content-Type": "application/json" },
        data: iCreateResource,
    }, options);
};
exports.createResource = createResource;
/**
 * Search for resources matching request criteria.
 */
const searchResources = (params, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/resources/v1/resources`, method: "GET", params }, options);
};
exports.searchResources = searchResources;
/**
 * Get a single resource.
 */
const getResource = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/resources/v1/resources/${id}`, method: "GET" }, options);
};
exports.getResource = getResource;
/**
 * Update an existing resource.
 */
const updateResource = (id, updateResourceDto, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/resources/v1/resources/${id}`,
        method: "PATCH",
        headers: { "Content-Type": "application/json" },
        data: updateResourceDto,
    }, options);
};
exports.updateResource = updateResource;
/**
 * Delete an existing resource.
 */
const deleteResource = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/resources/v1/resources/${id}`, method: "DELETE" }, options);
};
exports.deleteResource = deleteResource;
//# sourceMappingURL=orval-resources.js.map