Compare commits
	
		
			199 Commits
		
	
	
		
			v0.29.0-be
			...
			v0.31.1-be
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					147d79c65c | ||
| 
						 | 
					77c9b64dc7 | ||
| 
						 | 
					47cb7c7f5e | ||
| 
						 | 
					1bd769827d | ||
| 
						 | 
					71916b5e28 | ||
| 
						 | 
					b2d4330692 | ||
| 
						 | 
					253a6ef081 | ||
| 
						 | 
					e1e020c1a4 | ||
| 
						 | 
					2b4413a1bd | ||
| 
						 | 
					dae674a7cd | ||
| 
						 | 
					751bf94758 | ||
| 
						 | 
					4b934a4a81 | ||
| 
						 | 
					7e374e795b | ||
| 
						 | 
					be378f71b0 | ||
| 
						 | 
					27f74489fd | ||
| 
						 | 
					ae8f4ffbbe | ||
| 
						 | 
					896776516b | ||
| 
						 | 
					a27525af9e | ||
| 
						 | 
					83b4382787 | ||
| 
						 | 
					ef1b32d586 | ||
| 
						 | 
					fe3a0bc756 | ||
| 
						 | 
					2259e1d44d | ||
| 
						 | 
					9ca4a016eb | ||
| 
						 | 
					2978a262f7 | ||
| 
						 | 
					f47f3461e6 | ||
| 
						 | 
					06202c31e4 | ||
| 
						 | 
					925dc258a6 | ||
| 
						 | 
					3670800a51 | ||
| 
						 | 
					90a331b989 | ||
| 
						 | 
					a4c8bdeda2 | ||
| 
						 | 
					5bda254184 | ||
| 
						 | 
					26621c0318 | ||
| 
						 | 
					c6806256fd | ||
| 
						 | 
					f00e1235f9 | ||
| 
						 | 
					51bede6541 | ||
| 
						 | 
					75dbaa4b77 | ||
| 
						 | 
					bec6576620 | ||
| 
						 | 
					44551e0e8c | ||
| 
						 | 
					67553cb40e | ||
| 
						 | 
					7cafbda7cd | ||
| 
						 | 
					9a5a085103 | ||
| 
						 | 
					cdb17ae937 | ||
| 
						 | 
					c240fb9896 | ||
| 
						 | 
					4b41eddf44 | ||
| 
						 | 
					b51ac112a2 | ||
| 
						 | 
					a1ac609b34 | ||
| 
						 | 
					66e2a12f3d | ||
| 
						 | 
					9f69294f7f | ||
| 
						 | 
					a5fc8d5329 | ||
| 
						 | 
					7bbf797caf | ||
| 
						 | 
					f479c0e10e | ||
| 
						 | 
					0f32154b91 | ||
| 
						 | 
					f2019ee5f9 | ||
| 
						 | 
					89b8e2bb08 | ||
| 
						 | 
					8fb6edad67 | ||
| 
						 | 
					c2e3a3fe04 | ||
| 
						 | 
					b2052a6ccd | ||
| 
						 | 
					a07479cd5a | ||
| 
						 | 
					3820384f51 | ||
| 
						 | 
					0610576e5a | ||
| 
						 | 
					efac7701eb | ||
| 
						 | 
					905eb303bc | ||
| 
						 | 
					27cee1cf33 | ||
| 
						 | 
					3c56d29fca | ||
| 
						 | 
					946dae72d9 | ||
| 
						 | 
					58f71c7300 | ||
| 
						 | 
					07e9013152 | ||
| 
						 | 
					29c60581a6 | ||
| 
						 | 
					4bdcf32475 | ||
| 
						 | 
					44c742e839 | ||
| 
						 | 
					001bd1d004 | ||
| 
						 | 
					6c7e2f0aa1 | ||
| 
						 | 
					9fc5d328b4 | ||
| 
						 | 
					f6413d095c | ||
| 
						 | 
					d66ad4319e | ||
| 
						 | 
					251fcaeb48 | ||
| 
						 | 
					3311c6336c | ||
| 
						 | 
					fc13e1fa6a | ||
| 
						 | 
					9ca680f842 | ||
| 
						 | 
					616829464f | ||
| 
						 | 
					0267468cd5 | ||
| 
						 | 
					ca0d17d93a | ||
| 
						 | 
					3f656ea76f | ||
| 
						 | 
					1faf2c6ecd | ||
| 
						 | 
					33f2aaa650 | ||
| 
						 | 
					177caec011 | ||
| 
						 | 
					62650a4545 | ||
| 
						 | 
					81dc907afc | ||
| 
						 | 
					3ee33e1024 | ||
| 
						 | 
					2326eb85f1 | ||
| 
						 | 
					0885e60b80 | ||
| 
						 | 
					ef40c66344 | ||
| 
						 | 
					0d0464549f | ||
| 
						 | 
					b68b0fe783 | ||
| 
						 | 
					b4c6d9f800 | ||
| 
						 | 
					24c8b39d8e | ||
| 
						 | 
					0144dc12df | ||
| 
						 | 
					65684550a8 | ||
| 
						 | 
					6d09931a39 | ||
| 
						 | 
					1c41d459f0 | ||
| 
						 | 
					f65fefe7b1 | ||
| 
						 | 
					0a906b5663 | ||
| 
						 | 
					dd9b7bbbb5 | ||
| 
						 | 
					d25a1e3ed9 | ||
| 
						 | 
					05374becfd | ||
| 
						 | 
					37d2a7939c | ||
| 
						 | 
					a432ad7483 | ||
| 
						 | 
					ae17e4dc60 | ||
| 
						 | 
					02eddc347a | ||
| 
						 | 
					ee58bf3d5c | ||
| 
						 | 
					ecbaffa5f3 | ||
| 
						 | 
					fe86c09f22 | ||
| 
						 | 
					c8e01d6cce | ||
| 
						 | 
					fd0bd5dd00 | ||
| 
						 | 
					cd6d4fb527 | ||
| 
						 | 
					8ed6851e85 | ||
| 
						 | 
					a6fd3bfb00 | ||
| 
						 | 
					610dd8a783 | ||
| 
						 | 
					7c404f03db | ||
| 
						 | 
					ed1cf6aad5 | ||
| 
						 | 
					9703fd61e2 | ||
| 
						 | 
					16790e388b | ||
| 
						 | 
					b48474998b | ||
| 
						 | 
					95d8f07458 | ||
| 
						 | 
					e628c30c89 | ||
| 
						 | 
					52a8aae74f | ||
| 
						 | 
					54b5898582 | ||
| 
						 | 
					64974d75d5 | ||
| 
						 | 
					bd118027fb | ||
| 
						 | 
					36de217835 | ||
| 
						 | 
					b5283d58bb | ||
| 
						 | 
					8414d97ffa | ||
| 
						 | 
					9f30d4e673 | ||
| 
						 | 
					8e0d1fa0df | ||
| 
						 | 
					5b251b9977 | ||
| 
						 | 
					8b3e721028 | ||
| 
						 | 
					7e2a2baa5d | ||
| 
						 | 
					003eed368b | ||
| 
						 | 
					4b1cf05c0e | ||
| 
						 | 
					d9429c4f4b | ||
| 
						 | 
					b7bd94b6b0 | ||
| 
						 | 
					51bbc10744 | ||
| 
						 | 
					fb5df33ee7 | ||
| 
						 | 
					d8ba0ccd7d | ||
| 
						 | 
					886ea6c68c | ||
| 
						 | 
					ec384fafce | ||
| 
						 | 
					936f85c09e | ||
| 
						 | 
					b25deea21d | ||
| 
						 | 
					cf5ec44303 | ||
| 
						 | 
					6f956c2415 | ||
| 
						 | 
					3533160bef | ||
| 
						 | 
					60cbfdcabd | ||
| 
						 | 
					604f036a54 | ||
| 
						 | 
					dd4f3ec264 | ||
| 
						 | 
					ff67b8a0ba | ||
| 
						 | 
					1d5fb0b646 | ||
| 
						 | 
					80931a318f | ||
| 
						 | 
					16f16cb36a | ||
| 
						 | 
					899f24cde5 | ||
| 
						 | 
					9f29521ab8 | ||
| 
						 | 
					c1ce0c6b22 | ||
| 
						 | 
					a7fce33750 | ||
| 
						 | 
					6fd8e73150 | ||
| 
						 | 
					1359dd86c2 | ||
| 
						 | 
					a1b610fc50 | ||
| 
						 | 
					c849d719e9 | ||
| 
						 | 
					96de2e7008 | ||
| 
						 | 
					f140b77e7c | ||
| 
						 | 
					22228de63b | ||
| 
						 | 
					b0596c9eb2 | ||
| 
						 | 
					2a2319d434 | ||
| 
						 | 
					dad47d115f | ||
| 
						 | 
					502026359c | ||
| 
						 | 
					47b0e4e4d3 | ||
| 
						 | 
					6c927d9159 | ||
| 
						 | 
					ddc79b2517 | ||
| 
						 | 
					4c2e12d2cb | ||
| 
						 | 
					14f7a8b7b9 | ||
| 
						 | 
					caa7dd9619 | ||
| 
						 | 
					8aa7e2d0a0 | ||
| 
						 | 
					6be8a3f343 | ||
| 
						 | 
					a097cefba7 | ||
| 
						 | 
					e4c78f3887 | ||
| 
						 | 
					5baa251944 | ||
| 
						 | 
					cde68abec9 | ||
| 
						 | 
					51175e3676 | ||
| 
						 | 
					45ddfef30a | ||
| 
						 | 
					1e1d78999e | ||
| 
						 | 
					92fcd7b345 | ||
| 
						 | 
					e04f1cd574 | ||
| 
						 | 
					176c3a5d51 | ||
| 
						 | 
					c09570cf39 | ||
| 
						 | 
					4a093000be | ||
| 
						 | 
					6952b643ae | ||
| 
						 | 
					c487a95bc7 | ||
| 
						 | 
					8884177d9f | ||
| 
						 | 
					8b250ed523 | ||
| 
						 | 
					d8b78d8025 | ||
| 
						 | 
					42112b8053 | 
@@ -1,8 +1,8 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<dataSource name="document.db">
 | 
			
		||||
  <database-model serializer="dbm" dbms="SQLITE" family-id="SQLITE" format-version="4.14">
 | 
			
		||||
  <database-model serializer="dbm" dbms="SQLITE" family-id="SQLITE" format-version="4.15">
 | 
			
		||||
    <root id="1">
 | 
			
		||||
      <ServerVersion>3.16.1</ServerVersion>
 | 
			
		||||
      <ServerVersion>3.25.1</ServerVersion>
 | 
			
		||||
    </root>
 | 
			
		||||
    <schema id="2" parent="1" name="main">
 | 
			
		||||
      <Current>1</Current>
 | 
			
		||||
@@ -16,586 +16,737 @@
 | 
			
		||||
    <table id="8" parent="2" name="branches"/>
 | 
			
		||||
    <table id="9" parent="2" name="event_log"/>
 | 
			
		||||
    <table id="10" parent="2" name="links"/>
 | 
			
		||||
    <table id="11" parent="2" name="note_revisions"/>
 | 
			
		||||
    <table id="12" parent="2" name="notes"/>
 | 
			
		||||
    <table id="13" parent="2" name="options"/>
 | 
			
		||||
    <table id="14" parent="2" name="recent_notes"/>
 | 
			
		||||
    <table id="15" parent="2" name="source_ids"/>
 | 
			
		||||
    <table id="16" parent="2" name="sqlite_master">
 | 
			
		||||
    <table id="11" parent="2" name="note_contents"/>
 | 
			
		||||
    <table id="12" parent="2" name="note_fulltext_config">
 | 
			
		||||
      <WithoutRowId>1</WithoutRowId>
 | 
			
		||||
    </table>
 | 
			
		||||
    <table id="13" parent="2" name="note_fulltext_content"/>
 | 
			
		||||
    <table id="14" parent="2" name="note_fulltext_data"/>
 | 
			
		||||
    <table id="15" parent="2" name="note_fulltext_docsize"/>
 | 
			
		||||
    <table id="16" parent="2" name="note_fulltext_idx">
 | 
			
		||||
      <WithoutRowId>1</WithoutRowId>
 | 
			
		||||
    </table>
 | 
			
		||||
    <table id="17" parent="2" name="note_revisions"/>
 | 
			
		||||
    <table id="18" parent="2" name="notes"/>
 | 
			
		||||
    <table id="19" parent="2" name="options"/>
 | 
			
		||||
    <table id="20" parent="2" name="recent_notes"/>
 | 
			
		||||
    <table id="21" parent="2" name="source_ids"/>
 | 
			
		||||
    <table id="22" parent="2" name="sqlite_master">
 | 
			
		||||
      <System>1</System>
 | 
			
		||||
    </table>
 | 
			
		||||
    <table id="17" parent="2" name="sqlite_sequence">
 | 
			
		||||
    <table id="23" parent="2" name="sqlite_sequence">
 | 
			
		||||
      <System>1</System>
 | 
			
		||||
    </table>
 | 
			
		||||
    <table id="18" parent="2" name="sync"/>
 | 
			
		||||
    <column id="19" parent="6" name="apiTokenId">
 | 
			
		||||
    <table id="24" parent="2" name="sync"/>
 | 
			
		||||
    <virtual-table id="25" parent="2" name="note_fulltext">
 | 
			
		||||
      <Module>fts5</Module>
 | 
			
		||||
      <Arguments>noteId UNINDEXED
 | 
			
		||||
title
 | 
			
		||||
titleHash UNINDEXED
 | 
			
		||||
content
 | 
			
		||||
contentHash UNINDEXED</Arguments>
 | 
			
		||||
    </virtual-table>
 | 
			
		||||
    <column id="26" parent="6" name="apiTokenId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="20" parent="6" name="token">
 | 
			
		||||
    <column id="27" parent="6" name="token">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="21" parent="6" name="dateCreated">
 | 
			
		||||
    <column id="28" parent="6" name="utcDateCreated">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="22" parent="6" name="isDeleted">
 | 
			
		||||
    <column id="29" parent="6" name="isDeleted">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="23" parent="6" name="hash">
 | 
			
		||||
    <column id="30" parent="6" name="hash">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="24" parent="6" name="sqlite_autoindex_api_tokens_1">
 | 
			
		||||
    <index id="31" parent="6" name="sqlite_autoindex_api_tokens_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>apiTokenId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="25" parent="6">
 | 
			
		||||
    <key id="32" parent="6">
 | 
			
		||||
      <ColNames>apiTokenId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_api_tokens_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="26" parent="7" name="attributeId">
 | 
			
		||||
    <column id="33" parent="7" name="attributeId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="27" parent="7" name="noteId">
 | 
			
		||||
    <column id="34" parent="7" name="noteId">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="28" parent="7" name="type">
 | 
			
		||||
    <column id="35" parent="7" name="type">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="29" parent="7" name="name">
 | 
			
		||||
    <column id="36" parent="7" name="name">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="30" parent="7" name="value">
 | 
			
		||||
    <column id="37" parent="7" name="value">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>''</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="31" parent="7" name="position">
 | 
			
		||||
    <column id="38" parent="7" name="position">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="32" parent="7" name="dateCreated">
 | 
			
		||||
    <column id="39" parent="7" name="utcDateCreated">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="33" parent="7" name="dateModified">
 | 
			
		||||
    <column id="40" parent="7" name="utcDateModified">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="34" parent="7" name="isDeleted">
 | 
			
		||||
    <column id="41" parent="7" name="isDeleted">
 | 
			
		||||
      <Position>9</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="35" parent="7" name="hash">
 | 
			
		||||
    <column id="42" parent="7" name="hash">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="36" parent="7" name="isInheritable">
 | 
			
		||||
    <column id="43" parent="7" name="isInheritable">
 | 
			
		||||
      <Position>11</Position>
 | 
			
		||||
      <DataType>int|0s</DataType>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="37" parent="7" name="sqlite_autoindex_attributes_1">
 | 
			
		||||
    <index id="44" parent="7" name="sqlite_autoindex_attributes_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>attributeId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="38" parent="7">
 | 
			
		||||
    <index id="45" parent="7" name="IDX_attributes_noteId_index">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="46" parent="7" name="IDX_attributes_name_value">
 | 
			
		||||
      <ColNames>name
 | 
			
		||||
value</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="47" parent="7" name="IDX_attributes_name_index">
 | 
			
		||||
      <ColNames>name</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="48" parent="7" name="IDX_attributes_value_index">
 | 
			
		||||
      <ColNames>value</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="49" parent="7">
 | 
			
		||||
      <ColNames>attributeId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_attributes_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="39" parent="8" name="branchId">
 | 
			
		||||
    <column id="50" parent="8" name="branchId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="40" parent="8" name="noteId">
 | 
			
		||||
    <column id="51" parent="8" name="noteId">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="41" parent="8" name="parentNoteId">
 | 
			
		||||
    <column id="52" parent="8" name="parentNoteId">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="42" parent="8" name="notePosition">
 | 
			
		||||
    <column id="53" parent="8" name="notePosition">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="43" parent="8" name="prefix">
 | 
			
		||||
    <column id="54" parent="8" name="prefix">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="44" parent="8" name="isExpanded">
 | 
			
		||||
    <column id="55" parent="8" name="isExpanded">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>BOOLEAN|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="45" parent="8" name="isDeleted">
 | 
			
		||||
    <column id="56" parent="8" name="isDeleted">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="46" parent="8" name="dateModified">
 | 
			
		||||
    <column id="57" parent="8" name="utcDateModified">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="47" parent="8" name="hash">
 | 
			
		||||
    <column id="58" parent="8" name="utcDateCreated">
 | 
			
		||||
      <Position>9</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="59" parent="8" name="hash">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="48" parent="8" name="dateCreated">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>'1970-01-01T00:00:00.000Z'</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="49" parent="8" name="sqlite_autoindex_branches_1">
 | 
			
		||||
    <index id="60" parent="8" name="sqlite_autoindex_branches_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>branchId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="50" parent="8" name="IDX_branches_noteId_parentNoteId">
 | 
			
		||||
    <index id="61" parent="8" name="IDX_branches_noteId_parentNoteId">
 | 
			
		||||
      <ColNames>noteId
 | 
			
		||||
parentNoteId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="51" parent="8" name="IDX_branches_noteId">
 | 
			
		||||
    <index id="62" parent="8" name="IDX_branches_noteId">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="52" parent="8" name="IDX_branches_parentNoteId">
 | 
			
		||||
    <index id="63" parent="8" name="IDX_branches_parentNoteId">
 | 
			
		||||
      <ColNames>parentNoteId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="53" parent="8">
 | 
			
		||||
    <key id="64" parent="8">
 | 
			
		||||
      <ColNames>branchId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_branches_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="54" parent="9" name="eventId">
 | 
			
		||||
    <column id="65" parent="9" name="eventId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="55" parent="9" name="noteId">
 | 
			
		||||
    <column id="66" parent="9" name="noteId">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="56" parent="9" name="comment">
 | 
			
		||||
    <column id="67" parent="9" name="comment">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="57" parent="9" name="dateCreated">
 | 
			
		||||
    <column id="68" parent="9" name="utcDateCreated">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="58" parent="9" name="sqlite_autoindex_event_log_1">
 | 
			
		||||
    <index id="69" parent="9" name="sqlite_autoindex_event_log_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>eventId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="59" parent="9">
 | 
			
		||||
    <key id="70" parent="9">
 | 
			
		||||
      <ColNames>eventId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_event_log_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="60" parent="10" name="linkId">
 | 
			
		||||
    <column id="71" parent="10" name="linkId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="61" parent="10" name="noteId">
 | 
			
		||||
    <column id="72" parent="10" name="noteId">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="62" parent="10" name="targetNoteId">
 | 
			
		||||
    <column id="73" parent="10" name="targetNoteId">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="63" parent="10" name="type">
 | 
			
		||||
    <column id="74" parent="10" name="type">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="64" parent="10" name="isDeleted">
 | 
			
		||||
    <column id="75" parent="10" name="hash">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="65" parent="10" name="dateCreated">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="66" parent="10" name="dateModified">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="67" parent="10" name="hash">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="68" parent="10" name="sqlite_autoindex_links_1">
 | 
			
		||||
    <column id="76" parent="10" name="isDeleted">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="77" parent="10" name="utcDateCreated">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="78" parent="10" name="utcDateModified">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="79" parent="10" name="sqlite_autoindex_links_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>linkId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="69" parent="10">
 | 
			
		||||
    <index id="80" parent="10" name="IDX_links_noteId_index">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="81" parent="10" name="IDX_links_targetNoteId_index">
 | 
			
		||||
      <ColNames>targetNoteId</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="82" parent="10">
 | 
			
		||||
      <ColNames>linkId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_links_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="70" parent="11" name="noteRevisionId">
 | 
			
		||||
    <column id="83" parent="11" name="noteId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="71" parent="11" name="noteId">
 | 
			
		||||
    <column id="84" parent="11" name="content">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <DefaultExpression>NULL</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="85" parent="11" name="hash">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="86" parent="11" name="utcDateModified">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="87" parent="11" name="sqlite_autoindex_note_contents_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="88" parent="11">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_note_contents_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="89" parent="12" name="k">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="90" parent="12" name="v">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="91" parent="12" name="sqlite_autoindex_note_fulltext_config_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>k</ColNames>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="92" parent="12">
 | 
			
		||||
      <ColNames>k</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_note_fulltext_config_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="93" parent="13" name="id">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="94" parent="13" name="c0">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="95" parent="13" name="c1">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="96" parent="13" name="c2">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="97" parent="13" name="c3">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="98" parent="13" name="c4">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <key id="99" parent="13">
 | 
			
		||||
      <ColNames>id</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="100" parent="14" name="id">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="101" parent="14" name="block">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>BLOB|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <key id="102" parent="14">
 | 
			
		||||
      <ColNames>id</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="103" parent="15" name="id">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="104" parent="15" name="sz">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>BLOB|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <key id="105" parent="15">
 | 
			
		||||
      <ColNames>id</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="106" parent="16" name="segid">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="107" parent="16" name="term">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="108" parent="16" name="pgno">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="109" parent="16" name="sqlite_autoindex_note_fulltext_idx_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>segid
 | 
			
		||||
term</ColNames>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="110" parent="16">
 | 
			
		||||
      <ColNames>segid
 | 
			
		||||
term</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_note_fulltext_idx_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="111" parent="17" name="noteRevisionId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="112" parent="17" name="noteId">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="72" parent="11" name="title">
 | 
			
		||||
    <column id="113" parent="17" name="title">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="73" parent="11" name="content">
 | 
			
		||||
    <column id="114" parent="17" name="content">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="74" parent="11" name="isProtected">
 | 
			
		||||
    <column id="115" parent="17" name="isProtected">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="75" parent="11" name="dateModifiedFrom">
 | 
			
		||||
    <column id="116" parent="17" name="utcDateModifiedFrom">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="76" parent="11" name="dateModifiedTo">
 | 
			
		||||
    <column id="117" parent="17" name="utcDateModifiedTo">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="77" parent="11" name="type">
 | 
			
		||||
    <column id="118" parent="17" name="dateModifiedFrom">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>''</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="78" parent="11" name="mime">
 | 
			
		||||
    <column id="119" parent="17" name="dateModifiedTo">
 | 
			
		||||
      <Position>9</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="120" parent="17" name="type">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>''</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="79" parent="11" name="hash">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
    <column id="121" parent="17" name="mime">
 | 
			
		||||
      <Position>11</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>''</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="122" parent="17" name="hash">
 | 
			
		||||
      <Position>12</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="80" parent="11" name="sqlite_autoindex_note_revisions_1">
 | 
			
		||||
    <index id="123" parent="17" name="sqlite_autoindex_note_revisions_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>noteRevisionId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="81" parent="11" name="IDX_note_revisions_noteId">
 | 
			
		||||
    <index id="124" parent="17" name="IDX_note_revisions_noteId">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="82" parent="11" name="IDX_note_revisions_dateModifiedFrom">
 | 
			
		||||
      <ColNames>dateModifiedFrom</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    <index id="125" parent="17" name="IDX_note_revisions_dateModifiedFrom">
 | 
			
		||||
      <ColNames>utcDateModifiedFrom</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="83" parent="11" name="IDX_note_revisions_dateModifiedTo">
 | 
			
		||||
      <ColNames>dateModifiedTo</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    <index id="126" parent="17" name="IDX_note_revisions_dateModifiedTo">
 | 
			
		||||
      <ColNames>utcDateModifiedTo</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="84" parent="11">
 | 
			
		||||
    <key id="127" parent="17">
 | 
			
		||||
      <ColNames>noteRevisionId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_note_revisions_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="85" parent="12" name="noteId">
 | 
			
		||||
    <column id="128" parent="18" name="noteId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="86" parent="12" name="title">
 | 
			
		||||
    <column id="129" parent="18" name="title">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>"note"</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="87" parent="12" name="content">
 | 
			
		||||
    <column id="130" parent="18" name="isProtected">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <DefaultExpression>NULL</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="88" parent="12" name="isProtected">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="89" parent="12" name="type">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
    <column id="131" parent="18" name="type">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>'text'</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="90" parent="12" name="mime">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
    <column id="132" parent="18" name="mime">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>'text/html'</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="91" parent="12" name="hash">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
    <column id="133" parent="18" name="hash">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="92" parent="12" name="isDeleted">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
    <column id="134" parent="18" name="isDeleted">
 | 
			
		||||
      <Position>7</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="93" parent="12" name="dateCreated">
 | 
			
		||||
    <column id="135" parent="18" name="dateCreated">
 | 
			
		||||
      <Position>8</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="136" parent="18" name="dateModified">
 | 
			
		||||
      <Position>9</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="94" parent="12" name="dateModified">
 | 
			
		||||
    <column id="137" parent="18" name="utcDateCreated">
 | 
			
		||||
      <Position>10</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="95" parent="12" name="sqlite_autoindex_notes_1">
 | 
			
		||||
    <column id="138" parent="18" name="utcDateModified">
 | 
			
		||||
      <Position>11</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="139" parent="18" name="sqlite_autoindex_notes_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="96" parent="12">
 | 
			
		||||
    <key id="140" parent="18">
 | 
			
		||||
      <ColNames>noteId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_notes_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="97" parent="13" name="name">
 | 
			
		||||
    <column id="141" parent="19" name="name">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="98" parent="13" name="value">
 | 
			
		||||
    <column id="142" parent="19" name="value">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="99" parent="13" name="dateModified">
 | 
			
		||||
    <column id="143" parent="19" name="isSynced">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="100" parent="13" name="isSynced">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>0</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="101" parent="13" name="hash">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
    <column id="144" parent="19" name="hash">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="102" parent="13" name="dateCreated">
 | 
			
		||||
    <column id="145" parent="19" name="utcDateCreated">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="146" parent="19" name="utcDateModified">
 | 
			
		||||
      <Position>6</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>'1970-01-01T00:00:00.000Z'</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="103" parent="13" name="sqlite_autoindex_options_1">
 | 
			
		||||
    <index id="147" parent="19" name="sqlite_autoindex_options_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>name</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="104" parent="13">
 | 
			
		||||
    <key id="148" parent="19">
 | 
			
		||||
      <ColNames>name</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_options_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="105" parent="14" name="branchId">
 | 
			
		||||
    <column id="149" parent="20" name="branchId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="106" parent="14" name="notePath">
 | 
			
		||||
    <column id="150" parent="20" name="notePath">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="107" parent="14" name="hash">
 | 
			
		||||
    <column id="151" parent="20" name="hash">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <DefaultExpression>""</DefaultExpression>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="108" parent="14" name="dateCreated">
 | 
			
		||||
    <column id="152" parent="20" name="utcDateCreated">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="109" parent="14" name="isDeleted">
 | 
			
		||||
    <column id="153" parent="20" name="isDeleted">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>INT|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="110" parent="14" name="sqlite_autoindex_recent_notes_1">
 | 
			
		||||
    <index id="154" parent="20" name="sqlite_autoindex_recent_notes_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>branchId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="111" parent="14">
 | 
			
		||||
    <key id="155" parent="20">
 | 
			
		||||
      <ColNames>branchId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_recent_notes_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="112" parent="15" name="sourceId">
 | 
			
		||||
    <column id="156" parent="21" name="sourceId">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="113" parent="15" name="dateCreated">
 | 
			
		||||
    <column id="157" parent="21" name="utcDateCreated">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="114" parent="15" name="sqlite_autoindex_source_ids_1">
 | 
			
		||||
    <index id="158" parent="21" name="sqlite_autoindex_source_ids_1">
 | 
			
		||||
      <NameSurrogate>1</NameSurrogate>
 | 
			
		||||
      <ColNames>sourceId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="115" parent="15">
 | 
			
		||||
    <key id="159" parent="21">
 | 
			
		||||
      <ColNames>sourceId</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
      <UnderlyingIndexName>sqlite_autoindex_source_ids_1</UnderlyingIndexName>
 | 
			
		||||
    </key>
 | 
			
		||||
    <column id="116" parent="16" name="type">
 | 
			
		||||
    <column id="160" parent="22" name="type">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>text|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="117" parent="16" name="name">
 | 
			
		||||
    <column id="161" parent="22" name="name">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>text|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="118" parent="16" name="tbl_name">
 | 
			
		||||
    <column id="162" parent="22" name="tbl_name">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>text|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="119" parent="16" name="rootpage">
 | 
			
		||||
    <column id="163" parent="22" name="rootpage">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>integer|0s</DataType>
 | 
			
		||||
      <DataType>int|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="120" parent="16" name="sql">
 | 
			
		||||
    <column id="164" parent="22" name="sql">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>text|0s</DataType>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="121" parent="17" name="name">
 | 
			
		||||
    <column id="165" parent="23" name="name">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="122" parent="17" name="seq">
 | 
			
		||||
    <column id="166" parent="23" name="seq">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="123" parent="18" name="id">
 | 
			
		||||
    <column id="167" parent="24" name="id">
 | 
			
		||||
      <Position>1</Position>
 | 
			
		||||
      <DataType>INTEGER|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
      <SequenceIdentity>1</SequenceIdentity>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="124" parent="18" name="entityName">
 | 
			
		||||
    <column id="168" parent="24" name="entityName">
 | 
			
		||||
      <Position>2</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="125" parent="18" name="entityId">
 | 
			
		||||
    <column id="169" parent="24" name="entityId">
 | 
			
		||||
      <Position>3</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="126" parent="18" name="sourceId">
 | 
			
		||||
    <column id="170" parent="24" name="sourceId">
 | 
			
		||||
      <Position>4</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <column id="127" parent="18" name="syncDate">
 | 
			
		||||
    <column id="171" parent="24" name="utcSyncDate">
 | 
			
		||||
      <Position>5</Position>
 | 
			
		||||
      <DataType>TEXT|0s</DataType>
 | 
			
		||||
      <NotNull>1</NotNull>
 | 
			
		||||
    </column>
 | 
			
		||||
    <index id="128" parent="18" name="IDX_sync_entityName_entityId">
 | 
			
		||||
    <index id="172" parent="24" name="IDX_sync_entityName_entityId">
 | 
			
		||||
      <ColNames>entityName
 | 
			
		||||
entityId</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
      <Unique>1</Unique>
 | 
			
		||||
    </index>
 | 
			
		||||
    <index id="129" parent="18" name="IDX_sync_syncDate">
 | 
			
		||||
      <ColNames>syncDate</ColNames>
 | 
			
		||||
      <ColumnCollations></ColumnCollations>
 | 
			
		||||
    <index id="173" parent="24" name="IDX_sync_utcSyncDate">
 | 
			
		||||
      <ColNames>utcSyncDate</ColNames>
 | 
			
		||||
    </index>
 | 
			
		||||
    <key id="130" parent="18">
 | 
			
		||||
    <key id="174" parent="24">
 | 
			
		||||
      <ColNames>id</ColNames>
 | 
			
		||||
      <Primary>1</Primary>
 | 
			
		||||
    </key>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
FROM node:10.15.0-alpine
 | 
			
		||||
FROM node:10.15.3-alpine
 | 
			
		||||
 | 
			
		||||
# Create app directory
 | 
			
		||||
WORKDIR /usr/src/app
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								bin/build-debian.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,7 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
echo "Packaging debian x64 distribution..."
 | 
			
		||||
 | 
			
		||||
VERSION=`jq -r ".version" package.json`
 | 
			
		||||
 | 
			
		||||
./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64
 | 
			
		||||
@@ -11,7 +11,7 @@ cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/
 | 
			
		||||
 | 
			
		||||
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR
 | 
			
		||||
 | 
			
		||||
cp src/public/images/app-icons/png/128x128.png $BUILD_DIR/icon.png
 | 
			
		||||
cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png
 | 
			
		||||
 | 
			
		||||
# removing software WebGL binaries because they are pretty huge and not necessary
 | 
			
		||||
rm -r $BUILD_DIR/swiftshader
 | 
			
		||||
 
 | 
			
		||||
@@ -15,12 +15,12 @@ cp bin/deps/mac-x64/image/cjpeg node_modules/mozjpeg/vendor/
 | 
			
		||||
cp bin/deps/mac-x64/image/pngquant node_modules/pngquant-bin/vendor/
 | 
			
		||||
cp bin/deps/mac-x64/image/gifsicle node_modules/giflossy/vendor/
 | 
			
		||||
 | 
			
		||||
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=darwin --arch=x64 --overwrite --icon=src/public/images/app-icons/mac/icon.icns
 | 
			
		||||
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=darwin --arch=x64 --overwrite --icon=images/app-icons/mac/icon.icns
 | 
			
		||||
 | 
			
		||||
# Mac build has by default useless directory level
 | 
			
		||||
mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR
 | 
			
		||||
 | 
			
		||||
./reset-local.sh
 | 
			
		||||
./bin/reset-local.sh
 | 
			
		||||
 | 
			
		||||
echo "Zipping mac x64 electron distribution..."
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
PKG_DIR=dist/trilium-linux-x64-server
 | 
			
		||||
NODE_VERSION=10.15.0
 | 
			
		||||
NODE_VERSION=10.15.3
 | 
			
		||||
 | 
			
		||||
rm -r $PKG_DIR
 | 
			
		||||
mkdir $PKG_DIR
 | 
			
		||||
@@ -14,6 +14,8 @@ rm node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
			
		||||
mv node-v${NODE_VERSION}-linux-x64 node
 | 
			
		||||
 | 
			
		||||
cp -r ../../node_modules/ ./
 | 
			
		||||
cp -r ../../images/ ./
 | 
			
		||||
cp -r ../../libraries/ ./
 | 
			
		||||
cp -r ../../src/ ./
 | 
			
		||||
cp -r ../../db/ ./
 | 
			
		||||
cp -r ../../package.json ./
 | 
			
		||||
 
 | 
			
		||||
@@ -15,14 +15,14 @@ cp bin/deps/win-x64/image/cjpeg.exe node_modules/mozjpeg/vendor/
 | 
			
		||||
cp bin/deps/win-x64/image/pngquant.exe node_modules/pngquant-bin/vendor/
 | 
			
		||||
cp bin/deps/win-x64/image/gifsicle.exe node_modules/giflossy/vendor/
 | 
			
		||||
 | 
			
		||||
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=win32  --arch=x64 --overwrite --icon=src/public/images/app-icons/win/icon.ico
 | 
			
		||||
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=win32  --arch=x64 --overwrite --icon=images/app-icons/win/icon.ico
 | 
			
		||||
 | 
			
		||||
mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR
 | 
			
		||||
 | 
			
		||||
# removing software WebGL binaries because they are pretty huge and not necessary
 | 
			
		||||
rm -r $BUILD_DIR/swiftshader
 | 
			
		||||
 | 
			
		||||
./reset-local.sh
 | 
			
		||||
./bin/reset-local.sh
 | 
			
		||||
 | 
			
		||||
echo "Zipping windows x64 electron distribution..."
 | 
			
		||||
VERSION=`jq -r ".version" package.json`
 | 
			
		||||
 
 | 
			
		||||
@@ -15,4 +15,7 @@ bin/build-mac-x64.sh
 | 
			
		||||
# building X64 linux as the last so electron-rebuild will prepare X64 binaries for local development
 | 
			
		||||
bin/build-linux-x64.sh
 | 
			
		||||
 | 
			
		||||
# this needs to be run after linux build
 | 
			
		||||
bin/build-debian.sh
 | 
			
		||||
 | 
			
		||||
bin/build-server.sh
 | 
			
		||||
							
								
								
									
										14
									
								
								bin/deb-options.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,14 @@
 | 
			
		||||
{
 | 
			
		||||
  "src": "dist/trilium-linux-x64",
 | 
			
		||||
  "dest": "dist/",
 | 
			
		||||
  "name": "trilium",
 | 
			
		||||
  "productName": "Trilium Notes",
 | 
			
		||||
  "genericName": "Note taker",
 | 
			
		||||
  "description": "Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.",
 | 
			
		||||
  "sections": "misc",
 | 
			
		||||
  "maintainer": "zadam.apps@gmail.com",
 | 
			
		||||
  "homepage": "https://github.com/zadam/trilium",
 | 
			
		||||
  "bin": "trilium",
 | 
			
		||||
  "icon": "dist/trilium-linux-x64/icon.png",
 | 
			
		||||
  "categories": [ "Office" ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										0
									
								
								bin/deps/mac-x64/image/cjpeg
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
							
								
								
									
										0
									
								
								bin/deps/win-x64/image/cjpeg.exe
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						@@ -2,6 +2,6 @@
 | 
			
		||||
 | 
			
		||||
SCHEMA_FILE_PATH=db/schema.sql
 | 
			
		||||
 | 
			
		||||
sqlite3 ~/trilium-data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
 | 
			
		||||
sqlite3 ~/trilium-data/document.db .schema | grep -v "sqlite_sequence" | grep -v "note_fulltext_" > "$SCHEMA_FILE_PATH"
 | 
			
		||||
 | 
			
		||||
echo "DB schema exported to $SCHEMA_FILE_PATH"
 | 
			
		||||
@@ -43,6 +43,7 @@ git push origin $TAG
 | 
			
		||||
bin/build.sh
 | 
			
		||||
 | 
			
		||||
LINUX_X64_BUILD=trilium-linux-x64-$VERSION.tar.xz
 | 
			
		||||
DEBIAN_X64_BUILD=trilium_${VERSION}_amd64.deb
 | 
			
		||||
WINDOWS_X64_BUILD=trilium-windows-x64-$VERSION.zip
 | 
			
		||||
MAC_X64_BUILD=trilium-mac-x64-$VERSION.zip
 | 
			
		||||
SERVER_BUILD=trilium-linux-x64-server-$VERSION.tar.xz
 | 
			
		||||
@@ -59,6 +60,13 @@ github-release release \
 | 
			
		||||
    --tag $TAG \
 | 
			
		||||
    --name "$TAG release" $EXTRA
 | 
			
		||||
 | 
			
		||||
echo "Uploading debian x64 package"
 | 
			
		||||
 | 
			
		||||
github-release upload \
 | 
			
		||||
    --tag $TAG \
 | 
			
		||||
    --name "$DEBIAN_X64_BUILD" \
 | 
			
		||||
    --file "dist/$DEBIAN_X64_BUILD"
 | 
			
		||||
 | 
			
		||||
echo "Uploading linux x64 build"
 | 
			
		||||
 | 
			
		||||
github-release upload \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								db/demo.tar
									
									
									
									
									
								
							
							
						
						
							
								
								
									
										35
									
								
								db/migrations/0125__create_note_content_table.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,35 @@
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_contents" (
 | 
			
		||||
  `noteContentId`	TEXT NOT NULL,
 | 
			
		||||
  `noteId`	TEXT NOT NULL,
 | 
			
		||||
  `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
  `content`	TEXT NULL DEFAULT NULL,
 | 
			
		||||
  `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
  `dateModified` TEXT NOT NULL,
 | 
			
		||||
  PRIMARY KEY(`noteContentId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
CREATE UNIQUE INDEX `IDX_note_contents_noteId` ON `note_contents` (`noteId`);
 | 
			
		||||
 | 
			
		||||
INSERT INTO note_contents (noteContentId, noteId, isProtected, content, dateCreated, dateModified)
 | 
			
		||||
  SELECT 'C' || SUBSTR(noteId, 2), noteId, isProtected, content, dateCreated, dateModified FROM notes;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "notes_mig" (
 | 
			
		||||
  `noteId`	TEXT NOT NULL,
 | 
			
		||||
  `title`	TEXT NOT NULL DEFAULT "note",
 | 
			
		||||
  `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
  `type` TEXT NOT NULL DEFAULT 'text',
 | 
			
		||||
  `mime` TEXT NOT NULL DEFAULT 'text/html',
 | 
			
		||||
  `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
  `isDeleted`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
  `dateModified`	TEXT NOT NULL,
 | 
			
		||||
  PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO notes_mig (noteId, title, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash)
 | 
			
		||||
SELECT noteId, title, isProtected, isDeleted, dateCreated, dateModified, type, mime, hash FROM notes;
 | 
			
		||||
 | 
			
		||||
DROP TABLE notes;
 | 
			
		||||
 | 
			
		||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
			
		||||
							
								
								
									
										2
									
								
								db/migrations/0126__fill_sync_for_note_contents.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,2 @@
 | 
			
		||||
INSERT OR REPLACE INTO sync (entityName, entityId, sourceId, syncDate)
 | 
			
		||||
SELECT 'note_contents', noteContentId, '', '2019-03-02T18:07:29.182Z' FROM note_contents;
 | 
			
		||||
							
								
								
									
										6
									
								
								db/migrations/0127__fix_inconsistent_isProtected.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,6 @@
 | 
			
		||||
UPDATE notes SET title = 'Recovered protected note', isProtected = 0 WHERE noteId IN (
 | 
			
		||||
    SELECT noteId FROM notes JOIN note_contents USING(noteId)
 | 
			
		||||
    WHERE notes.isProtected = 1
 | 
			
		||||
      AND note_contents.isProtected = 0
 | 
			
		||||
      AND notes.isDeleted = 0
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										1
									
								
								db/migrations/0128__add_note_fulltext.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
CREATE VIRTUAL TABLE note_fulltext USING fts5(noteId UNINDEXED, title, titleHash UNINDEXED, content, contentHash UNINDEXED);
 | 
			
		||||
							
								
								
									
										10
									
								
								db/migrations/0129__fill_note_fulltext.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
const repository = require('../../src/services/repository');
 | 
			
		||||
const noteFulltextService = require('../../src/services/note_fulltext');
 | 
			
		||||
 | 
			
		||||
module.exports = async () => {
 | 
			
		||||
    const notes = await repository.getEntities('SELECT * FROM notes WHERE isDeleted = 0 AND isProtected = 0');
 | 
			
		||||
 | 
			
		||||
    for (const note of notes) {
 | 
			
		||||
        await noteFulltextService.updateNoteFulltext(note);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										236
									
								
								db/migrations/0130__rename_dates_to_utc.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,236 @@
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "sync_mig" (
 | 
			
		||||
                                    `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
			
		||||
                                    `entityName`	TEXT NOT NULL,
 | 
			
		||||
                                    `entityId`	TEXT NOT NULL,
 | 
			
		||||
                                    `sourceId` TEXT NOT NULL,
 | 
			
		||||
                                    `utcSyncDate`	TEXT NOT NULL);
 | 
			
		||||
 | 
			
		||||
INSERT INTO sync_mig (id, entityName, entityId, sourceId, utcSyncDate)
 | 
			
		||||
  SELECT id, entityName, entityId, sourceId, REPLACE(syncDate, 'T', ' ') FROM sync;
 | 
			
		||||
 | 
			
		||||
DROP TABLE sync;
 | 
			
		||||
ALTER TABLE sync_mig RENAME TO sync;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "source_ids_mig" (
 | 
			
		||||
                                          `sourceId`	TEXT NOT NULL,
 | 
			
		||||
                                          `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                          PRIMARY KEY(`sourceId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO source_ids_mig (sourceId, utcDateCreated)
 | 
			
		||||
  SELECT sourceId, REPLACE(dateCreated, 'T', ' ') FROM source_ids;
 | 
			
		||||
 | 
			
		||||
DROP TABLE source_ids;
 | 
			
		||||
ALTER TABLE source_ids_mig RENAME TO source_ids;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_revisions_mig" (
 | 
			
		||||
                                              `noteRevisionId`	TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
                                              `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                              `title`	TEXT,
 | 
			
		||||
                                              `content`	TEXT,
 | 
			
		||||
                                              `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                              `utcDateModifiedFrom` TEXT NOT NULL,
 | 
			
		||||
                                              `utcDateModifiedTo` TEXT NOT NULL,
 | 
			
		||||
                                              `dateModifiedFrom` TEXT NOT NULL,
 | 
			
		||||
                                              `dateModifiedTo` TEXT NOT NULL,
 | 
			
		||||
                                              type TEXT DEFAULT '' NOT NULL,
 | 
			
		||||
                                              mime TEXT DEFAULT '' NOT NULL,
 | 
			
		||||
                                              hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
 | 
			
		||||
INSERT INTO note_revisions_mig (noteRevisionId, noteId, title, content, isProtected, utcDateModifiedFrom, utcDateModifiedTo, dateModifiedFrom, dateModifiedTo, type, mime, hash)
 | 
			
		||||
SELECT noteRevisionId, noteId, title, content, isProtected, REPLACE(dateModifiedFrom, 'T', ' '), REPLACE(dateModifiedTo, 'T', ' '), REPLACE(REPLACE(dateModifiedFrom, 'T', ' '), 'Z', '+0000'), REPLACE(REPLACE(dateModifiedTo, 'T', ' '), 'Z', '+0000'), type, mime, hash FROM note_revisions;
 | 
			
		||||
 | 
			
		||||
DROP TABLE note_revisions;
 | 
			
		||||
ALTER TABLE note_revisions_mig RENAME TO note_revisions;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "api_tokens_mig"
 | 
			
		||||
(
 | 
			
		||||
  apiTokenId TEXT PRIMARY KEY NOT NULL,
 | 
			
		||||
  token TEXT NOT NULL,
 | 
			
		||||
  utcDateCreated TEXT NOT NULL,
 | 
			
		||||
  isDeleted INT NOT NULL DEFAULT 0,
 | 
			
		||||
  hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
 | 
			
		||||
INSERT INTO api_tokens_mig (apiTokenId, token, utcDateCreated, isDeleted, hash)
 | 
			
		||||
  SELECT apiTokenId, token, REPLACE(dateCreated, 'T', ' '), isDeleted, hash FROM api_tokens;
 | 
			
		||||
 | 
			
		||||
DROP TABLE api_tokens;
 | 
			
		||||
ALTER TABLE api_tokens_mig RENAME TO api_tokens;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "branches_mig" (
 | 
			
		||||
                                        `branchId`	TEXT NOT NULL,
 | 
			
		||||
                                        `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                        `parentNoteId`	TEXT NOT NULL,
 | 
			
		||||
                                        `notePosition`	INTEGER NOT NULL,
 | 
			
		||||
                                        `prefix`	TEXT,
 | 
			
		||||
                                        `isExpanded`	BOOLEAN,
 | 
			
		||||
                                        `isDeleted`	INTEGER NOT NULL DEFAULT 0,
 | 
			
		||||
                                        `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                        utcDateCreated TEXT NOT NULL,
 | 
			
		||||
                                        hash TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                        PRIMARY KEY(`branchId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO branches_mig (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated, hash)
 | 
			
		||||
  SELECT branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, REPLACE(dateModified, 'T', ' '), REPLACE(dateCreated, 'T', ' '), hash FROM branches;
 | 
			
		||||
 | 
			
		||||
DROP TABLE branches;
 | 
			
		||||
ALTER TABLE branches_mig RENAME TO branches;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "recent_notes_mig" (
 | 
			
		||||
                                            `branchId` TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
                                            `notePath` TEXT NOT NULL,
 | 
			
		||||
                                            hash TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                            `utcDateCreated` TEXT NOT NULL,
 | 
			
		||||
                                            isDeleted INT
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO recent_notes_mig (branchId, notePath, hash, utcDateCreated, isDeleted)
 | 
			
		||||
  SELECT branchId, notePath, hash, REPLACE(dateCreated, 'T', ' '), isDeleted FROM recent_notes;
 | 
			
		||||
 | 
			
		||||
DROP TABLE recent_notes;
 | 
			
		||||
ALTER TABLE recent_notes_mig RENAME TO recent_notes;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "event_log_mig" (
 | 
			
		||||
                                         `eventId`	TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
                                         `noteId`	TEXT,
 | 
			
		||||
                                         `comment`	TEXT,
 | 
			
		||||
                                         `utcDateCreated`	TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO event_log_mig (eventId, noteId, comment, utcDateCreated)
 | 
			
		||||
  SELECT eventId, noteId, comment, REPLACE(dateCreated, 'T', ' ') FROM event_log;
 | 
			
		||||
 | 
			
		||||
DROP TABLE event_log;
 | 
			
		||||
ALTER TABLE event_log_mig RENAME TO event_log;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "options_mig"
 | 
			
		||||
(
 | 
			
		||||
  name TEXT not null PRIMARY KEY,
 | 
			
		||||
  value TEXT,
 | 
			
		||||
  isSynced INTEGER default 0 not null,
 | 
			
		||||
  hash TEXT default "" not null,
 | 
			
		||||
  utcDateCreated TEXT not null,
 | 
			
		||||
  utcDateModified TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO options_mig (name, value, isSynced, hash, utcDateCreated, utcDateModified)
 | 
			
		||||
  SELECT name, value, isSynced, hash, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM options;
 | 
			
		||||
 | 
			
		||||
DROP TABLE options;
 | 
			
		||||
ALTER TABLE options_mig RENAME TO options;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE attributes_mig
 | 
			
		||||
(
 | 
			
		||||
  attributeId      TEXT not null primary key,
 | 
			
		||||
  noteId       TEXT not null,
 | 
			
		||||
  type         TEXT not null,
 | 
			
		||||
  name         TEXT not null,
 | 
			
		||||
  value        TEXT default '' not null,
 | 
			
		||||
  position     INT  default 0 not null,
 | 
			
		||||
  utcDateCreated  TEXT not null,
 | 
			
		||||
  utcDateModified TEXT not null,
 | 
			
		||||
  isDeleted    INT  not null,
 | 
			
		||||
  hash         TEXT default "" not null,
 | 
			
		||||
  isInheritable int DEFAULT 0 NULL);
 | 
			
		||||
 | 
			
		||||
INSERT INTO attributes_mig (attributeId, noteId, type, name, value, position, utcDateCreated, utcDateModified, isDeleted, hash, isInheritable)
 | 
			
		||||
  SELECT attributeId, noteId, type, name, value, position, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' '), isDeleted, hash, isInheritable FROM attributes;
 | 
			
		||||
 | 
			
		||||
DROP TABLE attributes;
 | 
			
		||||
ALTER TABLE attributes_mig RENAME TO attributes;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "links_mig" (
 | 
			
		||||
                                     `linkId`	TEXT NOT NULL,
 | 
			
		||||
                                     `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `targetNoteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `type` TEXT NOT NULL,
 | 
			
		||||
                                     `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                     `isDeleted`	INTEGER NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     PRIMARY KEY(`linkId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO links_mig (linkId, noteId, targetNoteId, type, hash, isDeleted, utcDateCreated, utcDateModified)
 | 
			
		||||
  SELECT linkId, noteId, targetNoteId, type, hash, isDeleted, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM links;
 | 
			
		||||
 | 
			
		||||
DROP TABLE links;
 | 
			
		||||
ALTER TABLE links_mig RENAME TO links;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_contents_mig" (
 | 
			
		||||
                                             `noteContentId`	TEXT NOT NULL,
 | 
			
		||||
                                             `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                             `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                             `content`	TEXT NULL DEFAULT NULL,
 | 
			
		||||
                                             `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                             `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                             `utcDateModified` TEXT NOT NULL,
 | 
			
		||||
                                             PRIMARY KEY(`noteContentId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO note_contents_mig (noteContentId, noteId, isProtected, content, hash, utcDateCreated, utcDateModified)
 | 
			
		||||
  SELECT noteContentId, noteId, isProtected, content, hash, REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM note_contents;
 | 
			
		||||
 | 
			
		||||
DROP TABLE note_contents;
 | 
			
		||||
ALTER TABLE note_contents_mig RENAME TO note_contents;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "notes_mig" (
 | 
			
		||||
                                     `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `title`	TEXT NOT NULL DEFAULT "note",
 | 
			
		||||
                                     `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `type` TEXT NOT NULL DEFAULT 'text',
 | 
			
		||||
                                     `mime` TEXT NOT NULL DEFAULT 'text/html',
 | 
			
		||||
                                     `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                     `isDeleted`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `dateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO notes_mig (noteId, title, isProtected, type, mime, hash, isDeleted, dateCreated, dateModified, utcDateCreated, utcDateModified)
 | 
			
		||||
  SELECT noteId, title, isProtected, type, mime, hash, isDeleted, REPLACE(REPLACE(dateCreated, 'T', ' '), 'Z', '+0000'), REPLACE(REPLACE(dateModified, 'T', ' '), 'Z', '+0000'), REPLACE(dateCreated, 'T', ' '), REPLACE(dateModified, 'T', ' ') FROM notes;
 | 
			
		||||
 | 
			
		||||
DROP TABLE notes;
 | 
			
		||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
			
		||||
 | 
			
		||||
CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` (
 | 
			
		||||
                                                              `entityName`,
 | 
			
		||||
                                                              `entityId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_sync_utcSyncDate` ON `sync` (
 | 
			
		||||
                                            `utcSyncDate`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (
 | 
			
		||||
                                                              `noteId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedFrom` ON `note_revisions` (
 | 
			
		||||
                                                                        `utcDateModifiedFrom`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedTo` ON `note_revisions` (
 | 
			
		||||
                                                                      `utcDateModifiedTo`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_branches_noteId` ON `branches` (
 | 
			
		||||
                                                  `noteId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (
 | 
			
		||||
                                                               `noteId`,
 | 
			
		||||
                                                               `parentNoteId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
 | 
			
		||||
CREATE INDEX IDX_attributes_name_value
 | 
			
		||||
  on attributes (name, value);
 | 
			
		||||
CREATE INDEX IDX_links_noteId_index
 | 
			
		||||
  on links (noteId);
 | 
			
		||||
CREATE INDEX IDX_links_targetNoteId_index
 | 
			
		||||
  on links (targetNoteId);
 | 
			
		||||
CREATE INDEX IDX_attributes_name_index
 | 
			
		||||
  on attributes (name);
 | 
			
		||||
CREATE INDEX IDX_attributes_noteId_index
 | 
			
		||||
  on attributes (noteId);
 | 
			
		||||
CREATE INDEX IDX_attributes_value_index
 | 
			
		||||
  on attributes (value);
 | 
			
		||||
CREATE UNIQUE INDEX `IDX_note_contents_noteId` ON `note_contents` (`noteId`);
 | 
			
		||||
							
								
								
									
										13
									
								
								db/migrations/0131__cleanup_note_contents.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,13 @@
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_contents_mig" (
 | 
			
		||||
                                                   `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                                   `content`	TEXT NULL DEFAULT NULL,
 | 
			
		||||
                                                   `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                                   `utcDateModified` TEXT NOT NULL,
 | 
			
		||||
                                                   PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO note_contents_mig (noteId, content, hash, utcDateModified)
 | 
			
		||||
SELECT noteId, content, hash, utcDateModified FROM note_contents;
 | 
			
		||||
 | 
			
		||||
DROP TABLE note_contents;
 | 
			
		||||
ALTER TABLE note_contents_mig RENAME TO note_contents;
 | 
			
		||||
							
								
								
									
										5
									
								
								db/migrations/0132__fill_sync.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,5 @@
 | 
			
		||||
const syncTableService = require('../../src/services/sync_table');
 | 
			
		||||
 | 
			
		||||
module.exports = async () => {
 | 
			
		||||
    await syncTableService.fillAllSyncRows();
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										181
									
								
								db/schema.sql
									
									
									
									
									
								
							
							
						
						@@ -1,19 +1,14 @@
 | 
			
		||||
CREATE VIRTUAL TABLE note_fulltext USING fts5(noteId UNINDEXED, title, titleHash UNINDEXED, content, contentHash UNINDEXED)
 | 
			
		||||
/* note_fulltext(noteId,title,titleHash,content,contentHash) */;
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "sync" (
 | 
			
		||||
                                    `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
			
		||||
                                    `entityName`	TEXT NOT NULL,
 | 
			
		||||
                                    `entityId`	TEXT NOT NULL,
 | 
			
		||||
                                    `sourceId` TEXT NOT NULL,
 | 
			
		||||
  `syncDate`	TEXT NOT NULL);
 | 
			
		||||
CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` (
 | 
			
		||||
  `entityName`,
 | 
			
		||||
  `entityId`
 | 
			
		||||
);
 | 
			
		||||
CREATE INDEX `IDX_sync_syncDate` ON `sync` (
 | 
			
		||||
  `syncDate`
 | 
			
		||||
);
 | 
			
		||||
                                    `utcSyncDate`	TEXT NOT NULL);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "source_ids" (
 | 
			
		||||
                                          `sourceId`	TEXT NOT NULL,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                          `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                          PRIMARY KEY(`sourceId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_revisions" (
 | 
			
		||||
@@ -22,25 +17,20 @@ CREATE TABLE IF NOT EXISTS "note_revisions" (
 | 
			
		||||
                                              `title`	TEXT,
 | 
			
		||||
                                              `content`	TEXT,
 | 
			
		||||
                                              `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                              `utcDateModifiedFrom` TEXT NOT NULL,
 | 
			
		||||
                                              `utcDateModifiedTo` TEXT NOT NULL,
 | 
			
		||||
                                              `dateModifiedFrom` TEXT NOT NULL,
 | 
			
		||||
  `dateModifiedTo` TEXT NOT NULL
 | 
			
		||||
, type TEXT DEFAULT '' NOT NULL, mime TEXT DEFAULT '' NOT NULL, hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (
 | 
			
		||||
  `noteId`
 | 
			
		||||
);
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedFrom` ON `note_revisions` (
 | 
			
		||||
  `dateModifiedFrom`
 | 
			
		||||
);
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedTo` ON `note_revisions` (
 | 
			
		||||
  `dateModifiedTo`
 | 
			
		||||
);
 | 
			
		||||
                                              `dateModifiedTo` TEXT NOT NULL,
 | 
			
		||||
                                              type TEXT DEFAULT '' NOT NULL,
 | 
			
		||||
                                              mime TEXT DEFAULT '' NOT NULL,
 | 
			
		||||
                                              hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "api_tokens"
 | 
			
		||||
(
 | 
			
		||||
  apiTokenId TEXT PRIMARY KEY NOT NULL,
 | 
			
		||||
  token TEXT NOT NULL,
 | 
			
		||||
  dateCreated TEXT NOT NULL,
 | 
			
		||||
  isDeleted INT NOT NULL DEFAULT 0
 | 
			
		||||
, hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
  utcDateCreated TEXT NOT NULL,
 | 
			
		||||
  isDeleted INT NOT NULL DEFAULT 0,
 | 
			
		||||
  hash TEXT DEFAULT "" NOT NULL);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "branches" (
 | 
			
		||||
                                        `branchId`	TEXT NOT NULL,
 | 
			
		||||
                                        `noteId`	TEXT NOT NULL,
 | 
			
		||||
@@ -49,9 +39,87 @@ CREATE TABLE IF NOT EXISTS "branches" (
 | 
			
		||||
                                        `prefix`	TEXT,
 | 
			
		||||
                                        `isExpanded`	BOOLEAN,
 | 
			
		||||
                                        `isDeleted`	INTEGER NOT NULL DEFAULT 0,
 | 
			
		||||
  `dateModified`	TEXT NOT NULL, hash TEXT DEFAULT "" NOT NULL, dateCreated TEXT NOT NULL DEFAULT '1970-01-01T00:00:00.000Z',
 | 
			
		||||
                                        `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                        utcDateCreated TEXT NOT NULL,
 | 
			
		||||
                                        hash TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                        PRIMARY KEY(`branchId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "recent_notes" (
 | 
			
		||||
                                            `branchId` TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
                                            `notePath` TEXT NOT NULL,
 | 
			
		||||
                                            hash TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                            `utcDateCreated` TEXT NOT NULL,
 | 
			
		||||
                                            isDeleted INT
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "event_log" (
 | 
			
		||||
                                         `eventId`	TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
                                         `noteId`	TEXT,
 | 
			
		||||
                                         `comment`	TEXT,
 | 
			
		||||
                                         `utcDateCreated`	TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "options"
 | 
			
		||||
(
 | 
			
		||||
  name TEXT not null PRIMARY KEY,
 | 
			
		||||
  value TEXT,
 | 
			
		||||
  isSynced INTEGER default 0 not null,
 | 
			
		||||
  hash TEXT default "" not null,
 | 
			
		||||
  utcDateCreated TEXT not null,
 | 
			
		||||
  utcDateModified TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "attributes"
 | 
			
		||||
(
 | 
			
		||||
  attributeId      TEXT not null primary key,
 | 
			
		||||
  noteId       TEXT not null,
 | 
			
		||||
  type         TEXT not null,
 | 
			
		||||
  name         TEXT not null,
 | 
			
		||||
  value        TEXT default '' not null,
 | 
			
		||||
  position     INT  default 0 not null,
 | 
			
		||||
  utcDateCreated  TEXT not null,
 | 
			
		||||
  utcDateModified TEXT not null,
 | 
			
		||||
  isDeleted    INT  not null,
 | 
			
		||||
  hash         TEXT default "" not null,
 | 
			
		||||
  isInheritable int DEFAULT 0 NULL);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "links" (
 | 
			
		||||
                                     `linkId`	TEXT NOT NULL,
 | 
			
		||||
                                     `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `targetNoteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `type` TEXT NOT NULL,
 | 
			
		||||
                                     `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                     `isDeleted`	INTEGER NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     PRIMARY KEY(`linkId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "notes" (
 | 
			
		||||
                                     `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                     `title`	TEXT NOT NULL DEFAULT "note",
 | 
			
		||||
                                     `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `type` TEXT NOT NULL DEFAULT 'text',
 | 
			
		||||
                                     `mime` TEXT NOT NULL DEFAULT 'text/html',
 | 
			
		||||
                                     `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                     `isDeleted`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
                                     `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `dateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateCreated`	TEXT NOT NULL,
 | 
			
		||||
                                     `utcDateModified`	TEXT NOT NULL,
 | 
			
		||||
                                     PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` (
 | 
			
		||||
                                                              `entityName`,
 | 
			
		||||
                                                              `entityId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_sync_utcSyncDate` ON `sync` (
 | 
			
		||||
                                            `utcSyncDate`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (
 | 
			
		||||
                                                              `noteId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedFrom` ON `note_revisions` (
 | 
			
		||||
                                                                        `utcDateModifiedFrom`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_note_revisions_dateModifiedTo` ON `note_revisions` (
 | 
			
		||||
                                                                      `utcDateModifiedTo`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX `IDX_branches_noteId` ON `branches` (
 | 
			
		||||
                                                  `noteId`
 | 
			
		||||
  );
 | 
			
		||||
@@ -60,66 +128,8 @@ CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` (
 | 
			
		||||
                                                               `parentNoteId`
 | 
			
		||||
  );
 | 
			
		||||
CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "recent_notes" (
 | 
			
		||||
  `branchId` TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
  `notePath` TEXT NOT NULL,
 | 
			
		||||
  hash TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
  `dateCreated` TEXT NOT NULL,
 | 
			
		||||
  isDeleted INT
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "event_log" (
 | 
			
		||||
  `eventId`	TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
  `noteId`	TEXT,
 | 
			
		||||
  `comment`	TEXT,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "options"
 | 
			
		||||
(
 | 
			
		||||
  name TEXT not null PRIMARY KEY,
 | 
			
		||||
  value TEXT,
 | 
			
		||||
  dateModified INT,
 | 
			
		||||
  isSynced INTEGER default 0 not null,
 | 
			
		||||
  hash TEXT default "" not null,
 | 
			
		||||
  dateCreated TEXT default '1970-01-01T00:00:00.000Z' not null
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE attributes
 | 
			
		||||
(
 | 
			
		||||
  attributeId      TEXT not null primary key,
 | 
			
		||||
  noteId       TEXT not null,
 | 
			
		||||
  type         TEXT not null,
 | 
			
		||||
  name         TEXT not null,
 | 
			
		||||
  value        TEXT default '' not null,
 | 
			
		||||
  position     INT  default 0 not null,
 | 
			
		||||
  dateCreated  TEXT not null,
 | 
			
		||||
  dateModified TEXT not null,
 | 
			
		||||
  isDeleted    INT  not null,
 | 
			
		||||
  hash         TEXT default "" not null, isInheritable int DEFAULT 0 NULL);
 | 
			
		||||
CREATE INDEX IDX_attributes_name_value
 | 
			
		||||
  on attributes (name, value);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "notes" (
 | 
			
		||||
  `noteId`	TEXT NOT NULL,
 | 
			
		||||
  `title`	TEXT NOT NULL DEFAULT "note",
 | 
			
		||||
  `content`	TEXT NULL DEFAULT NULL,
 | 
			
		||||
  `isProtected`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
  `type` TEXT NOT NULL DEFAULT 'text',
 | 
			
		||||
  `mime` TEXT NOT NULL DEFAULT 'text/html',
 | 
			
		||||
  `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
  `isDeleted`	INT NOT NULL DEFAULT 0,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
  `dateModified`	TEXT NOT NULL,
 | 
			
		||||
  PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "links" (
 | 
			
		||||
  `linkId`	TEXT NOT NULL,
 | 
			
		||||
  `noteId`	TEXT NOT NULL,
 | 
			
		||||
  `targetNoteId`	TEXT NOT NULL,
 | 
			
		||||
  `type` TEXT NOT NULL,
 | 
			
		||||
  `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
  `isDeleted`	INTEGER NOT NULL DEFAULT 0,
 | 
			
		||||
  `dateCreated`	TEXT NOT NULL,
 | 
			
		||||
  `dateModified`	TEXT NOT NULL,
 | 
			
		||||
  PRIMARY KEY(`linkId`)
 | 
			
		||||
);
 | 
			
		||||
CREATE INDEX IDX_links_noteId_index
 | 
			
		||||
  on links (noteId);
 | 
			
		||||
CREATE INDEX IDX_links_targetNoteId_index
 | 
			
		||||
@@ -130,3 +140,10 @@ CREATE INDEX IDX_attributes_noteId_index
 | 
			
		||||
  on attributes (noteId);
 | 
			
		||||
CREATE INDEX IDX_attributes_value_index
 | 
			
		||||
  on attributes (value);
 | 
			
		||||
CREATE TABLE IF NOT EXISTS "note_contents" (
 | 
			
		||||
                                                   `noteId`	TEXT NOT NULL,
 | 
			
		||||
                                                   `content`	TEXT NULL DEFAULT NULL,
 | 
			
		||||
                                                   `hash` TEXT DEFAULT "" NOT NULL,
 | 
			
		||||
                                                   `utcDateModified` TEXT NOT NULL,
 | 
			
		||||
                                                   PRIMARY KEY(`noteId`)
 | 
			
		||||
);
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>ApiToken<span class="signature">(apiTokenId, token, isDeleted, dateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>ApiToken<span class="signature">(apiTokenId, token, isDeleted, utcDateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">ApiToken is an entity representing token used to authenticate against Trilium API from client applications. Currently used only by Trilium Sender.</div>
 | 
			
		||||
        
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="ApiToken"><span class="type-signature"></span>new ApiToken<span class="signature">(apiTokenId, token, isDeleted, dateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="ApiToken"><span class="type-signature"></span>new ApiToken<span class="signature">(apiTokenId, token, isDeleted, utcDateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateCreated</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, dateCreated, dateModified)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">Attribute is key value pair owned by a note.</div>
 | 
			
		||||
        
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, dateCreated, dateModified)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<span class="signature">(attributeId, noteId, type, name, value, position, isInheritable, isDeleted, utcDateCreated, utcDateModified)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -269,7 +269,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateCreated</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
@@ -292,7 +292,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateModified</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">Branch represents note's placement in the tree - it's essentially pair of noteId and parentNoteId.
 | 
			
		||||
Each note can have multiple (at least one) branches, meaning it can be placed into multiple places in the tree.</div>
 | 
			
		||||
@@ -46,7 +46,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="Branch"><span class="type-signature"></span>new Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="Branch"><span class="type-signature"></span>new Branch<span class="signature">(branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -247,7 +247,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateModified</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
@@ -270,7 +270,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateCreated</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">This class represents link from one note to another in the form of hyperlink or image reference. Note that
 | 
			
		||||
this is different concept than attribute/relation.</div>
 | 
			
		||||
@@ -46,7 +46,7 @@ this is different concept than attribute/relation.</div>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="Link"><span class="type-signature"></span>new Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="Link"><span class="type-signature"></span>new Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -201,7 +201,7 @@ this is different concept than attribute/relation.</div>
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateModified</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
@@ -224,7 +224,7 @@ this is different concept than attribute/relation.</div>
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateCreated</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -224,29 +224,6 @@
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>content</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
            
 | 
			
		||||
                
 | 
			
		||||
<span class="param-type">string</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            </td>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last">note content - e.g. HTML text for text notes, file payload for files</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>isProtected</code></td>
 | 
			
		||||
@@ -311,7 +288,7 @@
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
            <td class="description last">local date time (with offset)</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -334,6 +311,52 @@
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last">local date time (with offset)</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
            
 | 
			
		||||
                
 | 
			
		||||
<span class="param-type">string</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            </td>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
            
 | 
			
		||||
                
 | 
			
		||||
<span class="param-type">string</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            </td>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
@@ -373,7 +396,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line30">line 30</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line36">line 36</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -558,7 +581,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line254">line 254</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line347">line 347</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -723,7 +746,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line123">line 123</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line216">line 216</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -899,7 +922,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line265">line 265</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line358">line 358</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1003,7 +1026,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line552">line 552</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line645">line 645</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1103,7 +1126,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line580">line 580</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line673">line 673</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1207,7 +1230,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line566">line 566</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line659">line 659</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1263,6 +1286,106 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="getContent"><span class="type-signature">(async) </span>getContent<span class="signature">()</span><span class="type-signature"> → {Promise.<*>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line75">line 75</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h5>Returns:</h5>
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl>
 | 
			
		||||
    <dt>
 | 
			
		||||
        Type
 | 
			
		||||
    </dt>
 | 
			
		||||
    <dd>
 | 
			
		||||
        
 | 
			
		||||
<span class="param-type">Promise.<*></span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dd>
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="getDescendantNoteIds"><span class="type-signature">(async) </span>getDescendantNoteIds<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<string>>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1311,7 +1434,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line441">line 441</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line534">line 534</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1542,7 +1665,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line464">line 464</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line557">line 557</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1738,7 +1861,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line502">line 502</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line595">line 595</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1934,7 +2057,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line511">line 511</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line604">line 604</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -1986,6 +2109,106 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="getJsonContent"><span class="type-signature">(async) </span>getJsonContent<span class="signature">()</span><span class="type-signature"> → {Promise.<*>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line111">line 111</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h5>Returns:</h5>
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl>
 | 
			
		||||
    <dt>
 | 
			
		||||
        Type
 | 
			
		||||
    </dt>
 | 
			
		||||
    <dd>
 | 
			
		||||
        
 | 
			
		||||
<span class="param-type">Promise.<*></span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dd>
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="getLabel"><span class="type-signature">(async) </span>getLabel<span class="signature">(name)</span><span class="type-signature"> → {Promise.<<a href="Attribute.html">Attribute</a>>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2083,7 +2306,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line352">line 352</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line445">line 445</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2248,7 +2471,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line148">line 148</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line241">line 241</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2413,7 +2636,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line140">line 140</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line233">line 233</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2566,7 +2789,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line364">line 364</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line457">line 457</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2674,7 +2897,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line527">line 527</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line620">line 620</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2778,7 +3001,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line545">line 545</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line638">line 638</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2878,7 +3101,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line108">line 108</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line201">line 201</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -2982,7 +3205,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line592">line 592</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line685">line 685</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3135,7 +3358,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line358">line 358</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line451">line 451</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3300,7 +3523,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line164">line 164</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line257">line 257</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3465,7 +3688,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line156">line 156</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line249">line 249</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3618,7 +3841,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line376">line 376</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line469">line 469</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3774,7 +3997,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line370">line 370</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line463">line 463</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3882,7 +4105,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line518">line 518</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line611">line 611</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -3982,7 +4205,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line89">line 89</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line182">line 182</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4090,7 +4313,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line536">line 536</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line629">line 629</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4190,7 +4413,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line115">line 115</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line208">line 208</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4366,7 +4589,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line245">line 245</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line338">line 338</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4470,7 +4693,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line559">line 559</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line652">line 652</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4623,7 +4846,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line340">line 340</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line433">line 433</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4776,7 +4999,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line346">line 346</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line439">line 439</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4885,7 +5108,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line172">line 172</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line265">line 265</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -4967,7 +5190,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line84">line 84</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line170">line 170</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5071,7 +5294,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line76">line 76</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line162">line 162</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5175,7 +5398,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line71">line 71</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line157">line 157</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5279,7 +5502,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line66">line 66</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line152">line 152</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5335,6 +5558,110 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="isStringNote"><span class="type-signature"></span>isStringNote<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line175">line 175</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h5>Returns:</h5>
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
<div class="param-desc">
 | 
			
		||||
    true if the note has string content (not binary)
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl>
 | 
			
		||||
    <dt>
 | 
			
		||||
        Type
 | 
			
		||||
    </dt>
 | 
			
		||||
    <dd>
 | 
			
		||||
        
 | 
			
		||||
<span class="param-type">boolean</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dd>
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="loadAttributesToCache"><span class="type-signature">(async) </span>loadAttributesToCache<span class="signature">()</span><span class="type-signature"> → {Promise.<void>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5383,7 +5710,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line177">line 177</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line270">line 270</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5610,7 +5937,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line323">line 323</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line416">line 416</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -5806,7 +6133,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line427">line 427</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line520">line 520</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6002,7 +6329,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line436">line 436</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line529">line 529</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6229,7 +6556,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line297">line 297</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line390">line 390</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6281,6 +6608,206 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="setContent"><span class="type-signature">(async) </span>setContent<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line118">line 118</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h5>Returns:</h5>
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl>
 | 
			
		||||
    <dt>
 | 
			
		||||
        Type
 | 
			
		||||
    </dt>
 | 
			
		||||
    <dd>
 | 
			
		||||
        
 | 
			
		||||
<span class="param-type">Promise</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dd>
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="setJsonContent"><span class="type-signature">(async) </span>setJsonContent<span class="signature">()</span><span class="type-signature"> → {Promise}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line147">line 147</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h5>Returns:</h5>
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl>
 | 
			
		||||
    <dt>
 | 
			
		||||
        Type
 | 
			
		||||
    </dt>
 | 
			
		||||
    <dd>
 | 
			
		||||
        
 | 
			
		||||
<span class="param-type">Promise</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dd>
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="setLabel"><span class="type-signature">(async) </span>setLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6425,7 +6952,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line409">line 409</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line502">line 502</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6621,7 +7148,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line418">line 418</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line511">line 511</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -6879,7 +7406,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line280">line 280</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line373">line 373</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -7106,7 +7633,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line390">line 390</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line483">line 483</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -7333,7 +7860,7 @@ Cache is note instance scoped.
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line400">line 400</a>
 | 
			
		||||
        <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line493">line 493</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, content, isProtected, dateModifiedFrom, dateModifiedTo)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, content, isProtected, dateModifiedFrom, dateModifiedTo, utcDateModifiedFrom, utcDateModifiedTo)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.</div>
 | 
			
		||||
        
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="NoteRevision"><span class="type-signature"></span>new NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, content, isProtected, dateModifiedFrom, dateModifiedTo)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="NoteRevision"><span class="type-signature"></span>new NoteRevision<span class="signature">(noteRevisionId, noteId, type, mime, title, content, isProtected, dateModifiedFrom, dateModifiedTo, utcDateModifiedFrom, utcDateModifiedTo)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -285,6 +285,52 @@
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>utcDateModifiedFrom</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
            
 | 
			
		||||
                
 | 
			
		||||
<span class="param-type">string</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            </td>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>utcDateModifiedTo</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
            
 | 
			
		||||
                
 | 
			
		||||
<span class="param-type">string</span>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            </td>
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="description last"></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
 | 
			
		||||
@@ -326,7 +372,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line22">line 22</a>
 | 
			
		||||
        <a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line24">line 24</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">(name, value, isSynced, dateModified, dateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">(name, value, isSynced, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">Option represents name-value pair, either directly configurable by the user or some system property.</div>
 | 
			
		||||
        
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">(name, value, isSynced, dateModified, dateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">(name, value, isSynced, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateModified</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
@@ -177,7 +177,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateCreated</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateCreated</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@
 | 
			
		||||
 | 
			
		||||
<header>
 | 
			
		||||
    
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">(branchId, notePath, isDeleted, dateModified)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        <h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">(branchId, notePath, isDeleted, utcDateModified)</span><span class="type-signature"></span></h2>
 | 
			
		||||
        
 | 
			
		||||
            <div class="class-description">RecentNote represents recently visited note.</div>
 | 
			
		||||
        
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <h4 class="name" id="RecentNote"><span class="type-signature"></span>new RecentNote<span class="signature">(branchId, notePath, isDeleted, dateModified)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    <h4 class="name" id="RecentNote"><span class="type-signature"></span>new RecentNote<span class="signature">(branchId, notePath, isDeleted, utcDateModified)</span><span class="type-signature"></span></h4>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
@@ -154,7 +154,7 @@
 | 
			
		||||
 | 
			
		||||
        <tr>
 | 
			
		||||
            
 | 
			
		||||
                <td class="name"><code>dateModified</code></td>
 | 
			
		||||
                <td class="name"><code>utcDateModified</code></td>
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            <td class="type">
 | 
			
		||||
 
 | 
			
		||||
@@ -37,22 +37,22 @@ const dateUtils = require('../services/date_utils');
 | 
			
		||||
 * @param {string} apiTokenId - primary key
 | 
			
		||||
 * @param {string} token
 | 
			
		||||
 * @param {boolean} isDeleted - true if API token is deleted
 | 
			
		||||
 * @param {string} dateCreated
 | 
			
		||||
 * @param {string} utcDateCreated
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class ApiToken extends Entity {
 | 
			
		||||
    static get entityName() { return "api_tokens"; }
 | 
			
		||||
    static get primaryKeyName() { return "apiTokenId"; }
 | 
			
		||||
    static get hashedProperties() { return ["apiTokenId", "token", "dateCreated", "isDeleted"]; }
 | 
			
		||||
    static get hashedProperties() { return ["apiTokenId", "token", "utcDateCreated", "isDeleted"]; }
 | 
			
		||||
 | 
			
		||||
    beforeSaving() {
 | 
			
		||||
        if (!this.isDeleted) {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 
 | 
			
		||||
@@ -44,15 +44,15 @@ const sql = require('../services/sql');
 | 
			
		||||
 * @param {int} position
 | 
			
		||||
 * @param {boolean} isInheritable
 | 
			
		||||
 * @param {boolean} isDeleted
 | 
			
		||||
 * @param {string} dateCreated
 | 
			
		||||
 * @param {string} dateModified
 | 
			
		||||
 * @param {string} utcDateCreated
 | 
			
		||||
 * @param {string} utcDateModified
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class Attribute extends Entity {
 | 
			
		||||
    static get entityName() { return "attributes"; }
 | 
			
		||||
    static get primaryKeyName() { return "attributeId"; }
 | 
			
		||||
    static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable", "isDeleted", "dateCreated"]; }
 | 
			
		||||
    static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable", "isDeleted", "utcDateCreated"]; }
 | 
			
		||||
 | 
			
		||||
    constructor(row) {
 | 
			
		||||
        super(row);
 | 
			
		||||
@@ -123,14 +123,14 @@ class Attribute extends Entity {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 | 
			
		||||
        if (this.isChanged) {
 | 
			
		||||
            this.dateModified = dateUtils.nowDate();
 | 
			
		||||
            this.utcDateModified = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,8 @@ const sql = require('../services/sql');
 | 
			
		||||
 * @param {string} prefix
 | 
			
		||||
 * @param {boolean} isExpanded
 | 
			
		||||
 * @param {boolean} isDeleted
 | 
			
		||||
 * @param {string} dateModified
 | 
			
		||||
 * @param {string} dateCreated
 | 
			
		||||
 * @param {string} utcDateModified
 | 
			
		||||
 * @param {string} utcDateCreated
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
@@ -77,14 +77,14 @@ class Branch extends Entity {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 | 
			
		||||
        if (this.isChanged) {
 | 
			
		||||
            this.dateModified = dateUtils.nowDate();
 | 
			
		||||
            this.utcDateModified = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -36,8 +36,11 @@ class Entity {
 | 
			
		||||
     */
 | 
			
		||||
    constructor(row = {}) {
 | 
			
		||||
        for (const key in row) {
 | 
			
		||||
            // ! is used when joint-fetching notes and note_contents objects for performance
 | 
			
		||||
            if (!key.startsWith('!')) {
 | 
			
		||||
                this[key] = row[key];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ('isDeleted' in this) {
 | 
			
		||||
            this.isDeleted = !!this.isDeleted;
 | 
			
		||||
@@ -51,8 +54,14 @@ class Entity {
 | 
			
		||||
 | 
			
		||||
        this.hash = this.generateHash();
 | 
			
		||||
 | 
			
		||||
        if (this.forcedChange) {
 | 
			
		||||
            this.isChanged = true;
 | 
			
		||||
            delete this.forcedChange;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            this.isChanged = origHash !== this.hash;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    generateIdIfNecessary() {
 | 
			
		||||
        if (!this[this.constructor.primaryKeyName]) {
 | 
			
		||||
 
 | 
			
		||||
@@ -41,15 +41,15 @@ const dateUtils = require('../services/date_utils');
 | 
			
		||||
 * @param {string} targetNoteId
 | 
			
		||||
 * @param {string} type
 | 
			
		||||
 * @param {boolean} isDeleted
 | 
			
		||||
 * @param {string} dateModified
 | 
			
		||||
 * @param {string} dateCreated
 | 
			
		||||
 * @param {string} utcDateModified
 | 
			
		||||
 * @param {string} utcDateCreated
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class Link extends Entity {
 | 
			
		||||
    static get entityName() { return "links"; }
 | 
			
		||||
    static get primaryKeyName() { return "linkId"; }
 | 
			
		||||
    static get hashedProperties() { return ["linkId", "noteId", "targetNoteId", "type", "isDeleted", "dateCreated", "dateModified"]; }
 | 
			
		||||
    static get hashedProperties() { return ["linkId", "noteId", "targetNoteId", "type", "isDeleted", "utcDateCreated", "utcDateModified"]; }
 | 
			
		||||
 | 
			
		||||
    async getNote() {
 | 
			
		||||
        return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
 | 
			
		||||
@@ -64,14 +64,14 @@ class Link extends Entity {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 | 
			
		||||
        if (this.isChanged) {
 | 
			
		||||
            this.dateModified = dateUtils.nowDate();
 | 
			
		||||
            this.utcDateModified = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -33,13 +33,18 @@ const Attribute = require('./attribute');
 | 
			
		||||
const protectedSessionService = require('../services/protected_session');
 | 
			
		||||
const repository = require('../services/repository');
 | 
			
		||||
const sql = require('../services/sql');
 | 
			
		||||
const utils = require('../services/utils');
 | 
			
		||||
const dateUtils = require('../services/date_utils');
 | 
			
		||||
const noteFulltextService = require('../services/note_fulltext');
 | 
			
		||||
const syncTableService = require('../services/sync_table');
 | 
			
		||||
 | 
			
		||||
const LABEL = 'label';
 | 
			
		||||
const LABEL_DEFINITION = 'label-definition';
 | 
			
		||||
const RELATION = 'relation';
 | 
			
		||||
const RELATION_DEFINITION = 'relation-definition';
 | 
			
		||||
 | 
			
		||||
const STRING_MIME_TYPES = ["application/x-javascript"];
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This represents a Note which is a central object in the Trilium Notes project.
 | 
			
		||||
 *
 | 
			
		||||
@@ -47,18 +52,19 @@ const RELATION_DEFINITION = 'relation-definition';
 | 
			
		||||
 * @property {string} type - one of "text", "code", "file" or "render"
 | 
			
		||||
 * @property {string} mime - MIME type, e.g. "text/html"
 | 
			
		||||
 * @property {string} title - note title
 | 
			
		||||
 * @property {string} content - note content - e.g. HTML text for text notes, file payload for files
 | 
			
		||||
 * @property {boolean} isProtected - true if note is protected
 | 
			
		||||
 * @property {boolean} isDeleted - true if note is deleted
 | 
			
		||||
 * @property {string} dateCreated
 | 
			
		||||
 * @property {string} dateModified
 | 
			
		||||
 * @property {string} dateCreated - local date time (with offset)
 | 
			
		||||
 * @property {string} dateModified - local date time (with offset)
 | 
			
		||||
 * @property {string} utcDateCreated
 | 
			
		||||
 * @property {string} utcDateModified
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class Note extends Entity {
 | 
			
		||||
    static get entityName() { return "notes"; }
 | 
			
		||||
    static get primaryKeyName() { return "noteId"; }
 | 
			
		||||
    static get hashedProperties() { return ["noteId", "title", "content", "type", "isProtected", "isDeleted"]; }
 | 
			
		||||
    static get hashedProperties() { return ["noteId", "title", "type", "isProtected", "isDeleted"]; }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param row - object containing database row from "notes" table
 | 
			
		||||
@@ -75,19 +81,99 @@ class Note extends Entity {
 | 
			
		||||
        if (this.isProtected && this.noteId) {
 | 
			
		||||
            this.isContentAvailable = protectedSessionService.isProtectedSessionAvailable();
 | 
			
		||||
 | 
			
		||||
            if (this.isContentAvailable) {
 | 
			
		||||
                protectedSessionService.decryptNote(this);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        this.setContent(this.content);
 | 
			
		||||
            else {
 | 
			
		||||
                this.title = "[protected]";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    setContent(content) {
 | 
			
		||||
    /*
 | 
			
		||||
     * Note content has quite special handling - it's not a separate entity, but a lazily loaded
 | 
			
		||||
     * part of Note entity with it's 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 sync rows)
 | 
			
		||||
     * - 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 {Promise<*>} */
 | 
			
		||||
    async getContent(silentNotFoundError = false) {
 | 
			
		||||
        if (this.content === undefined) {
 | 
			
		||||
            const res = await sql.getRow(`SELECT content, hash FROM note_contents WHERE noteId = ?`, [this.noteId]);
 | 
			
		||||
 | 
			
		||||
            if (!res) {
 | 
			
		||||
                if (silentNotFoundError) {
 | 
			
		||||
                    return undefined;
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    throw new Error("Cannot find note content for noteId=" + this.noteId);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.content = res.content;
 | 
			
		||||
            this.contentHash = res.contentHash; // used only for note_fulltext consistency check
 | 
			
		||||
 | 
			
		||||
            if (this.isProtected) {
 | 
			
		||||
                if (this.isContentAvailable) {
 | 
			
		||||
                    protectedSessionService.decryptNoteContent(this);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    this.content = "";
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (this.isStringNote()) {
 | 
			
		||||
                this.content = this.content === null
 | 
			
		||||
                    ? ""
 | 
			
		||||
                    : this.content.toString("UTF-8");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return this.content;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {Promise<*>} */
 | 
			
		||||
    async getJsonContent() {
 | 
			
		||||
        const content = await this.getContent();
 | 
			
		||||
 | 
			
		||||
        return JSON.parse(content);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {Promise} */
 | 
			
		||||
    async setContent(content) {
 | 
			
		||||
        // force updating note itself so that dateChanged is represented correctly even for the content
 | 
			
		||||
        this.forcedChange = true;
 | 
			
		||||
        await this.save();
 | 
			
		||||
 | 
			
		||||
        this.content = content;
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            this.jsonContent = JSON.parse(this.content);
 | 
			
		||||
        const pojo = {
 | 
			
		||||
            noteId: this.noteId,
 | 
			
		||||
            content: content,
 | 
			
		||||
            utcDateModified: dateUtils.utcNowDateTime(),
 | 
			
		||||
            hash: utils.hash(this.noteId + "|" + content)
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        if (this.isProtected) {
 | 
			
		||||
            if (this.isContentAvailable) {
 | 
			
		||||
                protectedSessionService.encryptNoteContent(pojo);
 | 
			
		||||
            }
 | 
			
		||||
        catch(e) {}
 | 
			
		||||
            else {
 | 
			
		||||
                throw new Error(`Cannot update content of noteId=${this.noteId} since we're out of protected session.`);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        await sql.upsert("note_contents", "noteId", pojo);
 | 
			
		||||
 | 
			
		||||
        await syncTableService.addNoteContentSync(this.noteId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {Promise} */
 | 
			
		||||
    async setJsonContent(content) {
 | 
			
		||||
        await this.setContent(JSON.stringify(content, null, '\t'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {boolean} true if this note is the root of the note tree. Root note has "root" noteId */
 | 
			
		||||
@@ -113,6 +199,13 @@ class Note extends Entity {
 | 
			
		||||
        return (this.type === "code" || this.type === "file" || this.type === "render") && this.mime === "text/html";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {boolean} true if the note has string content (not binary) */
 | 
			
		||||
    isStringNote() {
 | 
			
		||||
        return ["text", "code", "relation-map", "search"].includes(this.type)
 | 
			
		||||
            || this.mime.startsWith('text/')
 | 
			
		||||
            || STRING_MIME_TYPES.includes(this.mime);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {string} JS script environment - either "frontend" or "backend" */
 | 
			
		||||
    getScriptEnv() {
 | 
			
		||||
        if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith('env=frontend'))) {
 | 
			
		||||
@@ -629,37 +722,46 @@ class Note extends Entity {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    beforeSaving() {
 | 
			
		||||
        if (this.isJson() && this.jsonContent) {
 | 
			
		||||
            this.content = JSON.stringify(this.jsonContent, null, '\t');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // we do this here because encryption needs the note ID for the IV
 | 
			
		||||
        this.generateIdIfNecessary();
 | 
			
		||||
 | 
			
		||||
        if (!this.isDeleted) {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
            this.dateCreated = dateUtils.localNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 | 
			
		||||
        if (this.isChanged) {
 | 
			
		||||
            this.dateModified = dateUtils.nowDate();
 | 
			
		||||
            this.dateModified = dateUtils.localNowDateTime();
 | 
			
		||||
            this.utcDateModified = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // cannot be static!
 | 
			
		||||
    updatePojo(pojo) {
 | 
			
		||||
        if (pojo.isProtected) {
 | 
			
		||||
            if (this.isContentAvailable) {
 | 
			
		||||
                protectedSessionService.encryptNote(pojo);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                // updating protected note outside of protected session means we will keep original ciphertexts
 | 
			
		||||
                delete pojo.title;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        delete pojo.jsonContent;
 | 
			
		||||
        delete pojo.isContentAvailable;
 | 
			
		||||
        delete pojo.__attributeCache;
 | 
			
		||||
        delete pojo.content;
 | 
			
		||||
        delete pojo.contentHash;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async afterSaving() {
 | 
			
		||||
        noteFulltextService.triggerNoteFulltextUpdate(this.noteId);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,13 +44,15 @@ const repository = require('../services/repository');
 | 
			
		||||
 * @param {string} isProtected
 | 
			
		||||
 * @param {string} dateModifiedFrom
 | 
			
		||||
 * @param {string} dateModifiedTo
 | 
			
		||||
 * @param {string} utcDateModifiedFrom
 | 
			
		||||
 * @param {string} utcDateModifiedTo
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class NoteRevision extends Entity {
 | 
			
		||||
    static get entityName() { return "note_revisions"; }
 | 
			
		||||
    static get primaryKeyName() { return "noteRevisionId"; }
 | 
			
		||||
    static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "content", "isProtected", "dateModifiedFrom", "dateModifiedTo"]; }
 | 
			
		||||
    static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "content", "isProtected", "dateModifiedFrom", "dateModifiedTo", "utcDateModifiedFrom", "utcDateModifiedTo"]; }
 | 
			
		||||
 | 
			
		||||
    constructor(row) {
 | 
			
		||||
        super(row);
 | 
			
		||||
 
 | 
			
		||||
@@ -37,8 +37,8 @@ const dateUtils = require('../services/date_utils');
 | 
			
		||||
 * @param {string} name
 | 
			
		||||
 * @param {string} value
 | 
			
		||||
 * @param {boolean} isSynced
 | 
			
		||||
 * @param {string} dateModified
 | 
			
		||||
 * @param {string} dateCreated
 | 
			
		||||
 * @param {string} utcDateModified
 | 
			
		||||
 * @param {string} utcDateCreated
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
@@ -54,10 +54,14 @@ class Option extends Entity {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    beforeSaving() {
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 | 
			
		||||
        if (this.isChanged) {
 | 
			
		||||
            this.dateModified = dateUtils.nowDate();
 | 
			
		||||
            this.utcDateModified = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -37,22 +37,22 @@ const dateUtils = require('../services/date_utils');
 | 
			
		||||
 * @param {string} branchId
 | 
			
		||||
 * @param {string} notePath
 | 
			
		||||
 * @param {boolean} isDeleted
 | 
			
		||||
 * @param {string} dateModified
 | 
			
		||||
 * @param {string} utcDateModified
 | 
			
		||||
 *
 | 
			
		||||
 * @extends Entity
 | 
			
		||||
 */
 | 
			
		||||
class RecentNote extends Entity {
 | 
			
		||||
    static get entityName() { return "recent_notes"; }
 | 
			
		||||
    static get primaryKeyName() { return "branchId"; }
 | 
			
		||||
    static get hashedProperties() { return ["branchId", "notePath", "dateCreated", "isDeleted"]; }
 | 
			
		||||
    static get hashedProperties() { return ["branchId", "notePath", "utcDateCreated", "isDeleted"]; }
 | 
			
		||||
 | 
			
		||||
    beforeSaving() {
 | 
			
		||||
        if (!this.isDeleted) {
 | 
			
		||||
            this.isDeleted = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!this.dateCreated) {
 | 
			
		||||
            this.dateCreated = dateUtils.nowDate();
 | 
			
		||||
        if (!this.utcDateCreated) {
 | 
			
		||||
            this.utcDateCreated = dateUtils.utcNowDateTime();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        super.beforeSaving();
 | 
			
		||||
 
 | 
			
		||||
@@ -272,7 +272,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <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#line144">line 144</a>
 | 
			
		||||
        <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line159">line 159</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@@ -558,7 +558,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <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#line151">line 151</a>
 | 
			
		||||
        <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line166">line 166</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,15 +30,17 @@
 | 
			
		||||
const noteService = require('./notes');
 | 
			
		||||
const sql = require('./sql');
 | 
			
		||||
const utils = require('./utils');
 | 
			
		||||
const dateUtils = require('./date_utils');
 | 
			
		||||
const attributeService = require('./attributes');
 | 
			
		||||
const dateNoteService = require('./date_notes');
 | 
			
		||||
const treeService = require('./tree');
 | 
			
		||||
const config = require('./config');
 | 
			
		||||
const repository = require('./repository');
 | 
			
		||||
const axios = require('axios');
 | 
			
		||||
const dayjs = require('dayjs');
 | 
			
		||||
const cloningService = require('./cloning');
 | 
			
		||||
const messagingService = require('./messaging');
 | 
			
		||||
const appInfo = require('./app_info');
 | 
			
		||||
const searchService = require('./search');
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is the main backend API interface for scripts. It's published in the local "api" object.
 | 
			
		||||
@@ -46,20 +48,23 @@ const messagingService = require('./messaging');
 | 
			
		||||
 * @constructor
 | 
			
		||||
 * @hideconstructor
 | 
			
		||||
 */
 | 
			
		||||
function BackendScriptApi(startNote, currentNote, originEntity) {
 | 
			
		||||
function BackendScriptApi(currentNote, apiParams) {
 | 
			
		||||
    /** @property {Note} note where script started executing */
 | 
			
		||||
    this.startNote = startNote;
 | 
			
		||||
    /** @property {Note} note where script is currently executing */
 | 
			
		||||
    this.startNote = apiParams.startNote;
 | 
			
		||||
    /** @property {Note} note where script is currently executing. Don't mix this up with concept of active note */
 | 
			
		||||
    this.currentNote = currentNote;
 | 
			
		||||
    /** @property {Entity} entity whose event triggered this executions */
 | 
			
		||||
    this.originEntity = originEntity;
 | 
			
		||||
    this.originEntity = apiParams.originEntity;
 | 
			
		||||
 | 
			
		||||
    for (const key in apiParams) {
 | 
			
		||||
        this[key] = apiParams[key];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this.axios = axios;
 | 
			
		||||
    this.dayjs = dayjs;
 | 
			
		||||
 | 
			
		||||
    this.utils = {
 | 
			
		||||
        unescapeHtml: utils.unescapeHtml,
 | 
			
		||||
        isoDateTimeStr: dateUtils.dateStr,
 | 
			
		||||
        isoDateStr: date => dateUtils.dateStr(date).substr(0, 10)
 | 
			
		||||
        unescapeHtml: utils.unescapeHtml
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -116,6 +121,16 @@ function BackendScriptApi(startNote, currentNote, originEntity) {
 | 
			
		||||
     */
 | 
			
		||||
    this.getEntities = repository.getEntities;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} searchString
 | 
			
		||||
     * @returns ${Promise<Note[]>}
 | 
			
		||||
     */
 | 
			
		||||
    this.searchForNotes = searchService.searchForNotes;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Retrieves notes with given label name & value
 | 
			
		||||
     *
 | 
			
		||||
@@ -196,6 +211,23 @@ function BackendScriptApi(startNote, currentNote, originEntity) {
 | 
			
		||||
     */
 | 
			
		||||
    this.createNote = noteService.createNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates new note according to given params and force all connected clients to refresh their tree.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} parentNoteId - create new note under this parent
 | 
			
		||||
     * @param {string} title
 | 
			
		||||
     * @param {string} [content=""]
 | 
			
		||||
     * @param {CreateNoteExtraOptions} [extraOptions={}]
 | 
			
		||||
     * @returns {Promise<{note: Note, branch: Branch}>} object contains newly created entities note and branch
 | 
			
		||||
     */
 | 
			
		||||
    this.createNoteAndRefresh = async function(parentNoteId, title, content, extraOptions) {
 | 
			
		||||
        await noteService.createNote(parentNoteId, title, content, extraOptions);
 | 
			
		||||
 | 
			
		||||
        messagingService.refreshTree();
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Log given message to trilium logs.
 | 
			
		||||
     *
 | 
			
		||||
@@ -212,14 +244,42 @@ function BackendScriptApi(startNote, currentNote, originEntity) {
 | 
			
		||||
    this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns day note for given date (YYYY-MM-DD format). If such note doesn't exist, it is created.
 | 
			
		||||
     * Returns day note for given date. If such note doesn't exist, it is created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} date
 | 
			
		||||
     * @param {string} date in YYYY-MM-DD format
 | 
			
		||||
     * @returns {Promise<Note|null>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getDateNote = dateNoteService.getDateNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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 - "startOfTheWeek" - either "monday" (default) or "sunday"
 | 
			
		||||
     * @returns {Promise<Note|null>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getWeekNote = dateNoteService.getWeekNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns month note for given date. If such note doesn't exist, it is created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} date in YYYY-MM format
 | 
			
		||||
     * @returns {Promise<Note|null>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getMonthNote = dateNoteService.getMonthNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns year note for given year. If such note doesn't exist, it is created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} year in YYYY format
 | 
			
		||||
     * @returns {Promise<Note|null>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getYearNote = dateNoteService.getYearNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} parentNoteId - this note's child notes will be sorted
 | 
			
		||||
@@ -261,7 +321,12 @@ function BackendScriptApi(startNote, currentNote, originEntity) {
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {Promise<void>}
 | 
			
		||||
     */
 | 
			
		||||
    this.refreshTree = () => messagingService.sendMessageToAllClients({ type: 'refresh-tree' });
 | 
			
		||||
    this.refreshTree = messagingService.refreshTree;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
 | 
			
		||||
     */
 | 
			
		||||
    this.getAppInfo = () => appInfo
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = BackendScriptApi;</code></pre>
 | 
			
		||||
 
 | 
			
		||||
@@ -199,7 +199,7 @@
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
<h4 class="name" id="jsonContent"><span class="type-signature"></span>jsonContent<span class="type-signature"></span></h4>
 | 
			
		||||
<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"></span></h4>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -239,7 +239,181 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line16">line 16</a>
 | 
			
		||||
        <a href="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line14">line 14</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
<h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<span class="type-signature"></span></h4>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line17">line 17</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"></span></h4>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line20">line 20</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
</dl>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
            
 | 
			
		||||
<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"></span></h4>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<dl class="details">
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line23">line 23</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -45,10 +45,10 @@
 | 
			
		||||
        this.isInheritable = row.isInheritable;
 | 
			
		||||
        /** @param {boolean} isDeleted */
 | 
			
		||||
        this.isDeleted = row.isDeleted;
 | 
			
		||||
        /** @param {string} dateCreated */
 | 
			
		||||
        this.dateCreated = row.dateCreated;
 | 
			
		||||
        /** @param {string} dateModified */
 | 
			
		||||
        this.dateModified = row.dateModified;
 | 
			
		||||
        /** @param {string} utcDateCreated */
 | 
			
		||||
        this.utcDateCreated = row.utcDateCreated;
 | 
			
		||||
        /** @param {string} utcDateModified */
 | 
			
		||||
        this.utcDateModified = row.utcDateModified;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @returns {NoteShort} */
 | 
			
		||||
@@ -59,7 +59,9 @@
 | 
			
		||||
    get toString() {
 | 
			
		||||
        return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name})`;
 | 
			
		||||
    }
 | 
			
		||||
}</code></pre>
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default Attribute;</code></pre>
 | 
			
		||||
        </article>
 | 
			
		||||
    </section>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,13 +38,17 @@ class NoteFull extends NoteShort {
 | 
			
		||||
        /** @param {string} */
 | 
			
		||||
        this.content = row.content;
 | 
			
		||||
 | 
			
		||||
        if (this.content !== "" && this.isJson()) {
 | 
			
		||||
            try {
 | 
			
		||||
                /** @param {object} */
 | 
			
		||||
                this.jsonContent = JSON.parse(this.content);
 | 
			
		||||
            }
 | 
			
		||||
            catch(e) {}
 | 
			
		||||
        }
 | 
			
		||||
        /** @param {string} */
 | 
			
		||||
        this.dateCreated = row.dateCreated;
 | 
			
		||||
 | 
			
		||||
        /** @param {string} */
 | 
			
		||||
        this.dateModified = row.dateModified;
 | 
			
		||||
 | 
			
		||||
        /** @param {string} */
 | 
			
		||||
        this.utcDateCreated = row.utcDateCreated;
 | 
			
		||||
 | 
			
		||||
        /** @param {string} */
 | 
			
		||||
        this.utcDateModified = row.utcDateModified;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -303,7 +303,7 @@
 | 
			
		||||
    
 | 
			
		||||
    <dt class="tag-source">Source:</dt>
 | 
			
		||||
    <dd class="tag-source"><ul class="dummy"><li>
 | 
			
		||||
        <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line48">line 48</a>
 | 
			
		||||
        <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line53">line 53</a>
 | 
			
		||||
    </li></ul></dd>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,8 @@ import treeCache from './tree_cache.js';
 | 
			
		||||
import noteDetailService from './note_detail.js';
 | 
			
		||||
import noteTypeService from './note_type.js';
 | 
			
		||||
import noteTooltipService from './note_tooltip.js';
 | 
			
		||||
import protectedSessionService from'./protected_session.js';
 | 
			
		||||
import dateNotesService from'./date_notes.js';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is the main frontend API interface for scripts. It's published in the local "api" object.
 | 
			
		||||
@@ -52,6 +54,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
    /** @property {object|null} entity whose event triggered this execution */
 | 
			
		||||
    this.originEntity = originEntity;
 | 
			
		||||
 | 
			
		||||
    // to keep consistency with backend API
 | 
			
		||||
    this.dayjs = dayjs;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Activates note in the tree and in the note detail.
 | 
			
		||||
     *
 | 
			
		||||
@@ -70,7 +75,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
    this.activateNewNote = async notePath => {
 | 
			
		||||
        await treeService.reload();
 | 
			
		||||
 | 
			
		||||
        await treeService.activateNote(notePath, true);
 | 
			
		||||
        await treeService.activateNote(notePath, noteDetailService.focusAndSelectTitle);
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -158,6 +163,14 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns note by given noteId. If note is missing from cache, it's loaded.
 | 
			
		||||
     **
 | 
			
		||||
     * @param {string} noteId
 | 
			
		||||
     * @return {Promise<NoteShort>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getNote = async noteId => await treeCache.getNote(noteId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns list of notes. If note is missing from cache, it's loaded.
 | 
			
		||||
     *
 | 
			
		||||
@@ -170,6 +183,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
     */
 | 
			
		||||
    this.getNotes = async (noteIds, silentNotFoundError = false) => await treeCache.getNotes(noteIds, silentNotFoundError);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param {string} noteId
 | 
			
		||||
     * @method
 | 
			
		||||
     */
 | 
			
		||||
    this.reloadChildren = async noteId => await treeCache.reloadChildren(noteId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param {string} noteId
 | 
			
		||||
     * @method
 | 
			
		||||
     */
 | 
			
		||||
    this.reloadParents = async noteId => await treeCache.reloadParents(noteId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Instance name identifies particular Trilium instance. It can be useful for scripts
 | 
			
		||||
     * if some action needs to happen on only one specific instance.
 | 
			
		||||
@@ -227,9 +252,34 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
     * @returns {string} content of currently loaded note in the editor (HTML, code etc.)
 | 
			
		||||
     * @returns {string} content of active note (loaded into right pane)
 | 
			
		||||
     */
 | 
			
		||||
    this.getCurrentNoteContent = noteDetailService.getCurrentNoteContent;
 | 
			
		||||
    this.getActiveNoteContent = noteDetailService.getActiveNoteContent;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
     * @returns {NoteFull} active note (loaded into right pane)
 | 
			
		||||
     */
 | 
			
		||||
    this.getActiveNote = noteDetailService.getActiveNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
     * @returns {string} returns note path of active note
 | 
			
		||||
     */
 | 
			
		||||
    this.getActiveNotePath = treeService.getActiveNotePath;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method checks whether user navigated away from the note from which the scripts has been started.
 | 
			
		||||
     * This is necessary because script execution is async and by the time it is finished, the user might have
 | 
			
		||||
     * already navigated away from this page - the end result would be that script might return data for the wrong
 | 
			
		||||
     * note.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @return {boolean} returns true if the original note is still loaded, false if user switched to another
 | 
			
		||||
     */
 | 
			
		||||
    this.isNoteStillActive = () => {
 | 
			
		||||
        return this.originEntity.noteId === noteDetailService.getActiveNoteId();
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
@@ -259,7 +309,47 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {object} $el - jquery object on which to setup the tooltip
 | 
			
		||||
     */
 | 
			
		||||
    this.setupElementTooltip = noteTooltipService.setupElementTooltip
 | 
			
		||||
    this.setupElementTooltip = noteTooltipService.setupElementTooltip;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @method
 | 
			
		||||
     */
 | 
			
		||||
    this.protectActiveNote = protectedSessionService.protectNoteAndSendToServer;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns date-note for today. If it doesn't exist, it is automatically created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @return {Promise<NoteShort>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getTodayNote = dateNotesService.getTodayNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns date-note. If it doesn't exist, it is automatically created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} date - e.g. "2019-04-29"
 | 
			
		||||
     * @return {Promise<NoteShort>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getDateNote = dateNotesService.getDateNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns month-note. If it doesn't exist, it is automatically created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} month - e.g. "2019-04"
 | 
			
		||||
     * @return {Promise<NoteShort>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getMonthNote = dateNotesService.getMonthNote;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns year-note. If it doesn't exist, it is automatically created.
 | 
			
		||||
     *
 | 
			
		||||
     * @method
 | 
			
		||||
     * @param {string} year - e.g. "2019"
 | 
			
		||||
     * @return {Promise<NoteShort>}
 | 
			
		||||
     */
 | 
			
		||||
    this.getYearNote = dateNotesService.getYearNote;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default FrontendScriptApi;</code></pre>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										38
									
								
								electron.js
									
									
									
									
									
								
							
							
						
						@@ -3,10 +3,12 @@
 | 
			
		||||
const electron = require('electron');
 | 
			
		||||
const path = require('path');
 | 
			
		||||
const log = require('./src/services/log');
 | 
			
		||||
const sqlInit = require('./src/services/sql_init');
 | 
			
		||||
const cls = require('./src/services/cls');
 | 
			
		||||
const url = require("url");
 | 
			
		||||
const port = require('./src/services/port');
 | 
			
		||||
const appIconService = require('./src/services/app_icon');
 | 
			
		||||
const windowStateKeeper = require('electron-window-state');
 | 
			
		||||
 | 
			
		||||
const app = electron.app;
 | 
			
		||||
const globalShortcut = electron.globalShortcut;
 | 
			
		||||
@@ -28,14 +30,31 @@ function onClosed() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function createMainWindow() {
 | 
			
		||||
    const win = new electron.BrowserWindow({
 | 
			
		||||
        // initial window width & height so it's usable on 1600 * 900 display (including some extra panels etc.)
 | 
			
		||||
        width: 1200,
 | 
			
		||||
        height: 800,
 | 
			
		||||
        title: 'Trilium Notes',
 | 
			
		||||
        icon: path.join(__dirname, 'src/public/images/app-icons/png/256x256.png')
 | 
			
		||||
    await sqlInit.dbConnection;
 | 
			
		||||
 | 
			
		||||
    // if schema doesn't exist -> setup process
 | 
			
		||||
    // if schema exists, then we need to wait until the migration process is finished
 | 
			
		||||
    if (await sqlInit.schemaExists()) {
 | 
			
		||||
        await sqlInit.dbReady;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const mainWindowState = windowStateKeeper({
 | 
			
		||||
        // default window width & height so it's usable on 1600 * 900 display (including some extra panels etc.)
 | 
			
		||||
        defaultWidth: 1200,
 | 
			
		||||
        defaultHeight: 800
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const win = new electron.BrowserWindow({
 | 
			
		||||
        x: mainWindowState.x,
 | 
			
		||||
        y: mainWindowState.y,
 | 
			
		||||
        width: mainWindowState.width,
 | 
			
		||||
        height: mainWindowState.height,
 | 
			
		||||
        title: 'Trilium Notes',
 | 
			
		||||
        icon: path.join(__dirname, 'images/app-icons/png/256x256.png')
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    mainWindowState.manage(win);
 | 
			
		||||
 | 
			
		||||
    win.setMenu(null);
 | 
			
		||||
    win.loadURL('http://localhost:' + await port);
 | 
			
		||||
    win.on('closed', onClosed);
 | 
			
		||||
@@ -78,15 +97,10 @@ app.on('ready', async () => {
 | 
			
		||||
    mainWindow = await createMainWindow();
 | 
			
		||||
 | 
			
		||||
    const result = globalShortcut.register('CommandOrControl+Alt+P', cls.wrap(async () => {
 | 
			
		||||
        const dateNoteService = require('./src/services/date_notes');
 | 
			
		||||
        const dateUtils = require('./src/services/date_utils');
 | 
			
		||||
 | 
			
		||||
        const parentNote = await dateNoteService.getDateNote(dateUtils.nowLocalDate());
 | 
			
		||||
 | 
			
		||||
        // window may be hidden / not in focus
 | 
			
		||||
        mainWindow.focus();
 | 
			
		||||
 | 
			
		||||
        mainWindow.webContents.send('create-day-sub-note', parentNote.noteId);
 | 
			
		||||
        mainWindow.webContents.send('create-day-sub-note');
 | 
			
		||||
    }));
 | 
			
		||||
 | 
			
		||||
    if (!result) {
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB  | 
| 
		 Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB  | 
| 
		 Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 820 B  | 
| 
		 Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB  | 
| 
		 Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB  | 
| 
		 Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB  | 
| 
		 Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB  | 
| 
		 Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB  | 
| 
		 Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB  | 
| 
		 Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 353 KiB  | 
							
								
								
									
										1
									
								
								images/shield.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-opacity="0.03" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-shield"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 296 B  | 
| 
		 Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										7
									
								
								libraries/bootstrap/css/bootstrap.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								libraries/bootstrap/css/bootstrap.min.css.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										7
									
								
								libraries/bootstrap/js/bootstrap.bundle.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								libraries/bootstrap/js/bootstrap.bundle.min.js.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										6
									
								
								libraries/ckeditor/ckeditor.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								libraries/ckeditor/ckeditor.js.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -28,7 +28,7 @@
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async function validatorJavaScript(text, options) {
 | 
			
		||||
        if (glob.getCurrentNote().mime === 'application/json') {
 | 
			
		||||
        if (glob.getActiveNote().mime === 'application/json') {
 | 
			
		||||
            // eslint doesn't seem to validate pure JSON well
 | 
			
		||||
            return [];
 | 
			
		||||
        }
 | 
			
		||||