@doist/todoist-ai 1.1.0 → 2.0.1
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 +8 -22
- package/dist/index.d.ts +64 -209
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -74
- package/dist/main.js +6 -11
- package/dist/mcp-helpers.d.ts +10 -3
- package/dist/mcp-helpers.d.ts.map +1 -1
- package/dist/mcp-helpers.js +1 -3
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +34 -54
- package/dist/todoist-tool.js +1 -2
- package/dist/{tools/shared.d.ts → tool-helpers.d.ts} +12 -2
- package/dist/tool-helpers.d.ts.map +1 -0
- package/dist/{tools/shared.js → tool-helpers.js} +41 -22
- package/dist/tool-helpers.test.d.ts +2 -0
- package/dist/tool-helpers.test.d.ts.map +1 -0
- package/dist/{tools/shared.test.js → tool-helpers.test.js} +35 -14
- package/dist/tools/__tests__/delete-one.test.d.ts +2 -0
- package/dist/tools/__tests__/delete-one.test.d.ts.map +1 -0
- package/dist/tools/__tests__/delete-one.test.js +90 -0
- package/dist/tools/__tests__/overview.test.d.ts +2 -0
- package/dist/tools/__tests__/overview.test.d.ts.map +1 -0
- package/dist/tools/__tests__/overview.test.js +163 -0
- package/dist/tools/__tests__/projects-list.test.d.ts +2 -0
- package/dist/tools/__tests__/projects-list.test.d.ts.map +1 -0
- package/dist/tools/__tests__/projects-list.test.js +140 -0
- package/dist/tools/__tests__/projects-manage.test.d.ts +2 -0
- package/dist/tools/__tests__/projects-manage.test.d.ts.map +1 -0
- package/dist/tools/__tests__/projects-manage.test.js +106 -0
- package/dist/tools/__tests__/sections-manage.test.d.ts +2 -0
- package/dist/tools/__tests__/sections-manage.test.d.ts.map +1 -0
- package/dist/tools/__tests__/sections-manage.test.js +138 -0
- package/dist/tools/__tests__/sections-search.test.d.ts +2 -0
- package/dist/tools/__tests__/sections-search.test.d.ts.map +1 -0
- package/dist/tools/__tests__/sections-search.test.js +235 -0
- package/dist/tools/__tests__/tasks-add-multiple.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-add-multiple.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-add-multiple.test.js +160 -0
- package/dist/tools/__tests__/tasks-complete-multiple.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-complete-multiple.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-complete-multiple.test.js +146 -0
- package/dist/tools/__tests__/tasks-list-by-date.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-list-by-date.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-list-by-date.test.js +192 -0
- package/dist/tools/__tests__/tasks-list-completed.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-list-completed.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-list-completed.test.js +154 -0
- package/dist/tools/__tests__/tasks-list-for-container.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-list-for-container.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-list-for-container.test.js +232 -0
- package/dist/tools/__tests__/tasks-organize-multiple.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-organize-multiple.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-organize-multiple.test.js +245 -0
- package/dist/tools/__tests__/tasks-search.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-search.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-search.test.js +106 -0
- package/dist/tools/__tests__/tasks-update-one.test.d.ts +2 -0
- package/dist/tools/__tests__/tasks-update-one.test.d.ts.map +1 -0
- package/dist/tools/__tests__/tasks-update-one.test.js +161 -0
- package/dist/tools/{tasks-delete-one.d.ts → delete-one.d.ts} +5 -3
- package/dist/tools/delete-one.d.ts.map +1 -0
- package/dist/tools/delete-one.js +25 -0
- package/dist/tools/{project-overview.d.ts → overview.d.ts} +5 -5
- package/dist/tools/overview.d.ts.map +1 -0
- package/dist/tools/overview.js +202 -0
- package/dist/tools/projects-list.d.ts +12 -1
- package/dist/tools/projects-list.d.ts.map +1 -1
- package/dist/tools/projects-list.js +15 -9
- package/dist/tools/{projects-add-one.d.ts → projects-manage.d.ts} +6 -4
- package/dist/tools/projects-manage.d.ts.map +1 -0
- package/dist/tools/projects-manage.js +26 -0
- package/dist/tools/sections-manage.d.ts +23 -0
- package/dist/tools/sections-manage.d.ts.map +1 -0
- package/dist/tools/sections-manage.js +37 -0
- package/dist/tools/sections-search.js +4 -7
- package/dist/tools/tasks-add-multiple.js +13 -16
- package/dist/tools/tasks-complete-multiple.js +3 -6
- package/dist/tools/tasks-list-by-date.d.ts.map +1 -1
- package/dist/tools/tasks-list-by-date.js +25 -22
- package/dist/tools/tasks-list-completed.d.ts +1 -1
- package/dist/tools/tasks-list-completed.js +13 -16
- package/dist/tools/{tasks-list-for-project.d.ts → tasks-list-for-container.d.ts} +7 -5
- package/dist/tools/tasks-list-for-container.d.ts.map +1 -0
- package/dist/tools/tasks-list-for-container.js +48 -0
- package/dist/tools/tasks-organize-multiple.d.ts.map +1 -1
- package/dist/tools/tasks-organize-multiple.js +20 -14
- package/dist/tools/tasks-search.js +7 -10
- package/dist/tools/tasks-update-one.d.ts +2 -2
- package/dist/tools/tasks-update-one.d.ts.map +1 -1
- package/dist/tools/tasks-update-one.js +22 -15
- package/dist/tools/test-helpers.d.ts +79 -0
- package/dist/tools/test-helpers.d.ts.map +1 -0
- package/dist/tools/test-helpers.js +139 -0
- package/package.json +20 -5
- package/scripts/test-executable.cjs +69 -0
- package/dist/tools/account-overview.d.ts +0 -9
- package/dist/tools/account-overview.d.ts.map +0 -1
- package/dist/tools/account-overview.js +0 -98
- package/dist/tools/project-overview.d.ts.map +0 -1
- package/dist/tools/project-overview.js +0 -107
- package/dist/tools/projects-add-one.d.ts.map +0 -1
- package/dist/tools/projects-add-one.js +0 -18
- package/dist/tools/projects-delete-one.d.ts +0 -15
- package/dist/tools/projects-delete-one.d.ts.map +0 -1
- package/dist/tools/projects-delete-one.js +0 -17
- package/dist/tools/projects-search.d.ts +0 -29
- package/dist/tools/projects-search.d.ts.map +0 -1
- package/dist/tools/projects-search.js +0 -42
- package/dist/tools/projects-update-one.d.ts +0 -15
- package/dist/tools/projects-update-one.d.ts.map +0 -1
- package/dist/tools/projects-update-one.js +0 -19
- package/dist/tools/sections-add-one.d.ts +0 -15
- package/dist/tools/sections-add-one.d.ts.map +0 -1
- package/dist/tools/sections-add-one.js +0 -21
- package/dist/tools/sections-delete-one.d.ts +0 -15
- package/dist/tools/sections-delete-one.d.ts.map +0 -1
- package/dist/tools/sections-delete-one.js +0 -17
- package/dist/tools/sections-update-one.d.ts +0 -15
- package/dist/tools/sections-update-one.d.ts.map +0 -1
- package/dist/tools/sections-update-one.js +0 -19
- package/dist/tools/shared.d.ts.map +0 -1
- package/dist/tools/shared.test.d.ts +0 -2
- package/dist/tools/shared.test.d.ts.map +0 -1
- package/dist/tools/subtasks-list-for-parent-task.d.ts +0 -31
- package/dist/tools/subtasks-list-for-parent-task.d.ts.map +0 -1
- package/dist/tools/subtasks-list-for-parent-task.js +0 -37
- package/dist/tools/tasks-delete-one.d.ts.map +0 -1
- package/dist/tools/tasks-delete-one.js +0 -17
- package/dist/tools/tasks-list-for-project.d.ts.map +0 -1
- package/dist/tools/tasks-list-for-project.js +0 -37
- package/dist/tools/tasks-list-for-section.d.ts +0 -31
- package/dist/tools/tasks-list-for-section.d.ts.map +0 -1
- package/dist/tools/tasks-list-for-section.js +0 -37
- package/dist/tools/tasks-list-overdue.d.ts +0 -29
- package/dist/tools/tasks-list-overdue.d.ts.map +0 -1
- package/dist/tools/tasks-list-overdue.js +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections-add-one.d.ts","sourceRoot":"","sources":["../../src/tools/sections-add-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,QAAA,MAAM,cAAc;;;;;;;;;;;CAWsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sectionsAddOne = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ArgsSchema = {
|
|
6
|
-
name: zod_1.z.string().min(1).describe('The name of the section to add.'),
|
|
7
|
-
projectId: zod_1.z.string().min(1).describe('The ID of the project to add the section to.'),
|
|
8
|
-
};
|
|
9
|
-
const sectionsAddOne = {
|
|
10
|
-
name: 'sections-add-one',
|
|
11
|
-
description: 'Add a new section to a project.',
|
|
12
|
-
parameters: ArgsSchema,
|
|
13
|
-
async execute(args, client) {
|
|
14
|
-
const section = await client.addSection({
|
|
15
|
-
name: args.name,
|
|
16
|
-
projectId: args.projectId,
|
|
17
|
-
});
|
|
18
|
-
return section;
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
exports.sectionsAddOne = sectionsAddOne;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const sectionsDeleteOne: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
id: z.ZodString;
|
|
7
|
-
};
|
|
8
|
-
execute(args: {
|
|
9
|
-
id: string;
|
|
10
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
11
|
-
success: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
};
|
|
14
|
-
export { sectionsDeleteOne };
|
|
15
|
-
//# sourceMappingURL=sections-delete-one.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections-delete-one.d.ts","sourceRoot":"","sources":["../../src/tools/sections-delete-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,iBAAiB;;;;;;;;;;;CAQmB,CAAA;AAE1C,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sectionsDeleteOne = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ArgsSchema = {
|
|
6
|
-
id: zod_1.z.string().min(1).describe('The ID of the section to delete.'),
|
|
7
|
-
};
|
|
8
|
-
const sectionsDeleteOne = {
|
|
9
|
-
name: 'sections-delete-one',
|
|
10
|
-
description: 'Delete a section by its ID.',
|
|
11
|
-
parameters: ArgsSchema,
|
|
12
|
-
async execute(args, client) {
|
|
13
|
-
await client.deleteSection(args.id);
|
|
14
|
-
return { success: true };
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
exports.sectionsDeleteOne = sectionsDeleteOne;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const sectionsUpdateOne: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
id: z.ZodString;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
};
|
|
9
|
-
execute(args: {
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<import("@doist/todoist-api-typescript").Section>;
|
|
13
|
-
};
|
|
14
|
-
export { sectionsUpdateOne };
|
|
15
|
-
//# sourceMappingURL=sections-update-one.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections-update-one.d.ts","sourceRoot":"","sources":["../../src/tools/sections-update-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,QAAA,MAAM,iBAAiB;;;;;;;;;;;CASmB,CAAA;AAE1C,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sectionsUpdateOne = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ArgsSchema = {
|
|
6
|
-
id: zod_1.z.string().min(1).describe('The ID of the section to update.'),
|
|
7
|
-
name: zod_1.z.string().min(1).describe('The new name for the section.'),
|
|
8
|
-
};
|
|
9
|
-
const sectionsUpdateOne = {
|
|
10
|
-
name: 'sections-update-one',
|
|
11
|
-
description: "Update a section's name by its ID.",
|
|
12
|
-
parameters: ArgsSchema,
|
|
13
|
-
async execute(args, client) {
|
|
14
|
-
const { id, name } = args;
|
|
15
|
-
const section = await client.updateSection(id, { name });
|
|
16
|
-
return section;
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
exports.sectionsUpdateOne = sectionsUpdateOne;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,gBAAgB,EAExB,MAAM,+BAA+B,CAAA;AAGtC,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,gBAAgB,CAAA;AAExD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,eAAe,CAE9E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB,CAEhF;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,IAAI,EAAE,IAAI;;;;;;;;;;;EAa1B;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,OAAO;;;;;;;;;EAWnC;AAWD,iBAAe,gBAAgB,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,GACT,EAAE;IACC,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B;;;;;;;;;;;;;;GAyBA;AAED,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.test.d.ts","sourceRoot":"","sources":["../../src/tools/shared.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const subtasksListForParentTask: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
parentId: z.ZodString;
|
|
7
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
-
};
|
|
10
|
-
execute(args: {
|
|
11
|
-
parentId: string;
|
|
12
|
-
limit: number;
|
|
13
|
-
cursor?: string | undefined;
|
|
14
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
15
|
-
tasks: {
|
|
16
|
-
id: string;
|
|
17
|
-
content: string;
|
|
18
|
-
description: string;
|
|
19
|
-
dueDate: string | undefined;
|
|
20
|
-
recurring: string | boolean;
|
|
21
|
-
priority: number;
|
|
22
|
-
projectId: string;
|
|
23
|
-
sectionId: string | null;
|
|
24
|
-
parentId: string | null;
|
|
25
|
-
labels: string[];
|
|
26
|
-
}[];
|
|
27
|
-
nextCursor: string | null;
|
|
28
|
-
}>;
|
|
29
|
-
};
|
|
30
|
-
export { subtasksListForParentTask };
|
|
31
|
-
//# sourceMappingURL=subtasks-list-for-parent-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtasks-list-for-parent-task.d.ts","sourceRoot":"","sources":["../../src/tools/subtasks-list-for-parent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBW,CAAA;AAE1C,OAAO,EAAE,yBAAyB,EAAE,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.subtasksListForParentTask = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const shared_1 = require("./shared");
|
|
6
|
-
const ArgsSchema = {
|
|
7
|
-
parentId: zod_1.z.string().min(1).describe('The ID of the parent task to get subtasks for.'),
|
|
8
|
-
limit: zod_1.z
|
|
9
|
-
.number()
|
|
10
|
-
.int()
|
|
11
|
-
.min(1)
|
|
12
|
-
.max(50)
|
|
13
|
-
.default(10)
|
|
14
|
-
.describe('The maximum number of subtasks to return.'),
|
|
15
|
-
cursor: zod_1.z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe('The cursor to get the next page of subtasks (from previous call).'),
|
|
19
|
-
};
|
|
20
|
-
const subtasksListForParentTask = {
|
|
21
|
-
name: 'subtasks-list-for-parent-task',
|
|
22
|
-
description: 'List subtasks for a given parent task.',
|
|
23
|
-
parameters: ArgsSchema,
|
|
24
|
-
async execute(args, client) {
|
|
25
|
-
const { parentId, limit, cursor } = args;
|
|
26
|
-
const { results, nextCursor } = await client.getTasks({
|
|
27
|
-
parentId,
|
|
28
|
-
limit,
|
|
29
|
-
cursor: cursor ?? null,
|
|
30
|
-
});
|
|
31
|
-
return {
|
|
32
|
-
tasks: results.map(shared_1.mapTask),
|
|
33
|
-
nextCursor,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.subtasksListForParentTask = subtasksListForParentTask;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-delete-one.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-delete-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,cAAc;;;;;;;;;;;CAQsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tasksDeleteOne = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ArgsSchema = {
|
|
6
|
-
id: zod_1.z.string().min(1).describe('The ID of the task to delete.'),
|
|
7
|
-
};
|
|
8
|
-
const tasksDeleteOne = {
|
|
9
|
-
name: 'tasks-delete-one',
|
|
10
|
-
description: 'Delete a task by its ID.',
|
|
11
|
-
parameters: ArgsSchema,
|
|
12
|
-
async execute(args, client) {
|
|
13
|
-
await client.deleteTask(args.id);
|
|
14
|
-
return { success: true };
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
exports.tasksDeleteOne = tasksDeleteOne;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-list-for-project.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tasksListForProject = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const shared_1 = require("./shared");
|
|
6
|
-
const ArgsSchema = {
|
|
7
|
-
projectId: zod_1.z.string().min(1).describe('The ID of the project to get tasks for.'),
|
|
8
|
-
limit: zod_1.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: zod_1.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 tasksListForProject = {
|
|
21
|
-
name: 'tasks-list-for-project',
|
|
22
|
-
description: 'Get tasks by project ID.',
|
|
23
|
-
parameters: ArgsSchema,
|
|
24
|
-
async execute(args, client) {
|
|
25
|
-
const { projectId, limit, cursor } = args;
|
|
26
|
-
const { results, nextCursor } = await client.getTasks({
|
|
27
|
-
projectId,
|
|
28
|
-
limit,
|
|
29
|
-
cursor: cursor ?? null,
|
|
30
|
-
});
|
|
31
|
-
return {
|
|
32
|
-
tasks: results.map(shared_1.mapTask),
|
|
33
|
-
nextCursor,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.tasksListForProject = tasksListForProject;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksListForSection: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
sectionId: z.ZodString;
|
|
7
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
-
};
|
|
10
|
-
execute(args: {
|
|
11
|
-
limit: number;
|
|
12
|
-
sectionId: string;
|
|
13
|
-
cursor?: string | undefined;
|
|
14
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
15
|
-
tasks: {
|
|
16
|
-
id: string;
|
|
17
|
-
content: string;
|
|
18
|
-
description: string;
|
|
19
|
-
dueDate: string | undefined;
|
|
20
|
-
recurring: string | boolean;
|
|
21
|
-
priority: number;
|
|
22
|
-
projectId: string;
|
|
23
|
-
sectionId: string | null;
|
|
24
|
-
parentId: string | null;
|
|
25
|
-
labels: string[];
|
|
26
|
-
}[];
|
|
27
|
-
nextCursor: string | null;
|
|
28
|
-
}>;
|
|
29
|
-
};
|
|
30
|
-
export { tasksListForSection };
|
|
31
|
-
//# sourceMappingURL=tasks-list-for-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-list-for-section.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tasksListForSection = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const shared_1 = require("./shared");
|
|
6
|
-
const ArgsSchema = {
|
|
7
|
-
sectionId: zod_1.z.string().min(1).describe('The ID of the section to get tasks for.'),
|
|
8
|
-
limit: zod_1.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: zod_1.z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe('The cursor to get the next page of tasks (from previous call).'),
|
|
19
|
-
};
|
|
20
|
-
const tasksListForSection = {
|
|
21
|
-
name: 'tasks-list-for-section',
|
|
22
|
-
description: 'List tasks for a given section.',
|
|
23
|
-
parameters: ArgsSchema,
|
|
24
|
-
async execute(args, client) {
|
|
25
|
-
const { sectionId, limit, cursor } = args;
|
|
26
|
-
const { results, nextCursor } = await client.getTasks({
|
|
27
|
-
sectionId,
|
|
28
|
-
limit,
|
|
29
|
-
cursor: cursor ?? null,
|
|
30
|
-
});
|
|
31
|
-
return {
|
|
32
|
-
tasks: results.map(shared_1.mapTask),
|
|
33
|
-
nextCursor,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.tasksListForSection = tasksListForSection;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const tasksListOverdue: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
parameters: {
|
|
6
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
7
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
8
|
-
};
|
|
9
|
-
execute(args: {
|
|
10
|
-
limit: number;
|
|
11
|
-
cursor?: string | undefined;
|
|
12
|
-
}, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
|
|
13
|
-
tasks: {
|
|
14
|
-
id: string;
|
|
15
|
-
content: string;
|
|
16
|
-
description: string;
|
|
17
|
-
dueDate: string | undefined;
|
|
18
|
-
recurring: string | boolean;
|
|
19
|
-
priority: number;
|
|
20
|
-
projectId: string;
|
|
21
|
-
sectionId: string | null;
|
|
22
|
-
parentId: string | null;
|
|
23
|
-
labels: string[];
|
|
24
|
-
}[];
|
|
25
|
-
nextCursor: string | null;
|
|
26
|
-
}>;
|
|
27
|
-
};
|
|
28
|
-
export { tasksListOverdue };
|
|
29
|
-
//# sourceMappingURL=tasks-list-overdue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-list-overdue.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-overdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAoBvB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAYoB,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tasksListOverdue = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const shared_1 = require("./shared");
|
|
6
|
-
const ArgsSchema = {
|
|
7
|
-
limit: zod_1.z
|
|
8
|
-
.number()
|
|
9
|
-
.int()
|
|
10
|
-
.min(1)
|
|
11
|
-
.max(50)
|
|
12
|
-
.default(10)
|
|
13
|
-
.describe('The maximum number of overdue tasks to return.'),
|
|
14
|
-
cursor: zod_1.z
|
|
15
|
-
.string()
|
|
16
|
-
.optional()
|
|
17
|
-
.describe('The cursor to get the next page of overdue tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
|
|
18
|
-
};
|
|
19
|
-
const tasksListOverdue = {
|
|
20
|
-
name: 'tasks-list-overdue',
|
|
21
|
-
description: 'Get overdue tasks.',
|
|
22
|
-
parameters: ArgsSchema,
|
|
23
|
-
async execute(args, client) {
|
|
24
|
-
return await (0, shared_1.getTasksByFilter)({
|
|
25
|
-
client,
|
|
26
|
-
query: 'overdue',
|
|
27
|
-
cursor: args.cursor,
|
|
28
|
-
limit: args.limit,
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
exports.tasksListOverdue = tasksListOverdue;
|