@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,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Wiki Page Tool
|
|
3
|
+
* Create a new wiki page
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const createWikiPageSchema: z.ZodObject<{
|
|
7
|
+
wikiId: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
body: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
mimeType: z.ZodEnum<["text/x-markdown", "text/html"]>;
|
|
11
|
+
content: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
14
|
+
content: string;
|
|
15
|
+
}, {
|
|
16
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
17
|
+
content: string;
|
|
18
|
+
}>>;
|
|
19
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
title: string;
|
|
22
|
+
wikiId: string;
|
|
23
|
+
body?: {
|
|
24
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
25
|
+
content: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
parentId?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
title: string;
|
|
30
|
+
wikiId: string;
|
|
31
|
+
body?: {
|
|
32
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
33
|
+
content: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
parentId?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type CreateWikiPageInput = z.infer<typeof createWikiPageSchema>;
|
|
38
|
+
export declare function createWikiPageHandler(args: CreateWikiPageInput): 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 createWikiPageTool: {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
wikiId: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
title: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
body: {
|
|
66
|
+
type: string;
|
|
67
|
+
properties: {
|
|
68
|
+
mimeType: {
|
|
69
|
+
type: string;
|
|
70
|
+
enum: string[];
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
content: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
required: string[];
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
parentId: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=create-wiki-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-wiki-page.d.ts","sourceRoot":"","sources":["../../../src/tools/wiki/create-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;;;;;;;;;;;;GA4BpE;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyD9B,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Create Wiki Page Tool
|
|
4
|
+
* Create a new 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.createWikiPageTool = exports.createWikiPageSchema = void 0;
|
|
41
|
+
exports.createWikiPageHandler = createWikiPageHandler;
|
|
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.createWikiPageSchema = zod_1.z.object({
|
|
50
|
+
wikiId: zod_1.z.string().describe('Wiki ID where the page will be created'),
|
|
51
|
+
title: zod_1.z.string().describe('Page title'),
|
|
52
|
+
body: bodySchema.optional().describe('Page body content'),
|
|
53
|
+
parentId: zod_1.z.string().optional().describe('Parent page ID (omit to create at root level)'),
|
|
54
|
+
});
|
|
55
|
+
async function createWikiPageHandler(args) {
|
|
56
|
+
try {
|
|
57
|
+
const result = await wikiApi.createWikiPage({
|
|
58
|
+
wikiId: args.wikiId,
|
|
59
|
+
title: args.title,
|
|
60
|
+
body: args.body,
|
|
61
|
+
parentId: args.parentId,
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: JSON.stringify(result, null, 2),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return {
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'text',
|
|
77
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
isError: true,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.createWikiPageTool = {
|
|
85
|
+
name: 'create-wiki-page',
|
|
86
|
+
description: `Create a new wiki page.
|
|
87
|
+
|
|
88
|
+
This tool creates a new page in a wiki. Pages can be created at the root level or as children of existing pages.
|
|
89
|
+
|
|
90
|
+
Examples:
|
|
91
|
+
- Create root page: {"wikiId": "123456", "title": "Getting Started"}
|
|
92
|
+
- Create page with content: {
|
|
93
|
+
"wikiId": "123456",
|
|
94
|
+
"title": "API Documentation",
|
|
95
|
+
"body": {"mimeType": "text/x-markdown", "content": "# API Docs\\n\\n## Endpoints"}
|
|
96
|
+
}
|
|
97
|
+
- Create child page: {
|
|
98
|
+
"wikiId": "123456",
|
|
99
|
+
"title": "Authentication",
|
|
100
|
+
"parentId": "page789",
|
|
101
|
+
"body": {"mimeType": "text/x-markdown", "content": "How to authenticate..."}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
Markdown (text/x-markdown) is recommended for most documentation. Use HTML (text/html) only if you need specific formatting.
|
|
105
|
+
|
|
106
|
+
Returns the created page with its assigned ID and all details.`,
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
wikiId: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'Wiki ID where the page will be created',
|
|
113
|
+
},
|
|
114
|
+
title: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
description: 'Page title (required)',
|
|
117
|
+
},
|
|
118
|
+
body: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
mimeType: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
enum: ['text/x-markdown', 'text/html'],
|
|
124
|
+
description: 'Content format (use text/x-markdown for most cases)',
|
|
125
|
+
},
|
|
126
|
+
content: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Page body content',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
required: ['mimeType', 'content'],
|
|
132
|
+
description: 'Page body with formatted content',
|
|
133
|
+
},
|
|
134
|
+
parentId: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'Parent page ID to create a child page (omit to create at root level)',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
required: ['wikiId', 'title'],
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=create-wiki-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-wiki-page.js","sourceRoot":"","sources":["../../../src/tools/wiki/create-wiki-page.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,sDA4BC;AA9CD,6BAAwB;AACxB,2DAA6C;AAC7C,qDAAoD;AAEpD,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAClD,OAAO,EAAE,OAAC,C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E,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;aACtD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;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,qDAAqD;qBACnE;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mBAAmB;qBACjC;iBACF;gBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;gBACjC,WAAW,EAAE,kCAAkC;aAChD;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Wiki List Tool
|
|
3
|
+
* Get list of wikis accessible by the user
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const getWikiListSchema: z.ZodObject<{
|
|
7
|
+
type: z.ZodOptional<z.ZodEnum<["project", "personal"]>>;
|
|
8
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type?: "project" | "personal" | undefined;
|
|
12
|
+
page?: number | undefined;
|
|
13
|
+
size?: number | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
type?: "project" | "personal" | undefined;
|
|
16
|
+
page?: number | undefined;
|
|
17
|
+
size?: number | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type GetWikiListInput = z.infer<typeof getWikiListSchema>;
|
|
20
|
+
export declare function getWikiListHandler(args: GetWikiListInput): 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 getWikiListTool: {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
type: {
|
|
40
|
+
type: string;
|
|
41
|
+
enum: string[];
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
page: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
minimum: number;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
minimum: number;
|
|
53
|
+
maximum: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=get-wiki-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-list.d.ts","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB;;;;;;;;;;;;GA8B9D;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAoC3B,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get Wiki List Tool
|
|
4
|
+
* Get list of wikis accessible by the user
|
|
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.getWikiListTool = exports.getWikiListSchema = void 0;
|
|
41
|
+
exports.getWikiListHandler = getWikiListHandler;
|
|
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 response_filters_js_1 = require("../../utils/response-filters.js");
|
|
46
|
+
exports.getWikiListSchema = zod_1.z.object({
|
|
47
|
+
type: zod_1.z.enum(['project', 'personal']).optional().describe('Filter by wiki type (project or personal)'),
|
|
48
|
+
page: zod_1.z.number().min(0).optional().describe('Page number for pagination (default: 0)'),
|
|
49
|
+
size: zod_1.z.number().min(1).max(100).optional().describe('Number of items per page (default: 20, max: 100)'),
|
|
50
|
+
});
|
|
51
|
+
async function getWikiListHandler(args) {
|
|
52
|
+
try {
|
|
53
|
+
const result = await wikiApi.getWikis({
|
|
54
|
+
type: args.type,
|
|
55
|
+
page: args.page,
|
|
56
|
+
size: args.size,
|
|
57
|
+
});
|
|
58
|
+
// Filter to compact response to reduce token usage
|
|
59
|
+
const compactResult = (0, response_filters_js_1.filterPaginatedResponse)(result, response_filters_js_1.filterWikiForList);
|
|
60
|
+
return {
|
|
61
|
+
content: [
|
|
62
|
+
{
|
|
63
|
+
type: 'text',
|
|
64
|
+
text: JSON.stringify(compactResult, null, 2),
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
return {
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
isError: true,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.getWikiListTool = {
|
|
82
|
+
name: 'get-wiki-list',
|
|
83
|
+
description: `List all wikis accessible by the authenticated user.
|
|
84
|
+
|
|
85
|
+
Wikis in Dooray can be either project-based (shared with team) or personal (private documentation).
|
|
86
|
+
|
|
87
|
+
**Note**: Returns compact response with essential fields only.
|
|
88
|
+
|
|
89
|
+
Examples:
|
|
90
|
+
- Get all wikis: {} (empty parameters)
|
|
91
|
+
- Get project wikis only: {"type": "project"}
|
|
92
|
+
- Get personal wikis only: {"type": "personal"}
|
|
93
|
+
- Get second page with 50 items: {"page": 1, "size": 50}
|
|
94
|
+
|
|
95
|
+
Returns a paginated list with wiki details including id, name, description, type, scope, and state.`,
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
type: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
enum: ['project', 'personal'],
|
|
102
|
+
description: 'Filter by wiki type',
|
|
103
|
+
},
|
|
104
|
+
page: {
|
|
105
|
+
type: 'number',
|
|
106
|
+
description: 'Page number for pagination (default: 0)',
|
|
107
|
+
minimum: 0,
|
|
108
|
+
},
|
|
109
|
+
size: {
|
|
110
|
+
type: 'number',
|
|
111
|
+
description: 'Number of items per page (default: 20, max: 100)',
|
|
112
|
+
minimum: 1,
|
|
113
|
+
maximum: 100,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=get-wiki-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-list.js","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-list.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeH,gDA8BC;AA3CD,6BAAwB;AACxB,2DAA6C;AAC7C,qDAAoD;AACpD,yEAA6F;AAEhF,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC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,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;gBAC7B,WAAW,EAAE,qBAAqB;aACnC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE,CAAC;aACX;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;gBAC/D,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,GAAG;aACb;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Wiki Page List Tool
|
|
3
|
+
* Get list of wiki pages in a wiki
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const getWikiPageListSchema: z.ZodObject<{
|
|
7
|
+
wikiId: z.ZodString;
|
|
8
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
wikiId: string;
|
|
13
|
+
page?: number | undefined;
|
|
14
|
+
size?: number | undefined;
|
|
15
|
+
parentId?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
wikiId: string;
|
|
18
|
+
page?: number | undefined;
|
|
19
|
+
size?: number | undefined;
|
|
20
|
+
parentId?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export type GetWikiPageListInput = z.infer<typeof getWikiPageListSchema>;
|
|
23
|
+
export declare function getWikiPageListHandler(args: GetWikiPageListInput): 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 getWikiPageListTool: {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
wikiId: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
parentId: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
page: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
minimum: number;
|
|
54
|
+
};
|
|
55
|
+
size: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
minimum: number;
|
|
59
|
+
maximum: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=get-wiki-page-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-page-list.d.ts","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-page-list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEzE,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;;;;;GA+BtE;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC/B,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get Wiki Page List Tool
|
|
4
|
+
* Get list of wiki pages in a wiki
|
|
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.getWikiPageListTool = exports.getWikiPageListSchema = void 0;
|
|
41
|
+
exports.getWikiPageListHandler = getWikiPageListHandler;
|
|
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 response_filters_js_1 = require("../../utils/response-filters.js");
|
|
46
|
+
exports.getWikiPageListSchema = zod_1.z.object({
|
|
47
|
+
wikiId: zod_1.z.string().describe('Wiki ID'),
|
|
48
|
+
parentId: zod_1.z.string().optional().describe('Parent page ID to get child pages (omit for root pages)'),
|
|
49
|
+
page: zod_1.z.number().min(0).optional().describe('Page number for pagination (default: 0)'),
|
|
50
|
+
size: zod_1.z.number().min(1).max(100).optional().describe('Number of items per page (default: 100, max: 100)'),
|
|
51
|
+
});
|
|
52
|
+
async function getWikiPageListHandler(args) {
|
|
53
|
+
try {
|
|
54
|
+
const result = await wikiApi.getWikiPages({
|
|
55
|
+
wikiId: args.wikiId,
|
|
56
|
+
parentId: args.parentId,
|
|
57
|
+
page: args.page,
|
|
58
|
+
size: args.size,
|
|
59
|
+
});
|
|
60
|
+
// Filter to compact response to reduce token usage
|
|
61
|
+
const compactResult = (0, response_filters_js_1.filterPaginatedResponse)(result, response_filters_js_1.filterWikiPageForList);
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: JSON.stringify(compactResult, null, 2),
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return {
|
|
73
|
+
content: [
|
|
74
|
+
{
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
isError: true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.getWikiPageListTool = {
|
|
84
|
+
name: 'get-wiki-page-list',
|
|
85
|
+
description: `Get list of wiki pages in a wiki.
|
|
86
|
+
|
|
87
|
+
Wiki pages are organized hierarchically. This tool lists pages at a specific level.
|
|
88
|
+
|
|
89
|
+
**Note**: Returns compact response with essential fields only. For complete page content, use get-wiki-page.
|
|
90
|
+
|
|
91
|
+
Examples:
|
|
92
|
+
- Get root pages: {"wikiId": "123456"}
|
|
93
|
+
- Get child pages of a specific page: {"wikiId": "123456", "parentId": "page789"}
|
|
94
|
+
- Get with pagination: {"wikiId": "123456", "page": 1, "size": 50}
|
|
95
|
+
|
|
96
|
+
Returns a paginated list with page details including id, title, hasChild, depth, order, and timestamps.
|
|
97
|
+
|
|
98
|
+
Note: Pages are returned without body content. Use get-wiki-page to fetch the full content.`,
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: {
|
|
102
|
+
wikiId: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Wiki ID to get pages from',
|
|
105
|
+
},
|
|
106
|
+
parentId: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Parent page ID to get child pages (omit for root level pages)',
|
|
109
|
+
},
|
|
110
|
+
page: {
|
|
111
|
+
type: 'number',
|
|
112
|
+
description: 'Page number for pagination (default: 0)',
|
|
113
|
+
minimum: 0,
|
|
114
|
+
},
|
|
115
|
+
size: {
|
|
116
|
+
type: 'number',
|
|
117
|
+
description: 'Number of items per page (default: 100, max: 100)',
|
|
118
|
+
minimum: 1,
|
|
119
|
+
maximum: 100,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: ['wikiId'],
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=get-wiki-page-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-page-list.js","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-page-list.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBH,wDA+BC;AA7CD,6BAAwB;AACxB,2DAA6C;AAC7C,qDAAoD;AACpD,yEAAiG;AAEpF,Q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,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;;;;;4FAa6E;IAC1F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2BAA2B;aACzC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE,CAAC;aACX;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;gBAChE,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,GAAG;aACb;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Wiki Page Tool
|
|
3
|
+
* Get full content of a wiki page
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const getWikiPageSchema: z.ZodObject<{
|
|
7
|
+
wikiId: z.ZodString;
|
|
8
|
+
pageId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
wikiId: string;
|
|
11
|
+
pageId: string;
|
|
12
|
+
}, {
|
|
13
|
+
wikiId: string;
|
|
14
|
+
pageId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type GetWikiPageInput = z.infer<typeof getWikiPageSchema>;
|
|
17
|
+
export declare function getWikiPageHandler(args: GetWikiPageInput): 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 getWikiPageTool: {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
wikiId: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
pageId: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
required: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=get-wiki-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-wiki-page.d.ts","sourceRoot":"","sources":["../../../src/tools/wiki/get-wiki-page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB;;;;;;;;;;;;GAuB9D;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CA0B3B,CAAC"}
|