@@ -44,6 +44,17 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
4444 { label : 'Create Task' , id : 'create_task' } ,
4545 { label : 'Update Task' , id : 'update_task' } ,
4646 { label : 'Delete Task' , id : 'delete_task' } ,
47+ { label : 'List Reports' , id : 'list_reports' } ,
48+ { label : 'Get Report' , id : 'get_report' } ,
49+ { label : 'Run Report' , id : 'run_report' } ,
50+ { label : 'List Report Types' , id : 'list_report_types' } ,
51+ { label : 'List Dashboards' , id : 'list_dashboards' } ,
52+ { label : 'Get Dashboard' , id : 'get_dashboard' } ,
53+ { label : 'Refresh Dashboard' , id : 'refresh_dashboard' } ,
54+ { label : 'Run SOQL Query' , id : 'query' } ,
55+ { label : 'Get More Query Results' , id : 'query_more' } ,
56+ { label : 'Describe Object' , id : 'describe_object' } ,
57+ { label : 'List Objects' , id : 'list_objects' } ,
4758 ] ,
4859 value : ( ) => 'get_accounts' ,
4960 } ,
@@ -52,7 +63,7 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
5263 title : 'Salesforce Account' ,
5364 type : 'oauth-input' ,
5465 serviceId : 'salesforce' ,
55- requiredScopes : [ 'api' , 'refresh_token' , 'openid' ] ,
66+ requiredScopes : [ 'api' , 'refresh_token' , 'openid' , 'offline_access' ] ,
5667 placeholder : 'Select Salesforce account' ,
5768 required : true ,
5869 } ,
@@ -367,6 +378,77 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
367378 placeholder : 'Account or Opportunity ID' ,
368379 condition : { field : 'operation' , value : [ 'create_task' ] } ,
369380 } ,
381+ // Report fields
382+ {
383+ id : 'reportId' ,
384+ title : 'Report ID' ,
385+ type : 'short-input' ,
386+ placeholder : 'Report ID' ,
387+ condition : { field : 'operation' , value : [ 'get_report' , 'run_report' ] } ,
388+ required : true ,
389+ } ,
390+ {
391+ id : 'folderName' ,
392+ title : 'Folder Name' ,
393+ type : 'short-input' ,
394+ placeholder : 'Filter by folder name' ,
395+ condition : { field : 'operation' , value : [ 'list_reports' , 'list_dashboards' ] } ,
396+ } ,
397+ {
398+ id : 'searchTerm' ,
399+ title : 'Search Term' ,
400+ type : 'short-input' ,
401+ placeholder : 'Search reports by name' ,
402+ condition : { field : 'operation' , value : [ 'list_reports' ] } ,
403+ } ,
404+ {
405+ id : 'includeDetails' ,
406+ title : 'Include Details' ,
407+ type : 'short-input' ,
408+ placeholder : 'Include detail rows (true/false)' ,
409+ condition : { field : 'operation' , value : [ 'run_report' ] } ,
410+ } ,
411+ {
412+ id : 'filters' ,
413+ title : 'Report Filters' ,
414+ type : 'long-input' ,
415+ placeholder : 'JSON array of report filters' ,
416+ condition : { field : 'operation' , value : [ 'run_report' ] } ,
417+ } ,
418+ // Dashboard fields
419+ {
420+ id : 'dashboardId' ,
421+ title : 'Dashboard ID' ,
422+ type : 'short-input' ,
423+ placeholder : 'Dashboard ID' ,
424+ condition : { field : 'operation' , value : [ 'get_dashboard' , 'refresh_dashboard' ] } ,
425+ required : true ,
426+ } ,
427+ // Query fields
428+ {
429+ id : 'query' ,
430+ title : 'SOQL Query' ,
431+ type : 'long-input' ,
432+ placeholder : 'SELECT Id, Name FROM Account LIMIT 10' ,
433+ condition : { field : 'operation' , value : [ 'query' ] } ,
434+ required : true ,
435+ } ,
436+ {
437+ id : 'nextRecordsUrl' ,
438+ title : 'Next Records URL' ,
439+ type : 'short-input' ,
440+ placeholder : 'URL from previous query response' ,
441+ condition : { field : 'operation' , value : [ 'query_more' ] } ,
442+ required : true ,
443+ } ,
444+ {
445+ id : 'objectName' ,
446+ title : 'Object Name' ,
447+ type : 'short-input' ,
448+ placeholder : 'API name (e.g., Account, Lead, Custom_Object__c)' ,
449+ condition : { field : 'operation' , value : [ 'describe_object' ] } ,
450+ required : true ,
451+ } ,
370452 // Long-input fields at the bottom
371453 {
372454 id : 'description' ,
@@ -418,6 +500,17 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
418500 'salesforce_create_task' ,
419501 'salesforce_update_task' ,
420502 'salesforce_delete_task' ,
503+ 'salesforce_list_reports' ,
504+ 'salesforce_get_report' ,
505+ 'salesforce_run_report' ,
506+ 'salesforce_list_report_types' ,
507+ 'salesforce_list_dashboards' ,
508+ 'salesforce_get_dashboard' ,
509+ 'salesforce_refresh_dashboard' ,
510+ 'salesforce_query' ,
511+ 'salesforce_query_more' ,
512+ 'salesforce_describe_object' ,
513+ 'salesforce_list_objects' ,
421514 ] ,
422515 config : {
423516 tool : ( params ) => {
@@ -470,6 +563,28 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
470563 return 'salesforce_update_task'
471564 case 'delete_task' :
472565 return 'salesforce_delete_task'
566+ case 'list_reports' :
567+ return 'salesforce_list_reports'
568+ case 'get_report' :
569+ return 'salesforce_get_report'
570+ case 'run_report' :
571+ return 'salesforce_run_report'
572+ case 'list_report_types' :
573+ return 'salesforce_list_report_types'
574+ case 'list_dashboards' :
575+ return 'salesforce_list_dashboards'
576+ case 'get_dashboard' :
577+ return 'salesforce_get_dashboard'
578+ case 'refresh_dashboard' :
579+ return 'salesforce_refresh_dashboard'
580+ case 'query' :
581+ return 'salesforce_query'
582+ case 'query_more' :
583+ return 'salesforce_query_more'
584+ case 'describe_object' :
585+ return 'salesforce_describe_object'
586+ case 'list_objects' :
587+ return 'salesforce_list_objects'
473588 default :
474589 throw new Error ( `Unknown operation: ${ params . operation } ` )
475590 }
0 commit comments