@doist/todoist-ai 1.1.0 → 2.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.
Files changed (80) hide show
  1. package/README.md +1 -22
  2. package/dist/index.d.ts +53 -198
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +19 -45
  5. package/dist/mcp-helpers.d.ts +8 -1
  6. package/dist/mcp-helpers.d.ts.map +1 -1
  7. package/dist/mcp-helpers.js +1 -0
  8. package/dist/mcp-server.d.ts.map +1 -1
  9. package/dist/mcp-server.js +10 -28
  10. package/dist/{tools/shared.d.ts → tool-helpers.d.ts} +1 -1
  11. package/dist/tool-helpers.d.ts.map +1 -0
  12. package/dist/tool-helpers.test.d.ts +2 -0
  13. package/dist/tool-helpers.test.d.ts.map +1 -0
  14. package/dist/{tools/shared.test.js → tool-helpers.test.js} +9 -9
  15. package/dist/tools/{tasks-delete-one.d.ts → delete-one.d.ts} +5 -3
  16. package/dist/tools/delete-one.d.ts.map +1 -0
  17. package/dist/tools/delete-one.js +28 -0
  18. package/dist/tools/{project-overview.d.ts → overview.d.ts} +5 -5
  19. package/dist/tools/overview.d.ts.map +1 -0
  20. package/dist/tools/overview.js +205 -0
  21. package/dist/tools/projects-list.d.ts +12 -1
  22. package/dist/tools/projects-list.d.ts.map +1 -1
  23. package/dist/tools/projects-list.js +11 -2
  24. package/dist/tools/{projects-add-one.d.ts → projects-manage.d.ts} +6 -4
  25. package/dist/tools/projects-manage.d.ts.map +1 -0
  26. package/dist/tools/projects-manage.js +29 -0
  27. package/dist/tools/sections-manage.d.ts +23 -0
  28. package/dist/tools/sections-manage.d.ts.map +1 -0
  29. package/dist/tools/sections-manage.js +40 -0
  30. package/dist/tools/tasks-add-multiple.js +2 -2
  31. package/dist/tools/tasks-list-by-date.d.ts.map +1 -1
  32. package/dist/tools/tasks-list-by-date.js +18 -12
  33. package/dist/tools/tasks-list-completed.js +2 -2
  34. package/dist/tools/{tasks-list-for-project.d.ts → tasks-list-for-container.d.ts} +7 -5
  35. package/dist/tools/tasks-list-for-container.d.ts.map +1 -0
  36. package/dist/tools/tasks-list-for-container.js +51 -0
  37. package/dist/tools/tasks-search.js +2 -2
  38. package/package.json +15 -4
  39. package/dist/tools/account-overview.d.ts +0 -9
  40. package/dist/tools/account-overview.d.ts.map +0 -1
  41. package/dist/tools/account-overview.js +0 -98
  42. package/dist/tools/project-overview.d.ts.map +0 -1
  43. package/dist/tools/project-overview.js +0 -107
  44. package/dist/tools/projects-add-one.d.ts.map +0 -1
  45. package/dist/tools/projects-add-one.js +0 -18
  46. package/dist/tools/projects-delete-one.d.ts +0 -15
  47. package/dist/tools/projects-delete-one.d.ts.map +0 -1
  48. package/dist/tools/projects-delete-one.js +0 -17
  49. package/dist/tools/projects-search.d.ts +0 -29
  50. package/dist/tools/projects-search.d.ts.map +0 -1
  51. package/dist/tools/projects-search.js +0 -42
  52. package/dist/tools/projects-update-one.d.ts +0 -15
  53. package/dist/tools/projects-update-one.d.ts.map +0 -1
  54. package/dist/tools/projects-update-one.js +0 -19
  55. package/dist/tools/sections-add-one.d.ts +0 -15
  56. package/dist/tools/sections-add-one.d.ts.map +0 -1
  57. package/dist/tools/sections-add-one.js +0 -21
  58. package/dist/tools/sections-delete-one.d.ts +0 -15
  59. package/dist/tools/sections-delete-one.d.ts.map +0 -1
  60. package/dist/tools/sections-delete-one.js +0 -17
  61. package/dist/tools/sections-update-one.d.ts +0 -15
  62. package/dist/tools/sections-update-one.d.ts.map +0 -1
  63. package/dist/tools/sections-update-one.js +0 -19
  64. package/dist/tools/shared.d.ts.map +0 -1
  65. package/dist/tools/shared.test.d.ts +0 -2
  66. package/dist/tools/shared.test.d.ts.map +0 -1
  67. package/dist/tools/subtasks-list-for-parent-task.d.ts +0 -31
  68. package/dist/tools/subtasks-list-for-parent-task.d.ts.map +0 -1
  69. package/dist/tools/subtasks-list-for-parent-task.js +0 -37
  70. package/dist/tools/tasks-delete-one.d.ts.map +0 -1
  71. package/dist/tools/tasks-delete-one.js +0 -17
  72. package/dist/tools/tasks-list-for-project.d.ts.map +0 -1
  73. package/dist/tools/tasks-list-for-project.js +0 -37
  74. package/dist/tools/tasks-list-for-section.d.ts +0 -31
  75. package/dist/tools/tasks-list-for-section.d.ts.map +0 -1
  76. package/dist/tools/tasks-list-for-section.js +0 -37
  77. package/dist/tools/tasks-list-overdue.d.ts +0 -29
  78. package/dist/tools/tasks-list-overdue.d.ts.map +0 -1
  79. package/dist/tools/tasks-list-overdue.js +0 -32
  80. /package/dist/{tools/shared.js → tool-helpers.js} +0 -0
@@ -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,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=shared.test.d.ts.map
@@ -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;
File without changes