feat(snjs): add revisions api v2 (#2154)

* feat(snjs): add revisions api v2

* fix(snjs): reference listing and getting revisions in specs

* fix(snjs): revisions specs

* fix(web): usage of revision metadata

* fix(snjs): add specs for decryption revision

* fix(snjs): issue with building mocked specs

* fix(snjs): adjust revision creation delay
This commit is contained in:
Karol Sójko
2023-01-18 09:20:06 +01:00
committed by GitHub
parent 7d7815917b
commit 880a537774
52 changed files with 882 additions and 226 deletions

View File

@@ -12,6 +12,9 @@ import { ClientDisplayableError } from '@standardnotes/responses'
import { SNRootKeyParams } from '../../Keys/RootKey/RootKeyParams'
import { KeyedDecryptionSplit } from '../../Split/KeyedDecryptionSplit'
import { KeyedEncryptionSplit } from '../../Split/KeyedEncryptionSplit'
import { ItemAuthenticatedData } from '../../Types/ItemAuthenticatedData'
import { LegacyAttachedData } from '../../Types/LegacyAttachedData'
import { RootKeyEncryptedAuthenticatedData } from '../../Types/RootKeyEncryptedAuthenticatedData'
export interface EncryptionProviderInterface {
encryptSplitSingle(split: KeyedEncryptionSplit): Promise<EncryptedPayloadInterface>
@@ -67,4 +70,7 @@ export interface EncryptionProviderInterface {
reencryptItemsKeys(): Promise<void>
getSureDefaultItemsKey(): ItemsKeyInterface
getRootKeyParams(): Promise<SNRootKeyParams | undefined>
getEmbeddedPayloadAuthenticatedData(
payload: EncryptedPayloadInterface,
): RootKeyEncryptedAuthenticatedData | ItemAuthenticatedData | LegacyAttachedData | undefined
}