diff --git a/docs/backend_api/.nojekyll b/docs/backend_api/.nojekyll new file mode 100644 index 000000000..e2ac6616a --- /dev/null +++ b/docs/backend_api/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/backend_api/AbstractBeccaEntity.html b/docs/backend_api/AbstractBeccaEntity.html deleted file mode 100644 index 1efeb3ab8..000000000 --- a/docs/backend_api/AbstractBeccaEntity.html +++ /dev/null @@ -1,1207 +0,0 @@ - - - - - JSDoc: Class: AbstractBeccaEntity - - - - - - - - - - -
- -

Class: AbstractBeccaEntity

- - - - - - -
- -
- -

AbstractBeccaEntity()

- -
Base class for all backend entities.
- - -
- -
-
- - - - -

Constructor

- - - -

new AbstractBeccaEntity()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BAttachment.html b/docs/backend_api/BAttachment.html deleted file mode 100644 index 4da4cb240..000000000 --- a/docs/backend_api/BAttachment.html +++ /dev/null @@ -1,2894 +0,0 @@ - - - - - JSDoc: Class: BAttachment - - - - - - - - - - -
- -

Class: BAttachment

- - - - - - -
- -
- -

BAttachment()

- -
Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for -larger amounts of data and generally not accessible to the user.
- - -
- -
-
- - - - -

Constructor

- - - -

new BAttachment()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

attachmentId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

blobId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

contentLength :int

- - - - -
- optionally added to the entity -
- - - -
Type:
-
    -
  • - -int - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isProtected :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

mime :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

ownerId :string

- - - - -
- either noteId or revisionId to which this attachment belongs -
- - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

position :int

- - - - - - -
Type:
-
    -
  • - -int - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

role :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

title :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateScheduledForErasureSince :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

convertToNote() → {Object}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

copy() → {BAttachment}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment - - -
-
- - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

getNote() → {BNote}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

hasStringContent() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if the note has string content (not binary) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -

setContent(content, optsopt)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
content - - - - - - - -
opts - - -object - - - - - - <optional>
- - - - - -
-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
forceSave - - -object - - - - - - <optional>
- - - - - -
- - false - - will also save this BAttachment entity
forceFrontendReload - - -object - - - - - - <optional>
- - - - - -
- - false - - override frontend heuristics on when to reload, instruct to reload
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BAttribute.html b/docs/backend_api/BAttribute.html deleted file mode 100644 index 961eff31d..000000000 --- a/docs/backend_api/BAttribute.html +++ /dev/null @@ -1,2130 +0,0 @@ - - - - - JSDoc: Class: BAttribute - - - - - - - - - - -
- -

Class: BAttribute

- - - - - - -
- -
- -

BAttribute()

- -
Attribute is an abstract concept which has two real uses - label (key - value pair) -and relation (representing named relationship between source and target note)
- - -
- -
-
- - - - -

Constructor

- - - -

new BAttribute()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

attributeId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isInheritable :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

name :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

noteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

position :int

- - - - - - -
Type:
-
    -
  • - -int - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

type :AttributeType

- - - - - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

value :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getNote() → {BNote|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getTargetNote() → {BNote|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

isDefinition() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BBranch.html b/docs/backend_api/BBranch.html deleted file mode 100644 index 184c2156c..000000000 --- a/docs/backend_api/BBranch.html +++ /dev/null @@ -1,2244 +0,0 @@ - - - - - JSDoc: Class: BBranch - - - - - - - - - - -
- -

Class: BBranch

- - - - - - -
- -
- -

BBranch()

- -
Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple -parents. - -Note that you should not rely on the branch's identity, since it can change easily with a note's move. -Always check noteId instead.
- - -
- -
-
- - - - -

Constructor

- - - -

new BBranch()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

branchId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

childNote

- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isExpanded :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isWeak

- - - - -
- Branch is weak when its existence should not hinder deletion of its note. -As a result, note with only weak branches should be immediately deleted. -An example is shared or bookmarked clones - they are created automatically and exist for technical reasons, -not as user-intended actions. From user perspective, they don't count as real clones and for the purpose -of deletion should not act as a clone. -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

noteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

notePosition :int

- - - - - - -
Type:
-
    -
  • - -int - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

parentNote

- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

parentNoteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

prefix :string|null

- - - - - - -
Type:
-
    -
  • - -string -| - -null - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

deleteBranch(deleteIdopt, taskContextopt) → {boolean}

- - - - - - -
- Delete a branch. If this is a last note's branch, delete the note as well. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
deleteId - - -string - - - - - - <optional>
- - - - - -
optional delete identified
taskContext - - -TaskContext - - - - - - <optional>
- - - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - true if note has been deleted, false otherwise -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getNote() → {BNote}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BEtapiToken.html b/docs/backend_api/BEtapiToken.html deleted file mode 100644 index ac8b156f5..000000000 --- a/docs/backend_api/BEtapiToken.html +++ /dev/null @@ -1,1687 +0,0 @@ - - - - - JSDoc: Class: BEtapiToken - - - - - - - - - - -
- -

Class: BEtapiToken

- - - - - - -
- -
- -

BEtapiToken()

- -
EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications. -Used by: -- Trilium Sender -- ETAPI clients - -The format user is presented with is "_". This is also called "authToken" to distinguish it -from tokenHash and token.
- - -
- -
-
- - - - -

Constructor

- - - -

new BEtapiToken()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

etapiTokenId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isDeleted :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

name :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

tokenHash :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.html deleted file mode 100644 index 785bc82aa..000000000 --- a/docs/backend_api/BNote.html +++ /dev/null @@ -1,14966 +0,0 @@ - - - - - JSDoc: Class: BNote - - - - - - - - - - -
- -

Class: BNote

- - - - - - -
- -
- -

BNote()

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

Constructor

- - - -

new BNote()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

__flatTextCache :string|null

- - - - - - -
Type:
-
    -
  • - -string -| - -null - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

blobId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isBeingDeleted :boolean

- - - - -
- set during the deletion operation, before it is completed (removed from becca completely) -
- - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isDecrypted :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isProtected :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

mime :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

noteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

title :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

type :NoteType

- - - - - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

addAttribute(type, name, valueopt, isInheritableopt, positionopt) → {BAttribute}

- - - - - - -
- Adds a new attribute to this note. The attribute is saved and returned. -See addLabel, addRelation for more specific methods. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
type - - -string - - - - - - - - - - - - attribute type (label / relation)
name - - -string - - - - - - - - - - - - name of the attribute, not including the leading ~/#
value - - -string - - - - - - <optional>
- - - - - -
- - value of the attribute - text for labels, target note ID for relations; optional.
isInheritable - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
position - - -int -| - -null - - - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttribute - - -
-
- - - - - - - - - - - - - -

addLabel(name, valueopt, isInheritableopt) → {BAttribute}

- - - - - - -
- Adds a new label to this note. The label attribute is saved and returned. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
name - - -string - - - - - - - - - - - - name of the label, not including the leading #
value - - -string - - - - - - <optional>
- - - - - -
- - text value of the label; optional
isInheritable - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttribute - - -
-
- - - - - - - - - - - - - -

addRelation(name, targetNoteId, isInheritableopt) → {BAttribute}

- - - - - - -
- Adds a new relation to this note. The relation attribute is saved and -returned. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
name - - -string - - - - - - - - - - - - name of the relation, not including the leading ~
targetNoteId - - -string - - - - - - - - - - - -
isInheritable - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttribute - - -
-
- - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

cloneTo(parentNoteId) → {Object}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
parentNoteId - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

convertToParentAttachment() → {BAttachment|null}

- - - - - - -
- 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. -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - null if note is not eligible for conversion -
- - - -
-
- Type -
-
- -BAttachment -| - -null - - -
-
- - - - - - - - - - - - - -

deleteNote(deleteIdopt, taskContextopt)

- - - - - - -
- (Soft) delete a note and all its descendants. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - -string - - - - - - <optional>
- - - - - -
- - null - - optional delete identified
taskContext - - -TaskContext - - - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getAllNotePaths() → {Array.<Array.<string>>}

- - - - - - -
- Gives all possible note paths leading to this note. Paths containing search note are ignored (could form cycles) -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - array of notePaths (each represented by array of noteIds constituting the particular note path) -
- - - -
-
- Type -
-
- -Array.<Array.<string>> - - -
-
- - - - - - - - - - - - - -

getAncestorNoteIds() → {Array.<string>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<string> - - -
-
- - - - - - - - - - - - - -

getAncestors() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getAttachmentById() → {BAttachment|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment -| - -null - - -
-
- - - - - - - - - - - - - -

getAttachmentByTitle() → {BAttachment}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment - - -
-
- - - - - - - - - - - - - -

getAttachments() → {Array.<BAttachment>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BAttachment> - - -
-
- - - - - - - - - - - - - -

getAttachmentsByRole() → {Array.<BAttachment>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BAttachment> - - -
-
- - - - - - - - - - - - - -

getAttribute(type, name) → {BAttribute}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
type - - -string - - - - attribute type (label, relation, etc.)
name - - -string - - - - attribute name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- 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. -
- - - -
-
- Type -
-
- -BAttribute - - -
-
- - - - - - - - - - - - - -

getAttributeValue(type, name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
type - - -string - - - - attribute type (label, relation, etc.)
name - - -string - - - - attribute name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- attribute value of given type and name or null if no such attribute exists. -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getAttributes(typeopt, nameopt) → {Array.<BAttribute>}

- - - - - - -
- Beware that the method must not create a copy of the array, but actually returns its internal array -(for performance reasons) -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -string - - - - - - <optional>
- - - - - -
(optional) attribute type to filter
name - - -string - - - - - - <optional>
- - - - - -
(optional) attribute name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's attributes, including inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getBestNotePath(hoistedNoteIdopt) → {Array.<string>}

- - - - - - -
- Returns a note path considered to be the "best" -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
hoistedNoteId - - -string - - - - - - <optional>
- - - - - -
- - 'root' - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- array of noteIds constituting the particular note path -
- - - -
-
- Type -
-
- -Array.<string> - - -
-
- - - - - - - - - - - - - -

getBestNotePathString(hoistedNoteIdopt) → {string}

- - - - - - -
- Returns a note path considered to be the "best" -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
hoistedNoteId - - -string - - - - - - <optional>
- - - - - -
- - 'root' - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- serialized note path (e.g. 'root/a1h315/js725h') -
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getBranches() → {Array.<BBranch>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • use getParentBranches() instead
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BBranch> - - -
-
- - - - - - - - - - - - - -

getChildBranches() → {Array.<BBranch>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BBranch> - - -
-
- - - - - - - - - - - - - -

getChildNotes() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

getDescendantNoteIds()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • use getSubtreeNoteIds() instead
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getFlatText() → {string}

- - - - - - -
- This is used for: -- fast searching -- note similarity evaluation -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - returns flattened textual representation of note, prefixes and attributes -
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getInheritingNotes() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - returns only notes which are templated, does not include their subtrees - in effect returns notes which are influenced by note's non-inheritable attributes -
- - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getJsonContent() → {*}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
- - Error in case of invalid JSON - -
- - - - - -
Returns:
- - - - -
-
- Type -
-
- -* - - -
-
- - - - - - - - - - - - - -

getJsonContentSafely() → {*|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- valid object or null if the content cannot be parsed as JSON -
- - - -
-
- Type -
-
- -* -| - -null - - -
-
- - - - - - - - - - - - - -

getLabel(name) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - label name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- label if it exists, null otherwise -
- - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getLabelValue(name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - label name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- label value if label exists, null otherwise -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getLabelValues(nameopt) → {Array.<string>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
label name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's label values, including inherited ones -
- - - -
-
- Type -
-
- -Array.<string> - - -
-
- - - - - - - - - - - - - -

getLabels(nameopt) → {Array.<BAttribute>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
label name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's labels (attributes with type label), including inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getOwnedAttribute() → {BAttribute}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- attribute belonging to this specific note (excludes inherited attributes) - -This method can be significantly faster than the getAttribute() -
- - - -
-
- Type -
-
- -BAttribute - - -
-
- - - - - - - - - - - - - -

getOwnedAttributeValue(type, name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
type - - -string - - - - attribute type (label, relation, etc.)
name - - -string - - - - attribute name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- attribute value of given type and name or null if no such attribute exists. -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getOwnedAttributes(typeopt, nameopt, valueopt) → {Array.<BAttribute>}

- - - - - - -
- Beware that the method must not create a copy of the array, but actually returns its internal array -(for performance reasons) -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
type - - -string -| - -null - - - - - - <optional>
- - - - - -
- - null - - (optional) attribute type to filter
name - - -string -| - -null - - - - - - <optional>
- - - - - -
- - null - - (optional) attribute name to filter
value - - -string -| - -null - - - - - - <optional>
- - - - - -
- - null - - (optional) attribute value to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- note's "owned" attributes - excluding inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getOwnedLabel(name) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - label name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- label if it exists, null otherwise -
- - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getOwnedLabelValue(name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - label name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- label value if label exists, null otherwise -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getOwnedLabelValues(nameopt) → {Array.<string>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
label name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's label values, excluding inherited ones -
- - - -
-
- Type -
-
- -Array.<string> - - -
-
- - - - - - - - - - - - - -

getOwnedLabels(nameopt) → {Array.<BAttribute>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
label name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's labels (attributes with type label), excluding inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getOwnedRelation(name) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - relation name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- relation if it exists, null otherwise -
- - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getOwnedRelationValue(name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - relation name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- relation value if relation exists, null otherwise -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getOwnedRelations(nameopt) → {Array.<BAttribute>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
relation name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's relations (attributes with type relation), excluding inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getParentBranches() → {Array.<BBranch>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BBranch> - - -
-
- - - - - - - - - - - - - -

getParentNotes() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

getRelation(name) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - relation name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- relation if it exists, null otherwise -
- - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getRelationValue(name) → {string|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - relation name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- relation value if relation exists, null otherwise -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getRelations(nameopt) → {Array.<BAttribute>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - <optional>
- - - - - -
relation name to filter
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- all note's relations (attributes with type relation), including inherited ones -
- - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

getRevisions() → {Array.<BRevision>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BRevision> - - -
-
- - - - - - - - - - - - - -

getScriptEnv() → {string|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- JS script environment - either "frontend" or "backend" -
- - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getSearchResultNotes() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getSortedNotePathRecords(hoistedNoteIdopt) → {Array.<NotePathRecord>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
hoistedNoteId - - -string - - - - - - <optional>
- - - - - -
- - 'root' - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<NotePathRecord> - - -
-
- - - - - - - - - - - - - -

getStrongParentBranches() → {Array.<BBranch>}

- - - - - - -
- Returns strong (as opposed to weak) parent branches. See isWeak for details. -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BBranch> - - -
-
- - - - - - - - - - - - - -

getSubtree() → {Object}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

getSubtreeNoteIds() → {Array.<string>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - includes the subtree root note as well -
- - - -
-
- Type -
-
- -Array.<string> - - -
-
- - - - - - - - - - - - - -

getSubtreeNotesIncludingTemplated() → {Array.<BNote>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getTargetRelations() → {Array.<BAttribute>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BAttribute> - - -
-
- - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

hasAncestor() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasAttribute(type, name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
type - - - - - - - - - -
name - - - - - - - - - -
value - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasChildren() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasLabel(name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - label name
value - - -string - - - - - - <optional>
- - - - - -
label value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if label exists (including inherited) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasOwnedAttribute(type, name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -string - - - - - - - - - - attribute type (label, relation, etc.)
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if note has an attribute with given type and name (excluding inherited) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasOwnedLabel(name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - label name
value - - -string - - - - - - <optional>
- - - - - -
label value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if label exists (excluding inherited) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasOwnedRelation(name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - relation name
value - - -string - - - - - - <optional>
- - - - - -
relation value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if relation exists (excluding inherited) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasRelation(name, valueopt) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - relation name
value - - -string - - - - - - <optional>
- - - - - -
relation value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if relation exists (including inherited) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

hasStringContent() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if the note has string content (not binary) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isDescendantOfNote(ancestorNoteId) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
ancestorNoteId - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - true if ancestorNoteId occurs in at least one of the note's paths -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isHiddenCompletely()

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

isHtml() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if this note is HTML -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isImage() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if this note is an image -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isJavaScript() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if this note is JavaScript (code or attachment) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isJson() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if this note is of application/json content type -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isLabelTruthy(name) → {boolean}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - label name
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if label exists (including inherited) and does not have "false" value. -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isRoot() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if this note is the root of the note tree. Root note has "root" noteId -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

isStringNote()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • use hasStringContent() instead
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

removeAttribute(type, name, valueopt)

- - - - - - -
- Removes given attribute name-value pair if it exists. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -string - - - - - - - - - - attribute type (label, relation, etc.)
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value (optional)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

removeLabel(name, valueopt)

- - - - - - -
- Remove label name-value pair, if it exists. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - label name
value - - -string - - - - - - <optional>
- - - - - -
label value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

removeRelation(name, valueopt)

- - - - - - -
- Remove the relation name-value pair, if it exists. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - relation name
value - - -string - - - - - - <optional>
- - - - - -
relation value (noteId)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -

saveAttachment(matchBy) → {BAttachment}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDefaultDescription
matchBy - - -string - - - - - - attachmentId - - choose by which property we detect if to update an existing attachment. - Supported values are either 'attachmentId' (default) or 'title'
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment - - -
-
- - - - - - - - - - - - - -

saveRevision() → {BRevision|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BRevision -| - -null - - -
-
- - - - - - - - - - - - - -

setAttribute(type, name, valueopt)

- - - - - - -
- Update's given attribute's value or creates it if it doesn't exist -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -string - - - - - - - - - - attribute type (label, relation, etc.)
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value (optional)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

setContent(content, optsopt)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
content - - - - - - - -
opts - - -object - - - - - - <optional>
- - - - - -
-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
forceSave - - -object - - - - - - <optional>
- - - - - -
- - false - - will also save this BNote entity
forceFrontendReload - - -object - - - - - - <optional>
- - - - - -
- - false - - override frontend heuristics on when to reload, instruct to reload
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

setLabel(name, valueopt)

- - - - - - -
- Update's given label's value or creates it if it doesn't exist -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - label name
value - - -string - - - - - - <optional>
- - - - - -
label value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

setRelation(name, value)

- - - - - - -
- Update's given relation's value or creates it if it doesn't exist -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
name - - -string - - - - relation name
value - - -string - - - - relation value (noteId)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

toggleAttribute(type, enabled, name, valueopt)

- - - - - - -
- Based on enabled, the attribute is either set or removed. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -string - - - - - - - - - - attribute type ('relation', 'label' etc.)
enabled - - -boolean - - - - - - - - - - toggle On or Off
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value (optional)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

toggleLabel(enabled, name, valueopt)

- - - - - - -
- Based on enabled, label is either set or removed. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
enabled - - -boolean - - - - - - - - - - toggle On or Off
name - - -string - - - - - - - - - - label name
value - - -string - - - - - - <optional>
- - - - - -
label value (optional)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

toggleRelation(enabled, name, valueopt)

- - - - - - -
- Based on enabled, relation is either set or removed. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
enabled - - -boolean - - - - - - - - - - toggle On or Off
name - - -string - - - - - - - - - - relation name
value - - -string - - - - - - <optional>
- - - - - -
relation value (noteId)
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BOption.html b/docs/backend_api/BOption.html deleted file mode 100644 index b4b687d1f..000000000 --- a/docs/backend_api/BOption.html +++ /dev/null @@ -1,1545 +0,0 @@ - - - - - JSDoc: Class: BOption - - - - - - - - - - -
- -

Class: BOption

- - - - - - -
- -
- -

BOption()

- -
Option represents a name-value pair, either directly configurable by the user or some system property.
- - -
- -
-
- - - - -

Constructor

- - - -

new BOption()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isSynced :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

name :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

value :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BRecentNote.html b/docs/backend_api/BRecentNote.html deleted file mode 100644 index 323352d8e..000000000 --- a/docs/backend_api/BRecentNote.html +++ /dev/null @@ -1,1477 +0,0 @@ - - - - - JSDoc: Class: BRecentNote - - - - - - - - - - -
- -

Class: BRecentNote

- - - - - - -
- -
- -

BRecentNote()

- -
RecentNote represents recently visited note.
- - -
- -
-
- - - - -

Constructor

- - - -

new BRecentNote()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

noteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

notePath :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BRevision.html b/docs/backend_api/BRevision.html deleted file mode 100644 index 0cadc592a..000000000 --- a/docs/backend_api/BRevision.html +++ /dev/null @@ -1,3243 +0,0 @@ - - - - - JSDoc: Class: BRevision - - - - - - - - - - -
- -

Class: BRevision

- - - - - - -
- -
- -

BRevision()

- -
Revision represents a snapshot of note's title and content at some point in the past. -It's used for seamless note versioning.
- - -
- -
-
- - - - -

Constructor

- - - -

new BRevision()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - -

Members

- - - -

(protected) becca

- - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

blobId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

contentLength :int

- - - - - - -
Type:
-
    -
  • - -int - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dateLastEdited :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

isProtected :boolean

- - - - - - -
Type:
-
    -
  • - -boolean - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

mime :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

noteId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

revisionId :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

title :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

type :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateCreated :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateLastEdited :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

utcDateModified :string

- - - - - - -
Type:
-
    -
  • - -string - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

(protected) _getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

(protected) _setContent()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) beforeSaving()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) generateHash() → {string}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

getAttachmentById() → {BAttachment|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment -| - -null - - -
-
- - - - - - - - - - - - - -

getAttachmentByTitle() → {BAttachment}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment - - -
-
- - - - - - - - - - - - - -

getAttachments() → {Array.<BAttachment>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BAttachment> - - -
-
- - - - - - - - - - - - - -

getAttachmentsByRole() → {Array.<BAttachment>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BAttachment> - - -
-
- - - - - - - - - - - - - -

getContent() → {string|Buffer}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -Buffer - - -
-
- - - - - - - - - - - - - -

getJsonContent() → {*}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Throws:
- - - -
- - Error in case of invalid JSON - -
- - - - - -
Returns:
- - - - -
-
- Type -
-
- -* - - -
-
- - - - - - - - - - - - - -

getJsonContentSafely() → {*|null}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- valid object or null if the content cannot be parsed as JSON -
- - - -
-
- Type -
-
- -* -| - -null - - -
-
- - - - - - - - - - - - - -

(abstract, protected) getPojo()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getPojoToSave()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) getUtcDateChanged()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

hasStringContent() → {boolean}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- true if the note has string content (not binary) -
- - - -
-
- Type -
-
- -boolean - - -
-
- - - - - - - - - - - - - -

markAsDeleted(deleteIdopt)

- - - - - - -
- 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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
deleteId - - - - <optional>
- - - - - -
- - null - -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(protected) putEntityChange()

- - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

save() → {this}

- - - - - - -
- Saves entity - executes SQL, but doesn't commit the transaction on its own -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -this - - -
-
- - - - - - - - - - - - - -

setContent(content, optsopt)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
content - - - - - - - -
opts - - -object - - - - - - <optional>
- - - - - -
-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
forceSave - - -object - - - - - - <optional>
- - - - - -
- - false - - will also save this BRevision entity
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.html deleted file mode 100644 index 8aebca767..000000000 --- a/docs/backend_api/BackendScriptApi.html +++ /dev/null @@ -1,9164 +0,0 @@ - - - - - JSDoc: Class: BackendScriptApi - - - - - - - - - - -
- -

Class: BackendScriptApi

- - - - - - -
- -
- -

BackendScriptApi()

- - -
- -
-
- - - - - - -

new BackendScriptApi()

- - - - - - -
-

This is the main backend API interface for scripts. All the properties and methods are published in the "api" object -available in the JS backend notes. You can use e.g. api.log(api.startNote.title);

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -

Members

- - - -

__private

- - - - -
- This object contains "at your risk" and "no BC guarantees" objects for advanced use cases. -
- - - - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
becca - - -Becca - - - - provides access to the backend in-memory object graph, see https://github.com/zadam/trilium/blob/master/src/becca/becca.js
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

axios :axios

- - - - -
- Axios library for HTTP requests. See https://axios-http.com for documentation -
- - - -
Type:
-
    -
  • - -axios - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • use native (browser compatible) fetch() instead
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

currentNote :BNote

- - - - -
- Note where the script is currently executing. Don't mix this up with the concept of active note -
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

dayjs :dayjs

- - - - -
- day.js library for date manipulation. See https://day.js.org for documentation -
- - - -
Type:
-
    -
  • - -dayjs - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

originEntity :AbstractBeccaEntity

- - - - -
- Entity whose event triggered this execution -
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

sql :module:sql

- - - - -
- sql -
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

startNote :BNote

- - - - -
- Note where the script started executing -
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

xml2js :xml2js

- - - - -
- xml2js library for XML parsing. See https://github.com/Leonidas-from-XIV/node-xml2js for documentation -
- - - -
Type:
-
    -
  • - -xml2js - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -

Methods

- - - - - - - -

backupNow(backupName) → {Promise}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
backupName - - -string - - - - If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - resolves once the backup is finished -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - - - - - - - - - - -

createDataNote(parentNoteId, title, content) → {Object}

- - - - - - -
- Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and -JSON MIME type. See also createNewNote() for more options. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
parentNoteId - - -string - - - -
title - - -string - - - -
content - - -object - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- object having "note" and "branch" keys representing respective objects -
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

createNewNote(params) → {Object}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
params - - -object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
parentNoteId - - -string - - - - - - - - - - - -
title - - -string - - - - - - - - - - - -
content - - -string -| - -Buffer - - - - - - - - - - - -
type - - -NoteType - - - - - - - - - - - - text, code, file, image, search, book, relationMap, canvas
mime - - -string - - - - - - <optional>
- - - - - -
- - value is derived from default mimes for type
isProtected - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
isExpanded - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
prefix - - -string - - - - - - <optional>
- - - - - -
- - '' - -
notePosition - - -int - - - - - - <optional>
- - - - - -
- - default is last existing notePosition in a parent + 10
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- object contains newly created entities note and branch -
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

createNote(parentNoteId, title, contentopt, extraOptionsopt) → {Object}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
parentNoteId - - -string - - - - - - - - - - - - create new note under this parent
title - - -string - - - - - - - - - - - -
content - - -string - - - - - - <optional>
- - - - - -
- - "" - -
extraOptions - - -object - - - - - - <optional>
- - - - - -
- - {} - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
json - - -boolean - - - - - - <optional>
- - - - - -
- - false - - should the note be JSON
isProtected - - -boolean - - - - - - <optional>
- - - - - -
- - false - - should the note be protected
type - - -string - - - - - - <optional>
- - - - - -
- - 'text' - - note type
mime - - -string - - - - - - <optional>
- - - - - -
- - 'text/html' - - MIME type of the note
attributes - - -Array.<object> - - - - - - <optional>
- - - - - -
- - [] - - attributes to be created for this note -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
type - - -AttributeType - - - - - - - - - - attribute type - label, relation etc.
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value
- -
- -
- - - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- object contains newly created entities note and branch -
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

createOrUpdateLauncher(opts) → {Object}

- - - - - - -
- Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
opts - - -object - - - - -
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
id - - -string - - - - - - - - - - - - id of the launcher, only alphanumeric at least 6 characters long
type - - -"note" -| - -"script" -| - -"customWidget" - - - - - - - - - - - - one of - * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param) - * "script" - activating the launcher will execute the script (specified in scriptNoteId param) - * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
title - - -string - - - - - - - - - - - -
isVisible - - -boolean - - - - - - <optional>
- - - - - -
- - false - - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
icon - - -string - - - - - - <optional>
- - - - - -
- - name of the boxicon to be used (e.g. "bx-time")
keyboardShortcut - - -string - - - - - - <optional>
- - - - - -
- - will activate the target note/script upon pressing, e.g. "ctrl+e"
targetNoteId - - -string - - - - - - <optional>
- - - - - -
- - for type "note"
scriptNoteId - - -string - - - - - - <optional>
- - - - - -
- - for type "script"
widgetNoteId - - -string - - - - - - <optional>
- - - - - -
- - for type "customWidget"
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

createTextNote(parentNoteId, title, content) → {Object}

- - - - - - -
- Create text note. See also createNewNote() for more options. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
parentNoteId - - -string - - - -
title - - -string - - - -
content - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - object having "note" and "branch" keys representing respective objects -
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

ensureNoteIsAbsentFromParent(noteId, parentNoteId) → {void}

- - - - - - -
- If there's a branch between note and parent note, remove it. Otherwise, do nothing. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
noteId - - -string - - - -
parentNoteId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -void - - -
-
- - - - - - - - - - - - - -

ensureNoteIsPresentInParent(noteId, parentNoteId, prefix) → {Object}

- - - - - - -
- If there's no branch between note and parent note, create one. Otherwise, do nothing. Returns the new or existing branch. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
noteId - - -string - - - -
parentNoteId - - -string - - - -
prefix - - -string - - - - if branch is created between note and parent note, set this prefix
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

escapeHtml(string) → {string}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
string - - -string - - - - to escape
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- escaped string -
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

exportSubtreeToZipFile(noteId, format, zipFilePath) → {Promise.<void>}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
noteId - - -string - - - -
format - - -string - - - - either 'html' or 'markdown'
zipFilePath - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<void> - - -
-
- - - - - - - - - - - - - -

getAppInfo() → {Object|*}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - object representing basic info about running Trilium version -
- - - -
-
- Type -
-
- -Object -| - -* - - -
-
- - - - - - - - - - - - - -

getAttachment(attachmentId) → {BAttachment|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
attachmentId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttachment -| - -null - - -
-
- - - - - - - - - - - - - -

getAttribute(attributeId) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
attributeId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getAttribute(attributeId) → {BAttribute|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
attributeId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BAttribute -| - -null - - -
-
- - - - - - - - - - - - - -

getBranch(branchId) → {BBranch|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
branchId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BBranch -| - -null - - -
-
- - - - - - - - - - - - - -

getDayNote(date, rootNoteopt) → {BNote|null}

- - - - - - -
- Returns day note for given date. If such note doesn't exist, it is created. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
date - - -string - - - - - - - - - - in YYYY-MM-DD format
rootNote - - -BNote - - - - - - <optional>
- - - - - -
specify calendar root note, normally leave empty to use the default calendar
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getEtapiToken(etapiTokenId) → {BEtapiToken|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
etapiTokenId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BEtapiToken -| - -null - - -
-
- - - - - - - - - - - - - -

getEtapiTokens() → {Array.<BEtapiToken>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BEtapiToken> - - -
-
- - - - - - - - - - - - - -

getInstanceName() → {string|null}

- - - - - - -
- Instance name identifies particular Trilium instance. It can be useful for scripts -if some action needs to happen on only one specific instance. -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -string -| - -null - - -
-
- - - - - - - - - - - - - -

getMonthNote(date, rootNoteopt) → {BNote|null}

- - - - - - -
- Returns month note for given date. If such a note doesn't exist, it is created. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
date - - -string - - - - - - - - - - in YYYY-MM format
rootNote - - -BNote - - - - - - <optional>
- - - - - -
specify calendar root note, normally leave empty to use the default calendar
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getNote(noteId) → {BNote|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
noteId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getNoteWithLabel(name, valueopt) → {BNote|null}

- - - - - - -
- Retrieves first note with given label name & value -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getNotesWithLabel(name, valueopt) → {Array.<BNote>}

- - - - - - -
- Retrieves notes with given label name & value -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
name - - -string - - - - - - - - - - attribute name
value - - -string - - - - - - <optional>
- - - - - -
attribute value
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

getOption(optionName) → {BOption|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
optionName - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BOption -| - -null - - -
-
- - - - - - - - - - - - - -

getOptions() → {Array.<BOption>}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BOption> - - -
-
- - - - - - - - - - - - - -

getRevision(revisionId) → {BRevision|null}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
revisionId - - -string - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BRevision -| - -null - - -
-
- - - - - - - - - - - - - -

getRootCalendarNote() → {BNote|null}

- - - - - - -
- Returns root note of the calendar. -
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getTodayNote(rootNoteopt) → {BNote|null}

- - - - - - -
- Returns today's day note. If such note doesn't exist, it is created. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
rootNote - - -BNote - - - - - - <optional>
- - - - - -
specify calendar root note, normally leave empty to use the default calendar
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getWeekNote(date, optionsopt, rootNoteopt) → {BNote|null}

- - - - - - -
- Returns note for the first date of the week of the given date. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
date - - -string - - - - - - - - - - in YYYY-MM-DD format
options - - -object - - - - - - <optional>
- - - - - -
-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
startOfTheWeek - - -string - - - - - - <optional>
- - - - - -
- - monday - - either "monday" (default) or "sunday"
- -
rootNote - - -BNote - - - - - - <optional>
- - - - - -
specify calendar root note, normally leave empty to use the default calendar
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

getYearNote(year, rootNoteopt) → {BNote|null}

- - - - - - -
- Returns year note for given year. If such a note doesn't exist, it is created. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
year - - -string - - - - - - - - - - in YYYY format
rootNote - - -BNote - - - - - - <optional>
- - - - - -
specify calendar root note, normally leave empty to use the default calendar
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

log(message) → {void}

- - - - - - -
- Log given message to trilium logs and log pane in UI -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
message - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -void - - -
-
- - - - - - - - - - - - - -

randomString(length) → {string}

- - - - - - -
- Return randomly generated string of given length. This random string generation is NOT cryptographically secure. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
length - - -int - - - - of the string
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- random string -
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -

runOnFrontend(script, params) → {undefined}

- - - - - - -
- Executes given anonymous function on the frontend(s). -Internally, this serializes the anonymous function into string and sends it to frontend(s) via WebSocket. -Note that there can be multiple connected frontend instances (e.g. in different tabs). In such case, all -instances execute the given function. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
script - - -string - - - - script to be executed on the frontend
params - - -Array.<?> - - - - list of parameters to the anonymous function to be sent to frontend
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - no return value is provided. -
- - - -
-
- Type -
-
- -undefined - - -
-
- - - - - - - - - - - - - -

runOutsideOfSync(callback) → {Promise}

- - - - - - -
- Sync process can make data intermittently inconsistent. Scripts which require strong data consistency -can use this function to wait for a possible sync process to finish and prevent new sync process from starting -while it is running. - -Because this is an async process, the inner callback doesn't have automatic transaction handling, so in case -you need to make some DB changes, you need to surround your call with api.transactional(...) -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
callback - - -function - - - - function to be executed while sync process is not running
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - resolves once the callback is finished (callback is awaited) -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - - - - - - - - - - -

searchForNote(query, searchParamsopt) → {BNote|null}

- - - - - - -
- This is a powerful search method - you can search by attributes and their values, e.g.: -"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - -
searchParams - - -Object - - - - - - <optional>
- - - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -BNote -| - -null - - -
-
- - - - - - - - - - - - - -

searchForNotes(query, searchParamsopt) → {Array.<BNote>}

- - - - - - -
- This is a powerful search method - you can search by attributes and their values, e.g.: -"#dateModified =* MONTH AND #log". See https://github.com/zadam/trilium/wiki/Search for full documentation for all options -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - -
searchParams - - -Object - - - - - - <optional>
- - - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<BNote> - - -
-
- - - - - - - - - - - - - -

setNoteToParent(noteId, prefix, parentNoteId) → {void}

- - - - - - -
- This method finds note by its noteId and prefix and either sets it to the given parentNoteId -or removes the branch (if parentNoteId is not given). - -This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
noteId - - -string - - - -
prefix - - -string - - - -
parentNoteId - - -string -| - -null - - - -
- - - - - - -
- - - - - - - - - - - - - - - - -
Deprecated:
  • this method is pretty confusing and serves specialized purpose only
- - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -void - - -
-
- - - - - - - - - - - - - -

sortNotes(parentNoteId, sortConfigopt) → {void}

- - - - - - -
- Sort child notes of a given note. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
parentNoteId - - -string - - - - - - - - - - this note's child notes will be sorted
sortConfig - - -object - - - - - - <optional>
- - - - - -
-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
sortBy - - -string - - - - - - <optional>
- - - - - -
- - title - - 'title', 'dateCreated', 'dateModified' or a label name - See https://github.com/zadam/trilium/wiki/Sorting for details.
reverse - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
foldersFirst - - -boolean - - - - - - <optional>
- - - - - -
- - false - -
- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -void - - -
-
- - - - - - - - - - - - - -

toggleNoteInParent(present, noteId, parentNoteId, prefix) → {void}

- - - - - - -
- Based on the value, either create or remove branch between note and parent note. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
present - - -boolean - - - - true if we want the branch to exist, false if we want it gone
noteId - - -string - - - -
parentNoteId - - -string - - - -
prefix - - -string - - - - if branch is created between note and parent note, set this prefix
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -void - - -
-
- - - - - - - - - - - - - -

transactional(func) → {any}

- - - - - - -
- This functions wraps code which is supposed to be running in transaction. If transaction already -exists, then we'll use that transaction. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
func - - -function - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- result of func callback -
- - - -
-
- Type -
-
- -any - - -
-
- - - - - - - - - - - - - -

unescapeHtml(string) → {string}

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
string - - -string - - - - to unescape
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- unescaped string -
- - - -
-
- Type -
-
- -string - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/assets/hierarchy.js b/docs/backend_api/assets/hierarchy.js new file mode 100644 index 000000000..7836cb59e --- /dev/null +++ b/docs/backend_api/assets/hierarchy.js @@ -0,0 +1 @@ +window.hierarchyData = "eJylk91uwyAMhd+Fa7cjdGl+XmWqIiCugkqgAmfSVOXd52y72GUibpA4Fuezjf0SKUbKov9QNxAJ7x4tuRhYeQm1HUHPKHox4l0vngSIhwuj6CvVgliS55D1OmfMbwat1QMGcuQwD9pkStrS8E//Ov/5nCeaPZv9vGUPyuNpMz79ChyYnB8TBs6skVB1ElTXwuXawPtVQn2R0HUKKlm3UFWqvq0gGlmUr9FE2k4zCzuzZCYnVgxNziyE+5nciDKm8dHsx3HPC3FJBzvtB/IHlwGR9NMNFB8Y9lN5pMqoIR75RJ7eMlx8bnt6YFJ5VcqICS1fhmN1bstZiv10+UCp6/oNzPWfkA==" \ No newline at end of file diff --git a/docs/backend_api/assets/highlight.css b/docs/backend_api/assets/highlight.css new file mode 100644 index 000000000..e16c26876 --- /dev/null +++ b/docs/backend_api/assets/highlight.css @@ -0,0 +1,50 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #0000FF; + --dark-hl-2: #569CD6; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +pre, code { background: var(--code-background); } diff --git a/docs/backend_api/assets/icons.js b/docs/backend_api/assets/icons.js new file mode 100644 index 000000000..58882d76d --- /dev/null +++ b/docs/backend_api/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/backend_api/assets/icons.svg b/docs/backend_api/assets/icons.svg new file mode 100644 index 000000000..50ad5799d --- /dev/null +++ b/docs/backend_api/assets/icons.svg @@ -0,0 +1 @@ +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/docs/backend_api/assets/main.js b/docs/backend_api/assets/main.js new file mode 100644 index 000000000..4f59cd955 --- /dev/null +++ b/docs/backend_api/assets/main.js @@ -0,0 +1,60 @@ +"use strict"; +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings.","hierarchy_expand":"Expand","hierarchy_collapse":"Collapse"}; +"use strict";(()=>{var De=Object.create;var le=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ne(e))!Be.call(t,i)&&i!==n&&le(t,i,{get:()=>e[i],enumerable:!(r=Fe(e,i))||r.enumerable});return t};var $e=(t,e,n)=>(n=t!=null?De(Ve(t)):{},je(e||!t||!t.__esModule?le(n,"default",{value:t,enumerable:!0}):n,t));var pe=qe((de,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,c],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[c+1]*i[d+1],c+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}s.str.length==1&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof de=="object"?he.exports=n():e.lunr=n()}(this,function(){return t})})()});window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse"};var ce=[];function G(t,e){ce.push({selector:e,constructor:t})}var J=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){ce.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!ze(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function ze(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var ue=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var ge=$e(pe(),1);async function H(t){let e=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate")),i=await new Response(r).text();return JSON.parse(i)}async function fe(t,e){if(!window.searchData)return;let n=await H(window.searchData);t.data=n,t.index=ge.Index.load(n.index),e.classList.remove("loading"),e.classList.add("ready")}function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:document.documentElement.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{fe(e,t)}),fe(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{re(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),We(t,i,r,e)}function We(t,e,n,r){n.addEventListener("input",ue(()=>{Ue(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Je(e,t):i.key=="ArrowUp"?(me(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(me(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),re(t))})}function re(t){t.classList.remove("has-focus")}function Ue(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ye(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ye(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=c+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function me(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Je(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),re(e)}}function ye(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ne(t.substring(s,o)),`${ne(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ne(t.substring(s))),i.join("")}var Ge={"&":"&","<":"<",">":">","'":"'",'"':"""};function ne(t){return t.replace(/[&<>"'"]/g,e=>Ge[e])}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var A="mousedown",Ee="mousemove",B="mouseup",X={x:0,y:0},xe=!1,ie=!1,Xe=!1,D=!1,Le=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Le?"is-mobile":"not-mobile");Le&&"ontouchstart"in document.documentElement&&(Xe=!0,A="touchstart",Ee="touchmove",B="touchend");document.addEventListener(A,t=>{ie=!0,D=!1;let e=A=="touchstart"?t.targetTouches[0]:t;X.y=e.pageY||0,X.x=e.pageX||0});document.addEventListener(Ee,t=>{if(ie&&!D){let e=A=="touchstart"?t.targetTouches[0]:t,n=X.x-(e.pageX||0),r=X.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ie=!1});document.addEventListener("click",t=>{xe&&(t.preventDefault(),t.stopImmediatePropagation(),xe=!1)});var Y=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(A,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var se;try{se=localStorage}catch{se={getItem(){return null},setItem(){}}}var C=se;var be=document.head.appendChild(document.createElement("style"));be.dataset.for="filters";var Z=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),be.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=C.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){C.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var oe=new Map,ae=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;C.setItem(this.key,e.toString())}},K=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(oe.has(i))s=oe.get(i);else{let o=C.getItem(i),a=o?o==="true":this.el.open;s=new ae(i,a),oe.set(i,s)}s.add(this.el)}};function Se(t){let e=C.getItem("tsd-theme")||"os";t.value=e,we(e),t.addEventListener("change",()=>{C.setItem("tsd-theme",t.value),we(t.value)})}function we(t){document.documentElement.dataset.theme=t}var ee;function Ce(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Te),Te())}async function Te(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let e=await H(window.navigationData);ee=document.documentElement.dataset.base,ee.endsWith("/")||(ee+="/"),t.innerHTML="";for(let n of e)Ie(n,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Ie(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',ke(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let c of t.children)Ie(c,l,i)}else ke(t,r,t.class)}function ke(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=ee+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}var te=document.documentElement.dataset.base;te.endsWith("/")||(te+="/");function Pe(){document.querySelector(".tsd-full-hierarchy")?Ye():document.querySelector(".tsd-hierarchy")&&Ze()}function Ye(){document.addEventListener("click",r=>{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=tt(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function Ze(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Qe),Qe())}async function Qe(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let e=+t.dataset.refl,n=await H(window.hierarchyData),r=t.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),Ke(i,n,e),r.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",()=>{s.textContent===window.translations.hierarchy_expand?(r.insertAdjacentElement("afterend",i),r.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",r),i.remove(),s.textContent=window.translations.hierarchy_expand)})}function Ke(t,e,n){let r=e.roots.filter(i=>et(e,i,n));for(let i of r)t.appendChild(Oe(e,i,n))}function Oe(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let l=t.reflections[a],c=s.appendChild(document.createElement("a"));c.textContent=l.name,c.href=te+l.url,c.className=l.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=te+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let l=Oe(t,a,n,r);l&&o.appendChild(l)}}return r.delete(e),s}function et(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function tt(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.innerHTML='',t}G(Y,"a[data-toggle]");G(K,".tsd-accordion");G(Z,".tsd-filter-item input[type=checkbox]");var _e=document.getElementById("tsd-theme");_e&&Se(_e);var nt=new J;Object.defineProperty(window,"app",{value:nt});ve();Ce();Pe();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/backend_api/assets/navigation.js b/docs/backend_api/assets/navigation.js new file mode 100644 index 000000000..52ef90345 --- /dev/null +++ b/docs/backend_api/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "eJytlltLwzAYhv9Lr8XDxNPuJu5OnOhARCSkaaTBrqnJt6mI/9006yHdIf0qYVej7/vkSZZ+7OUnAv4F0TiKOWP0iOcgQHAdHUQsFVmieB6NX5oQjTUoyoDYNLHpb5MtKKTm8UImy4zrI+epYZGdrcMUFpmpvos8icaj3esl/I0uM2hXYBnVGrtC1e6udDK6/H39PWj3TQEoSxem07sRJxtU3+WipZWIl8BRzutocOUKizOOMxn3y5apsJ6WiFRUNGcpQtLmAmuumThRDrQQBOS7WazX1gmHVXbBOO9cYi5smQpraok4RVmAkIhTXefCalZMnKjizDQJ7kidcFhlF4z1XgmNOuI6Gdq4oqJ0lfzUvaZlCCU5acb8g/xssSIHrt4o20PutDbWOTt3ZCf1SB5Ib0o++LWZo0O4Vd6LtDNvELRu+LDTci7Ny7E0BN1p+fB3ctgBV3kfcmZf/CHQpuHDPtiXc6hvp+XHr9+kYfCmg7rJ8+/CGW9gvvXc4rKwQT6+ujg5G238glhwne1jTm5vZ0/TG3I3m0/J/Pl++tjSV1QJGu8bHNvN7lqnIzOR3JmkuVoJtvc/ekyZucQJ0UyJAoi51dsDrEaQ7fD/pm27RR9658i1+3N295F5fM3TYIIla7+R+fwBbqmgig==" \ No newline at end of file diff --git a/docs/backend_api/assets/search.js b/docs/backend_api/assets/search.js new file mode 100644 index 000000000..e707e53f0 --- /dev/null +++ b/docs/backend_api/assets/search.js @@ -0,0 +1 @@ +window.searchData = "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"; \ No newline at end of file diff --git a/docs/backend_api/assets/style.css b/docs/backend_api/assets/style.css new file mode 100644 index 000000000..7f80f3dc2 --- /dev/null +++ b/docs/backend_api/assets/style.css @@ -0,0 +1,1610 @@ +@layer typedoc { + :root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + + --light-color-icon-background: var(--light-color-background); + --light-color-icon-text: var(--light-color-text); + + --light-color-comment-tag-text: var(--light-color-text); + --light-color-comment-tag: var(--light-color-background); + + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: #9f5f30; + --light-color-ts-method: #be3989; + --light-color-ts-reference: #ff4d82; + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var( + --light-color-ts-constructor + ); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: #c73c3c; + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + --light-color-document: #000000; + + --light-color-alert-note: #0969d9; + --light-color-alert-tip: #1a7f37; + --light-color-alert-important: #8250df; + --light-color-alert-warning: #9a6700; + --light-color-alert-caution: #cf222e; + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-icon-text: var(--dark-color-text); + + --dark-color-comment-tag-text: var(--dark-color-text); + --dark-color-comment-tag: var(--dark-color-background); + + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: #ff984d; + --dark-color-ts-method: #ff4db8; + --dark-color-ts-reference: #ff4d82; + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: #ff6060; + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + --dark-color-document: #ffffff; + + --dark-color-alert-note: #0969d9; + --dark-color-alert-tip: #1a7f37; + --dark-color-alert-important: #8250df; + --dark-color-alert-warning: #9a6700; + --dark-color-alert-caution: #cf222e; + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; + } + + @media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var( + --light-color-background-secondary + ); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + + --color-icon-background: var(--light-color-icon-background); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --color-alert-note: var(--light-color-alert-note); + --color-alert-tip: var(--light-color-alert-tip); + --color-alert-important: var(--light-color-alert-important); + --color-alert-warning: var(--light-color-alert-warning); + --color-alert-caution: var(--light-color-alert-caution); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } + } + + @media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var( + --dark-color-background-secondary + ); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + + --color-icon-background: var(--dark-color-icon-background); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --color-alert-note: var(--dark-color-alert-note); + --color-alert-tip: var(--dark-color-alert-tip); + --color-alert-important: var(--dark-color-alert-important); + --color-alert-warning: var(--dark-color-alert-warning); + --color-alert-caution: var(--dark-color-alert-caution); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } + } + + html { + color-scheme: var(--color-scheme); + } + + body { + margin: 0; + } + + :root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --color-note: var(--light-color-note); + --color-tip: var(--light-color-tip); + --color-important: var(--light-color-important); + --color-warning: var(--light-color-warning); + --color-caution: var(--light-color-caution); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } + + :root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --color-note: var(--dark-color-note); + --color-tip: var(--dark-color-tip); + --color-important: var(--dark-color-important); + --color-warning: var(--dark-color-warning); + --color-caution: var(--dark-color-caution); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } + + *:focus-visible, + .tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); + } + + .always-visible, + .always-visible .tsd-signatures { + display: inherit !important; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + line-height: 1.2; + } + + h1 { + font-size: 1.875rem; + margin: 0.67rem 0; + } + + h2 { + font-size: 1.5rem; + margin: 0.83rem 0; + } + + h3 { + font-size: 1.25rem; + margin: 1rem 0; + } + + h4 { + font-size: 1.05rem; + margin: 1.33rem 0; + } + + h5 { + font-size: 1rem; + margin: 1.5rem 0; + } + + h6 { + font-size: 0.875rem; + margin: 2.33rem 0; + } + + dl, + menu, + ol, + ul { + margin: 1em 0; + } + + dd { + margin: 0 0 0 34px; + } + + .container { + max-width: 1700px; + padding: 0 2rem; + } + + /* Footer */ + footer { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; + } + footer > p { + margin: 0 1em; + } + + .container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); + } + + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + @keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } + } + @keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + @keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } + } + @keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } + } + @keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } + } + body { + background: var(--color-background); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); + } + + a { + color: var(--color-link); + text-decoration: none; + } + a:hover { + text-decoration: underline; + } + a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; + } + a.tsd-anchor-link { + color: var(--color-text); + } + + code, + pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; + } + + pre { + position: relative; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); + margin-bottom: 8px; + } + pre code { + padding: 0; + font-size: 100%; + } + pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; + } + pre:hover > button, + pre > button.visible { + opacity: 1; + } + + blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; + } + + .tsd-typography { + line-height: 1.333em; + } + .tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; + } + .tsd-typography .tsd-index-panel h3, + .tsd-index-panel .tsd-typography h3, + .tsd-typography h4, + .tsd-typography h5, + .tsd-typography h6 { + font-size: 1em; + } + .tsd-typography h5, + .tsd-typography h6 { + font-weight: normal; + } + .tsd-typography p, + .tsd-typography ul, + .tsd-typography ol { + margin: 1em 0; + } + .tsd-typography table { + border-collapse: collapse; + border: none; + } + .tsd-typography td, + .tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); + } + .tsd-typography thead, + .tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); + } + + .tsd-alert { + padding: 8px 16px; + margin-bottom: 16px; + border-left: 0.25em solid var(--alert-color); + } + .tsd-alert blockquote > :last-child, + .tsd-alert > :last-child { + margin-bottom: 0; + } + .tsd-alert-title { + color: var(--alert-color); + display: inline-flex; + align-items: center; + } + .tsd-alert-title span { + margin-left: 4px; + } + + .tsd-alert-note { + --alert-color: var(--color-alert-note); + } + .tsd-alert-tip { + --alert-color: var(--color-alert-tip); + } + .tsd-alert-important { + --alert-color: var(--color-alert-important); + } + .tsd-alert-warning { + --alert-color: var(--color-alert-warning); + } + .tsd-alert-caution { + --alert-color: var(--color-alert-caution); + } + + .tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); + } + .tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; + } + .tsd-breadcrumb a:hover { + text-decoration: underline; + } + .tsd-breadcrumb li { + display: inline; + } + .tsd-breadcrumb li:after { + content: " / "; + } + + .tsd-comment-tags { + display: flex; + flex-direction: column; + } + dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; + } + dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; + } + dl.tsd-comment-tag-group dd { + margin: 0; + } + code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; + } + h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; + } + + dl.tsd-comment-tag-group dd:before, + dl.tsd-comment-tag-group dd:after { + content: " "; + } + dl.tsd-comment-tag-group dd pre, + dl.tsd-comment-tag-group dd:after { + clear: both; + } + dl.tsd-comment-tag-group p { + margin: 0; + } + + .tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; + } + .tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; + } + + .tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; + } + .tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; + } + .tsd-filter-input { + display: flex; + width: -moz-fit-content; + width: fit-content; + align-items: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + } + .tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; + } + .tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; + } + .tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; + } + .tsd-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); + } + .tsd-checkbox-background { + fill: var(--color-accent); + } + input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); + } + .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; + } + .tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); + } + + .settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; + } + + .tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; + } + + .tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; + } + + .tsd-hierarchy h4 label:hover span { + text-decoration: underline; + } + + .tsd-hierarchy { + list-style: square; + margin: 0; + } + .tsd-hierarchy-target { + font-weight: bold; + } + .tsd-hierarchy-toggle { + color: var(--color-link); + cursor: pointer; + } + + .tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); + } + .tsd-full-hierarchy, + .tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; + } + .tsd-full-hierarchy ul { + padding-left: 1.5rem; + } + .tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); + } + .tsd-full-hierarchy svg[data-dropdown] { + cursor: pointer; + } + .tsd-full-hierarchy svg[data-dropdown="false"] { + transform: rotate(-90deg); + } + .tsd-full-hierarchy svg[data-dropdown="false"] ~ ul { + display: none; + } + + .tsd-panel-group.tsd-index-group { + margin-bottom: 0; + } + .tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; + } + @media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } + } + @media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } + } + .tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; + } + + .tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; + } + + .tsd-anchor { + position: relative; + top: -100px; + } + + .tsd-member { + position: relative; + } + .tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; + } + + .tsd-navigation.settings { + margin: 1rem 0; + } + .tsd-navigation > a, + .tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; + } + .tsd-navigation a, + .tsd-navigation summary > span, + .tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; + } + .tsd-navigation a.current, + .tsd-page-navigation a.current { + background: var(--color-active-menu-item); + } + .tsd-navigation a:hover, + .tsd-page-navigation a:hover { + text-decoration: underline; + } + .tsd-navigation ul, + .tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; + } + .tsd-navigation li, + .tsd-page-navigation li { + padding: 0; + max-width: 100%; + } + .tsd-navigation .tsd-nav-link { + display: none; + } + .tsd-nested-navigation { + margin-left: 3rem; + } + .tsd-nested-navigation > li > details { + margin-left: -1.5rem; + } + .tsd-small-nested-navigation { + margin-left: 1.5rem; + } + .tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; + } + + .tsd-page-navigation-section { + margin-left: 10px; + } + .tsd-page-navigation-section > summary { + padding: 0.25rem; + } + .tsd-page-navigation-section > div { + margin-left: 20px; + } + .tsd-page-navigation ul { + padding-left: 1.75rem; + } + + #tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; + } + #tsd-sidebar-links a:last-of-type { + margin-bottom: 0; + } + + a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); + } + .tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ + } + .tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ + } + .tsd-accordion-summary, + .tsd-accordion-summary a { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + + cursor: pointer; + } + .tsd-accordion-summary a { + width: calc(100% - 1.5rem); + } + .tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; + } + .tsd-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; + vertical-align: text-top; + } + /* + We need to be careful to target the arrow indicating whether the accordion + is open, but not any other SVGs included in the details element. +*/ + .tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child, + .tsd-accordion:not([open]) > .tsd-accordion-summary > h1 > svg:first-child, + .tsd-accordion:not([open]) > .tsd-accordion-summary > h2 > svg:first-child, + .tsd-accordion:not([open]) > .tsd-accordion-summary > h3 > svg:first-child, + .tsd-accordion:not([open]) > .tsd-accordion-summary > h4 > svg:first-child { + transform: rotate(-90deg); + } + .tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; + } + .tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; + } + + .tsd-no-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + .tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; + } + .tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; + } + + .tsd-panel { + margin-bottom: 2.5rem; + } + .tsd-panel.tsd-member { + margin-bottom: 4rem; + } + .tsd-panel:empty { + display: none; + } + .tsd-panel > h1, + .tsd-panel > h2, + .tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; + } + .tsd-panel > h1.tsd-before-signature, + .tsd-panel > h2.tsd-before-signature, + .tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; + } + + .tsd-panel-group { + margin: 2rem 0; + } + .tsd-panel-group.tsd-index-group { + margin: 2rem 0; + } + .tsd-panel-group.tsd-index-group details { + margin: 2rem 0; + } + .tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; + } + + #tsd-search { + transition: background-color 0.2s; + } + #tsd-search .title { + position: relative; + z-index: 2; + } + #tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; + } + #tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); + } + #tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; + } + #tsd-search .field input, + #tsd-search .title, + #tsd-toolbar-links a { + transition: opacity 0.2s; + } + #tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); + } + #tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; + } + #tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); + } + #tsd-search .results li.state { + display: none; + } + #tsd-search .results li.current:not(.no-results), + #tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); + } + #tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; + } + #tsd-search .results a:before { + top: 10px; + } + #tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; + } + #tsd-search.has-focus { + background-color: var(--color-accent); + } + #tsd-search.has-focus .field input { + top: 0; + opacity: 1; + } + #tsd-search.has-focus .title, + #tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; + } + #tsd-search.has-focus .results { + visibility: visible; + } + #tsd-search.loading .results li.state.loading { + display: block; + } + #tsd-search.failure .results li.state.failure { + display: block; + } + + #tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; + } + #tsd-toolbar-links a { + margin-left: 1.5rem; + } + #tsd-toolbar-links a:hover { + text-decoration: underline; + } + + .tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; + } + + .tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; + } + + .tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; + } + + .tsd-signature-type { + font-style: italic; + font-weight: normal; + } + + .tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; + } + .tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; + } + .tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; + } + .tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; + } + .tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; + } + + ul.tsd-parameter-list, + ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; + } + ul.tsd-parameter-list > li.tsd-parameter-signature, + ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; + } + ul.tsd-parameter-list h5, + ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; + } + .tsd-sources { + margin-top: 1rem; + font-size: 0.875em; + } + .tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; + } + .tsd-sources ul { + list-style: none; + padding: 0; + } + + .tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; + } + .tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; + } + .tsd-page-toolbar a.title { + font-weight: bold; + } + .tsd-page-toolbar a.title:hover { + text-decoration: underline; + } + .tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; + } + .tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; + } + .tsd-page-toolbar .table-cell:first-child { + width: 100%; + } + .tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; + } + + .tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; + } + .tsd-widget:hover { + opacity: 0.9; + } + .tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); + } + .tsd-widget.no-caption { + width: 40px; + } + .tsd-widget.no-caption:before { + margin: 0; + } + + .tsd-widget.options, + .tsd-widget.menu { + display: none; + } + input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; + } + input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; + } + + img { + max-width: 100%; + } + + .tsd-member-summary-name { + display: inline-flex; + align-items: center; + padding: 0.25rem; + text-decoration: none; + } + + .tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + color: var(--color-text); + } + + .tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; + } + + .tsd-member-summary-name:hover > .tsd-anchor-icon svg, + .tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; + } + + .deprecated { + text-decoration: line-through !important; + } + + .warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); + } + + .tsd-kind-project { + color: var(--color-ts-project); + } + .tsd-kind-module { + color: var(--color-ts-module); + } + .tsd-kind-namespace { + color: var(--color-ts-namespace); + } + .tsd-kind-enum { + color: var(--color-ts-enum); + } + .tsd-kind-enum-member { + color: var(--color-ts-enum-member); + } + .tsd-kind-variable { + color: var(--color-ts-variable); + } + .tsd-kind-function { + color: var(--color-ts-function); + } + .tsd-kind-class { + color: var(--color-ts-class); + } + .tsd-kind-interface { + color: var(--color-ts-interface); + } + .tsd-kind-constructor { + color: var(--color-ts-constructor); + } + .tsd-kind-property { + color: var(--color-ts-property); + } + .tsd-kind-method { + color: var(--color-ts-method); + } + .tsd-kind-reference { + color: var(--color-ts-reference); + } + .tsd-kind-call-signature { + color: var(--color-ts-call-signature); + } + .tsd-kind-index-signature { + color: var(--color-ts-index-signature); + } + .tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); + } + .tsd-kind-parameter { + color: var(--color-ts-parameter); + } + .tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); + } + .tsd-kind-accessor { + color: var(--color-ts-accessor); + } + .tsd-kind-get-signature { + color: var(--color-ts-get-signature); + } + .tsd-kind-set-signature { + color: var(--color-ts-set-signature); + } + .tsd-kind-type-alias { + color: var(--color-ts-type-alias); + } + + /* if we have a kind icon, don't color the text by kind */ + .tsd-kind-icon ~ span { + color: var(--color-text); + } + + * { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); + } + + *::-webkit-scrollbar { + width: 0.75rem; + } + + *::-webkit-scrollbar-track { + background: var(--color-icon-background); + } + + *::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); + } + + /* mobile */ + @media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } + } + + /* one sidebar */ + @media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } + } + @media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } + } + + /* two sidebars */ + @media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax( + 0, + 20rem + ); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } + } +} diff --git a/docs/backend_api/becca_entities_abstract_becca_entity.js.html b/docs/backend_api/becca_entities_abstract_becca_entity.js.html deleted file mode 100644 index d07a48e8f..000000000 --- a/docs/backend_api/becca_entities_abstract_becca_entity.js.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - JSDoc: Source: becca/entities/abstract_becca_entity.js - - - - - - - - - - -
- -

Source: becca/entities/abstract_becca_entity.js

- - - - - - -
-
-
"use strict";
-
-const utils = require('../../services/utils');
-const sql = require('../../services/sql');
-const entityChangesService = require('../../services/entity_changes');
-const eventService = require("../../services/events");
-const dateUtils = require("../../services/date_utils");
-const cls = require("../../services/cls");
-const log = require("../../services/log");
-const protectedSessionService = require("../../services/protected_session");
-const blobService = require("../../services/blob");
-
-let becca = null;
-
-/**
- * Base class for all backend entities.
- */
-class AbstractBeccaEntity {
-    /** @protected */
-    beforeSaving() {
-        if (!this[this.constructor.primaryKeyName]) {
-            this[this.constructor.primaryKeyName] = utils.newEntityId();
-        }
-    }
-
-    /** @protected */
-    getUtcDateChanged() {
-        return this.utcDateModified || this.utcDateCreated;
-    }
-
-    /**
-     * @protected
-     * @returns {Becca}
-     */
-    get becca() {
-        if (!becca) {
-            becca = require('../becca');
-        }
-
-        return becca;
-    }
-
-    /** @protected */
-    putEntityChange(isDeleted) {
-        entityChangesService.putEntityChange({
-            entityName: this.constructor.entityName,
-            entityId: this[this.constructor.primaryKeyName],
-            hash: this.generateHash(isDeleted),
-            isErased: false,
-            utcDateChanged: this.getUtcDateChanged(),
-            isSynced: this.constructor.entityName !== 'options' || !!this.isSynced
-        });
-    }
-
-    /**
-     * @protected
-     * @returns {string}
-     */
-    generateHash(isDeleted) {
-        let contentToHash = "";
-
-        for (const propertyName of this.constructor.hashedProperties) {
-            contentToHash += `|${this[propertyName]}`;
-        }
-
-        if (isDeleted) {
-            contentToHash += "|deleted";
-        }
-
-        return utils.hash(contentToHash).substr(0, 10);
-    }
-
-    /** @protected */
-    getPojoToSave() {
-        return this.getPojo();
-    }
-
-    /**
-     * @protected
-     * @abstract
-     */
-    getPojo() {
-        throw new Error(`Unimplemented getPojo() for entity '${this.constructor.name}'`)
-    }
-
-    /**
-     * Saves entity - executes SQL, but doesn't commit the transaction on its own
-     *
-     * @returns {this}
-     */
-    save(opts = {}) {
-        const entityName = this.constructor.entityName;
-        const primaryKeyName = this.constructor.primaryKeyName;
-
-        const isNewEntity = !this[primaryKeyName];
-
-        this.beforeSaving(opts);
-
-        const pojo = this.getPojoToSave();
-
-        sql.transactional(() => {
-            sql.upsert(entityName, primaryKeyName, pojo);
-
-            if (entityName === 'recent_notes') {
-                return;
-            }
-
-            this.putEntityChange(!!this.isDeleted);
-
-            if (!cls.isEntityEventsDisabled()) {
-                const eventPayload = {
-                    entityName,
-                    entity: this
-                };
-
-                if (isNewEntity) {
-                    eventService.emit(eventService.ENTITY_CREATED, eventPayload);
-                }
-
-                eventService.emit(eventService.ENTITY_CHANGED, eventPayload);
-            }
-        });
-
-        return this;
-    }
-
-    /** @protected */
-    _setContent(content, opts = {}) {
-        // client code asks to save entity even if blobId didn't change (something else was changed)
-        opts.forceSave = !!opts.forceSave;
-        opts.forceFrontendReload = !!opts.forceFrontendReload;
-
-        if (content === null || content === undefined) {
-            throw new Error(`Cannot set null content to ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}'`);
-        }
-
-        if (this.hasStringContent()) {
-            content = content.toString();
-        } else {
-            content = Buffer.isBuffer(content) ? content : Buffer.from(content);
-        }
-
-        const unencryptedContentForHashCalculation = this.#getUnencryptedContentForHashCalculation(content);
-
-        if (this.isProtected) {
-            if (protectedSessionService.isProtectedSessionAvailable()) {
-                content = protectedSessionService.encrypt(content);
-            } else {
-                throw new Error(`Cannot update content of blob since protected session is not available.`);
-            }
-        }
-
-        sql.transactional(() => {
-            const newBlobId = this.#saveBlob(content, unencryptedContentForHashCalculation, opts);
-            const oldBlobId = this.blobId;
-
-            if (newBlobId !== oldBlobId || opts.forceSave) {
-                this.blobId = newBlobId;
-                this.save();
-
-                if (newBlobId !== oldBlobId) {
-                    this.#deleteBlobIfNotUsed(oldBlobId);
-                }
-            }
-        });
-    }
-
-    #deleteBlobIfNotUsed(oldBlobId) {
-        if (sql.getValue("SELECT 1 FROM notes WHERE blobId = ? LIMIT 1", [oldBlobId])) {
-            return;
-        }
-
-        if (sql.getValue("SELECT 1 FROM attachments WHERE blobId = ? LIMIT 1", [oldBlobId])) {
-            return;
-        }
-
-        if (sql.getValue("SELECT 1 FROM revisions WHERE blobId = ? LIMIT 1", [oldBlobId])) {
-            return;
-        }
-
-        sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]);
-        // blobs are not marked as erased in entity_changes, they are just purged completely
-        // this is because technically every keystroke can create a new blob, and there would be just too many
-        sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]);
-    }
-
-    #getUnencryptedContentForHashCalculation(unencryptedContent) {
-        if (this.isProtected) {
-            // a "random" prefix makes sure that the calculated hash/blobId is different for a decrypted/encrypted content
-            const encryptedPrefixSuffix = "t$[nvQg7q)&_ENCRYPTED_?M:Bf&j3jr_";
-            return Buffer.isBuffer(unencryptedContent)
-                ? Buffer.concat([Buffer.from(encryptedPrefixSuffix), unencryptedContent])
-                : `${encryptedPrefixSuffix}${unencryptedContent}`;
-        } else {
-            return unencryptedContent;
-        }
-    }
-
-    #saveBlob(content, unencryptedContentForHashCalculation, opts = {}) {
-        /*
-         * We're using the unencrypted blob for the hash calculation, because otherwise the random IV would
-         * cause every content blob to be unique which would balloon the database size (esp. with revisioning).
-         * This has minor security implications (it's easy to infer that given content is shared between different
-         * notes/attachments), but the trade-off comes out clearly positive.
-         */
-        const newBlobId = utils.hashedBlobId(unencryptedContentForHashCalculation);
-        const blobNeedsInsert = !sql.getValue('SELECT 1 FROM blobs WHERE blobId = ?', [newBlobId]);
-
-        if (!blobNeedsInsert) {
-            return newBlobId;
-        }
-
-        const pojo = {
-            blobId: newBlobId,
-            content: content,
-            dateModified: dateUtils.localNowDateTime(),
-            utcDateModified: dateUtils.utcNowDateTime()
-        };
-
-        sql.upsert("blobs", "blobId", pojo);
-
-        // we can't reuse blobId as an entity_changes hash, because this one has to be calculatable without having
-        // access to the decrypted content
-        const hash = blobService.calculateContentHash(pojo);
-
-        entityChangesService.putEntityChange({
-            entityName: 'blobs',
-            entityId: newBlobId,
-            hash: hash,
-            isErased: false,
-            utcDateChanged: pojo.utcDateModified,
-            isSynced: true,
-            // overriding componentId will cause the frontend to think the change is coming from a different component
-            // and thus reload
-            componentId: opts.forceFrontendReload ? utils.randomString(10) : null
-        });
-
-        eventService.emit(eventService.ENTITY_CHANGED, {
-            entityName: 'blobs',
-            entity: this
-        });
-
-        return newBlobId;
-    }
-
-    /**
-     * @protected
-     * @returns {string|Buffer}
-     */
-    _getContent() {
-        const row = sql.getRow(`SELECT content FROM blobs WHERE blobId = ?`, [this.blobId]);
-
-        if (!row) {
-            throw new Error(`Cannot find content for ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}', blobId '${this.blobId}'`);
-        }
-
-        return blobService.processContent(row.content, this.isProtected, this.hasStringContent());
-    }
-
-    /**
-     * 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.
-     *
-     * @param [deleteId=null]
-     */
-    markAsDeleted(deleteId = null) {
-        const entityId = this[this.constructor.primaryKeyName];
-        const entityName = this.constructor.entityName;
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-
-        sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
-                           WHERE ${this.constructor.primaryKeyName} = ?`,
-            [deleteId, this.utcDateModified, entityId]);
-
-        if (this.dateModified) {
-            this.dateModified = dateUtils.localNowDateTime();
-
-            sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,
-                [this.dateModified, entityId]);
-        }
-
-        log.info(`Marking ${entityName} ${entityId} as deleted`);
-
-        this.putEntityChange(true);
-
-        eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
-    }
-
-    markAsDeletedSimple() {
-        const entityId = this[this.constructor.primaryKeyName];
-        const entityName = this.constructor.entityName;
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-
-        sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?
-                           WHERE ${this.constructor.primaryKeyName} = ?`,
-            [this.utcDateModified, entityId]);
-
-        log.info(`Marking ${entityName} ${entityId} as deleted`);
-
-        this.putEntityChange(true);
-
-        eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
-    }
-}
-
-module.exports = AbstractBeccaEntity;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_battachment.js.html b/docs/backend_api/becca_entities_battachment.js.html deleted file mode 100644 index 086365423..000000000 --- a/docs/backend_api/becca_entities_battachment.js.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - JSDoc: Source: becca/entities/battachment.js - - - - - - - - - - -
- -

Source: becca/entities/battachment.js

- - - - - - -
-
-
"use strict";
-
-const utils = require('../../services/utils');
-const dateUtils = require('../../services/date_utils');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-const sql = require("../../services/sql");
-const protectedSessionService = require("../../services/protected_session");
-const log = require("../../services/log");
-
-const attachmentRoleToNoteTypeMapping = {
-    'image': 'image'
-};
-
-/**
- * Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
- * larger amounts of data and generally not accessible to the user.
- *
- * @extends AbstractBeccaEntity
- */
-class BAttachment extends AbstractBeccaEntity {
-    static get entityName() { return "attachments"; }
-    static get primaryKeyName() { return "attachmentId"; }
-    static get hashedProperties() { return ["attachmentId", "ownerId", "role", "mime", "title", "blobId", "utcDateScheduledForErasureSince"]; }
-
-    constructor(row) {
-        super();
-
-        if (!row.ownerId?.trim()) {
-            throw new Error("'ownerId' must be given to initialize a Attachment entity");
-        } else if (!row.role?.trim()) {
-            throw new Error("'role' must be given to initialize a Attachment entity");
-        } else if (!row.mime?.trim()) {
-            throw new Error("'mime' must be given to initialize a Attachment entity");
-        } else if (!row.title?.trim()) {
-            throw new Error("'title' must be given to initialize a Attachment entity");
-        }
-
-        /** @type {string} */
-        this.attachmentId = row.attachmentId;
-        /** 
-         * either noteId or revisionId to which this attachment belongs
-         * @type {string}
-         */
-        this.ownerId = row.ownerId;
-        /** @type {string} */
-        this.role = row.role;
-        /** @type {string} */
-        this.mime = row.mime;
-        /** @type {string} */
-        this.title = row.title;
-        /** @type {int} */
-        this.position = row.position;
-        /** @type {string} */
-        this.blobId = row.blobId;
-        /** @type {boolean} */
-        this.isProtected = !!row.isProtected;
-        /** @type {string} */
-        this.dateModified = row.dateModified;
-        /** @type {string} */
-        this.utcDateModified = row.utcDateModified;
-        /** @type {string} */
-        this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
-
-        /**
-         * optionally added to the entity
-         * @type {int}
-         */
-        this.contentLength = row.contentLength;
-
-        this.decrypt();
-    }
-
-    /** @returns {BAttachment} */
-    copy() {
-        return new BAttachment({
-            ownerId: this.ownerId,
-            role: this.role,
-            mime: this.mime,
-            title: this.title,
-            blobId: this.blobId,
-            isProtected: this.isProtected
-        });
-    }
-
-    /** @returns {BNote} */
-    getNote() {
-        return this.becca.notes[this.ownerId];
-    }
-
-    /** @returns {boolean} true if the note has string content (not binary) */
-    hasStringContent() {
-        return utils.isStringNote(this.type, this.mime);
-    }
-
-    isContentAvailable() {
-        return !this.attachmentId // new attachment which was not encrypted yet
-            || !this.isProtected
-            || protectedSessionService.isProtectedSessionAvailable()
-    }
-
-    getTitleOrProtected() {
-        return this.isContentAvailable() ? this.title : '[protected]';
-    }
-
-    decrypt() {
-        if (!this.isProtected || !this.attachmentId) {
-            this.isDecrypted = true;
-            return;
-        }
-
-        if (!this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {
-            try {
-                this.title = protectedSessionService.decryptString(this.title);
-                this.isDecrypted = true;
-            }
-            catch (e) {
-                log.error(`Could not decrypt attachment ${this.attachmentId}: ${e.message} ${e.stack}`);
-            }
-        }
-    }
-
-    /** @returns {string|Buffer}  */
-    getContent() {
-        return this._getContent();
-    }
-
-    /**
-     * @param content
-     * @param {object} [opts]
-     * @param {object} [opts.forceSave=false] - will also save this BAttachment entity
-     * @param {object} [opts.forceFrontendReload=false] - override frontend heuristics on when to reload, instruct to reload
-     */
-    setContent(content, opts) {
-        this._setContent(content, opts);
-    }
-
-    /** @returns {{note: BNote, branch: BBranch}} */
-    convertToNote() {
-        if (this.type === 'search') {
-            throw new Error(`Note of type search cannot have child notes`);
-        }
-
-        if (!this.getNote()) {
-            throw new Error("Cannot find note of this attachment. It is possible that this is note revision's attachment. " +
-                "Converting note revision's attachments to note is not (yet) supported.");
-        }
-
-        if (!(this.role in attachmentRoleToNoteTypeMapping)) {
-            throw new Error(`Mapping from attachment role '${this.role}' to note's type is not defined`);
-        }
-
-        if (!this.isContentAvailable()) { // isProtected is the same for attachment
-            throw new Error(`Cannot convert protected attachment outside of protected session`);
-        }
-
-        const noteService = require('../../services/notes');
-
-        const { note, branch } = noteService.createNewNote({
-            parentNoteId: this.ownerId,
-            title: this.title,
-            type: attachmentRoleToNoteTypeMapping[this.role],
-            mime: this.mime,
-            content: this.getContent(),
-            isProtected: this.isProtected
-        });
-
-        this.markAsDeleted();
-
-        const parentNote = this.getNote();
-
-        if (this.role === 'image' && parentNote.type === 'text') {
-            const origContent = parentNote.getContent();
-            const oldAttachmentUrl = `api/attachments/${this.attachmentId}/image/`;
-            const newNoteUrl = `api/images/${note.noteId}/`;
-
-            const fixedContent = utils.replaceAll(origContent, oldAttachmentUrl, newNoteUrl);
-
-            if (fixedContent !== origContent) {
-                parentNote.setContent(fixedContent);
-            }
-
-            noteService.asyncPostProcessContent(note, fixedContent);
-        }
-
-        return { note, branch };
-    }
-
-    getFileName() {
-        const type = this.role === 'image' ? 'image' : 'file';
-
-        return utils.formatDownloadTitle(this.title, type, this.mime);
-    }
-
-    beforeSaving() {
-        super.beforeSaving();
-
-        if (this.position === undefined || this.position === null) {
-            this.position = 10 + sql.getValue(`SELECT COALESCE(MAX(position), 0)
-                                              FROM attachments
-                                              WHERE ownerId = ?`, [this.noteId]);
-        }
-
-        this.dateModified = dateUtils.localNowDateTime();
-        this.utcDateModified = dateUtils.utcNowDateTime();
-    }
-
-    getPojo() {
-        return {
-            attachmentId: this.attachmentId,
-            ownerId: this.ownerId,
-            role: this.role,
-            mime: this.mime,
-            title: this.title,
-            position: this.position,
-            blobId: this.blobId,
-            isProtected: !!this.isProtected,
-            isDeleted: false,
-            dateModified: this.dateModified,
-            utcDateModified: this.utcDateModified,
-            utcDateScheduledForErasureSince: this.utcDateScheduledForErasureSince,
-            contentLength: this.contentLength
-        };
-    }
-
-    getPojoToSave() {
-        const pojo = this.getPojo();
-        delete pojo.contentLength;
-
-        if (pojo.isProtected) {
-            if (this.isDecrypted) {
-                pojo.title = protectedSessionService.encrypt(pojo.title);
-            }
-            else {
-                // updating protected note outside of protected session means we will keep original ciphertexts
-                delete pojo.title;
-            }
-        }
-
-        return pojo;
-    }
-}
-
-module.exports = BAttachment;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_battribute.js.html b/docs/backend_api/becca_entities_battribute.js.html deleted file mode 100644 index 8adb978e8..000000000 --- a/docs/backend_api/becca_entities_battribute.js.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - JSDoc: Source: becca/entities/battribute.js - - - - - - - - - - -
- -

Source: becca/entities/battribute.js

- - - - - - -
-
-
"use strict";
-
-const BNote = require('./bnote');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-const sql = require("../../services/sql");
-const dateUtils = require("../../services/date_utils");
-const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
-const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
-
-
-/**
- * There are currently only two types of attributes, labels or relations.
- * @typedef {"label" | "relation"} AttributeType
- */
-
-/**
- * Attribute is an abstract concept which has two real uses - label (key - value pair)
- * and relation (representing named relationship between source and target note)
- *
- * @extends AbstractBeccaEntity
- */
-class BAttribute extends AbstractBeccaEntity {
-    static get entityName() { return "attributes"; }
-    static get primaryKeyName() { return "attributeId"; }
-    static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable"]; }
-
-    constructor(row) {
-        super();
-
-        if (!row) {
-            return;
-        }
-
-        this.updateFromRow(row);
-        this.init();
-    }
-
-    updateFromRow(row) {
-        this.update([
-            row.attributeId,
-            row.noteId,
-            row.type,
-            row.name,
-            row.value,
-            row.isInheritable,
-            row.position,
-            row.utcDateModified
-        ]);
-    }
-
-    update([attributeId, noteId, type, name, value, isInheritable, position, utcDateModified]) {
-        /** @type {string} */
-        this.attributeId = attributeId;
-        /** @type {string} */
-        this.noteId = noteId;
-        /** @type {AttributeType} */
-        this.type = type;
-        /** @type {string} */
-        this.name = name;
-        /** @type {int} */
-        this.position = position;
-        /** @type {string} */
-        this.value = value || "";
-        /** @type {boolean} */
-        this.isInheritable = !!isInheritable;
-        /** @type {string} */
-        this.utcDateModified = utcDateModified;
-
-        return this;
-    }
-
-    init() {
-        if (this.attributeId) {
-            this.becca.attributes[this.attributeId] = this;
-        }
-
-        if (!(this.noteId in this.becca.notes)) {
-            // entities can come out of order in sync, create skeleton which will be filled later
-            this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
-        }
-
-        this.becca.notes[this.noteId].ownedAttributes.push(this);
-
-        const key = `${this.type}-${this.name.toLowerCase()}`;
-        this.becca.attributeIndex[key] = this.becca.attributeIndex[key] || [];
-        this.becca.attributeIndex[key].push(this);
-
-        const targetNote = this.targetNote;
-
-        if (targetNote) {
-            targetNote.targetRelations.push(this);
-        }
-    }
-
-    validate() {
-        if (!["label", "relation"].includes(this.type)) {
-            throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);
-        }
-
-        if (!this.name?.trim()) {
-            throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);
-        }
-
-        if (this.type === 'relation' && !(this.value in this.becca.notes)) {
-            throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it targets not existing note '${this.value}'.`);
-        }
-    }
-
-    get isAffectingSubtree() {
-        return this.isInheritable
-            || (this.type === 'relation' && ['template', 'inherit'].includes(this.name));
-    }
-
-    get targetNoteId() { // alias
-        return this.type === 'relation' ? this.value : undefined;
-    }
-
-    isAutoLink() {
-        return this.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(this.name);
-    }
-
-    get note() {
-        return this.becca.notes[this.noteId];
-    }
-
-    get targetNote() {
-        if (this.type === 'relation') {
-            return this.becca.notes[this.value];
-        }
-    }
-
-    /**
-     * @returns {BNote|null}
-     */
-    getNote() {
-        const note = this.becca.getNote(this.noteId);
-
-        if (!note) {
-            throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
-        }
-
-        return note;
-    }
-
-    /**
-     * @returns {BNote|null}
-     */
-    getTargetNote() {
-        if (this.type !== 'relation') {
-            throw new Error(`Attribute '${this.attributeId}' is not a relation.`);
-        }
-
-        if (!this.value) {
-            return null;
-        }
-
-        return this.becca.getNote(this.value);
-    }
-
-    /**
-     * @returns {boolean}
-     */
-    isDefinition() {
-        return this.type === 'label' && (this.name.startsWith('label:') || this.name.startsWith('relation:'));
-    }
-
-    getDefinition() {
-        return promotedAttributeDefinitionParser.parse(this.value);
-    }
-
-    getDefinedName() {
-        if (this.type === 'label' && this.name.startsWith('label:')) {
-            return this.name.substr(6);
-        } else if (this.type === 'label' && this.name.startsWith('relation:')) {
-            return this.name.substr(9);
-        } else {
-            return this.name;
-        }
-    }
-
-    get isDeleted() {
-        return !(this.attributeId in this.becca.attributes);
-    }
-
-    beforeSaving(opts = {}) {
-        if (!opts.skipValidation) {
-            this.validate();
-        }
-
-        this.name = sanitizeAttributeName(this.name);
-
-        if (!this.value) {
-            // null value isn't allowed
-            this.value = "";
-        }
-
-        if (this.position === undefined || this.position === null) {
-            const maxExistingPosition = this.getNote().getAttributes()
-                .reduce((maxPosition, attr) => Math.max(maxPosition, attr.position || 0), 0);
-
-            this.position = maxExistingPosition + 10;
-        }
-
-        if (!this.isInheritable) {
-            this.isInheritable = false;
-        }
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-
-        super.beforeSaving();
-
-        this.becca.attributes[this.attributeId] = this;
-    }
-
-    getPojo() {
-        return {
-            attributeId: this.attributeId,
-            noteId: this.noteId,
-            type: this.type,
-            name: this.name,
-            position: this.position,
-            value: this.value,
-            isInheritable: this.isInheritable,
-            utcDateModified: this.utcDateModified,
-            isDeleted: false
-        };
-    }
-
-    createClone(type, name, value, isInheritable) {
-        return new BAttribute({
-            noteId: this.noteId,
-            type: type,
-            name: name,
-            value: value,
-            position: this.position,
-            isInheritable: isInheritable,
-            utcDateModified: this.utcDateModified
-        });
-    }
-}
-
-module.exports = BAttribute;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_bblob.js.html b/docs/backend_api/becca_entities_bblob.js.html deleted file mode 100644 index ec5a78fb5..000000000 --- a/docs/backend_api/becca_entities_bblob.js.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - JSDoc: Source: becca/entities/bblob.js - - - - - - - - - - -
- -

Source: becca/entities/bblob.js

- - - - - - -
-
-
class BBlob {
-    static get entityName() { return "blobs"; }
-    static get primaryKeyName() { return "blobId"; }
-    static get hashedProperties() { return ["blobId", "content"]; }
-
-    constructor(row) {
-        /** @type {string} */
-        this.blobId = row.blobId;
-        /** @type {string|Buffer} */
-        this.content = row.content;
-        /** @type {int} */
-        this.contentLength = row.contentLength;
-        /** @type {string} */
-        this.dateModified = row.dateModified;
-        /** @type {string} */
-        this.utcDateModified = row.utcDateModified;
-    }
-
-    getPojo() {
-        return {
-            blobId: this.blobId,
-            content: this.content,
-            contentLength: this.contentLength,
-            dateModified: this.dateModified,
-            utcDateModified: this.utcDateModified
-        };
-    }
-}
-
-module.exports = BBlob;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_bbranch.js.html b/docs/backend_api/becca_entities_bbranch.js.html deleted file mode 100644 index bd629550b..000000000 --- a/docs/backend_api/becca_entities_bbranch.js.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - JSDoc: Source: becca/entities/bbranch.js - - - - - - - - - - -
- -

Source: becca/entities/bbranch.js

- - - - - - -
-
-
"use strict";
-
-const BNote = require('./bnote');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-const dateUtils = require("../../services/date_utils");
-const utils = require("../../services/utils");
-const TaskContext = require("../../services/task_context");
-const cls = require("../../services/cls");
-const log = require("../../services/log");
-
-/**
- * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
- * parents.
- *
- * Note that you should not rely on the branch's identity, since it can change easily with a note's move.
- * Always check noteId instead.
- *
- * @extends AbstractBeccaEntity
- */
-class BBranch extends AbstractBeccaEntity {
-    static get entityName() { return "branches"; }
-    static get primaryKeyName() { return "branchId"; }
-    // notePosition is not part of hash because it would produce a lot of updates in case of reordering
-    static get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "prefix"]; }
-
-    constructor(row) {
-        super();
-
-        if (!row) {
-            return;
-        }
-
-        this.updateFromRow(row);
-        this.init();
-    }
-
-    updateFromRow(row) {
-        this.update([
-            row.branchId,
-            row.noteId,
-            row.parentNoteId,
-            row.prefix,
-            row.notePosition,
-            row.isExpanded,
-            row.utcDateModified
-        ]);
-    }
-
-    update([branchId, noteId, parentNoteId, prefix, notePosition, isExpanded, utcDateModified]) {
-        /** @type {string} */
-        this.branchId = branchId;
-        /** @type {string} */
-        this.noteId = noteId;
-        /** @type {string} */
-        this.parentNoteId = parentNoteId;
-        /** @type {string|null} */
-        this.prefix = prefix;
-        /** @type {int} */
-        this.notePosition = notePosition;
-        /** @type {boolean} */
-        this.isExpanded = !!isExpanded;
-        /** @type {string} */
-        this.utcDateModified = utcDateModified;
-
-        return this;
-    }
-
-    init() {
-        if (this.branchId) {
-            this.becca.branches[this.branchId] = this;
-        }
-
-        this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;
-
-        const childNote = this.childNote;
-
-        if (!childNote.parentBranches.includes(this)) {
-            childNote.parentBranches.push(this);
-        }
-
-        if (this.noteId === 'root') {
-            return;
-        }
-
-        const parentNote = this.parentNote;
-
-        if (!childNote.parents.includes(parentNote)) {
-            childNote.parents.push(parentNote);
-        }
-
-        if (!parentNote.children.includes(childNote)) {
-            parentNote.children.push(childNote);
-        }
-    }
-
-    /** @returns {BNote} */
-    get childNote() {
-        if (!(this.noteId in this.becca.notes)) {
-            // entities can come out of order in sync/import, create skeleton which will be filled later
-            this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
-        }
-
-        return this.becca.notes[this.noteId];
-    }
-
-    /** @returns {BNote} */
-    getNote() {
-        return this.childNote;
-    }
-
-    /** @returns {BNote|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
-    get parentNote() {
-        if (!(this.parentNoteId in this.becca.notes) && this.parentNoteId !== 'none') {
-            // entities can come out of order in sync/import, create skeleton which will be filled later
-            this.becca.addNote(this.parentNoteId, new BNote({noteId: this.parentNoteId}));
-        }
-
-        return this.becca.notes[this.parentNoteId];
-    }
-
-    get isDeleted() {
-        return !(this.branchId in this.becca.branches);
-    }
-
-    /**
-     * Branch is weak when its existence should not hinder deletion of its note.
-     * As a result, note with only weak branches should be immediately deleted.
-     * An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
-     * not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
-     * of deletion should not act as a clone.
-     *
-     * @returns {boolean}
-     */
-    get isWeak() {
-        return ['_share', '_lbBookmarks'].includes(this.parentNoteId);
-    }
-
-    /**
-     * Delete a branch. If this is a last note's branch, delete the note as well.
-     *
-     * @param {string} [deleteId] - optional delete identified
-     * @param {TaskContext} [taskContext]
-     *
-     * @returns {boolean} - true if note has been deleted, false otherwise
-     */
-    deleteBranch(deleteId, taskContext) {
-        if (!deleteId) {
-            deleteId = utils.randomString(10);
-        }
-
-        if (!taskContext) {
-            taskContext = new TaskContext('no-progress-reporting');
-        }
-
-        taskContext.increaseProgressCount();
-
-        const note = this.getNote();
-
-        if (!taskContext.noteDeletionHandlerTriggered) {
-            const parentBranches = note.getParentBranches();
-
-            if (parentBranches.length === 1 && parentBranches[0] === this) {
-                // needs to be run before branches and attributes are deleted and thus attached relations disappear
-                const handlers = require("../../services/handlers");
-                handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);
-            }
-        }
-
-        if (this.noteId === 'root'
-            || this.noteId === cls.getHoistedNoteId()) {
-
-            throw new Error("Can't delete root or hoisted branch/note");
-        }
-
-        this.markAsDeleted(deleteId);
-
-        const notDeletedBranches = note.getStrongParentBranches();
-
-        if (notDeletedBranches.length === 0) {
-            for (const weakBranch of note.getParentBranches()) {
-                weakBranch.markAsDeleted(deleteId);
-            }
-
-            for (const childBranch of note.getChildBranches()) {
-                childBranch.deleteBranch(deleteId, taskContext);
-            }
-
-            // first delete children and then parent - this will show up better in recent changes
-
-            log.info(`Deleting note '${note.noteId}'`);
-
-            this.becca.notes[note.noteId].isBeingDeleted = true;
-
-            for (const attribute of note.getOwnedAttributes().slice()) {
-                attribute.markAsDeleted(deleteId);
-            }
-
-            for (const relation of note.getTargetRelations()) {
-                relation.markAsDeleted(deleteId);
-            }
-
-            for (const attachment of note.getAttachments()) {
-                attachment.markAsDeleted(deleteId);
-            }
-
-            note.markAsDeleted(deleteId);
-
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-
-    beforeSaving() {
-        if (!this.noteId || !this.parentNoteId) {
-            throw new Error(`noteId and parentNoteId are mandatory properties for Branch`);
-        }
-
-        this.branchId = `${this.parentNoteId}_${this.noteId}`;
-
-        if (this.notePosition === undefined || this.notePosition === null) {
-            let maxNotePos = 0;
-
-            for (const childBranch of this.parentNote.getChildBranches()) {
-                if (maxNotePos < childBranch.notePosition
-                    && childBranch.noteId !== '_hidden' // hidden has a very large notePosition to always stay last
-                ) {
-                    maxNotePos = childBranch.notePosition;
-                }
-            }
-
-            this.notePosition = maxNotePos + 10;
-        }
-
-        if (!this.isExpanded) {
-            this.isExpanded = false;
-        }
-
-        if (!this.prefix?.trim()) {
-            this.prefix = null;
-        }
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-
-        super.beforeSaving();
-
-        this.becca.branches[this.branchId] = this;
-    }
-
-    getPojo() {
-        return {
-            branchId: this.branchId,
-            noteId: this.noteId,
-            parentNoteId: this.parentNoteId,
-            prefix: this.prefix,
-            notePosition: this.notePosition,
-            isExpanded: this.isExpanded,
-            isDeleted: false,
-            utcDateModified: this.utcDateModified
-        };
-    }
-
-    createClone(parentNoteId, notePosition) {
-        const existingBranch = this.becca.getBranchFromChildAndParent(this.noteId, parentNoteId);
-
-        if (existingBranch) {
-            existingBranch.notePosition = notePosition;
-            return existingBranch;
-        } else {
-            return new BBranch({
-                noteId: this.noteId,
-                parentNoteId: parentNoteId,
-                notePosition: notePosition,
-                prefix: this.prefix,
-                isExpanded: this.isExpanded
-            });
-        }
-    }
-}
-
-module.exports = BBranch;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_betapi_token.js.html b/docs/backend_api/becca_entities_betapi_token.js.html deleted file mode 100644 index 86fdd163a..000000000 --- a/docs/backend_api/becca_entities_betapi_token.js.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - JSDoc: Source: becca/entities/betapi_token.js - - - - - - - - - - -
- -

Source: becca/entities/betapi_token.js

- - - - - - -
-
-
"use strict";
-
-const dateUtils = require('../../services/date_utils');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-
-/**
- * EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
- * Used by:
- * - Trilium Sender
- * - ETAPI clients
- *
- * The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
- * from tokenHash and token.
- *
- * @extends AbstractBeccaEntity
- */
-class BEtapiToken extends AbstractBeccaEntity {
-    static get entityName() { return "etapi_tokens"; }
-    static get primaryKeyName() { return "etapiTokenId"; }
-    static get hashedProperties() { return ["etapiTokenId", "name", "tokenHash", "utcDateCreated", "utcDateModified", "isDeleted"]; }
-
-    constructor(row) {
-        super();
-
-        if (!row) {
-            return;
-        }
-
-        this.updateFromRow(row);
-        this.init();
-    }
-
-    updateFromRow(row) {
-        /** @type {string} */
-        this.etapiTokenId = row.etapiTokenId;
-        /** @type {string} */
-        this.name = row.name;
-        /** @type {string} */
-        this.tokenHash = row.tokenHash;
-        /** @type {string} */
-        this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();
-        /** @type {string} */
-        this.utcDateModified = row.utcDateModified || this.utcDateCreated;
-        /** @type {boolean} */
-        this.isDeleted = !!row.isDeleted;
-
-        if (this.etapiTokenId) {
-            this.becca.etapiTokens[this.etapiTokenId] = this;
-        }
-    }
-
-    init() {
-        if (this.etapiTokenId) {
-            this.becca.etapiTokens[this.etapiTokenId] = this;
-        }
-    }
-
-    getPojo() {
-        return {
-            etapiTokenId: this.etapiTokenId,
-            name: this.name,
-            tokenHash: this.tokenHash,
-            utcDateCreated: this.utcDateCreated,
-            utcDateModified: this.utcDateModified,
-            isDeleted: this.isDeleted
-        }
-    }
-
-    beforeSaving() {
-        this.utcDateModified = dateUtils.utcNowDateTime();
-
-        super.beforeSaving();
-
-        this.becca.etapiTokens[this.etapiTokenId] = this;
-    }
-}
-
-module.exports = BEtapiToken;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_bnote.js.html b/docs/backend_api/becca_entities_bnote.js.html deleted file mode 100644 index 51a90a0d8..000000000 --- a/docs/backend_api/becca_entities_bnote.js.html +++ /dev/null @@ -1,1779 +0,0 @@ - - - - - JSDoc: Source: becca/entities/bnote.js - - - - - - - - - - -
- -

Source: becca/entities/bnote.js

- - - - - - -
-
-
"use strict";
-
-const protectedSessionService = require('../../services/protected_session');
-const log = require('../../services/log');
-const sql = require('../../services/sql');
-const utils = require('../../services/utils');
-const dateUtils = require('../../services/date_utils');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-const BRevision = require("./brevision");
-const BAttachment = require("./battachment");
-const TaskContext = require("../../services/task_context");
-const dayjs = require("dayjs");
-const utc = require('dayjs/plugin/utc');
-const eventService = require("../../services/events");
-dayjs.extend(utc);
-
-const LABEL = 'label';
-const RELATION = 'relation';
-
-/**
- * There are many different Note types, some of which are entirely opaque to the
- * end user. Those types should be used only for checking against, they are
- * not for direct use.
- * @typedef {"file" | "image" | "search" | "noteMap" | "launcher" | "doc" | "contentWidget" | "text" | "relationMap" | "render" | "canvas" | "mermaid" | "book" | "webView" | "code"} NoteType
- */
-
-/**
- * @typedef {Object} NotePathRecord
- * @property {boolean} isArchived
- * @property {boolean} isInHoistedSubTree
- * @property {Array<string>} notePath
- * @property {boolean} isHidden
- */
-
-/**
- * Trilium's main entity, which can represent text note, image, code note, file attachment etc.
- *
- * @extends AbstractBeccaEntity
- */
-class BNote extends AbstractBeccaEntity {
-    static get entityName() { return "notes"; }
-    static get primaryKeyName() { return "noteId"; }
-    static get hashedProperties() { return ["noteId", "title", "isProtected", "type", "mime", "blobId"]; }
-
-    constructor(row) {
-        super();
-
-        if (!row) {
-            return;
-        }
-
-        this.updateFromRow(row);
-        this.init();
-    }
-
-    updateFromRow(row) {
-        this.update([
-            row.noteId,
-            row.title,
-            row.type,
-            row.mime,
-            row.isProtected,
-            row.blobId,
-            row.dateCreated,
-            row.dateModified,
-            row.utcDateCreated,
-            row.utcDateModified
-        ]);
-    }
-
-    update([noteId, title, type, mime, isProtected, blobId, dateCreated, dateModified, utcDateCreated, utcDateModified]) {
-        // ------ Database persisted attributes ------
-
-        /** @type {string} */
-        this.noteId = noteId;
-        /** @type {string} */
-        this.title = title;
-        /** @type {NoteType} */
-        this.type = type;
-        /** @type {string} */
-        this.mime = mime;
-        /** @type {boolean} */
-        this.isProtected = !!isProtected;
-        /** @type {string} */
-        this.blobId = blobId;
-        /** @type {string} */
-        this.dateCreated = dateCreated || dateUtils.localNowDateTime();
-        /** @type {string} */
-        this.dateModified = dateModified;
-        /** @type {string} */
-        this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();
-        /** @type {string} */
-        this.utcDateModified = utcDateModified;
-        /**
-         * set during the deletion operation, before it is completed (removed from becca completely)
-         * @type {boolean}
-         */
-        this.isBeingDeleted = false;
-
-        // ------ Derived attributes ------
-
-        /** @type {boolean} */
-        this.isDecrypted = !this.noteId || !this.isProtected;
-
-        this.decrypt();
-
-        /** @type {string|null} */
-        this.__flatTextCache = null;
-
-        return this;
-    }
-
-    init() {
-        /** @type {BBranch[]}
-         * @private */
-        this.parentBranches = [];
-        /** @type {BNote[]}
-         * @private */
-        this.parents = [];
-        /** @type {BNote[]}
-         * @private */
-        this.children = [];
-        /** @type {BAttribute[]}
-         * @private */
-        this.ownedAttributes = [];
-
-        /** @type {BAttribute[]|null}
-         * @private */
-        this.__attributeCache = null;
-        /** @type {BAttribute[]|null}
-         * @private */
-        this.__inheritableAttributeCache = null;
-
-        /** @type {BAttribute[]}
-         * @private */
-        this.targetRelations = [];
-
-        this.becca.addNote(this.noteId, this);
-
-        /** @type {BNote[]|null}
-         * @private */
-        this.__ancestorCache = null;
-
-        // following attributes are filled during searching in the database
-
-        /**
-         * size of the content in bytes
-         * @type {int|null}
-         * @private
-         */
-        this.contentSize = null;
-        /**
-         * size of the note content, attachment contents in bytes
-         * @type {int|null}
-         * @private
-         */
-        this.contentAndAttachmentsSize = null;
-        /**
-         * size of the note content, attachment contents and revision contents in bytes
-         * @type {int|null}
-         * @private
-         */
-        this.contentAndAttachmentsAndRevisionsSize = null;
-        /**
-         * number of note revisions for this note
-         * @type {int|null}
-         * @private
-         */
-        this.revisionCount = null;
-    }
-
-    isContentAvailable() {
-        return !this.noteId // new note which was not encrypted yet
-            || !this.isProtected
-            || protectedSessionService.isProtectedSessionAvailable()
-    }
-
-    getTitleOrProtected() {
-        return this.isContentAvailable() ? this.title : '[protected]';
-    }
-
-    /** @returns {BBranch[]} */
-    getParentBranches() {
-        return this.parentBranches;
-    }
-
-    /**
-     * Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.
-     *
-     * @returns {BBranch[]}
-     */
-    getStrongParentBranches() {
-        return this.getParentBranches().filter(branch => !branch.isWeak);
-    }
-
-    /**
-     * @returns {BBranch[]}
-     * @deprecated use getParentBranches() instead
-     */
-    getBranches() {
-        return this.parentBranches;
-    }
-
-    /** @returns {BNote[]} */
-    getParentNotes() {
-        return this.parents;
-    }
-
-    /** @returns {BNote[]} */
-    getChildNotes() {
-        return this.children;
-    }
-
-    /** @returns {boolean} */
-    hasChildren() {
-        return this.children && this.children.length > 0;
-    }
-
-    /** @returns {BBranch[]} */
-    getChildBranches() {
-        return this.children.map(childNote => this.becca.getBranchFromChildAndParent(childNote.noteId, this.noteId));
-    }
-
-    /*
-     * 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}  */
-    getContent() {
-        return this._getContent();
-    }
-
-    /**
-     * @returns {*}
-     * @throws Error in case of invalid JSON */
-    getJsonContent() {
-        const content = this.getContent();
-
-        if (!content || !content.trim()) {
-            return null;
-        }
-
-        return JSON.parse(content);
-    }
-
-    /** @returns {*|null} valid object or null if the content cannot be parsed as JSON */
-    getJsonContentSafely() {
-        try {
-            return this.getJsonContent();
-        }
-        catch (e) {
-            return null;
-        }
-    }
-
-    /**
-     * @param content
-     * @param {object} [opts]
-     * @param {object} [opts.forceSave=false] - will also save this BNote entity
-     * @param {object} [opts.forceFrontendReload=false] - override frontend heuristics on when to reload, instruct to reload
-     */
-    setContent(content, opts) {
-        this._setContent(content, opts);
-
-        eventService.emit(eventService.NOTE_CONTENT_CHANGE, { entity: this });
-    }
-
-    setJsonContent(content) {
-        this.setContent(JSON.stringify(content, null, '\t'));
-    }
-
-    get dateCreatedObj() {
-        return this.dateCreated === null ? null : dayjs(this.dateCreated);
-    }
-
-    get utcDateCreatedObj() {
-        return this.utcDateCreated === null ? null : dayjs.utc(this.utcDateCreated);
-    }
-
-    get dateModifiedObj() {
-        return this.dateModified === null ? null : dayjs(this.dateModified);
-    }
-
-    get utcDateModifiedObj() {
-        return this.utcDateModified === null ? null : dayjs.utc(this.utcDateModified);
-    }
-
-    /** @returns {boolean} true if this note is the root of the note tree. Root note has "root" noteId */
-    isRoot() {
-        return this.noteId === 'root';
-    }
-
-    /** @returns {boolean} true if this note is of application/json content type */
-    isJson() {
-        return this.mime === "application/json";
-    }
-
-    /** @returns {boolean} true if this note is JavaScript (code or attachment) */
-    isJavaScript() {
-        return (this.type === "code" || this.type === "file" || this.type === 'launcher')
-            && (this.mime.startsWith("application/javascript")
-                || this.mime === "application/x-javascript"
-                || this.mime === "text/javascript");
-    }
-
-    /** @returns {boolean} true if this note is HTML */
-    isHtml() {
-        return ["code", "file", "render"].includes(this.type)
-            && this.mime === "text/html";
-    }
-
-    /** @returns {boolean} true if this note is an image */
-    isImage() {
-        return this.type === 'image'
-            || (this.type === 'file' && this.mime?.startsWith('image/'));
-    }
-
-    /** @deprecated use hasStringContent() instead */
-    isStringNote() {
-        return this.hasStringContent();
-    }
-
-    /** @returns {boolean} true if the note has string content (not binary) */
-    hasStringContent() {
-        return utils.isStringNote(this.type, this.mime);
-    }
-
-    /** @returns {string|null} JS script environment - either "frontend" or "backend" */
-    getScriptEnv() {
-        if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith('env=frontend'))) {
-            return "frontend";
-        }
-
-        if (this.type === 'render') {
-            return "frontend";
-        }
-
-        if (this.isJavaScript() && this.mime.endsWith('env=backend')) {
-            return "backend";
-        }
-
-        return null;
-    }
-
-    /**
-     * Beware that the method must not create a copy of the array, but actually returns its internal array
-     * (for performance reasons)
-     *
-     * @param {string} [type] - (optional) attribute type to filter
-     * @param {string} [name] - (optional) attribute name to filter
-     * @returns {BAttribute[]} all note's attributes, including inherited ones
-     */
-    getAttributes(type, name) {
-        this.__validateTypeName(type, name);
-        this.__ensureAttributeCacheIsAvailable();
-
-        if (type && name) {
-            return this.__attributeCache.filter(attr => attr.name === name && attr.type === type);
-        }
-        else if (type) {
-            return this.__attributeCache.filter(attr => attr.type === type);
-        }
-        else if (name) {
-            return this.__attributeCache.filter(attr => attr.name === name);
-        }
-        else {
-            return this.__attributeCache;
-        }
-    }
-
-    /** @private */
-    __ensureAttributeCacheIsAvailable() {
-        if (!this.__attributeCache) {
-            this.__getAttributes([]);
-        }
-    }
-
-    /** @private */
-    __getAttributes(path) {
-        if (path.includes(this.noteId)) {
-            return [];
-        }
-
-        if (!this.__attributeCache) {
-            const parentAttributes = this.ownedAttributes.slice();
-            const newPath = [...path, this.noteId];
-
-            // inheritable attrs on root are typically not intended to be applied to hidden subtree #3537
-            if (this.noteId !== 'root' && this.noteId !== '_hidden') {
-                for (const parentNote of this.parents) {
-                    parentAttributes.push(...parentNote.__getInheritableAttributes(newPath));
-                }
-            }
-
-            const templateAttributes = [];
-
-            for (const ownedAttr of parentAttributes) { // parentAttributes so we process also inherited templates
-                if (ownedAttr.type === 'relation' && ['template', 'inherit'].includes(ownedAttr.name)) {
-                    const templateNote = this.becca.notes[ownedAttr.value];
-
-                    if (templateNote) {
-                        templateAttributes.push(
-                            ...templateNote.__getAttributes(newPath)
-                                // template attr is used as a marker for templates, but it's not meant to be inherited
-                                .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate')))
-                        );
-                    }
-                }
-            }
-
-            this.__attributeCache = [];
-
-            const addedAttributeIds = new Set();
-
-            for (const attr of parentAttributes.concat(templateAttributes)) {
-                if (!addedAttributeIds.has(attr.attributeId)) {
-                    addedAttributeIds.add(attr.attributeId);
-
-                    this.__attributeCache.push(attr);
-                }
-            }
-
-            this.__inheritableAttributeCache = [];
-
-            for (const attr of this.__attributeCache) {
-                if (attr.isInheritable) {
-                    this.__inheritableAttributeCache.push(attr);
-                }
-            }
-        }
-
-        return this.__attributeCache;
-    }
-
-    /**
-     * @private
-     * @returns {BAttribute[]}
-     */
-    __getInheritableAttributes(path) {
-        if (path.includes(this.noteId)) {
-            return [];
-        }
-
-        if (!this.__inheritableAttributeCache) {
-            this.__getAttributes(path); // will refresh also this.__inheritableAttributeCache
-        }
-
-        return this.__inheritableAttributeCache;
-    }
-
-    __validateTypeName(type, name) {
-        if (type && type !== 'label' && type !== 'relation') {
-            throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);
-        }
-
-        if (name) {
-            const firstLetter = name.charAt(0);
-            if (firstLetter === '#' || firstLetter === '~') {
-                throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);
-            }
-        }
-    }
-
-    /**
-     * @param type
-     * @param name
-     * @param [value]
-     * @returns {boolean}
-     */
-    hasAttribute(type, name, value = null) {
-        return !!this.getAttributes().find(attr =>
-            attr.name === name
-            && (value === undefined || value === null || attr.value === value)
-            && attr.type === type
-        );
-    }
-
-    getAttributeCaseInsensitive(type, name, value) {
-        name = name.toLowerCase();
-        value = value ? value.toLowerCase() : null;
-
-        return this.getAttributes().find(
-            attr => attr.name.toLowerCase() === name
-            && (!value || attr.value.toLowerCase() === value)
-            && attr.type === type);
-    }
-
-    getRelationTarget(name) {
-        const relation = this.getAttributes().find(attr => attr.name === name && attr.type === 'relation');
-
-        return relation ? relation.targetNote : null;
-    }
-
-    /**
-     * @param {string} name - label name
-     * @param {string} [value] - label value
-     * @returns {boolean} true if label exists (including inherited)
-     */
-    hasLabel(name, value) { return this.hasAttribute(LABEL, name, value); }
-
-    /**
-     * @param {string} name - label name
-     * @returns {boolean} true if label exists (including inherited) and does not have "false" value.
-     */
-    isLabelTruthy(name) {
-        const label = this.getLabel(name);
-
-        if (!label) {
-            return false;
-        }
-
-        return label && label.value !== 'false';
-    }
-
-    /**
-     * @param {string} name - label name
-     * @param {string} [value] - label value
-     * @returns {boolean} true if label exists (excluding inherited)
-     */
-    hasOwnedLabel(name, value) { return this.hasOwnedAttribute(LABEL, name, value); }
-
-    /**
-     * @param {string} name - relation name
-     * @param {string} [value] - relation value
-     * @returns {boolean} true if relation exists (including inherited)
-     */
-    hasRelation(name, value) { return this.hasAttribute(RELATION, name, value); }
-
-    /**
-     * @param {string} name - relation name
-     * @param {string} [value] - relation value
-     * @returns {boolean} true if relation exists (excluding inherited)
-     */
-    hasOwnedRelation(name, value) { return this.hasOwnedAttribute(RELATION, name, value); }
-
-    /**
-     * @param {string} name - label name
-     * @returns {BAttribute|null} label if it exists, null otherwise
-     */
-    getLabel(name) { return this.getAttribute(LABEL, name); }
-
-    /**
-     * @param {string} name - label name
-     * @returns {BAttribute|null} label if it exists, null otherwise
-     */
-    getOwnedLabel(name) { return this.getOwnedAttribute(LABEL, name); }
-
-    /**
-     * @param {string} name - relation name
-     * @returns {BAttribute|null} relation if it exists, null otherwise
-     */
-    getRelation(name) { return this.getAttribute(RELATION, name); }
-
-    /**
-     * @param {string} name - relation name
-     * @returns {BAttribute|null} relation if it exists, null otherwise
-     */
-    getOwnedRelation(name) { return this.getOwnedAttribute(RELATION, name); }
-
-    /**
-     * @param {string} name - label name
-     * @returns {string|null} label value if label exists, null otherwise
-     */
-    getLabelValue(name) { return this.getAttributeValue(LABEL, name); }
-
-    /**
-     * @param {string} name - label name
-     * @returns {string|null} label value if label exists, null otherwise
-     */
-    getOwnedLabelValue(name) { return this.getOwnedAttributeValue(LABEL, name); }
-
-    /**
-     * @param {string} name - relation name
-     * @returns {string|null} relation value if relation exists, null otherwise
-     */
-    getRelationValue(name) { return this.getAttributeValue(RELATION, name); }
-
-    /**
-     * @param {string} name - relation name
-     * @returns {string|null} relation value if relation exists, null otherwise
-     */
-    getOwnedRelationValue(name) { return this.getOwnedAttributeValue(RELATION, name); }
-
-    /**
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value
-     * @returns {boolean} true if note has an attribute with given type and name (excluding inherited)
-     */
-    hasOwnedAttribute(type, name, value) {
-        return !!this.getOwnedAttribute(type, name, value);
-    }
-
-    /**
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - 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.
-     */
-    getAttribute(type, name) {
-        const attributes = this.getAttributes();
-
-        return attributes.find(attr => attr.name === name && attr.type === type);
-    }
-
-    /**
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - attribute name
-     * @returns {string|null} attribute value of given type and name or null if no such attribute exists.
-     */
-    getAttributeValue(type, name) {
-        const attr = this.getAttribute(type, name);
-
-        return attr ? attr.value : null;
-    }
-
-    /**
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - attribute name
-     * @returns {string|null} attribute value of given type and name or null if no such attribute exists.
-     */
-    getOwnedAttributeValue(type, name) {
-        const attr = this.getOwnedAttribute(type, name);
-
-        return attr ? attr.value : null;
-    }
-
-    /**
-     * @param {string} [name] - label name to filter
-     * @returns {BAttribute[]} all note's labels (attributes with type label), including inherited ones
-     */
-    getLabels(name) {
-        return this.getAttributes(LABEL, name);
-    }
-
-    /**
-     * @param {string} [name] - label name to filter
-     * @returns {string[]} all note's label values, including inherited ones
-     */
-    getLabelValues(name) {
-        return this.getLabels(name).map(l => l.value);
-    }
-
-    /**
-     * @param {string} [name] - label name to filter
-     * @returns {BAttribute[]} all note's labels (attributes with type label), excluding inherited ones
-     */
-    getOwnedLabels(name) {
-        return this.getOwnedAttributes(LABEL, name);
-    }
-
-    /**
-     * @param {string} [name] - label name to filter
-     * @returns {string[]} all note's label values, excluding inherited ones
-     */
-    getOwnedLabelValues(name) {
-        return this.getOwnedAttributes(LABEL, name).map(l => l.value);
-    }
-
-    /**
-     * @param {string} [name] - relation name to filter
-     * @returns {BAttribute[]} all note's relations (attributes with type relation), including inherited ones
-     */
-    getRelations(name) {
-        return this.getAttributes(RELATION, name);
-    }
-
-    /**
-     * @param {string} [name] - relation name to filter
-     * @returns {BAttribute[]} all note's relations (attributes with type relation), excluding inherited ones
-     */
-    getOwnedRelations(name) {
-        return this.getOwnedAttributes(RELATION, name);
-    }
-
-    /**
-     * Beware that the method must not create a copy of the array, but actually returns its internal array
-     * (for performance reasons)
-     *
-     * @param {string|null} [type] - (optional) attribute type to filter
-     * @param {string|null} [name] - (optional) attribute name to filter
-     * @param {string|null} [value] - (optional) attribute value to filter
-     * @returns {BAttribute[]} note's "owned" attributes - excluding inherited ones
-     */
-    getOwnedAttributes(type = null, name = null, value = null) {
-        this.__validateTypeName(type, name);
-
-        if (type && name && value !== undefined && value !== null) {
-            return this.ownedAttributes.filter(attr => attr.name === name && attr.value === value && attr.type === type);
-        }
-        else if (type && name) {
-            return this.ownedAttributes.filter(attr => attr.name === name && attr.type === type);
-        }
-        else if (type) {
-            return this.ownedAttributes.filter(attr => attr.type === type);
-        }
-        else if (name) {
-            return this.ownedAttributes.filter(attr => attr.name === name);
-        }
-        else {
-            return this.ownedAttributes;
-        }
-    }
-
-    /**
-     * @returns {BAttribute} attribute belonging to this specific note (excludes inherited attributes)
-     *
-     * This method can be significantly faster than the getAttribute()
-     */
-    getOwnedAttribute(type, name, value = null) {
-        const attrs = this.getOwnedAttributes(type, name, value);
-
-        return attrs.length > 0 ? attrs[0] : null;
-    }
-
-    get isArchived() {
-        return this.hasAttribute('label', 'archived');
-    }
-
-    areAllNotePathsArchived() {
-        // there's a slight difference between note being itself archived and all its note paths being archived
-        // - note is archived when it itself has an archived label or inherits it
-        // - note does not have or inherit archived label, but each note path contains a note with (non-inheritable)
-        //   archived label
-
-        const bestNotePathRecord = this.getSortedNotePathRecords()[0];
-
-        if (!bestNotePathRecord) {
-            throw new Error(`No note path available for note '${this.noteId}'`);
-        }
-
-        return bestNotePathRecord.isArchived;
-    }
-
-    hasInheritableArchivedLabel() {
-        for (const attr of this.getAttributes()) {
-            if (attr.name === 'archived' && attr.type === LABEL && attr.isInheritable) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    // will sort the parents so that the non-archived are first and archived at the end
-    // this is done so that the non-archived paths are always explored as first when looking for note path
-    sortParents() {
-        this.parentBranches.sort((a, b) => {
-            if (a.parentNote?.isArchived) {
-                return 1;
-            } else if (a.parentNote?.isHiddenCompletely()) {
-                return 1;
-            } else {
-                return 0;
-            }
-        });
-
-        this.parents = this.parentBranches
-            .map(branch => branch.parentNote)
-            .filter(note => !!note);
-    }
-
-    sortChildren() {
-        if (this.children.length === 0) {
-            return;
-        }
-
-        const becca = this.becca;
-
-        this.children.sort((a, b) => {
-            const aBranch = becca.getBranchFromChildAndParent(a.noteId, this.noteId);
-            const bBranch = becca.getBranchFromChildAndParent(b.noteId, this.noteId);
-
-            return (aBranch?.notePosition - bBranch?.notePosition) || 0;
-        });
-    }
-
-    /**
-     * This is used for:
-     * - fast searching
-     * - note similarity evaluation
-     *
-     * @returns {string} - returns flattened textual representation of note, prefixes and attributes
-     */
-    getFlatText() {
-        if (!this.__flatTextCache) {
-            this.__flatTextCache = `${this.noteId} ${this.type} ${this.mime} `;
-
-            for (const branch of this.parentBranches) {
-                if (branch.prefix) {
-                    this.__flatTextCache += `${branch.prefix} `;
-                }
-            }
-
-            this.__flatTextCache += `${this.title} `;
-
-            for (const attr of this.getAttributes()) {
-                // it's best to use space as separator since spaces are filtered from the search string by the tokenization into words
-                this.__flatTextCache += `${attr.type === 'label' ? '#' : '~'}${attr.name}`;
-
-                if (attr.value) {
-                    this.__flatTextCache += `=${attr.value}`;
-                }
-
-                this.__flatTextCache += ' ';
-            }
-
-            this.__flatTextCache = utils.normalize(this.__flatTextCache);
-        }
-
-        return this.__flatTextCache;
-    }
-
-    invalidateThisCache() {
-        this.__flatTextCache = null;
-
-        this.__attributeCache = null;
-        this.__inheritableAttributeCache = null;
-        this.__ancestorCache = null;
-    }
-
-    invalidateSubTree(path = []) {
-        if (path.includes(this.noteId)) {
-            return;
-        }
-
-        this.invalidateThisCache();
-
-        if (this.children.length || this.targetRelations.length) {
-            path = [...path, this.noteId];
-        }
-
-        for (const childNote of this.children) {
-            childNote.invalidateSubTree(path);
-        }
-
-        for (const targetRelation of this.targetRelations) {
-            if (targetRelation.name === 'template' || targetRelation.name === 'inherit') {
-                const note = targetRelation.note;
-
-                if (note) {
-                    note.invalidateSubTree(path);
-                }
-            }
-        }
-    }
-
-    getRelationDefinitions() {
-        return this.getLabels()
-            .filter(l => l.name.startsWith("relation:"));
-    }
-
-    getLabelDefinitions() {
-        return this.getLabels()
-            .filter(l => l.name.startsWith("relation:"));
-    }
-
-    isInherited() {
-        return !!this.targetRelations.find(rel => rel.name === 'template' || rel.name === 'inherit');
-    }
-
-    /** @returns {BNote[]} */
-    getSubtreeNotesIncludingTemplated() {
-        const set = new Set();
-
-        function inner(note) {
-            // _hidden is not counted as subtree for the purpose of inheritance
-            if (set.has(note) || note.noteId === '_hidden') {
-                return;
-            }
-
-            set.add(note);
-
-            for (const childNote of note.children) {
-                inner(childNote);
-            }
-
-            for (const targetRelation of note.targetRelations) {
-                if (targetRelation.name === 'template' || targetRelation.name === 'inherit') {
-                    const targetNote = targetRelation.note;
-
-                    if (targetNote) {
-                        inner(targetNote);
-                    }
-                }
-            }
-        }
-
-        inner(this);
-
-        return Array.from(set);
-    }
-
-    /** @returns {BNote[]} */
-    getSearchResultNotes() {
-        if (this.type !== 'search') {
-            return [];
-        }
-
-        try {
-            const searchService = require("../../services/search/services/search");
-            const {searchResultNoteIds} = searchService.searchFromNote(this);
-
-            const becca = this.becca;
-            return searchResultNoteIds
-                .map(resultNoteId => becca.notes[resultNoteId])
-                .filter(note => !!note);
-        }
-        catch (e) {
-            log.error(`Could not resolve search note ${this.noteId}: ${e.message}`);
-            return [];
-        }
-    }
-
-    /**
-     * @returns {{notes: BNote[], relationships: Array.<{parentNoteId: string, childNoteId: string}>}}
-     */
-    getSubtree({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {
-        const noteSet = new Set();
-        const relationships = []; // list of tuples parentNoteId -> childNoteId
-
-        function resolveSearchNote(searchNote) {
-            try {
-                for (const resultNote of searchNote.getSearchResultNotes()) {
-                    addSubtreeNotesInner(resultNote, searchNote);
-                }
-            }
-            catch (e) {
-                log.error(`Could not resolve search note ${searchNote?.noteId}: ${e.message}`);
-            }
-        }
-
-        function addSubtreeNotesInner(note, parentNote = null) {
-            if (note.noteId === '_hidden' && !includeHidden) {
-                return;
-            }
-
-            if (parentNote) {
-                // this needs to happen first before noteSet check to include all clone relationships
-                relationships.push({
-                    parentNoteId: parentNote.noteId,
-                    childNoteId: note.noteId
-                });
-            }
-
-            if (noteSet.has(note)) {
-                return;
-            }
-
-            if (!includeArchived && note.isArchived) {
-                return;
-            }
-
-            noteSet.add(note);
-
-            if (note.type === 'search') {
-                if (resolveSearch) {
-                    resolveSearchNote(note);
-                }
-            }
-            else {
-                for (const childNote of note.children) {
-                    addSubtreeNotesInner(childNote, note);
-                }
-            }
-        }
-
-        addSubtreeNotesInner(this);
-
-        return {
-            notes: Array.from(noteSet),
-            relationships
-        };
-    }
-
-    /** @returns {string[]} - includes the subtree root note as well */
-    getSubtreeNoteIds({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {
-        return this.getSubtree({includeArchived, includeHidden, resolveSearch})
-            .notes
-            .map(note => note.noteId);
-    }
-
-    /** @deprecated use getSubtreeNoteIds() instead */
-    getDescendantNoteIds() {
-        return this.getSubtreeNoteIds();
-    }
-
-    get parentCount() {
-        return this.parents.length;
-    }
-
-    get childrenCount() {
-        return this.children.length;
-    }
-
-    get labelCount() {
-        return this.getAttributes().filter(attr => attr.type === 'label').length;
-    }
-
-    get ownedLabelCount() {
-        return this.ownedAttributes.filter(attr => attr.type === 'label').length;
-    }
-
-    get relationCount() {
-        return this.getAttributes().filter(attr => attr.type === 'relation' && !attr.isAutoLink()).length;
-    }
-
-    get relationCountIncludingLinks() {
-        return this.getAttributes().filter(attr => attr.type === 'relation').length;
-    }
-
-    get ownedRelationCount() {
-        return this.ownedAttributes.filter(attr => attr.type === 'relation' && !attr.isAutoLink()).length;
-    }
-
-    get ownedRelationCountIncludingLinks() {
-        return this.ownedAttributes.filter(attr => attr.type === 'relation').length;
-    }
-
-    get targetRelationCount() {
-        return this.targetRelations.filter(attr => !attr.isAutoLink()).length;
-    }
-
-    get targetRelationCountIncludingLinks() {
-        return this.targetRelations.length;
-    }
-
-    get attributeCount() {
-        return this.getAttributes().length;
-    }
-
-    get ownedAttributeCount() {
-        return this.getOwnedAttributes().length;
-    }
-
-    /** @returns {BNote[]} */
-    getAncestors() {
-        if (!this.__ancestorCache) {
-            const noteIds = new Set();
-            this.__ancestorCache = [];
-
-            for (const parent of this.parents) {
-                if (noteIds.has(parent.noteId)) {
-                    continue;
-                }
-
-                this.__ancestorCache.push(parent);
-                noteIds.add(parent.noteId);
-
-                for (const ancestorNote of parent.getAncestors()) {
-                    if (!noteIds.has(ancestorNote.noteId)) {
-                        this.__ancestorCache.push(ancestorNote);
-                        noteIds.add(ancestorNote.noteId);
-                    }
-                }
-            }
-        }
-
-        return this.__ancestorCache;
-    }
-
-    /** @returns {string[]} */
-    getAncestorNoteIds() {
-        return this.getAncestors().map(note => note.noteId);
-    }
-
-    /** @returns {boolean} */
-    hasAncestor(ancestorNoteId) {
-        for (const ancestorNote of this.getAncestors()) {
-            if (ancestorNote.noteId === ancestorNoteId) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    isInHiddenSubtree() {
-        return this.noteId === '_hidden' || this.hasAncestor('_hidden');
-    }
-
-    /** @returns {BAttribute[]} */
-    getTargetRelations() {
-        return this.targetRelations;
-    }
-
-    /** @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 */
-    getInheritingNotes() {
-        const arr = [this];
-
-        for (const targetRelation of this.targetRelations) {
-            if (targetRelation.name === 'template' || targetRelation.name === 'inherit') {
-                const note = targetRelation.note;
-
-                if (note) {
-                    arr.push(note);
-                }
-            }
-        }
-
-        return arr;
-    }
-
-    getDistanceToAncestor(ancestorNoteId) {
-        if (this.noteId === ancestorNoteId) {
-            return 0;
-        }
-
-        let minDistance = 999999;
-
-        for (const parent of this.parents) {
-            minDistance = Math.min(minDistance, parent.getDistanceToAncestor(ancestorNoteId) + 1);
-        }
-
-        return minDistance;
-    }
-
-    /** @returns {BRevision[]} */
-    getRevisions() {
-        return sql.getRows("SELECT * FROM revisions WHERE noteId = ?", [this.noteId])
-            .map(row => new BRevision(row));
-    }
-
-    /** @returns {BAttachment[]} */
-    getAttachments(opts = {}) {
-        opts.includeContentLength = !!opts.includeContentLength;
-        // from testing, it looks like calculating length does not make a difference in performance even on large-ish DB
-        // given that we're always fetching attachments only for a specific note, we might just do it always
-
-        const query = opts.includeContentLength
-            ? `SELECT attachments.*, LENGTH(blobs.content) AS contentLength
-               FROM attachments 
-               JOIN blobs USING (blobId) 
-               WHERE ownerId = ? AND isDeleted = 0 
-               ORDER BY position`
-            : `SELECT * FROM attachments WHERE ownerId = ? AND isDeleted = 0 ORDER BY position`;
-
-        return sql.getRows(query, [this.noteId])
-            .map(row => new BAttachment(row));
-    }
-
-    /** @returns {BAttachment|null} */
-    getAttachmentById(attachmentId, opts = {}) {
-        opts.includeContentLength = !!opts.includeContentLength;
-
-        const query = opts.includeContentLength
-            ? `SELECT attachments.*, LENGTH(blobs.content) AS contentLength
-               FROM attachments 
-               JOIN blobs USING (blobId) 
-               WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`
-            : `SELECT * FROM attachments WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`;
-
-        return sql.getRows(query, [this.noteId, attachmentId])
-            .map(row => new BAttachment(row))[0];
-    }
-
-    /** @returns {BAttachment[]} */
-    getAttachmentsByRole(role) {
-        return sql.getRows(`
-                SELECT attachments.*
-                FROM attachments 
-                WHERE ownerId = ? 
-                  AND role = ?
-                  AND isDeleted = 0
-                ORDER BY position`, [this.noteId, role])
-            .map(row => new BAttachment(row));
-    }
-
-    /** @returns {BAttachment} */
-    getAttachmentByTitle(title) {
-        // cannot use SQL to filter by title since it can be encrypted
-        return this.getAttachments().filter(attachment => attachment.title === title)[0];
-    }
-
-    /**
-     * 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)
-     */
-    getAllNotePaths() {
-        if (this.noteId === 'root') {
-            return [['root']];
-        }
-
-        const parentNotes = this.getParentNotes();
-
-        const notePaths = parentNotes.length === 1
-            ? parentNotes[0].getAllNotePaths() // optimization for the most common case
-            : parentNotes.flatMap(parentNote => parentNote.getAllNotePaths());
-
-        for (const notePath of notePaths) {
-            notePath.push(this.noteId);
-        }
-
-        return notePaths;
-    }
-
-    /**
-     * @param {string} [hoistedNoteId='root']
-     * @return {Array<NotePathRecord>}
-     */
-    getSortedNotePathRecords(hoistedNoteId = 'root') {
-        const isHoistedRoot = hoistedNoteId === 'root';
-
-        const notePaths = this.getAllNotePaths().map(path => ({
-            notePath: path,
-            isInHoistedSubTree: isHoistedRoot || path.includes(hoistedNoteId),
-            isArchived: path.some(noteId => this.becca.notes[noteId].isArchived),
-            isHidden: path.includes('_hidden')
-        }));
-
-        notePaths.sort((a, b) => {
-            if (a.isInHoistedSubTree !== b.isInHoistedSubTree) {
-                return a.isInHoistedSubTree ? -1 : 1;
-            } else if (a.isArchived !== b.isArchived) {
-                return a.isArchived ? 1 : -1;
-            } else if (a.isHidden !== b.isHidden) {
-                return a.isHidden ? 1 : -1;
-            } else {
-                return a.notePath.length - b.notePath.length;
-            }
-        });
-
-        return notePaths;
-    }
-
-    /**
-     * Returns a note path considered to be the "best"
-     *
-     * @param {string} [hoistedNoteId='root']
-     * @return {string[]} array of noteIds constituting the particular note path
-     */
-    getBestNotePath(hoistedNoteId = 'root') {
-        return this.getSortedNotePathRecords(hoistedNoteId)[0]?.notePath;
-    }
-
-    /**
-     * Returns a note path considered to be the "best"
-     *
-     * @param {string} [hoistedNoteId='root']
-     * @return {string} serialized note path (e.g. 'root/a1h315/js725h')
-     */
-    getBestNotePathString(hoistedNoteId = 'root') {
-        const notePath = this.getBestNotePath(hoistedNoteId);
-
-        return notePath?.join("/");
-    }
-
-    /**
-     * @return boolean - true if there's no non-hidden path, note is not cloned to the visible tree
-     */
-    isHiddenCompletely() {
-        if (this.noteId === 'root') {
-            return false;
-        }
-
-        for (const parentNote of this.parents) {
-            if (parentNote.noteId === 'root') {
-                return false;
-            } else if (parentNote.noteId === '_hidden') {
-                continue;
-            } else if (!parentNote.isHiddenCompletely()) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * @param ancestorNoteId
-     * @returns {boolean} - true if ancestorNoteId occurs in at least one of the note's paths
-     */
-    isDescendantOfNote(ancestorNoteId) {
-        const notePaths = this.getAllNotePaths();
-
-        return notePaths.some(path => path.includes(ancestorNoteId));
-    }
-
-    /**
-     * Update's given attribute's value or creates it if it doesn't exist
-     *
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value (optional)
-     */
-    setAttribute(type, name, value) {
-        const attributes = this.getOwnedAttributes();
-        const attr = attributes.find(attr => attr.type === type && attr.name === name);
-
-        value = value?.toString() || "";
-
-        if (attr) {
-            if (attr.value !== value) {
-                attr.value = value;
-                attr.save();
-            }
-        }
-        else {
-            const BAttribute = require("./battribute");
-
-            new BAttribute({
-                noteId: this.noteId,
-                type: type,
-                name: name,
-                value: value
-            }).save();
-        }
-    }
-
-    /**
-     * Removes given attribute name-value pair if it exists.
-     *
-     * @param {string} type - attribute type (label, relation, etc.)
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value (optional)
-     */
-    removeAttribute(type, name, value) {
-        const attributes = this.getOwnedAttributes();
-
-        for (const attribute of attributes) {
-            if (attribute.type === type && attribute.name === name && (value === undefined || value === attribute.value)) {
-                attribute.markAsDeleted();
-            }
-        }
-    }
-
-    /**
-     * Adds a new attribute to this note. The attribute is saved and returned.
-     * See addLabel, addRelation for more specific methods.
-     *
-     * @param {string} type - attribute type (label / relation)
-     * @param {string} name - name of the attribute, not including the leading ~/#
-     * @param {string} [value] - value of the attribute - text for labels, target note ID for relations; optional.
-     * @param {boolean} [isInheritable=false]
-     * @param {int|null} [position]
-     * @returns {BAttribute}
-     */
-    addAttribute(type, name, value = "", isInheritable = false, position = null) {
-        const BAttribute = require("./battribute");
-
-        return new BAttribute({
-            noteId: this.noteId,
-            type: type,
-            name: name,
-            value: value,
-            isInheritable: isInheritable,
-            position: position
-        }).save();
-    }
-
-    /**
-     * Adds a new label to this note. The label attribute is saved and returned.
-     *
-     * @param {string} name - name of the label, not including the leading #
-     * @param {string} [value] - text value of the label; optional
-     * @param {boolean} [isInheritable=false]
-     * @returns {BAttribute}
-     */
-    addLabel(name, value = "", isInheritable = false) {
-        return this.addAttribute(LABEL, name, value, isInheritable);
-    }
-
-    /**
-     * Adds a new relation to this note. The relation attribute is saved and
-     * returned.
-     *
-     * @param {string} name - name of the relation, not including the leading ~
-     * @param {string} targetNoteId
-     * @param {boolean} [isInheritable=false]
-     * @returns {BAttribute}
-     */
-    addRelation(name, targetNoteId, isInheritable = false) {
-        return this.addAttribute(RELATION, name, targetNoteId, isInheritable);
-    }
-
-    /**
-     * Based on enabled, the attribute is either set or removed.
-     *
-     * @param {string} type - attribute type ('relation', 'label' etc.)
-     * @param {boolean} enabled - toggle On or Off
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value (optional)
-     */
-    toggleAttribute(type, enabled, name, value) {
-        if (enabled) {
-            this.setAttribute(type, name, value);
-        }
-        else {
-            this.removeAttribute(type, name, value);
-        }
-    }
-
-    /**
-     * Based on enabled, label is either set or removed.
-     *
-     * @param {boolean} enabled - toggle On or Off
-     * @param {string} name - label name
-     * @param {string} [value] - label value (optional)
-     */
-    toggleLabel(enabled, name, value) { return this.toggleAttribute(LABEL, enabled, name, value); }
-
-    /**
-     * Based on enabled, relation is either set or removed.
-     *
-     * @param {boolean} enabled - toggle On or Off
-     * @param {string} name - relation name
-     * @param {string} [value] - relation value (noteId)
-     */
-    toggleRelation(enabled, name, value) { return this.toggleAttribute(RELATION, enabled, name, value); }
-
-    /**
-     * Update's given label's value or creates it if it doesn't exist
-     *
-     * @param {string} name - label name
-     * @param {string} [value] - label value
-     */
-    setLabel(name, value) { return this.setAttribute(LABEL, name, value); }
-
-    /**
-     * Update's given relation's value or creates it if it doesn't exist
-     *
-     * @param {string} name - relation name
-     * @param {string} value - relation value (noteId)
-     */
-    setRelation(name, value) { return this.setAttribute(RELATION, name, value); }
-
-    /**
-     * Remove label name-value pair, if it exists.
-     *
-     * @param {string} name - label name
-     * @param {string} [value] - label value
-     */
-    removeLabel(name, value) { return this.removeAttribute(LABEL, name, value); }
-
-    /**
-     * Remove the relation name-value pair, if it exists.
-     *
-     * @param {string} name - relation name
-     * @param {string} [value] - relation value (noteId)
-     */
-    removeRelation(name, value) { return this.removeAttribute(RELATION, name, value); }
-
-    searchNotesInSubtree(searchString) {
-        const searchService = require("../../services/search/services/search");
-
-        return searchService.searchNotes(searchString);
-    }
-
-    searchNoteInSubtree(searchString) {
-        return this.searchNotesInSubtree(searchString)[0];
-    }
-
-    /**
-     * @param parentNoteId
-     * @returns {{success: boolean, message: string, branchId: string, notePath: string}}
-     */
-    cloneTo(parentNoteId) {
-        const cloningService = require("../../services/cloning");
-
-        const branch = this.becca.getNote(parentNoteId).getParentBranches()[0];
-
-        return cloningService.cloneNoteToBranch(this.noteId, branch.branchId);
-    }
-
-    isEligibleForConversionToAttachment(opts = {autoConversion: false}) {
-        if (this.type !== 'image' || !this.isContentAvailable() || this.hasChildren() || this.getParentBranches().length !== 1) {
-            return false;
-        }
-
-        const targetRelations = this.getTargetRelations().filter(relation => relation.name === 'imageLink');
-
-        if (opts.autoConversion && targetRelations.length === 0) {
-            return false;
-        } else if (targetRelations.length > 1) {
-            return false;
-        }
-
-        const parentNote = this.getParentNotes()[0]; // at this point note can have only one parent
-        const referencingNote = targetRelations[0]?.getNote();
-
-        if (referencingNote && parentNote !== referencingNote) {
-            return false;
-        } else if (parentNote.type !== 'text' || !parentNote.isContentAvailable()) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * 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.
-     *
-     * @params {Object} [opts]
-     * @params {bolean} [opts.autoConversion=false} if true, the action is not triggered by user, but e.g. by migration,
-     *                                              and only perfect candidates will be migrated
-     *
-     * @returns {BAttachment|null} - null if note is not eligible for conversion
-     */
-    convertToParentAttachment(opts = {autoConversion: false}) {
-        if (!this.isEligibleForConversionToAttachment(opts)) {
-            return null;
-        }
-
-        const content = this.getContent();
-
-        const parentNote = this.getParentNotes()[0];
-        const attachment = parentNote.saveAttachment({
-            role: 'image',
-            mime: this.mime,
-            title: this.title,
-            content: content
-        });
-
-        let parentContent = parentNote.getContent();
-
-        const oldNoteUrl = `api/images/${this.noteId}/`;
-        const newAttachmentUrl = `api/attachments/${attachment.attachmentId}/image/`;
-
-        const fixedContent = utils.replaceAll(parentContent, oldNoteUrl, newAttachmentUrl);
-
-        parentNote.setContent(fixedContent);
-
-        const noteService = require("../../services/notes");
-        noteService.asyncPostProcessContent(parentNote, fixedContent); // to mark an unused attachment for deletion
-
-        this.deleteNote();
-
-        return attachment;
-    }
-
-    /**
-     * (Soft) delete a note and all its descendants.
-     *
-     * @param {string} [deleteId=null] - optional delete identified
-     * @param {TaskContext} [taskContext]
-     */
-    deleteNote(deleteId = null, taskContext = null) {
-        if (this.isDeleted) {
-            return;
-        }
-
-        if (!deleteId) {
-            deleteId = utils.randomString(10);
-        }
-
-        if (!taskContext) {
-            taskContext = new TaskContext('no-progress-reporting');
-        }
-
-        // needs to be run before branches and attributes are deleted and thus attached relations disappear
-        const handlers = require("../../services/handlers");
-        handlers.runAttachedRelations(this, 'runOnNoteDeletion', this);
-        taskContext.noteDeletionHandlerTriggered = true;
-
-        for (const branch of this.getParentBranches()) {
-            branch.deleteBranch(deleteId, taskContext);
-        }
-    }
-
-    decrypt() {
-        if (this.isProtected && !this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {
-            try {
-                this.title = protectedSessionService.decryptString(this.title);
-                this.__flatTextCache = null;
-
-                this.isDecrypted = true;
-            }
-            catch (e) {
-                log.error(`Could not decrypt note ${this.noteId}: ${e.message} ${e.stack}`);
-            }
-        }
-    }
-
-    isLaunchBarConfig() {
-        return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);
-    }
-
-    isOptions() {
-        return this.noteId.startsWith("_options");
-    }
-
-    get isDeleted() {
-        // isBeingDeleted is relevant only in the transition period when the deletion process has begun, but not yet
-        // finished (note is still in becca)
-        return !(this.noteId in this.becca.notes) || this.isBeingDeleted;
-    }
-
-    /**
-     * @returns {BRevision|null}
-     */
-    saveRevision() {
-        return sql.transactional(() => {
-            let noteContent = this.getContent();
-
-            const revision = new BRevision({
-                noteId: this.noteId,
-                // title and text should be decrypted now
-                title: this.title,
-                type: this.type,
-                mime: this.mime,
-                isProtected: this.isProtected,
-                utcDateLastEdited: this.utcDateModified,
-                utcDateCreated: dateUtils.utcNowDateTime(),
-                utcDateModified: dateUtils.utcNowDateTime(),
-                dateLastEdited: this.dateModified,
-                dateCreated: dateUtils.localNowDateTime()
-            }, true);
-
-            revision.save(); // to generate revisionId, which is then used to save attachments
-
-            for (const noteAttachment of this.getAttachments()) {
-                const revisionAttachment = noteAttachment.copy();
-                revisionAttachment.ownerId = revision.revisionId;
-                revisionAttachment.setContent(noteAttachment.getContent(), {forceSave: true});
-
-                if (this.type === 'text') {
-                    // content is rewritten to point to the revision attachments
-                    noteContent = noteContent.replaceAll(`attachments/${noteAttachment.attachmentId}`,
-                        `attachments/${revisionAttachment.attachmentId}`);
-
-                    noteContent = noteContent.replaceAll(new RegExp(`href="[^"]*attachmentId=${noteAttachment.attachmentId}[^"]*"`, 'gi'),
-                        `href="api/attachments/${revisionAttachment.attachmentId}/download"`);
-                }
-            }
-
-            revision.setContent(noteContent);
-
-            return revision;
-        });
-    }
-
-    /**
-     * @param {string} matchBy - choose by which property we detect if to update an existing attachment.
- *                               Supported values are either 'attachmentId' (default) or 'title'
-     * @returns {BAttachment}
-     */
-    saveAttachment({attachmentId, role, mime, title, content, position}, matchBy = 'attachmentId') {
-        if (!['attachmentId', 'title'].includes(matchBy)) {
-            throw new Error(`Unsupported value '${matchBy}' for matchBy param, has to be either 'attachmentId' or 'title'.`);
-        }
-
-        let attachment;
-
-        if (matchBy === 'title') {
-            attachment = this.getAttachmentByTitle(title);
-        } else if (matchBy === 'attachmentId' && attachmentId) {
-            attachment = this.becca.getAttachmentOrThrow(attachmentId);
-        }
-
-        attachment = attachment || new BAttachment({
-            ownerId: this.noteId,
-            title,
-            role,
-            mime,
-            isProtected: this.isProtected,
-            position
-        });
-
-        content = content || "";
-        attachment.setContent(content, {forceSave: true});
-
-        return attachment;
-    }
-
-    getFileName() {
-        return utils.formatDownloadTitle(this.title, this.type, this.mime);
-    }
-
-    beforeSaving() {
-        super.beforeSaving();
-
-        this.becca.addNote(this.noteId, this);
-
-        this.dateModified = dateUtils.localNowDateTime();
-        this.utcDateModified = dateUtils.utcNowDateTime();
-    }
-
-    getPojo() {
-        return {
-            noteId: this.noteId,
-            title: this.title,
-            isProtected: this.isProtected,
-            type: this.type,
-            mime: this.mime,
-            blobId: this.blobId,
-            isDeleted: false,
-            dateCreated: this.dateCreated,
-            dateModified: this.dateModified,
-            utcDateCreated: this.utcDateCreated,
-            utcDateModified: this.utcDateModified
-        };
-    }
-
-    getPojoToSave() {
-        const pojo = this.getPojo();
-
-        if (pojo.isProtected) {
-            if (this.isDecrypted) {
-                pojo.title = protectedSessionService.encrypt(pojo.title);
-            }
-            else {
-                // updating protected note outside of protected session means we will keep original ciphertexts
-                delete pojo.title;
-            }
-        }
-
-        return pojo;
-    }
-}
-
-module.exports = BNote;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_boption.js.html b/docs/backend_api/becca_entities_boption.js.html deleted file mode 100644 index c091c565b..000000000 --- a/docs/backend_api/becca_entities_boption.js.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - JSDoc: Source: becca/entities/boption.js - - - - - - - - - - -
- -

Source: becca/entities/boption.js

- - - - - - -
-
-
"use strict";
-
-const dateUtils = require('../../services/date_utils');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-
-/**
- * Option represents a name-value pair, either directly configurable by the user or some system property.
- *
- * @extends AbstractBeccaEntity
- */
-class BOption extends AbstractBeccaEntity {
-    static get entityName() { return "options"; }
-    static get primaryKeyName() { return "name"; }
-    static get hashedProperties() { return ["name", "value"]; }
-
-    constructor(row) {
-        super();
-
-        this.updateFromRow(row);
-        this.becca.options[this.name] = this;
-    }
-
-    updateFromRow(row) {
-        /** @type {string} */
-        this.name = row.name;
-        /** @type {string} */
-        this.value = row.value;
-        /** @type {boolean} */
-        this.isSynced = !!row.isSynced;
-        /** @type {string} */
-        this.utcDateModified = row.utcDateModified;
-    }
-
-    beforeSaving() {
-        super.beforeSaving();
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-    }
-
-    getPojo() {
-        return {
-            name: this.name,
-            value: this.value,
-            isSynced: this.isSynced,
-            utcDateModified: this.utcDateModified
-        }
-    }
-}
-
-module.exports = BOption;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_brecent_note.js.html b/docs/backend_api/becca_entities_brecent_note.js.html deleted file mode 100644 index 5f5afd413..000000000 --- a/docs/backend_api/becca_entities_brecent_note.js.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - JSDoc: Source: becca/entities/brecent_note.js - - - - - - - - - - -
- -

Source: becca/entities/brecent_note.js

- - - - - - -
-
-
"use strict";
-
-const dateUtils = require('../../services/date_utils');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-
-/**
- * RecentNote represents recently visited note.
- *
- * @extends AbstractBeccaEntity
- */
-class BRecentNote extends AbstractBeccaEntity {
-    static get entityName() { return "recent_notes"; }
-    static get primaryKeyName() { return "noteId"; }
-
-    constructor(row) {
-        super();
-
-        /** @type {string} */
-        this.noteId = row.noteId;
-        /** @type {string} */
-        this.notePath = row.notePath;
-        /** @type {string} */
-        this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();
-    }
-
-    getPojo() {
-        return {
-            noteId: this.noteId,
-            notePath: this.notePath,
-            utcDateCreated: this.utcDateCreated
-        }
-    }
-}
-
-module.exports = BRecentNote;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/becca_entities_brevision.js.html b/docs/backend_api/becca_entities_brevision.js.html deleted file mode 100644 index dc47085b0..000000000 --- a/docs/backend_api/becca_entities_brevision.js.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - JSDoc: Source: becca/entities/brevision.js - - - - - - - - - - -
- -

Source: becca/entities/brevision.js

- - - - - - -
-
-
"use strict";
-
-const protectedSessionService = require('../../services/protected_session');
-const utils = require('../../services/utils');
-const dateUtils = require('../../services/date_utils');
-const becca = require('../becca');
-const AbstractBeccaEntity = require("./abstract_becca_entity");
-const sql = require("../../services/sql");
-const BAttachment = require("./battachment");
-
-/**
- * Revision represents a snapshot of note's title and content at some point in the past.
- * It's used for seamless note versioning.
- *
- * @extends AbstractBeccaEntity
- */
-class BRevision extends AbstractBeccaEntity {
-    static get entityName() { return "revisions"; }
-    static get primaryKeyName() { return "revisionId"; }
-    static get hashedProperties() { return ["revisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated",
-                                            "utcDateLastEdited", "utcDateCreated", "utcDateModified", "blobId"]; }
-
-    constructor(row, titleDecrypted = false) {
-        super();
-
-        /** @type {string} */
-        this.revisionId = row.revisionId;
-        /** @type {string} */
-        this.noteId = row.noteId;
-        /** @type {string} */
-        this.type = row.type;
-        /** @type {string} */
-        this.mime = row.mime;
-        /** @type {boolean} */
-        this.isProtected = !!row.isProtected;
-        /** @type {string} */
-        this.title = row.title;
-        /** @type {string} */
-        this.blobId = row.blobId;
-        /** @type {string} */
-        this.dateLastEdited = row.dateLastEdited;
-        /** @type {string} */
-        this.dateCreated = row.dateCreated;
-        /** @type {string} */
-        this.utcDateLastEdited = row.utcDateLastEdited;
-        /** @type {string} */
-        this.utcDateCreated = row.utcDateCreated;
-        /** @type {string} */
-        this.utcDateModified = row.utcDateModified;
-        /** @type {int} */
-        this.contentLength = row.contentLength;
-
-        if (this.isProtected && !titleDecrypted) {
-            this.title = protectedSessionService.isProtectedSessionAvailable()
-                ? protectedSessionService.decryptString(this.title)
-                : "[protected]";
-        }
-    }
-
-    getNote() {
-        return becca.notes[this.noteId];
-    }
-
-    /** @returns {boolean} true if the note has string content (not binary) */
-    hasStringContent() {
-        return utils.isStringNote(this.type, this.mime);
-    }
-
-    isContentAvailable() {
-        return !this.revisionId // new note which was not encrypted yet
-            || !this.isProtected
-            || protectedSessionService.isProtectedSessionAvailable()
-    }
-
-    /*
-     * Note revision content has quite special handling - it's not a separate entity, but a lazily loaded
-     * part of Revision entity with its own sync. The reason behind this hybrid design is that
-     * 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.
-     *
-     * This is the same approach as is used for Note's content.
-     */
-
-    /** @returns {string|Buffer} */
-    getContent() {
-        return this._getContent();
-    }
-
-    /**
-     * @returns {*}
-     * @throws Error in case of invalid JSON */
-    getJsonContent() {
-        const content = this.getContent();
-
-        if (!content || !content.trim()) {
-            return null;
-        }
-
-        return JSON.parse(content);
-    }
-
-    /** @returns {*|null} valid object or null if the content cannot be parsed as JSON */
-    getJsonContentSafely() {
-        try {
-            return this.getJsonContent();
-        }
-        catch (e) {
-            return null;
-        }
-    }
-
-    /**
-     * @param content
-     * @param {object} [opts]
-     * @param {object} [opts.forceSave=false] - will also save this BRevision entity
-     */
-    setContent(content, opts) {
-        this._setContent(content, opts);
-    }
-
-    /** @returns {BAttachment[]} */
-    getAttachments() {
-        return sql.getRows(`
-                SELECT attachments.*
-                FROM attachments 
-                WHERE ownerId = ? 
-                  AND isDeleted = 0`, [this.revisionId])
-            .map(row => new BAttachment(row));
-    }
-
-    /** @returns {BAttachment|null} */
-    getAttachmentById(attachmentId, opts = {}) {
-        opts.includeContentLength = !!opts.includeContentLength;
-
-        const query = opts.includeContentLength
-            ? `SELECT attachments.*, LENGTH(blobs.content) AS contentLength
-               FROM attachments 
-               JOIN blobs USING (blobId) 
-               WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`
-            : `SELECT * FROM attachments WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`;
-
-        return sql.getRows(query, [this.revisionId, attachmentId])
-            .map(row => new BAttachment(row))[0];
-    }
-
-    /** @returns {BAttachment[]} */
-    getAttachmentsByRole(role) {
-        return sql.getRows(`
-                SELECT attachments.*
-                FROM attachments 
-                WHERE ownerId = ? 
-                  AND role = ?
-                  AND isDeleted = 0
-                ORDER BY position`, [this.revisionId, role])
-            .map(row => new BAttachment(row));
-    }
-
-    /** @returns {BAttachment} */
-    getAttachmentByTitle(title) {
-        // cannot use SQL to filter by title since it can be encrypted
-        return this.getAttachments().filter(attachment => attachment.title === title)[0];
-    }
-
-    beforeSaving() {
-        super.beforeSaving();
-
-        this.utcDateModified = dateUtils.utcNowDateTime();
-    }
-
-    getPojo() {
-        return {
-            revisionId: this.revisionId,
-            noteId: this.noteId,
-            type: this.type,
-            mime: this.mime,
-            isProtected: this.isProtected,
-            title: this.title,
-            blobId: this.blobId,
-            dateLastEdited: this.dateLastEdited,
-            dateCreated: this.dateCreated,
-            utcDateLastEdited: this.utcDateLastEdited,
-            utcDateCreated: this.utcDateCreated,
-            utcDateModified: this.utcDateModified,
-            content: this.content, // used when retrieving full note revision to frontend
-            contentLength: this.contentLength
-        };
-    }
-
-    getPojoToSave() {
-        const pojo = this.getPojo();
-        delete pojo.content; // not getting persisted
-        delete pojo.contentLength; // not getting persisted
-
-        if (pojo.isProtected) {
-            if (protectedSessionService.isProtectedSessionAvailable()) {
-                pojo.title = protectedSessionService.encrypt(this.title);
-            }
-            else {
-                // updating protected note outside of protected session means we will keep original ciphertexts
-                delete pojo.title;
-            }
-        }
-
-        return pojo;
-    }
-}
-
-module.exports = BRevision;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html b/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html new file mode 100644 index 000000000..4ae0766fe --- /dev/null +++ b/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html @@ -0,0 +1,29 @@ +default | trilium

Base class for all backend entities.

+

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_battachment.default.html b/docs/backend_api/classes/becca_entities_battachment.default.html new file mode 100644 index 000000000..f4ea26a88 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_battachment.default.html @@ -0,0 +1,56 @@ +default | trilium

Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for +larger amounts of data and generally not accessible to the user.

+

Hierarchy (View Summary)

Constructors

Properties

attachmentId?: string
blobId?: string
contentLength?: number

optionally added to the entity

+
dateCreated?: string
dateModified?: string
isDecrypted?: boolean
isProtected?: boolean
isSynced?: boolean
mime: string
noteId?: number
ownerId: string

either noteId or revisionId to which this attachment belongs

+
position?: number
role: string
title: string
type?: "file" | "image"
utcDateCreated: string
utcDateModified?: string
utcDateScheduledForErasureSince?: null | string

Accessors

Methods

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • Optionalopts: ContentOpts

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_battribute.default.html b/docs/backend_api/classes/becca_entities_battribute.default.html new file mode 100644 index 000000000..f5d75b8f6 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_battribute.default.html @@ -0,0 +1,53 @@ +default | trilium

Attribute is an abstract concept which has two real uses - label (key - value pair) +and relation (representing named relationship between source and target note)

+

Hierarchy (View Summary)

Constructors

Properties

attributeId: string
blobId?: string
dateCreated?: string
dateModified?: string
isInheritable: boolean
isProtected?: boolean
isSynced?: boolean
name: string
noteId: string
position: number
utcDateCreated: string
utcDateModified?: string
value: string

Accessors

Methods

  • Returns {
        attributeId: string;
        isDeleted: boolean;
        isInheritable: boolean;
        name: string;
        noteId: string;
        position: number;
        type: AttributeType;
        utcDateModified: undefined | string;
        value: string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_bblob.default.html b/docs/backend_api/classes/becca_entities_bblob.default.html new file mode 100644 index 000000000..beb757b33 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_bblob.default.html @@ -0,0 +1,34 @@ +default | trilium

Base class for all backend entities.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: null | string | Buffer<ArrayBufferLike>;
        contentLength: number;
        dateModified: undefined | string;
        utcDateModified: undefined | string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_bbranch.default.html b/docs/backend_api/classes/becca_entities_bbranch.default.html new file mode 100644 index 000000000..dedfb0639 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_bbranch.default.html @@ -0,0 +1,57 @@ +default | trilium

Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple +parents.

+

Note that you should not rely on the branch's identity, since it can change easily with a note's move. +Always check noteId instead.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
branchId?: string
dateCreated?: string
dateModified?: string
isExpanded: boolean
isProtected?: boolean
isSynced?: boolean
noteId: string
notePosition: number
parentNoteId: string
prefix: null | string
utcDateCreated: string
utcDateModified?: string

Accessors

  • get isWeak(): boolean
  • Branch is weak when its existence should not hinder deletion of its note. +As a result, note with only weak branches should be immediately deleted. +An example is shared or bookmarked clones - they are created automatically and exist for technical reasons, +not as user-intended actions. From user perspective, they don't count as real clones and for the purpose +of deletion should not act as a clone.

    +

    Returns boolean

Methods

  • Delete a branch. If this is a last note's branch, delete the note as well.

    +

    Parameters

    • OptionaldeleteId: string

      optional delete identified

      +
    • OptionaltaskContext: TaskContext

    Returns boolean

    true if note has been deleted, false otherwise

    +
  • Returns {
        branchId: undefined | string;
        isDeleted: boolean;
        isExpanded: boolean;
        noteId: string;
        notePosition: number;
        parentNoteId: string;
        prefix: null | string;
        utcDateModified: undefined | string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_betapi_token.default.html b/docs/backend_api/classes/becca_entities_betapi_token.default.html new file mode 100644 index 000000000..a82e30a78 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_betapi_token.default.html @@ -0,0 +1,42 @@ +default | trilium

EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications. +Used by:

+
    +
  • Trilium Sender
  • +
  • ETAPI clients
  • +
+

The format user is presented with is "_". This is also called "authToken" to distinguish it +from tokenHash and token.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
etapiTokenId?: string
isProtected?: boolean
isSynced?: boolean
name: string
tokenHash: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        etapiTokenId: undefined | string;
        isDeleted: boolean;
        name: string;
        tokenHash: string;
        utcDateCreated: string;
        utcDateModified: undefined | string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_bnote.default.html b/docs/backend_api/classes/becca_entities_bnote.default.html new file mode 100644 index 000000000..7d34d4eba --- /dev/null +++ b/docs/backend_api/classes/becca_entities_bnote.default.html @@ -0,0 +1,347 @@ +default | trilium

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

+

Hierarchy (View Summary)

Constructors

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 +getAttributeCaseInsensitive +getAttributes +getAttributeValue +getBestNotePath +getBestNotePathString +getBranches +getChildBranches +getChildNotes +getContent +getDescendantNoteIds +getDistanceToAncestor +getFileName +getFlatText +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 +hasAncestor +hasAttribute +hasChildren +hasInheritableArchivedLabel +hasLabel +hasOwnedAttribute +hasOwnedLabel +hasOwnedRelation +hasRelation +hasStringContent +init +invalidateSubTree +invalidateThisCache +isContentAvailable +isDescendantOfNote +isEligibleForConversionToAttachment +isHiddenCompletely +isHtml +isImage +isInherited +isInHiddenSubtree +isJavaScript +isJson +isLabelTruthy +isLaunchBarConfig +isOptions +isRoot +isStringNote +markAsDeleted +markAsDeletedSimple +putEntityChange +removeAttribute +removeLabel +removeRelation +save +saveAttachment +saveRevision +searchNoteInSubtree +searchNotesInSubtree +setAttribute +setContent +setJsonContent +setLabel +setRelation +sortChildren +sortParents +toggleAttribute +toggleLabel +toggleRelation +update +updateFromRow +

Constructors

Properties

__flatTextCache: null | string
blobId?: string
children: default[]
contentAndAttachmentsAndRevisionsSize: null | number

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

+
contentAndAttachmentsSize: null | number

size of the note content, attachment contents in bytes

+
contentSize: null | 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: default[]
parentBranches: default[]
parents: default[]
revisionCount: null | number

number of note revisions for this note

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

Accessors

Methods

  • Parameters

    • Optionaltype: null | string
    • Optionalname: null | 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 ~/#

      +
    • value: string = ""

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

      +
    • isInheritable: boolean = false
    • position: null | number = null

    Returns default

  • 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 #

      +
    • value: string = ""

      text value of the label; optional

      +
    • isInheritable: boolean = false

    Returns default

  • 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
    • isInheritable: boolean = false

    Returns default

  • 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

    • opts: ConvertOpts = ...

    Returns null | default

    null if note is not eligible for conversion

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

    +

    Parameters

    • deleteId: null | string = null

      optional delete identified

      +
    • taskContext: null | TaskContext = null

    Returns void

  • 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)

    +
  • Parameters

    • type: string

      attribute type (label, relation, etc.)

      +
    • name: string

      attribute name

      +

    Returns null | default

    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.

    +
  • Parameters

    • type: string
    • name: string
    • Optionalvalue: null | string

    Returns undefined | default

  • 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 default[]

    all note's attributes, including inherited ones

    +
  • Parameters

    • type: string

      attribute type (label, relation, etc.)

      +
    • name: string

      attribute name

      +

    Returns null | 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

    • hoistedNoteId: string = 'root'

    Returns string[]

    array of noteIds constituting the particular note path

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

    +

    Parameters

    • hoistedNoteId: string = 'root'

    Returns string

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

    +
  • 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>

  • This is used for:

    +
      +
    • fast searching
    • +
    • note similarity evaluation
    • +
    +

    Returns string

      +
    • returns flattened textual representation of note, prefixes and attributes
    • +
    +
  • Returns default[]

    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

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

    +
  • Parameters

    • Optionalname: string

      label name to filter

      +

    Returns default[]

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

    +
  • Parameters

    • name: string

      label name

      +

    Returns null | 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
    • value: null | string = null

    Returns null | default

    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

    • type: null | string = null

      (optional) attribute type to filter

      +
    • name: null | string = null

      (optional) attribute name to filter

      +
    • value: null | string = null

      (optional) attribute value to filter

      +

    Returns default[]

    note's "owned" attributes - excluding inherited ones

    +
  • Parameters

    • type: string

      attribute type (label, relation, etc.)

      +
    • name: string

      attribute name

      +

    Returns null | string

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

    +
  • Parameters

    • name: string

      label name to filter

      +

    Returns default[]

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

    +
  • Parameters

    • name: string

      label name

      +

    Returns null | 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

    • Optionalname: null | string

      relation name to filter

      +

    Returns default[]

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

    +
  • Parameters

    • name: string

      relation name

      +

    Returns null | string

    relation value if relation exists, null otherwise

    +
  • Parameters

    • Optionalname: string

      relation name to filter

      +

    Returns default[]

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

    +
  • Parameters

    • name: string

      relation name

      +

    Returns null | string

    relation value if relation exists, null otherwise

    +
  • Returns null | "frontend" | "backend"

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

    +
  • Parameters

    • hoistedNoteId: string = 'root'

    Returns NotePathRecord[]

  • Parameters

    • __namedParameters: { includeArchived?: boolean; includeHidden?: boolean; resolveSearch?: boolean } = {}

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

  • Parameters

    • __namedParameters: { includeArchived?: boolean; includeHidden?: boolean; resolveSearch?: boolean } = {}

    Returns string[]

    includes the subtree root note as well

    +
  • Parameters

    • type: string
    • name: string
    • value: null | string = null

    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)

    +
  • Parameters

    • ancestorNoteId: string

    Returns boolean

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

    +
  • Parameters

    • opts: ConvertOpts = ...

    Returns boolean

  • Returns boolean

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

    +
  • Parameters

    • name: string

      label name

      +

    Returns boolean

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

    +
  • Returns boolean

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

    +
  • 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

    • deleteId: null | string = null

    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

  • Parameters

    • __namedParameters: AttachmentRow
    • matchBy: string = 'attachmentId'

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

      +

    Returns default

  • 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

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    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

  • 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

diff --git a/docs/backend_api/classes/becca_entities_boption.default.html b/docs/backend_api/classes/becca_entities_boption.default.html new file mode 100644 index 000000000..b13ceb36f --- /dev/null +++ b/docs/backend_api/classes/becca_entities_boption.default.html @@ -0,0 +1,34 @@ +default | trilium

Option represents a name-value pair, either directly configurable by the user or some system property.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
name: string
utcDateCreated: string
utcDateModified?: string
value: string

Accessors

Methods

  • Returns {
        isSynced: undefined | boolean;
        name: string;
        utcDateModified: undefined | string;
        value: string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_brecent_note.default.html b/docs/backend_api/classes/becca_entities_brecent_note.default.html new file mode 100644 index 000000000..5d536c7b8 --- /dev/null +++ b/docs/backend_api/classes/becca_entities_brecent_note.default.html @@ -0,0 +1,34 @@ +default | trilium

RecentNote represents recently visited note.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
noteId: string
notePath: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • 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

    • deleteId: null | string = null

    Returns void

diff --git a/docs/backend_api/classes/becca_entities_brevision.default.html b/docs/backend_api/classes/becca_entities_brevision.default.html new file mode 100644 index 000000000..da201582a --- /dev/null +++ b/docs/backend_api/classes/becca_entities_brevision.default.html @@ -0,0 +1,57 @@ +default | trilium

Revision represents a snapshot of note's title and content at some point in the past. +It's used for seamless note versioning.

+

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateCreated?: string
dateLastEdited?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • 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

    • deleteId: null | string = null

    Returns void

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

diff --git a/docs/backend_api/fonts/OpenSans-Bold-webfont.eot b/docs/backend_api/fonts/OpenSans-Bold-webfont.eot deleted file mode 100644 index 5d20d9163..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Bold-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Bold-webfont.svg b/docs/backend_api/fonts/OpenSans-Bold-webfont.svg deleted file mode 100644 index 3ed7be4bc..000000000 --- a/docs/backend_api/fonts/OpenSans-Bold-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-Bold-webfont.woff b/docs/backend_api/fonts/OpenSans-Bold-webfont.woff deleted file mode 100644 index 1205787b0..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Bold-webfont.woff and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.eot b/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.eot deleted file mode 100644 index 1f639a15f..000000000 Binary files a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.svg b/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.svg deleted file mode 100644 index 6a2607b9d..000000000 --- a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.woff b/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.woff deleted file mode 100644 index ed760c062..000000000 Binary files a/docs/backend_api/fonts/OpenSans-BoldItalic-webfont.woff and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Italic-webfont.eot b/docs/backend_api/fonts/OpenSans-Italic-webfont.eot deleted file mode 100644 index 0c8a0ae06..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Italic-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Italic-webfont.svg b/docs/backend_api/fonts/OpenSans-Italic-webfont.svg deleted file mode 100644 index e1075dcc2..000000000 --- a/docs/backend_api/fonts/OpenSans-Italic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-Italic-webfont.woff b/docs/backend_api/fonts/OpenSans-Italic-webfont.woff deleted file mode 100644 index ff652e643..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Italic-webfont.woff and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Light-webfont.eot b/docs/backend_api/fonts/OpenSans-Light-webfont.eot deleted file mode 100644 index 14868406a..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Light-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Light-webfont.svg b/docs/backend_api/fonts/OpenSans-Light-webfont.svg deleted file mode 100644 index 11a472ca8..000000000 --- a/docs/backend_api/fonts/OpenSans-Light-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-Light-webfont.woff b/docs/backend_api/fonts/OpenSans-Light-webfont.woff deleted file mode 100644 index e78607481..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Light-webfont.woff and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.eot b/docs/backend_api/fonts/OpenSans-LightItalic-webfont.eot deleted file mode 100644 index 8f445929f..000000000 Binary files a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.svg b/docs/backend_api/fonts/OpenSans-LightItalic-webfont.svg deleted file mode 100644 index 431d7e354..000000000 --- a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.svg +++ /dev/null @@ -1,1835 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.woff b/docs/backend_api/fonts/OpenSans-LightItalic-webfont.woff deleted file mode 100644 index 43e8b9e6c..000000000 Binary files a/docs/backend_api/fonts/OpenSans-LightItalic-webfont.woff and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Regular-webfont.eot b/docs/backend_api/fonts/OpenSans-Regular-webfont.eot deleted file mode 100644 index 6bbc3cf58..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Regular-webfont.eot and /dev/null differ diff --git a/docs/backend_api/fonts/OpenSans-Regular-webfont.svg b/docs/backend_api/fonts/OpenSans-Regular-webfont.svg deleted file mode 100644 index 25a395234..000000000 --- a/docs/backend_api/fonts/OpenSans-Regular-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/backend_api/fonts/OpenSans-Regular-webfont.woff b/docs/backend_api/fonts/OpenSans-Regular-webfont.woff deleted file mode 100644 index e231183dc..000000000 Binary files a/docs/backend_api/fonts/OpenSans-Regular-webfont.woff and /dev/null differ diff --git a/docs/backend_api/global.html b/docs/backend_api/global.html deleted file mode 100644 index d3eaa43ce..000000000 --- a/docs/backend_api/global.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - - JSDoc: Global - - - - - - - - - - -
- -

Global

- - - - - - -
- -
- -

- - -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - -

Members

- - - -

api :BackendScriptApi

- - - - -
- An instance of the frontend api available globally. -
- - - -
Type:
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - -

Type Definitions

- - - -

AttributeType

- - - - -
- There are currently only two types of attributes, labels or relations. -
- - - -
Type:
-
    -
  • - -"label" -| - -"relation" - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

NotePathRecord

- - - - - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
isArchived - - -boolean - - - -
isInHoistedSubTree - - -boolean - - - -
notePath - - -Array.<string> - - - -
isHidden - - -boolean - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

NoteType

- - - - -
- There are many different Note types, some of which are entirely opaque to the -end user. Those types should be used only for checking against, they are -not for direct use. -
- - - -
Type:
-
    -
  • - -"file" -| - -"image" -| - -"search" -| - -"noteMap" -| - -"launcher" -| - -"doc" -| - -"contentWidget" -| - -"text" -| - -"relationMap" -| - -"render" -| - -"canvas" -| - -"mermaid" -| - -"book" -| - -"webView" -| - -"code" - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

int

- - - - -
- A whole number -
- - - -
Type:
-
    -
  • - -number - - -
  • -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/hierarchy.html b/docs/backend_api/hierarchy.html new file mode 100644 index 000000000..b2ea24957 --- /dev/null +++ b/docs/backend_api/hierarchy.html @@ -0,0 +1 @@ +trilium
diff --git a/docs/backend_api/index.html b/docs/backend_api/index.html index f3c647a2b..612058e6f 100644 --- a/docs/backend_api/index.html +++ b/docs/backend_api/index.html @@ -1,65 +1,87 @@ - - - - - JSDoc: Home +trilium

trilium

TriliumNext Notes

Docker Pulls GitHub Downloads (all assets, all releases)

+

English | Chinese | Russian | Japanese | Italian | Spanish

+

TriliumNext Notes is an open-source, cross-platform hierarchical note taking application with focus on building large personal knowledge bases.

+

See screenshots for quick overview:

+

Trilium Screenshot

+

The original Trilium project is in maintenance mode

+

There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and install TriliumNext/Notes as usual

+

Versions up to and including v0.90.4 are compatible with the latest zadam/trilium version of v0.63.7. Any later versions of TriliumNext have their sync versions incremented.

+

Feel free to join our official conversations. We would love to hear what features, suggestions, or issues you may have!

+
    +
  • Matrix (For synchronous discussions) +
      +
    • The General Matrix room is also bridged to XMPP
    • +
    +
  • +
  • Github Discussions (For Asynchronous discussions)
  • +
  • Wiki (For common how-to questions and user guides)
  • +
+ +

✨ Check out the following third-party resources/communities for more TriliumNext related goodies:

+ +

To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have a few options:

+
    +
  • Download the binary release for your platform from the latest release page, unzip the package and run the trilium executable.
  • +
  • Access TriliumNext via the web interface of a server installation (see below) +
      +
    • Currently only the latest versions of Chrome & Firefox are supported (and tested).
    • +
    +
  • +
  • (Coming Soon) TriliumNext will also be provided as a Flatpak
  • +
+

Currently when running TriliumNext/Notes on MacOS, you may get the following error:

+
+

Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy.

+
+

You will need to run the command on your shell to resolve the error (documented here):

+
xattr -c "/path/to/Trilium Next.app"
+
- - - - - - +

To use TriliumNext on a mobile device:

+
    +
  • Use a mobile web browser to access the mobile interface of a server installation (see below)
  • +
  • Use of a mobile app is not yet supported (see here) to track mobile improvements.
  • +
+

To install TriliumNext on your own server (including via Docker from Dockerhub) follow the server installation docs.

+

See wiki for complete list of documentation pages.

+

You can also read Patterns of personal knowledge base to get some inspiration on how you might use TriliumNext.

+
git clone https://github.com/TriliumNext/Notes.git
cd Notes
npm install
npm run start-server +
- - -
- -

Home

- - - - - - - - -

- - - - - - - - - - - - - - - - - - - - -
- - - -
- - - - - - - \ No newline at end of file +

Head on over to our Docs repo

+
    +
  • CKEditor 5 - best WYSIWYG editor on the market, very interactive and listening team
  • +
  • FancyTree - very feature rich tree library without real competition. TriliumNext Notes would not be the same without it.
  • +
  • CodeMirror - code editor with support for huge amount of languages
  • +
  • jsPlumb - visual connectivity library without competition. Used in relation maps and link maps
  • +
+

You can support the original Trilium developer using GitHub Sponsors, PayPal or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). +Support for the TriliumNext organization will be possible in the near future.

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

+
diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html new file mode 100644 index 000000000..e0d1e5e48 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html @@ -0,0 +1,14 @@ +AttachmentRow | trilium
interface AttachmentRow {
    attachmentId?: string;
    blobId?: string;
    content?: string | Buffer<ArrayBufferLike>;
    contentLength?: number;
    dateModified?: string;
    isProtected?: boolean;
    mime: string;
    ownerId?: string;
    position?: number;
    role: string;
    title: string;
    utcDateModified?: string;
    utcDateScheduledForErasureSince?: string;
}

Properties

attachmentId?: string
blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateModified?: string
isProtected?: boolean
mime: string
ownerId?: string
position?: number
role: string
title: string
utcDateModified?: string
utcDateScheduledForErasureSince?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html new file mode 100644 index 000000000..badc7f521 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html @@ -0,0 +1,9 @@ +AttributeRow | trilium
interface AttributeRow {
    attributeId?: string;
    isInheritable?: boolean;
    name: string;
    noteId?: string;
    position?: null | number;
    type: AttributeType;
    utcDateModified?: string;
    value?: string;
}

Properties

attributeId?: string
isInheritable?: boolean
name: string
noteId?: string
position?: null | number
utcDateModified?: string
value?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html new file mode 100644 index 000000000..2f038e1c2 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html @@ -0,0 +1,6 @@ +BlobRow | trilium
interface BlobRow {
    blobId: string;
    content: string | Buffer<ArrayBufferLike>;
    contentLength: number;
    dateModified: string;
    utcDateModified: string;
}

Properties

blobId: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateModified: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html new file mode 100644 index 000000000..293f63d5e --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html @@ -0,0 +1,9 @@ +BranchRow | trilium
interface BranchRow {
    branchId?: string;
    isDeleted?: boolean;
    isExpanded?: boolean;
    noteId: string;
    notePosition?: null | number;
    parentNoteId: string;
    prefix?: null | string;
    utcDateModified?: string;
}

Properties

branchId?: string
isDeleted?: boolean
isExpanded?: boolean
noteId: string
notePosition?: null | number
parentNoteId: string
prefix?: null | string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html new file mode 100644 index 000000000..f21d78572 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html @@ -0,0 +1,7 @@ +EtapiTokenRow | trilium
interface EtapiTokenRow {
    etapiTokenId?: string;
    isDeleted?: boolean;
    name: string;
    tokenHash: string;
    utcDateCreated?: string;
    utcDateModified?: string;
}

Properties

etapiTokenId?: string
isDeleted?: boolean
name: string
tokenHash: string
utcDateCreated?: string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html new file mode 100644 index 000000000..4a56f60b9 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html @@ -0,0 +1,14 @@ +NoteRow | trilium
interface NoteRow {
    blobId: string;
    content?: string | Buffer<ArrayBufferLike>;
    dateCreated: string;
    dateModified: string;
    deleteId: string;
    isDeleted: boolean;
    isProtected: boolean;
    mime: string;
    noteId: string;
    title: string;
    type:
        | "search"
        | "file"
        | "text"
        | "code"
        | "relationMap"
        | "render"
        | "book"
        | "mermaid"
        | "canvas"
        | "image"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "webView"
        | "mindMap";
    utcDateCreated: string;
    utcDateModified: string;
}

Properties

blobId: string
content?: string | Buffer<ArrayBufferLike>
dateCreated: string
dateModified: string
deleteId: string
isDeleted: boolean
isProtected: boolean
mime: string
noteId: string
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html new file mode 100644 index 000000000..6b9427cd8 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html @@ -0,0 +1,11 @@ +OptionRow | trilium

Database representation of an option.

+

Options are key-value pairs that are used to store information such as user preferences (for example +the current theme, sync server information), but also information about the state of the application).

+
interface OptionRow {
    isSynced: boolean;
    name: string;
    utcDateModified?: string;
    value: string;
}

Properties

isSynced: boolean

true if the value should be synced across multiple instances (e.g. locale) or false if it should be local-only (e.g. theme).

+
name: string

The name of the option.

+
utcDateModified?: string
value: string

The value of the option.

+
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html new file mode 100644 index 000000000..d4fdb1f9d --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html @@ -0,0 +1,4 @@ +RecentNoteRow | trilium
interface RecentNoteRow {
    noteId: string;
    notePath: string;
    utcDateCreated?: string;
}

Properties

noteId: string
notePath: string
utcDateCreated?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html new file mode 100644 index 000000000..64ed1ab21 --- /dev/null +++ b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html @@ -0,0 +1,14 @@ +RevisionRow | trilium
interface RevisionRow {
    blobId?: string;
    contentLength?: number;
    dateCreated: string;
    dateLastEdited?: string;
    isProtected?: boolean;
    mime: string;
    noteId: string;
    revisionId?: string;
    title: string;
    type: string;
    utcDateCreated: string;
    utcDateLastEdited?: string;
    utcDateModified: string;
}

Properties

blobId?: string
contentLength?: number
dateCreated: string
dateLastEdited?: string
isProtected?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified: string
diff --git a/docs/backend_api/media/README-ZH_CN.md b/docs/backend_api/media/README-ZH_CN.md new file mode 100644 index 000000000..f6aa860b1 --- /dev/null +++ b/docs/backend_api/media/README-ZH_CN.md @@ -0,0 +1,97 @@ +# TriliumNext Notes + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +TriliumNext Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)以快速了解: + +Trilium Screenshot + +## ⚠️ 为什么选择TriliumNext? + +[原始的Trilium项目目前处于维护模式](https://github.com/zadam/trilium/issues/4620) + +## 🗭 与我们讨论 + +欢迎加入我们的官方讨论和社区。我们专注于Trilium的开发,乐于听取您对功能、建议或问题的意见! + +- [Matrix](https://matrix.to/#/#triliumnext:matrix.org)(用于同步讨论) +- [Github Discussions](https://github.com/TriliumNext/Notes/discussions)(用于异步讨论) +- [Wiki](https://triliumnext.github.io/Docs/)(用于常见操作问题和用户指南) + +上面链接的两个房间是镜像的,所以您可以在任意平台上使用XMPP或者Matrix来和我们交流。 + +### 非官方社区 + +[Trilium Rocks](https://discord.gg/aqdX9mXX4r) + +## 🎁 特性 + +* 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) +* 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)表格,图像和[数学公式](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) +* 支持编辑[使用源代码的笔记](https://triliumnext.github.io/Docs/Wiki/code-notes),包括语法高亮显示 +* 笔记之间快速[导航](https://triliumnext.github.io/Docs/Wiki/note-navigation),全文搜索和[提升笔记](https://triliumnext.github.io/Docs/Wiki/note-hoisting) +* 无缝[笔记版本控制](https://triliumnext.github.io/Docs/Wiki/note-revisions) +* 笔记[属性](https://triliumnext.github.io/Docs/Wiki/attributes)可用于笔记组织,查询和高级[脚本编写](https://triliumnext.github.io/Docs/Wiki/scripts) +* [同步](https://triliumnext.github.io/Docs/Wiki/synchronization)与自托管同步服务器 + * 有一个[第三方提供的同步服务器托管服务](https://trilium.cc/paid-hosting) +* 公开地[分享](https://triliumnext.github.io/Docs/Wiki/sharing)(发布)笔记到互联网 +* 具有按笔记粒度的强大的[笔记加密](https://triliumnext.github.io/Docs/Wiki/protected-notes) +* 使用自带的 Excalidraw 来绘制图表(笔记类型“画布”) +* [关系图](https://triliumnext.github.io/Docs/Wiki/relation-map)和[链接图](https://triliumnext.github.io/Docs/Wiki/link-map),用于可视化笔记及其关系 +* [脚本](https://triliumnext.github.io/Docs/Wiki/scripts) - 请参阅[高级功能展示](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) +* 可用于自动化的 [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) +* 在拥有超过 10 万条笔记时仍能保持良好的可用性和性能 +* 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) +* [夜间主题](https://triliumnext.github.io/Docs/Wiki/themes) +* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) 和 [Markdown 导入导出](https://triliumnext.github.io/Docs/Wiki/markdown)功能 +* 使用[网页剪藏](https://triliumnext.github.io/Docs/Wiki/web-clipper)轻松保存互联网上的内容 + +✨ 查看以下第三方资源,获取更多关于TriliumNext的好东西: + +- [awesome-trilium](https://github.com/Nriver/awesome-trilium):提供第三方主题、脚本、插件等资源的列表。 +- [TriliumRocks!](https://trilium.rocks/):提供教程、指南等更多内容。 + +## 🏗 构建 + +Trilium 可以用作桌面应用程序(Linux 和 Windows)或服务器(Linux)上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support)。 + +* 如果要在桌面上使用 Trilium,请从[最新版本](https://github.com/TriliumNext/Notes/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。 +* 如果要在服务器上安装 Trilium,请参考[此页面](https://triliumnext.github.io/Docs/Wiki/server-installation)。 + * 当前仅支持(测试过)最近发布的 Chrome 和 Firefox 浏览器。 + +Trilium 也提供 Flatpak: + +[](https://flathub.org/apps/details/com.github.zadam.trilium) + +## 📝 文档 + +[有关文档页面的完整列表,请参见 Wiki。](https://triliumnext.github.io/Docs/) + +* [Wiki 的中文翻译版本](https://github.com/baddate/trilium/wiki/) + +您还可以阅读[个人知识库模式](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge),以获取有关如何使用 Trilium 的灵感。 + +## 💻 贡献 + + +或者克隆本仓库到本地,并运行 + +```shell +npm install +npm run start-server +``` + +## 👏 致谢 + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市面上最好的所见即所得编辑器,拥有互动性强且聆听能力强的团队 +* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大到没有对手。没有它,Trilium Notes 将不会如此。 +* [CodeMirror](https://github.com/codemirror/CodeMirror) - 支持大量语言的代码编辑器 +* [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://triliumnext.github.io/Docs/Wiki/relation-map)和[链接图](https://triliumnext.github.io/Docs/Wiki/link-map) + +## 🤝 捐赠 + +你可以通过 GitHub Sponsors,[PayPal](https://paypal.me/za4am) 或者比特币 (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) 来捐赠。 + +## 🔑 许可证 + +本程序是自由软件:你可以再发布本软件和/或修改本软件,只要你遵循 Free Software Foundation 发布的 GNU Affero General Public License 的第三版或者任何(由你选择)更晚的版本。 diff --git a/docs/backend_api/media/README.es.md b/docs/backend_api/media/README.es.md new file mode 100644 index 000000000..a2ea94144 --- /dev/null +++ b/docs/backend_api/media/README.es.md @@ -0,0 +1,106 @@ +# TriliumNext Notes + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +TriliumNext Notes es una aplicación de toma de notas jerárquicas multi-plataforma y de código libre con un enfoque en la construcción de grandes bases de conocimiento personal. + +Vea estas [capturas de pantalla](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) para un vistazo rápido: + +Trilium Screenshot + +## ⚠️ ¿Por qué usar TriliumNext? + +[El proyecto Trilium original está en modo de mantenimiento](https://github.com/zadam/trilium/issues/4620) + +### ¿Cómo migrar desde Trilium? + +No hay pasos de migración especiales para migrar de una instancia de zadam/Trilium a una instancia de TriliumNext/Notes. Simplemente actualice su instancia de Trilium a la última versión e [instale TriliumNext/Notes como de costumbre](#-Instalación) + +## 💬 Discuta con nosotros + +Siéntase libre de unirse a nuestras conversaciones oficiales. ¡Nos encantaría escuchar de las características, sugerencias o problemas que pueda tener! + +- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (Para discusiones síncronas) + - La sala `General` es replicada a [XMPP](xmpp:discuss@trilium.thisgreat.party?join) +- [Discusiones de GitHub](https://github.com/TriliumNext/Notes/discussions) (Para discusiones asíncronas) +- [Wiki](https://triliumnext.github.io/Docs/) (Para preguntas frecuentes y guías de usuario) + +## 🎁 Características + +- Las notas pueden ser acomodadas en un árbol de profundidad arbitraria. Una sola nota puede ser colocada en múltiples lugares del árbol (vea [clonar](https://triliumnext.github.io/Docs/Wiki/cloning-notes) +- Edición de notas WYSIWYG enriquecida que incluye, por ejemplo, tablas, imágenes y [matemáticas](https://triliumnext.github.io/Docs/Wiki/text-notes) con [autoformato](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) markdown +- Soporte para editar [notas con código fuente](https://triliumnext.github.io/Docs/Wiki/code-notes), incluyendo resaltado de sintaxis +- Rápida y sencilla [navegación entre notas](https://triliumnext.github.io/Docs/Wiki/note-navigation), búsqueda de texto completo y [elevación de notas](https://triliumnext.github.io/Docs/Wiki/note-hoisting) +- [Versionado de notas](https://triliumnext.github.io/Docs/Wiki/note-revisions) sutil +- Los [atributos](https://triliumnext.github.io/Docs/Wiki/attributes) de las notas pueden utilizarse para organización, realizar consultas y [scripts](https://triliumnext.github.io/Docs/Wiki/scripts) avanzados +- [Sincronización](https://triliumnext.github.io/Docs/Wiki/synchronization) con servidor de sincronización propio + - existe un [servicio de terceros para alojar el servidor de sincronización](https://trilium.cc/paid-hosting) +- [Compartir](https://triliumnext.github.io/Docs/Wiki/sharing) (publicar) notas al Internet público +- Fuerte [encriptación de notas](https://triliumnext.github.io/Docs/Wiki/protected-notes) con granularidad para cada nota +- Esbozo de diagramas con Excalidraw incorporado (tipo de nota «canvas») +- [Mapas de relaciones]() y [mapas de enlaces](https://triliumnext.github.io/Docs/Wiki/link-map) para visualizar las notas y sus relaciones +- [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - vea [casos de uso avanzados](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) +- [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) para automatización +- Escala bien tanto en uso como en rendimiento a partir de 100,000 notas +- [Interfaz móvil](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) optimizada para teléfonos inteligentes y tabletas +- [Tema nocturno](https://triliumnext.github.io/Docs/Wiki/themes) +- Importación y exportación de [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) y [Markdown](https://triliumnext.github.io/Docs/Wiki/markdown) +- [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) para guardar fácilmente contenido web + +✨ Consulte los/las siguientes recursos/comunidades de terceros para obtener más información sobre complementos para TriliumNext: + +- [awesome-trilium](https://github.com/Nriver/awesome-trilium) para temas, scripts, plugins y más de terceros. +- [TriliumRocks!](https://trilium.rocks/) para tutoriales, guías y mucho más. + +## 🏗 Instalación + +### Escritorio + +Para usar TriliumNext en su máquina de escritorio (Linux, MacOS y Windows) tiene algunas opciones: + +- Descargue la versión binaria para su plataforma desde la [página de lanzamientos](https://github.com/TriliumNext/Notes/releases/latest), descomprima el paquete y ejecute el ejecutable `trilium`. +- Acceda a TriliumNext a través de la interfaz web de una instalación de servidor (ver más abajo) + - Actualmente solo las últimas versiones de Chrome y Firefox son compatibles (y están probadas). +- (Próximamente) TriliumNext también se proporcionará como un Flatpak + +### Móvil + +Para usar TriliumNext en un dispositivo móvil: + +- Utilice un navegador web móvil para acceder a la interfaz móvil de una instalación de servidor (ver más abajo) +- El uso de una aplicación móvil aún no está soportado ([vea aquí](https://github.com/TriliumNext/Notes/issues/72)) para seguir las mejoras móviles. + +### Servidor + +Para instalar TriliumNext en su servidor (incluyendo vía Docker desde [Dockerhub](https://hub.docker.com/r/triliumnext/notes)) siga la [documentación de instalación de servidor](https://triliumnext.github.io/Docs/Wiki/server-installation). + +## 📝 Documentación + +[Vea la Wiki para la lista completa de páginas de documentación.](https://triliumnext.github.io/Docs) + +También puede leer [Patrones para una base de conocimiento personal](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) para obtener un poco de inspiración de como podría usar TriliumNext. + +## 💻 Contribuir + +Clone localmente y ejecute + +```shell +npm install +npm run start-server +``` + +## 👏 Reconocimientos + +- [CKEditor 5](https://github.com/ckeditor/ckeditor5) - el mejor editor WYSIWYG en el mercado, equipo muy interactivo y atento +- [FancyTree](https://github.com/mar10/fancytree) - biblioteca de árbol muy rica en funciones sin competencia real. TriliumNext Notes no sería lo mismo sin esta. +- [CodeMirror](https://github.com/codemirror/CodeMirror) - editor de código con soporte para una gran cantidad de lenguajes +- [jsPlumb](https://github.com/jsplumb/jsplumb) - biblioteca de conectividad visual sin competencia. Usado en [mapas de relación](https://triliumnext.github.io/Docs/Wiki/Relation-map) y [mapas de enlace](https://triliumnext.github.io/Docs/Wiki/Link-map) + +## 🤝 Soporte + +Puede apoyar al desarrollador original de Trilium usando GitHub Sponsors, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). +Apoyo para la organización TriliumNext será posible en un futuro próximo. + +## 🔑 Licencia + +Este programa es software libre: puede redistribuirlo y/o modificarlo bajo los términos de la Licencia Pública General de Affero GNU publicada por la Free Software Foundation, ya sea la versión 3 de la Licencia, o (a su elección) cualquier versión posterior. diff --git a/docs/backend_api/media/README.it.md b/docs/backend_api/media/README.it.md new file mode 100644 index 000000000..a778230c7 --- /dev/null +++ b/docs/backend_api/media/README.it.md @@ -0,0 +1,93 @@ +# TriliumNext Notes + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +TriliumNext Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni. + +Vedi [fotografie](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) per una panoramica veloce: + +Trilium Screenshot + +## ⚠️ Perchè TriliumNext? +[Il progetto originale Trilium è in modalità di manutenzione](https://github.com/zadam/trilium/issues/4620) + +## 🗭 Discuti con noi +Sentiti libero di unirti alle nostre discussioni ufficiali e alla nostra comunità. Siamo concentrati sullo sviluppo di Trilium e ci piacerebbe sapere quali funzioni, suggerimenti o eventuali problemi hai! + +- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (Per discussioni sincrone) +- [Discussioni Github](https://github.com/TriliumNext/Notes/discussions) (Per discussioni asincrone) +- [Wiki](https://triliumnext.github.io/Docs/) (Per le domande più comuni e le guide per l'utente) + +Le due stanze linkate sopra sono connesse e contengono gli stessi messaggi, quindi puoi usare XMPP o Matrix da qualsiasi client tu preferisca, praticamente su qualsiasi piattaforma! +### Comunità non ufficiali + +[Trilium Rocks](https://discord.gg/aqdX9mXX4r) +## 🎁 Funzionalità + +* Gli appunti possono essere organizzati in un albero di profondità arbitraria. Un singolo appunto può essere collocato in più posti nell'albero (vedi [clonazione](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) +* Ricco editor visuale (WYSIWYG), con supporto -tra l'altro- per tabelle, immagini ed [espressioni matematiche](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) e con [formattazione automatica](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) per markdown +* Supporto per la modifica di [appunti con codice sorgente](https://triliumnext.github.io/Docs/Wiki/code-notes), con evidenziazione della sintassi +* [Navigazione veloce](https://triliumnext.github.io/Docs/Wiki/note-navigation) tra gli appunti, ricerca testuale completa e [fissaggio degli appunti](https://triliumnext.github.io/Docs/Wiki/note-hoisting) +* Supporto integrato ed automatico per le [revisioni degli appunti](https://triliumnext.github.io/Docs/Wiki/note-revisions) +* Gli [attributi](https://triliumnext.github.io/Docs/Wiki/attributes) degli appunti possono essere utilizzati per l'organizzazione, per l'interrogazione e per lo scripting avanzato (prorgrammazione). +* [Sincronizzazione](https://triliumnext.github.io/Docs/Wiki/synchronization) con un server di sincronizzazione auto-ospitato + * c'è un [servizio di terze parti per ospitare server di sincronizzazione](https://trilium.cc/paid-hosting) +* [Condivisione](https://triliumnext.github.io/Docs/Wiki/sharing) (pubblicazione) di appunti sull'internet pubblico +* Robusta [crittografia](https://triliumnext.github.io/Docs/Wiki/protected-notes) configurabile singolarmente per ogni appunto +* Disegno di diagrammi con Excalidraw (tipo di appunto "canvas") +* [Mappe relazionali](https://triliumnext.github.io/Docs/Wiki/relation-map) e [mappe di collegamenti](https://triliumnext.github.io/Docs/Wiki/link-map) per visualizzare gli appunti e le loro relazioni +* [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - vedi [Esempi avanzati](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) +* [API REST](https://triliumnext.github.io/Docs/Wiki/etapi) per l'automazione +* Si adatta bene sia in termini di usabilità che di prestazioni fino ad oltre 100 000 appunti +* Interfaccia utente ottimizzata per il [mobile](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) (smartphone e tablet) +* [Tema Notturno](https://triliumnext.github.io/Docs/Wiki/themes) +* Supporto per importazione ed esportazione da e per [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) e [Markdown import](https://triliumnext.github.io/Docs/Wiki/markdown) +* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) per il salvataggio facile di contenuti web + +✨ Dai un'occhiata alle seguenti risorse di terze parti per scoprire altre bellezze legate a TriliumNext: + +-[awesome-trilium](https://github.com/Nriver/awesome-trilium) per temi, script, plugin e altro di terze parti. +- [TriliumRocks!](https://trilium.rocks/) per tutorial, guide e molto altro. +## 🏗 Rilasci + + +Trilium è fornito come applicazione desktop (Linux e Windows) o come applicazione web ospitata sul tuo server (Linux). La versione desktop per Mac OS è disponibile, ma [non è supportata](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support). + +* Se vuoi usare Trilium sul tuo desktop, scarica il rilascio binario per la tua piattaforma dall'[ultimo rilascio](https://github.com/TriliumNext/Notes/releases/latest), decomprimi l'archivio e avvia l'eseguibile ```trilium```. +* Se vuoi installare Trilium su un server, segui [questa pagina](https://triliumnext.github.io/Docs/Wiki/server-installation). + * Per ora solo Chrome e Firefox sono i browser supportati (testati). + +TriliumNext sarà fornito anche come Flatpak: + + + +## 📝 Documentazione + +[Vedi la wiki per una lista completa delle pagine di documentazione.](https://triliumnext.github.io/Docs/) + +Puoi anche leggere ["Patterns of personal knowledge base"](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) per avere un'ispirazione su come potresti utilizzare Trilium. + +## 💻 Contribuire + +Clona localmente ed esegui + +```shell +npm install +npm run start-server +``` + +## 👏 Riconoscimenti + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - miglior editor visuale (WYSIWYG) sul mercato, squadra di sviluppo attenta e reattiva +* [FancyTree](https://github.com/mar10/fancytree) - libreria per alberi molto ricca di funzionalità, senza pari. Trilium Notes non sarebbe lo stesso senza di essa. +* [CodeMirror](https://github.com/codemirror/CodeMirror) - editor di codice con supporto per un'enorme quantità di linguaggi. +* [jsPlumb](https://github.com/jsplumb/jsplumb) - libreria per la connettività visuale senza pari. Utilizzata per [mappe relazionali](https://triliumnext.github.io/Docs/Wiki/relation-map) e [mappe di collegamenti](https://triliumnext.github.io/Docs/Wiki/link-map). + +## 🤝 Supporto + +Puoi sostenere lo sviluppatore originale di Trilium utilizzando gli sponsor di GitHub, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). +Il supporto all'organizzazione TriliumNext sarà possibile nel prossimo futuro. + +## 🔑 Licenza + +Questo programma è software libero: è possibile redistribuirlo e/o modificarlo nei termini della GNU Affero General Public License come pubblicata dalla Free Software Foundation, sia la versione 3 della Licenza, o (a propria scelta) qualsiasi versione successiva. diff --git a/docs/backend_api/media/README.ja.md b/docs/backend_api/media/README.ja.md new file mode 100644 index 000000000..110b779c5 --- /dev/null +++ b/docs/backend_api/media/README.ja.md @@ -0,0 +1,73 @@ +# TriliumNext Notes + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)をご覧ください: + +Trilium Screenshot + +## 🎁 特徴 + +* ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes) を参照) +* マークダウン[オートフォーマット](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)による、表、画像、[数学](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support)などの豊富な WYSIWYG ノート編集機能 +* シンタックスハイライトを含む[ソースコード付きノート](https://triliumnext.github.io/Docs/Wiki/code-notes)の編集をサポート +* [ノート間のナビゲーション](https://triliumnext.github.io/Docs/Wiki/note-navigation)、全文検索、[ノートホイスト](https://triliumnext.github.io/Docs/Wiki/note-hoisting)が高速かつ簡単に行えます +* シームレスな[ノートのバージョン管理](https://triliumnext.github.io/Docs/Wiki/note-revisions) +* ノート[属性](https://triliumnext.github.io/Docs/Wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://triliumnext.github.io/Docs/Wiki/scripts)に使用できます +* 自己ホスト型同期サーバーとの[同期](https://triliumnext.github.io/Docs/Wiki/synchronization) + * [同期サーバーをホストするサードパーティ・サービス](https://trilium.cc/paid-hosting)があります +* 公開インターネットへのノートの[共有](https://triliumnext.github.io/Docs/Wiki/sharing)(公開) +* ノートごとの粒度を持つ強力な[ノート暗号化](https://triliumnext.github.io/Docs/Wiki/protected-notes) +* 組み込みの Excalidraw を使用した図のスケッチ (ノート タイプ"キャンバス") +* ノートとその関係を可視化するための[関係図](https://triliumnext.github.io/Docs/Wiki/relation-map)と[リンクマップ](https://triliumnext.github.io/Docs/Wiki/link-map) +* [スクリプティング](https://triliumnext.github.io/Docs/Wiki/scripts) - [高度なショーケース](https://triliumnext.github.io/Docs/Wiki/advanced-showcases)を参照 +* 自動化のための [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) +* ユーザビリティとパフォーマンスの両方で 100 000 ノート以上に拡張可能 +* スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) +* [ナイトテーマ](https://triliumnext.github.io/Docs/Wiki/themes) +* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) と [Markdown のインポートとエクスポート](https://triliumnext.github.io/Docs/Wiki/Markdown) +* Web コンテンツを簡単に保存するための [Web クリッパー](https://triliumnext.github.io/Docs/Wiki/web-clipper) + +サードパーティのテーマ、スクリプト、プラグインなどは、 [awesome-trilium](https://github.com/Nriver/awesome-trilium) をチェックしてください。 + +## 🏗 ビルド + +Trilium は、デスクトップアプリケーション(Linux、Windows)またはサーバー上でホストされるウェブアプリケーション(Linux)として提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support) となっています。 + +* デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/TriliumNext/Notes/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。 +* サーバーに Trilium をインストールする場合は、[このページ](https://triliumnext.github.io/Docs/Wiki/server-installation)に従ってください。 + * 現在、対応(動作確認)しているブラウザは、最近の Chrome と Firefox のみです。 + +Trilium は Flatpak としても提供されます: + +[](https://flathub.org/apps/details/com.github.zadam.trilium) + +## 📝 ドキュメント + +[ドキュメントページの全リストはwikiをご覧ください。](https://triliumnext.github.io/Docs/) + +また、[個人的な知識基盤のパターン](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge)を読むと、 Trilium の使い方のヒントを得ることができます。 + +## 💻 コントリビュート + +または、ローカルにクローンして実行 + +```shell +npm install +npm run start-server +``` + +## 📢 シャウトアウト + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市場で最高の WYSIWYG エディター、非常にインタラクティブで聞き上手なチーム +* [FancyTree](https://github.com/mar10/fancytree) - 真の競争相手がいない、非常に機能豊富なツリーライブラリです。 Trilium Notes は、これなしでは成り立たないでしょう。 +* [CodeMirror](https://github.com/codemirror/CodeMirror) - 膨大な数の言語をサポートするコードエディタ +* [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://triliumnext.github.io/Docs/Wiki/relation-map)、[リンク図](https://triliumnext.github.io/Docs/Wiki/link-map)で使用。 + +## 🤝 サポート + +GitHub スポンサー、[PayPal](https://paypal.me/za4am)もしくは Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) にて Trilium をサポートすることができます。 + +## 🔑 ライセンス + +このプログラムはフリーソフトウェアです:フリーソフトウェア財団が発行した GNU Affero General Public License のバージョン3、またはそれ以降のバージョンのいずれかに従って、再配布および/または改変することができます。 diff --git a/docs/backend_api/media/README.md b/docs/backend_api/media/README.md new file mode 100644 index 000000000..1800f667e --- /dev/null +++ b/docs/backend_api/media/README.md @@ -0,0 +1,126 @@ +# TriliumNext Notes + +![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total) + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +TriliumNext Notes is an open-source, cross-platform hierarchical note taking application with focus on building large personal knowledge bases. + +See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for quick overview: + +Trilium Screenshot + +## ⚠️ Why TriliumNext? + +[The original Trilium project is in maintenance mode](https://github.com/zadam/trilium/issues/4620) + +### Migrating from Trilium? + +There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation) + +Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented. + +## 💬 Discuss with us + +Feel free to join our official conversations. We would love to hear what features, suggestions, or issues you may have! + +- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions) + - The `General` Matrix room is also bridged to [XMPP](xmpp:discuss@trilium.thisgreat.party?join) +- [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions) +- [Wiki](https://triliumnext.github.io/Docs/) (For common how-to questions and user guides) + +## 🎁 Features + +* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) +* Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) +* Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/code-notes), including syntax highlighting +* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting) +* Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/note-revisions) +* Note [attributes](https://triliumnext.github.io/Docs/Wiki/attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/scripts) +* [Synchronization](https://triliumnext.github.io/Docs/Wiki/synchronization) with self-hosted sync server + * there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting) +* [Sharing](https://triliumnext.github.io/Docs/Wiki/sharing) (publishing) notes to public internet +* Strong [note encryption](https://triliumnext.github.io/Docs/Wiki/protected-notes) with per-note granularity +* Sketching diagrams with built-in Excalidraw (note type "canvas") +* [Relation maps](https://triliumnext.github.io/Docs/Wiki/relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/link-map) for visualizing notes and their relations +* [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - see [Advanced showcases](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) +* [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) for automation +* Scales well in both usability and performance upwards of 100 000 notes +* Touch optimized [mobile frontend](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) for smartphones and tablets +* [Night theme](https://triliumnext.github.io/Docs/Wiki/themes) +* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/markdown) +* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) for easy saving of web content + +✨ Check out the following third-party resources/communities for more TriliumNext related goodies: + +- [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more. +- [TriliumRocks!](https://trilium.rocks/) for tutorials, guides, and much more. + +## 🏗 Installation + +### Desktop + +To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have a few options: + +* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable. +* Access TriliumNext via the web interface of a server installation (see below) + * Currently only the latest versions of Chrome & Firefox are supported (and tested). +* (Coming Soon) TriliumNext will also be provided as a Flatpak + +#### MacOS +Currently when running TriliumNext/Notes on MacOS, you may get the following error: +> Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy. + +You will need to run the command on your shell to resolve the error (documented [here](https://github.com/TriliumNext/Notes/issues/329#issuecomment-2287164137)): + +```bash +xattr -c "/path/to/Trilium Next.app" +``` + +### Mobile + +To use TriliumNext on a mobile device: + +* Use a mobile web browser to access the mobile interface of a server installation (see below) +* Use of a mobile app is not yet supported ([see here](https://github.com/TriliumNext/Notes/issues/72)) to track mobile improvements. + +### Server + +To install TriliumNext on your own server (including via Docker from [Dockerhub](https://hub.docker.com/r/triliumnext/notes)) follow [the server installation docs](https://triliumnext.github.io/Docs/Wiki/server-installation). + +## 📝 Documentation + +[See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs) + +You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) to get some inspiration on how you might use TriliumNext. + +## 💻 Contribute + +### Code + +```shell +git clone https://github.com/TriliumNext/Notes.git +cd Notes +npm install +npm run start-server +``` + +### Documentation + +Head on over to our [Docs repo](https://github.com/TriliumNext/Docs) + +## 👏 Shoutouts + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team +* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. TriliumNext Notes would not be the same without it. +* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages +* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://triliumnext.github.io/Docs/Wiki/relation-map.html) and [link maps](https://triliumnext.github.io/Docs/Wiki/note-map.html#link-map) + +## 🤝 Support + +You can support the original Trilium developer using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). +Support for the TriliumNext organization will be possible in the near future. + +## 🔑 License + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/docs/backend_api/media/README.ru.md b/docs/backend_api/media/README.ru.md new file mode 100644 index 000000000..d78738915 --- /dev/null +++ b/docs/backend_api/media/README.ru.md @@ -0,0 +1,59 @@ +# TriliumNext Notes + +[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md) + +Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://triliumnext.github.io/Docs/Wiki/screenshot-tour): + +Trilium Screenshot + +## 🎁 Возможности + +* Заметки можно расположить в виде дерева произвольной глубины. Отдельную заметку можно разместить в нескольких местах дерева (см. [клонирование](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) +* Продвинутый визуальный редактор (WYSIWYG) позволяет работать с таблицами, изображениями, [формулами](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) и разметкой markdown, имеет [автоформатирование](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) +* Редактирование [заметок с исходным кодом](https://triliumnext.github.io/Docs/Wiki/code-notes), включая подсветку синтаксиса +* Быстрая и простая [навигация между заметками](https://triliumnext.github.io/Docs/Wiki/note-navigation), полнотекстовый поиск и [выделение заметок](https://triliumnext.github.io/Docs/Wiki/note-hoisting) в отдельный блок +* Бесшовное [версионирование заметки](https://triliumnext.github.io/Docs/Wiki/note-revisions) +* Специальные [атрибуты](https://triliumnext.github.io/Docs/Wiki/attributes) позволяют гибко организовать структуру, используются для поиска и продвинутого [скриптинга](https://triliumnext.github.io/Docs/Wiki/scripts) +* [Синхронизация](https://triliumnext.github.io/Docs/Wiki/synchronization) заметок со своим сервером +* Надёжное [шифрование](https://triliumnext.github.io/Docs/Wiki/protected-notes) с детализацией по каждой заметке +* [Карты связей](https://triliumnext.github.io/Docs/Wiki/relation-map) и [карты ссылок](https://triliumnext.github.io/Docs/Wiki/link-map) для визуализации их взяимосвязей +* [Скрипты](https://triliumnext.github.io/Docs/Wiki/scripts) - см. [продвинутые примеры](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) +* Хорошо масштабируется, как по удобству использования, так и по производительности до 100000 заметок +* Оптимизированный [мобильный фронтенд](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) смартфонов и планшетов +* [Темная тема](https://triliumnext.github.io/Docs/Wiki/themes) +* Импорт и экпорт [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) и данных в [markdown](https://triliumnext.github.io/Docs/Wiki/markdown) формате +* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) для удобного сохранения веб-контента + +## 🏗 Сборки + +Trilium предоставляется в виде десктопного приложения (Linux и Windows) или веб-приложения, размещенного на вашем сервере (Linux). Доступна сборка Mac OS, но она [не поддерживается](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support). + +* Если вы хотите использовать Trilium на десктопе, скачайте архив для своей платформы со страницы [релизов](https://github.com/TriliumNext/Notes/releases/latest), распакуйте и запустите исполняемый файл ```trilium```. +* Если вы хотите установить Trilium на сервере, следуйте этой [инструкции](https://triliumnext.github.io/Docs/Wiki/server-installation). + * В данный момент поддерживаются (протестированы) последние версии браузеров Chrome и Firefox. + +## 📝 Документация + +[Полный список страниц документации доступен в Wiki.](https://triliumnext.github.io/Docs/) + +Вы также можете ознакомиться с [шаблонами персональных баз знаний](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge), чтобы получить представление о том, как можно использовать Trilium. + +## 💻 Участвуйте в разработке + +Или склонируйте на своё устройство и запустите + +```shell +npm install +npm run start-server +``` + +## 👏 Благодарности + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - лучший WYSIWYG редактор, очень активная и внимательная команда. +* [FancyTree](https://github.com/mar10/fancytree) - многофункциональная библиотека для создания древовидных структур. Вне конкуренции. Без него Trilium Notes не были бы таким. +* [CodeMirror](https://github.com/codemirror/CodeMirror) - редактор кода с поддержкой огромного количество языков. +* [jsPlumb](https://github.com/jsplumb/jsplumb) - библиотека для визуализации связей. Вне конкуренции. Используется в [картах связей](https://triliumnext.github.io/Docs/Wiki/relation-map) и [картах ссылок](https://triliumnext.github.io/Docs/Wiki/link-map). + +## 🔑 Лицензия + +Эта программа является бесплатным программным обеспечением: вы можете распространять и/или изменять ее в соответствии с условиями GNU Affero General Public License, опубликованной Free Software Foundation, либо версии 3 Лицензии, либо (по вашему выбору) любой более поздней версии. diff --git a/docs/backend_api/module-sql.html b/docs/backend_api/module-sql.html deleted file mode 100644 index e254a5b39..000000000 --- a/docs/backend_api/module-sql.html +++ /dev/null @@ -1,1309 +0,0 @@ - - - - - JSDoc: Module: sql - - - - - - - - - - -
- -

Module: sql

- - - - - - -
- -
- -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) execute(query, paramsopt)

- - - - - - -
- Execute SQL -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(static) getColumn(query, paramsopt) → {Array.<object>}

- - - - - - -
- Get a first column in an array. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - array of first column of all returned rows -
- - - -
-
- Type -
-
- -Array.<object> - - -
-
- - - - - - - - - - - - - -

(static) getMap(query, paramsopt) → {object}

- - - - - - -
- Get a map of first column mapping to second column. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - map of first column to second column -
- - - -
-
- Type -
-
- -object - - -
-
- - - - - - - - - - - - - -

(static) getRow(query, paramsopt) → {object}

- - - - - - -
- Get first returned row. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - map of column name to column value -
- - - -
-
- Type -
-
- -object - - -
-
- - - - - - - - - - - - - -

(static) getRows(query, paramsopt) → {Array.<object>}

- - - - - - -
- Get all returned rows. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- - array of all rows, each row is a map of column name to column value -
- - - -
-
- Type -
-
- -Array.<object> - - -
-
- - - - - - - - - - - - - -

(static) getValue(query, paramsopt)

- - - - - - -
- Get single value from the given query - first column from first returned row. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
query - - -string - - - - - - - - - - SQL query with ? used as parameter placeholder
params - - -Array.<object> - - - - - - <optional>
- - - - - -
array of params if needed
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
- [object] - single value -
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/backend_api/modules.html b/docs/backend_api/modules.html new file mode 100644 index 000000000..9474eb0f2 --- /dev/null +++ b/docs/backend_api/modules.html @@ -0,0 +1 @@ +trilium
diff --git a/docs/backend_api/modules/becca_entities_abstract_becca_entity.html b/docs/backend_api/modules/becca_entities_abstract_becca_entity.html new file mode 100644 index 000000000..0f74e1eca --- /dev/null +++ b/docs/backend_api/modules/becca_entities_abstract_becca_entity.html @@ -0,0 +1 @@ +becca/entities/abstract_becca_entity | trilium

Module becca/entities/abstract_becca_entity

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_battachment.html b/docs/backend_api/modules/becca_entities_battachment.html new file mode 100644 index 000000000..3aaf18d5b --- /dev/null +++ b/docs/backend_api/modules/becca_entities_battachment.html @@ -0,0 +1 @@ +becca/entities/battachment | trilium

Module becca/entities/battachment

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_battribute.html b/docs/backend_api/modules/becca_entities_battribute.html new file mode 100644 index 000000000..c0c8afd9e --- /dev/null +++ b/docs/backend_api/modules/becca_entities_battribute.html @@ -0,0 +1 @@ +becca/entities/battribute | trilium

Module becca/entities/battribute

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_bblob.html b/docs/backend_api/modules/becca_entities_bblob.html new file mode 100644 index 000000000..753ea4928 --- /dev/null +++ b/docs/backend_api/modules/becca_entities_bblob.html @@ -0,0 +1 @@ +becca/entities/bblob | trilium

Module becca/entities/bblob

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_bbranch.html b/docs/backend_api/modules/becca_entities_bbranch.html new file mode 100644 index 000000000..91127d8c0 --- /dev/null +++ b/docs/backend_api/modules/becca_entities_bbranch.html @@ -0,0 +1 @@ +becca/entities/bbranch | trilium

Module becca/entities/bbranch

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_betapi_token.html b/docs/backend_api/modules/becca_entities_betapi_token.html new file mode 100644 index 000000000..f15402d96 --- /dev/null +++ b/docs/backend_api/modules/becca_entities_betapi_token.html @@ -0,0 +1 @@ +becca/entities/betapi_token | trilium

Module becca/entities/betapi_token

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_bnote.html b/docs/backend_api/modules/becca_entities_bnote.html new file mode 100644 index 000000000..69812731d --- /dev/null +++ b/docs/backend_api/modules/becca_entities_bnote.html @@ -0,0 +1 @@ +becca/entities/bnote | trilium

Module becca/entities/bnote

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_boption.html b/docs/backend_api/modules/becca_entities_boption.html new file mode 100644 index 000000000..c4a31d7fc --- /dev/null +++ b/docs/backend_api/modules/becca_entities_boption.html @@ -0,0 +1 @@ +becca/entities/boption | trilium

Module becca/entities/boption

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_brecent_note.html b/docs/backend_api/modules/becca_entities_brecent_note.html new file mode 100644 index 000000000..b05f29ca6 --- /dev/null +++ b/docs/backend_api/modules/becca_entities_brecent_note.html @@ -0,0 +1 @@ +becca/entities/brecent_note | trilium

Module becca/entities/brecent_note

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_brevision.html b/docs/backend_api/modules/becca_entities_brevision.html new file mode 100644 index 000000000..13307b607 --- /dev/null +++ b/docs/backend_api/modules/becca_entities_brevision.html @@ -0,0 +1 @@ +becca/entities/brevision | trilium

Module becca/entities/brevision

Classes

default
diff --git a/docs/backend_api/modules/becca_entities_rows.html b/docs/backend_api/modules/becca_entities_rows.html new file mode 100644 index 000000000..83ab95bdc --- /dev/null +++ b/docs/backend_api/modules/becca_entities_rows.html @@ -0,0 +1 @@ +becca/entities/rows | trilium
diff --git a/docs/backend_api/modules/services_backend_script_api.html b/docs/backend_api/modules/services_backend_script_api.html new file mode 100644 index 000000000..94a7273cf --- /dev/null +++ b/docs/backend_api/modules/services_backend_script_api.html @@ -0,0 +1 @@ +services/backend_script_api | trilium

Module services/backend_script_api

Variables

default
diff --git a/docs/backend_api/modules/services_sql.html b/docs/backend_api/modules/services_sql.html new file mode 100644 index 000000000..f845ae612 --- /dev/null +++ b/docs/backend_api/modules/services_sql.html @@ -0,0 +1 @@ +services/sql | trilium

Module services/sql

Variables

default
diff --git a/docs/backend_api/scripts/linenumber.js b/docs/backend_api/scripts/linenumber.js deleted file mode 100644 index 4354785ce..000000000 --- a/docs/backend_api/scripts/linenumber.js +++ /dev/null @@ -1,25 +0,0 @@ -/*global document */ -(() => { - const source = document.getElementsByClassName('prettyprint source linenums'); - let i = 0; - let lineNumber = 0; - let lineId; - let lines; - let totalLines; - let anchorHash; - - if (source && source[0]) { - anchorHash = document.location.hash.substring(1); - lines = source[0].getElementsByTagName('li'); - totalLines = lines.length; - - for (; i < totalLines; i++) { - lineNumber++; - lineId = `line${lineNumber}`; - lines[i].id = lineId; - if (lineId === anchorHash) { - lines[i].className += ' selected'; - } - } - } -})(); diff --git a/docs/backend_api/scripts/prettify/Apache-License-2.0.txt b/docs/backend_api/scripts/prettify/Apache-License-2.0.txt deleted file mode 100644 index d64569567..000000000 --- a/docs/backend_api/scripts/prettify/Apache-License-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/backend_api/scripts/prettify/lang-css.js b/docs/backend_api/scripts/prettify/lang-css.js deleted file mode 100644 index 041e1f590..000000000 --- a/docs/backend_api/scripts/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/backend_api/scripts/prettify/prettify.js b/docs/backend_api/scripts/prettify/prettify.js deleted file mode 100644 index eef5ad7e6..000000000 --- a/docs/backend_api/scripts/prettify/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - - - - JSDoc: Source: services/backend_script_api.js - - - - - - - - - - -
- -

Source: services/backend_script_api.js

- - - - - - -
-
-
const log = require('./log');
-const noteService = require('./notes');
-const sql = require('./sql');
-const utils = require('./utils');
-const attributeService = require('./attributes');
-const dateNoteService = require('./date_notes');
-const treeService = require('./tree');
-const config = require('./config');
-const axios = require('axios');
-const dayjs = require('dayjs');
-const xml2js = require('xml2js');
-const cloningService = require('./cloning');
-const appInfo = require('./app_info');
-const searchService = require('./search/services/search');
-const SearchContext = require("./search/search_context");
-const becca = require("../becca/becca");
-const ws = require("./ws");
-const SpacedUpdate = require("./spaced_update");
-const specialNotesService = require("./special_notes");
-const branchService = require("./branches");
-const exportService = require("./export/zip");
-const syncMutex = require("./sync_mutex");
-const backupService = require("./backup");
-const optionsService = require("./options");
-
-
-/**
- * A whole number
- * @typedef {number} int
- */
-
-/**
- * An instance of the frontend api available globally.
- * @global
- * @var {BackendScriptApi} api
- */
-
-/**
- * <p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
- * available in the JS backend notes. You can use e.g. <code>api.log(api.startNote.title);</code></p>
- *
- * @constructor
- */
-function BackendScriptApi(currentNote, apiParams) {
-    /**
-     * Note where the script started executing
-     * @type {BNote}
-     */
-    this.startNote = apiParams.startNote;
-    /**
-     * Note where the script is currently executing. Don't mix this up with the concept of active note
-     * @type {BNote}
-     */
-    this.currentNote = currentNote;
-    /**
-     * Entity whose event triggered this execution
-     * @type {AbstractBeccaEntity}
-     */
-    this.originEntity = apiParams.originEntity;
-
-    for (const key in apiParams) {
-        this[key] = apiParams[key];
-    }
-
-    /**
-     * Axios library for HTTP requests. See {@link https://axios-http.com} for documentation
-     * @type {axios}
-     * @deprecated use native (browser compatible) fetch() instead
-     */
-    this.axios = axios;
-    /**
-     * day.js library for date manipulation. See {@link https://day.js.org} for documentation
-     * @type {dayjs}
-     */
-    this.dayjs = dayjs;
-    /**
-     * xml2js library for XML parsing. See {@link https://github.com/Leonidas-from-XIV/node-xml2js} for documentation
-     * @type {xml2js}
-     */
-    this.xml2js = xml2js;
-
-    /**
-     * Instance name identifies particular Trilium instance. It can be useful for scripts
-     * if some action needs to happen on only one specific instance.
-     *
-     * @returns {string|null}
-     */
-    this.getInstanceName = () => config.General ? config.General.instanceName : null;
-
-    /**
-     * @method
-     * @param {string} noteId
-     * @returns {BNote|null}
-     */
-    this.getNote = noteId => becca.getNote(noteId);
-
-    /**
-     * @method
-     * @param {string} branchId
-     * @returns {BBranch|null}
-     */
-    this.getBranch = branchId => becca.getBranch(branchId);
-
-    /**
-     * @method
-     * @param {string} attributeId
-     * @returns {BAttribute|null}
-     */
-    this.getAttribute = attributeId => becca.getAttribute(attributeId);
-
-    /**
-     * @method
-     * @param {string} attachmentId
-     * @returns {BAttachment|null}
-     */
-    this.getAttachment = attachmentId => becca.getAttachment(attachmentId);
-
-    /**
-     * @method
-     * @param {string} revisionId
-     * @returns {BRevision|null}
-     */
-    this.getRevision = revisionId => becca.getRevision(revisionId);
-
-    /**
-     * @method
-     * @param {string} etapiTokenId
-     * @returns {BEtapiToken|null}
-     */
-    this.getEtapiToken = etapiTokenId => becca.getEtapiToken(etapiTokenId);
-
-    /**
-     * @method
-     * @returns {BEtapiToken[]}
-     */
-    this.getEtapiTokens = () => becca.getEtapiTokens();
-
-    /**
-     * @method
-     * @param {string} optionName
-     * @returns {BOption|null}
-     */
-    this.getOption = optionName => becca.getOption(optionName);
-
-    /**
-     * @method
-     * @returns {BOption[]}
-     */
-    this.getOptions = () => optionsService.getOptions();
-
-    /**
-     * @method
-     * @param {string} attributeId
-     * @returns {BAttribute|null}
-     */
-    this.getAttribute = attributeId => becca.getAttribute(attributeId);
-
-    /**
-     * This is a powerful search method - you can search by attributes and their values, e.g.:
-     * "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
-     *
-     * @method
-     * @param {string} query
-     * @param {Object} [searchParams]
-     * @returns {BNote[]}
-     */
-    this.searchForNotes = (query, searchParams = {}) => {
-        if (searchParams.includeArchivedNotes === undefined) {
-            searchParams.includeArchivedNotes = true;
-        }
-
-        if (searchParams.ignoreHoistedNote === undefined) {
-            searchParams.ignoreHoistedNote = true;
-        }
-
-        const noteIds = searchService.findResultsWithQuery(query, new SearchContext(searchParams))
-            .map(sr => sr.noteId);
-
-        return becca.getNotes(noteIds);
-    };
-
-    /**
-     * This is a powerful search method - you can search by attributes and their values, e.g.:
-     * "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
-     *
-     * @method
-     * @param {string} query
-     * @param {Object} [searchParams]
-     * @returns {BNote|null}
-     */
-    this.searchForNote = (query, searchParams = {}) => {
-        const notes = this.searchForNotes(query, searchParams);
-
-        return notes.length > 0 ? notes[0] : null;
-    };
-
-    /**
-     * Retrieves notes with given label name & value
-     *
-     * @method
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value
-     * @returns {BNote[]}
-     */
-    this.getNotesWithLabel = attributeService.getNotesWithLabel;
-
-    /**
-     * Retrieves first note with given label name & value
-     *
-     * @method
-     * @param {string} name - attribute name
-     * @param {string} [value] - attribute value
-     * @returns {BNote|null}
-     */
-    this.getNoteWithLabel = attributeService.getNoteWithLabel;
-
-    /**
-     * If there's no branch between note and parent note, create one. Otherwise, do nothing. Returns the new or existing branch.
-     *
-     * @method
-     * @param {string} noteId
-     * @param {string} parentNoteId
-     * @param {string} prefix - if branch is created between note and parent note, set this prefix
-     * @returns {{branch: BBranch|null}}
-     */
-    this.ensureNoteIsPresentInParent = cloningService.ensureNoteIsPresentInParent;
-
-    /**
-     * If there's a branch between note and parent note, remove it. Otherwise, do nothing.
-     *
-     * @method
-     * @param {string} noteId
-     * @param {string} parentNoteId
-     * @returns {void}
-     */
-    this.ensureNoteIsAbsentFromParent = cloningService.ensureNoteIsAbsentFromParent;
-
-    /**
-     * Based on the value, either create or remove branch between note and parent note.
-     *
-     * @method
-     * @param {boolean} present - true if we want the branch to exist, false if we want it gone
-     * @param {string} noteId
-     * @param {string} parentNoteId
-     * @param {string} prefix - if branch is created between note and parent note, set this prefix
-     * @returns {void}
-     */
-    this.toggleNoteInParent = cloningService.toggleNoteInParent;
-
-    /**
-     * Create text note. See also createNewNote() for more options.
-     *
-     * @method
-     * @param {string} parentNoteId
-     * @param {string} title
-     * @param {string} content
-     * @returns {{note: BNote, branch: BBranch}} - object having "note" and "branch" keys representing respective objects
-     */
-    this.createTextNote = (parentNoteId, title, content = '') => noteService.createNewNote({
-        parentNoteId,
-        title,
-        content,
-        type: 'text'
-    });
-
-    /**
-     * Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
-     * JSON MIME type. See also createNewNote() for more options.
-     *
-     * @method
-     * @param {string} parentNoteId
-     * @param {string} title
-     * @param {object} content
-     * @returns {{note: BNote, branch: BBranch}} object having "note" and "branch" keys representing respective objects
-     */
-    this.createDataNote = (parentNoteId, title, content = {}) => noteService.createNewNote({
-        parentNoteId,
-        title,
-        content: JSON.stringify(content, null, '\t'),
-        type: 'code',
-        mime: 'application/json'
-    });
-
-    /**
-     * @method
-     *
-     * @param {object} params
-     * @param {string} params.parentNoteId
-     * @param {string} params.title
-     * @param {string|Buffer} params.content
-     * @param {NoteType} params.type - text, code, file, image, search, book, relationMap, canvas
-     * @param {string} [params.mime] - value is derived from default mimes for type
-     * @param {boolean} [params.isProtected=false]
-     * @param {boolean} [params.isExpanded=false]
-     * @param {string} [params.prefix='']
-     * @param {int} [params.notePosition] - default is last existing notePosition in a parent + 10
-     * @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
-     */
-    this.createNewNote = noteService.createNewNote;
-
-    /**
-     * @method
-     * @deprecated please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs
-     *
-     * @param {string} parentNoteId - create new note under this parent
-     * @param {string} title
-     * @param {string} [content=""]
-     * @param {object} [extraOptions={}]
-     * @param {boolean} [extraOptions.json=false] - should the note be JSON
-     * @param {boolean} [extraOptions.isProtected=false] - should the note be protected
-     * @param {string} [extraOptions.type='text'] - note type
-     * @param {string} [extraOptions.mime='text/html'] - MIME type of the note
-     * @param {object[]} [extraOptions.attributes=[]] - attributes to be created for this note
-     * @param {AttributeType} extraOptions.attributes.type - attribute type - label, relation etc.
-     * @param {string} extraOptions.attributes.name - attribute name
-     * @param {string} [extraOptions.attributes.value] - attribute value
-     * @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
-     */
-    this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {
-        extraOptions.parentNoteId = parentNoteId;
-        extraOptions.title = title;
-
-        const parentNote = becca.getNote(parentNoteId);
-
-        // code note type can be inherited, otherwise "text" is the default
-        extraOptions.type = parentNote.type === 'code' ? 'code' : 'text';
-        extraOptions.mime = parentNote.type === 'code' ? parentNote.mime : 'text/html';
-
-        if (extraOptions.json) {
-            extraOptions.content = JSON.stringify(content || {}, null, '\t');
-            extraOptions.type = 'code';
-            extraOptions.mime = 'application/json';
-        }
-        else {
-            extraOptions.content = content;
-        }
-
-        return sql.transactional(() => {
-            const {note, branch} = noteService.createNewNote(extraOptions);
-
-            for (const attr of extraOptions.attributes || []) {
-                attributeService.createAttribute({
-                    noteId: note.noteId,
-                    type: attr.type,
-                    name: attr.name,
-                    value: attr.value,
-                    isInheritable: !!attr.isInheritable
-                });
-            }
-
-            return {note, branch};
-        });
-    };
-
-    this.logMessages = {};
-    this.logSpacedUpdates = {};
-
-    /**
-     * Log given message to trilium logs and log pane in UI
-     *
-     * @method
-     * @param message
-     * @returns {void}
-     */
-    this.log = message => {
-        log.info(message);
-
-        const {noteId} = this.startNote;
-
-        this.logMessages[noteId] = this.logMessages[noteId] || [];
-        this.logSpacedUpdates[noteId] = this.logSpacedUpdates[noteId] || new SpacedUpdate(() => {
-            const messages = this.logMessages[noteId];
-            this.logMessages[noteId] = [];
-
-            ws.sendMessageToAllClients({
-                type: 'api-log-messages',
-                noteId,
-                messages
-            });
-        }, 100);
-
-        this.logMessages[noteId].push(message);
-        this.logSpacedUpdates[noteId].scheduleUpdate();
-    };
-
-    /**
-     * Returns root note of the calendar.
-     *
-     * @method
-     * @returns {BNote|null}
-     */
-    this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
-
-    /**
-     * Returns day note for given date. If such note doesn't exist, it is created.
-     *
-     * @method
-     * @param {string} date in YYYY-MM-DD format
-     * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
-     * @returns {BNote|null}
-     */
-    this.getDayNote = dateNoteService.getDayNote;
-
-    /**
-     * Returns today's day note. If such note doesn't exist, it is created.
-     *
-     * @method
-     * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
-     * @returns {BNote|null}
-     */
-    this.getTodayNote = dateNoteService.getTodayNote;
-
-    /**
-     * Returns note for the first date of the week of the given date.
-     *
-     * @method
-     * @param {string} date in YYYY-MM-DD format
-     * @param {object} [options]
-     * @param {string} [options.startOfTheWeek=monday] - either "monday" (default) or "sunday"
-     * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
-     * @returns {BNote|null}
-     */
-    this.getWeekNote = dateNoteService.getWeekNote;
-
-    /**
-     * Returns month note for given date. If such a note doesn't exist, it is created.
-     *
-     * @method
-     * @param {string} date in YYYY-MM format
-     * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
-     * @returns {BNote|null}
-     */
-    this.getMonthNote = dateNoteService.getMonthNote;
-
-    /**
-     * Returns year note for given year. If such a note doesn't exist, it is created.
-     *
-     * @method
-     * @param {string} year in YYYY format
-     * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
-     * @returns {BNote|null}
-     */
-    this.getYearNote = dateNoteService.getYearNote;
-
-    /**
-     * Sort child notes of a given note.
-     *
-     * @method
-     * @param {string} parentNoteId - this note's child notes will be sorted
-     * @param {object} [sortConfig]
-     * @param {string} [sortConfig.sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name
-     *                                See {@link https://github.com/zadam/trilium/wiki/Sorting} for details.
-     * @param {boolean} [sortConfig.reverse=false]
-     * @param {boolean} [sortConfig.foldersFirst=false]
-     * @returns {void}
-     */
-    this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(
-        parentNoteId,
-        sortConfig.sortBy || "title",
-        !!sortConfig.reverse,
-        !!sortConfig.foldersFirst
-    );
-
-    /**
-     * This method finds note by its noteId and prefix and either sets it to the given parentNoteId
-     * or removes the branch (if parentNoteId is not given).
-     *
-     * This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
-     *
-     * @method
-     * @deprecated this method is pretty confusing and serves specialized purpose only
-     * @param {string} noteId
-     * @param {string} prefix
-     * @param {string|null} parentNoteId
-     * @returns {void}
-     */
-    this.setNoteToParent = treeService.setNoteToParent;
-
-    /**
-     * This functions wraps code which is supposed to be running in transaction. If transaction already
-     * exists, then we'll use that transaction.
-     *
-     * @method
-     * @param {function} func
-     * @returns {any} result of func callback
-     */
-    this.transactional = sql.transactional;
-
-    /**
-     * Return randomly generated string of given length. This random string generation is NOT cryptographically secure.
-     *
-     * @method
-     * @param {int} length of the string
-     * @returns {string} random string
-     */
-    this.randomString = utils.randomString;
-
-    /**
-     * @method
-     * @param {string} string to escape
-     * @returns {string} escaped string
-     */
-    this.escapeHtml = utils.escapeHtml;
-
-    /**
-     * @method
-     * @param {string} string to unescape
-     * @returns {string} unescaped string
-     */
-    this.unescapeHtml = utils.unescapeHtml;
-
-    /**
-     * sql
-     * @type {module:sql}
-     */
-    this.sql = sql;
-
-    /**
-     * @method
-     * @returns {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
-     */
-    this.getAppInfo = () => appInfo;
-
-    /**
-     * Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
-     *
-     * @method
-     * @param {object} opts
-     * @param {string} opts.id - id of the launcher, only alphanumeric at least 6 characters long
-     * @param {"note" | "script" | "customWidget"} opts.type - one of
-     *                          * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
-     *                          * "script" -  activating the launcher will execute the script (specified in scriptNoteId param)
-     *                          * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
-     * @param {string} opts.title
-     * @param {boolean} [opts.isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
-     * @param {string} [opts.icon] - name of the boxicon to be used (e.g. "bx-time")
-     * @param {string} [opts.keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"
-     * @param {string} [opts.targetNoteId] - for type "note"
-     * @param {string} [opts.scriptNoteId] - for type "script"
-     * @param {string} [opts.widgetNoteId] - for type "customWidget"
-     * @returns {{note: BNote}}
-     */
-    this.createOrUpdateLauncher = opts => {
-        if (!opts.id) { throw new Error("ID is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
-        if (!opts.id.match(/[a-z0-9]{6,1000}/i)) { throw new Error(`ID must be an alphanumeric string at least 6 characters long.`); }
-        if (!opts.type) { throw new Error("Launcher Type is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
-        if (!["note", "script", "customWidget"].includes(opts.type)) { throw new Error(`Given launcher type '${opts.type}'`); }
-        if (!opts.title?.trim()) { throw new Error("Title is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
-        if (opts.type === 'note' && !opts.targetNoteId) { throw new Error("targetNoteId is mandatory for launchers of type 'note'"); }
-        if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }
-        if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }
-
-        const parentNoteId = opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';
-        const noteId = 'al_' + opts.id;
-
-        const launcherNote =
-            becca.getNote(noteId) ||
-            specialNotesService.createLauncher({
-                noteId: noteId,
-                parentNoteId: parentNoteId,
-                launcherType: opts.type,
-            }).note;
-
-        if (launcherNote.title !== opts.title) {
-            launcherNote.title = opts.title;
-            launcherNote.save();
-        }
-
-        if (launcherNote.getParentBranches().length === 1) {
-            const branch = launcherNote.getParentBranches()[0];
-
-            if (branch.parentNoteId !== parentNoteId) {
-                branchService.moveBranchToNote(branch, parentNoteId);
-            }
-        }
-
-        if (opts.type === 'note') {
-            launcherNote.setRelation('target', opts.targetNoteId);
-        } else if (opts.type === 'script') {
-            launcherNote.setRelation('script', opts.scriptNoteId);
-        } else if (opts.type === 'customWidget') {
-            launcherNote.setRelation('widget', opts.widgetNoteId);
-        } else {
-            throw new Error(`Unrecognized launcher type '${opts.type}'`);
-        }
-
-        if (opts.keyboardShortcut) {
-            launcherNote.setLabel('keyboardShortcut', opts.keyboardShortcut);
-        } else {
-            launcherNote.removeLabel('keyboardShortcut');
-        }
-
-        if (opts.icon) {
-            launcherNote.setLabel('iconClass', `bx ${opts.icon}`);
-        } else {
-            launcherNote.removeLabel('iconClass');
-        }
-
-        return {note: launcherNote};
-    };
-
-    /**
-     * @method
-     * @param {string} noteId
-     * @param {string} format - either 'html' or 'markdown'
-     * @param {string} zipFilePath
-     * @returns {Promise<void>}
-     */
-    this.exportSubtreeToZipFile = async (noteId, format, zipFilePath) => await exportService.exportToZipFile(noteId, format, zipFilePath);
-
-    /**
-     * Executes given anonymous function on the frontend(s).
-     * Internally, this serializes the anonymous function into string and sends it to frontend(s) via WebSocket.
-     * Note that there can be multiple connected frontend instances (e.g. in different tabs). In such case, all
-     * instances execute the given function.
-     *
-     * @method
-     * @param {string} script - script to be executed on the frontend
-     * @param {Array.<?>} params - list of parameters to the anonymous function to be sent to frontend
-     * @returns {undefined} - no return value is provided.
-     */
-    this.runOnFrontend = async (script, params = []) => {
-        if (typeof script === "function") {
-            script = script.toString();
-        }
-
-        ws.sendMessageToAllClients({
-            type: 'execute-script',
-            script: script,
-            params: prepareParams(params),
-            startNoteId: this.startNote.noteId,
-            currentNoteId: this.currentNote.noteId,
-            originEntityName: "notes", // currently there's no other entity on the frontend which can trigger event
-            originEntityId: this.originEntity?.noteId || null
-        });
-
-        function prepareParams(params) {
-            if (!params) {
-                return params;
-            }
-
-            return params.map(p => {
-                if (typeof p === "function") {
-                    return `!@#Function: ${p.toString()}`;
-                }
-                else {
-                    return p;
-                }
-            });
-        }
-    };
-
-    /**
-     * Sync process can make data intermittently inconsistent. Scripts which require strong data consistency
-     * can use this function to wait for a possible sync process to finish and prevent new sync process from starting
-     * while it is running.
-     *
-     * Because this is an async process, the inner callback doesn't have automatic transaction handling, so in case
-     * you need to make some DB changes, you need to surround your call with api.transactional(...)
-     *
-     * @method
-     * @param {function} callback - function to be executed while sync process is not running
-     * @returns {Promise} - resolves once the callback is finished (callback is awaited)
-     */
-    this.runOutsideOfSync = syncMutex.doExclusively;
-
-    /**
-     * @method
-     * @param {string} backupName - If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file
-     * @returns {Promise} - resolves once the backup is finished
-     */
-    this.backupNow = backupService.backupNow;
-
-    /**
-     * This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
-     *
-     * @property {Becca} becca - provides access to the backend in-memory object graph, see {@link https://github.com/zadam/trilium/blob/master/src/becca/becca.js}
-     */
-    this.__private = {
-        becca
-    }
-}
-
-module.exports = BackendScriptApi;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/services_sql.js.html b/docs/backend_api/services_sql.js.html deleted file mode 100644 index d4d7461bc..000000000 --- a/docs/backend_api/services_sql.js.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - JSDoc: Source: services/sql.js - - - - - - - - - - -
- -

Source: services/sql.js

- - - - - - -
-
-
"use strict";
-
-/**
- * @module sql
- */
-
-const log = require('./log');
-const Database = require('better-sqlite3');
-const dataDir = require('./data_dir');
-const cls = require('./cls');
-const fs = require("fs-extra");
-
-const dbConnection = new Database(dataDir.DOCUMENT_PATH);
-dbConnection.pragma('journal_mode = WAL');
-
-const LOG_ALL_QUERIES = false;
-
-[`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach(eventType => {
-    process.on(eventType, () => {
-        if (dbConnection) {
-            // closing connection is especially important to fold -wal file into the main DB file
-            // (see https://sqlite.org/tempfiles.html for details)
-            dbConnection.close();
-        }
-    });
-});
-
-function insert(tableName, rec, replace = false) {
-    const keys = Object.keys(rec || {});
-    if (keys.length === 0) {
-        log.error(`Can't insert empty object into table ${tableName}`);
-        return;
-    }
-
-    const columns = keys.join(", ");
-    const questionMarks = keys.map(p => "?").join(", ");
-
-    const query = `INSERT
-    ${replace ? "OR REPLACE" : ""} INTO
-    ${tableName}
-    (
-    ${columns}
-    )
-    VALUES (${questionMarks})`;
-
-    const res = execute(query, Object.values(rec));
-
-    return res ? res.lastInsertRowid : null;
-}
-
-function replace(tableName, rec) {
-    return insert(tableName, rec, true);
-}
-
-function upsert(tableName, primaryKey, rec) {
-    const keys = Object.keys(rec || {});
-    if (keys.length === 0) {
-        log.error(`Can't upsert empty object into table ${tableName}`);
-        return;
-    }
-
-    const columns = keys.join(", ");
-
-    const questionMarks = keys.map(colName => `@${colName}`).join(", ");
-
-    const updateMarks = keys.map(colName => `${colName} = @${colName}`).join(", ");
-
-    const query = `INSERT INTO ${tableName} (${columns}) VALUES (${questionMarks}) 
-                   ON CONFLICT (${primaryKey}) DO UPDATE SET ${updateMarks}`;
-
-    for (const idx in rec) {
-        if (rec[idx] === true || rec[idx] === false) {
-            rec[idx] = rec[idx] ? 1 : 0;
-        }
-    }
-
-    execute(query, rec);
-}
-
-const statementCache = {};
-
-function stmt(sql) {
-    if (!(sql in statementCache)) {
-        statementCache[sql] = dbConnection.prepare(sql);
-    }
-
-    return statementCache[sql];
-}
-
-function getRow(query, params = []) {
-    return wrap(query, s => s.get(params));
-}
-
-function getRowOrNull(query, params = []) {
-    const all = getRows(query, params);
-
-    return all.length > 0 ? all[0] : null;
-}
-
-function getValue(query, params = []) {
-    return wrap(query, s => s.pluck().get(params));
-}
-
-// smaller values can result in better performance due to better usage of statement cache
-const PARAM_LIMIT = 100;
-
-function getManyRows(query, params) {
-    let results = [];
-
-    while (params.length > 0) {
-        const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));
-        params = params.slice(curParams.length);
-
-        const curParamsObj = {};
-
-        let j = 1;
-        for (const param of curParams) {
-            curParamsObj['param' + j++] = param;
-        }
-
-        let i = 1;
-        const questionMarks = curParams.map(() => ":param" + i++).join(",");
-        const curQuery = query.replace(/\?\?\?/g, questionMarks);
-
-        const statement = curParams.length === PARAM_LIMIT
-            ? stmt(curQuery)
-            : dbConnection.prepare(curQuery);
-
-        const subResults = statement.all(curParamsObj);
-        results = results.concat(subResults);
-    }
-
-    return results;
-}
-
-function getRows(query, params = []) {
-    return wrap(query, s => s.all(params));
-}
-
-function getRawRows(query, params = []) {
-    return wrap(query, s => s.raw().all(params));
-}
-
-function iterateRows(query, params = []) {
-    if (LOG_ALL_QUERIES) {
-        console.log(query);
-    }
-
-    return stmt(query).iterate(params);
-}
-
-function getMap(query, params = []) {
-    const map = {};
-    const results = getRawRows(query, params);
-
-    for (const row of results) {
-        map[row[0]] = row[1];
-    }
-
-    return map;
-}
-
-function getColumn(query, params = []) {
-    return wrap(query, s => s.pluck().all(params));
-}
-
-function execute(query, params = []) {
-    return wrap(query, s => s.run(params));
-}
-
-function executeMany(query, params) {
-    if (LOG_ALL_QUERIES) {
-        console.log(query);
-    }
-
-    while (params.length > 0) {
-        const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));
-        params = params.slice(curParams.length);
-
-        const curParamsObj = {};
-
-        let j = 1;
-        for (const param of curParams) {
-            curParamsObj['param' + j++] = param;
-        }
-
-        let i = 1;
-        const questionMarks = curParams.map(() => ":param" + i++).join(",");
-        const curQuery = query.replace(/\?\?\?/g, questionMarks);
-
-        dbConnection.prepare(curQuery).run(curParamsObj);
-    }
-}
-
-function executeScript(query) {
-    if (LOG_ALL_QUERIES) {
-        console.log(query);
-    }
-
-    return dbConnection.exec(query);
-}
-
-function wrap(query, func) {
-    const startTimestamp = Date.now();
-    let result;
-
-    if (LOG_ALL_QUERIES) {
-        console.log(query);
-    }
-
-    try {
-        result = func(stmt(query));
-    }
-    catch (e) {
-        if (e.message.includes("The database connection is not open")) {
-            // this often happens on killing the app which puts these alerts in front of user
-            // in these cases error should be simply ignored.
-            console.log(e.message);
-
-            return null;
-        }
-
-        throw e;
-    }
-
-    const milliseconds = Date.now() - startTimestamp;
-
-    if (milliseconds >= 20 && !cls.isSlowQueryLoggingDisabled()) {
-        if (query.includes("WITH RECURSIVE")) {
-            log.info(`Slow recursive query took ${milliseconds}ms.`);
-        }
-        else {
-            log.info(`Slow query took ${milliseconds}ms: ${query.trim().replace(/\s+/g, " ")}`);
-        }
-    }
-
-    return result;
-}
-
-function transactional(func) {
-    try {
-        const ret = dbConnection.transaction(func).deferred();
-
-        if (!dbConnection.inTransaction) { // i.e. transaction was really committed (and not just savepoint released)
-            require('./ws').sendTransactionEntityChangesToAllClients();
-        }
-
-        return ret;
-    }
-    catch (e) {
-        const entityChangeIds = cls.getAndClearEntityChangeIds();
-
-        if (entityChangeIds.length > 0) {
-            log.info("Transaction rollback dirtied the becca, forcing reload.");
-
-            require('../becca/becca_loader').load();
-        }
-
-        // the maxEntityChangeId has been incremented during failed transaction, need to recalculate
-        require('./entity_changes').recalculateMaxEntityChangeId();
-
-        throw e;
-    }
-}
-
-function fillParamList(paramIds, truncate = true) {
-    if (paramIds.length === 0) {
-        return;
-    }
-
-    if (truncate) {
-        execute("DELETE FROM param_list");
-    }
-
-    paramIds = Array.from(new Set(paramIds));
-
-    if (paramIds.length > 30000) {
-        fillParamList(paramIds.slice(30000), false);
-
-        paramIds = paramIds.slice(0, 30000);
-    }
-
-    // doing it manually to avoid this showing up on the sloq query list
-    const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`);
-
-    s.run(paramIds);
-}
-
-async function copyDatabase(targetFilePath) {
-    try {
-        fs.unlinkSync(targetFilePath);
-    } catch (e) {
-    } // unlink throws exception if the file did not exist
-
-    await dbConnection.backup(targetFilePath);
-}
-
-function disableSlowQueryLogging(cb) {
-    const orig = cls.isSlowQueryLoggingDisabled();
-
-    try {
-        cls.disableSlowQueryLogging(true);
-
-        return cb();
-    }
-    finally {
-        cls.disableSlowQueryLogging(orig);
-    }
-}
-
-module.exports = {
-    dbConnection,
-    insert,
-    replace,
-
-    /**
-     * Get single value from the given query - first column from first returned row.
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     * @returns [object] - single value
-     */
-    getValue,
-
-    /**
-     * Get first returned row.
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     * @returns {object} - map of column name to column value
-     */
-    getRow,
-    getRowOrNull,
-
-    /**
-     * Get all returned rows.
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     * @returns {object[]} - array of all rows, each row is a map of column name to column value
-     */
-    getRows,
-    getRawRows,
-    iterateRows,
-    getManyRows,
-
-    /**
-     * Get a map of first column mapping to second column.
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     * @returns {object} - map of first column to second column
-     */
-    getMap,
-
-    /**
-     * Get a first column in an array.
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     * @returns {object[]} - array of first column of all returned rows
-     */
-    getColumn,
-
-    /**
-     * Execute SQL
-     *
-     * @method
-     * @param {string} query - SQL query with ? used as parameter placeholder
-     * @param {object[]} [params] - array of params if needed
-     */
-    execute,
-    executeMany,
-    executeScript,
-    transactional,
-    upsert,
-    fillParamList,
-    copyDatabase,
-    disableSlowQueryLogging
-};
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/backend_api/styles/jsdoc-default.css b/docs/backend_api/styles/jsdoc-default.css deleted file mode 100644 index 7d1729dc9..000000000 --- a/docs/backend_api/styles/jsdoc-default.css +++ /dev/null @@ -1,358 +0,0 @@ -@font-face { - font-family: 'Open Sans'; - font-weight: normal; - font-style: normal; - src: url('../fonts/OpenSans-Regular-webfont.eot'); - src: - local('Open Sans'), - local('OpenSans'), - url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), - url('../fonts/OpenSans-Regular-webfont.woff') format('woff'), - url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg'); -} - -@font-face { - font-family: 'Open Sans Light'; - font-weight: normal; - font-style: normal; - src: url('../fonts/OpenSans-Light-webfont.eot'); - src: - local('Open Sans Light'), - local('OpenSans Light'), - url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'), - url('../fonts/OpenSans-Light-webfont.woff') format('woff'), - url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg'); -} - -html -{ - overflow: auto; - background-color: #fff; - font-size: 14px; -} - -body -{ - font-family: 'Open Sans', sans-serif; - line-height: 1.5; - color: #4d4e53; - background-color: white; -} - -a, a:visited, a:active { - color: #0095dd; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -header -{ - display: block; - padding: 0px 4px; -} - -tt, code, kbd, samp { - font-family: Consolas, Monaco, 'Andale Mono', monospace; -} - -.class-description { - font-size: 130%; - line-height: 140%; - margin-bottom: 1em; - margin-top: 1em; -} - -.class-description:empty { - margin: 0; -} - -#main { - float: left; - width: 70%; -} - -article dl { - margin-bottom: 40px; -} - -article img { - max-width: 100%; -} - -section -{ - display: block; - background-color: #fff; - padding: 12px 24px; - border-bottom: 1px solid #ccc; - margin-right: 30px; -} - -.variation { - display: none; -} - -.signature-attributes { - font-size: 60%; - color: #aaa; - font-style: italic; - font-weight: lighter; -} - -nav -{ - display: block; - float: right; - margin-top: 28px; - width: 30%; - box-sizing: border-box; - border-left: 1px solid #ccc; - padding-left: 16px; -} - -nav ul { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; - font-size: 100%; - line-height: 17px; - padding: 0; - margin: 0; - list-style-type: none; -} - -nav ul a, nav ul a:visited, nav ul a:active { - font-family: Consolas, Monaco, 'Andale Mono', monospace; - line-height: 18px; - color: #4D4E53; -} - -nav h3 { - margin-top: 12px; -} - -nav li { - margin-top: 6px; -} - -footer { - display: block; - padding: 6px; - margin-top: 12px; - font-style: italic; - font-size: 90%; -} - -h1, h2, h3, h4 { - font-weight: 200; - margin: 0; -} - -h1 -{ - font-family: 'Open Sans Light', sans-serif; - font-size: 48px; - letter-spacing: -2px; - margin: 12px 24px 20px; -} - -h2, h3.subsection-title -{ - font-size: 30px; - font-weight: 700; - letter-spacing: -1px; - margin-bottom: 12px; -} - -h3 -{ - font-size: 24px; - letter-spacing: -0.5px; - margin-bottom: 12px; -} - -h4 -{ - font-size: 18px; - letter-spacing: -0.33px; - margin-bottom: 12px; - color: #4d4e53; -} - -h5, .container-overview .subsection-title -{ - font-size: 120%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 8px 0 3px 0; -} - -h6 -{ - font-size: 100%; - letter-spacing: -0.01em; - margin: 6px 0 3px 0; - font-style: italic; -} - -table -{ - border-spacing: 0; - border: 0; - border-collapse: collapse; -} - -td, th -{ - border: 1px solid #ddd; - margin: 0px; - text-align: left; - vertical-align: top; - padding: 4px 6px; - display: table-cell; -} - -thead tr -{ - background-color: #ddd; - font-weight: bold; -} - -th { border-right: 1px solid #aaa; } -tr > th:last-child { border-right: 1px solid #ddd; } - -.ancestors, .attribs { color: #999; } -.ancestors a, .attribs a -{ - color: #999 !important; - text-decoration: none; -} - -.clear -{ - clear: both; -} - -.important -{ - font-weight: bold; - color: #950B02; -} - -.yes-def { - text-indent: -1000px; -} - -.type-signature { - color: #aaa; -} - -.name, .signature { - font-family: Consolas, Monaco, 'Andale Mono', monospace; -} - -.details { margin-top: 14px; border-left: 2px solid #DDD; } -.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } -.details dd { margin-left: 70px; } -.details ul { margin: 0; } -.details ul { list-style-type: none; } -.details li { margin-left: 30px; padding-top: 6px; } -.details pre.prettyprint { margin: 0 } -.details .object-value { padding-top: 0; } - -.description { - margin-bottom: 1em; - margin-top: 1em; -} - -.code-caption -{ - font-style: italic; - font-size: 107%; - margin: 0; -} - -.source -{ - border: 1px solid #ddd; - width: 80%; - overflow: auto; -} - -.prettyprint.source { - width: inherit; -} - -.source code -{ - font-size: 100%; - line-height: 18px; - display: block; - padding: 4px 12px; - margin: 0; - background-color: #fff; - color: #4D4E53; -} - -.prettyprint code span.line -{ - display: inline-block; -} - -.prettyprint.linenums -{ - padding-left: 70px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.prettyprint.linenums ol -{ - padding-left: 0; -} - -.prettyprint.linenums li -{ - border-left: 3px #ddd solid; -} - -.prettyprint.linenums li.selected, -.prettyprint.linenums li.selected * -{ - background-color: lightyellow; -} - -.prettyprint.linenums li * -{ - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; -} - -.params .name, .props .name, .name code { - color: #4D4E53; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 100%; -} - -.params td.description > p:first-child, -.props td.description > p:first-child -{ - margin-top: 0; - padding-top: 0; -} - -.params td.description > p:last-child, -.props td.description > p:last-child -{ - margin-bottom: 0; - padding-bottom: 0; -} - -.disabled { - color: #454545; -} diff --git a/docs/backend_api/styles/prettify-jsdoc.css b/docs/backend_api/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e37..000000000 --- a/docs/backend_api/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/docs/backend_api/styles/prettify-tomorrow.css b/docs/backend_api/styles/prettify-tomorrow.css deleted file mode 100644 index b6f92a78d..000000000 --- a/docs/backend_api/styles/prettify-tomorrow.css +++ /dev/null @@ -1,132 +0,0 @@ -/* Tomorrow Theme */ -/* Original theme - https://github.com/chriskempson/tomorrow-theme */ -/* Pretty printing styles. Used with prettify.js. */ -/* SPAN elements with the classes below are added by prettyprint. */ -/* plain text */ -.pln { - color: #4d4d4c; } - -@media screen { - /* string content */ - .str { - color: #718c00; } - - /* a keyword */ - .kwd { - color: #8959a8; } - - /* a comment */ - .com { - color: #8e908c; } - - /* a type name */ - .typ { - color: #4271ae; } - - /* a literal value */ - .lit { - color: #f5871f; } - - /* punctuation */ - .pun { - color: #4d4d4c; } - - /* lisp open bracket */ - .opn { - color: #4d4d4c; } - - /* lisp close bracket */ - .clo { - color: #4d4d4c; } - - /* a markup tag name */ - .tag { - color: #c82829; } - - /* a markup attribute name */ - .atn { - color: #f5871f; } - - /* a markup attribute value */ - .atv { - color: #3e999f; } - - /* a declaration */ - .dec { - color: #f5871f; } - - /* a variable name */ - .var { - color: #c82829; } - - /* a function name */ - .fun { - color: #4271ae; } } -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { - color: #060; } - - .kwd { - color: #006; - font-weight: bold; } - - .com { - color: #600; - font-style: italic; } - - .typ { - color: #404; - font-weight: bold; } - - .lit { - color: #044; } - - .pun, .opn, .clo { - color: #440; } - - .tag { - color: #006; - font-weight: bold; } - - .atn { - color: #404; } - - .atv { - color: #060; } } -/* Style */ -/* -pre.prettyprint { - background: white; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 12px; - line-height: 1.5; - border: 1px solid #ccc; - padding: 10px; } -*/ - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; } - -/* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L4, -li.L5, -li.L6, -li.L7, -li.L8, -li.L9 { - /* */ } - -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { - /* */ } diff --git a/docs/backend_api/types/becca_entities_rows.AttributeType.html b/docs/backend_api/types/becca_entities_rows.AttributeType.html new file mode 100644 index 000000000..c55212d07 --- /dev/null +++ b/docs/backend_api/types/becca_entities_rows.AttributeType.html @@ -0,0 +1 @@ +AttributeType | trilium
AttributeType: "label" | "relation" | "label-definition" | "relation-definition"
diff --git a/docs/backend_api/types/becca_entities_rows.NoteType.html b/docs/backend_api/types/becca_entities_rows.NoteType.html new file mode 100644 index 000000000..8352415bc --- /dev/null +++ b/docs/backend_api/types/becca_entities_rows.NoteType.html @@ -0,0 +1 @@ +NoteType | trilium
NoteType: typeof ALLOWED_NOTE_TYPES[number]
diff --git a/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html new file mode 100644 index 000000000..9e0de4bf4 --- /dev/null +++ b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html @@ -0,0 +1,4 @@ +ALLOWED_NOTE_TYPES | trilium

Variable ALLOWED_NOTE_TYPESConst

ALLOWED_NOTE_TYPES: readonly [
    "file",
    "image",
    "search",
    "noteMap",
    "launcher",
    "doc",
    "contentWidget",
    "text",
    "relationMap",
    "render",
    "canvas",
    "mermaid",
    "book",
    "webView",
    "code",
    "mindMap",
] = ...

There are many different Note types, some of which are entirely opaque to the +end user. Those types should be used only for checking against, they are +not for direct use.

+
diff --git a/docs/backend_api/variables/services_backend_script_api.default.html b/docs/backend_api/variables/services_backend_script_api.default.html new file mode 100644 index 000000000..0411fa280 --- /dev/null +++ b/docs/backend_api/variables/services_backend_script_api.default.html @@ -0,0 +1 @@ +default | trilium
default: new (currentNote: default, apiParams: ApiParams) => Api
diff --git a/docs/backend_api/variables/services_sql.default.html b/docs/backend_api/variables/services_sql.default.html new file mode 100644 index 000000000..037d90e28 --- /dev/null +++ b/docs/backend_api/variables/services_sql.default.html @@ -0,0 +1,7 @@ +default | trilium
default: {
    copyDatabase: (targetFilePath: string) => Promise<void>;
    dbConnection: Database;
    disableSlowQueryLogging: <T>(cb: () => T) => T;
    execute: (query: string, params?: any) => RunResult;
    executeMany: (query: string, params: any) => void;
    executeScript: (query: string) => DatabaseType;
    fillParamList: (
        paramIds: string[] | Set<string>,
        truncate?: boolean,
    ) => void;
    getColumn: <T>(query: string, params?: any) => T[];
    getManyRows: <T>(query: string, params: any) => T[];
    getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>;
    getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[];
    getRow: <T>(query: string, params?: any) => T;
    getRowOrNull: <T>(query: string, params?: any) => T | null;
    getRows: <T>(query: string, params?: any) => T[];
    getValue: <T>(query: string, params?: any) => T;
    insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint;
    iterateRows: <T>(query: string, params?: any) => IterableIterator<T>;
    rebuildIntegrationTestDatabase: () => void;
    replace: <T extends {}>(tableName: string, rec: T) => number | null;
    transactional: <T>(
        func: (statement: Statement<unknown[], unknown>) => T,
    ) => any;
    upsert: <T extends {}>(
        tableName: string,
        primaryKey: string,
        rec: T,
    ) => void;
}

Type declaration

  • copyDatabase: (targetFilePath: string) => Promise<void>
  • dbConnection: Database
  • disableSlowQueryLogging: <T>(cb: () => T) => T
  • execute: (query: string, params?: any) => RunResult

    Execute SQL

    +
  • executeMany: (query: string, params: any) => void
  • executeScript: (query: string) => DatabaseType
  • fillParamList: (paramIds: string[] | Set<string>, truncate?: boolean) => void
  • getColumn: <T>(query: string, params?: any) => T[]

    Get a first column in an array.

    +
  • getManyRows: <T>(query: string, params: any) => T[]
  • getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>

    Get a map of first column mapping to second column.

    +
  • getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[]
  • getRow: <T>(query: string, params?: any) => T

    Get first returned row.

    +
  • getRowOrNull: <T>(query: string, params?: any) => T | null
  • getRows: <T>(query: string, params?: any) => T[]

    Get all returned rows.

    +
  • getValue: <T>(query: string, params?: any) => T

    Get single value from the given query - first column from first returned row.

    +
  • insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint
  • iterateRows: <T>(query: string, params?: any) => IterableIterator<T>
  • rebuildIntegrationTestDatabase: () => void
  • replace: <T extends {}>(tableName: string, rec: T) => number | null
  • transactional: <T>(func: (statement: Statement<unknown[], unknown>) => T) => any
  • upsert: <T extends {}>(tableName: string, primaryKey: string, rec: T) => void
diff --git a/docs/frontend_api/BasicWidget.html b/docs/frontend_api/BasicWidget.html index 2e8edd905..69f029e13 100644 --- a/docs/frontend_api/BasicWidget.html +++ b/docs/frontend_api/BasicWidget.html @@ -95,7 +95,7 @@ For information on using widgets, see the tutorial widget_basics.
Source:
@@ -151,6 +151,176 @@ For information on using widgets, see the tutorial widget_basics. +

css(name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

cssBlock(block) → {this}

@@ -252,7 +422,7 @@ For information on using widgets, see the tutorial widget_basics.
Source:
@@ -365,7 +535,7 @@ The method is expected to create a this.$widget containing jQuery object
Source:
@@ -395,6 +565,487 @@ The method is expected to create a this.$widget containing jQuery object + + + + + + +

isEnabled()

+ + + + + + +
+ Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ whether the widget is enabled. +
+ + + + + + + + + + + + + + + +

optChild(condition, …components)

+ + + + + + +
+ Conditionally adds the given components as children to this component. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
condition + + +boolean + + + + + + + + + + whether to add the components.
components + + +any + + + + + + + + + + <repeatable>
+ +
the components to be added as children to this component provided the condition is truthy.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + + +

optCss(condition, name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
condition + + +boolean + + + + `true` in order to apply the CSS, `false` to ignore it.
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + @@ -417,7 +1068,7 @@ The method is expected to create a this.$widget containing jQuery object
diff --git a/docs/frontend_api/FAttachment.html b/docs/frontend_api/FAttachment.html index 1a5d764ee..60f500c85 100644 --- a/docs/frontend_api/FAttachment.html +++ b/docs/frontend_api/FAttachment.html @@ -1058,7 +1058,7 @@ being a hidden child.
diff --git a/docs/frontend_api/FAttribute.html b/docs/frontend_api/FAttribute.html index 81679fb79..4516e1f1d 100644 --- a/docs/frontend_api/FAttribute.html +++ b/docs/frontend_api/FAttribute.html @@ -918,7 +918,7 @@ and relation (representing named relationship between source and target note) diff --git a/docs/frontend_api/FBranch.html b/docs/frontend_api/FBranch.html index e00fbede0..5ce64a09f 100644 --- a/docs/frontend_api/FBranch.html +++ b/docs/frontend_api/FBranch.html @@ -1130,7 +1130,7 @@ parents.
diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.html index 09040de56..49208f06d 100644 --- a/docs/frontend_api/FNote.html +++ b/docs/frontend_api/FNote.html @@ -165,7 +165,7 @@
Source:
@@ -268,7 +268,7 @@
Source:
@@ -336,7 +336,7 @@
Source:
@@ -404,7 +404,7 @@
Source:
@@ -472,7 +472,7 @@
Source:
@@ -540,7 +540,7 @@
Source:
@@ -608,7 +608,7 @@
Source:
@@ -680,7 +680,7 @@
Source:
@@ -748,7 +748,7 @@
Source:
@@ -816,7 +816,7 @@
Source:
@@ -884,7 +884,7 @@
Source:
@@ -952,7 +952,7 @@
Source:
@@ -1020,7 +1020,7 @@
Source:
@@ -1092,7 +1092,7 @@
Source:
@@ -1172,7 +1172,7 @@
Source:
@@ -1278,7 +1278,7 @@
Source:
@@ -1380,7 +1380,7 @@
Source:
@@ -1482,7 +1482,7 @@
Source:
@@ -1656,7 +1656,7 @@
Source:
@@ -1834,7 +1834,7 @@
Source:
@@ -2034,7 +2034,7 @@
Source:
@@ -2213,7 +2213,7 @@
Source:
@@ -2392,7 +2392,7 @@
Source:
@@ -2498,7 +2498,7 @@
Source:
@@ -2602,7 +2602,7 @@
Source:
@@ -2706,7 +2706,7 @@
Source:
@@ -2808,7 +2808,7 @@
Source:
@@ -2910,7 +2910,7 @@
Source:
@@ -3012,7 +3012,7 @@
Source:
@@ -3163,7 +3163,7 @@
Source:
@@ -3318,7 +3318,7 @@
Source:
@@ -3485,7 +3485,7 @@
Source:
@@ -3595,7 +3595,7 @@
Source:
@@ -3699,7 +3699,7 @@
Source:
@@ -3801,7 +3801,7 @@
Source:
@@ -3975,7 +3975,7 @@
Source:
@@ -4153,7 +4153,7 @@
Source:
@@ -4353,7 +4353,7 @@
Source:
@@ -4508,7 +4508,7 @@
Source:
@@ -4663,7 +4663,7 @@
Source:
@@ -4830,7 +4830,7 @@
Source:
@@ -4985,7 +4985,7 @@
Source:
@@ -5140,7 +5140,7 @@
Source:
@@ -5307,7 +5307,7 @@
Source:
@@ -5413,7 +5413,7 @@
Source:
@@ -5515,7 +5515,7 @@
Source:
@@ -5617,7 +5617,7 @@
Source:
@@ -5719,7 +5719,7 @@
Source:
@@ -5870,7 +5870,7 @@
Source:
@@ -6025,7 +6025,7 @@
Source:
@@ -6195,7 +6195,7 @@
Source:
@@ -6346,7 +6346,7 @@
Source:
@@ -6513,7 +6513,7 @@
Source:
@@ -6619,7 +6619,7 @@
Source:
@@ -6797,7 +6797,7 @@
Source:
@@ -6903,7 +6903,7 @@
Source:
@@ -7009,7 +7009,7 @@
Source:
@@ -7183,7 +7183,7 @@
Source:
@@ -7289,7 +7289,7 @@
Source:
@@ -7440,7 +7440,7 @@
Source:
@@ -7618,7 +7618,7 @@
Source:
@@ -7773,7 +7773,7 @@
Source:
@@ -7928,7 +7928,7 @@
Source:
@@ -8083,7 +8083,7 @@
Source:
@@ -8191,7 +8191,7 @@
Source:
@@ -8275,7 +8275,7 @@
Source:
@@ -8369,7 +8369,7 @@
Source:
@@ -8475,7 +8475,7 @@
Source:
@@ -8581,7 +8581,7 @@
Source:
@@ -8732,7 +8732,7 @@
Source:
@@ -8806,7 +8806,7 @@
diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.html index 85072e613..b4ba0f146 100644 --- a/docs/frontend_api/FrontendScriptApi.html +++ b/docs/frontend_api/FrontendScriptApi.html @@ -462,7 +462,7 @@ available in the JS frontend notes. You can use e.g. api.showMessage(api.s
Source:
@@ -1530,7 +1530,7 @@ See https://day.js.org for documentation
Source:
@@ -1738,7 +1738,7 @@ See https://day.js.org for documentation
Source:
@@ -2157,7 +2157,7 @@ See https://day.js.org for documentation
Source:
@@ -2312,7 +2312,7 @@ See https://day.js.org for documentation
Source:
@@ -2469,7 +2469,7 @@ See https://day.js.org for documentation
Source:
@@ -2624,7 +2624,7 @@ See https://day.js.org for documentation
Source:
@@ -2730,7 +2730,7 @@ See https://day.js.org for documentation
Source:
@@ -2840,7 +2840,7 @@ See https://day.js.org for documentation
Source:
@@ -2946,7 +2946,7 @@ See https://day.js.org for documentation
Source:
@@ -3052,7 +3052,7 @@ See https://day.js.org for documentation
Source:
@@ -3162,7 +3162,7 @@ See https://day.js.org for documentation
Source:
@@ -3268,7 +3268,7 @@ See https://day.js.org for documentation
Source:
@@ -3379,7 +3379,7 @@ implementation of actual widget type.
Source:
@@ -3534,7 +3534,7 @@ implementation of actual widget type.
Source:
@@ -3689,7 +3689,7 @@ implementation of actual widget type.
Source:
@@ -3796,7 +3796,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -3898,7 +3898,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -4057,7 +4057,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -4213,7 +4213,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -4315,7 +4315,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -4520,7 +4520,7 @@ otherwise (by e.g. createLink())
Source:
@@ -4626,7 +4626,7 @@ otherwise (by e.g. createLink())
Source:
@@ -4781,7 +4781,7 @@ otherwise (by e.g. createLink())
Source:
@@ -4936,7 +4936,7 @@ otherwise (by e.g. createLink())
Source:
@@ -5086,7 +5086,7 @@ otherwise (by e.g. createLink())
Source:
@@ -5593,7 +5593,7 @@ otherwise (by e.g. createLink())
Source:
@@ -5771,7 +5771,7 @@ otherwise (by e.g. createLink())
Source:
@@ -5945,7 +5945,7 @@ otherwise (by e.g. createLink())
Source:
@@ -6100,7 +6100,7 @@ otherwise (by e.g. createLink())
Source:
@@ -6254,7 +6254,7 @@ otherwise (by e.g. createLink())
Source:
@@ -6409,7 +6409,7 @@ otherwise (by e.g. createLink())
Source:
@@ -6578,7 +6578,7 @@ If you have a synchronous function, please use api.runOnBackend().
Source:
@@ -6833,7 +6833,7 @@ with transaction management. If you really know what you're doing, you can call
This is a powerful search method - you can search by attributes and their values, e.g.: -"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search +"#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html
@@ -6926,7 +6926,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -6989,7 +6989,7 @@ with transaction management. If you really know what you're doing, you can call
This is a powerful search method - you can search by attributes and their values, e.g.: -"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search +"#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html
@@ -7082,7 +7082,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7144,7 +7144,7 @@ with transaction management. If you really know what you're doing, you can call
- Hoist note in the current tab. See https://github.com/zadam/trilium/wiki/Note-hoisting + Hoist note in the current tab. See https://triliumnext.github.io/Docs/Wiki/note-hoisting.html
@@ -7237,7 +7237,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7388,7 +7388,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7543,7 +7543,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7702,7 +7702,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7839,7 +7839,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -7994,7 +7994,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -8226,7 +8226,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -8408,7 +8408,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -8568,7 +8568,7 @@ with transaction management. If you really know what you're doing, you can call
Source:
@@ -8660,7 +8660,7 @@ Typical use case is when a new note has been created, we should wait until it is
Source:
@@ -8730,7 +8730,7 @@ Typical use case is when a new note has been created, we should wait until it is
diff --git a/docs/frontend_api/NoteContextAwareWidget.html b/docs/frontend_api/NoteContextAwareWidget.html index cafbd5af4..09a02b6d9 100644 --- a/docs/frontend_api/NoteContextAwareWidget.html +++ b/docs/frontend_api/NoteContextAwareWidget.html @@ -320,7 +320,7 @@
Source:
@@ -464,6 +464,181 @@ +

css(name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

cssBlock(block) → {this}

@@ -570,7 +745,7 @@
Source:
@@ -688,7 +863,7 @@ The method is expected to create a this.$widget containing jQuery object
Source:
@@ -731,6 +906,13 @@ The method is expected to create a this.$widget containing jQuery object +
+ Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. + +

+If the widget is not enabled, it will not receive `refreshWithNote` updates. +

+ @@ -752,6 +934,11 @@ The method is expected to create a this.$widget containing jQuery object +
Overrides:
+
+ @@ -772,7 +959,7 @@ The method is expected to create a this.$widget containing jQuery object
Source:
@@ -830,6 +1017,399 @@ The method is expected to create a this.$widget containing jQuery object +

optChild(condition, …components)

+ + + + + + +
+ Conditionally adds the given components as children to this component. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
condition + + +boolean + + + + + + + + + + whether to add the components.
components + + +any + + + + + + + + + + <repeatable>
+ +
the components to be added as children to this component provided the condition is truthy.
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + + +

optCss(condition, name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
condition + + +boolean + + + + `true` in order to apply the CSS, `false` to ignore it.
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

(async) refreshWithNote(note) → {Promise.<void>}

@@ -932,7 +1512,7 @@ widget with each note.
Source:
@@ -1002,7 +1582,7 @@ widget with each note.
diff --git a/docs/frontend_api/RightPanelWidget.html b/docs/frontend_api/RightPanelWidget.html index 307ecefd4..855aab27b 100644 --- a/docs/frontend_api/RightPanelWidget.html +++ b/docs/frontend_api/RightPanelWidget.html @@ -93,7 +93,7 @@
Source:
@@ -335,7 +335,7 @@
Source:
@@ -523,7 +523,7 @@
Source:
@@ -551,6 +551,181 @@ +

css(name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

cssBlock(block) → {this}

@@ -657,7 +832,7 @@
Source:
@@ -773,7 +948,7 @@ Do not override this method unless you know what you're doing.
Source:
@@ -863,7 +1038,7 @@ Your class should override this method.
Source:
@@ -931,6 +1106,13 @@ Your class should override this method. +
+ Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. + +

+If the widget is not enabled, it will not receive `refreshWithNote` updates. +

+ @@ -977,7 +1159,7 @@ Your class should override this method.
Source:
@@ -1035,6 +1217,399 @@ Your class should override this method. +

optChild(condition, …components)

+ + + + + + +
+ Conditionally adds the given components as children to this component. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
condition + + +boolean + + + + + + + + + + whether to add the components.
components + + +any + + + + + + + + + + <repeatable>
+ +
the components to be added as children to this component provided the condition is truthy.
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + + +

optCss(condition, name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
condition + + +boolean + + + + `true` in order to apply the CSS, `false` to ignore it.
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

(async) refreshWithNote(note) → {Promise.<void>}

@@ -1142,7 +1717,7 @@ widget with each note.
Source:
@@ -1212,7 +1787,7 @@ widget with each note.
diff --git a/docs/frontend_api/entities_fattachment.js.html b/docs/frontend_api/entities_fattachment.js.html index 1b301f3b9..e38fc1ecb 100644 --- a/docs/frontend_api/entities_fattachment.js.html +++ b/docs/frontend_api/entities_fattachment.js.html @@ -93,7 +93,7 @@ export default FAttachment;
diff --git a/docs/frontend_api/entities_fattribute.js.html b/docs/frontend_api/entities_fattribute.js.html index de5addfac..7f0cd60cc 100644 --- a/docs/frontend_api/entities_fattribute.js.html +++ b/docs/frontend_api/entities_fattribute.js.html @@ -127,7 +127,7 @@ export default FAttribute;
diff --git a/docs/frontend_api/entities_fblob.js.html b/docs/frontend_api/entities_fblob.js.html index 284d2542b..b4170baea 100644 --- a/docs/frontend_api/entities_fblob.js.html +++ b/docs/frontend_api/entities_fblob.js.html @@ -81,7 +81,7 @@
diff --git a/docs/frontend_api/entities_fbranch.js.html b/docs/frontend_api/entities_fbranch.js.html index faad3c117..9f3af1a28 100644 --- a/docs/frontend_api/entities_fbranch.js.html +++ b/docs/frontend_api/entities_fbranch.js.html @@ -106,7 +106,7 @@ export default FBranch;
diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html index 655101712..b3fc9c853 100644 --- a/docs/frontend_api/entities_fnote.js.html +++ b/docs/frontend_api/entities_fnote.js.html @@ -50,7 +50,8 @@ const NOTE_TYPE_ICONS = { "webView": "bx bx-globe-alt", "launcher": "bx bx-link", "doc": "bx bxs-file-doc", - "contentWidget": "bx bxs-widget" + "contentWidget": "bx bxs-widget", + "mindMap": "bx bx-sitemap" }; /** @@ -1054,7 +1055,7 @@ export default FNote;
diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.html index 5e4f2f1ae..3a73d00e8 100644 --- a/docs/frontend_api/global.html +++ b/docs/frontend_api/global.html @@ -674,7 +674,7 @@
Source:
@@ -790,7 +790,7 @@ not for direct use.
Source:
@@ -898,7 +898,7 @@ not for direct use.
diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.html index 27b2a8b84..e15c1dea5 100644 --- a/docs/frontend_api/index.html +++ b/docs/frontend_api/index.html @@ -56,7 +56,7 @@
diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.html index eded4a0c0..cb50e8197 100644 --- a/docs/frontend_api/services_frontend_script_api.js.html +++ b/docs/frontend_api/services_frontend_script_api.js.html @@ -245,8 +245,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain */ this.runOnBackend = async (func, params = []) => { if (func?.constructor.name === "AsyncFunction" || func?.startsWith?.("async ")) { - toastService.showError("You're passing an async function to api.runOnBackend() which will likely not work as you intended. " - + "Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling()"); + toastService.showError(t("frontend_script_api.async_warning")); } return await this.__runOnBackendInner(func, params, true); @@ -268,8 +267,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain */ this.runAsyncOnBackendWithManualTransactionHandling = async (func, params = []) => { if (func?.constructor.name === "Function" || func?.startsWith?.("function")) { - toastService.showError("You're passing a synchronous function to api.runAsyncOnBackendWithManualTransactionHandling(), " + - "while you should likely use api.runOnBackend() instead."); + toastService.showError(t("frontend_script_api.sync_warning")); } return await this.__runOnBackendInner(func, params, false); @@ -277,7 +275,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain /** * This is a powerful search method - you can search by attributes and their values, e.g.: - * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search + * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html * * @method * @param {string} searchString @@ -289,7 +287,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain /** * This is a powerful search method - you can search by attributes and their values, e.g.: - * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search + * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://triliumnext.github.io/Docs/Wiki/search.html * * @method * @param {string} searchString @@ -586,7 +584,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain this.getYearNote = dateNotesService.getYearNote; /** - * Hoist note in the current tab. See https://github.com/zadam/trilium/wiki/Note-hoisting + * Hoist note in the current tab. See https://triliumnext.github.io/Docs/Wiki/note-hoisting.html * * @method * @param {string} noteId - set hoisted note. 'root' will effectively unhoist @@ -700,7 +698,7 @@ export default FrontendScriptApi;
diff --git a/docs/frontend_api/widgets_basic_widget.js.html b/docs/frontend_api/widgets_basic_widget.js.html index 6a203fd6d..9d36a448f 100644 --- a/docs/frontend_api/widgets_basic_widget.js.html +++ b/docs/frontend_api/widgets_basic_widget.js.html @@ -27,7 +27,9 @@
import Component from "../components/component.js";
-
+import froca from "../services/froca.js";
+import { t } from "../services/i18n.js";
+import toastService from "../services/toast.js";
 
 /**
  * This is the base widget for all other widgets.
@@ -66,6 +68,21 @@ class BasicWidget extends Component {
         return this;
     }
 
+    /**
+     * Conditionally adds the given components as children to this component.
+     * 
+     * @param {boolean} condition whether to add the components.
+     * @param  {...any} components the components to be added as children to this component provided the condition is truthy. 
+     * @returns self for chaining.
+     */
+    optChild(condition, ...components) {
+        if (condition) {
+            return this.child(...components);
+        } else {
+            return this;
+        }
+    }
+
     id(id) {
         this.attrs.id = id;
         return this;
@@ -76,11 +93,34 @@ class BasicWidget extends Component {
         return this;
     }
 
+    /**
+     * Sets the CSS attribute of the given name to the given value.
+     * 
+     * @param {string} name the name of the CSS attribute to set (e.g. `padding-left`).
+     * @param {string} value the value of the CSS attribute to set (e.g. `12px`).
+     * @returns self for chaining.
+     */
     css(name, value) {
         this.attrs.style += `${name}: ${value};`;
         return this;
     }
 
+    /**
+     * Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy.
+     * 
+     * @param {boolean} condition `true` in order to apply the CSS, `false` to ignore it.
+     * @param {string} name the name of the CSS attribute to set (e.g. `padding-left`).
+     * @param {string} value the value of the CSS attribute to set (e.g. `12px`).
+     * @returns self for chaining.
+     */
+    optCss(condition, name, value) {
+        if (condition) {
+            return this.css(name, value);
+        }
+
+        return this;
+    }
+
     contentSized() {
         this.css("contain", "none");
 
@@ -109,7 +149,11 @@ class BasicWidget extends Component {
     }
 
     render() {
-        this.doRender();
+        try {
+            this.doRender();
+        } catch (e) {                        
+            this.logRenderingError(e);
+        }
 
         this.$widget.attr('data-component-id', this.componentId);
         this.$widget
@@ -147,6 +191,39 @@ class BasicWidget extends Component {
         return this.$widget;
     }
 
+    logRenderingError(e) {
+        console.log("Got issue in widget ", this);
+        console.error(e);
+
+        let noteId = this._noteId;
+        if (this._noteId) {
+            froca.getNote(noteId, true).then((note) => {
+                toastService.showPersistent({
+                    title: t("toast.widget-error.title"),
+                    icon: "alert",
+                    message: t("toast.widget-error.message-custom", {
+                        id: noteId,
+                        title: note.title,
+                        message: e.message
+                    })
+                });
+            });
+            return;
+        }
+
+        toastService.showPersistent({
+            title: t("toast.widget-error.title"),
+            icon: "alert",
+            message: t("toast.widget-error.message-unknown", {
+                message: e.message
+            })
+        });
+    }
+
+    /**
+     * Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.
+     * @returns whether the widget is enabled.
+     */
     isEnabled() {
         return true;
     }
@@ -222,7 +299,7 @@ export default BasicWidget;
 
diff --git a/docs/frontend_api/widgets_note_context_aware_widget.js.html b/docs/frontend_api/widgets_note_context_aware_widget.js.html index e9f707f32..bbc72f6a3 100644 --- a/docs/frontend_api/widgets_note_context_aware_widget.js.html +++ b/docs/frontend_api/widgets_note_context_aware_widget.js.html @@ -76,6 +76,11 @@ class NoteContextAwareWidget extends BasicWidget { } /** + * Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. + * + * <p> + * If the widget is not enabled, it will not receive `refreshWithNote` updates. + * * @returns {boolean} true when an active note exists */ isEnabled() { @@ -85,7 +90,17 @@ class NoteContextAwareWidget extends BasicWidget { async refresh() { if (this.isEnabled()) { this.toggleInt(true); - await this.refreshWithNote(this.note); + + try { + await this.refreshWithNote(this.note); + } catch (e) { + // Ignore errors when user is refreshing or navigating away. + if (e === "rejected by browser") { + return; + } + + throw e; + } } else { this.toggleInt(false); @@ -164,7 +179,7 @@ export default NoteContextAwareWidget;
diff --git a/docs/frontend_api/widgets_right_panel_widget.js.html b/docs/frontend_api/widgets_right_panel_widget.js.html index cf98c0aa5..cb63ea9fd 100644 --- a/docs/frontend_api/widgets_right_panel_widget.js.html +++ b/docs/frontend_api/widgets_right_panel_widget.js.html @@ -27,6 +27,8 @@
import NoteContextAwareWidget from "./note_context_aware_widget.js";
+import toastService from "../services/toast.js";
+import { t } from "../services/i18n.js";
 
 const WIDGET_TPL = `
 <div class="card widget">
@@ -82,7 +84,9 @@ class RightPanelWidget extends NoteContextAwareWidget {
             this.$buttons.append(buttonWidget.render());
         }
 
-        this.initialized = this.doRenderBody();
+        this.initialized = this.doRenderBody().catch(e => {
+            this.logRenderingError(e);
+        });
     }
 
     /**
@@ -111,7 +115,7 @@ export default RightPanelWidget;
 
diff --git a/package-lock.json b/package-lock.json index 7c8b8e3a2..d799531af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -149,7 +149,7 @@ "esm": "3.2.25", "iconsur": "1.7.0", "jasmine": "5.5.0", - "jsdoc": "4.0.3", + "jsdoc": "4.0.4", "lorem-ipsum": "2.0.8", "nodemon": "3.1.7", "rcedit": "4.0.1", @@ -157,6 +157,7 @@ "ts-node": "10.9.2", "tslib": "2.8.1", "tsx": "4.19.2", + "typedoc": "0.27.4", "typescript": "5.7.2", "webpack": "5.97.1", "webpack-cli": "5.1.4" @@ -2596,6 +2597,17 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "node_modules/@gerrit0/mini-shiki": { + "version": "1.24.3", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-1.24.3.tgz", + "integrity": "sha512-odxt2MTJvlT5NUmGOPXz5OW4D8SFL2+KeXBkmjVtdOXfA5aRZX6jgP/17jp6wu2r3KdW0wx3Bk5HDehgeV1Yng==", + "dev": true, + "dependencies": { + "@shikijs/engine-oniguruma": "^1.24.2", + "@shikijs/types": "^1.24.2", + "@shikijs/vscode-textmate": "^9.3.0" + } + }, "node_modules/@highlightjs/cdn-assets": { "version": "11.10.0", "resolved": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.10.0.tgz", @@ -3483,6 +3495,32 @@ "node": ">=18" } }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.2.tgz", + "integrity": "sha512-ZN6k//aDNWRJs1uKB12pturKHh7GejKugowOFGAuG7TxDRLod1Bd5JhpOikOiFqPmKjKEPtEA6mRCf7q3ulDyQ==", + "dev": true, + "dependencies": { + "@shikijs/types": "1.24.2", + "@shikijs/vscode-textmate": "^9.3.0" + } + }, + "node_modules/@shikijs/types": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.24.2.tgz", + "integrity": "sha512-bdeWZiDtajGLG9BudI0AHet0b6e7FbR0EsE4jpGaI0YwHm/XJunI9+3uZnzFtX65gsyJ6ngCIWUfA4NWRPnBkQ==", + "dev": true, + "dependencies": { + "@shikijs/vscode-textmate": "^9.3.0", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.3.1.tgz", + "integrity": "sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -3979,6 +4017,15 @@ "@types/node": "*" } }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/html": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/html/-/html-1.0.4.tgz", @@ -4334,6 +4381,12 @@ "integrity": "sha512-TL2IgGgc7B5j78rIccBtlYAnkuv8nUQqhQc+DSYV5j9Be9XOcm/SKOVRuA47xAVI3680Tk9B1d8flK2GWT2+4w==", "dev": true }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true + }, "node_modules/@types/ws": { "version": "8.5.13", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", @@ -5412,10 +5465,11 @@ } }, "node_modules/bluebird": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz", - "integrity": "sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==", - "dev": true + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" }, "node_modules/bmp-js": { "version": "0.1.0", @@ -12036,10 +12090,11 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/jsdoc": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz", - "integrity": "sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.4.tgz", + "integrity": "sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@babel/parser": "^7.20.15", "@jsdoc/salty": "^0.2.1", @@ -12064,17 +12119,12 @@ "node": ">=12.0.0" } }, - "node_modules/jsdoc/node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "node_modules/jsdoc/node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12084,6 +12134,7 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, + "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -12096,6 +12147,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -12108,6 +12160,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -12683,6 +12736,12 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "license": "ISC" }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, "node_modules/lzma-native": { "version": "8.0.5", "resolved": "https://registry.npmjs.org/lzma-native/-/lzma-native-8.0.5.tgz", @@ -16898,6 +16957,52 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typedoc": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.4.tgz", + "integrity": "sha512-wXPQs1AYC2Crk+1XFpNuutLIkNWleokZf1UNf/X8w9KsMnirkvT+LzxTXDvfF6ug3TSLf3Xu5ZXRKGfoXPX7IA==", + "dev": true, + "dependencies": { + "@gerrit0/mini-shiki": "^1.24.0", + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "yaml": "^2.6.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/typescript": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", @@ -17687,6 +17792,18 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 5e0b7be88..9cc944627 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "qstart-electron": "npm run switch-electron && npm run start-electron", "switch-server": "rimraf ./node_modules/better-sqlite3 && npm install", "switch-electron": "npx electron-rebuild", - "build-backend-docs": "rimraf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js", - "build-frontend-docs": "rimraf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js", + "build-backend-docs": "rimraf ./docs/backend_api && typedoc ./docs/backend_api src/becca/entities/*.ts src/services/backend_script_api.ts src/services/sql.ts", + "build-frontend-docs": "rimraf ./docs/frontend_api && jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js", "build-docs": "npm run build-backend-docs && npm run build-frontend-docs", "webpack": "cross-env node --import ./loader-register.js node_modules/webpack/bin/webpack.js -c webpack.config.ts", "test-jasmine": "cross-env TRILIUM_DATA_DIR=./data-test tsx ./node_modules/jasmine/bin/jasmine.js", @@ -189,7 +189,7 @@ "esm": "3.2.25", "iconsur": "1.7.0", "jasmine": "5.5.0", - "jsdoc": "4.0.3", + "jsdoc": "4.0.4", "lorem-ipsum": "2.0.8", "nodemon": "3.1.7", "rcedit": "4.0.1", @@ -197,6 +197,7 @@ "ts-node": "10.9.2", "tslib": "2.8.1", "tsx": "4.19.2", + "typedoc": "0.27.4", "typescript": "5.7.2", "webpack": "5.97.1", "webpack-cli": "5.1.4" diff --git a/src/public/app/widgets/basic_widget.js b/src/public/app/widgets/basic_widget.js index 33ade4cb4..54b0b92a7 100644 --- a/src/public/app/widgets/basic_widget.js +++ b/src/public/app/widgets/basic_widget.js @@ -194,7 +194,7 @@ class BasicWidget extends Component { /** * Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. - * @returns + * @returns whether the widget is enabled. */ isEnabled() { return true; diff --git a/src/public/app/widgets/note_context_aware_widget.js b/src/public/app/widgets/note_context_aware_widget.js index 06e6219e4..014775210 100644 --- a/src/public/app/widgets/note_context_aware_widget.js +++ b/src/public/app/widgets/note_context_aware_widget.js @@ -48,7 +48,7 @@ class NoteContextAwareWidget extends BasicWidget { } /** - * @inheritdoc + * Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. * *

* If the widget is not enabled, it will not receive `refreshWithNote` updates. diff --git a/src/services/sql.ts b/src/services/sql.ts index 0f1cf5ea4..d2b14c669 100644 --- a/src/services/sql.ts +++ b/src/services/sql.ts @@ -347,7 +347,6 @@ export default { /** * Get single value from the given query - first column from first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns single value @@ -357,7 +356,6 @@ export default { /** * Get first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of column name to column value @@ -368,7 +366,6 @@ export default { /** * Get all returned rows. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - array of all rows, each row is a map of column name to column value @@ -381,7 +378,6 @@ export default { /** * Get a map of first column mapping to second column. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of first column to second column @@ -391,7 +387,6 @@ export default { /** * Get a first column in an array. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns array of first column of all returned rows @@ -401,7 +396,6 @@ export default { /** * Execute SQL * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed */ diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 000000000..4ecad5a1f --- /dev/null +++ b/typedoc.json @@ -0,0 +1,8 @@ +{ + "outputs": [ + { + "name": "html", + "path": "./docs/backend_api" + } + ] +} \ No newline at end of file