From bb187293067218df9dcbfa836fce9b7ccdd749e8 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 24 Jan 2018 12:19:49 -0500 Subject: [PATCH] update abstraction --- src/abstractions/cipher.service.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/abstractions/cipher.service.ts b/src/abstractions/cipher.service.ts index d639d99a01..330ac71c6c 100644 --- a/src/abstractions/cipher.service.ts +++ b/src/abstractions/cipher.service.ts @@ -4,19 +4,22 @@ import { Cipher } from '../models/domain/cipher'; import { Field } from '../models/domain/field'; import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey'; +import { CipherView } from '../models/view/cipherView'; +import { FieldView } from '../models/view/fieldView'; + export abstract class CipherService { - decryptedCipherCache: any[]; + decryptedCipherCache: CipherView[]; clearCache: () => void; - encrypt: (model: any) => Promise; - encryptFields: (fieldsModel: any[], key: SymmetricCryptoKey) => Promise; - encryptField: (fieldModel: any, key: SymmetricCryptoKey) => Promise; + encrypt: (model: CipherView) => Promise; + encryptFields: (fieldsModel: FieldView[], key: SymmetricCryptoKey) => Promise; + encryptField: (fieldModel: FieldView, 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; + 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;