Add Deck workflow automation Nextcloud app
Ports the standalone due-date cron script into a proper Nextcloud 34 app with a personal-settings UI, per-user workflow configuration (source/target stack, assigned-user and label filters, email notification), a TimedJob background runner, and Gitea CI pipelines. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
|
||||
function ocsUrl(path) {
|
||||
return generateOcsUrl(`apps/workflow_deck_automation/api/v1${path}`)
|
||||
}
|
||||
|
||||
export async function fetchWorkflows() {
|
||||
const { data } = await axios.get(ocsUrl('/workflows'))
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function createWorkflow(payload) {
|
||||
const { data } = await axios.post(ocsUrl('/workflows'), payload)
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function updateWorkflow(id, payload) {
|
||||
const { data } = await axios.put(ocsUrl(`/workflows/${id}`), payload)
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function deleteWorkflow(id) {
|
||||
await axios.delete(ocsUrl(`/workflows/${id}`))
|
||||
}
|
||||
|
||||
export async function fetchBoards() {
|
||||
const { data } = await axios.get(ocsUrl('/boards'))
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function fetchStacks(boardId) {
|
||||
const { data } = await axios.get(ocsUrl(`/boards/${boardId}/stacks`))
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function fetchLabels(boardId) {
|
||||
const { data } = await axios.get(ocsUrl(`/boards/${boardId}/labels`))
|
||||
return data.ocs.data
|
||||
}
|
||||
|
||||
export async function fetchParticipants(boardId) {
|
||||
const { data } = await axios.get(ocsUrl(`/boards/${boardId}/participants`))
|
||||
return data.ocs.data
|
||||
}
|
||||
Reference in New Issue
Block a user