"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.promptsLibraryRouter = void 0;
const express_1 = require("express");
const permissions_1 = require("../../util/config/permissions");
const create_prompts_library_1 = require("../controller/promptsLibrary/create-prompts-library");
const delete_prompts_library_1 = require("../controller/promptsLibrary/delete-prompts-library");
const archive_prompts_library_1 = require("../controller/promptsLibrary/archive-prompts-library");
const get_prompts_library_details_1 = require("../controller/promptsLibrary/get-prompts-library-details");
const get_prompts_library_list_1 = require("../controller/promptsLibrary/get-prompts-library-list");
const update_prompts_library_1 = require("../controller/promptsLibrary/update-prompts-library");
const permission_1 = require("../middlewares/permission");
exports.promptsLibraryRouter = (0, express_1.Router)();
exports.promptsLibraryRouter.get('/', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_READ), get_prompts_library_list_1.getPromptsLibraryList);
exports.promptsLibraryRouter.get('/can-create-prompts-library', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_READ), get_prompts_library_list_1.canCreatePromptsLibrary);
exports.promptsLibraryRouter.post('/', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_WRITE), create_prompts_library_1.createPromptsLibrary);
exports.promptsLibraryRouter.get('/details', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_READ), get_prompts_library_details_1.getPromptsLibraryDetails);
exports.promptsLibraryRouter.patch('/:libraryId', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_WRITE), update_prompts_library_1.updatePromptsLibrary);
exports.promptsLibraryRouter.patch('/:libraryId/archive', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_WRITE), archive_prompts_library_1.archivePromptsLibrary);
exports.promptsLibraryRouter.delete('/:libraryId', (0, permission_1.hasPermission)(permissions_1.Permission.PROMPT_LIBRARY_WRITE), delete_prompts_library_1.deletePromptsLibrary);
exports.default = exports.promptsLibraryRouter;
//# sourceMappingURL=promptsLibrary.js.map