fix: issue with not being able to unlink a file from a note (#1836)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/* istanbul ignore file */
|
||||
|
||||
export enum ItemRelationshipDirection {
|
||||
AReferencesB,
|
||||
BReferencesA,
|
||||
NoRelationship,
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
/* istanbul ignore file */
|
||||
|
||||
import { ContentType, Uuid } from '@standardnotes/common'
|
||||
import {
|
||||
SNNote,
|
||||
@@ -76,9 +78,9 @@ export interface ItemsClientInterface {
|
||||
linkNoteToNote(note: SNNote, otherNote: SNNote): Promise<SNNote>
|
||||
linkFileToFile(file: FileItem, otherFile: FileItem): Promise<FileItem>
|
||||
|
||||
unlinkItem(
|
||||
item: DecryptedItemInterface<ItemContent>,
|
||||
itemToUnlink: DecryptedItemInterface<ItemContent>,
|
||||
unlinkItems(
|
||||
itemOne: DecryptedItemInterface<ItemContent>,
|
||||
itemTwo: DecryptedItemInterface<ItemContent>,
|
||||
): Promise<DecryptedItemInterface<ItemContent>>
|
||||
|
||||
/**
|
||||
@@ -115,12 +117,6 @@ export interface ItemsClientInterface {
|
||||
*/
|
||||
getSortedTagsForItem(item: DecryptedItemInterface<ItemContent>): SNTag[]
|
||||
|
||||
getSortedLinkedFilesForItem(item: DecryptedItemInterface<ItemContent>): FileItem[]
|
||||
getSortedFilesLinkingToItem(item: DecryptedItemInterface<ItemContent>): FileItem[]
|
||||
|
||||
getSortedLinkedNotesForItem(item: DecryptedItemInterface<ItemContent>): SNNote[]
|
||||
getSortedNotesLinkingToItem(item: DecryptedItemInterface<ItemContent>): SNNote[]
|
||||
|
||||
isSmartViewTitle(title: string): boolean
|
||||
|
||||
getSmartViews(): SmartView[]
|
||||
@@ -152,12 +148,4 @@ export interface ItemsClientInterface {
|
||||
* @returns Whether the item is a template (unmanaged)
|
||||
*/
|
||||
isTemplateItem(item: DecryptedItemInterface): boolean
|
||||
|
||||
/**
|
||||
* @returns `'direct'` if `itemOne` has the reference to `itemTwo`, `'indirect'` if `itemTwo` has the reference to `itemOne`, `'unlinked'` if neither reference each other
|
||||
*/
|
||||
relationshipTypeForItems(
|
||||
itemOne: DecryptedItemInterface,
|
||||
itemTwo: DecryptedItemInterface,
|
||||
): 'direct' | 'indirect' | 'unlinked'
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ export * from './Item/ItemCounterInterface'
|
||||
export * from './Item/ItemManagerInterface'
|
||||
export * from './Item/ItemsClientInterface'
|
||||
export * from './Item/ItemsServerInterface'
|
||||
export * from './Item/ItemRelationshipDirection'
|
||||
export * from './Mutator/MutatorClientInterface'
|
||||
export * from './Payloads/PayloadManagerInterface'
|
||||
export * from './Preferences/PreferenceServiceInterface'
|
||||
|
||||
Reference in New Issue
Block a user