import { CipherData } from '../models/data'; import { Cipher } from '../models/domain'; import { Field } from '../models/domain'; import { SymmetricCryptoKey } from '../models/domain'; export interface CipherService { decryptedCipherCache: any[]; clearCache(): void; encrypt(model: any): Promise; encryptFields(fieldsModel: any[], key: SymmetricCryptoKey): Promise; encryptField(fieldModel: any, key: SymmetricCryptoKey): Promise; get(id: string): Promise; getAll(): Promise; getAllDecrypted(): Promise; getAllDecryptedForGrouping(groupingId: string, folder?: boolean): Promise; getAllDecryptedForDomain(domain: string, includeOtherTypes?: any[]): Promise; getLastUsedForDomain(domain: string): Promise; updateLastUsedDate(id: string): Promise; saveNeverDomain(domain: string): Promise; saveWithServer(cipher: Cipher): Promise; saveAttachmentWithServer(cipher: Cipher, unencryptedFile: any): Promise; upsert(cipher: CipherData | CipherData[]): Promise; replace(ciphers: { [id: string]: CipherData; }): Promise; clear(userId: string): Promise; delete(id: string | string[]): Promise; deleteWithServer(id: string): Promise; deleteAttachment(id: string, attachmentId: string): Promise; deleteAttachmentWithServer(id: string, attachmentId: string): Promise; sortCiphersByLastUsed(a: any, b: any): number; sortCiphersByLastUsedThenName(a: any, b: any): number; }