@geonheeye/dooray-mcp 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +149 -0
- package/dist/api/client.d.ts +85 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +272 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/common.d.ts +14 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +25 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/drive.d.ts +22 -0
- package/dist/api/drive.d.ts.map +1 -0
- package/dist/api/drive.js +86 -0
- package/dist/api/drive.js.map +1 -0
- package/dist/api/messenger.d.ts +56 -0
- package/dist/api/messenger.d.ts.map +1 -0
- package/dist/api/messenger.js +49 -0
- package/dist/api/messenger.js.map +1 -0
- package/dist/api/projects.d.ts +147 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +485 -0
- package/dist/api/projects.js.map +1 -0
- package/dist/api/wiki.d.ts +38 -0
- package/dist/api/wiki.d.ts.map +1 -0
- package/dist/api/wiki.js +139 -0
- package/dist/api/wiki.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +736 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/common/get-my-member-info.d.ts +29 -0
- package/dist/tools/common/get-my-member-info.d.ts.map +1 -0
- package/dist/tools/common/get-my-member-info.js +95 -0
- package/dist/tools/common/get-my-member-info.js.map +1 -0
- package/dist/tools/drive/copy-drive-file.d.ts +62 -0
- package/dist/tools/drive/copy-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/copy-drive-file.js +91 -0
- package/dist/tools/drive/copy-drive-file.js.map +1 -0
- package/dist/tools/drive/create-drive-folder.d.ts +55 -0
- package/dist/tools/drive/create-drive-folder.d.ts.map +1 -0
- package/dist/tools/drive/create-drive-folder.js +91 -0
- package/dist/tools/drive/create-drive-folder.js.map +1 -0
- package/dist/tools/drive/delete-drive-file.d.ts +48 -0
- package/dist/tools/drive/delete-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/delete-drive-file.js +87 -0
- package/dist/tools/drive/delete-drive-file.js.map +1 -0
- package/dist/tools/drive/download-drive-file.d.ts +55 -0
- package/dist/tools/drive/download-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/download-drive-file.js +160 -0
- package/dist/tools/drive/download-drive-file.js.map +1 -0
- package/dist/tools/drive/get-drive-file-list.d.ts +77 -0
- package/dist/tools/drive/get-drive-file-list.d.ts.map +1 -0
- package/dist/tools/drive/get-drive-file-list.js +89 -0
- package/dist/tools/drive/get-drive-file-list.js.map +1 -0
- package/dist/tools/drive/get-drive-file-meta.d.ts +41 -0
- package/dist/tools/drive/get-drive-file-meta.d.ts.map +1 -0
- package/dist/tools/drive/get-drive-file-meta.js +74 -0
- package/dist/tools/drive/get-drive-file-meta.js.map +1 -0
- package/dist/tools/drive/get-drive-list.d.ts +63 -0
- package/dist/tools/drive/get-drive-list.d.ts.map +1 -0
- package/dist/tools/drive/get-drive-list.js +84 -0
- package/dist/tools/drive/get-drive-list.js.map +1 -0
- package/dist/tools/drive/move-drive-file.d.ts +55 -0
- package/dist/tools/drive/move-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/move-drive-file.js +92 -0
- package/dist/tools/drive/move-drive-file.js.map +1 -0
- package/dist/tools/drive/rename-drive-file.d.ts +55 -0
- package/dist/tools/drive/rename-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/rename-drive-file.js +88 -0
- package/dist/tools/drive/rename-drive-file.js.map +1 -0
- package/dist/tools/drive/update-drive-file.d.ts +55 -0
- package/dist/tools/drive/update-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/update-drive-file.js +119 -0
- package/dist/tools/drive/update-drive-file.js.map +1 -0
- package/dist/tools/drive/upload-drive-file.d.ts +55 -0
- package/dist/tools/drive/upload-drive-file.d.ts.map +1 -0
- package/dist/tools/drive/upload-drive-file.js +118 -0
- package/dist/tools/drive/upload-drive-file.js.map +1 -0
- package/dist/tools/messenger/get-channel-messages.d.ts +55 -0
- package/dist/tools/messenger/get-channel-messages.d.ts.map +1 -0
- package/dist/tools/messenger/get-channel-messages.js +115 -0
- package/dist/tools/messenger/get-channel-messages.js.map +1 -0
- package/dist/tools/messenger/get-channels.d.ts +30 -0
- package/dist/tools/messenger/get-channels.d.ts.map +1 -0
- package/dist/tools/messenger/get-channels.js +87 -0
- package/dist/tools/messenger/get-channels.js.map +1 -0
- package/dist/tools/messenger/send-channel-message.d.ts +48 -0
- package/dist/tools/messenger/send-channel-message.d.ts.map +1 -0
- package/dist/tools/messenger/send-channel-message.js +108 -0
- package/dist/tools/messenger/send-channel-message.js.map +1 -0
- package/dist/tools/messenger/send-direct-message.d.ts +48 -0
- package/dist/tools/messenger/send-direct-message.d.ts.map +1 -0
- package/dist/tools/messenger/send-direct-message.js +112 -0
- package/dist/tools/messenger/send-direct-message.js.map +1 -0
- package/dist/tools/projects/create-project-template.d.ts +305 -0
- package/dist/tools/projects/create-project-template.d.ts.map +1 -0
- package/dist/tools/projects/create-project-template.js +262 -0
- package/dist/tools/projects/create-project-template.js.map +1 -0
- package/dist/tools/projects/create-tag.d.ts +55 -0
- package/dist/tools/projects/create-tag.d.ts.map +1 -0
- package/dist/tools/projects/create-tag.js +134 -0
- package/dist/tools/projects/create-tag.js.map +1 -0
- package/dist/tools/projects/create-task-comment.d.ts +92 -0
- package/dist/tools/projects/create-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/create-task-comment.js +171 -0
- package/dist/tools/projects/create-task-comment.js.map +1 -0
- package/dist/tools/projects/create-task.d.ts +198 -0
- package/dist/tools/projects/create-task.d.ts.map +1 -0
- package/dist/tools/projects/create-task.js +230 -0
- package/dist/tools/projects/create-task.js.map +1 -0
- package/dist/tools/projects/delete-attachment.d.ts +55 -0
- package/dist/tools/projects/delete-attachment.d.ts.map +1 -0
- package/dist/tools/projects/delete-attachment.js +115 -0
- package/dist/tools/projects/delete-attachment.js.map +1 -0
- package/dist/tools/projects/delete-project-template.d.ts +48 -0
- package/dist/tools/projects/delete-project-template.d.ts.map +1 -0
- package/dist/tools/projects/delete-project-template.js +108 -0
- package/dist/tools/projects/delete-project-template.js.map +1 -0
- package/dist/tools/projects/download-attachment.d.ts +62 -0
- package/dist/tools/projects/download-attachment.d.ts.map +1 -0
- package/dist/tools/projects/download-attachment.js +195 -0
- package/dist/tools/projects/download-attachment.js.map +1 -0
- package/dist/tools/projects/get-attachment-list.d.ts +48 -0
- package/dist/tools/projects/get-attachment-list.d.ts.map +1 -0
- package/dist/tools/projects/get-attachment-list.js +118 -0
- package/dist/tools/projects/get-attachment-list.js.map +1 -0
- package/dist/tools/projects/get-attachment-metadata.d.ts +55 -0
- package/dist/tools/projects/get-attachment-metadata.d.ts.map +1 -0
- package/dist/tools/projects/get-attachment-metadata.js +120 -0
- package/dist/tools/projects/get-attachment-metadata.js.map +1 -0
- package/dist/tools/projects/get-milestone-list.d.ts +49 -0
- package/dist/tools/projects/get-milestone-list.d.ts.map +1 -0
- package/dist/tools/projects/get-milestone-list.js +112 -0
- package/dist/tools/projects/get-milestone-list.js.map +1 -0
- package/dist/tools/projects/get-project-list.d.ts +50 -0
- package/dist/tools/projects/get-project-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-list.js +113 -0
- package/dist/tools/projects/get-project-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts +55 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.js +127 -0
- package/dist/tools/projects/get-project-member-group-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-list.d.ts +66 -0
- package/dist/tools/projects/get-project-member-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-list.js +159 -0
- package/dist/tools/projects/get-project-member-list.js.map +1 -0
- package/dist/tools/projects/get-project-template-list.d.ts +55 -0
- package/dist/tools/projects/get-project-template-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template-list.js +127 -0
- package/dist/tools/projects/get-project-template-list.js.map +1 -0
- package/dist/tools/projects/get-project-template.d.ts +48 -0
- package/dist/tools/projects/get-project-template.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template.js +132 -0
- package/dist/tools/projects/get-project-template.js.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts +41 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.js +107 -0
- package/dist/tools/projects/get-project-workflow-list.js.map +1 -0
- package/dist/tools/projects/get-project.d.ts +41 -0
- package/dist/tools/projects/get-project.d.ts.map +1 -0
- package/dist/tools/projects/get-project.js +110 -0
- package/dist/tools/projects/get-project.js.map +1 -0
- package/dist/tools/projects/get-tag-list.d.ts +55 -0
- package/dist/tools/projects/get-tag-list.d.ts.map +1 -0
- package/dist/tools/projects/get-tag-list.js +145 -0
- package/dist/tools/projects/get-tag-list.js.map +1 -0
- package/dist/tools/projects/get-tag.d.ts +48 -0
- package/dist/tools/projects/get-tag.d.ts.map +1 -0
- package/dist/tools/projects/get-tag.js +124 -0
- package/dist/tools/projects/get-tag.js.map +1 -0
- package/dist/tools/projects/get-task-comment-list.d.ts +63 -0
- package/dist/tools/projects/get-task-comment-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-comment-list.js +136 -0
- package/dist/tools/projects/get-task-comment-list.js.map +1 -0
- package/dist/tools/projects/get-task-list.d.ts +184 -0
- package/dist/tools/projects/get-task-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-list.js +257 -0
- package/dist/tools/projects/get-task-list.js.map +1 -0
- package/dist/tools/projects/get-task.d.ts +48 -0
- package/dist/tools/projects/get-task.d.ts.map +1 -0
- package/dist/tools/projects/get-task.js +130 -0
- package/dist/tools/projects/get-task.js.map +1 -0
- package/dist/tools/projects/update-project-template.d.ts +312 -0
- package/dist/tools/projects/update-project-template.d.ts.map +1 -0
- package/dist/tools/projects/update-project-template.js +266 -0
- package/dist/tools/projects/update-project-template.js.map +1 -0
- package/dist/tools/projects/update-tag-group.d.ts +62 -0
- package/dist/tools/projects/update-tag-group.d.ts.map +1 -0
- package/dist/tools/projects/update-tag-group.js +162 -0
- package/dist/tools/projects/update-tag-group.js.map +1 -0
- package/dist/tools/projects/update-task-comment.d.ts +92 -0
- package/dist/tools/projects/update-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/update-task-comment.js +176 -0
- package/dist/tools/projects/update-task-comment.js.map +1 -0
- package/dist/tools/projects/update-task.d.ts +203 -0
- package/dist/tools/projects/update-task.d.ts.map +1 -0
- package/dist/tools/projects/update-task.js +261 -0
- package/dist/tools/projects/update-task.js.map +1 -0
- package/dist/tools/projects/upload-attachment.d.ts +55 -0
- package/dist/tools/projects/upload-attachment.d.ts.map +1 -0
- package/dist/tools/projects/upload-attachment.js +143 -0
- package/dist/tools/projects/upload-attachment.js.map +1 -0
- package/dist/tools/wiki/create-wiki-comment.d.ts +55 -0
- package/dist/tools/wiki/create-wiki-comment.d.ts.map +1 -0
- package/dist/tools/wiki/create-wiki-comment.js +72 -0
- package/dist/tools/wiki/create-wiki-comment.js.map +1 -0
- package/dist/tools/wiki/create-wiki-page.d.ts +127 -0
- package/dist/tools/wiki/create-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/create-wiki-page.js +116 -0
- package/dist/tools/wiki/create-wiki-page.js.map +1 -0
- package/dist/tools/wiki/delete-wiki-comment.d.ts +55 -0
- package/dist/tools/wiki/delete-wiki-comment.d.ts.map +1 -0
- package/dist/tools/wiki/delete-wiki-comment.js +72 -0
- package/dist/tools/wiki/delete-wiki-comment.js.map +1 -0
- package/dist/tools/wiki/delete-wiki-page-file.d.ts +55 -0
- package/dist/tools/wiki/delete-wiki-page-file.d.ts.map +1 -0
- package/dist/tools/wiki/delete-wiki-page-file.js +115 -0
- package/dist/tools/wiki/delete-wiki-page-file.js.map +1 -0
- package/dist/tools/wiki/download-wiki-attach-file.d.ts +55 -0
- package/dist/tools/wiki/download-wiki-attach-file.d.ts.map +1 -0
- package/dist/tools/wiki/download-wiki-attach-file.js +176 -0
- package/dist/tools/wiki/download-wiki-attach-file.js.map +1 -0
- package/dist/tools/wiki/download-wiki-page-file.d.ts +62 -0
- package/dist/tools/wiki/download-wiki-page-file.d.ts.map +1 -0
- package/dist/tools/wiki/download-wiki-page-file.js +189 -0
- package/dist/tools/wiki/download-wiki-page-file.js.map +1 -0
- package/dist/tools/wiki/get-wiki-comment-list.d.ts +62 -0
- package/dist/tools/wiki/get-wiki-comment-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-comment-list.js +74 -0
- package/dist/tools/wiki/get-wiki-comment-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-comment.d.ts +55 -0
- package/dist/tools/wiki/get-wiki-comment.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-comment.js +72 -0
- package/dist/tools/wiki/get-wiki-comment.js.map +1 -0
- package/dist/tools/wiki/get-wiki-list.d.ts +47 -0
- package/dist/tools/wiki/get-wiki-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-list.js +76 -0
- package/dist/tools/wiki/get-wiki-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts +48 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.js +70 -0
- package/dist/tools/wiki/get-wiki-page-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page.d.ts +48 -0
- package/dist/tools/wiki/get-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page.js +78 -0
- package/dist/tools/wiki/get-wiki-page.js.map +1 -0
- package/dist/tools/wiki/update-wiki-comment.d.ts +62 -0
- package/dist/tools/wiki/update-wiki-comment.d.ts.map +1 -0
- package/dist/tools/wiki/update-wiki-comment.js +74 -0
- package/dist/tools/wiki/update-wiki-comment.js.map +1 -0
- package/dist/tools/wiki/update-wiki-page.d.ts +117 -0
- package/dist/tools/wiki/update-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/update-wiki-page.js +111 -0
- package/dist/tools/wiki/update-wiki-page.js.map +1 -0
- package/dist/tools/wiki/upload-wiki-file.d.ts +49 -0
- package/dist/tools/wiki/upload-wiki-file.d.ts.map +1 -0
- package/dist/tools/wiki/upload-wiki-file.js +145 -0
- package/dist/tools/wiki/upload-wiki-file.js.map +1 -0
- package/dist/tools/wiki/upload-wiki-page-file.d.ts +55 -0
- package/dist/tools/wiki/upload-wiki-page-file.d.ts.map +1 -0
- package/dist/tools/wiki/upload-wiki-page-file.js +147 -0
- package/dist/tools/wiki/upload-wiki-page-file.js.map +1 -0
- package/dist/types/config.d.ts +18 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +6 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dooray-api.d.ts +717 -0
- package/dist/types/dooray-api.d.ts.map +1 -0
- package/dist/types/dooray-api.js +7 -0
- package/dist/types/dooray-api.js.map +1 -0
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +60 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +22 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/member-transform.d.ts +20 -0
- package/dist/utils/member-transform.d.ts.map +1 -0
- package/dist/utils/member-transform.js +48 -0
- package/dist/utils/member-transform.js.map +1 -0
- package/dist/utils/response-filters.d.ts +105 -0
- package/dist/utils/response-filters.d.ts.map +1 -0
- package/dist/utils/response-filters.js +152 -0
- package/dist/utils/response-filters.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Create Task Tool
|
|
4
|
+
* Create a new task in a project
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.createTaskTool = exports.createTaskSchema = void 0;
|
|
41
|
+
exports.createTaskHandler = createTaskHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const projectsApi = __importStar(require("../../api/projects.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
const member_transform_js_1 = require("../../utils/member-transform.js");
|
|
46
|
+
const memberSchema = zod_1.z.object({
|
|
47
|
+
id: zod_1.z.string(),
|
|
48
|
+
type: zod_1.z.enum(['member', 'group', 'email']),
|
|
49
|
+
});
|
|
50
|
+
const bodySchema = zod_1.z.object({
|
|
51
|
+
mimeType: zod_1.z.enum(['text/x-markdown', 'text/html']),
|
|
52
|
+
content: zod_1.z.string(),
|
|
53
|
+
});
|
|
54
|
+
exports.createTaskSchema = zod_1.z.object({
|
|
55
|
+
projectId: zod_1.z.string().describe('Project ID where the task will be created'),
|
|
56
|
+
parentPostId: zod_1.z.string().optional().describe('Parent task ID to create this as a subtask'),
|
|
57
|
+
isDraft: zod_1.z.boolean().optional().describe('Set to true to create a draft task (임시 업무) that can be continued in the browser. Default: false'),
|
|
58
|
+
subject: zod_1.z.string().describe('Task subject/title'),
|
|
59
|
+
body: bodySchema.optional().describe('Task body content'),
|
|
60
|
+
assignees: zod_1.z.array(memberSchema).optional().describe('List of assignees'),
|
|
61
|
+
cc: zod_1.z.array(memberSchema).optional().describe('List of CC recipients'),
|
|
62
|
+
dueDate: zod_1.z.string().optional().describe('Due date (ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ)'),
|
|
63
|
+
milestoneId: zod_1.z.string().optional().describe('Milestone ID'),
|
|
64
|
+
tagIds: zod_1.z.array(zod_1.z.string()).optional().describe('Array of tag IDs'),
|
|
65
|
+
priority: zod_1.z.enum(['highest', 'high', 'normal', 'low', 'lowest', 'none']).optional().describe('Task priority level'),
|
|
66
|
+
});
|
|
67
|
+
async function createTaskHandler(args) {
|
|
68
|
+
try {
|
|
69
|
+
const isDraft = args.isDraft || false;
|
|
70
|
+
const apiParams = {
|
|
71
|
+
projectId: args.projectId,
|
|
72
|
+
parentPostId: args.parentPostId,
|
|
73
|
+
subject: args.subject,
|
|
74
|
+
body: args.body,
|
|
75
|
+
users: {
|
|
76
|
+
to: (0, member_transform_js_1.transformMembers)(args.assignees),
|
|
77
|
+
cc: (0, member_transform_js_1.transformMembers)(args.cc),
|
|
78
|
+
},
|
|
79
|
+
dueDate: args.dueDate,
|
|
80
|
+
milestoneId: args.milestoneId,
|
|
81
|
+
tagIds: args.tagIds,
|
|
82
|
+
priority: args.priority,
|
|
83
|
+
};
|
|
84
|
+
if (isDraft) {
|
|
85
|
+
// Create draft task
|
|
86
|
+
const result = await projectsApi.createDraftTask(apiParams);
|
|
87
|
+
return {
|
|
88
|
+
content: [
|
|
89
|
+
{
|
|
90
|
+
type: 'text',
|
|
91
|
+
text: JSON.stringify({
|
|
92
|
+
id: result.id,
|
|
93
|
+
url: result.url,
|
|
94
|
+
message: 'Draft task created successfully. Open the URL in your browser to continue editing.',
|
|
95
|
+
}, null, 2),
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// Create regular task
|
|
102
|
+
const result = await projectsApi.createTask(apiParams);
|
|
103
|
+
return {
|
|
104
|
+
content: [
|
|
105
|
+
{
|
|
106
|
+
type: 'text',
|
|
107
|
+
text: JSON.stringify(result, null, 2),
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
return {
|
|
115
|
+
content: [
|
|
116
|
+
{
|
|
117
|
+
type: 'text',
|
|
118
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
isError: true,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.createTaskTool = {
|
|
126
|
+
name: 'create-task',
|
|
127
|
+
description: `Create a new task (업무) in a Dooray project. Required: projectId, subject.
|
|
128
|
+
|
|
129
|
+
**DRAFT vs REGULAR**: ASK USER which type to create:
|
|
130
|
+
- **Draft (isDraft: true)**: Returns URL to continue editing in browser. Use for complex tasks or when user wants to review.
|
|
131
|
+
- **Regular (isDraft: false, default)**: Saves immediately. Use when all info is available.
|
|
132
|
+
|
|
133
|
+
**INTERACTIVE WORKFLOW**:
|
|
134
|
+
1. **Templates**: Ask about get-project-template-list. If yes, use get-project-template for defaults.
|
|
135
|
+
2. **Content**: Get subject and body. If no template and no body, ask user for details.
|
|
136
|
+
3. **Assignees/CC**: Use get-my-member-info, get-project-member-list, or get-project-member-group-list. Format: {id, type: "member|group|email"}
|
|
137
|
+
4. **Tags**: Call get-tag-list. **CRITICAL**: Check mandatory tag groups - must select or creation fails (500 error). selectOne=true requires exactly ONE tag from group.
|
|
138
|
+
|
|
139
|
+
**Key Points**:
|
|
140
|
+
- Priority defaults to "none"
|
|
141
|
+
- Set parentPostId for subtasks (하위업무)
|
|
142
|
+
- Extract PROJECT_ID from URLs like "https://nhnent.dooray.com/task/PROJECT_ID"
|
|
143
|
+
|
|
144
|
+
**Examples**:
|
|
145
|
+
- Draft: {"projectId": "123", "subject": "Bug fix", "isDraft": true}
|
|
146
|
+
- Regular: {"projectId": "123", "subject": "Deploy", "assignees": [{"id": "user1", "type": "member"}], "tagIds": ["tag1"], "priority": "high"}
|
|
147
|
+
|
|
148
|
+
Returns: Task object (regular) or {id, url, message} (draft).`,
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: 'object',
|
|
151
|
+
properties: {
|
|
152
|
+
projectId: {
|
|
153
|
+
type: 'string',
|
|
154
|
+
description: 'Project ID where the task will be created',
|
|
155
|
+
},
|
|
156
|
+
parentPostId: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
description: 'Parent task ID to create this as a subtask (하위업무). Omit to create a regular task.',
|
|
159
|
+
},
|
|
160
|
+
isDraft: {
|
|
161
|
+
type: 'boolean',
|
|
162
|
+
description: 'Set to true to create a draft task (임시 업무) that can be continued in the browser. Returns a URL for further editing. Default: false (creates regular task).',
|
|
163
|
+
},
|
|
164
|
+
subject: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Task subject/title (required)',
|
|
167
|
+
},
|
|
168
|
+
body: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
properties: {
|
|
171
|
+
mimeType: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
enum: ['text/x-markdown', 'text/html'],
|
|
174
|
+
description: 'Content format',
|
|
175
|
+
},
|
|
176
|
+
content: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Task body content',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['mimeType', 'content'],
|
|
182
|
+
description: 'Task body with formatted content. IMPORTANT: If user has not provided body content and no template is selected, ask the user for task details/description before creating the task.',
|
|
183
|
+
},
|
|
184
|
+
assignees: {
|
|
185
|
+
type: 'array',
|
|
186
|
+
items: {
|
|
187
|
+
type: 'object',
|
|
188
|
+
properties: {
|
|
189
|
+
id: { type: 'string' },
|
|
190
|
+
type: { type: 'string', enum: ['member', 'group', 'email'] },
|
|
191
|
+
},
|
|
192
|
+
required: ['id', 'type'],
|
|
193
|
+
},
|
|
194
|
+
description: 'List of assignees (담당자). To get assignee options: (1) use get-my-member-info for current user, (2) use get-project-member-list for project members, (3) use get-project-member-group-list for member groups. Each assignee object has {id: string, type: "member"|"group"|"email"}.',
|
|
195
|
+
},
|
|
196
|
+
cc: {
|
|
197
|
+
type: 'array',
|
|
198
|
+
items: {
|
|
199
|
+
type: 'object',
|
|
200
|
+
properties: {
|
|
201
|
+
id: { type: 'string' },
|
|
202
|
+
type: { type: 'string', enum: ['member', 'group', 'email'] },
|
|
203
|
+
},
|
|
204
|
+
required: ['id', 'type'],
|
|
205
|
+
},
|
|
206
|
+
description: 'List of CC recipients (참조). To get CC options: (1) use get-my-member-info for current user, (2) use get-project-member-list for project members, (3) use get-project-member-group-list for member groups. Each CC object has {id: string, type: "member"|"group"|"email"}.',
|
|
207
|
+
},
|
|
208
|
+
dueDate: {
|
|
209
|
+
type: 'string',
|
|
210
|
+
description: 'Due date in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ)',
|
|
211
|
+
},
|
|
212
|
+
milestoneId: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Milestone ID to associate with this task',
|
|
215
|
+
},
|
|
216
|
+
tagIds: {
|
|
217
|
+
type: 'array',
|
|
218
|
+
items: { type: 'string' },
|
|
219
|
+
description: 'Array of tag IDs to apply to this task. IMPORTANT: Check for mandatory tag groups using get-tag-list tool. Projects may require specific tags from mandatory tag groups.',
|
|
220
|
+
},
|
|
221
|
+
priority: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
enum: ['highest', 'high', 'normal', 'low', 'lowest', 'none'],
|
|
224
|
+
description: 'Task priority level (highest, high, normal, low, lowest, none). Default: "none" if not specified by user.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
required: ['projectId', 'subject'],
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
//# sourceMappingURL=create-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../src/tools/projects/create-task.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,8CA2DC;AA1FD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AACpD,yEAAmE;AAEnE,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAClD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,OAAC,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EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;qBAC7D;oBACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;iBACzB;gBACD,WAAW,EAAE,qRAAqR;aACnS;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;qBAC7D;oBACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;iBACzB;gBACD,WAAW,EAAE,4QAA4Q;aAC1R;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,0KAA0K;aACxL;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC;gBAC5D,WAAW,EAAE,2GAA2G;aACzH;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;KACnC;CACF,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delete Attachment Tool
|
|
3
|
+
* Delete a file attachment from a task
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const deleteAttachmentSchema: z.ZodObject<{
|
|
7
|
+
projectId: z.ZodString;
|
|
8
|
+
taskId: z.ZodString;
|
|
9
|
+
fileId: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
projectId: string;
|
|
12
|
+
taskId: string;
|
|
13
|
+
fileId: string;
|
|
14
|
+
}, {
|
|
15
|
+
projectId: string;
|
|
16
|
+
taskId: string;
|
|
17
|
+
fileId: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type DeleteAttachmentInput = z.infer<typeof deleteAttachmentSchema>;
|
|
20
|
+
export declare function deleteAttachmentHandler(args: DeleteAttachmentInput): Promise<{
|
|
21
|
+
content: {
|
|
22
|
+
type: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}[];
|
|
25
|
+
isError?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
content: {
|
|
28
|
+
type: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
isError: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const deleteAttachmentTool: {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
projectId: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
taskId: {
|
|
44
|
+
type: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
fileId: {
|
|
48
|
+
type: string;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=delete-attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-attachment.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/delete-attachment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB;;;;;;;;;;;;GA8BxE;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAqChC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Delete Attachment Tool
|
|
4
|
+
* Delete a file attachment from a task
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.deleteAttachmentTool = exports.deleteAttachmentSchema = void 0;
|
|
41
|
+
exports.deleteAttachmentHandler = deleteAttachmentHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const projectsApi = __importStar(require("../../api/projects.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
exports.deleteAttachmentSchema = zod_1.z.object({
|
|
46
|
+
projectId: zod_1.z.string().describe('Project ID'),
|
|
47
|
+
taskId: zod_1.z.string().describe('Task ID (post ID)'),
|
|
48
|
+
fileId: zod_1.z.string().describe('File ID to delete'),
|
|
49
|
+
});
|
|
50
|
+
async function deleteAttachmentHandler(args) {
|
|
51
|
+
try {
|
|
52
|
+
await projectsApi.deleteTaskAttachment(args.projectId, args.taskId, args.fileId);
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: 'text',
|
|
57
|
+
text: JSON.stringify({
|
|
58
|
+
success: true,
|
|
59
|
+
message: `File ${args.fileId} successfully deleted from task.`,
|
|
60
|
+
}, null, 2),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return {
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: 'text',
|
|
70
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
isError: true,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.deleteAttachmentTool = {
|
|
78
|
+
name: 'delete-attachment',
|
|
79
|
+
description: `Delete a file attachment from a Dooray task.
|
|
80
|
+
|
|
81
|
+
**Required Parameters:**
|
|
82
|
+
- projectId: The project ID
|
|
83
|
+
- taskId: The task ID (post ID)
|
|
84
|
+
- fileId: The file ID to delete (get from get-attachment-list)
|
|
85
|
+
|
|
86
|
+
**Example:**
|
|
87
|
+
{
|
|
88
|
+
"projectId": "123456",
|
|
89
|
+
"taskId": "789012",
|
|
90
|
+
"fileId": "abc123"
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
**Returns:** Success message confirming deletion.
|
|
94
|
+
|
|
95
|
+
**Note:** This action is irreversible. The file will be permanently removed from the task.`,
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
projectId: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Project ID',
|
|
102
|
+
},
|
|
103
|
+
taskId: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Task ID (post ID)',
|
|
106
|
+
},
|
|
107
|
+
fileId: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'File ID to delete',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
required: ['projectId', 'taskId', 'fileId'],
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=delete-attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-attachment.js","sourceRoot":"","sources":["../../../src/tools/projects/delete-attachment.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcH,0DA8BC;AA1CD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AAEvC,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC5C,MAAM,E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QAAQ,CAAC;KAC5C;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delete Project Template Tool
|
|
3
|
+
* Delete an existing task template from a project
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const deleteProjectTemplateSchema: z.ZodObject<{
|
|
7
|
+
projectId: z.ZodString;
|
|
8
|
+
templateId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
projectId: string;
|
|
11
|
+
templateId: string;
|
|
12
|
+
}, {
|
|
13
|
+
projectId: string;
|
|
14
|
+
templateId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type DeleteProjectTemplateInput = z.infer<typeof deleteProjectTemplateSchema>;
|
|
17
|
+
export declare function deleteProjectTemplateHandler(args: DeleteProjectTemplateInput): Promise<{
|
|
18
|
+
content: {
|
|
19
|
+
type: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}[];
|
|
22
|
+
isError?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
content: {
|
|
25
|
+
type: string;
|
|
26
|
+
text: string;
|
|
27
|
+
}[];
|
|
28
|
+
isError: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const deleteProjectTemplateTool: {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
projectId: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
templateId: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
required: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=delete-project-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-project-template.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/delete-project-template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,0BAA0B;;;;;;;;;;;;GA0BlF;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;CA+BrC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Delete Project Template Tool
|
|
4
|
+
* Delete an existing task template from a project
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.deleteProjectTemplateTool = exports.deleteProjectTemplateSchema = void 0;
|
|
41
|
+
exports.deleteProjectTemplateHandler = deleteProjectTemplateHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const projectsApi = __importStar(require("../../api/projects.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
exports.deleteProjectTemplateSchema = zod_1.z.object({
|
|
46
|
+
projectId: zod_1.z.string().describe('Project ID where the template belongs'),
|
|
47
|
+
templateId: zod_1.z.string().describe('Template ID to delete'),
|
|
48
|
+
});
|
|
49
|
+
async function deleteProjectTemplateHandler(args) {
|
|
50
|
+
try {
|
|
51
|
+
await projectsApi.deleteProjectTemplate(args.projectId, args.templateId);
|
|
52
|
+
return {
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: JSON.stringify({
|
|
57
|
+
success: true,
|
|
58
|
+
message: 'Template deleted successfully',
|
|
59
|
+
}, null, 2),
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return {
|
|
66
|
+
content: [
|
|
67
|
+
{
|
|
68
|
+
type: 'text',
|
|
69
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
isError: true,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.deleteProjectTemplateTool = {
|
|
77
|
+
name: 'delete-project-template',
|
|
78
|
+
description: `Delete an existing task template from a Dooray project.
|
|
79
|
+
|
|
80
|
+
**CAUTION**: This action cannot be undone. Make sure you want to permanently delete the template.
|
|
81
|
+
|
|
82
|
+
**Required Fields**:
|
|
83
|
+
- projectId: Project ID where the template belongs
|
|
84
|
+
- templateId: Template ID to delete
|
|
85
|
+
|
|
86
|
+
**How to get template IDs**:
|
|
87
|
+
Use the \`get-project-template-list\` tool to list all templates and get their IDs.
|
|
88
|
+
|
|
89
|
+
**Example**:
|
|
90
|
+
- Delete template: {"projectId": "123456", "templateId": "789012"}
|
|
91
|
+
|
|
92
|
+
Returns success status.`,
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
projectId: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Project ID where the template belongs',
|
|
99
|
+
},
|
|
100
|
+
templateId: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Template ID to delete',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ['projectId', 'templateId'],
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=delete-project-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-project-template.js","sourceRoot":"","sources":["../../../src/tools/projects/delete-project-template.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaH,oEA0BC;AArCD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AAEvC,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACvE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CACzD,CAAC,CAAC;AAII,KAAK,UAAU,4BAA4B,CAAC,IAAgC;IACjF,IAAI,CAAC;QACH,MAAM,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEzE,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,+BAA+B;qBACzC,EAAE,IAAI,EAAE,CAAC,CAAC;iBACZ;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,IAAA,uBAAW,EAAC,KAAK,CAAC,EAAE;iBACrC;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,yBAAyB,GAAG;IACvC,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE;;;;;;;;;;;;;;wBAcS;IACtB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;KACtC;CACF,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Download Attachment Tool
|
|
3
|
+
* Download a file attachment from a task
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const downloadAttachmentSchema: z.ZodObject<{
|
|
7
|
+
projectId: z.ZodString;
|
|
8
|
+
taskId: z.ZodString;
|
|
9
|
+
fileId: z.ZodString;
|
|
10
|
+
savePath: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
projectId: string;
|
|
13
|
+
taskId: string;
|
|
14
|
+
fileId: string;
|
|
15
|
+
savePath?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
projectId: string;
|
|
18
|
+
taskId: string;
|
|
19
|
+
fileId: string;
|
|
20
|
+
savePath?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export type DownloadAttachmentInput = z.infer<typeof downloadAttachmentSchema>;
|
|
23
|
+
export declare function downloadAttachmentHandler(args: DownloadAttachmentInput): Promise<{
|
|
24
|
+
content: {
|
|
25
|
+
type: string;
|
|
26
|
+
text: string;
|
|
27
|
+
}[];
|
|
28
|
+
isError?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
content: {
|
|
31
|
+
type: string;
|
|
32
|
+
text: string;
|
|
33
|
+
}[];
|
|
34
|
+
isError: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const downloadAttachmentTool: {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
projectId: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
taskId: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
fileId: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
savePath: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=download-attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download-attachment.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/download-attachment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAwB/E,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,uBAAuB;;;;;;;;;;;;GA8E5E;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;CA8ClC,CAAC"}
|