Trilium Backend API
    Preparing search index...

    Interface BNote

    Trilium's main entity, which can represent text note, image, code note, file attachment etc.

    interface BNote {
        __flatTextCache: string;
        blobId?: string;
        children: BNote[];
        contentAndAttachmentsAndRevisionsSize: number;
        contentAndAttachmentsSize: number;
        contentSize: number;
        dateCreated?: string;
        dateModified?: string;
        isBeingDeleted: boolean;
        isDecrypted: boolean;
        isProtected?: boolean;
        isSynced?: boolean;
        mime: string;
        noteId: string;
        ownedAttributes: BAttribute[];
        parentBranches: BBranch[];
        parents: BNote[];
        revisionCount: number;
        targetRelations: BAttribute[];
        title: string;
        type:
            | "image"
            | "file"
            | "search"
            | "noteMap"
            | "launcher"
            | "doc"
            | "contentWidget"
            | "text"
            | "relationMap"
            | "render"
            | "canvas"
            | "mermaid"
            | "book"
            | "webView"
            | "code"
            | "mindMap"
            | "aiChat";
        utcDateCreated: string;
        utcDateModified?: string;
        get attributeCount(): number;
        get becca(): default;
        get childrenCount(): number;
        get dateCreatedObj(): Dayjs;
        get dateModifiedObj(): Dayjs;
        get encodedTitle(): string;
        get isArchived(): boolean;
        get isDeleted(): boolean;
        get labelCount(): number;
        get ownedAttributeCount(): number;
        get ownedLabelCount(): number;
        get ownedRelationCount(): number;
        get ownedRelationCountIncludingLinks(): number;
        get parentCount(): number;
        get relationCount(): number;
        get relationCountIncludingLinks(): number;
        get shareId(): string;
        get targetRelationCount(): number;
        get targetRelationCountIncludingLinks(): number;
        get utcDateCreatedObj(): Dayjs;
        get utcDateModifiedObj(): Dayjs;
        __validateTypeName(type?: string, name?: string): void;
        _getContent(): string | Buffer<ArrayBufferLike>;
        _setContent(
            content: string | Buffer<ArrayBufferLike>,
            opts?: ContentOpts,
        ): void;
        addAttribute(
            type: AttributeType,
            name: string,
            value?: string,
            isInheritable?: boolean,
            position?: number,
        ): BAttribute;
        addLabel(name: string, value?: string, isInheritable?: boolean): BAttribute;
        addRelation(
            name: string,
            targetNoteId: string,
            isInheritable?: boolean,
        ): BAttribute;
        areAllNotePathsArchived(): boolean;
        beforeSaving(): void;
        cloneTo(parentNoteId: string): CloneResponse;
        convertToParentAttachment(opts?: ConvertOpts): BAttachment;
        decrypt(): void;
        deleteNote(
            deleteId?: string,
            taskContext?: TaskContext<"deleteNotes">,
        ): void;
        eraseExcessRevisionSnapshots(): void;
        generateHash(isDeleted?: boolean): string;
        getAllNotePaths(): string[][];
        getAncestorNoteIds(): string[];
        getAncestors(): BNote[];
        getAttachmentById(attachmentId: string, opts?: AttachmentOpts): BAttachment;
        getAttachmentByTitle(title: string): BAttachment;
        getAttachments(opts?: AttachmentOpts): BAttachment[];
        getAttachmentsByRole(role: string): BAttachment[];
        getAttribute(type: string, name: string): BAttribute;
        getAttributeById(attributeId: string): BAttribute;
        getAttributeCaseInsensitive(
            type: string,
            name: string,
            value?: string,
        ): BAttribute;
        getAttributes(type?: string, name?: string): BAttribute[];
        getAttributeValue(type: string, name: string): string;
        getBestNotePath(hoistedNoteId?: string): string[];
        getBestNotePathString(hoistedNoteId?: string): string;
        getBranches(): BBranch[];
        getChildBranches(): BBranch[];
        getChildNotes(): BNote[];
        getContent(): string | Buffer<ArrayBufferLike>;
        getDescendantNoteIds(): string[];
        getDistanceToAncestor(ancestorNoteId: string): number;
        getFileName(): string;
        getFilteredChildBranches(): BBranch[];
        getFlatText(): string;
        getIcon(): any;
        getInheritingNotes(): BNote[];
        getJsonContent(): any;
        getJsonContentSafely(): any;
        getLabel(name: string): BAttribute;
        getLabelDefinitions(): BAttribute[];
        getLabels(name?: string): BAttribute[];
        getLabelValue(name: string): string;
        getLabelValues(name: string): string[];
        getOwnedAttribute(type: string, name: string, value?: string): BAttribute;
        getOwnedAttributes(
            type?: string,
            name?: string,
            value?: string,
        ): BAttribute[];
        getOwnedAttributeValue(type: string, name: string): string;
        getOwnedLabel(name: string): BAttribute;
        getOwnedLabels(name: string): BAttribute[];
        getOwnedLabelValue(name: string): string;
        getOwnedLabelValues(name: string): string[];
        getOwnedRelation(name: string): BAttribute;
        getOwnedRelations(name?: string): BAttribute[];
        getOwnedRelationValue(name: string): string;
        getParentBranches(): BBranch[];
        getParentNotes(): BNote[];
        getPojo(): NotePojo;
        getPojoToSave(): NotePojo;
        getRelation(name: string): BAttribute;
        getRelationDefinitions(): BAttribute[];
        getRelations(name?: string): BAttribute[];
        getRelationTarget(name: string): BNote;
        getRelationValue(name: string): string;
        getRevisions(): BRevision[];
        getScriptEnv(): "backend" | "frontend";
        getSearchResultNotes(): BNote[];
        getSortedNotePathRecords(hoistedNoteId?: string): NotePathRecord[];
        getStrongParentBranches(): BBranch[];
        getSubtree(
            __namedParameters?: {
                includeArchived?: boolean;
                includeHidden?: boolean;
                resolveSearch?: boolean;
            },
        ): { notes: BNote[]; relationships: Relationship[] };
        getSubtreeNoteIds(
            __namedParameters?: {
                includeArchived?: boolean;
                includeHidden?: boolean;
                resolveSearch?: boolean;
            },
        ): string[];
        getSubtreeNotesIncludingTemplated(): BNote[];
        getTargetRelations(): BAttribute[];
        getTitleOrProtected(): string;
        getUtcDateChanged(): string;
        getVisibleChildBranches(): BBranch[];
        getVisibleChildNotes(): BNote[];
        hasAncestor(ancestorNoteId: string): boolean;
        hasAttribute(type: string, name: string, value?: string): boolean;
        hasChildren(): boolean;
        hasInheritableArchivedLabel(): boolean;
        hasLabel(name: string, value?: string): boolean;
        hasOwnedAttribute(type: string, name: string, value?: string): boolean;
        hasOwnedLabel(name: string, value?: string): boolean;
        hasOwnedRelation(name: string, value?: string): boolean;
        hasRelation(name: string, value?: string): boolean;
        hasStringContent(): boolean;
        hasVisibleChildren(): boolean;
        init(): void;
        invalidateSubTree(path?: string[]): void;
        invalidateThisCache(): void;
        isContentAvailable(): boolean;
        isDescendantOfNote(ancestorNoteId: string): boolean;
        isEligibleForConversionToAttachment(opts?: ConvertOpts): boolean;
        isFolder(): boolean;
        isHiddenCompletely(): boolean;
        isHtml(): boolean;
        isImage(): boolean;
        isInherited(): boolean;
        isInHiddenSubtree(): boolean;
        isJavaScript(): boolean;
        isJson(): boolean;
        isLabelTruthy(name: string): boolean;
        isLaunchBarConfig(): boolean;
        isOptions(): boolean;
        isRoot(): boolean;
        isStringNote(): boolean;
        markAsDeleted(deleteId?: string): void;
        markAsDeletedSimple(): void;
        putEntityChange(isDeleted: boolean): void;
        removeAttribute(type: string, name: string, value?: string): void;
        removeLabel(name: string, value?: string): void;
        removeRelation(name: string, value?: string): void;
        save(opts?: {}): this;
        saveAttachment(
            __namedParameters: AttachmentRow,
            matchBy?: "attachmentId" | "title",
        ): any;
        saveRevision(): BRevision;
        searchNoteInSubtree(searchString: string): BNote;
        searchNotesInSubtree(searchString: string): BNote[];
        setAttribute(type: AttributeType, name: string, value?: string): void;
        setAttributeValueById(attributeId: string, value?: string): void;
        setContent(
            content: string | Buffer<ArrayBufferLike>,
            opts?: ContentOpts,
        ): void;
        setJsonContent(content: {}): void;
        setLabel(name: string, value?: string): void;
        setRelation(name: string, value?: string): void;
        sortChildren(): void;
        sortParents(): void;
        toggleAttribute(
            type: AttributeType,
            enabled: boolean,
            name: string,
            value?: string,
        ): void;
        toggleLabel(enabled: boolean, name: string, value?: string): void;
        toggleRelation(enabled: boolean, name: string, value?: string): void;
        update(__namedParameters: any): this;
        updateFromRow(row: Partial<NoteRow>): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    __validateTypeName _getContent _setContent addAttribute addLabel addRelation areAllNotePathsArchived beforeSaving cloneTo convertToParentAttachment decrypt deleteNote eraseExcessRevisionSnapshots generateHash getAllNotePaths getAncestorNoteIds getAncestors getAttachmentById getAttachmentByTitle getAttachments getAttachmentsByRole getAttribute getAttributeById getAttributeCaseInsensitive getAttributes getAttributeValue getBestNotePath getBestNotePathString getBranches getChildBranches getChildNotes getContent getDescendantNoteIds getDistanceToAncestor getFileName getFilteredChildBranches getFlatText getIcon getInheritingNotes getJsonContent getJsonContentSafely getLabel getLabelDefinitions getLabels getLabelValue getLabelValues getOwnedAttribute getOwnedAttributes getOwnedAttributeValue getOwnedLabel getOwnedLabels getOwnedLabelValue getOwnedLabelValues getOwnedRelation getOwnedRelations getOwnedRelationValue getParentBranches getParentNotes getPojo getPojoToSave getRelation getRelationDefinitions getRelations getRelationTarget getRelationValue getRevisions getScriptEnv getSearchResultNotes getSortedNotePathRecords getStrongParentBranches getSubtree getSubtreeNoteIds getSubtreeNotesIncludingTemplated getTargetRelations getTitleOrProtected getUtcDateChanged getVisibleChildBranches getVisibleChildNotes hasAncestor hasAttribute hasChildren hasInheritableArchivedLabel hasLabel hasOwnedAttribute hasOwnedLabel hasOwnedRelation hasRelation hasStringContent hasVisibleChildren init invalidateSubTree invalidateThisCache isContentAvailable isDescendantOfNote isEligibleForConversionToAttachment isFolder isHiddenCompletely isHtml isImage isInherited isInHiddenSubtree isJavaScript isJson isLabelTruthy isLaunchBarConfig isOptions isRoot isStringNote markAsDeleted markAsDeletedSimple putEntityChange removeAttribute removeLabel removeRelation save saveAttachment saveRevision searchNoteInSubtree searchNotesInSubtree setAttribute setAttributeValueById setContent setJsonContent setLabel setRelation sortChildren sortParents toggleAttribute toggleLabel toggleRelation update updateFromRow

    Properties

    __flatTextCache: string
    blobId?: string
    children: BNote[]
    contentAndAttachmentsAndRevisionsSize: number

    size of the note content, attachment contents and revision contents in bytes

    contentAndAttachmentsSize: number

    size of the note content, attachment contents in bytes

    contentSize: number

    size of the content in bytes

    dateCreated?: string
    dateModified?: string
    isBeingDeleted: boolean

    set during the deletion operation, before it is completed (removed from becca completely).

    isDecrypted: boolean
    isProtected?: boolean
    isSynced?: boolean
    mime: string
    noteId: string
    ownedAttributes: BAttribute[]
    parentBranches: BBranch[]
    parents: BNote[]
    revisionCount: number

    number of note revisions for this note

    targetRelations: BAttribute[]
    title: string
    type:
        | "image"
        | "file"
        | "search"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "text"
        | "relationMap"
        | "render"
        | "canvas"
        | "mermaid"
        | "book"
        | "webView"
        | "code"
        | "mindMap"
        | "aiChat"
    utcDateCreated: string
    utcDateModified?: string

    Accessors

    • get attributeCount(): number

      Returns number

    • get becca(): default

      Returns default

    • get childrenCount(): number

      Returns number

    • get dateCreatedObj(): Dayjs

      Returns Dayjs

    • get dateModifiedObj(): Dayjs

      Returns Dayjs

    • get encodedTitle(): string

      Returns string

    • get isArchived(): boolean

      Returns boolean

    • get isDeleted(): boolean

      Returns boolean

    • get labelCount(): number

      Returns number

    • get ownedAttributeCount(): number

      Returns number

    • get ownedLabelCount(): number

      Returns number

    • get ownedRelationCount(): number

      Returns number

    • Returns number

    • get parentCount(): number

      Returns number

    • get relationCount(): number

      Returns number

    • Returns number

    • get shareId(): string

      Returns string

    • get targetRelationCount(): number

      Returns number

    • Returns number

    • get utcDateCreatedObj(): Dayjs

      Returns Dayjs

    • get utcDateModifiedObj(): Dayjs

      Returns Dayjs

    Methods

    • Parameters

      • Optionaltype: string
      • Optionalname: string

      Returns void

    • Adds a new attribute to this note. The attribute is saved and returned. See addLabel, addRelation for more specific methods.

      Parameters

      • type: AttributeType

        attribute type (label / relation)

      • name: string

        name of the attribute, not including the leading ~/#

      • Optionalvalue: string

        value of the attribute - text for labels, target note ID for relations; optional.

      • OptionalisInheritable: boolean
      • Optionalposition: number

      Returns BAttribute

    • Adds a new label to this note. The label attribute is saved and returned.

      Parameters

      • name: string

        name of the label, not including the leading #

      • Optionalvalue: string

        text value of the label; optional

      • OptionalisInheritable: boolean

      Returns BAttribute

    • Adds a new relation to this note. The relation attribute is saved and returned.

      Parameters

      • name: string

        name of the relation, not including the leading ~

      • targetNoteId: string
      • OptionalisInheritable: boolean

      Returns BAttribute

    • Returns boolean

    • Parameters

      • parentNoteId: string

      Returns CloneResponse

    • Some notes are eligible for conversion into an attachment of its parent, note must have these properties:

      • it has exactly one target relation
      • it has a relation from its parent note
      • it has no children
      • it has no clones
      • the parent is of type text
      • both notes are either unprotected or user is in protected session

      Currently, works only for image notes.

      In the future, this functionality might get more generic and some of the requirements relaxed.

      Parameters

      Returns BAttachment

      null if note is not eligible for conversion

    • Returns void

    • (Soft) delete a note and all its descendants.

      Parameters

      • OptionaldeleteId: string

        optional delete identified

      • OptionaltaskContext: TaskContext<"deleteNotes">

      Returns void

    • Returns void

    • Parameters

      • OptionalisDeleted: boolean

      Returns string

    • Gives all possible note paths leading to this note. Paths containing search note are ignored (could form cycles)

      Returns string[][]

      array of notePaths (each represented by array of noteIds constituting the particular note path)

    • Returns string[]

    • Returns BNote[]

    • Parameters

      • title: string

      Returns BAttachment

    • Parameters

      • role: string

      Returns BAttachment[]

    • Parameters

      • type: string

        attribute type (label, relation, etc.)

      • name: string

        attribute name

      Returns BAttribute

      attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.

    • Return an attribute by it's attributeId. Requires the attribute cache to be available.

      Parameters

      • attributeId: string

        the id of the attribute owned by this note

      Returns BAttribute

      • the BAttribute with the given id or undefined if not found.
    • Parameters

      • type: string
      • name: string
      • Optionalvalue: string

      Returns BAttribute

    • Beware that the method must not create a copy of the array, but actually returns its internal array (for performance reasons)

      Parameters

      • Optionaltype: string

        (optional) attribute type to filter

      • Optionalname: string

        (optional) attribute name to filter

      Returns BAttribute[]

      all note's attributes, including inherited ones

    • Parameters

      • type: string

        attribute type (label, relation, etc.)

      • name: string

        attribute name

      Returns string

      attribute value of given type and name or null if no such attribute exists.

    • Returns a note path considered to be the "best"

      Parameters

      • OptionalhoistedNoteId: string

      Returns string[]

      array of noteIds constituting the particular note path

    • Returns a note path considered to be the "best"

      Parameters

      • OptionalhoistedNoteId: string

      Returns string

      serialized note path (e.g. 'root/a1h315/js725h')

    • Returns BBranch[]

      use getParentBranches() instead

    • Returns BBranch[]

    • Returns BNote[]

    • Note content has quite special handling - it's not a separate entity, but a lazily loaded part of Note entity with its own sync. Reasons behind this hybrid design has been:

      • content can be quite large, and it's not necessary to load it / fill memory for any note access even if we don't need a content, especially for bulk operations like search
      • changes in the note metadata or title should not trigger note content sync (so we keep separate utcDateModified and entity changes records)
      • but to the user note content and title changes are one and the same - single dateModified (so all changes must go through Note and content is not a separate entity)

      Returns string | Buffer<ArrayBufferLike>

    • Returns string[]

      use getSubtreeNoteIds() instead

    • Parameters

      • ancestorNoteId: string

      Returns number

    • Returns string

    • Returns BBranch[]

    • This is used for:

      • fast searching
      • note similarity evaluation

      Returns string

      • returns flattened textual representation of note, prefixes and attributes
    • Returns any

    • Returns BNote[]

      returns only notes which are templated, does not include their subtrees in effect returns notes which are influenced by note's non-inheritable attributes

    • Returns any

      Error in case of invalid JSON

    • Returns any

      valid object or null if the content cannot be parsed as JSON

    • Parameters

      • name: string

        label name

      Returns BAttribute

      label if it exists, null otherwise

    • Returns BAttribute[]

    • Parameters

      • Optionalname: string

        label name to filter

      Returns BAttribute[]

      all note's labels (attributes with type label), including inherited ones

    • Parameters

      • name: string

        label name

      Returns string

      label value if label exists, null otherwise

    • Parameters

      • name: string

        label name to filter

      Returns string[]

      all note's label values, including inherited ones

    • Parameters

      • type: string
      • name: string
      • Optionalvalue: string

      Returns BAttribute

      attribute belonging to this specific note (excludes inherited attributes)

      This method can be significantly faster than the getAttribute()

    • Beware that the method must not create a copy of the array, but actually returns its internal array (for performance reasons)

      Parameters

      • Optionaltype: string

        (optional) attribute type to filter

      • Optionalname: string

        (optional) attribute name to filter

      • Optionalvalue: string

        (optional) attribute value to filter

      Returns BAttribute[]

      note's "owned" attributes - excluding inherited ones

    • Parameters

      • type: string

        attribute type (label, relation, etc.)

      • name: string

        attribute name

      Returns string

      attribute value of given type and name or null if no such attribute exists.

    • Parameters

      • name: string

        label name

      Returns BAttribute

      label if it exists, null otherwise

    • Parameters

      • name: string

        label name to filter

      Returns BAttribute[]

      all note's labels (attributes with type label), excluding inherited ones

    • Parameters

      • name: string

        label name

      Returns string

      label value if label exists, null otherwise

    • Parameters

      • name: string

        label name to filter

      Returns string[]

      all note's label values, excluding inherited ones

    • Parameters

      • name: string

        relation name

      Returns BAttribute

      relation if it exists, null otherwise

    • Parameters

      • Optionalname: string

        relation name to filter

      Returns BAttribute[]

      all note's relations (attributes with type relation), excluding inherited ones

    • Parameters

      • name: string

        relation name

      Returns string

      relation value if relation exists, null otherwise

    • Returns BBranch[]

    • Returns BNote[]

    • Parameters

      • name: string

        relation name

      Returns BAttribute

      relation if it exists, null otherwise

    • Returns BAttribute[]

    • Parameters

      • Optionalname: string

        relation name to filter

      Returns BAttribute[]

      all note's relations (attributes with type relation), including inherited ones

    • Parameters

      • name: string

      Returns BNote

    • Parameters

      • name: string

        relation name

      Returns string

      relation value if relation exists, null otherwise

    • Returns BRevision[]

    • Returns "backend" | "frontend"

      JS script environment - either "frontend" or "backend"

    • Returns BNote[]

    • Parameters

      • OptionalhoistedNoteId: string

      Returns NotePathRecord[]

    • Returns strong (as opposed to weak) parent branches. See isWeak for details.

      Returns BBranch[]

    • Parameters

      • Optional__namedParameters: { includeArchived?: boolean; includeHidden?: boolean; resolveSearch?: boolean }

      Returns { notes: BNote[]; relationships: Relationship[] }

    • Parameters

      • Optional__namedParameters: { includeArchived?: boolean; includeHidden?: boolean; resolveSearch?: boolean }

      Returns string[]

      includes the subtree root note as well

    • Returns BNote[]

    • Returns BAttribute[]

    • Returns string

    • Returns BBranch[]

    • Returns BNote[]

    • Parameters

      • ancestorNoteId: string

      Returns boolean

    • Parameters

      • type: string
      • name: string
      • Optionalvalue: string

      Returns boolean

    • Returns boolean

    • Returns boolean

    • Parameters

      • name: string

        label name

      • Optionalvalue: string

        label value

      Returns boolean

      true if label exists (including inherited)

    • Parameters

      • type: string
      • name: string

        attribute name

      • Optionalvalue: string

        attribute value

      Returns boolean

      true if note has an attribute with given type and name (excluding inherited)

    • Parameters

      • name: string

        label name

      • Optionalvalue: string

        label value

      Returns boolean

      true if label exists (excluding inherited)

    • Parameters

      • name: string

        relation name

      • Optionalvalue: string

        relation value

      Returns boolean

      true if relation exists (excluding inherited)

    • Parameters

      • name: string

        relation name

      • Optionalvalue: string

        relation value

      Returns boolean

      true if relation exists (including inherited)

    • Returns boolean

      true if the note has string content (not binary)

    • Returns boolean

    • Parameters

      • Optionalpath: string[]

      Returns void

    • Returns void

    • Returns boolean

    • Parameters

      • ancestorNoteId: string

      Returns boolean

      true if ancestorNoteId occurs in at least one of the note's paths

    • Parameters

      Returns boolean

    • Returns boolean

    • Returns boolean

      boolean - true if there's no non-hidden path, note is not cloned to the visible tree

    • Returns boolean

      true if this note is HTML

    • Returns boolean

      true if this note is an image

    • Returns boolean

    • Returns boolean

    • Returns boolean

      true if this note is JavaScript (code or attachment)

    • Returns boolean

      true if this note is of application/json content type

    • Parameters

      • name: string

        label name

      Returns boolean

      true if label exists (including inherited) and does not have "false" value.

    • Returns boolean

    • Returns boolean

    • Returns boolean

      true if this note is the root of the note tree. Root note has "root" noteId

    • Returns boolean

      use hasStringContent() instead

    • Mark the entity as (soft) deleted. It will be completely erased later.

      This is a low-level method, for notes and branches use note.deleteNote() and 'branch.deleteBranch()` instead.

      Parameters

      • OptionaldeleteId: string

      Returns void

    • Parameters

      • isDeleted: boolean

      Returns void

    • Removes given attribute name-value pair if it exists.

      Parameters

      • type: string

        attribute type (label, relation, etc.)

      • name: string

        attribute name

      • Optionalvalue: string

        attribute value (optional)

      Returns void

    • Remove label name-value pair, if it exists.

      Parameters

      • name: string

        label name

      • Optionalvalue: string

        label value

      Returns void

    • Remove the relation name-value pair, if it exists.

      Parameters

      • name: string

        relation name

      • Optionalvalue: string

        relation value (noteId)

      Returns void

    • Saves entity - executes SQL, but doesn't commit the transaction on its own

      Parameters

      • Optionalopts: {}

      Returns this

    • Parameters

      • __namedParameters: AttachmentRow
      • OptionalmatchBy: "attachmentId" | "title"

        choose by which property we detect if to update an existing attachment. Supported values are either 'attachmentId' (default) or 'title'

      Returns any

    • Returns BRevision

    • Parameters

      • searchString: string

      Returns BNote

    • Parameters

      • searchString: string

      Returns BNote[]

    • Update's given attribute's value or creates it if it doesn't exist

      Parameters

      • type: AttributeType

        attribute type (label, relation, etc.)

      • name: string

        attribute name

      • Optionalvalue: string

        attribute value (optional)

      Returns void

    • Sets an attribute's value by it's attributeId.

      Parameters

      • attributeId: string

        the id of the attribute owned by this note

      • Optionalvalue: string

        the new value to replace

      Returns void

    • Parameters

      • content: {}

      Returns void

    • Update's given label's value or creates it if it doesn't exist

      Parameters

      • name: string

        label name

      • Optionalvalue: string

        label value

      Returns void

    • Update's given relation's value or creates it if it doesn't exist

      Parameters

      • name: string

        relation name

      • Optionalvalue: string

        relation value (noteId)

      Returns void

    • Returns void

    • Returns void

    • Based on enabled, the attribute is either set or removed.

      Parameters

      • type: AttributeType

        attribute type ('relation', 'label' etc.)

      • enabled: boolean

        toggle On or Off

      • name: string

        attribute name

      • Optionalvalue: string

        attribute value (optional)

      Returns void

    • Based on enabled, label is either set or removed.

      Parameters

      • enabled: boolean

        toggle On or Off

      • name: string

        label name

      • Optionalvalue: string

        label value (optional)

      Returns void

    • Based on enabled, relation is either set or removed.

      Parameters

      • enabled: boolean

        toggle On or Off

      • name: string

        relation name

      • Optionalvalue: string

        relation value (noteId)

      Returns void

    • Parameters

      • __namedParameters: any

      Returns this