mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
improvement(tools): improved formatting of confluence retrieve page tool, added oauth required param
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ConfluenceIcon } from '@/components/icons'
|
||||
import { ConfluenceRetrieveResponse } from '@/tools/confluence/retrieve'
|
||||
import { ConfluenceRetrieveResponse } from '@/tools/confluence/types'
|
||||
import { BlockConfig } from '../types'
|
||||
|
||||
export const ConfluenceBlock: BlockConfig<ConfluenceRetrieveResponse> = {
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
import { ToolConfig, ToolResponse } from '../types'
|
||||
|
||||
export interface ConfluenceRetrieveParams {
|
||||
accessToken: string
|
||||
pageId: string
|
||||
domain: string
|
||||
}
|
||||
|
||||
export interface ConfluenceRetrieveResponse extends ToolResponse {
|
||||
output: {
|
||||
ts: string
|
||||
pageId: string
|
||||
content: string
|
||||
title: string
|
||||
}
|
||||
}
|
||||
import { ToolConfig } from '../types'
|
||||
import { ConfluenceRetrieveResponse } from './types'
|
||||
import { ConfluenceRetrieveParams } from './types'
|
||||
|
||||
export const confluenceRetrieveTool: ToolConfig<
|
||||
ConfluenceRetrieveParams,
|
||||
@@ -24,6 +11,12 @@ export const confluenceRetrieveTool: ToolConfig<
|
||||
description: 'Retrieve content from Confluence pages using the Confluence API.',
|
||||
version: '1.0.0',
|
||||
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'confluence',
|
||||
additionalScopes: ['read:confluence-content.all', 'read:me', 'offline_access'],
|
||||
},
|
||||
|
||||
params: {
|
||||
accessToken: {
|
||||
type: 'string',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { ToolResponse } from '../types'
|
||||
|
||||
export interface ConfluenceRetrieveParams {
|
||||
accessToken: string
|
||||
pageId: string
|
||||
domain: string
|
||||
}
|
||||
|
||||
export interface ConfluenceRetrieveResponse extends ToolResponse {
|
||||
output: {
|
||||
ts: string
|
||||
pageId: string
|
||||
content: string
|
||||
title: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user