This commit is contained in:
waleed
2026-02-25 15:09:00 -08:00
parent f09fef9aee
commit 1dc4ff2c62
10 changed files with 223 additions and 207 deletions

View File

@@ -38,8 +38,8 @@ import {
EyeIcon,
FirecrawlIcon,
FirefliesIcon,
GitLabIcon,
GithubIcon,
GitLabIcon,
GmailIcon,
GongIcon,
GoogleBooksIcon,
@@ -73,9 +73,9 @@ import {
LinearIcon,
LinkedInIcon,
LinkupIcon,
MailServerIcon,
MailchimpIcon,
MailgunIcon,
MailServerIcon,
Mem0Icon,
MicrosoftDataverseIcon,
MicrosoftExcelIcon,
@@ -108,8 +108,6 @@ import {
ResendIcon,
RevenueCatIcon,
S3Icon,
SQSIcon,
STTIcon,
SalesforceIcon,
SearchIcon,
SendgridIcon,
@@ -121,17 +119,19 @@ import {
SimilarwebIcon,
SlackIcon,
SmtpIcon,
SQSIcon,
SshIcon,
STTIcon,
StagehandIcon,
StripeIcon,
SupabaseIcon,
TTSIcon,
TavilyIcon,
TelegramIcon,
TextractIcon,
TinybirdIcon,
TranslateIcon,
TrelloIcon,
TTSIcon,
TwilioIcon,
TypeformIcon,
UpstashIcon,
@@ -142,11 +142,11 @@ import {
WhatsAppIcon,
WikipediaIcon,
WordpressIcon,
xIcon,
YouTubeIcon,
ZendeskIcon,
ZepIcon,
ZoomIcon,
xIcon,
} from '@/components/icons'
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>

View File

@@ -147,4 +147,4 @@
"zep",
"zoom"
]
}
}

View File

@@ -360,8 +360,7 @@ export async function PUT(request: NextRequest) {
statusText: response.statusText,
error: JSON.stringify(errorData, null, 2),
})
const errorMessage =
errorData?.message || `Failed to update blog post (${response.status})`
const errorMessage = errorData?.message || `Failed to update blog post (${response.status})`
return NextResponse.json({ error: errorMessage }, { status: response.status })
}
@@ -425,8 +424,7 @@ export async function DELETE(request: NextRequest) {
statusText: response.statusText,
error: JSON.stringify(errorData, null, 2),
})
const errorMessage =
errorData?.message || `Failed to delete blog post (${response.status})`
const errorMessage = errorData?.message || `Failed to delete blog post (${response.status})`
return NextResponse.json({ error: errorMessage }, { status: response.status })
}

View File

@@ -142,8 +142,7 @@ export async function POST(request: NextRequest) {
statusText: response.statusText,
error: JSON.stringify(errorData, null, 2),
})
const errorMessage =
errorData?.message || `Failed to create space (${response.status})`
const errorMessage = errorData?.message || `Failed to create space (${response.status})`
return NextResponse.json({ error: errorMessage }, { status: response.status })
}
@@ -223,8 +222,7 @@ export async function PUT(request: NextRequest) {
statusText: response.statusText,
error: JSON.stringify(errorData, null, 2),
})
const errorMessage =
errorData?.message || `Failed to update space (${response.status})`
const errorMessage = errorData?.message || `Failed to update space (${response.status})`
return NextResponse.json({ error: errorMessage }, { status: response.status })
}
@@ -296,8 +294,7 @@ export async function DELETE(request: NextRequest) {
statusText: response.statusText,
error: JSON.stringify(errorData, null, 2),
})
const errorMessage =
errorData?.message || `Failed to delete space (${response.status})`
const errorMessage = errorData?.message || `Failed to delete space (${response.status})`
return NextResponse.json({ error: errorMessage }, { status: response.status })
}

View File

@@ -675,7 +675,10 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
type: 'short-input',
placeholder: 'Enter blog post ID',
required: true,
condition: { field: 'operation', value: ['get_blogpost', 'update_blogpost', 'delete_blogpost'] },
condition: {
field: 'operation',
value: ['get_blogpost', 'update_blogpost', 'delete_blogpost'],
},
},
{
id: 'versionNumber',
@@ -794,14 +797,20 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
title: 'Title',
type: 'short-input',
placeholder: 'Enter title',
condition: { field: 'operation', value: ['create', 'update', 'create_blogpost', 'update_blogpost', 'update_space'] },
condition: {
field: 'operation',
value: ['create', 'update', 'create_blogpost', 'update_blogpost', 'update_space'],
},
},
{
id: 'content',
title: 'Content',
type: 'long-input',
placeholder: 'Enter content',
condition: { field: 'operation', value: ['create', 'update', 'create_blogpost', 'update_blogpost'] },
condition: {
field: 'operation',
value: ['create', 'update', 'create_blogpost', 'update_blogpost'],
},
},
{
id: 'parentId',

View File

@@ -28,102 +28,100 @@ export interface ConfluenceGetTaskResponse {
}
}
export const confluenceGetTaskTool: ToolConfig<
ConfluenceGetTaskParams,
ConfluenceGetTaskResponse
> = {
id: 'confluence_get_task',
name: 'Confluence Get Task',
description: 'Get a specific Confluence inline task by ID.',
version: '1.0.0',
export const confluenceGetTaskTool: ToolConfig<ConfluenceGetTaskParams, ConfluenceGetTaskResponse> =
{
id: 'confluence_get_task',
name: 'Confluence Get Task',
description: 'Get a specific Confluence inline task by ID.',
version: '1.0.0',
oauth: {
required: true,
provider: 'confluence',
},
params: {
accessToken: {
type: 'string',
oauth: {
required: true,
visibility: 'hidden',
description: 'OAuth access token for Confluence',
provider: 'confluence',
},
domain: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Your Confluence domain (e.g., yourcompany.atlassian.net)',
},
taskId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The ID of the task to retrieve',
},
cloudId: {
type: 'string',
required: false,
visibility: 'user-only',
description:
'Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain.',
},
},
request: {
url: () => '/api/tools/confluence/tasks',
method: 'POST',
headers: (params: ConfluenceGetTaskParams) => ({
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${params.accessToken}`,
}),
body: (params: ConfluenceGetTaskParams) => ({
domain: params.domain,
accessToken: params.accessToken,
cloudId: params.cloudId,
taskId: params.taskId,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
const task = data.task || data
return {
success: true,
output: {
ts: new Date().toISOString(),
id: task.id ?? '',
localId: task.localId ?? null,
spaceId: task.spaceId ?? null,
pageId: task.pageId ?? null,
blogPostId: task.blogPostId ?? null,
status: task.status ?? '',
createdBy: task.createdBy ?? null,
assignedTo: task.assignedTo ?? null,
completedBy: task.completedBy ?? null,
createdAt: task.createdAt ?? null,
updatedAt: task.updatedAt ?? null,
dueAt: task.dueAt ?? null,
completedAt: task.completedAt ?? null,
params: {
accessToken: {
type: 'string',
required: true,
visibility: 'hidden',
description: 'OAuth access token for Confluence',
},
}
},
domain: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Your Confluence domain (e.g., yourcompany.atlassian.net)',
},
taskId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The ID of the task to retrieve',
},
cloudId: {
type: 'string',
required: false,
visibility: 'user-only',
description:
'Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain.',
},
},
outputs: {
ts: TIMESTAMP_OUTPUT,
id: { type: 'string', description: 'Task ID' },
localId: { type: 'string', description: 'Local task ID', optional: true },
spaceId: { type: 'string', description: 'Space ID', optional: true },
pageId: { type: 'string', description: 'Page ID', optional: true },
blogPostId: { type: 'string', description: 'Blog post ID', optional: true },
status: { type: 'string', description: 'Task status (complete or incomplete)' },
createdBy: { type: 'string', description: 'Creator account ID', optional: true },
assignedTo: { type: 'string', description: 'Assignee account ID', optional: true },
completedBy: { type: 'string', description: 'Completer account ID', optional: true },
createdAt: { type: 'string', description: 'Creation timestamp', optional: true },
updatedAt: { type: 'string', description: 'Last update timestamp', optional: true },
dueAt: { type: 'string', description: 'Due date', optional: true },
completedAt: { type: 'string', description: 'Completion timestamp', optional: true },
},
}
request: {
url: () => '/api/tools/confluence/tasks',
method: 'POST',
headers: (params: ConfluenceGetTaskParams) => ({
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${params.accessToken}`,
}),
body: (params: ConfluenceGetTaskParams) => ({
domain: params.domain,
accessToken: params.accessToken,
cloudId: params.cloudId,
taskId: params.taskId,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
const task = data.task || data
return {
success: true,
output: {
ts: new Date().toISOString(),
id: task.id ?? '',
localId: task.localId ?? null,
spaceId: task.spaceId ?? null,
pageId: task.pageId ?? null,
blogPostId: task.blogPostId ?? null,
status: task.status ?? '',
createdBy: task.createdBy ?? null,
assignedTo: task.assignedTo ?? null,
completedBy: task.completedBy ?? null,
createdAt: task.createdAt ?? null,
updatedAt: task.updatedAt ?? null,
dueAt: task.dueAt ?? null,
completedAt: task.completedAt ?? null,
},
}
},
outputs: {
ts: TIMESTAMP_OUTPUT,
id: { type: 'string', description: 'Task ID' },
localId: { type: 'string', description: 'Local task ID', optional: true },
spaceId: { type: 'string', description: 'Space ID', optional: true },
pageId: { type: 'string', description: 'Page ID', optional: true },
blogPostId: { type: 'string', description: 'Blog post ID', optional: true },
status: { type: 'string', description: 'Task status (complete or incomplete)' },
createdBy: { type: 'string', description: 'Creator account ID', optional: true },
assignedTo: { type: 'string', description: 'Assignee account ID', optional: true },
completedBy: { type: 'string', description: 'Completer account ID', optional: true },
createdAt: { type: 'string', description: 'Creation timestamp', optional: true },
updatedAt: { type: 'string', description: 'Last update timestamp', optional: true },
dueAt: { type: 'string', description: 'Due date', optional: true },
completedAt: { type: 'string', description: 'Completion timestamp', optional: true },
},
}

View File

@@ -21,98 +21,96 @@ export interface ConfluenceGetUserResponse {
}
}
export const confluenceGetUserTool: ToolConfig<
ConfluenceGetUserParams,
ConfluenceGetUserResponse
> = {
id: 'confluence_get_user',
name: 'Confluence Get User',
description: 'Get a Confluence user\'s display name and profile info by their account ID.',
version: '1.0.0',
export const confluenceGetUserTool: ToolConfig<ConfluenceGetUserParams, ConfluenceGetUserResponse> =
{
id: 'confluence_get_user',
name: 'Confluence Get User',
description: "Get a Confluence user's display name and profile info by their account ID.",
version: '1.0.0',
oauth: {
required: true,
provider: 'confluence',
},
params: {
accessToken: {
type: 'string',
oauth: {
required: true,
visibility: 'hidden',
description: 'OAuth access token for Confluence',
provider: 'confluence',
},
domain: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Your Confluence domain (e.g., yourcompany.atlassian.net)',
},
accountId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The Atlassian account ID of the user to look up',
},
cloudId: {
type: 'string',
required: false,
visibility: 'user-only',
description:
'Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain.',
},
},
request: {
url: (params: ConfluenceGetUserParams) => {
const query = new URLSearchParams({
domain: params.domain,
accessToken: params.accessToken,
accountId: params.accountId?.trim(),
})
if (params.cloudId) {
query.set('cloudId', params.cloudId)
}
return `/api/tools/confluence/user?${query.toString()}`
},
method: 'GET',
headers: (params: ConfluenceGetUserParams) => ({
Accept: 'application/json',
Authorization: `Bearer ${params.accessToken}`,
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
ts: new Date().toISOString(),
accountId: data.accountId ?? '',
displayName: data.displayName ?? '',
email: data.email ?? null,
accountType: data.accountType ?? null,
profilePicture: data.profilePicture?.path ?? null,
publicName: data.publicName ?? null,
params: {
accessToken: {
type: 'string',
required: true,
visibility: 'hidden',
description: 'OAuth access token for Confluence',
},
}
},
domain: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Your Confluence domain (e.g., yourcompany.atlassian.net)',
},
accountId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The Atlassian account ID of the user to look up',
},
cloudId: {
type: 'string',
required: false,
visibility: 'user-only',
description:
'Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain.',
},
},
outputs: {
ts: TIMESTAMP_OUTPUT,
accountId: { type: 'string', description: 'Atlassian account ID of the user' },
displayName: { type: 'string', description: 'Display name of the user' },
email: { type: 'string', description: 'Email address of the user', optional: true },
accountType: {
type: 'string',
description: 'Account type (e.g., atlassian, app, customer)',
optional: true,
request: {
url: (params: ConfluenceGetUserParams) => {
const query = new URLSearchParams({
domain: params.domain,
accessToken: params.accessToken,
accountId: params.accountId?.trim(),
})
if (params.cloudId) {
query.set('cloudId', params.cloudId)
}
return `/api/tools/confluence/user?${query.toString()}`
},
method: 'GET',
headers: (params: ConfluenceGetUserParams) => ({
Accept: 'application/json',
Authorization: `Bearer ${params.accessToken}`,
}),
},
profilePicture: {
type: 'string',
description: 'Path to the user profile picture',
optional: true,
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
ts: new Date().toISOString(),
accountId: data.accountId ?? '',
displayName: data.displayName ?? '',
email: data.email ?? null,
accountType: data.accountType ?? null,
profilePicture: data.profilePicture?.path ?? null,
publicName: data.publicName ?? null,
},
}
},
publicName: { type: 'string', description: 'Public name of the user', optional: true },
},
}
outputs: {
ts: TIMESTAMP_OUTPUT,
accountId: { type: 'string', description: 'Atlassian account ID of the user' },
displayName: { type: 'string', description: 'Display name of the user' },
email: { type: 'string', description: 'Email address of the user', optional: true },
accountType: {
type: 'string',
description: 'Account type (e.g., atlassian, app, customer)',
optional: true,
},
profilePicture: {
type: 'string',
description: 'Path to the user profile picture',
optional: true,
},
publicName: { type: 'string', description: 'Public name of the user', optional: true },
},
}

View File

@@ -122,12 +122,27 @@ export const confluenceListSpacePermissionsTool: ToolConfig<
type: 'object',
properties: {
id: { type: 'string', description: 'Permission ID' },
principalType: { type: 'string', description: 'Principal type (user, group, role)', optional: true },
principalType: {
type: 'string',
description: 'Principal type (user, group, role)',
optional: true,
},
principalId: { type: 'string', description: 'Principal ID', optional: true },
operationKey: { type: 'string', description: 'Operation key (read, create, delete, etc.)', optional: true },
operationTargetType: { type: 'string', description: 'Target type (page, blogpost, space, etc.)', optional: true },
operationKey: {
type: 'string',
description: 'Operation key (read, create, delete, etc.)',
optional: true,
},
operationTargetType: {
type: 'string',
description: 'Target type (page, blogpost, space, etc.)',
optional: true,
},
anonymousAccess: { type: 'boolean', description: 'Whether anonymous access is allowed' },
unlicensedAccess: { type: 'boolean', description: 'Whether unlicensed access is allowed' },
unlicensedAccess: {
type: 'boolean',
description: 'Whether unlicensed access is allowed',
},
},
},
},

View File

@@ -42,7 +42,8 @@ export const confluenceListTasksTool: ToolConfig<
> = {
id: 'confluence_list_tasks',
name: 'Confluence List Tasks',
description: 'List inline tasks from Confluence. Optionally filter by page, space, assignee, or status.',
description:
'List inline tasks from Confluence. Optionally filter by page, space, assignee, or status.',
version: '1.0.0',
oauth: {

View File

@@ -190,16 +190,16 @@ import {
confluenceCreateCommentTool,
confluenceCreatePagePropertyTool,
confluenceCreatePageTool,
confluenceCreateSpaceTool,
confluenceCreateSpacePropertyTool,
confluenceCreateSpaceTool,
confluenceDeleteAttachmentTool,
confluenceDeleteBlogPostTool,
confluenceDeleteCommentTool,
confluenceDeleteLabelTool,
confluenceDeletePagePropertyTool,
confluenceDeletePageTool,
confluenceDeleteSpaceTool,
confluenceDeleteSpacePropertyTool,
confluenceDeleteSpaceTool,
confluenceGetBlogPostTool,
confluenceGetPageAncestorsTool,
confluenceGetPageChildrenTool,