import { DataSource } from '@n8n/typeorm'; import { Cipher } from 'n8n-core'; import { DeploymentKey } from '../entities/deployment-key'; import { DbLockService } from '../services/db-lock.service'; import { TransactionRunner } from '../services/transaction'; export type DeploymentKeySortField = 'createdAt' | 'updatedAt' | 'status'; export type DeploymentKeySortDirection = 'ASC' | 'DESC'; export type ListDeploymentKeysOptions = { type?: string; sortField: DeploymentKeySortField; sortDirection: DeploymentKeySortDirection; skip: number; take: number; createdAtFrom?: Date; createdAtTo?: Date; }; export declare class DeploymentKeyRepository { private readonly transactionRunner; private readonly dbLockService; private readonly cipher; private readonly store; constructor(dataSource: DataSource, transactionRunner: TransactionRunner, dbLockService: DbLockService, cipher: Cipher); findActiveSigningSecret(type: string, { rewrapLegacy }?: { rewrapLegacy?: boolean; }): Promise; seedSigningSecret(type: string, secret: string): Promise; seedLegacyCbcKey(encryptedValue: string): Promise; findActiveIdentifier(type: string): Promise; seedActiveIdentifier(type: string, value: string): Promise; findDataEncryptionKeys(): Promise; findActiveDataEncryptionKeys(): Promise; findDataEncryptionKeyById(id: string): Promise; findDataEncryptionKeyByAlgorithm(algorithm: string): Promise; findActiveDataEncryptionKeyByAlgorithm(algorithm: string): Promise; seedActiveDataEncryptionKey(value: string, algorithm: string): Promise; insertInactiveDataEncryptionKey(value: string, algorithm: string): Promise; rewrapLegacyDataEncryptionValue(id: string, oldValue: string, wrappedValue: string): Promise; findAndCountForList(opts: ListDeploymentKeysOptions): Promise<{ items: DeploymentKey[]; count: number; }>; private insertIgnoringConflict; insertAndActivateDataEncryptionKey(value: string, algorithm: string): Promise; activateDataEncryptionKey(id: string): Promise; deactivateDataEncryptionKey(id: string): Promise; findActiveOAuthJweKey(algorithm: string): Promise; insertActiveOAuthJweKey(id: string, value: string, algorithm: string): Promise; findActiveOAuthSigningKey(algorithm: string): Promise; findOAuthSigningKeys(): Promise; insertActiveOAuthSigningKey(id: string, value: string, algorithm: string): Promise; }