mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(credentials): remove special scopes from additional scopes required hook, remove additionalScopes arg from tool definition (#1905)
This commit is contained in:
@@ -21,7 +21,11 @@ import {
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { Toggle } from '@/components/ui/toggle'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import type { OAuthProvider, OAuthService } from '@/lib/oauth/oauth'
|
||||
import {
|
||||
getCanonicalScopesForProvider,
|
||||
type OAuthProvider,
|
||||
type OAuthService,
|
||||
} from '@/lib/oauth/oauth'
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
ChannelSelectorInput,
|
||||
@@ -1713,7 +1717,7 @@ export function ToolInput({
|
||||
value={tool.params.credential || ''}
|
||||
onChange={(value) => handleParamChange(toolIndex, 'credential', value)}
|
||||
provider={oauthConfig.provider as OAuthProvider}
|
||||
requiredScopes={oauthConfig.additionalScopes || []}
|
||||
requiredScopes={getCanonicalScopesForProvider(oauthConfig.provider)}
|
||||
label={`Select ${oauthConfig.provider} account`}
|
||||
serviceId={oauthConfig.provider}
|
||||
disabled={disabled}
|
||||
|
||||
@@ -44,19 +44,40 @@ export function getCredentialsNeedingReauth(credentials: Credential[]): Credenti
|
||||
return credentials.filter(credentialNeedsReauth)
|
||||
}
|
||||
|
||||
/**
|
||||
* Scopes that control token behavior but are not returned in OAuth token responses.
|
||||
* These should be ignored when validating credential scopes.
|
||||
*/
|
||||
const IGNORED_SCOPES = new Set([
|
||||
'offline_access', // Microsoft - requests refresh token
|
||||
'refresh_token', // Salesforce - requests refresh token
|
||||
'offline.access', // Airtable - requests refresh token (note: dot not underscore)
|
||||
])
|
||||
|
||||
/**
|
||||
* Compute which of the provided requiredScopes are NOT granted by the credential.
|
||||
* Note: Ignores special OAuth scopes that control token behavior (like offline_access)
|
||||
* as they are not returned in the token response's scope list even when granted.
|
||||
*/
|
||||
export function getMissingRequiredScopes(
|
||||
credential: Credential | undefined,
|
||||
requiredScopes: string[] = []
|
||||
): string[] {
|
||||
if (!credential) return [...requiredScopes]
|
||||
if (!credential) {
|
||||
// Filter out ignored scopes from required scopes as they're not returned by OAuth providers
|
||||
return requiredScopes.filter((s) => !IGNORED_SCOPES.has(s))
|
||||
}
|
||||
|
||||
const granted = new Set((credential.scopes || []).map((s) => s))
|
||||
const missing: string[] = []
|
||||
|
||||
for (const s of requiredScopes) {
|
||||
// Skip ignored scopes as providers don't return them in the scope list even when granted
|
||||
if (IGNORED_SCOPES.has(s)) continue
|
||||
|
||||
if (!granted.has(s)) missing.push(s)
|
||||
}
|
||||
|
||||
return missing
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaAddCommentTool: ToolConfig<AsanaAddCommentParams, AsanaAddComm
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaCreateTaskTool: ToolConfig<AsanaCreateTaskParams, AsanaCreateT
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaGetProjectsTool: ToolConfig<AsanaGetProjectsParams, AsanaGetPr
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaGetTaskTool: ToolConfig<AsanaGetTaskParams, AsanaGetTaskRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaSearchTasksTool: ToolConfig<AsanaSearchTasksParams, AsanaSearc
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const asanaUpdateTaskTool: ToolConfig<AsanaUpdateTaskParams, AsanaUpdateT
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'asana',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailAddLabelTool: ToolConfig<GmailLabelParams, GmailToolResponse>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailArchiveTool: ToolConfig<GmailMarkReadParams, GmailToolResponse
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailDeleteTool: ToolConfig<GmailMarkReadParams, GmailToolResponse>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailDraftTool: ToolConfig<GmailSendParams, GmailToolResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailMarkReadTool: ToolConfig<GmailMarkReadParams, GmailToolRespons
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailMarkUnreadTool: ToolConfig<GmailMarkReadParams, GmailToolRespo
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailMoveTool: ToolConfig<GmailMoveParams, GmailToolResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const gmailReadTool: ToolConfig<GmailReadParams, GmailToolResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.labels'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailRemoveLabelTool: ToolConfig<GmailLabelParams, GmailToolRespons
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -18,7 +18,6 @@ export const gmailSearchTool: ToolConfig<GmailSearchParams, GmailToolResponse> =
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.labels'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailSendTool: ToolConfig<GmailSendParams, GmailToolResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.send'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const gmailUnarchiveTool: ToolConfig<GmailMarkReadParams, GmailToolRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-email',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/gmail.modify'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -16,7 +16,6 @@ export const createTool: ToolConfig<GoogleCalendarCreateParams, GoogleCalendarCr
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -15,7 +15,6 @@ export const getTool: ToolConfig<GoogleCalendarGetParams, GoogleCalendarGetRespo
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const inviteTool: ToolConfig<GoogleCalendarInviteParams, GoogleCalendarIn
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -16,7 +16,6 @@ export const listTool: ToolConfig<GoogleCalendarListParams, GoogleCalendarListRe
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -17,7 +17,6 @@ export const quickAddTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const updateTool: ToolConfig<GoogleCalendarUpdateParams, GoogleCalendarTo
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-calendar',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,10 +13,6 @@ export const createTool: ToolConfig<GoogleDocsToolParams, GoogleDocsCreateRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-docs',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,10 +11,6 @@ export const readTool: ToolConfig<GoogleDocsToolParams, GoogleDocsReadResponse>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-docs',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -9,10 +9,6 @@ export const writeTool: ToolConfig<GoogleDocsToolParams, GoogleDocsWriteResponse
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-docs',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
params: {
|
||||
accessToken: {
|
||||
|
||||
@@ -10,10 +10,6 @@ export const createFolderTool: ToolConfig<GoogleDriveToolParams, GoogleDriveUplo
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-drive',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,10 +14,6 @@ export const downloadTool: ToolConfig<GoogleDriveToolParams, GoogleDriveDownload
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-drive',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -18,10 +18,6 @@ export const getContentTool: ToolConfig<GoogleDriveToolParams, GoogleDriveGetCon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-drive',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,10 +10,6 @@ export const listTool: ToolConfig<GoogleDriveToolParams, GoogleDriveListResponse
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-drive',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -18,10 +18,6 @@ export const uploadTool: ToolConfig<GoogleDriveToolParams, GoogleDriveUploadResp
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-drive',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/drive.readonly',
|
||||
'https://www.googleapis.com/auth/drive.file',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -15,7 +15,6 @@ export const getResponsesTool: ToolConfig<GoogleFormsGetResponsesParams> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-forms',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,7 +13,6 @@ export const appendTool: ToolConfig<GoogleSheetsToolParams, GoogleSheetsAppendRe
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-sheets',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const readTool: ToolConfig<GoogleSheetsToolParams, GoogleSheetsReadRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-sheets',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,7 +13,6 @@ export const updateTool: ToolConfig<GoogleSheetsToolParams, GoogleSheetsUpdateRe
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-sheets',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const writeTool: ToolConfig<GoogleSheetsToolParams, GoogleSheetsWriteResp
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-sheets',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -17,7 +17,6 @@ export const createMattersTool: ToolConfig<GoogleVaultCreateMattersParams> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const createMattersExportTool: ToolConfig<GoogleVaultCreateMattersExportP
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const createMattersHoldsTool: ToolConfig<GoogleVaultCreateMattersHoldsPar
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -20,11 +20,6 @@ export const downloadExportFileTool: ToolConfig<DownloadParams> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: [
|
||||
'https://www.googleapis.com/auth/ediscovery',
|
||||
// Required to fetch the object bytes from the Cloud Storage bucket that Vault uses
|
||||
'https://www.googleapis.com/auth/devstorage.read_only',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -16,7 +16,6 @@ export const listMattersTool: ToolConfig<GoogleVaultListMattersParams> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const listMattersExportTool: ToolConfig<GoogleVaultListMattersExportParam
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const listMattersHoldsTool: ToolConfig<GoogleVaultListMattersHoldsParams>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'google-vault',
|
||||
additionalScopes: ['https://www.googleapis.com/auth/ediscovery'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,7 +11,6 @@ export const jiraAddCommentTool: ToolConfig<JiraAddCommentParams, JiraAddComment
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:comment:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -27,7 +27,6 @@ export const jiraAddWatcherTool: ToolConfig<JiraAddWatcherParams, JiraAddWatcher
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,7 +11,6 @@ export const jiraAddWorklogTool: ToolConfig<JiraAddWorklogParams, JiraAddWorklog
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:issue-worklog:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -27,7 +27,6 @@ export const jiraAssignIssueTool: ToolConfig<JiraAssignIssueParams, JiraAssignIs
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const jiraBulkRetrieveTool: ToolConfig<JiraRetrieveBulkParams, JiraRetrie
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:jira-work', 'read:jira-user', 'read:me', 'offline_access'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -34,7 +34,6 @@ export const jiraCreateIssueLinkTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:issue-link:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -28,7 +28,6 @@ export const jiraDeleteAttachmentTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['delete:attachment:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -28,7 +28,6 @@ export const jiraDeleteCommentTool: ToolConfig<JiraDeleteCommentParams, JiraDele
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['delete:comment:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -26,7 +26,6 @@ export const jiraDeleteIssueTool: ToolConfig<JiraDeleteIssueParams, JiraDeleteIs
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['delete:issue:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -28,7 +28,6 @@ export const jiraDeleteIssueLinkTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['delete:issue-link:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -28,7 +28,6 @@ export const jiraDeleteWorklogTool: ToolConfig<JiraDeleteWorklogParams, JiraDele
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['delete:issue-worklog:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const jiraGetAttachmentsTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:attachment:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -34,7 +34,6 @@ export const jiraGetCommentsTool: ToolConfig<JiraGetCommentsParams, JiraGetComme
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:comment:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -37,7 +37,6 @@ export const jiraGetWorklogsTool: ToolConfig<JiraGetWorklogsParams, JiraGetWorkl
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:issue-worklog:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -28,7 +28,6 @@ export const jiraRemoveWatcherTool: ToolConfig<JiraRemoveWatcherParams, JiraRemo
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const jiraRetrieveTool: ToolConfig<JiraRetrieveParams, JiraRetrieveRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:jira-work', 'read:jira-user', 'read:me', 'offline_access'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,7 +11,6 @@ export const jiraSearchIssuesTool: ToolConfig<JiraSearchIssuesParams, JiraSearch
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const jiraTransitionIssueTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const jiraUpdateTool: ToolConfig<JiraUpdateParams, JiraUpdateResponse> =
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['read:jira-user', 'write:jira-work', 'write:issue:jira', 'read:jira-work'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const jiraUpdateCommentTool: ToolConfig<JiraUpdateCommentParams, JiraUpda
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:comment:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const jiraUpdateWorklogTool: ToolConfig<JiraUpdateWorklogParams, JiraUpda
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: ['write:issue-worklog:jira', 'read:jira-work', 'read:jira-user'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,17 +10,6 @@ export const jiraWriteTool: ToolConfig<JiraWriteParams, JiraWriteResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'jira',
|
||||
additionalScopes: [
|
||||
'read:jira-user',
|
||||
'write:jira-work',
|
||||
'read:project:jira',
|
||||
'read:issue:jira',
|
||||
'write:issue:jira',
|
||||
'write:comment:jira',
|
||||
'write:comment.property:jira',
|
||||
'write:attachment:jira',
|
||||
'read:attachment:jira',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -18,7 +18,6 @@ export const readTool: ToolConfig<MicrosoftExcelToolParams, MicrosoftExcelReadRe
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-excel',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -17,7 +17,6 @@ export const tableAddTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-excel',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,7 +14,6 @@ export const writeTool: ToolConfig<MicrosoftExcelToolParams, MicrosoftExcelWrite
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-excel',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const createBucketTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -20,7 +20,6 @@ export const createTaskTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const deleteBucketTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const deleteTaskTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const getTaskDetailsTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const listBucketsTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const listPlansTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const readBucketTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -19,7 +19,6 @@ export const readPlanTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -18,7 +18,6 @@ export const readTaskTool: ToolConfig<MicrosoftPlannerToolParams, MicrosoftPlann
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -20,7 +20,6 @@ export const updateBucketTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -21,7 +21,6 @@ export const updateTaskTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -21,7 +21,6 @@ export const updateTaskDetailsTool: ToolConfig<
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'microsoft-planner',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const notionCreateDatabaseTool: ToolConfig<NotionCreateDatabaseParams, No
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.write'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const notionCreatePageTool: ToolConfig<NotionCreatePageParams, NotionResp
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.write'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,7 +11,6 @@ export const notionQueryDatabaseTool: ToolConfig<NotionQueryDatabaseParams, Noti
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'database.read'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const notionReadTool: ToolConfig<NotionReadParams, NotionResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.read'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -15,7 +15,6 @@ export const notionReadDatabaseTool: ToolConfig<NotionReadDatabaseParams, Notion
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'database.read'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -11,7 +11,6 @@ export const notionSearchTool: ToolConfig<NotionSearchParams, NotionResponse> =
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.read'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const notionUpdatePageTool: ToolConfig<NotionUpdatePageParams, NotionResp
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.write'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const notionWriteTool: ToolConfig<NotionWriteParams, NotionResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'notion',
|
||||
additionalScopes: ['workspace.content', 'page.write'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const createFolderTool: ToolConfig<OneDriveToolParams, OneDriveUploadResp
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'onedrive',
|
||||
additionalScopes: [],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,14 +13,6 @@ export const deleteTool: ToolConfig<OneDriveToolParams, OneDriveDeleteResponse>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'onedrive',
|
||||
additionalScopes: [
|
||||
'openid',
|
||||
'profile',
|
||||
'email',
|
||||
'Files.Read',
|
||||
'Files.ReadWrite',
|
||||
'offline_access',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,7 +13,6 @@ export const downloadTool: ToolConfig<OneDriveToolParams, OneDriveDownloadRespon
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'onedrive',
|
||||
additionalScopes: ['Files.Read', 'Files.ReadWrite', 'offline_access'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -14,14 +14,6 @@ export const listTool: ToolConfig<OneDriveToolParams, OneDriveListResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'onedrive',
|
||||
additionalScopes: [
|
||||
'openid',
|
||||
'profile',
|
||||
'email',
|
||||
'Files.Read',
|
||||
'Files.ReadWrite',
|
||||
'offline_access',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -13,14 +13,6 @@ export const uploadTool: ToolConfig<OneDriveToolParams, OneDriveUploadResponse>
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'onedrive',
|
||||
additionalScopes: [
|
||||
'openid',
|
||||
'profile',
|
||||
'email',
|
||||
'Files.Read',
|
||||
'Files.ReadWrite',
|
||||
'offline_access',
|
||||
],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const deleteTool: ToolConfig<RedditDeleteParams, RedditWriteResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'reddit',
|
||||
additionalScopes: ['edit'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const editTool: ToolConfig<RedditEditParams, RedditWriteResponse> = {
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'reddit',
|
||||
additionalScopes: ['edit'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export const getCommentsTool: ToolConfig<RedditCommentsParams, RedditCommentsRes
|
||||
oauth: {
|
||||
required: true,
|
||||
provider: 'reddit',
|
||||
additionalScopes: ['read'],
|
||||
},
|
||||
|
||||
params: {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user