UNPKG

n8n-nodes-nextcloud-deck

Version:

n8n Node für die Integration mit Nextcloud Deck - AI Agent Tool Support

63 lines (62 loc) 2.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.deleteLabel = exports.updateLabel = exports.createLabel = exports.getLabel = exports.getLabels = exports.undoDeleteBoard = exports.deleteBoard = exports.updateBoard = exports.createBoard = exports.getBoard = exports.getBoards = void 0; const api_1 = require("../helpers/api"); async function getBoards() { const response = await api_1.nextcloudDeckApiRequest.call(this, 'GET', '/boards'); return response; } exports.getBoards = getBoards; async function getBoard(boardId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'GET', `/boards/${boardId}`); return response; } exports.getBoard = getBoard; async function createBoard(boardData) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'POST', '/boards', boardData); return response; } exports.createBoard = createBoard; async function updateBoard(boardData) { const { id, ...updateData } = boardData; const response = await api_1.nextcloudDeckApiRequest.call(this, 'PUT', `/boards/${id}`, updateData); return response; } exports.updateBoard = updateBoard; async function deleteBoard(boardId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'DELETE', `/boards/${boardId}`); return response; } exports.deleteBoard = deleteBoard; async function undoDeleteBoard(boardId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'POST', `/boards/${boardId}/undo_delete`); return response; } exports.undoDeleteBoard = undoDeleteBoard; async function getLabels(boardId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'GET', `/boards/${boardId}`); const board = response; return board.labels || []; } exports.getLabels = getLabels; async function getLabel(boardId, labelId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'GET', `/boards/${boardId}/labels/${labelId}`); return response; } exports.getLabel = getLabel; async function createLabel(boardId, labelData) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'POST', `/boards/${boardId}/labels`, labelData); return response; } exports.createLabel = createLabel; async function updateLabel(boardId, labelData) { const { id, ...updateData } = labelData; const response = await api_1.nextcloudDeckApiRequest.call(this, 'PUT', `/boards/${boardId}/labels/${id}`, updateData); return response; } exports.updateLabel = updateLabel; async function deleteLabel(boardId, labelId) { const response = await api_1.nextcloudDeckApiRequest.call(this, 'DELETE', `/boards/${boardId}/labels/${labelId}`); return response; } exports.deleteLabel = deleteLabel;