chore: display shared vault file usage (#2399)

* chore: display shared vault file usage

* fix: specs

* fix: reshape filtering result

* fix: resolving invalid server items

* fix: get revisions specs

* fix: processing issue

* fix: tests

---------

Co-authored-by: Mo <mo@standardnotes.com>
This commit is contained in:
Karol Sójko
2023-08-11 08:59:16 +02:00
committed by GitHub
parent 05f3672526
commit 5bca53736b
87 changed files with 505 additions and 169 deletions

View File

@@ -1,4 +1,3 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ContentType } from '@standardnotes/domain-core'
import {
ConflictStrategy,
@@ -8,6 +7,7 @@ import {
HistoryEntryInterface,
ItemsKeyContent,
ItemsKeyInterface,
ProtocolVersion,
} from '@standardnotes/models'
export function isItemsKey(x: unknown): x is ItemsKeyInterface {

View File

@@ -1,6 +1,6 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ContentType } from '@standardnotes/domain-core'
import {
ProtocolVersion,
ConflictStrategy,
DecryptedItem,
DecryptedItemInterface,

View File

@@ -1,5 +1,5 @@
import { ProtocolVersion } from '@standardnotes/common'
import {
ProtocolVersion,
DecryptedPayload,
FillItemContentSpecialized,
PayloadTimestampDefaults,

View File

@@ -1,5 +1,5 @@
import { ProtocolVersion } from '@standardnotes/common'
import {
ProtocolVersion,
DecryptedItem,
DecryptedPayloadInterface,
NamespacedRootKeyInKeychain,

View File

@@ -1,5 +1,10 @@
import { ProtocolVersion } from '@standardnotes/common'
import { DecryptedPayload, ItemContent, ItemsKeyContent, PayloadTimestampDefaults } from '@standardnotes/models'
import {
DecryptedPayload,
ItemContent,
ItemsKeyContent,
PayloadTimestampDefaults,
ProtocolVersion,
} from '@standardnotes/models'
import { SNItemsKey } from '../../Keys/ItemsKey/ItemsKey'
import { SNProtocolOperator004 } from './Operator004'
import { getMockedCrypto } from './MockedCrypto'

View File

@@ -7,10 +7,10 @@ import {
KeySystemItemsKeyContentSpecialized,
KeySystemItemsKeyInterface,
PayloadTimestampDefaults,
ProtocolVersion,
} from '@standardnotes/models'
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { V004Algorithm } from '../../../../Algorithm'
import { ProtocolVersion } from '@standardnotes/common'
import { ContentType } from '@standardnotes/domain-core'
export class CreateKeySystemItemsKeyUseCase {

View File

@@ -4,8 +4,8 @@ import {
KeySystemRootKeyInterface,
KeySystemRootKeyParamsInterface,
KeySystemPasswordType,
ProtocolVersion,
} from '@standardnotes/models'
import { ProtocolVersion } from '@standardnotes/common'
import { DeriveKeySystemRootKeyUseCase } from './DeriveKeySystemRootKey'
export class CreateRandomKeySystemRootKey {

View File

@@ -5,8 +5,8 @@ import {
KeySystemRootKeyInterface,
KeySystemRootKeyParamsInterface,
KeySystemPasswordType,
ProtocolVersion,
} from '@standardnotes/models'
import { ProtocolVersion } from '@standardnotes/common'
import { DeriveKeySystemRootKeyUseCase } from './DeriveKeySystemRootKey'
export class CreateUserInputKeySystemRootKey {

View File

@@ -11,8 +11,8 @@ import {
KeySystemRootKeyInterface,
PayloadTimestampDefaults,
KeySystemRootKeyParamsInterface,
ProtocolVersion,
} from '@standardnotes/models'
import { ProtocolVersion } from '@standardnotes/common'
import { ContentType } from '@standardnotes/domain-core'
export class DeriveKeySystemRootKeyUseCase {

View File

@@ -2,10 +2,9 @@ import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { splitString, truncateHexString } from '@standardnotes/utils'
import { V004PartitionCharacter } from '../../V004AlgorithmTypes'
import { V004Algorithm } from '../../../../Algorithm'
import { RootKeyInterface } from '@standardnotes/models'
import { RootKeyInterface, ProtocolVersion } from '@standardnotes/models'
import { SNRootKeyParams } from '../../../../Keys/RootKey/RootKeyParams'
import { CreateNewRootKey } from '../../../../Keys/RootKey/Functions'
import { ProtocolVersion } from '@standardnotes/common'
export class DeriveRootKeyUseCase {
constructor(private readonly crypto: PureCryptoInterface) {}

View File

@@ -7,11 +7,11 @@ import {
isKeySystemRootKey,
ContentTypeUsesRootKeyEncryption,
ContentTypeUsesKeySystemRootKeyEncryption,
ProtocolVersion,
} from '@standardnotes/models'
import { ItemAuthenticatedData } from '../../../../Types/ItemAuthenticatedData'
import { RootKeyEncryptedAuthenticatedData } from '../../../../Types/RootKeyEncryptedAuthenticatedData'
import { KeySystemItemsKeyAuthenticatedData } from '../../../../Types/KeySystemItemsKeyAuthenticatedData'
import { ProtocolVersion } from '@standardnotes/common'
import { isItemsKey } from '../../../../Keys/ItemsKey/ItemsKey'
import { isKeySystemItemsKey } from '../../../../Keys/KeySystemItemsKey/KeySystemItemsKey'

View File

@@ -1,4 +1,3 @@
import { ProtocolVersion } from '@standardnotes/common'
import { PkcKeyPair, PureCryptoInterface } from '@standardnotes/sncrypto-common'
import {
DecryptedPayloadInterface,
@@ -6,6 +5,7 @@ import {
KeySystemItemsKeyInterface,
KeySystemRootKeyInterface,
RootKeyInterface,
ProtocolVersion,
} from '@standardnotes/models'
import { CreateConsistentBase64JsonPayloadUseCase } from '../Utils/CreateConsistentBase64JsonPayload'
import { doesPayloadRequireSigning } from '../../V004AlgorithmHelpers'

View File

@@ -1,6 +1,5 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/models'
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { ItemAuthenticatedData } from './../../../../Types/ItemAuthenticatedData'
import { GenerateEncryptedProtocolStringUseCase } from './GenerateEncryptedProtocolString'
import { AdditionalData } from '../../../../Types/EncryptionAdditionalData'

View File

@@ -1,6 +1,6 @@
import { Base64String, HexString, PureCryptoInterface, Utf8String } from '@standardnotes/sncrypto-common'
import { V004PartitionCharacter, V004StringComponents } from '../../V004AlgorithmTypes'
import { ProtocolVersion } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/models'
import { V004Algorithm } from '../../../../Algorithm'
export class GenerateEncryptedProtocolStringUseCase {

View File

@@ -1,4 +1,4 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/models'
import { AnyOperatorInterface } from './OperatorInterface/TypeCheck'
export interface EncryptionOperatorsInterface {

View File

@@ -1,4 +1,4 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/models'
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { SNProtocolOperator001 } from '../Operator/001/Operator001'
import { SNProtocolOperator002 } from '../Operator/002/Operator002'

View File

@@ -1,5 +1,9 @@
import { ProtocolVersion } from '@standardnotes/common'
import { EncryptedPayloadInterface, DecryptedPayloadInterface, PersistentSignatureData } from '@standardnotes/models'
import {
EncryptedPayloadInterface,
DecryptedPayloadInterface,
PersistentSignatureData,
ProtocolVersion,
} from '@standardnotes/models'
import { DecryptedParameters } from './DecryptedParameters'
export type EncryptedOutputParameters = {

View File

@@ -1,4 +1,4 @@
import { ProtocolVersion } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/models'
type UserUuid = string
type KeySystemIdentifier = string