Skip to content

Commit c2499f6

Browse files
committed
improvement(tools): improved formatting of confluence retrieve page tool, added oauth required param
1 parent bceab2c commit c2499f6

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

sim/blocks/blocks/confluence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ConfluenceIcon } from '@/components/icons'
2-
import { ConfluenceRetrieveResponse } from '@/tools/confluence/retrieve'
2+
import { ConfluenceRetrieveResponse } from '@/tools/confluence/types'
33
import { BlockConfig } from '../types'
44

55
export const ConfluenceBlock: BlockConfig<ConfluenceRetrieveResponse> = {

sim/tools/confluence/retrieve.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
import { ToolConfig, ToolResponse } from '../types'
2-
3-
export interface ConfluenceRetrieveParams {
4-
accessToken: string
5-
pageId: string
6-
domain: string
7-
}
8-
9-
export interface ConfluenceRetrieveResponse extends ToolResponse {
10-
output: {
11-
ts: string
12-
pageId: string
13-
content: string
14-
title: string
15-
}
16-
}
1+
import { ToolConfig } from '../types'
2+
import { ConfluenceRetrieveResponse } from './types'
3+
import { ConfluenceRetrieveParams } from './types'
174

185
export const confluenceRetrieveTool: ToolConfig<
196
ConfluenceRetrieveParams,
@@ -24,6 +11,12 @@ export const confluenceRetrieveTool: ToolConfig<
2411
description: 'Retrieve content from Confluence pages using the Confluence API.',
2512
version: '1.0.0',
2613

14+
oauth: {
15+
required: true,
16+
provider: 'confluence',
17+
additionalScopes: ['read:confluence-content.all', 'read:me', 'offline_access'],
18+
},
19+
2720
params: {
2821
accessToken: {
2922
type: 'string',

sim/tools/confluence/types.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ToolResponse } from '../types'
2+
3+
export interface ConfluenceRetrieveParams {
4+
accessToken: string
5+
pageId: string
6+
domain: string
7+
}
8+
9+
export interface ConfluenceRetrieveResponse extends ToolResponse {
10+
output: {
11+
ts: string
12+
pageId: string
13+
content: string
14+
title: string
15+
}
16+
}

0 commit comments

Comments
 (0)