@doist/todoist-ai 1.0.0 → 1.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/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +2 -0
- package/dist/tools/tasks-list-completed.d.ts +43 -0
- package/dist/tools/tasks-list-completed.d.ts.map +1 -0
- package/dist/tools/tasks-list-completed.js +52 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -266,6 +266,46 @@ declare const tools: {
|
|
|
266
266
|
nextCursor: string | null;
|
|
267
267
|
}>;
|
|
268
268
|
};
|
|
269
|
+
tasksListCompleted: {
|
|
270
|
+
name: string;
|
|
271
|
+
description: string;
|
|
272
|
+
parameters: {
|
|
273
|
+
getBy: import("zod").ZodDefault<import("zod").ZodEnum<["completion", "due"]>>;
|
|
274
|
+
since: import("zod").ZodString;
|
|
275
|
+
until: import("zod").ZodString;
|
|
276
|
+
workspaceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
277
|
+
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
278
|
+
sectionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
279
|
+
parentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
280
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
281
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
282
|
+
};
|
|
283
|
+
execute(args: {
|
|
284
|
+
limit: number;
|
|
285
|
+
getBy: "completion" | "due";
|
|
286
|
+
since: string;
|
|
287
|
+
until: string;
|
|
288
|
+
parentId?: string | undefined;
|
|
289
|
+
workspaceId?: string | undefined;
|
|
290
|
+
cursor?: string | undefined;
|
|
291
|
+
projectId?: string | undefined;
|
|
292
|
+
sectionId?: string | undefined;
|
|
293
|
+
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
294
|
+
tasks: {
|
|
295
|
+
id: string;
|
|
296
|
+
content: string;
|
|
297
|
+
description: string;
|
|
298
|
+
dueDate: string | undefined;
|
|
299
|
+
recurring: string | boolean;
|
|
300
|
+
priority: number;
|
|
301
|
+
projectId: string;
|
|
302
|
+
sectionId: string | null;
|
|
303
|
+
parentId: string | null;
|
|
304
|
+
labels: string[];
|
|
305
|
+
}[];
|
|
306
|
+
nextCursor: string | null;
|
|
307
|
+
}>;
|
|
308
|
+
};
|
|
269
309
|
tasksSearch: {
|
|
270
310
|
name: string;
|
|
271
311
|
description: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,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B,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,eAAe,GAClB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ const account_overview_1 = require("./tools/account-overview");
|
|
|
47
47
|
Object.defineProperty(exports, "accountOverview", { enumerable: true, get: function () { return account_overview_1.accountOverview; } });
|
|
48
48
|
const project_overview_1 = require("./tools/project-overview");
|
|
49
49
|
Object.defineProperty(exports, "projectOverview", { enumerable: true, get: function () { return project_overview_1.projectOverview; } });
|
|
50
|
+
const tasks_list_completed_1 = require("./tools/tasks-list-completed");
|
|
50
51
|
const tools = {
|
|
51
52
|
projectsList: projects_list_1.projectsList,
|
|
52
53
|
projectsSearch: projects_search_1.projectsSearch,
|
|
@@ -62,6 +63,7 @@ const tools = {
|
|
|
62
63
|
tasksCompleteMultiple: tasks_complete_multiple_1.tasksCompleteMultiple,
|
|
63
64
|
tasksListForProject: tasks_list_for_project_1.tasksListForProject,
|
|
64
65
|
tasksListOverdue: tasks_list_overdue_1.tasksListOverdue,
|
|
66
|
+
tasksListCompleted: tasks_list_completed_1.tasksListCompleted,
|
|
65
67
|
tasksSearch: tasks_search_1.tasksSearch,
|
|
66
68
|
tasksAddMultiple: tasks_add_multiple_1.tasksAddMultiple,
|
|
67
69
|
tasksUpdateOne: tasks_update_one_1.tasksUpdateOne,
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAkChE;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,aAsC5F;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -20,6 +20,7 @@ const tasks_add_multiple_1 = require("./tools/tasks-add-multiple");
|
|
|
20
20
|
const tasks_complete_multiple_1 = require("./tools/tasks-complete-multiple");
|
|
21
21
|
const tasks_delete_one_1 = require("./tools/tasks-delete-one");
|
|
22
22
|
const tasks_list_by_date_1 = require("./tools/tasks-list-by-date");
|
|
23
|
+
const tasks_list_completed_1 = require("./tools/tasks-list-completed");
|
|
23
24
|
const tasks_list_for_project_1 = require("./tools/tasks-list-for-project");
|
|
24
25
|
const tasks_list_for_section_1 = require("./tools/tasks-list-for-section");
|
|
25
26
|
const tasks_list_overdue_1 = require("./tools/tasks-list-overdue");
|
|
@@ -43,6 +44,7 @@ function getMcpServer({ todoistApiKey, baseUrl }) {
|
|
|
43
44
|
instructions,
|
|
44
45
|
});
|
|
45
46
|
const todoist = new todoist_api_typescript_1.TodoistApi(todoistApiKey, baseUrl);
|
|
47
|
+
(0, mcp_helpers_1.registerTool)(tasks_list_completed_1.tasksListCompleted, server, todoist);
|
|
46
48
|
(0, mcp_helpers_1.registerTool)(tasks_list_by_date_1.tasksListByDate, server, todoist);
|
|
47
49
|
(0, mcp_helpers_1.registerTool)(tasks_list_overdue_1.tasksListOverdue, server, todoist);
|
|
48
50
|
(0, mcp_helpers_1.registerTool)(tasks_list_for_project_1.tasksListForProject, server, todoist);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const tasksListCompleted: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
getBy: z.ZodDefault<z.ZodEnum<["completion", "due"]>>;
|
|
7
|
+
since: z.ZodString;
|
|
8
|
+
until: z.ZodString;
|
|
9
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
15
|
+
};
|
|
16
|
+
execute(args: {
|
|
17
|
+
limit: number;
|
|
18
|
+
getBy: "completion" | "due";
|
|
19
|
+
since: string;
|
|
20
|
+
until: string;
|
|
21
|
+
parentId?: string | undefined;
|
|
22
|
+
workspaceId?: string | undefined;
|
|
23
|
+
cursor?: string | undefined;
|
|
24
|
+
projectId?: string | undefined;
|
|
25
|
+
sectionId?: string | undefined;
|
|
26
|
+
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
27
|
+
tasks: {
|
|
28
|
+
id: string;
|
|
29
|
+
content: string;
|
|
30
|
+
description: string;
|
|
31
|
+
dueDate: string | undefined;
|
|
32
|
+
recurring: string | boolean;
|
|
33
|
+
priority: number;
|
|
34
|
+
projectId: string;
|
|
35
|
+
sectionId: string | null;
|
|
36
|
+
parentId: string | null;
|
|
37
|
+
labels: string[];
|
|
38
|
+
}[];
|
|
39
|
+
nextCursor: string | null;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
export { tasksListCompleted };
|
|
43
|
+
//# sourceMappingURL=tasks-list-completed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks-list-completed.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-completed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAwCvB,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAekB,CAAA;AAE1C,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tasksListCompleted = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("./shared");
|
|
6
|
+
const ArgsSchema = {
|
|
7
|
+
getBy: zod_1.z
|
|
8
|
+
.enum(['completion', 'due'])
|
|
9
|
+
.default('completion')
|
|
10
|
+
.describe('The method to use to get the tasks: "completion" to get tasks by completion date (ie, when the task was actually completed), "due" to get tasks by due date (ie, when the task was due to be completed by).'),
|
|
11
|
+
since: zod_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.date()
|
|
14
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
15
|
+
.describe('The start date to get the tasks for. Format: YYYY-MM-DD.'),
|
|
16
|
+
until: zod_1.z
|
|
17
|
+
.string()
|
|
18
|
+
.date()
|
|
19
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
20
|
+
.describe('The start date to get the tasks for. Format: YYYY-MM-DD.'),
|
|
21
|
+
workspaceId: zod_1.z.string().optional().describe('The ID of the workspace to get the tasks for.'),
|
|
22
|
+
projectId: zod_1.z.string().optional().describe('The ID of the project to get the tasks for.'),
|
|
23
|
+
sectionId: zod_1.z.string().optional().describe('The ID of the section to get the tasks for.'),
|
|
24
|
+
parentId: zod_1.z.string().optional().describe('The ID of the parent task to get the tasks for.'),
|
|
25
|
+
limit: zod_1.z
|
|
26
|
+
.number()
|
|
27
|
+
.int()
|
|
28
|
+
.min(1)
|
|
29
|
+
.max(200)
|
|
30
|
+
.default(50)
|
|
31
|
+
.describe('The maximum number of tasks to return. Default is 50, maximum is 200.'),
|
|
32
|
+
cursor: zod_1.z
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
36
|
+
};
|
|
37
|
+
const tasksListCompleted = {
|
|
38
|
+
name: 'tasks-list-completed',
|
|
39
|
+
description: 'Get completed tasks.',
|
|
40
|
+
parameters: ArgsSchema,
|
|
41
|
+
async execute(args, client) {
|
|
42
|
+
const { getBy, ...rest } = args;
|
|
43
|
+
const { items, nextCursor } = getBy === 'completion'
|
|
44
|
+
? await client.getCompletedTasksByCompletionDate(rest)
|
|
45
|
+
: await client.getCompletedTasksByDueDate(rest);
|
|
46
|
+
return {
|
|
47
|
+
tasks: items.map(shared_1.mapTask),
|
|
48
|
+
nextCursor,
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
exports.tasksListCompleted = tasksListCompleted;
|