@doist/todoist-ai 2.2.1 → 3.0.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/README.md +11 -3
- package/dist/index.d.ts +496 -255
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -29
- package/dist/mcp-helpers.d.ts +25 -3
- package/dist/mcp-helpers.d.ts.map +1 -1
- package/dist/mcp-helpers.js +37 -19
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +32 -28
- package/dist/tools/__tests__/add-tasks.test.d.ts +2 -0
- package/dist/tools/__tests__/add-tasks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{tasks-add-multiple.test.js → add-tasks.test.js} +85 -81
- package/dist/tools/__tests__/complete-tasks.test.d.ts +2 -0
- package/dist/tools/__tests__/complete-tasks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/complete-tasks.test.js +206 -0
- package/dist/tools/__tests__/delete-object.test.d.ts +2 -0
- package/dist/tools/__tests__/delete-object.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{delete-one.test.js → delete-object.test.js} +42 -22
- package/dist/tools/__tests__/find-completed-tasks.test.d.ts +2 -0
- package/dist/tools/__tests__/find-completed-tasks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{tasks-list-completed.test.js → find-completed-tasks.test.js} +13 -36
- package/dist/tools/__tests__/find-projects.test.d.ts +2 -0
- package/dist/tools/__tests__/find-projects.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{projects-list.test.js → find-projects.test.js} +55 -39
- package/dist/tools/__tests__/find-sections.test.d.ts +2 -0
- package/dist/tools/__tests__/find-sections.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{sections-search.test.js → find-sections.test.js} +64 -50
- package/dist/tools/__tests__/find-tasks-by-date.test.d.ts +2 -0
- package/dist/tools/__tests__/find-tasks-by-date.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{tasks-list-by-date.test.js → find-tasks-by-date.test.js} +96 -14
- package/dist/tools/__tests__/find-tasks.test.d.ts +2 -0
- package/dist/tools/__tests__/find-tasks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/find-tasks.test.js +334 -0
- package/dist/tools/__tests__/get-overview.test.d.ts +2 -0
- package/dist/tools/__tests__/get-overview.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{overview.test.js → get-overview.test.js} +77 -13
- package/dist/tools/__tests__/manage-projects.test.d.ts +2 -0
- package/dist/tools/__tests__/manage-projects.test.d.ts.map +1 -0
- package/dist/tools/__tests__/{projects-manage.test.js → manage-projects.test.js} +33 -30
- package/dist/tools/__tests__/manage-sections.test.d.ts +2 -0
- package/dist/tools/__tests__/manage-sections.test.d.ts.map +1 -0
- package/dist/tools/__tests__/manage-sections.test.js +162 -0
- package/dist/tools/__tests__/update-tasks.test.d.ts +2 -0
- package/dist/tools/__tests__/update-tasks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/update-tasks.test.js +645 -0
- package/dist/tools/{tasks-add-multiple.d.ts → add-tasks.d.ts} +36 -16
- package/dist/tools/add-tasks.d.ts.map +1 -0
- package/dist/tools/{tasks-add-multiple.js → add-tasks.js} +39 -4
- package/dist/tools/complete-tasks.d.ts +40 -0
- package/dist/tools/complete-tasks.d.ts.map +1 -0
- package/dist/tools/complete-tasks.js +68 -0
- package/dist/tools/delete-object.d.ts +38 -0
- package/dist/tools/delete-object.d.ts.map +1 -0
- package/dist/tools/delete-object.js +69 -0
- package/dist/tools/find-completed-tasks.d.ts +74 -0
- package/dist/tools/find-completed-tasks.d.ts.map +1 -0
- package/dist/tools/find-completed-tasks.js +112 -0
- package/dist/tools/find-projects.d.ts +53 -0
- package/dist/tools/find-projects.d.ts.map +1 -0
- package/dist/tools/find-projects.js +101 -0
- package/dist/tools/find-sections.d.ts +42 -0
- package/dist/tools/find-sections.d.ts.map +1 -0
- package/dist/tools/find-sections.js +96 -0
- package/dist/tools/find-tasks-by-date.d.ts +59 -0
- package/dist/tools/find-tasks-by-date.d.ts.map +1 -0
- package/dist/tools/find-tasks-by-date.js +121 -0
- package/dist/tools/find-tasks.d.ts +65 -0
- package/dist/tools/find-tasks.d.ts.map +1 -0
- package/dist/tools/find-tasks.js +182 -0
- package/dist/tools/get-overview.d.ts +67 -0
- package/dist/tools/get-overview.d.ts.map +1 -0
- package/dist/tools/{overview.js → get-overview.js} +66 -19
- package/dist/tools/manage-projects.d.ts +35 -0
- package/dist/tools/manage-projects.d.ts.map +1 -0
- package/dist/tools/manage-projects.js +63 -0
- package/dist/tools/manage-sections.d.ts +38 -0
- package/dist/tools/manage-sections.d.ts.map +1 -0
- package/dist/tools/manage-sections.js +78 -0
- package/dist/tools/update-tasks.d.ts +94 -0
- package/dist/tools/update-tasks.d.ts.map +1 -0
- package/dist/tools/update-tasks.js +120 -0
- package/dist/utils/constants.d.ts +35 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +37 -0
- package/dist/utils/response-builders.d.ts +88 -0
- package/dist/utils/response-builders.d.ts.map +1 -0
- package/dist/utils/response-builders.js +202 -0
- package/dist/{tools → utils}/test-helpers.d.ts +16 -0
- package/dist/utils/test-helpers.d.ts.map +1 -0
- package/dist/{tools → utils}/test-helpers.js +51 -0
- package/dist/utils/tool-names.d.ts +23 -0
- package/dist/utils/tool-names.d.ts.map +1 -0
- package/dist/utils/tool-names.js +25 -0
- package/package.json +2 -2
- package/dist/tools/__tests__/delete-one.test.d.ts +0 -2
- package/dist/tools/__tests__/delete-one.test.d.ts.map +0 -1
- package/dist/tools/__tests__/overview.test.d.ts +0 -2
- package/dist/tools/__tests__/overview.test.d.ts.map +0 -1
- package/dist/tools/__tests__/projects-list.test.d.ts +0 -2
- package/dist/tools/__tests__/projects-list.test.d.ts.map +0 -1
- package/dist/tools/__tests__/projects-manage.test.d.ts +0 -2
- package/dist/tools/__tests__/projects-manage.test.d.ts.map +0 -1
- package/dist/tools/__tests__/sections-manage.test.d.ts +0 -2
- package/dist/tools/__tests__/sections-manage.test.d.ts.map +0 -1
- package/dist/tools/__tests__/sections-manage.test.js +0 -138
- package/dist/tools/__tests__/sections-search.test.d.ts +0 -2
- package/dist/tools/__tests__/sections-search.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-add-multiple.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-add-multiple.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-complete-multiple.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-complete-multiple.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-complete-multiple.test.js +0 -146
- package/dist/tools/__tests__/tasks-list-by-date.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-list-by-date.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-list-completed.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-list-completed.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-list-for-container.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-list-for-container.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-list-for-container.test.js +0 -232
- package/dist/tools/__tests__/tasks-organize-multiple.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-organize-multiple.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-organize-multiple.test.js +0 -245
- package/dist/tools/__tests__/tasks-search.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-search.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-search.test.js +0 -106
- package/dist/tools/__tests__/tasks-update-one.test.d.ts +0 -2
- package/dist/tools/__tests__/tasks-update-one.test.d.ts.map +0 -1
- package/dist/tools/__tests__/tasks-update-one.test.js +0 -251
- package/dist/tools/delete-one.d.ts +0 -17
- package/dist/tools/delete-one.d.ts.map +0 -1
- package/dist/tools/delete-one.js +0 -25
- package/dist/tools/overview.d.ts +0 -14
- package/dist/tools/overview.d.ts.map +0 -1
- package/dist/tools/projects-list.d.ts +0 -29
- package/dist/tools/projects-list.d.ts.map +0 -1
- package/dist/tools/projects-list.js +0 -39
- package/dist/tools/projects-manage.d.ts +0 -24
- package/dist/tools/projects-manage.d.ts.map +0 -1
- package/dist/tools/projects-manage.js +0 -26
- package/dist/tools/sections-manage.d.ts +0 -23
- package/dist/tools/sections-manage.d.ts.map +0 -1
- package/dist/tools/sections-manage.js +0 -37
- package/dist/tools/sections-search.d.ts +0 -18
- package/dist/tools/sections-search.d.ts.map +0 -1
- package/dist/tools/sections-search.js +0 -27
- package/dist/tools/tasks-add-multiple.d.ts.map +0 -1
- package/dist/tools/tasks-complete-multiple.d.ts +0 -16
- package/dist/tools/tasks-complete-multiple.d.ts.map +0 -1
- package/dist/tools/tasks-complete-multiple.js +0 -23
- package/dist/tools/tasks-list-by-date.d.ts +0 -34
- package/dist/tools/tasks-list-by-date.d.ts.map +0 -1
- package/dist/tools/tasks-list-by-date.js +0 -53
- package/dist/tools/tasks-list-completed.d.ts +0 -44
- package/dist/tools/tasks-list-completed.d.ts.map +0 -1
- package/dist/tools/tasks-list-completed.js +0 -49
- package/dist/tools/tasks-list-for-container.d.ts +0 -34
- package/dist/tools/tasks-list-for-container.d.ts.map +0 -1
- package/dist/tools/tasks-list-for-container.js +0 -48
- package/dist/tools/tasks-organize-multiple.d.ts +0 -37
- package/dist/tools/tasks-organize-multiple.d.ts.map +0 -1
- package/dist/tools/tasks-organize-multiple.js +0 -34
- package/dist/tools/tasks-search.d.ts +0 -32
- package/dist/tools/tasks-search.d.ts.map +0 -1
- package/dist/tools/tasks-search.js +0 -30
- package/dist/tools/tasks-update-one.d.ts +0 -29
- package/dist/tools/tasks-update-one.d.ts.map +0 -1
- package/dist/tools/tasks-update-one.js +0 -63
- package/dist/tools/test-helpers.d.ts.map +0 -1
package/dist/tools/overview.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { TodoistApi } from '@doist/todoist-api-typescript';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
declare const overview: {
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
parameters: {
|
|
7
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
};
|
|
9
|
-
execute(args: {
|
|
10
|
-
projectId?: string | undefined;
|
|
11
|
-
}, client: TodoistApi): Promise<string>;
|
|
12
|
-
};
|
|
13
|
-
export { overview };
|
|
14
|
-
//# sourceMappingURL=overview.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../src/tools/overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,+BAA+B,CAAA;AACxE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+NvB,QAAA,MAAM,QAAQ;;;;;;;;;CAW4B,CAAA;AAE1C,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const projectsList: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
search: z.ZodOptional<z.ZodString>;
|
|
7
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
-
};
|
|
10
|
-
execute(args: {
|
|
11
|
-
limit: number;
|
|
12
|
-
cursor?: string | undefined;
|
|
13
|
-
search?: string | undefined;
|
|
14
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
15
|
-
projects: {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
color: string;
|
|
19
|
-
isFavorite: boolean;
|
|
20
|
-
isShared: boolean;
|
|
21
|
-
parentId: string | null;
|
|
22
|
-
inboxProject: boolean;
|
|
23
|
-
viewStyle: string;
|
|
24
|
-
}[];
|
|
25
|
-
nextCursor: string | null;
|
|
26
|
-
}>;
|
|
27
|
-
};
|
|
28
|
-
export { projectsList };
|
|
29
|
-
//# sourceMappingURL=projects-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects-list.d.ts","sourceRoot":"","sources":["../../src/tools/projects-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA0BvB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAmBwB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { mapProject } from '../tool-helpers.js';
|
|
3
|
-
const ArgsSchema = {
|
|
4
|
-
search: z
|
|
5
|
-
.string()
|
|
6
|
-
.optional()
|
|
7
|
-
.describe('Search for a project by name (partial and case insensitive match). If omitted, all projects are returned.'),
|
|
8
|
-
limit: z
|
|
9
|
-
.number()
|
|
10
|
-
.int()
|
|
11
|
-
.min(1)
|
|
12
|
-
.max(100)
|
|
13
|
-
.default(50)
|
|
14
|
-
.describe('The maximum number of projects to return.'),
|
|
15
|
-
cursor: z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe('The cursor to get the next page of projects (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
19
|
-
};
|
|
20
|
-
const projectsList = {
|
|
21
|
-
name: 'projects-list',
|
|
22
|
-
description: 'List all projects or search for projects by name. If search parameter is omitted, all projects are returned.',
|
|
23
|
-
parameters: ArgsSchema,
|
|
24
|
-
async execute(args, client) {
|
|
25
|
-
const { results, nextCursor } = await client.getProjects({
|
|
26
|
-
limit: args.limit,
|
|
27
|
-
cursor: args.cursor ?? null,
|
|
28
|
-
});
|
|
29
|
-
const searchLower = args.search ? args.search.toLowerCase() : undefined;
|
|
30
|
-
const filtered = searchLower
|
|
31
|
-
? results.filter((project) => project.name.toLowerCase().includes(searchLower))
|
|
32
|
-
: results;
|
|
33
|
-
return {
|
|
34
|
-
projects: filtered.map(mapProject),
|
|
35
|
-
nextCursor,
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export { projectsList };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const projectsManage: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
id: z.ZodOptional<z.ZodString>;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
};
|
|
9
|
-
execute(args: {
|
|
10
|
-
name: string;
|
|
11
|
-
id?: string | undefined;
|
|
12
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<import("@doist/todoist-api-typescript").WorkspaceProject | {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
color: string;
|
|
16
|
-
isFavorite: boolean;
|
|
17
|
-
isShared: boolean;
|
|
18
|
-
parentId: string | null;
|
|
19
|
-
inboxProject: boolean;
|
|
20
|
-
viewStyle: string;
|
|
21
|
-
}>;
|
|
22
|
-
};
|
|
23
|
-
export { projectsManage };
|
|
24
|
-
//# sourceMappingURL=projects-manage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects-manage.d.ts","sourceRoot":"","sources":["../../src/tools/projects-manage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;CAgBsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { mapProject } from '../tool-helpers.js';
|
|
3
|
-
const ArgsSchema = {
|
|
4
|
-
id: z
|
|
5
|
-
.string()
|
|
6
|
-
.min(1)
|
|
7
|
-
.optional()
|
|
8
|
-
.describe('The ID of the project to update. If provided, updates the project. If omitted, creates a new project.'),
|
|
9
|
-
name: z.string().min(1).describe('The name of the project.'),
|
|
10
|
-
};
|
|
11
|
-
const projectsManage = {
|
|
12
|
-
name: 'projects-manage',
|
|
13
|
-
description: 'Add a new project or update an existing project. If id is provided, updates the project. If id is omitted, creates a new project.',
|
|
14
|
-
parameters: ArgsSchema,
|
|
15
|
-
async execute(args, client) {
|
|
16
|
-
if (args.id) {
|
|
17
|
-
// Update existing project
|
|
18
|
-
const project = await client.updateProject(args.id, { name: args.name });
|
|
19
|
-
return project;
|
|
20
|
-
}
|
|
21
|
-
// Create new project
|
|
22
|
-
const project = await client.addProject({ name: args.name });
|
|
23
|
-
return mapProject(project);
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
export { projectsManage };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const sectionsManage: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
id: z.ZodOptional<z.ZodString>;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
9
|
-
};
|
|
10
|
-
execute(args: {
|
|
11
|
-
name: string;
|
|
12
|
-
id?: string | undefined;
|
|
13
|
-
projectId?: string | undefined;
|
|
14
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
15
|
-
isError: boolean;
|
|
16
|
-
content: {
|
|
17
|
-
type: "text";
|
|
18
|
-
text: string;
|
|
19
|
-
}[];
|
|
20
|
-
} | import("@doist/todoist-api-typescript").Section>;
|
|
21
|
-
};
|
|
22
|
-
export { sectionsManage };
|
|
23
|
-
//# sourceMappingURL=sections-manage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections-manage.d.ts","sourceRoot":"","sources":["../../src/tools/sections-manage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAsBvB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CA0BsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { errorContent } from '../mcp-helpers.js';
|
|
3
|
-
const ArgsSchema = {
|
|
4
|
-
id: z
|
|
5
|
-
.string()
|
|
6
|
-
.min(1)
|
|
7
|
-
.optional()
|
|
8
|
-
.describe('The ID of the section to update. If provided, updates the section. If omitted, creates a new section.'),
|
|
9
|
-
name: z.string().min(1).describe('The name of the section.'),
|
|
10
|
-
projectId: z
|
|
11
|
-
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.optional()
|
|
14
|
-
.describe('The ID of the project to add the section to. Required when creating a new section (when id is not provided).'),
|
|
15
|
-
};
|
|
16
|
-
const sectionsManage = {
|
|
17
|
-
name: 'sections-manage',
|
|
18
|
-
description: 'Add a new section to a project or update an existing section. If id is provided, updates the section. If id is omitted, creates a new section (requires projectId).',
|
|
19
|
-
parameters: ArgsSchema,
|
|
20
|
-
async execute(args, client) {
|
|
21
|
-
if (args.id) {
|
|
22
|
-
// Update existing section
|
|
23
|
-
const section = await client.updateSection(args.id, { name: args.name });
|
|
24
|
-
return section;
|
|
25
|
-
}
|
|
26
|
-
// Create new section - projectId is required
|
|
27
|
-
if (!args.projectId) {
|
|
28
|
-
return errorContent('Error: projectId is required when creating a new section (when id is not provided).');
|
|
29
|
-
}
|
|
30
|
-
const section = await client.addSection({
|
|
31
|
-
name: args.name,
|
|
32
|
-
projectId: args.projectId,
|
|
33
|
-
});
|
|
34
|
-
return section;
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
export { sectionsManage };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const sectionsSearch: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
projectId: z.ZodString;
|
|
7
|
-
search: z.ZodOptional<z.ZodString>;
|
|
8
|
-
};
|
|
9
|
-
execute(args: {
|
|
10
|
-
projectId: string;
|
|
11
|
-
search?: string | undefined;
|
|
12
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}[]>;
|
|
16
|
-
};
|
|
17
|
-
export { sectionsSearch };
|
|
18
|
-
//# sourceMappingURL=sections-search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections-search.d.ts","sourceRoot":"","sources":["../../src/tools/sections-search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAavB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAiBsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const ArgsSchema = {
|
|
3
|
-
projectId: z.string().min(1).describe('The ID of the project to search sections in.'),
|
|
4
|
-
search: z
|
|
5
|
-
.string()
|
|
6
|
-
.optional()
|
|
7
|
-
.describe('Search for a section by name (partial and case insensitive match). If omitted, all sections in the project are returned.'),
|
|
8
|
-
};
|
|
9
|
-
const sectionsSearch = {
|
|
10
|
-
name: 'sections-search',
|
|
11
|
-
description: 'Search for sections by name or other criteria in a project.',
|
|
12
|
-
parameters: ArgsSchema,
|
|
13
|
-
async execute(args, client) {
|
|
14
|
-
const { results } = await client.getSections({
|
|
15
|
-
projectId: args.projectId,
|
|
16
|
-
});
|
|
17
|
-
const searchLower = args.search ? args.search.toLowerCase() : undefined;
|
|
18
|
-
const filtered = searchLower
|
|
19
|
-
? results.filter((section) => section.name.toLowerCase().includes(searchLower))
|
|
20
|
-
: results;
|
|
21
|
-
return filtered.map((section) => ({
|
|
22
|
-
id: section.id,
|
|
23
|
-
name: section.name,
|
|
24
|
-
}));
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
export { sectionsSearch };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-add-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-add-multiple.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAyBvB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCoB,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksCompleteMultiple: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
ids: z.ZodArray<z.ZodString, "many">;
|
|
7
|
-
};
|
|
8
|
-
execute(args: {
|
|
9
|
-
ids: string[];
|
|
10
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
11
|
-
success: boolean;
|
|
12
|
-
completed: string[];
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
|
-
export { tasksCompleteMultiple };
|
|
16
|
-
//# sourceMappingURL=tasks-complete-multiple.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-complete-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-complete-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;CAgBe,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const ArgsSchema = {
|
|
3
|
-
ids: z.array(z.string().min(1)).min(1).describe('The IDs of the tasks to complete.'),
|
|
4
|
-
};
|
|
5
|
-
const tasksCompleteMultiple = {
|
|
6
|
-
name: 'tasks-complete-multiple',
|
|
7
|
-
description: 'Complete one or more tasks by their IDs.',
|
|
8
|
-
parameters: ArgsSchema,
|
|
9
|
-
async execute(args, client) {
|
|
10
|
-
const completed = [];
|
|
11
|
-
for (const id of args.ids) {
|
|
12
|
-
try {
|
|
13
|
-
await client.closeTask(id);
|
|
14
|
-
completed.push(id);
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
// Ignore errors for individual tasks, continue with others
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return { success: true, completed };
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export { tasksCompleteMultiple };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksListByDate: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
startDate: z.ZodString;
|
|
7
|
-
daysCount: z.ZodDefault<z.ZodNumber>;
|
|
8
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
9
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
10
|
-
};
|
|
11
|
-
execute(args: {
|
|
12
|
-
limit: number;
|
|
13
|
-
startDate: string;
|
|
14
|
-
daysCount: number;
|
|
15
|
-
cursor?: string | undefined;
|
|
16
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
17
|
-
tasks: {
|
|
18
|
-
id: string;
|
|
19
|
-
content: string;
|
|
20
|
-
description: string;
|
|
21
|
-
dueDate: string | undefined;
|
|
22
|
-
recurring: string | boolean;
|
|
23
|
-
priority: number;
|
|
24
|
-
projectId: string;
|
|
25
|
-
sectionId: string | null;
|
|
26
|
-
parentId: string | null;
|
|
27
|
-
labels: string[];
|
|
28
|
-
duration: string | null;
|
|
29
|
-
}[];
|
|
30
|
-
nextCursor: string | null;
|
|
31
|
-
}>;
|
|
32
|
-
};
|
|
33
|
-
export { tasksListByDate };
|
|
34
|
-
//# sourceMappingURL=tasks-list-by-date.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-list-by-date.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-by-date.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmCvB,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BqB,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { addDays, formatISO } from 'date-fns';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { getTasksByFilter } from '../tool-helpers.js';
|
|
4
|
-
const ArgsSchema = {
|
|
5
|
-
startDate: z
|
|
6
|
-
.string()
|
|
7
|
-
.regex(/^(\d{4}-\d{2}-\d{2}|today|overdue)$/)
|
|
8
|
-
.describe("The start date to get the tasks for. Format: YYYY-MM-DD, 'today', or 'overdue'."),
|
|
9
|
-
daysCount: z
|
|
10
|
-
.number()
|
|
11
|
-
.int()
|
|
12
|
-
.min(1)
|
|
13
|
-
.max(30)
|
|
14
|
-
.default(1)
|
|
15
|
-
.describe("The number of days to get the tasks for, starting from the start date. Ignored when startDate is 'overdue'."),
|
|
16
|
-
limit: z
|
|
17
|
-
.number()
|
|
18
|
-
.int()
|
|
19
|
-
.min(1)
|
|
20
|
-
.max(50)
|
|
21
|
-
.default(10)
|
|
22
|
-
.describe('The maximum number of tasks to return.'),
|
|
23
|
-
cursor: z
|
|
24
|
-
.string()
|
|
25
|
-
.optional()
|
|
26
|
-
.describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
27
|
-
};
|
|
28
|
-
const tasksListByDate = {
|
|
29
|
-
name: 'tasks-list-by-date',
|
|
30
|
-
description: "Get tasks by date range or overdue tasks. Use startDate 'overdue' for overdue tasks, or provide a date/date range.",
|
|
31
|
-
parameters: ArgsSchema,
|
|
32
|
-
async execute(args, client) {
|
|
33
|
-
let query;
|
|
34
|
-
if (args.startDate === 'overdue') {
|
|
35
|
-
query = 'overdue';
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
const startDate = args.startDate === 'today'
|
|
39
|
-
? formatISO(new Date(), { representation: 'date' })
|
|
40
|
-
: args.startDate;
|
|
41
|
-
const endDate = addDays(startDate, args.daysCount + 1);
|
|
42
|
-
const endDateStr = formatISO(endDate, { representation: 'date' });
|
|
43
|
-
query = `(due after: ${startDate} | due: ${startDate}) & due before: ${endDateStr}`;
|
|
44
|
-
}
|
|
45
|
-
return await getTasksByFilter({
|
|
46
|
-
client,
|
|
47
|
-
query,
|
|
48
|
-
cursor: args.cursor,
|
|
49
|
-
limit: args.limit,
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
export { tasksListByDate };
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
projectId?: string | undefined;
|
|
24
|
-
sectionId?: string | undefined;
|
|
25
|
-
cursor?: 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
|
-
duration: string | null;
|
|
39
|
-
}[];
|
|
40
|
-
nextCursor: string | null;
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
export { tasksListCompleted };
|
|
44
|
-
//# sourceMappingURL=tasks-list-completed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { mapTask } from '../tool-helpers.js';
|
|
3
|
-
const ArgsSchema = {
|
|
4
|
-
getBy: z
|
|
5
|
-
.enum(['completion', 'due'])
|
|
6
|
-
.default('completion')
|
|
7
|
-
.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).'),
|
|
8
|
-
since: z
|
|
9
|
-
.string()
|
|
10
|
-
.date()
|
|
11
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
12
|
-
.describe('The start date to get the tasks for. Format: YYYY-MM-DD.'),
|
|
13
|
-
until: z
|
|
14
|
-
.string()
|
|
15
|
-
.date()
|
|
16
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
17
|
-
.describe('The start date to get the tasks for. Format: YYYY-MM-DD.'),
|
|
18
|
-
workspaceId: z.string().optional().describe('The ID of the workspace to get the tasks for.'),
|
|
19
|
-
projectId: z.string().optional().describe('The ID of the project to get the tasks for.'),
|
|
20
|
-
sectionId: z.string().optional().describe('The ID of the section to get the tasks for.'),
|
|
21
|
-
parentId: z.string().optional().describe('The ID of the parent task to get the tasks for.'),
|
|
22
|
-
limit: z
|
|
23
|
-
.number()
|
|
24
|
-
.int()
|
|
25
|
-
.min(1)
|
|
26
|
-
.max(200)
|
|
27
|
-
.default(50)
|
|
28
|
-
.describe('The maximum number of tasks to return. Default is 50, maximum is 200.'),
|
|
29
|
-
cursor: z
|
|
30
|
-
.string()
|
|
31
|
-
.optional()
|
|
32
|
-
.describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
33
|
-
};
|
|
34
|
-
const tasksListCompleted = {
|
|
35
|
-
name: 'tasks-list-completed',
|
|
36
|
-
description: 'Get completed tasks.',
|
|
37
|
-
parameters: ArgsSchema,
|
|
38
|
-
async execute(args, client) {
|
|
39
|
-
const { getBy, ...rest } = args;
|
|
40
|
-
const { items, nextCursor } = getBy === 'completion'
|
|
41
|
-
? await client.getCompletedTasksByCompletionDate(rest)
|
|
42
|
-
: await client.getCompletedTasksByDueDate(rest);
|
|
43
|
-
return {
|
|
44
|
-
tasks: items.map(mapTask),
|
|
45
|
-
nextCursor,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
export { tasksListCompleted };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksListForContainer: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
type: z.ZodEnum<["project", "section", "parent"]>;
|
|
7
|
-
id: z.ZodString;
|
|
8
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
9
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
10
|
-
};
|
|
11
|
-
execute(args: {
|
|
12
|
-
type: "project" | "section" | "parent";
|
|
13
|
-
id: string;
|
|
14
|
-
limit: number;
|
|
15
|
-
cursor?: string | undefined;
|
|
16
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
17
|
-
tasks: {
|
|
18
|
-
id: string;
|
|
19
|
-
content: string;
|
|
20
|
-
description: string;
|
|
21
|
-
dueDate: string | undefined;
|
|
22
|
-
recurring: string | boolean;
|
|
23
|
-
priority: number;
|
|
24
|
-
projectId: string;
|
|
25
|
-
sectionId: string | null;
|
|
26
|
-
parentId: string | null;
|
|
27
|
-
labels: string[];
|
|
28
|
-
duration: string | null;
|
|
29
|
-
}[];
|
|
30
|
-
nextCursor: string | null;
|
|
31
|
-
}>;
|
|
32
|
-
};
|
|
33
|
-
export { tasksListForContainer };
|
|
34
|
-
//# sourceMappingURL=tasks-list-for-container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-list-for-container.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAwBvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Be,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { mapTask } from '../tool-helpers.js';
|
|
3
|
-
const ArgsSchema = {
|
|
4
|
-
type: z
|
|
5
|
-
.enum(['project', 'section', 'parent'])
|
|
6
|
-
.describe('The type of container to get tasks for.'),
|
|
7
|
-
id: z.string().min(1).describe('The ID of the container to get tasks for.'),
|
|
8
|
-
limit: z
|
|
9
|
-
.number()
|
|
10
|
-
.int()
|
|
11
|
-
.min(1)
|
|
12
|
-
.max(50)
|
|
13
|
-
.default(10)
|
|
14
|
-
.describe('The maximum number of tasks to return.'),
|
|
15
|
-
cursor: z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
19
|
-
};
|
|
20
|
-
const tasksListForContainer = {
|
|
21
|
-
name: 'tasks-list-for-container',
|
|
22
|
-
description: 'Get tasks for a specific project, section, or parent task (subtasks).',
|
|
23
|
-
parameters: ArgsSchema,
|
|
24
|
-
async execute(args, client) {
|
|
25
|
-
const { type, id, limit, cursor } = args;
|
|
26
|
-
const taskParams = {
|
|
27
|
-
limit,
|
|
28
|
-
cursor: cursor ?? null,
|
|
29
|
-
};
|
|
30
|
-
switch (type) {
|
|
31
|
-
case 'project':
|
|
32
|
-
taskParams.projectId = id;
|
|
33
|
-
break;
|
|
34
|
-
case 'section':
|
|
35
|
-
taskParams.sectionId = id;
|
|
36
|
-
break;
|
|
37
|
-
case 'parent':
|
|
38
|
-
taskParams.parentId = id;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
const { results, nextCursor } = await client.getTasks(taskParams);
|
|
42
|
-
return {
|
|
43
|
-
tasks: results.map(mapTask),
|
|
44
|
-
nextCursor,
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
export { tasksListForContainer };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksOrganizeMultiple: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
tasks: z.ZodArray<z.ZodObject<{
|
|
7
|
-
id: z.ZodString;
|
|
8
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
9
|
-
sectionId: z.ZodOptional<z.ZodString>;
|
|
10
|
-
parentId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
id: string;
|
|
14
|
-
parentId?: string | undefined;
|
|
15
|
-
projectId?: string | undefined;
|
|
16
|
-
sectionId?: string | undefined;
|
|
17
|
-
order?: number | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
id: string;
|
|
20
|
-
parentId?: string | undefined;
|
|
21
|
-
projectId?: string | undefined;
|
|
22
|
-
sectionId?: string | undefined;
|
|
23
|
-
order?: number | undefined;
|
|
24
|
-
}>, "many">;
|
|
25
|
-
};
|
|
26
|
-
execute(args: {
|
|
27
|
-
tasks: {
|
|
28
|
-
id: string;
|
|
29
|
-
parentId?: string | undefined;
|
|
30
|
-
projectId?: string | undefined;
|
|
31
|
-
sectionId?: string | undefined;
|
|
32
|
-
order?: number | undefined;
|
|
33
|
-
}[];
|
|
34
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<import("@doist/todoist-api-typescript").Task[]>;
|
|
35
|
-
};
|
|
36
|
-
export { tasksOrganizeMultiple };
|
|
37
|
-
//# sourceMappingURL=tasks-organize-multiple.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-organize-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-organize-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBe,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|