Skip to content

Commit 973fe96

Browse files
waleedlatif1claude
andcommitted
feat(confluence): add missing response fields for descendants and tasks
- Add type and depth fields to page descendants (from Confluence API) - Add body field (storage format) to task list/get/update responses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3ff8342 commit 973fe96

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

apps/docs/content/docs/en/tools/confluence.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,10 +1248,12 @@ Get all descendants of a Confluence page recursively.
12481248
| `descendants` | array | Array of descendant pages |
12491249
|`id` | string | Page ID |
12501250
|`title` | string | Page title |
1251+
|`type` | string | Content type \(page, whiteboard, database, etc.\) |
12511252
|`status` | string | Page status |
12521253
|`spaceId` | string | Space ID |
12531254
|`parentId` | string | Parent page ID |
12541255
|`childPosition` | number | Position among siblings |
1256+
|`depth` | number | Depth in the hierarchy |
12551257
| `pageId` | string | Parent page ID |
12561258
| `nextCursor` | string | Cursor for fetching the next page of results |
12571259

@@ -1284,6 +1286,7 @@ List inline tasks from Confluence. Optionally filter by page, space, assignee, o
12841286
|`pageId` | string | Page ID |
12851287
|`blogPostId` | string | Blog post ID |
12861288
|`status` | string | Task status \(complete or incomplete\) |
1289+
|`body` | string | Task body content in storage format |
12871290
|`createdBy` | string | Creator account ID |
12881291
|`assignedTo` | string | Assignee account ID |
12891292
|`completedBy` | string | Completer account ID |
@@ -1316,6 +1319,7 @@ Get a specific Confluence inline task by ID.
13161319
| `pageId` | string | Page ID |
13171320
| `blogPostId` | string | Blog post ID |
13181321
| `status` | string | Task status \(complete or incomplete\) |
1322+
| `body` | string | Task body content in storage format |
13191323
| `createdBy` | string | Creator account ID |
13201324
| `assignedTo` | string | Assignee account ID |
13211325
| `completedBy` | string | Completer account ID |
@@ -1348,6 +1352,7 @@ Update the status of a Confluence inline task (complete or incomplete).
13481352
| `pageId` | string | Page ID |
13491353
| `blogPostId` | string | Blog post ID |
13501354
| `status` | string | Updated task status |
1355+
| `body` | string | Task body content in storage format |
13511356
| `createdBy` | string | Creator account ID |
13521357
| `assignedTo` | string | Assignee account ID |
13531358
| `completedBy` | string | Completer account ID |

apps/sim/app/api/tools/confluence/page-descendants/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ export async function POST(request: NextRequest) {
8282
const descendants = (data.results || []).map((page: any) => ({
8383
id: page.id,
8484
title: page.title,
85+
type: page.type ?? null,
8586
status: page.status ?? null,
8687
spaceId: page.spaceId ?? null,
8788
parentId: page.parentId ?? null,
8889
childPosition: page.childPosition ?? null,
90+
depth: page.depth ?? null,
8991
}))
9092

9193
return NextResponse.json({

apps/sim/app/api/tools/confluence/tasks/route.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export async function POST(request: NextRequest) {
113113
pageId: data.pageId ?? null,
114114
blogPostId: data.blogPostId ?? null,
115115
status: data.status,
116+
body: data.body?.storage?.value ?? null,
116117
createdBy: data.createdBy ?? null,
117118
assignedTo: data.assignedTo ?? null,
118119
completedBy: data.completedBy ?? null,
@@ -163,6 +164,7 @@ export async function POST(request: NextRequest) {
163164
pageId: data.pageId ?? null,
164165
blogPostId: data.blogPostId ?? null,
165166
status: data.status,
167+
body: data.body?.storage?.value ?? null,
166168
createdBy: data.createdBy ?? null,
167169
assignedTo: data.assignedTo ?? null,
168170
completedBy: data.completedBy ?? null,
@@ -216,6 +218,7 @@ export async function POST(request: NextRequest) {
216218
pageId: task.pageId ?? null,
217219
blogPostId: task.blogPostId ?? null,
218220
status: task.status,
221+
body: task.body?.storage?.value ?? null,
219222
createdBy: task.createdBy ?? null,
220223
assignedTo: task.assignedTo ?? null,
221224
completedBy: task.completedBy ?? null,

apps/sim/tools/confluence/get_page_descendants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ export interface ConfluenceGetPageDescendantsResponse {
1717
descendants: Array<{
1818
id: string
1919
title: string
20+
type: string | null
2021
status: string | null
2122
spaceId: string | null
2223
parentId: string | null
2324
childPosition: number | null
25+
depth: number | null
2426
}>
2527
pageId: string
2628
nextCursor: string | null
@@ -122,10 +124,12 @@ export const confluenceGetPageDescendantsTool: ToolConfig<
122124
properties: {
123125
id: { type: 'string', description: 'Page ID' },
124126
title: { type: 'string', description: 'Page title' },
127+
type: { type: 'string', description: 'Content type (page, whiteboard, database, etc.)', optional: true },
125128
status: { type: 'string', description: 'Page status', optional: true },
126129
spaceId: { type: 'string', description: 'Space ID', optional: true },
127130
parentId: { type: 'string', description: 'Parent page ID', optional: true },
128131
childPosition: { type: 'number', description: 'Position among siblings', optional: true },
132+
depth: { type: 'number', description: 'Depth in the hierarchy', optional: true },
129133
},
130134
},
131135
},

apps/sim/tools/confluence/get_task.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface ConfluenceGetTaskResponse {
1818
pageId: string | null
1919
blogPostId: string | null
2020
status: string
21+
body: string | null
2122
createdBy: string | null
2223
assignedTo: string | null
2324
completedBy: string | null
@@ -97,6 +98,7 @@ export const confluenceGetTaskTool: ToolConfig<ConfluenceGetTaskParams, Confluen
9798
pageId: task.pageId ?? null,
9899
blogPostId: task.blogPostId ?? null,
99100
status: task.status ?? '',
101+
body: task.body ?? null,
100102
createdBy: task.createdBy ?? null,
101103
assignedTo: task.assignedTo ?? null,
102104
completedBy: task.completedBy ?? null,
@@ -116,6 +118,7 @@ export const confluenceGetTaskTool: ToolConfig<ConfluenceGetTaskParams, Confluen
116118
pageId: { type: 'string', description: 'Page ID', optional: true },
117119
blogPostId: { type: 'string', description: 'Blog post ID', optional: true },
118120
status: { type: 'string', description: 'Task status (complete or incomplete)' },
121+
body: { type: 'string', description: 'Task body content in storage format', optional: true },
119122
createdBy: { type: 'string', description: 'Creator account ID', optional: true },
120123
assignedTo: { type: 'string', description: 'Assignee account ID', optional: true },
121124
completedBy: { type: 'string', description: 'Completer account ID', optional: true },

apps/sim/tools/confluence/list_tasks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface ConfluenceListTasksResponse {
2424
pageId: string | null
2525
blogPostId: string | null
2626
status: string
27+
body: string | null
2728
createdBy: string | null
2829
assignedTo: string | null
2930
completedBy: string | null
@@ -156,6 +157,7 @@ export const confluenceListTasksTool: ToolConfig<
156157
pageId: { type: 'string', description: 'Page ID', optional: true },
157158
blogPostId: { type: 'string', description: 'Blog post ID', optional: true },
158159
status: { type: 'string', description: 'Task status (complete or incomplete)' },
160+
body: { type: 'string', description: 'Task body content in storage format', optional: true },
159161
createdBy: { type: 'string', description: 'Creator account ID', optional: true },
160162
assignedTo: { type: 'string', description: 'Assignee account ID', optional: true },
161163
completedBy: { type: 'string', description: 'Completer account ID', optional: true },

apps/sim/tools/confluence/update_task.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface ConfluenceUpdateTaskResponse {
1919
pageId: string | null
2020
blogPostId: string | null
2121
status: string
22+
body: string | null
2223
createdBy: string | null
2324
assignedTo: string | null
2425
completedBy: string | null
@@ -108,6 +109,7 @@ export const confluenceUpdateTaskTool: ToolConfig<
108109
pageId: task.pageId ?? null,
109110
blogPostId: task.blogPostId ?? null,
110111
status: task.status ?? '',
112+
body: task.body ?? null,
111113
createdBy: task.createdBy ?? null,
112114
assignedTo: task.assignedTo ?? null,
113115
completedBy: task.completedBy ?? null,
@@ -127,6 +129,7 @@ export const confluenceUpdateTaskTool: ToolConfig<
127129
pageId: { type: 'string', description: 'Page ID', optional: true },
128130
blogPostId: { type: 'string', description: 'Blog post ID', optional: true },
129131
status: { type: 'string', description: 'Updated task status' },
132+
body: { type: 'string', description: 'Task body content in storage format', optional: true },
130133
createdBy: { type: 'string', description: 'Creator account ID', optional: true },
131134
assignedTo: { type: 'string', description: 'Assignee account ID', optional: true },
132135
completedBy: { type: 'string', description: 'Completer account ID', optional: true },

0 commit comments

Comments
 (0)