@@ -0,0 +1,34 @@
|
||||
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
|
||||
import { implement } from "@conusai-kit/core"
|
||||
import * as contract from "../contract/index.js"
|
||||
import * as tasks from "../core/tasks.js"
|
||||
import { activitiesServiceOf } from "./service.js"
|
||||
export const ACTIVITIES_PROCEDURES = [
|
||||
implement(contract.taskList, ({ ctx, input }) =>
|
||||
tasks.listTasks(activitiesServiceOf(ctx.container, ctx.kind), ctx.scope, input),
|
||||
),
|
||||
implement(contract.taskGet, ({ ctx, input }) =>
|
||||
tasks.ownedTask(activitiesServiceOf(ctx.container, ctx.kind), ctx.scope, input.taskId),
|
||||
),
|
||||
implement(contract.taskCreate, ({ ctx, input }) =>
|
||||
tasks.createTask(activitiesServiceOf(ctx.container, "effect"), ctx.scope, input),
|
||||
),
|
||||
implement(contract.taskUpdate, ({ ctx, input }) =>
|
||||
tasks.updateTask(activitiesServiceOf(ctx.container, "effect"), ctx.scope, input),
|
||||
),
|
||||
implement(contract.taskComplete, ({ ctx, input }) =>
|
||||
tasks.changeTask(activitiesServiceOf(ctx.container, "effect"), ctx.scope, input, "done"),
|
||||
),
|
||||
implement(contract.taskReopen, ({ ctx, input }) =>
|
||||
tasks.changeTask(activitiesServiceOf(ctx.container, "effect"), ctx.scope, input, "open"),
|
||||
),
|
||||
implement(contract.commentList, ({ ctx, input }) =>
|
||||
tasks.listComments(activitiesServiceOf(ctx.container, ctx.kind), ctx.scope, input),
|
||||
),
|
||||
implement(contract.commentAdd, ({ ctx, input }) =>
|
||||
tasks.addComment(activitiesServiceOf(ctx.container, "effect"), ctx.scope, input),
|
||||
),
|
||||
implement(contract.timeline, ({ ctx, input }) =>
|
||||
tasks.projectTimeline(activitiesServiceOf(ctx.container, ctx.kind), ctx.scope, input.after),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user