internal: incomplete vault systems behind feature flag (#2340)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Uuid } from '@standardnotes/domain-core'
|
||||
import { RevisionPayload } from './RevisionPayload'
|
||||
|
||||
export interface RevisionClientInterface {
|
||||
listRevisions(itemUuid: Uuid): Promise<
|
||||
@@ -11,18 +12,5 @@ export interface RevisionClientInterface {
|
||||
}>
|
||||
>
|
||||
deleteRevision(itemUuid: Uuid, revisionUuid: Uuid): Promise<string>
|
||||
getRevision(
|
||||
itemUuid: Uuid,
|
||||
revisionUuid: Uuid,
|
||||
): Promise<{
|
||||
uuid: string
|
||||
item_uuid: string
|
||||
content: string | null
|
||||
content_type: string
|
||||
items_key_id: string | null
|
||||
enc_item_key: string | null
|
||||
auth_hash: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
} | null>
|
||||
getRevision(itemUuid: Uuid, revisionUuid: Uuid): Promise<RevisionPayload | null>
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { isErrorResponse } from '@standardnotes/responses'
|
||||
import { InternalEventBusInterface } from '../Internal/InternalEventBusInterface'
|
||||
import { AbstractService } from '../Service/AbstractService'
|
||||
import { RevisionClientInterface } from './RevisionClientInterface'
|
||||
import { RevisionPayload } from './RevisionPayload'
|
||||
|
||||
export class RevisionManager extends AbstractService implements RevisionClientInterface {
|
||||
constructor(
|
||||
@@ -36,20 +37,7 @@ export class RevisionManager extends AbstractService implements RevisionClientIn
|
||||
return result.data.message
|
||||
}
|
||||
|
||||
async getRevision(
|
||||
itemUuid: Uuid,
|
||||
revisionUuid: Uuid,
|
||||
): Promise<{
|
||||
uuid: string
|
||||
item_uuid: string
|
||||
content: string | null
|
||||
content_type: string
|
||||
items_key_id: string | null
|
||||
enc_item_key: string | null
|
||||
auth_hash: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
} | null> {
|
||||
async getRevision(itemUuid: Uuid, revisionUuid: Uuid): Promise<RevisionPayload | null> {
|
||||
const result = await this.revisionApiService.getRevision(itemUuid.value, revisionUuid.value)
|
||||
|
||||
if (isErrorResponse(result)) {
|
||||
|
||||
14
packages/services/src/Domain/Revision/RevisionPayload.ts
Normal file
14
packages/services/src/Domain/Revision/RevisionPayload.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export type RevisionPayload = {
|
||||
uuid: string
|
||||
item_uuid: string
|
||||
content: string | null
|
||||
content_type: string
|
||||
items_key_id: string | null
|
||||
enc_item_key: string | null
|
||||
auth_hash: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
user_uuid: string
|
||||
key_system_identifier: string | null
|
||||
shared_vault_uuid: string | null
|
||||
}
|
||||
Reference in New Issue
Block a user