import type { User, ICredentialsDb, SharedCredentials } from '@n8n/db';
import { CredentialsEntity } from '@n8n/db';
import { BaseError, type ICredentialDataDecryptedObject, type IDataObject, type INodeProperties } from 'n8n-workflow';
export declare class CredentialsIsNotUpdatableError extends BaseError {
}
export type CredentialListSharedItem = {
    id: string;
    name: string;
    role: string;
    createdAt: Date;
    updatedAt: Date;
};
export declare function buildSharedForCredential(credential: CredentialsEntity): CredentialListSharedItem[];
export declare function getCredential(credentialId: string): Promise<ICredentialsDb | null>;
export declare function getSharedCredentials(userId: string, credentialId: string): Promise<SharedCredentials | null>;
export declare function saveCredential(payload: {
    type: string;
    name: string;
    data: ICredentialDataDecryptedObject;
    projectId?: string;
}, user: User): Promise<CredentialsEntity>;
export declare function updateCredential(existingCredential: ICredentialsDb, user: User, updateData: {
    type?: string;
    name?: string;
    data?: ICredentialDataDecryptedObject;
    isGlobal?: boolean;
    isResolvable?: boolean;
    isPartialData?: boolean;
}): Promise<ICredentialsDb>;
export declare function removeCredential(user: User, credentials: CredentialsEntity): Promise<ICredentialsDb>;
export declare function encryptCredential(credential: CredentialsEntity): Promise<ICredentialsDb>;
export declare function sanitizeCredentials(credentials: CredentialsEntity): Partial<CredentialsEntity>;
export declare function sanitizeCredentials(credentials: CredentialsEntity[]): Array<Partial<CredentialsEntity>>;
export declare function toJsonSchema(properties: INodeProperties[]): IDataObject;
