@@ -2,7 +2,7 @@ import { GoogleSheetsIcon } from '@/components/icons'
22import { getScopesForService } from '@/lib/oauth/utils'
33import type { BlockConfig } from '@/blocks/types'
44import { AuthMode , IntegrationType } from '@/blocks/types'
5- import { createVersionedToolSelector } from '@/blocks/utils'
5+ import { createVersionedToolSelector , SERVICE_ACCOUNT_SUBBLOCKS } from '@/blocks/utils'
66import type { GoogleSheetsResponse , GoogleSheetsV2Response } from '@/tools/google_sheets/types'
77
88// Legacy block - hidden from toolbar
@@ -55,19 +55,7 @@ export const GoogleSheetsBlock: BlockConfig<GoogleSheetsResponse> = {
5555 placeholder : 'Enter credential ID' ,
5656 required : true ,
5757 } ,
58- {
59- id : 'isServiceAccount' ,
60- title : 'Is Service Account' ,
61- type : 'short-input' ,
62- hidden : true ,
63- } ,
64- {
65- id : 'impersonateUserEmail' ,
66- title : 'Impersonated Account' ,
67- type : 'short-input' ,
68- placeholder : 'Email to impersonate (for service accounts)' ,
69- condition : { field : 'isServiceAccount' , value : 'true' } ,
70- } ,
58+ ...SERVICE_ACCOUNT_SUBBLOCKS ,
7159 // Spreadsheet Selector
7260 {
7361 id : 'spreadsheetId' ,
@@ -363,19 +351,7 @@ export const GoogleSheetsV2Block: BlockConfig<GoogleSheetsV2Response> = {
363351 placeholder : 'Enter credential ID' ,
364352 required : true ,
365353 } ,
366- {
367- id : 'isServiceAccount' ,
368- title : 'Is Service Account' ,
369- type : 'short-input' ,
370- hidden : true ,
371- } ,
372- {
373- id : 'impersonateUserEmail' ,
374- title : 'Impersonated Account' ,
375- type : 'short-input' ,
376- placeholder : 'Email to impersonate (for service accounts)' ,
377- condition : { field : 'isServiceAccount' , value : 'true' } ,
378- } ,
354+ ...SERVICE_ACCOUNT_SUBBLOCKS ,
379355 // Spreadsheet Selector (basic mode) - not for create operation
380356 {
381357 id : 'spreadsheetId' ,
0 commit comments