mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-14 08:25:03 -05:00
canonical credential id entry
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { createElement, useEffect, useMemo, useState } from 'react'
|
||||
import { createLogger } from '@sim/logger'
|
||||
import { AlertTriangle, Plus, RefreshCw, Search, Share2, Trash2 } from 'lucide-react'
|
||||
import { AlertTriangle, Check, Copy, Plus, RefreshCw, Search, Share2, Trash2 } from 'lucide-react'
|
||||
import { useParams } from 'next/navigation'
|
||||
import {
|
||||
Badge,
|
||||
@@ -185,6 +185,7 @@ export function CredentialsManager() {
|
||||
const [selectedDescriptionDraft, setSelectedDescriptionDraft] = useState('')
|
||||
const [selectedDisplayNameDraft, setSelectedDisplayNameDraft] = useState('')
|
||||
const [showCreateOAuthRequiredModal, setShowCreateOAuthRequiredModal] = useState(false)
|
||||
const [copyIdSuccess, setCopyIdSuccess] = useState(false)
|
||||
const { data: session } = useSession()
|
||||
const currentUserId = session?.user?.id || ''
|
||||
|
||||
@@ -1103,7 +1104,29 @@ export function CredentialsManager() {
|
||||
{selectedCredential.type === 'oauth' ? (
|
||||
<div className='flex flex-col gap-[10px]'>
|
||||
<div>
|
||||
<Label htmlFor='credential-display-name'>Display Name</Label>
|
||||
<div className='flex items-center gap-[6px]'>
|
||||
<Label htmlFor='credential-display-name'>Display Name</Label>
|
||||
<Tooltip.Root>
|
||||
<Tooltip.Trigger asChild>
|
||||
<Button
|
||||
variant='ghost'
|
||||
className='h-[20px] w-[20px] p-0'
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(selectedCredential.id)
|
||||
setCopyIdSuccess(true)
|
||||
setTimeout(() => setCopyIdSuccess(false), 2000)
|
||||
}}
|
||||
>
|
||||
{copyIdSuccess ? (
|
||||
<Check className='h-[11px] w-[11px]' />
|
||||
) : (
|
||||
<Copy className='h-[11px] w-[11px]' />
|
||||
)}
|
||||
</Button>
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Content>Copy credential ID</Tooltip.Content>
|
||||
</Tooltip.Root>
|
||||
</div>
|
||||
<Input
|
||||
id='credential-display-name'
|
||||
value={selectedDisplayNameDraft}
|
||||
|
||||
@@ -142,6 +142,8 @@ Return ONLY the JSON array.`,
|
||||
title: 'Google Cloud Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'vertex-ai',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
||||
placeholder: 'Select Google Cloud account',
|
||||
required: true,
|
||||
@@ -150,6 +152,19 @@ Return ONLY the JSON array.`,
|
||||
value: providers.vertex.models,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Cloud Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
condition: {
|
||||
field: 'model',
|
||||
value: providers.vertex.models,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'reasoningEffort',
|
||||
title: 'Reasoning Effort',
|
||||
|
||||
@@ -32,6 +32,8 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Airtable Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'airtable',
|
||||
requiredScopes: [
|
||||
'data.records:read',
|
||||
@@ -42,6 +44,15 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
placeholder: 'Select Airtable account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Airtable Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'baseId',
|
||||
title: 'Base ID',
|
||||
|
||||
@@ -32,12 +32,22 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Asana Account',
|
||||
type: 'oauth-input',
|
||||
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'asana',
|
||||
requiredScopes: ['default'],
|
||||
placeholder: 'Select Asana account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Asana Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'workspace',
|
||||
title: 'Workspace GID',
|
||||
|
||||
@@ -49,9 +49,20 @@ export const CalComBlock: BlockConfig<ToolResponse> = {
|
||||
title: 'Cal.com Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'calcom',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
placeholder: 'Select Cal.com account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Cal.com Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
// === Create Booking fields ===
|
||||
{
|
||||
|
||||
@@ -51,6 +51,8 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Confluence Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'confluence',
|
||||
requiredScopes: [
|
||||
'read:confluence-content.all',
|
||||
@@ -85,6 +87,15 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
|
||||
placeholder: 'Select Confluence account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Confluence Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'pageId',
|
||||
title: 'Select Page',
|
||||
@@ -424,6 +435,8 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Confluence Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'confluence',
|
||||
requiredScopes: [
|
||||
'read:confluence-content.all',
|
||||
@@ -458,6 +471,15 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
|
||||
placeholder: 'Select Confluence account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Confluence Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'domain',
|
||||
title: 'Domain',
|
||||
|
||||
@@ -38,6 +38,8 @@ export const DropboxBlock: BlockConfig<DropboxResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Dropbox Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'dropbox',
|
||||
requiredScopes: [
|
||||
'account_info.read',
|
||||
@@ -51,6 +53,15 @@ export const DropboxBlock: BlockConfig<DropboxResponse> = {
|
||||
placeholder: 'Select Dropbox account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Dropbox Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Upload operation inputs
|
||||
{
|
||||
id: 'path',
|
||||
|
||||
@@ -76,6 +76,8 @@ export const GmailBlock: BlockConfig<GmailToolResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Gmail Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'gmail',
|
||||
requiredScopes: [
|
||||
'https://www.googleapis.com/auth/gmail.send',
|
||||
@@ -85,6 +87,15 @@ export const GmailBlock: BlockConfig<GmailToolResponse> = {
|
||||
placeholder: 'Select Gmail account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Gmail Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Send Email Fields
|
||||
{
|
||||
id: 'to',
|
||||
@@ -406,7 +417,7 @@ Return ONLY the search query - no explanations, no extra text.`,
|
||||
tool: selectGmailToolId,
|
||||
params: (params) => {
|
||||
const {
|
||||
credential,
|
||||
oauthCredential,
|
||||
folder,
|
||||
addLabelIds,
|
||||
removeLabelIds,
|
||||
@@ -467,7 +478,7 @@ Return ONLY the search query - no explanations, no extra text.`,
|
||||
|
||||
return {
|
||||
...rest,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
...(normalizedAttachments && { attachments: normalizedAttachments }),
|
||||
}
|
||||
},
|
||||
|
||||
@@ -39,11 +39,22 @@ export const GoogleCalendarBlock: BlockConfig<GoogleCalendarResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Google Calendar Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-calendar',
|
||||
requiredScopes: ['https://www.googleapis.com/auth/calendar'],
|
||||
placeholder: 'Select Google Calendar account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Calendar Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Calendar selector (basic mode) - not needed for list_calendars
|
||||
{
|
||||
id: 'calendarId',
|
||||
@@ -576,7 +587,7 @@ Return ONLY the natural language event text - no explanations.`,
|
||||
}
|
||||
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
...processedParams,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -32,6 +32,8 @@ export const GoogleDocsBlock: BlockConfig<GoogleDocsResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Google Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-docs',
|
||||
requiredScopes: [
|
||||
@@ -40,6 +42,15 @@ export const GoogleDocsBlock: BlockConfig<GoogleDocsResponse> = {
|
||||
],
|
||||
placeholder: 'Select Google account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Document selector (basic mode)
|
||||
{
|
||||
id: 'documentId',
|
||||
@@ -157,7 +168,7 @@ Return ONLY the document content - no explanations, no extra text.`,
|
||||
}
|
||||
},
|
||||
params: (params) => {
|
||||
const { credential, documentId, folderId, ...rest } = params
|
||||
const { oauthCredential, documentId, folderId, ...rest } = params
|
||||
|
||||
const effectiveDocumentId = documentId ? String(documentId).trim() : ''
|
||||
const effectiveFolderId = folderId ? String(folderId).trim() : ''
|
||||
@@ -166,7 +177,7 @@ Return ONLY the document content - no explanations, no extra text.`,
|
||||
...rest,
|
||||
documentId: effectiveDocumentId || undefined,
|
||||
folderId: effectiveFolderId || undefined,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -44,6 +44,8 @@ export const GoogleDriveBlock: BlockConfig<GoogleDriveResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Google Drive Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-drive',
|
||||
requiredScopes: [
|
||||
@@ -52,6 +54,15 @@ export const GoogleDriveBlock: BlockConfig<GoogleDriveResponse> = {
|
||||
],
|
||||
placeholder: 'Select Google Drive account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Drive Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Create/Upload File Fields
|
||||
{
|
||||
id: 'fileName',
|
||||
@@ -786,7 +797,7 @@ Return ONLY the message text - no subject line, no greetings/signatures, no extr
|
||||
},
|
||||
params: (params) => {
|
||||
const {
|
||||
credential,
|
||||
oauthCredential,
|
||||
// Folder canonical params (per-operation)
|
||||
uploadFolderId,
|
||||
createFolderParentId,
|
||||
@@ -873,7 +884,7 @@ Return ONLY the message text - no subject line, no greetings/signatures, no extr
|
||||
sendNotification === 'true' ? true : sendNotification === 'false' ? false : undefined
|
||||
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
folderId: effectiveFolderId,
|
||||
fileId: effectiveFileId,
|
||||
destinationFolderId: effectiveDestinationFolderId,
|
||||
|
||||
@@ -34,6 +34,8 @@ export const GoogleFormsBlock: BlockConfig = {
|
||||
id: 'credential',
|
||||
title: 'Google Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-forms',
|
||||
requiredScopes: [
|
||||
@@ -45,6 +47,15 @@ export const GoogleFormsBlock: BlockConfig = {
|
||||
],
|
||||
placeholder: 'Select Google account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Form selector (basic mode)
|
||||
{
|
||||
id: 'formSelector',
|
||||
@@ -233,7 +244,7 @@ Example for "Add a required multiple choice question about favorite color":
|
||||
},
|
||||
params: (params) => {
|
||||
const {
|
||||
credential,
|
||||
oauthCredential,
|
||||
operation,
|
||||
formId, // Canonical param from formSelector (basic) or manualFormId (advanced)
|
||||
responseId,
|
||||
@@ -251,7 +262,7 @@ Example for "Add a required multiple choice question about favorite color":
|
||||
...rest
|
||||
} = params
|
||||
|
||||
const baseParams = { ...rest, credential }
|
||||
const baseParams = { ...rest, credential: oauthCredential }
|
||||
const effectiveFormId = formId ? String(formId).trim() : undefined
|
||||
|
||||
switch (operation) {
|
||||
|
||||
@@ -42,6 +42,8 @@ export const GoogleGroupsBlock: BlockConfig = {
|
||||
id: 'credential',
|
||||
title: 'Google Groups Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-groups',
|
||||
requiredScopes: [
|
||||
@@ -50,6 +52,15 @@ export const GoogleGroupsBlock: BlockConfig = {
|
||||
],
|
||||
placeholder: 'Select Google Workspace account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Groups Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
{
|
||||
id: 'customer',
|
||||
@@ -311,12 +322,12 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
|
||||
}
|
||||
},
|
||||
params: (params) => {
|
||||
const { credential, operation, ...rest } = params
|
||||
const { oauthCredential, operation, ...rest } = params
|
||||
|
||||
switch (operation) {
|
||||
case 'list_groups':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
customer: rest.customer,
|
||||
domain: rest.domain,
|
||||
query: rest.query,
|
||||
@@ -325,19 +336,19 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
|
||||
case 'get_group':
|
||||
case 'delete_group':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
}
|
||||
case 'create_group':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
email: rest.email,
|
||||
name: rest.name,
|
||||
description: rest.description,
|
||||
}
|
||||
case 'update_group':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
name: rest.newName,
|
||||
email: rest.newEmail,
|
||||
@@ -345,7 +356,7 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
|
||||
}
|
||||
case 'list_members':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
maxResults: rest.maxResults ? Number(rest.maxResults) : undefined,
|
||||
roles: rest.roles,
|
||||
@@ -353,59 +364,59 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
|
||||
case 'get_member':
|
||||
case 'remove_member':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
memberKey: rest.memberKey,
|
||||
}
|
||||
case 'add_member':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
email: rest.memberEmail,
|
||||
role: rest.role,
|
||||
}
|
||||
case 'update_member':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
memberKey: rest.memberKey,
|
||||
role: rest.role,
|
||||
}
|
||||
case 'has_member':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
memberKey: rest.memberKey,
|
||||
}
|
||||
case 'list_aliases':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
}
|
||||
case 'add_alias':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
alias: rest.alias,
|
||||
}
|
||||
case 'remove_alias':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupKey: rest.groupKey,
|
||||
alias: rest.alias,
|
||||
}
|
||||
case 'get_settings':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupEmail: rest.groupEmail,
|
||||
}
|
||||
case 'update_settings':
|
||||
return {
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
groupEmail: rest.groupEmail,
|
||||
}
|
||||
default:
|
||||
return { credential, ...rest }
|
||||
return { credential: oauthCredential, ...rest }
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -36,6 +36,8 @@ export const GoogleSheetsBlock: BlockConfig<GoogleSheetsResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Google Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-sheets',
|
||||
requiredScopes: [
|
||||
@@ -44,6 +46,15 @@ export const GoogleSheetsBlock: BlockConfig<GoogleSheetsResponse> = {
|
||||
],
|
||||
placeholder: 'Select Google account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Spreadsheet Selector
|
||||
{
|
||||
id: 'spreadsheetId',
|
||||
@@ -246,7 +257,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
}
|
||||
},
|
||||
params: (params) => {
|
||||
const { credential, values, spreadsheetId, ...rest } = params
|
||||
const { oauthCredential, values, spreadsheetId, ...rest } = params
|
||||
|
||||
const parsedValues = values ? JSON.parse(values as string) : undefined
|
||||
|
||||
@@ -260,7 +271,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
...rest,
|
||||
spreadsheetId: effectiveSpreadsheetId,
|
||||
values: parsedValues,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -323,6 +334,8 @@ export const GoogleSheetsV2Block: BlockConfig<GoogleSheetsV2Response> = {
|
||||
id: 'credential',
|
||||
title: 'Google Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-sheets',
|
||||
requiredScopes: [
|
||||
@@ -331,6 +344,15 @@ export const GoogleSheetsV2Block: BlockConfig<GoogleSheetsV2Response> = {
|
||||
],
|
||||
placeholder: 'Select Google account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Spreadsheet Selector (basic mode) - not for create operation
|
||||
{
|
||||
id: 'spreadsheetId',
|
||||
@@ -715,7 +737,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
}),
|
||||
params: (params) => {
|
||||
const {
|
||||
credential,
|
||||
oauthCredential,
|
||||
values,
|
||||
spreadsheetId,
|
||||
sheetName,
|
||||
@@ -739,7 +761,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
return {
|
||||
title: (title as string)?.trim(),
|
||||
sheetTitles: sheetTitlesArray,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,7 +775,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
if (operation === 'get_info') {
|
||||
return {
|
||||
spreadsheetId: effectiveSpreadsheetId,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -763,7 +785,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
return {
|
||||
spreadsheetId: effectiveSpreadsheetId,
|
||||
ranges: parsedRanges,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,7 +796,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
...rest,
|
||||
spreadsheetId: effectiveSpreadsheetId,
|
||||
data: parsedData,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -784,7 +806,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
return {
|
||||
spreadsheetId: effectiveSpreadsheetId,
|
||||
ranges: parsedRanges,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,7 +816,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
sourceSpreadsheetId: effectiveSpreadsheetId,
|
||||
sheetId: Number.parseInt(sheetId as string, 10),
|
||||
destinationSpreadsheetId: (destinationSpreadsheetId as string)?.trim(),
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -813,7 +835,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
|
||||
sheetName: effectiveSheetName,
|
||||
cellRange: cellRange ? (cellRange as string).trim() : undefined,
|
||||
values: parsedValues,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -46,6 +46,8 @@ export const GoogleSlidesBlock: BlockConfig<GoogleSlidesResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Google Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-drive',
|
||||
requiredScopes: [
|
||||
@@ -54,6 +56,15 @@ export const GoogleSlidesBlock: BlockConfig<GoogleSlidesResponse> = {
|
||||
],
|
||||
placeholder: 'Select Google account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Presentation selector (basic mode) - for operations that need an existing presentation
|
||||
{
|
||||
id: 'presentationId',
|
||||
@@ -679,7 +690,7 @@ Return ONLY the text content - no explanations, no markdown formatting markers,
|
||||
const result: Record<string, any> = {
|
||||
...rest,
|
||||
presentationId: effectivePresentationId || undefined,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
}
|
||||
|
||||
// Handle operation-specific params
|
||||
|
||||
@@ -34,6 +34,8 @@ export const GoogleVaultBlock: BlockConfig = {
|
||||
id: 'credential',
|
||||
title: 'Google Vault Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'google-vault',
|
||||
requiredScopes: [
|
||||
@@ -42,6 +44,15 @@ export const GoogleVaultBlock: BlockConfig = {
|
||||
],
|
||||
placeholder: 'Select Google Vault account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Google Vault Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Create Hold inputs
|
||||
{
|
||||
id: 'matterId',
|
||||
@@ -438,10 +449,10 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
|
||||
}
|
||||
},
|
||||
params: (params) => {
|
||||
const { credential, holdStartTime, holdEndTime, holdTerms, ...rest } = params
|
||||
const { oauthCredential, holdStartTime, holdEndTime, holdTerms, ...rest } = params
|
||||
return {
|
||||
...rest,
|
||||
credential,
|
||||
credential: oauthCredential,
|
||||
// Map hold-specific fields to their tool parameter names
|
||||
...(holdStartTime && { startTime: holdStartTime }),
|
||||
...(holdEndTime && { endTime: holdEndTime }),
|
||||
|
||||
@@ -39,6 +39,8 @@ export const HubSpotBlock: BlockConfig<HubSpotResponse> = {
|
||||
id: 'credential',
|
||||
title: 'HubSpot Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'hubspot',
|
||||
requiredScopes: [
|
||||
'crm.objects.contacts.read',
|
||||
@@ -68,6 +70,15 @@ export const HubSpotBlock: BlockConfig<HubSpotResponse> = {
|
||||
placeholder: 'Select HubSpot account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'HubSpot Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'contactId',
|
||||
title: 'Contact ID or Email',
|
||||
|
||||
@@ -60,6 +60,8 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Jira Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'jira',
|
||||
requiredScopes: [
|
||||
@@ -96,6 +98,15 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
|
||||
],
|
||||
placeholder: 'Select Jira account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Jira Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Project selector (basic mode)
|
||||
{
|
||||
id: 'projectId',
|
||||
|
||||
@@ -55,6 +55,8 @@ export const JiraServiceManagementBlock: BlockConfig<JsmResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Jira Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
serviceId: 'jira',
|
||||
requiredScopes: [
|
||||
@@ -95,6 +97,15 @@ export const JiraServiceManagementBlock: BlockConfig<JsmResponse> = {
|
||||
],
|
||||
placeholder: 'Select Jira account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Jira Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'serviceDeskId',
|
||||
title: 'Service Desk ID',
|
||||
|
||||
@@ -129,11 +129,22 @@ export const LinearBlock: BlockConfig<LinearResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Linear Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'linear',
|
||||
requiredScopes: ['read', 'write'],
|
||||
placeholder: 'Select Linear account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Linear Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Team selector (for most operations)
|
||||
{
|
||||
id: 'teamId',
|
||||
|
||||
@@ -33,10 +33,21 @@ export const LinkedInBlock: BlockConfig<LinkedInResponse> = {
|
||||
title: 'LinkedIn Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'linkedin',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: ['profile', 'openid', 'email', 'w_member_social'],
|
||||
placeholder: 'Select LinkedIn account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'LinkedIn Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
// Share Post specific fields
|
||||
{
|
||||
|
||||
@@ -36,6 +36,8 @@ export const MicrosoftExcelBlock: BlockConfig<MicrosoftExcelResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'microsoft-excel',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -48,6 +50,15 @@ export const MicrosoftExcelBlock: BlockConfig<MicrosoftExcelResponse> = {
|
||||
placeholder: 'Select Microsoft account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'spreadsheetId',
|
||||
title: 'Select Sheet',
|
||||
@@ -351,6 +362,8 @@ export const MicrosoftExcelV2Block: BlockConfig<MicrosoftExcelV2Response> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'microsoft-excel',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -363,6 +376,15 @@ export const MicrosoftExcelV2Block: BlockConfig<MicrosoftExcelV2Response> = {
|
||||
placeholder: 'Select Microsoft account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Spreadsheet Selector (basic mode)
|
||||
{
|
||||
id: 'spreadsheetId',
|
||||
|
||||
@@ -61,6 +61,8 @@ export const MicrosoftPlannerBlock: BlockConfig<MicrosoftPlannerResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'microsoft-planner',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -73,6 +75,14 @@ export const MicrosoftPlannerBlock: BlockConfig<MicrosoftPlannerResponse> = {
|
||||
],
|
||||
placeholder: 'Select Microsoft account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
},
|
||||
|
||||
// Plan ID - for various operations
|
||||
{
|
||||
|
||||
@@ -44,6 +44,8 @@ export const MicrosoftTeamsBlock: BlockConfig<MicrosoftTeamsResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'microsoft-teams',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -70,6 +72,15 @@ export const MicrosoftTeamsBlock: BlockConfig<MicrosoftTeamsResponse> = {
|
||||
placeholder: 'Select Microsoft account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'teamSelector',
|
||||
title: 'Select Team',
|
||||
|
||||
@@ -38,10 +38,21 @@ export const NotionBlock: BlockConfig<NotionResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Notion Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'notion',
|
||||
placeholder: 'Select Notion account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Notion Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Read/Write operation - Page ID
|
||||
{
|
||||
id: 'pageId',
|
||||
|
||||
@@ -39,6 +39,8 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'onedrive',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -50,6 +52,14 @@ export const OneDriveBlock: BlockConfig<OneDriveResponse> = {
|
||||
],
|
||||
placeholder: 'Select Microsoft account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
},
|
||||
// Create File Fields
|
||||
{
|
||||
id: 'fileName',
|
||||
|
||||
@@ -39,6 +39,8 @@ export const OutlookBlock: BlockConfig<OutlookResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'outlook',
|
||||
requiredScopes: [
|
||||
'Mail.ReadWrite',
|
||||
@@ -53,6 +55,15 @@ export const OutlookBlock: BlockConfig<OutlookResponse> = {
|
||||
placeholder: 'Select Microsoft account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'to',
|
||||
title: 'To',
|
||||
|
||||
@@ -45,6 +45,8 @@ export const PipedriveBlock: BlockConfig<PipedriveResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Pipedrive Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'pipedrive',
|
||||
requiredScopes: [
|
||||
'base',
|
||||
@@ -58,6 +60,15 @@ export const PipedriveBlock: BlockConfig<PipedriveResponse> = {
|
||||
placeholder: 'Select Pipedrive account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Pipedrive Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'status',
|
||||
title: 'Status',
|
||||
|
||||
@@ -43,6 +43,8 @@ export const RedditBlock: BlockConfig<RedditResponse> = {
|
||||
title: 'Reddit Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'reddit',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: [
|
||||
'identity',
|
||||
'read',
|
||||
@@ -64,6 +66,15 @@ export const RedditBlock: BlockConfig<RedditResponse> = {
|
||||
placeholder: 'Select Reddit account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Reddit Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
// Common fields - appear for all actions
|
||||
{
|
||||
|
||||
@@ -62,11 +62,22 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Salesforce Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'salesforce',
|
||||
requiredScopes: ['api', 'refresh_token', 'openid', 'offline_access'],
|
||||
placeholder: 'Select Salesforce account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Salesforce Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// Common fields for GET operations
|
||||
{
|
||||
id: 'fields',
|
||||
|
||||
@@ -38,6 +38,8 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'sharepoint',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
@@ -50,6 +52,14 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
|
||||
],
|
||||
placeholder: 'Select Microsoft account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Microsoft Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
},
|
||||
|
||||
{
|
||||
id: 'siteSelector',
|
||||
|
||||
@@ -61,6 +61,8 @@ export const ShopifyBlock: BlockConfig<ShopifyResponse> = {
|
||||
title: 'Shopify Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'shopify',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: [
|
||||
'write_products',
|
||||
'write_orders',
|
||||
@@ -72,6 +74,15 @@ export const ShopifyBlock: BlockConfig<ShopifyResponse> = {
|
||||
placeholder: 'Select Shopify account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Shopify Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'shopDomain',
|
||||
title: 'Shop Domain',
|
||||
|
||||
@@ -69,6 +69,8 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Slack Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'slack',
|
||||
requiredScopes: [
|
||||
'channels:read',
|
||||
@@ -94,6 +96,20 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Slack Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
dependsOn: ['authMethod'],
|
||||
condition: {
|
||||
field: 'authMethod',
|
||||
value: 'oauth',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'botToken',
|
||||
title: 'Bot Token',
|
||||
@@ -547,7 +563,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
|
||||
},
|
||||
params: (params) => {
|
||||
const {
|
||||
credential,
|
||||
oauthCredential,
|
||||
authMethod,
|
||||
botToken,
|
||||
operation,
|
||||
@@ -597,7 +613,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
|
||||
baseParams.accessToken = botToken
|
||||
} else {
|
||||
// Default to OAuth
|
||||
baseParams.credential = credential
|
||||
baseParams.credential = oauthCredential
|
||||
}
|
||||
|
||||
switch (operation) {
|
||||
|
||||
@@ -160,6 +160,17 @@ export const SpotifyBlock: BlockConfig<ToolResponse> = {
|
||||
title: 'Spotify Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'spotify',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Spotify Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
|
||||
@@ -42,10 +42,21 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
|
||||
title: 'Trello Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'trello',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: ['read', 'write'],
|
||||
placeholder: 'Select Trello account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Trello Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
{
|
||||
id: 'boardId',
|
||||
|
||||
@@ -33,11 +33,22 @@ export const WealthboxBlock: BlockConfig<WealthboxResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Wealthbox Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'wealthbox',
|
||||
requiredScopes: ['login', 'data'],
|
||||
placeholder: 'Select Wealthbox account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Wealthbox Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'noteId',
|
||||
title: 'Note ID',
|
||||
|
||||
@@ -34,11 +34,22 @@ export const WebflowBlock: BlockConfig<WebflowResponse> = {
|
||||
id: 'credential',
|
||||
title: 'Webflow Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'webflow',
|
||||
requiredScopes: ['sites:read', 'sites:write', 'cms:read', 'cms:write'],
|
||||
placeholder: 'Select Webflow account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Webflow Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'siteSelector',
|
||||
title: 'Site',
|
||||
|
||||
@@ -65,11 +65,22 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
|
||||
id: 'credential',
|
||||
title: 'WordPress Account',
|
||||
type: 'oauth-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
serviceId: 'wordpress',
|
||||
requiredScopes: ['global'],
|
||||
placeholder: 'Select WordPress account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'WordPress Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
|
||||
// Site ID for WordPress.com (required for OAuth)
|
||||
{
|
||||
|
||||
@@ -32,9 +32,19 @@ export const XBlock: BlockConfig<XResponse> = {
|
||||
title: 'X Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'x',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: ['tweet.read', 'tweet.write', 'users.read', 'offline.access'],
|
||||
placeholder: 'Select X account',
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'X Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
},
|
||||
{
|
||||
id: 'text',
|
||||
title: 'Tweet Text',
|
||||
|
||||
@@ -38,6 +38,8 @@ export const ZoomBlock: BlockConfig<ZoomResponse> = {
|
||||
title: 'Zoom Account',
|
||||
type: 'oauth-input',
|
||||
serviceId: 'zoom',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'basic',
|
||||
requiredScopes: [
|
||||
'user:read:user',
|
||||
'meeting:write:meeting',
|
||||
@@ -54,6 +56,15 @@ export const ZoomBlock: BlockConfig<ZoomResponse> = {
|
||||
placeholder: 'Select Zoom account',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'manualCredential',
|
||||
title: 'Zoom Account',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'oauthCredential',
|
||||
mode: 'advanced',
|
||||
placeholder: 'Enter credential ID',
|
||||
required: true,
|
||||
},
|
||||
// User ID for create/list operations
|
||||
{
|
||||
id: 'userId',
|
||||
|
||||
Reference in New Issue
Block a user