@jhl8041/dooray-mcp 0.1.0
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/.claude/settings.local.json +9 -0
- package/.serena/project.yml +84 -0
- package/CLAUDE.md +119 -0
- package/README.md +82 -0
- package/dist/api/client.d.ts +70 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +186 -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/projects.d.ts +83 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +300 -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 +95 -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 +227 -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/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 +191 -0
- package/dist/tools/projects/create-task.d.ts.map +1 -0
- package/dist/tools/projects/create-task.js +217 -0
- package/dist/tools/projects/create-task.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-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-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 +196 -0
- package/dist/tools/projects/update-task.d.ts.map +1 -0
- package/dist/tools/projects/update-task.js +227 -0
- package/dist/tools/projects/update-task.js.map +1 -0
- package/dist/tools/wiki/create-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/create-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/create-wiki-page.js +142 -0
- package/dist/tools/wiki/create-wiki-page.js.map +1 -0
- package/dist/tools/wiki/get-wiki-list.d.ts +58 -0
- package/dist/tools/wiki/get-wiki-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-list.js +118 -0
- package/dist/tools/wiki/get-wiki-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts +65 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.js +125 -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 +100 -0
- package/dist/tools/wiki/get-wiki-page.js.map +1 -0
- package/dist/tools/wiki/update-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/update-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/update-wiki-page.js +140 -0
- package/dist/tools/wiki/update-wiki-page.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 +387 -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 +121 -0
- package/dist/utils/response-filters.d.ts.map +1 -0
- package/dist/utils/response-filters.js +166 -0
- package/dist/utils/response-filters.js.map +1 -0
- package/dooray-mcp.iml +8 -0
- package/package.json +54 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get Wiki Page Tool
|
|
4
|
+
* Get full content of a wiki page
|
|
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.getWikiPageTool = exports.getWikiPageSchema = void 0;
|
|
41
|
+
exports.getWikiPageHandler = getWikiPageHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const wikiApi = __importStar(require("../../api/wiki.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
exports.getWikiPageSchema = zod_1.z.object({
|
|
46
|
+
wikiId: zod_1.z.string().describe('Wiki ID'),
|
|
47
|
+
pageId: zod_1.z.string().describe('Page ID'),
|
|
48
|
+
});
|
|
49
|
+
async function getWikiPageHandler(args) {
|
|
50
|
+
try {
|
|
51
|
+
const result = await wikiApi.getWikiPageContent(args.wikiId, args.pageId);
|
|
52
|
+
return {
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: JSON.stringify(result, null, 2),
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
isError: true,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.getWikiPageTool = {
|
|
74
|
+
name: 'get-wiki-page',
|
|
75
|
+
description: `Get full content of a wiki page.
|
|
76
|
+
|
|
77
|
+
This tool retrieves the complete content of a wiki page including its body (markdown or HTML).
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
- Get page content: {"wikiId": "123456", "pageId": "page789"}
|
|
81
|
+
|
|
82
|
+
Returns full page information including id, title, body (with mimeType and content), depth, timestamps, and author information.
|
|
83
|
+
|
|
84
|
+
The body content is formatted in either markdown (text/x-markdown) or HTML (text/html) as indicated by the mimeType field.`,
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
wikiId: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
description: 'Wiki ID where the page belongs',
|
|
91
|
+
},
|
|
92
|
+
pageId: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Page ID to retrieve',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
required: ['wikiId', 'pageId'],
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=get-wiki-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-page.js","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-page.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaH,gDAuBC;AAlCD,6BAAwB;AACxB,2DAA6C;AAC7C,qDA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+
* Update an existing wiki page
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const updateWikiPageSchema: z.ZodObject<{
|
|
7
|
+
wikiId: z.ZodString;
|
|
8
|
+
pageId: z.ZodString;
|
|
9
|
+
title: z.ZodOptional<z.ZodString>;
|
|
10
|
+
body: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
mimeType: z.ZodEnum<["text/x-markdown", "text/html"]>;
|
|
12
|
+
content: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
15
|
+
content: string;
|
|
16
|
+
}, {
|
|
17
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
18
|
+
content: string;
|
|
19
|
+
}>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
wikiId: string;
|
|
22
|
+
pageId: string;
|
|
23
|
+
body?: {
|
|
24
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
25
|
+
content: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
title?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
wikiId: string;
|
|
30
|
+
pageId: string;
|
|
31
|
+
body?: {
|
|
32
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
33
|
+
content: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type UpdateWikiPageInput = z.infer<typeof updateWikiPageSchema>;
|
|
38
|
+
export declare function updateWikiPageHandler(args: UpdateWikiPageInput): Promise<{
|
|
39
|
+
content: {
|
|
40
|
+
type: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
isError?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
content: {
|
|
46
|
+
type: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}[];
|
|
49
|
+
isError: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const updateWikiPageTool: {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
wikiId: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
pageId: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
title: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
body: {
|
|
70
|
+
type: string;
|
|
71
|
+
properties: {
|
|
72
|
+
mimeType: {
|
|
73
|
+
type: string;
|
|
74
|
+
enum: string[];
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
content: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
required: string[];
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=update-wiki-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-wiki-page.d.ts","sourceRoot":"","sources":["../../../src/tools/wiki/update-wiki-page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB;;;;;;;;;;;;GA0BpE;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyD9B,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Update Wiki Page Tool
|
|
4
|
+
* Update an existing wiki page
|
|
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.updateWikiPageTool = exports.updateWikiPageSchema = void 0;
|
|
41
|
+
exports.updateWikiPageHandler = updateWikiPageHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const wikiApi = __importStar(require("../../api/wiki.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
const bodySchema = zod_1.z.object({
|
|
46
|
+
mimeType: zod_1.z.enum(['text/x-markdown', 'text/html']),
|
|
47
|
+
content: zod_1.z.string(),
|
|
48
|
+
});
|
|
49
|
+
exports.updateWikiPageSchema = zod_1.z.object({
|
|
50
|
+
wikiId: zod_1.z.string().describe('Wiki ID'),
|
|
51
|
+
pageId: zod_1.z.string().describe('Page ID to update'),
|
|
52
|
+
title: zod_1.z.string().optional().describe('New page title'),
|
|
53
|
+
body: bodySchema.optional().describe('New page body content'),
|
|
54
|
+
});
|
|
55
|
+
async function updateWikiPageHandler(args) {
|
|
56
|
+
try {
|
|
57
|
+
const result = await wikiApi.updateWikiPage(args.wikiId, args.pageId, {
|
|
58
|
+
title: args.title,
|
|
59
|
+
body: args.body,
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
content: [
|
|
63
|
+
{
|
|
64
|
+
type: 'text',
|
|
65
|
+
text: JSON.stringify(result, null, 2),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
return {
|
|
72
|
+
content: [
|
|
73
|
+
{
|
|
74
|
+
type: 'text',
|
|
75
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
isError: true,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.updateWikiPageTool = {
|
|
83
|
+
name: 'update-wiki-page',
|
|
84
|
+
description: `Update an existing wiki page.
|
|
85
|
+
|
|
86
|
+
This tool modifies an existing wiki page. Provide only the fields you want to change.
|
|
87
|
+
|
|
88
|
+
Examples:
|
|
89
|
+
- Update title: {"wikiId": "123456", "pageId": "page789", "title": "New Title"}
|
|
90
|
+
- Update content: {
|
|
91
|
+
"wikiId": "123456",
|
|
92
|
+
"pageId": "page789",
|
|
93
|
+
"body": {"mimeType": "text/x-markdown", "content": "Updated content..."}
|
|
94
|
+
}
|
|
95
|
+
- Update both: {
|
|
96
|
+
"wikiId": "123456",
|
|
97
|
+
"pageId": "page789",
|
|
98
|
+
"title": "Updated Title",
|
|
99
|
+
"body": {"mimeType": "text/x-markdown", "content": "# Updated\\n\\nNew content"}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
Note: When updating the body, you must provide both mimeType and content.
|
|
103
|
+
|
|
104
|
+
Returns the updated page with all current details including version history.`,
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
wikiId: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'Wiki ID where the page belongs',
|
|
111
|
+
},
|
|
112
|
+
pageId: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Page ID to update',
|
|
115
|
+
},
|
|
116
|
+
title: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'New page title',
|
|
119
|
+
},
|
|
120
|
+
body: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
properties: {
|
|
123
|
+
mimeType: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
enum: ['text/x-markdown', 'text/html'],
|
|
126
|
+
description: 'Content format',
|
|
127
|
+
},
|
|
128
|
+
content: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
description: 'New page body content',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['mimeType', 'content'],
|
|
134
|
+
description: 'New page body with formatted content',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
required: ['wikiId', 'pageId'],
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=update-wiki-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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AAO;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,kBAAkB,GAAG;IAChC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;6EAoB8D;IAC3E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mBAAmB;aACjC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gBAAgB;aAC9B;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,iBAAiB,EAAE,WAAW,CAAC;wBACtC,WAAW,EAAE,gBAAgB;qBAC9B;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,uBAAuB;qBACrC;iBACF;gBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;gBACjC,WAAW,EAAE,sCAAsC;aACpD;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAC/B;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration types for Dooray MCP Server
|
|
3
|
+
*/
|
|
4
|
+
export interface DoorayConfig {
|
|
5
|
+
/** Dooray API authentication token */
|
|
6
|
+
apiToken: string;
|
|
7
|
+
/** Base URL for Dooray API (default: https://api.dooray.com) */
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DoorayHeaders {
|
|
11
|
+
/** Organization Member ID */
|
|
12
|
+
'X-Om-Id'?: string;
|
|
13
|
+
/** Tenant ID */
|
|
14
|
+
'X-Tnt-Id'?: string;
|
|
15
|
+
/** Organization ID */
|
|
16
|
+
'X-Org-Id'?: string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|