@opentabs-dev/opentabs-plugin-asana 0.0.74

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 (113) hide show
  1. package/README.md +159 -0
  2. package/dist/adapter.iife.js +15297 -0
  3. package/dist/adapter.iife.js.map +7 -0
  4. package/dist/asana-api.d.ts +8 -0
  5. package/dist/asana-api.d.ts.map +1 -0
  6. package/dist/asana-api.js +86 -0
  7. package/dist/asana-api.js.map +1 -0
  8. package/dist/index.d.ts +14 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +78 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/tools/add-followers.d.ts +33 -0
  13. package/dist/tools/add-followers.d.ts.map +1 -0
  14. package/dist/tools/add-followers.js +28 -0
  15. package/dist/tools/add-followers.js.map +1 -0
  16. package/dist/tools/add-task-to-section.d.ts +8 -0
  17. package/dist/tools/add-task-to-section.d.ts.map +1 -0
  18. package/dist/tools/add-task-to-section.js +26 -0
  19. package/dist/tools/add-task-to-section.js.map +1 -0
  20. package/dist/tools/create-project.d.ts +30 -0
  21. package/dist/tools/create-project.d.ts.map +1 -0
  22. package/dist/tools/create-project.js +50 -0
  23. package/dist/tools/create-project.js.map +1 -0
  24. package/dist/tools/create-section.d.ts +13 -0
  25. package/dist/tools/create-section.d.ts.map +1 -0
  26. package/dist/tools/create-section.js +28 -0
  27. package/dist/tools/create-section.js.map +1 -0
  28. package/dist/tools/create-story.d.ts +16 -0
  29. package/dist/tools/create-story.d.ts.map +1 -0
  30. package/dist/tools/create-story.js +28 -0
  31. package/dist/tools/create-story.js.map +1 -0
  32. package/dist/tools/create-task.d.ts +40 -0
  33. package/dist/tools/create-task.d.ts.map +1 -0
  34. package/dist/tools/create-task.js +53 -0
  35. package/dist/tools/create-task.js.map +1 -0
  36. package/dist/tools/delete-task.d.ts +7 -0
  37. package/dist/tools/delete-task.d.ts.map +1 -0
  38. package/dist/tools/delete-task.js +24 -0
  39. package/dist/tools/delete-task.js.map +1 -0
  40. package/dist/tools/get-current-user.d.ts +13 -0
  41. package/dist/tools/get-current-user.d.ts.map +1 -0
  42. package/dist/tools/get-current-user.js +30 -0
  43. package/dist/tools/get-current-user.js.map +1 -0
  44. package/dist/tools/get-project.d.ts +23 -0
  45. package/dist/tools/get-project.d.ts.map +1 -0
  46. package/dist/tools/get-project.js +25 -0
  47. package/dist/tools/get-project.js.map +1 -0
  48. package/dist/tools/get-stories-for-task.d.ts +18 -0
  49. package/dist/tools/get-stories-for-task.d.ts.map +1 -0
  50. package/dist/tools/get-stories-for-task.js +41 -0
  51. package/dist/tools/get-stories-for-task.js.map +1 -0
  52. package/dist/tools/get-subtasks.d.ts +35 -0
  53. package/dist/tools/get-subtasks.d.ts.map +1 -0
  54. package/dist/tools/get-subtasks.js +41 -0
  55. package/dist/tools/get-subtasks.js.map +1 -0
  56. package/dist/tools/get-task.d.ts +33 -0
  57. package/dist/tools/get-task.d.ts.map +1 -0
  58. package/dist/tools/get-task.js +29 -0
  59. package/dist/tools/get-task.js.map +1 -0
  60. package/dist/tools/get-tasks-for-project.d.ts +35 -0
  61. package/dist/tools/get-tasks-for-project.d.ts.map +1 -0
  62. package/dist/tools/get-tasks-for-project.js +41 -0
  63. package/dist/tools/get-tasks-for-project.js.map +1 -0
  64. package/dist/tools/get-tasks-for-section.d.ts +35 -0
  65. package/dist/tools/get-tasks-for-section.d.ts.map +1 -0
  66. package/dist/tools/get-tasks-for-section.js +41 -0
  67. package/dist/tools/get-tasks-for-section.js.map +1 -0
  68. package/dist/tools/get-user.d.ts +11 -0
  69. package/dist/tools/get-user.d.ts.map +1 -0
  70. package/dist/tools/get-user.js +25 -0
  71. package/dist/tools/get-user.js.map +1 -0
  72. package/dist/tools/list-projects.d.ts +27 -0
  73. package/dist/tools/list-projects.d.ts.map +1 -0
  74. package/dist/tools/list-projects.js +38 -0
  75. package/dist/tools/list-projects.js.map +1 -0
  76. package/dist/tools/list-sections.d.ts +12 -0
  77. package/dist/tools/list-sections.d.ts.map +1 -0
  78. package/dist/tools/list-sections.js +27 -0
  79. package/dist/tools/list-sections.js.map +1 -0
  80. package/dist/tools/list-tags.d.ts +14 -0
  81. package/dist/tools/list-tags.d.ts.map +1 -0
  82. package/dist/tools/list-tags.js +41 -0
  83. package/dist/tools/list-tags.js.map +1 -0
  84. package/dist/tools/list-teams.d.ts +14 -0
  85. package/dist/tools/list-teams.d.ts.map +1 -0
  86. package/dist/tools/list-teams.js +41 -0
  87. package/dist/tools/list-teams.js.map +1 -0
  88. package/dist/tools/list-users-for-workspace.d.ts +14 -0
  89. package/dist/tools/list-users-for-workspace.d.ts.map +1 -0
  90. package/dist/tools/list-users-for-workspace.js +41 -0
  91. package/dist/tools/list-users-for-workspace.js.map +1 -0
  92. package/dist/tools/list-workspaces.d.ts +8 -0
  93. package/dist/tools/list-workspaces.d.ts.map +1 -0
  94. package/dist/tools/list-workspaces.js +23 -0
  95. package/dist/tools/list-workspaces.js.map +1 -0
  96. package/dist/tools/schemas.d.ts +189 -0
  97. package/dist/tools/schemas.d.ts.map +1 -0
  98. package/dist/tools/schemas.js +222 -0
  99. package/dist/tools/schemas.js.map +1 -0
  100. package/dist/tools/search-tasks.d.ts +39 -0
  101. package/dist/tools/search-tasks.d.ts.map +1 -0
  102. package/dist/tools/search-tasks.js +52 -0
  103. package/dist/tools/search-tasks.js.map +1 -0
  104. package/dist/tools/update-project.d.ts +30 -0
  105. package/dist/tools/update-project.d.ts.map +1 -0
  106. package/dist/tools/update-project.js +49 -0
  107. package/dist/tools/update-project.js.map +1 -0
  108. package/dist/tools/update-task.d.ts +39 -0
  109. package/dist/tools/update-task.d.ts.map +1 -0
  110. package/dist/tools/update-task.js +49 -0
  111. package/dist/tools/update-task.js.map +1 -0
  112. package/dist/tools.json +2865 -0
  113. package/package.json +55 -0
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const deleteTask: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ task_gid: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ success: z.ZodBoolean;
6
+ }, z.core.$strip>>;
7
+ //# sourceMappingURL=delete-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-task.d.ts","sourceRoot":"","sources":["../../src/tools/delete-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;kBAmBrB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ export const deleteTask = defineTool({
5
+ name: 'delete_task',
6
+ displayName: 'Delete Task',
7
+ description: 'Permanently delete a task by its GID. This action cannot be undone.',
8
+ summary: 'Delete a task permanently',
9
+ icon: 'trash-2',
10
+ group: 'Tasks',
11
+ input: z.object({
12
+ task_gid: z.string().min(1).describe('Task GID to delete'),
13
+ }),
14
+ output: z.object({
15
+ success: z.boolean().describe('Whether the task was successfully deleted'),
16
+ }),
17
+ handle: async (params) => {
18
+ await api(`/tasks/${params.task_gid}`, {
19
+ method: 'DELETE',
20
+ });
21
+ return { success: true };
22
+ },
23
+ });
24
+ //# sourceMappingURL=delete-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-task.js","sourceRoot":"","sources":["../../src/tools/delete-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,qEAAqE;IAClF,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KAC3E,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,GAAG,CAA0B,UAAU,MAAM,CAAC,QAAQ,EAAE,EAAE;YAC9D,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const getCurrentUser: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
3
+ user: z.ZodObject<{
4
+ gid: z.ZodString;
5
+ name: z.ZodString;
6
+ email: z.ZodString;
7
+ }, z.core.$strip>;
8
+ workspaces: z.ZodArray<z.ZodObject<{
9
+ gid: z.ZodString;
10
+ name: z.ZodString;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>>;
13
+ //# sourceMappingURL=get-current-user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-current-user.d.ts","sourceRoot":"","sources":["../../src/tools/get-current-user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,cAAc;;;;;;;;;;kBAwBzB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { mapUser, mapWorkspace, userSchema, workspaceSchema, } from './schemas.js';
5
+ export const getCurrentUser = defineTool({
6
+ name: 'get_current_user',
7
+ displayName: 'Get Current User',
8
+ description: 'Get the profile of the currently authenticated Asana user, including their workspaces.',
9
+ summary: 'Get the current user profile',
10
+ icon: 'user',
11
+ group: 'Users',
12
+ input: z.object({}),
13
+ output: z.object({
14
+ user: userSchema.describe('The current user'),
15
+ workspaces: z.array(workspaceSchema).describe('Workspaces the user belongs to'),
16
+ }),
17
+ handle: async () => {
18
+ const data = await api('/users/me', {
19
+ query: {
20
+ opt_fields: 'name,email,workspaces.gid,workspaces.name',
21
+ },
22
+ });
23
+ const raw = data.data;
24
+ return {
25
+ user: mapUser(raw),
26
+ workspaces: (raw?.workspaces ?? []).map(mapWorkspace),
27
+ };
28
+ },
29
+ });
30
+ //# sourceMappingURL=get-current-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-current-user.js","sourceRoot":"","sources":["../../src/tools/get-current-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAIL,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,wFAAwF;IACrG,OAAO,EAAE,8BAA8B;IACvC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAC7C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;KAChF,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAgC,WAAW,EAAE;YACjE,KAAK,EAAE;gBACL,UAAU,EAAE,2CAA2C;aACxD;SACF,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;YAClB,UAAU,EAAE,CAAC,GAAG,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;SACtD,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const getProject: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ project_gid: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ project: z.ZodObject<{
6
+ gid: z.ZodString;
7
+ name: z.ZodString;
8
+ archived: z.ZodBoolean;
9
+ color: z.ZodString;
10
+ notes: z.ZodString;
11
+ owner_gid: z.ZodString;
12
+ owner_name: z.ZodString;
13
+ team_gid: z.ZodString;
14
+ team_name: z.ZodString;
15
+ created_at: z.ZodString;
16
+ modified_at: z.ZodString;
17
+ due_on: z.ZodString;
18
+ start_on: z.ZodString;
19
+ permalink_url: z.ZodString;
20
+ public: z.ZodBoolean;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>>;
23
+ //# sourceMappingURL=get-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project.d.ts","sourceRoot":"","sources":["../../src/tools/get-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;kBAmBrB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { PROJECT_OPT_FIELDS, mapProject, projectSchema } from './schemas.js';
5
+ export const getProject = defineTool({
6
+ name: 'get_project',
7
+ displayName: 'Get Project',
8
+ description: 'Get detailed information about a specific project by its GID.',
9
+ summary: 'Get details of a specific project',
10
+ icon: 'folder-open',
11
+ group: 'Projects',
12
+ input: z.object({
13
+ project_gid: z.string().min(1).describe('Project GID to retrieve'),
14
+ }),
15
+ output: z.object({
16
+ project: projectSchema.describe('Project details'),
17
+ }),
18
+ handle: async (params) => {
19
+ const data = await api(`/projects/${params.project_gid}`, {
20
+ query: { opt_fields: PROJECT_OPT_FIELDS },
21
+ });
22
+ return { project: mapProject(data.data) };
23
+ },
24
+ });
25
+ //# sourceMappingURL=get-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project.js","sourceRoot":"","sources":["../../src/tools/get-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAsB,kBAAkB,EAAmB,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,+DAA+D;IAC5E,OAAO,EAAE,mCAAmC;IAC5C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACnE,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KACnD,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CAA4B,aAAa,MAAM,CAAC,WAAW,EAAE,EAAE;YACnF,KAAK,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE;SAC1C,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC5C,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const getStoriesForTask: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ task_gid: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ offset: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ stories: z.ZodArray<z.ZodObject<{
8
+ gid: z.ZodString;
9
+ text: z.ZodString;
10
+ created_by_gid: z.ZodString;
11
+ created_by_name: z.ZodString;
12
+ created_at: z.ZodString;
13
+ resource_subtype: z.ZodString;
14
+ type: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ next_page: z.ZodNullable<z.ZodString>;
17
+ }, z.core.$strip>>;
18
+ //# sourceMappingURL=get-stories-for-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-stories-for-task.d.ts","sourceRoot":"","sources":["../../src/tools/get-stories-for-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAmC5B,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { STORY_OPT_FIELDS, mapStory, storySchema } from './schemas.js';
5
+ export const getStoriesForTask = defineTool({
6
+ name: 'get_stories_for_task',
7
+ displayName: 'Get Stories for Task',
8
+ description: 'List stories (comments and activity) on a task.',
9
+ summary: 'List stories on a task',
10
+ icon: 'message-square',
11
+ group: 'Stories',
12
+ input: z.object({
13
+ task_gid: z.string().min(1).describe('Task GID to retrieve stories for'),
14
+ limit: z
15
+ .number()
16
+ .int()
17
+ .min(1)
18
+ .max(100)
19
+ .optional()
20
+ .describe('Maximum number of stories to return (default 20, max 100)'),
21
+ offset: z.string().optional().describe('Pagination offset token from a previous response'),
22
+ }),
23
+ output: z.object({
24
+ stories: z.array(storySchema).describe('List of stories on the task'),
25
+ next_page: z.string().nullable().describe('Offset token for the next page, or null if no more results'),
26
+ }),
27
+ handle: async (params) => {
28
+ const data = await api(`/tasks/${params.task_gid}/stories`, {
29
+ query: {
30
+ opt_fields: STORY_OPT_FIELDS,
31
+ limit: params.limit ?? 20,
32
+ offset: params.offset,
33
+ },
34
+ });
35
+ return {
36
+ stories: (data.data ?? []).map(mapStory),
37
+ next_page: data.next_page?.offset ?? null,
38
+ };
39
+ },
40
+ });
41
+ //# sourceMappingURL=get-stories-for-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-stories-for-task.js","sourceRoot":"","sources":["../../src/tools/get-stories-for-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAiC,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtG,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,iDAAiD;IAC9D,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,S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olDefinition<z.ZodObject<{
3
+ task_gid: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ offset: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ subtasks: z.ZodArray<z.ZodObject<{
8
+ gid: z.ZodString;
9
+ name: z.ZodString;
10
+ completed: z.ZodBoolean;
11
+ assignee_gid: z.ZodString;
12
+ assignee_name: z.ZodString;
13
+ due_on: z.ZodString;
14
+ due_at: z.ZodString;
15
+ start_on: z.ZodString;
16
+ notes: z.ZodString;
17
+ html_notes: z.ZodString;
18
+ projects: z.ZodArray<z.ZodObject<{
19
+ gid: z.ZodString;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ tags: z.ZodArray<z.ZodObject<{
23
+ gid: z.ZodString;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>>;
26
+ parent_gid: z.ZodString;
27
+ num_subtasks: z.ZodNumber;
28
+ created_at: z.ZodString;
29
+ modified_at: z.ZodString;
30
+ permalink_url: z.ZodString;
31
+ resource_subtype: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ next_page: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ //# sourceMappingURL=get-subtasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-subtasks.d.ts","sourceRoot":"","sources":["../../src/tools/get-subtasks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmCtB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { TASK_OPT_FIELDS, mapTask, taskSchema } from './schemas.js';
5
+ export const getSubtasks = defineTool({
6
+ name: 'get_subtasks',
7
+ displayName: 'Get Subtasks',
8
+ description: 'List subtasks of a parent task. Supports pagination with limit and offset.',
9
+ summary: 'List subtasks of a task',
10
+ icon: 'list-tree',
11
+ group: 'Tasks',
12
+ input: z.object({
13
+ task_gid: z.string().min(1).describe('Parent task GID to list subtasks for'),
14
+ limit: z
15
+ .number()
16
+ .int()
17
+ .min(1)
18
+ .max(100)
19
+ .optional()
20
+ .describe('Maximum number of subtasks to return (default 20, max 100)'),
21
+ offset: z.string().optional().describe('Pagination offset from a previous response'),
22
+ }),
23
+ output: z.object({
24
+ subtasks: z.array(taskSchema).describe('List of subtasks'),
25
+ next_page: z.string().nullable().describe('Pagination offset for the next page, or null if no more results'),
26
+ }),
27
+ handle: async (params) => {
28
+ const data = await api(`/tasks/${params.task_gid}/subtasks`, {
29
+ query: {
30
+ opt_fields: TASK_OPT_FIELDS,
31
+ limit: params.limit ?? 20,
32
+ offset: params.offset,
33
+ },
34
+ });
35
+ return {
36
+ subtasks: (data.data ?? []).map(mapTask),
37
+ next_page: data.next_page?.offset ?? null,
38
+ };
39
+ },
40
+ });
41
+ //# sourceMappingURL=get-subtasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-subtasks.js","sourceRoot":"","sources":["../../src/tools/get-subtasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAgC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAElG,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,4EAA4E;IACzF,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CA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>;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ task: z.ZodObject<{
7
+ gid: z.ZodString;
8
+ name: z.ZodString;
9
+ completed: z.ZodBoolean;
10
+ assignee_gid: z.ZodString;
11
+ assignee_name: z.ZodString;
12
+ due_on: z.ZodString;
13
+ due_at: z.ZodString;
14
+ start_on: z.ZodString;
15
+ notes: z.ZodString;
16
+ html_notes: z.ZodString;
17
+ projects: z.ZodArray<z.ZodObject<{
18
+ gid: z.ZodString;
19
+ name: z.ZodString;
20
+ }, z.core.$strip>>;
21
+ tags: z.ZodArray<z.ZodObject<{
22
+ gid: z.ZodString;
23
+ name: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ parent_gid: z.ZodString;
26
+ num_subtasks: z.ZodNumber;
27
+ created_at: z.ZodString;
28
+ modified_at: z.ZodString;
29
+ permalink_url: z.ZodString;
30
+ resource_subtype: z.ZodString;
31
+ }, z.core.$strip>;
32
+ }, z.core.$strip>>;
33
+ //# sourceMappingURL=get-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task.d.ts","sourceRoot":"","sources":["../../src/tools/get-task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuBlB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { TASK_OPT_FIELDS, mapTask, taskSchema } from './schemas.js';
5
+ export const getTask = defineTool({
6
+ name: 'get_task',
7
+ displayName: 'Get Task',
8
+ description: 'Get detailed information about a specific task by its GID.',
9
+ summary: 'Get details of a specific task',
10
+ icon: 'square-check-big',
11
+ group: 'Tasks',
12
+ input: z.object({
13
+ task_gid: z.string().min(1).describe('Task GID to retrieve'),
14
+ opt_fields: z
15
+ .string()
16
+ .optional()
17
+ .describe('Comma-separated list of fields to return (defaults to standard task fields)'),
18
+ }),
19
+ output: z.object({
20
+ task: taskSchema.describe('Task details'),
21
+ }),
22
+ handle: async (params) => {
23
+ const data = await api(`/tasks/${params.task_gid}`, {
24
+ query: { opt_fields: params.opt_fields ?? TASK_OPT_FIELDS },
25
+ });
26
+ return { task: mapTask(data.data) };
27
+ },
28
+ });
29
+ //# sourceMappingURL=get-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task.js","sourceRoot":"","sources":["../../src/tools/get-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtG,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;IAChC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,4DAA4D;IACzE,OAAO,EAAE,gCAAgC;IACzC,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QAC5D,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,6EAA6E,CAAC;KAC3F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC;KAC1C,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAyB,UAAU,MAAM,CAAC,QAAQ,EAAE,EAAE;YAC1E,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,eAAe,EAAE;SAC5D,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const getTasksForProject: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ project_gid: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ offset: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ tasks: z.ZodArray<z.ZodObject<{
8
+ gid: z.ZodString;
9
+ name: z.ZodString;
10
+ completed: z.ZodBoolean;
11
+ assignee_gid: z.ZodString;
12
+ assignee_name: z.ZodString;
13
+ due_on: z.ZodString;
14
+ due_at: z.ZodString;
15
+ start_on: z.ZodString;
16
+ notes: z.ZodString;
17
+ html_notes: z.ZodString;
18
+ projects: z.ZodArray<z.ZodObject<{
19
+ gid: z.ZodString;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ tags: z.ZodArray<z.ZodObject<{
23
+ gid: z.ZodString;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>>;
26
+ parent_gid: z.ZodString;
27
+ num_subtasks: z.ZodNumber;
28
+ created_at: z.ZodString;
29
+ modified_at: z.ZodString;
30
+ permalink_url: z.ZodString;
31
+ resource_subtype: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ next_page: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ //# sourceMappingURL=get-tasks-for-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tasks-for-project.d.ts","sourceRoot":"","sources":["../../src/tools/get-tasks-for-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmC7B,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { TASK_OPT_FIELDS, mapTask, taskSchema } from './schemas.js';
5
+ export const getTasksForProject = defineTool({
6
+ name: 'get_tasks_for_project',
7
+ displayName: 'Get Tasks for Project',
8
+ description: 'List tasks in a project. Supports pagination with limit and offset.',
9
+ summary: 'List tasks in a project',
10
+ icon: 'list',
11
+ group: 'Tasks',
12
+ input: z.object({
13
+ project_gid: z.string().min(1).describe('Project GID to list tasks for'),
14
+ limit: z
15
+ .number()
16
+ .int()
17
+ .min(1)
18
+ .max(100)
19
+ .optional()
20
+ .describe('Maximum number of tasks to return (default 20, max 100)'),
21
+ offset: z.string().optional().describe('Pagination offset from a previous response'),
22
+ }),
23
+ output: z.object({
24
+ tasks: z.array(taskSchema).describe('List of tasks in the project'),
25
+ next_page: z.string().nullable().describe('Pagination offset for the next page, or null if no more results'),
26
+ }),
27
+ handle: async (params) => {
28
+ const data = await api(`/projects/${params.project_gid}/tasks`, {
29
+ query: {
30
+ opt_fields: TASK_OPT_FIELDS,
31
+ limit: params.limit ?? 20,
32
+ offset: params.offset,
33
+ },
34
+ });
35
+ return {
36
+ tasks: (data.data ?? []).map(mapTask),
37
+ next_page: data.next_page?.offset ?? null,
38
+ };
39
+ },
40
+ });
41
+ //# sourceMappingURL=get-tasks-for-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tasks-for-project.js","sourceRoot":"","sources":["../../src/tools/get-tasks-for-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAgC,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AI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,IAAI,IAAI;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const getTasksForSection: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ section_gid: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ offset: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ tasks: z.ZodArray<z.ZodObject<{
8
+ gid: z.ZodString;
9
+ name: z.ZodString;
10
+ completed: z.ZodBoolean;
11
+ assignee_gid: z.ZodString;
12
+ assignee_name: z.ZodString;
13
+ due_on: z.ZodString;
14
+ due_at: z.ZodString;
15
+ start_on: z.ZodString;
16
+ notes: z.ZodString;
17
+ html_notes: z.ZodString;
18
+ projects: z.ZodArray<z.ZodObject<{
19
+ gid: z.ZodString;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ tags: z.ZodArray<z.ZodObject<{
23
+ gid: z.ZodString;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>>;
26
+ parent_gid: z.ZodString;
27
+ num_subtasks: z.ZodNumber;
28
+ created_at: z.ZodString;
29
+ modified_at: z.ZodString;
30
+ permalink_url: z.ZodString;
31
+ resource_subtype: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ next_page: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ //# sourceMappingURL=get-tasks-for-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tasks-for-section.d.ts","sourceRoot":"","sources":["../../src/tools/get-tasks-for-section.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmC7B,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { TASK_OPT_FIELDS, mapTask, taskSchema } from './schemas.js';
5
+ export const getTasksForSection = defineTool({
6
+ name: 'get_tasks_for_section',
7
+ displayName: 'Get Tasks for Section',
8
+ description: 'List tasks in a project section. Supports pagination with limit and offset.',
9
+ summary: 'List tasks in a section',
10
+ icon: 'list',
11
+ group: 'Tasks',
12
+ input: z.object({
13
+ section_gid: z.string().min(1).describe('Section GID to list tasks for'),
14
+ limit: z
15
+ .number()
16
+ .int()
17
+ .min(1)
18
+ .max(100)
19
+ .optional()
20
+ .describe('Maximum number of tasks to return (default 20, max 100)'),
21
+ offset: z.string().optional().describe('Pagination offset from a previous response'),
22
+ }),
23
+ output: z.object({
24
+ tasks: z.array(taskSchema).describe('List of tasks in the section'),
25
+ next_page: z.string().nullable().describe('Pagination offset for the next page, or null if no more results'),
26
+ }),
27
+ handle: async (params) => {
28
+ const data = await api(`/sections/${params.section_gid}/tasks`, {
29
+ query: {
30
+ opt_fields: TASK_OPT_FIELDS,
31
+ limit: params.limit ?? 20,
32
+ offset: params.offset,
33
+ },
34
+ });
35
+ return {
36
+ tasks: (data.data ?? []).map(mapTask),
37
+ next_page: data.next_page?.offset ?? null,
38
+ };
39
+ },
40
+ });
41
+ //# sourceMappingURL=get-tasks-for-section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tasks-for-section.js","sourceRoot":"","sources":["../../src/tools/get-tasks-for-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAgC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,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AAC,OAAO,CAAC;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,IAAI,IAAI;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const getUser: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ user_gid: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ user: z.ZodObject<{
6
+ gid: z.ZodString;
7
+ name: z.ZodString;
8
+ email: z.ZodString;
9
+ }, z.core.$strip>;
10
+ }, z.core.$strip>>;
11
+ //# sourceMappingURL=get-user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user.d.ts","sourceRoot":"","sources":["../../src/tools/get-user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,OAAO;;;;;;;;kBAmBlB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../asana-api.js';
4
+ import { mapUser, userSchema } from './schemas.js';
5
+ export const getUser = defineTool({
6
+ name: 'get_user',
7
+ displayName: 'Get User',
8
+ description: 'Get detailed information about a specific Asana user by their GID.',
9
+ summary: 'Get a user by GID',
10
+ icon: 'user',
11
+ group: 'Users',
12
+ input: z.object({
13
+ user_gid: z.string().min(1).describe('User GID to retrieve'),
14
+ }),
15
+ output: z.object({
16
+ user: userSchema.describe('The user'),
17
+ }),
18
+ handle: async (params) => {
19
+ const data = await api(`/users/${params.user_gid}`, {
20
+ query: { opt_fields: 'name,email' },
21
+ });
22
+ return { user: mapUser(data.data) };
23
+ },
24
+ });
25
+ //# sourceMappingURL=get-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user.js","sourceRoot":"","sources":["../../src/tools/get-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;IAChC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,oEAAoE;IACjF,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KAC7D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;KACtC,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAyB,UAAU,MAAM,CAAC,QAAQ,EAAE,EAAE;YAC1E,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;SACpC,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const listProjects: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace_gid: z.ZodString;
4
+ archived: z.ZodOptional<z.ZodBoolean>;
5
+ limit: z.ZodOptional<z.ZodNumber>;
6
+ offset: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ projects: z.ZodArray<z.ZodObject<{
9
+ gid: z.ZodString;
10
+ name: z.ZodString;
11
+ archived: z.ZodBoolean;
12
+ color: z.ZodString;
13
+ notes: z.ZodString;
14
+ owner_gid: z.ZodString;
15
+ owner_name: z.ZodString;
16
+ team_gid: z.ZodString;
17
+ team_name: z.ZodString;
18
+ created_at: z.ZodString;
19
+ modified_at: z.ZodString;
20
+ due_on: z.ZodString;
21
+ start_on: z.ZodString;
22
+ permalink_url: z.ZodString;
23
+ public: z.ZodBoolean;
24
+ }, z.core.$strip>>;
25
+ next_page: z.ZodNullable<z.ZodString>;
26
+ }, z.core.$strip>>;
27
+ //# sourceMappingURL=list-projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.d.ts","sourceRoot":"","sources":["../../src/tools/list-projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kBAiCvB,CAAC"}