import { Logger } from '@n8n/backend-common'; import { SettingsRepository } from '@n8n/db'; import type { ValidationError } from 'class-validator'; import { Cipher, InstanceSettings } from 'n8n-core'; import { SourceControlConfig } from './source-control.config'; import type { KeyPairType } from './types/key-pair-type'; import { SourceControlPreferences } from './types/source-control-preferences'; export declare class SourceControlPreferencesService { private readonly instanceSettings; private readonly logger; private readonly cipher; private readonly settingsRepository; private readonly sourceControlConfig; private _sourceControlPreferences; readonly sshKeyName: string; readonly sshFolder: string; readonly gitFolder: string; constructor(instanceSettings: InstanceSettings, logger: Logger, cipher: Cipher, settingsRepository: SettingsRepository, sourceControlConfig: SourceControlConfig); get sourceControlPreferences(): SourceControlPreferences; set sourceControlPreferences(preferences: Partial); isSourceControlSetup(): string | false; private getKeyPairFromDatabase; private getPrivateKeyFromDatabase; private getPublicKeyFromDatabase; private getHttpsCredentialsFromDatabase; getDecryptedHttpsCredentials(): Promise<{ username: string; password: string; }>; saveHttpsCredentials(username: string, password: string): Promise; deleteHttpsCredentials(): Promise; getPrivateKeyPath(): Promise; getPublicKey(): Promise; deleteKeyPair(): Promise; resetKnownHosts(): Promise; generateAndSaveKeyPair(keyPairType?: KeyPairType): Promise; isBranchReadOnly(): boolean; isSourceControlConnected(): boolean; isSourceControlLicensedAndEnabled(): boolean; getBranchName(): string; getPreferences(): SourceControlPreferences; validateSourceControlPreferences(preferences: Partial, allowMissingProperties?: boolean): Promise; setPreferences(preferences: Partial, saveToDb?: boolean, broadcastReload?: boolean): Promise; private broadcastReloadSourceControlConfiguration; loadFromDbAndApplySourceControlPreferences(): Promise; }