mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
API docs build
This commit is contained in:
@@ -828,7 +828,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BAttachment<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
|
||||
<div class="class-description">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.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -2220,7 +2221,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<div class="description">
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BAttribute<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
<div class="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
and relation (representing named relationship between source and target note)</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -1735,7 +1736,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<div class="description">
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,11 @@
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BBranch<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
<div class="class-description">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.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -417,7 +421,11 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1842,7 +1850,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<h4 class="name" id="markAsDeleted"><span class="type-signature"></span>markAsDeleted<span class="signature">(deleteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,13 @@
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BEtapiToken<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
|
||||
<div class="class-description">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.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -1287,7 +1293,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1325,7 +1325,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
Adds a new attribute to this note. The attribute is saved and returned.
|
||||
Adds a new attribute to this note. The attribute is saved and returned.
|
||||
See addLabel, addRelation for more specific methods.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1896,7 +1897,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<div class="description">
|
||||
Adds a new relation to this note. The relation attribute is saved and
|
||||
returned.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2376,7 +2378,17 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3627,7 +3639,8 @@
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3845,7 +3858,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
Beware that the method must not create a copy of the array, but actually returns its internal array
|
||||
(for performance reasons)
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5008,7 +5022,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
This is used for:
|
||||
- fast searching
|
||||
- note similarity evaluation
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5187,7 +5203,8 @@
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
|
||||
- returns only notes which are templated, does not include their subtrees
|
||||
in effect returns notes which are influenced by note's non-inheritable attributes
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6045,7 +6062,9 @@
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
|
||||
attribute belonging to this specific note (excludes inherited attributes)
|
||||
|
||||
This method can be significantly faster than the getAttribute()
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6263,7 +6282,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
Beware that the method must not create a copy of the array, but actually returns its internal array
|
||||
(for performance reasons)
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12101,7 +12121,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1151,7 +1151,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1083,7 +1083,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BRevision<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Revision represents a snapshot of note's title and content at some point in the past.
|
||||
<div class="class-description">Revision represents a snapshot of note's title and content at some point in the past.
|
||||
It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -2076,7 +2077,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<div class="description">
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -239,7 +240,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line608">line 608</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -781,7 +782,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<div class="description">
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2290,7 +2292,10 @@
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="description last">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)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -4213,7 +4218,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
Instance name identifies particular Trilium instance. It can be useful for scripts
|
||||
if some action needs to happen on only one specific instance.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6160,6 +6166,191 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="runOnFrontend"><span class="type-signature"></span>runOnFrontend<span class="signature">(script, params)</span><span class="type-signature"> → {undefined}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>script</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">script to be executed on the frontend</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>params</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Array.<?></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">list of parameters to the anonymous function to be sent to frontend</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line572">line 572</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
- no return value is provided.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">undefined</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="searchForNote"><span class="type-signature"></span>searchForNote<span class="signature">(query, searchParams<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="BNote.html">BNote</a>|null}</span></h4>
|
||||
|
||||
|
||||
@@ -6168,7 +6359,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
"#dateModified =* MONTH AND #log". See <a href="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6369,7 +6561,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
"#dateModified =* MONTH AND #log". See <a href="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6567,7 +6760,10 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<h4 class="name" id="setNoteToParent"><span class="type-signature"></span>setNoteToParent<span class="signature">(noteId, prefix, parentNoteId)</span><span class="type-signature"> → {void}</span></h4>
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6930,7 +7126,8 @@
|
||||
</td>
|
||||
|
||||
|
||||
</td>
|
||||
<td class="description last">'title', 'dateCreated', 'dateModified' or a label name
|
||||
See <a href="https://github.com/zadam/trilium/wiki/Sorting">https://github.com/zadam/trilium/wiki/Sorting</a> for details.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -7342,7 +7539,8 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
|
||||
This functions wraps code which is supposed to be running in transaction. If transaction already
|
||||
exists, then we'll use that transaction.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -448,7 +448,9 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
There are many different Note types, some of which are entirely opaque to the
|
||||
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.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user