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

@@ -1,10 +0,0 @@
import { RoleName } from '@standardnotes/common'
export type RevisionListEntry = {
content_type: string
created_at: string
updated_at: string
/** The uuid of the revision */
uuid: string
required_role: RoleName
}

View File

@@ -1,4 +0,0 @@
import { HttpResponse } from '../Http/HttpResponse'
import { RevisionListEntry } from './RevisionListEntry'
export type RevisionListResponse = HttpResponse & { data: RevisionListEntry[] }

View File

@@ -1,15 +0,0 @@
import { ContentType, Uuid } from '@standardnotes/common'
export type SingleRevision = {
auth_hash?: string
content_type: ContentType
content: string
created_at: string
enc_item_key: string
/** The uuid of the item this revision was created with */
item_uuid: string
items_key_id: string
updated_at: string
/** The uuid of the revision */
uuid: Uuid
}

View File

@@ -1,6 +0,0 @@
import { HttpResponse } from '../Http/HttpResponse'
import { SingleRevision } from './SingleRevision'
export type SingleRevisionResponse = HttpResponse & {
data: SingleRevision
}

View File

@@ -34,11 +34,7 @@ export * from './Item/ConflictType'
export * from './Item/GetSingleItemResponse'
export * from './Item/RawSyncData'
export * from './Item/RawSyncResponse'
export * from './Item/RevisionListEntry'
export * from './Item/RevisionListResponse'
export * from './Item/ServerItemResponse'
export * from './Item/SingleRevision'
export * from './Item/SingleRevisionResponse'
export * from './Item/IntegrityPayload'
export * from './Listed/ActionResponse'
export * from './Listed/ListedAccount'