mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
Compare commits
1056 Commits
v0.57.3
...
v0.61.9-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d09d3f5a96 | ||
|
|
3d15aeae58 | ||
|
|
9765892d18 | ||
|
|
78f8a37587 | ||
|
|
86d62866f2 | ||
|
|
1dc3fafcbf | ||
|
|
7f06952d9e | ||
|
|
78b6614eea | ||
|
|
9665e872c2 | ||
|
|
9db0a062ed | ||
|
|
055bb39e4d | ||
|
|
1261a06a30 | ||
|
|
91eb3c45d5 | ||
|
|
3944235592 | ||
|
|
5be61e6142 | ||
|
|
62ccf798ee | ||
|
|
70d6bd0157 | ||
|
|
e5555beea9 | ||
|
|
9767b6269a | ||
|
|
7e486fda06 | ||
|
|
9f726304aa | ||
|
|
be918628c3 | ||
|
|
602b9ae64a | ||
|
|
602a166e36 | ||
|
|
aaad858395 | ||
|
|
48248224f8 | ||
|
|
79e5e3b65f | ||
|
|
d0383f3044 | ||
|
|
62ecd1ad76 | ||
|
|
75b7706c2c | ||
|
|
584b176643 | ||
|
|
a16555bbff | ||
|
|
a749e24147 | ||
|
|
bb81f110dd | ||
|
|
5dd6f49104 | ||
|
|
bc6be44b19 | ||
|
|
8075265753 | ||
|
|
4a67f63abd | ||
|
|
d9666210f1 | ||
|
|
5f6d562bf8 | ||
|
|
f37dc66074 | ||
|
|
0b84524807 | ||
|
|
8062bb7e2a | ||
|
|
806062c8d1 | ||
|
|
83f19c0537 | ||
|
|
3a83d58b25 | ||
|
|
6fa9d996e8 | ||
|
|
1ea3d238e0 | ||
|
|
eb273b7dbb | ||
|
|
d2263c68f8 | ||
|
|
97d8b19868 | ||
|
|
2bc7da91a6 | ||
|
|
2b4cbb5f6b | ||
|
|
7b662b04ff | ||
|
|
f8e4a665bd | ||
|
|
f9a27dd90c | ||
|
|
641985737f | ||
|
|
121e4ba2ea | ||
|
|
01474ecd2d | ||
|
|
82e4e28e7b | ||
|
|
886ee0dbcb | ||
|
|
6f7fbacca1 | ||
|
|
8da5b90aea | ||
|
|
e7d57bc08f | ||
|
|
041758766a | ||
|
|
f2a510e4c5 | ||
|
|
4717242dc7 | ||
|
|
c1865f8564 | ||
|
|
515c5411a6 | ||
|
|
3f7a5504c7 | ||
|
|
8c7c37cf98 | ||
|
|
c0f48c0e99 | ||
|
|
abedf2bba4 | ||
|
|
bb0137b2fd | ||
|
|
6c54c7d17d | ||
|
|
90255ac55b | ||
|
|
e741c2826c | ||
|
|
026992db78 | ||
|
|
33780c1e17 | ||
|
|
ede9c43f67 | ||
|
|
5c12ac4eee | ||
|
|
522518cf0d | ||
|
|
1d869d25c2 | ||
|
|
a9cdd93cb4 | ||
|
|
4240da349d | ||
|
|
c257bc07a8 | ||
|
|
00eaa16985 | ||
|
|
fefb059564 | ||
|
|
9166765ced | ||
|
|
6ae7661603 | ||
|
|
30e75056bd | ||
|
|
530e56dcb5 | ||
|
|
63675bfbae | ||
|
|
696ce38083 | ||
|
|
12014b9f4d | ||
|
|
e8b52f9e6c | ||
|
|
04b125afc0 | ||
|
|
2a7fe85020 | ||
|
|
119050e355 | ||
|
|
72122d0f95 | ||
|
|
bd22863bb7 | ||
|
|
ce3834eb9e | ||
|
|
8edb5428e5 | ||
|
|
527718eff7 | ||
|
|
5b0f487f3f | ||
|
|
a3fa8341ba | ||
|
|
04813743e2 | ||
|
|
ddf75cd5e5 | ||
|
|
d0e5ad5b7e | ||
|
|
b4631e927c | ||
|
|
b7bc843a37 | ||
|
|
98d65f8767 | ||
|
|
0599891ec0 | ||
|
|
cc06701565 | ||
|
|
40683985cd | ||
|
|
074e13a889 | ||
|
|
98b0baefe2 | ||
|
|
3aad0ebc95 | ||
|
|
479d720a6e | ||
|
|
e4892c9888 | ||
|
|
f8c9178c5d | ||
|
|
83049c95c3 | ||
|
|
bc8f531b33 | ||
|
|
23278f54cb | ||
|
|
18801fb3e1 | ||
|
|
dc0a0dcf09 | ||
|
|
04c306b360 | ||
|
|
d6a4f1db13 | ||
|
|
84c4b368c8 | ||
|
|
4307f25205 | ||
|
|
48f03f7a1b | ||
|
|
9d24499fef | ||
|
|
df97b269a7 | ||
|
|
ee6fb98a0d | ||
|
|
13e30e5855 | ||
|
|
5ab2ec0f13 | ||
|
|
8465d7fa68 | ||
|
|
d153fc7ba5 | ||
|
|
1a7c2d4c32 | ||
|
|
b3381a3b53 | ||
|
|
ac0d61e9b4 | ||
|
|
b13a6ced19 | ||
|
|
b61aab06b5 | ||
|
|
64b86b2666 | ||
|
|
27e6fa9526 | ||
|
|
3d31742285 | ||
|
|
2b2f4fbc07 | ||
|
|
513bf252cd | ||
|
|
f591e954f3 | ||
|
|
59de1925a9 | ||
|
|
6c1011341c | ||
|
|
906082a6b2 | ||
|
|
30bcd1764a | ||
|
|
cea54aecad | ||
|
|
ff6f2a4d44 | ||
|
|
5f6fded833 | ||
|
|
fed5f1a7d2 | ||
|
|
a06ee1ced1 | ||
|
|
332b92791e | ||
|
|
d4a9461460 | ||
|
|
2dac6ab281 | ||
|
|
4d00404f55 | ||
|
|
3adab07ddb | ||
|
|
3d0c3652ce | ||
|
|
c3f5bb5518 | ||
|
|
b2d460d5c1 | ||
|
|
d475346a09 | ||
|
|
ca41806bc2 | ||
|
|
a748710b01 | ||
|
|
ac9a4b3afc | ||
|
|
b7f0fd2db3 | ||
|
|
7d6c847d47 | ||
|
|
6ec6d66f17 | ||
|
|
977089cc28 | ||
|
|
c3f8975166 | ||
|
|
639f80b603 | ||
|
|
927da84d3b | ||
|
|
b8c9943deb | ||
|
|
bb6ab0fe45 | ||
|
|
0c86dece5f | ||
|
|
b7b0bd80ed | ||
|
|
f06207207b | ||
|
|
068684101f | ||
|
|
f78d96a3d4 | ||
|
|
a0d958bf12 | ||
|
|
0802b81807 | ||
|
|
192e399cb5 | ||
|
|
fc564f6aed | ||
|
|
eb34f9c64f | ||
|
|
48029cea7c | ||
|
|
f4ec4e58c7 | ||
|
|
faa402fcda | ||
|
|
788841d256 | ||
|
|
b7c37fdf58 | ||
|
|
a46c5a2243 | ||
|
|
430f2975f8 | ||
|
|
dd8226ff4c | ||
|
|
807b442c7a | ||
|
|
a452e4add5 | ||
|
|
48b30b985e | ||
|
|
05d2f4fe96 | ||
|
|
85a75fc186 | ||
|
|
ddda4d9867 | ||
|
|
42c8059ae1 | ||
|
|
0f4eb8ff4c | ||
|
|
8ee537e2eb | ||
|
|
8eb091445b | ||
|
|
1fc23c948e | ||
|
|
cb2b97635a | ||
|
|
8fb42e4517 | ||
|
|
edae1a5d1c | ||
|
|
08398a1417 | ||
|
|
712304bbc6 | ||
|
|
afb893c157 | ||
|
|
ebccd48013 | ||
|
|
54065672aa | ||
|
|
8394ce8002 | ||
|
|
176784834f | ||
|
|
a47004bb4e | ||
|
|
995f1c9fc4 | ||
|
|
1f3b6feaff | ||
|
|
8095c77b91 | ||
|
|
6cfd18b29b | ||
|
|
defd997424 | ||
|
|
5905950c17 | ||
|
|
691fccb769 | ||
|
|
bbe3f436d3 | ||
|
|
af053b61fc | ||
|
|
e22f77eae7 | ||
|
|
3223e76787 | ||
|
|
74400dad97 | ||
|
|
1b68adf3e4 | ||
|
|
a2cd6f92d7 | ||
|
|
3ff5fe61b2 | ||
|
|
75c6afd1c3 | ||
|
|
8d2958738f | ||
|
|
0496412f4a | ||
|
|
f80a20d18c | ||
|
|
34c642a49a | ||
|
|
2ebbc33081 | ||
|
|
ac56056f65 | ||
|
|
6f16b4caec | ||
|
|
bea39f37ee | ||
|
|
6548149107 | ||
|
|
fbc805a221 | ||
|
|
6015a067ec | ||
|
|
4a1ecd906b | ||
|
|
41844cf817 | ||
|
|
004cfe1965 | ||
|
|
b97ebe9f03 | ||
|
|
08ec866dd2 | ||
|
|
2bdd538d7d | ||
|
|
6e69cafe54 | ||
|
|
38839532d5 | ||
|
|
0234ff5fca | ||
|
|
44bcfd47c0 | ||
|
|
69c7eb14aa | ||
|
|
00453fc151 | ||
|
|
5c393f959d | ||
|
|
e6bf6424e8 | ||
|
|
57702a07a2 | ||
|
|
3b3f6082a7 | ||
|
|
49241ab318 | ||
|
|
93addac8bb | ||
|
|
fe908759d1 | ||
|
|
779751a234 | ||
|
|
cb9feab7b2 | ||
|
|
b79631a35d | ||
|
|
c177aaa901 | ||
|
|
eff3e1df85 | ||
|
|
b46d5f4a71 | ||
|
|
5b421d51b5 | ||
|
|
8852e8e531 | ||
|
|
8bc84cfaf6 | ||
|
|
cde13dc580 | ||
|
|
282d135f0f | ||
|
|
3e3d7aa4d7 | ||
|
|
446c41d020 | ||
|
|
33fdad5159 | ||
|
|
463d145cb7 | ||
|
|
1413756d00 | ||
|
|
d3bf325f19 | ||
|
|
c4f69fd9cb | ||
|
|
50ec17433d | ||
|
|
2c8eb82d42 | ||
|
|
af67cf64b1 | ||
|
|
095da691a4 | ||
|
|
7e71029d1c | ||
|
|
045ee18237 | ||
|
|
e47c3a27b0 | ||
|
|
ced99f8ac8 | ||
|
|
0c4492bcd0 | ||
|
|
d9359c7c55 | ||
|
|
86a080e7ec | ||
|
|
0a66809bf0 | ||
|
|
ecfdde2f2a | ||
|
|
758dba9ba5 | ||
|
|
ae42e0efc7 | ||
|
|
b5cfc28912 | ||
|
|
c802bf7d8b | ||
|
|
9e5a02094c | ||
|
|
58253567cd | ||
|
|
92d5aeae41 | ||
|
|
d2d286a4ff | ||
|
|
a6ade790c6 | ||
|
|
a9dae7823f | ||
|
|
86861f6ec3 | ||
|
|
d26a0fae17 | ||
|
|
375dba3264 | ||
|
|
74044754e2 | ||
|
|
64aed9b462 | ||
|
|
5428cafa50 | ||
|
|
735852b3c1 | ||
|
|
f4b5d43899 | ||
|
|
235b779dec | ||
|
|
2a39906993 | ||
|
|
e1b67e20ec | ||
|
|
df17840dbc | ||
|
|
9d52f80c2f | ||
|
|
0aa119af2c | ||
|
|
c2f70031d0 | ||
|
|
1a2beb941e | ||
|
|
01b2887b36 | ||
|
|
5286d4a97c | ||
|
|
bf6106f4dc | ||
|
|
82efc92413 | ||
|
|
34481df2e7 | ||
|
|
ad4631018a | ||
|
|
ef89eede17 | ||
|
|
6878877acd | ||
|
|
611a983461 | ||
|
|
8e913cb453 | ||
|
|
9d49264258 | ||
|
|
6098d62dcc | ||
|
|
580ceec6b3 | ||
|
|
79dca12274 | ||
|
|
66c25e7f29 | ||
|
|
dc4983a013 | ||
|
|
039959a48b | ||
|
|
63be25f5bb | ||
|
|
ce7489049f | ||
|
|
b3d5938665 | ||
|
|
579ed7e194 | ||
|
|
e20fac19ba | ||
|
|
9e9fb2979f | ||
|
|
7fc2824325 | ||
|
|
0728f540ab | ||
|
|
4913a5a5fa | ||
|
|
14dd2b8827 | ||
|
|
4e9e7eba48 | ||
|
|
f3bc604516 | ||
|
|
bd278e291a | ||
|
|
074820dae5 | ||
|
|
1089e84f56 | ||
|
|
ed3d81ce62 | ||
|
|
57aa0a0fe1 | ||
|
|
88a961180f | ||
|
|
1f8798d7ac | ||
|
|
bd8429a0ba | ||
|
|
af95d387b9 | ||
|
|
da348075e8 | ||
|
|
d24d3af87d | ||
|
|
085c0e76ca | ||
|
|
d7d98b29a7 | ||
|
|
cb3b03537c | ||
|
|
7c7bea5e3a | ||
|
|
9fc474504b | ||
|
|
412fd105c9 | ||
|
|
470a0c7b21 | ||
|
|
9968cba348 | ||
|
|
aee520a209 | ||
|
|
cf4201b084 | ||
|
|
76196ed42c | ||
|
|
6089a369e3 | ||
|
|
092db03729 | ||
|
|
239c14a5df | ||
|
|
8a6002c6be | ||
|
|
38781d33ac | ||
|
|
0518cdbe8e | ||
|
|
4849dacd52 | ||
|
|
7cf47520d4 | ||
|
|
8eb0a4e1cb | ||
|
|
ad2a7a2da3 | ||
|
|
6a9aa5eeda | ||
|
|
04524ae8e4 | ||
|
|
04caba9f5b | ||
|
|
cc1f831a6a | ||
|
|
331d280075 | ||
|
|
46ed61d38a | ||
|
|
ff5d3a5f0c | ||
|
|
626af84f42 | ||
|
|
b05ce12e7b | ||
|
|
274505188b | ||
|
|
f85209a72f | ||
|
|
291f0e79d9 | ||
|
|
64db5e2542 | ||
|
|
c4a2ff5fa1 | ||
|
|
9f5f0aeddd | ||
|
|
4d5612e845 | ||
|
|
371f174756 | ||
|
|
5676ff9b2e | ||
|
|
aa8c0fdad8 | ||
|
|
8284c673f9 | ||
|
|
cc02546ed3 | ||
|
|
d09132dd60 | ||
|
|
ec662d01d0 | ||
|
|
ad0b98e2a1 | ||
|
|
3cafad3bf4 | ||
|
|
fbea3ed94f | ||
|
|
0ab18e3069 | ||
|
|
2aa987c072 | ||
|
|
a06ddc439d | ||
|
|
f6944b8219 | ||
|
|
fa3cbb4645 | ||
|
|
6dfc72c065 | ||
|
|
0af6f91d21 | ||
|
|
4aeecfdfa9 | ||
|
|
79d4dcf5f1 | ||
|
|
26a6ef8c03 | ||
|
|
5e1f81e53e | ||
|
|
9cdcbb3125 | ||
|
|
35338e9ec6 | ||
|
|
78d83b8826 | ||
|
|
8edf06d28d | ||
|
|
ecd2a5cbac | ||
|
|
c0cf319521 | ||
|
|
bb9631476e | ||
|
|
386e8dd32e | ||
|
|
61616f708f | ||
|
|
8ce499e958 | ||
|
|
22587ee6b5 | ||
|
|
9b32d86f78 | ||
|
|
5ea8226996 | ||
|
|
fbffc6b2b5 | ||
|
|
cd01886eb2 | ||
|
|
bb8fd2b054 | ||
|
|
d8bc9c2982 | ||
|
|
d232694dec | ||
|
|
735ac55bb8 | ||
|
|
c9aab9b479 | ||
|
|
53c87f3d25 | ||
|
|
4f1fafdf75 | ||
|
|
330e7ac08e | ||
|
|
49fb913eab | ||
|
|
4b074365e7 | ||
|
|
0896000fcd | ||
|
|
e007aba067 | ||
|
|
a6eda2479f | ||
|
|
eff567ee48 | ||
|
|
d3c2c314ac | ||
|
|
89681977b5 | ||
|
|
e10a7ea9a6 | ||
|
|
c3c6d73bb2 | ||
|
|
5e2efca933 | ||
|
|
e71b0d82a1 | ||
|
|
c6c162cdda | ||
|
|
8b46d6c718 | ||
|
|
e24d5a6f83 | ||
|
|
e28fbf4617 | ||
|
|
0e4a040ed8 | ||
|
|
b84670d503 | ||
|
|
8725f7cfb2 | ||
|
|
83d8908ee8 | ||
|
|
af9ef83742 | ||
|
|
3eafdadd1f | ||
|
|
1d3272e9f8 | ||
|
|
447b8f0f0c | ||
|
|
aaf6e3bace | ||
|
|
44c61b8e7d | ||
|
|
8226f62ded | ||
|
|
d3b17f586d | ||
|
|
a556ba0959 | ||
|
|
ad40cd72ff | ||
|
|
9a22c3fce7 | ||
|
|
63e044ffdf | ||
|
|
2e794ee38f | ||
|
|
a1d4e062ed | ||
|
|
d2d2a28885 | ||
|
|
ead4242735 | ||
|
|
30a8c6b579 | ||
|
|
25df8f9c52 | ||
|
|
65d2389b2e | ||
|
|
7aa26580ba | ||
|
|
e4376bb9f2 | ||
|
|
f01657e1dd | ||
|
|
0c08126752 | ||
|
|
ea64adc2f9 | ||
|
|
ad8ec68443 | ||
|
|
5e5fe2ccf3 | ||
|
|
34ecd77bd4 | ||
|
|
6cf0fe0b73 | ||
|
|
3f8bf7cacc | ||
|
|
17128c5874 | ||
|
|
9e71c44c76 | ||
|
|
54c0268593 | ||
|
|
a5f0b2a81e | ||
|
|
a154bea016 | ||
|
|
2a34c8fa66 | ||
|
|
15a11daf38 | ||
|
|
5e88e24693 | ||
|
|
988c5c6a25 | ||
|
|
d98c46a275 | ||
|
|
185b206627 | ||
|
|
cfb04f7d8a | ||
|
|
dba0c9f373 | ||
|
|
ee60652746 | ||
|
|
fbc79eae62 | ||
|
|
b356a634d1 | ||
|
|
b2ed5a01b3 | ||
|
|
839b172b92 | ||
|
|
745e120a0b | ||
|
|
a0ac603260 | ||
|
|
181ddce887 | ||
|
|
50043f889b | ||
|
|
49d1c5140e | ||
|
|
ab7a07a318 | ||
|
|
306e7abb47 | ||
|
|
cec4dfa6c3 | ||
|
|
21813a7b83 | ||
|
|
293573a0cd | ||
|
|
8695228537 | ||
|
|
24866a3e25 | ||
|
|
e871edc8f3 | ||
|
|
517f1992a1 | ||
|
|
e6adf3a522 | ||
|
|
32e9fd291d | ||
|
|
8229a97ffb | ||
|
|
6612a3a550 | ||
|
|
c44be53673 | ||
|
|
5d6d9ab6d6 | ||
|
|
d100b0dc07 | ||
|
|
a0e9ac73c9 | ||
|
|
2bc78ccafb | ||
|
|
53aebf1448 | ||
|
|
2e9ce962df | ||
|
|
fa406d3ded | ||
|
|
93ad83d2ae | ||
|
|
72b1cc4d89 | ||
|
|
e70cca4736 | ||
|
|
d354c91d7c | ||
|
|
2d7b5e4aa2 | ||
|
|
b542a28673 | ||
|
|
ed52919f9e | ||
|
|
45a74a046c | ||
|
|
3192531d4c | ||
|
|
351bb760ae | ||
|
|
79a6baca6f | ||
|
|
f9645e8971 | ||
|
|
7611c83148 | ||
|
|
9881e6de3e | ||
|
|
53b4f0e0d5 | ||
|
|
9a645c24ca | ||
|
|
682d821b67 | ||
|
|
71afffaac1 | ||
|
|
a099876088 | ||
|
|
cf904a874e | ||
|
|
5a32a7ce18 | ||
|
|
6d6221636c | ||
|
|
8a4caaf6fb | ||
|
|
fa6d1879dd | ||
|
|
874b6c71a3 | ||
|
|
9be524ef89 | ||
|
|
fd8a2d4d92 | ||
|
|
0b270ee87a | ||
|
|
5cc5859211 | ||
|
|
bd489d5780 | ||
|
|
cd72ea524e | ||
|
|
56e8506cb9 | ||
|
|
c86be990d6 | ||
|
|
a24c56a9d5 | ||
|
|
95e38a037b | ||
|
|
256b800d0e | ||
|
|
b3c4c850db | ||
|
|
6b1f9d3243 | ||
|
|
117f1101e4 | ||
|
|
4284116280 | ||
|
|
d31b5ac99f | ||
|
|
b3f47bb2b6 | ||
|
|
64d8c7a657 | ||
|
|
4c3fcc3ea6 | ||
|
|
5ad47d3866 | ||
|
|
e698aa5822 | ||
|
|
1fdb23746a | ||
|
|
9cd5bdeb53 | ||
|
|
e6183b9a1d | ||
|
|
d83005fe4d | ||
|
|
2b84f1be00 | ||
|
|
bb45c67e60 | ||
|
|
147160ed45 | ||
|
|
515fb4e5db | ||
|
|
b6efc954bd | ||
|
|
eee05a4d01 | ||
|
|
dc97400dbf | ||
|
|
e16bedfab4 | ||
|
|
5a8e216dec | ||
|
|
1faf8225c7 | ||
|
|
bfbb531863 | ||
|
|
48ba73e06d | ||
|
|
c922322ed3 | ||
|
|
53aaffd0f5 | ||
|
|
63a70f2ffa | ||
|
|
d8e9086bde | ||
|
|
af4470ead1 | ||
|
|
7cda81ec68 | ||
|
|
b1153f8d01 | ||
|
|
54e21bf249 | ||
|
|
eebf329983 | ||
|
|
7b1d6c3937 | ||
|
|
e6803e9a9b | ||
|
|
0b24011468 | ||
|
|
2699c995ee | ||
|
|
697f6ee2a9 | ||
|
|
35429f6a93 | ||
|
|
29eae4eeb6 | ||
|
|
8de67b6945 | ||
|
|
4f63284d41 | ||
|
|
0c806024fb | ||
|
|
9a08aa2ab5 | ||
|
|
02f218389b | ||
|
|
d3ec9f022c | ||
|
|
4cd54e5a9a | ||
|
|
5225a99995 | ||
|
|
929f8ef720 | ||
|
|
6b4800d2d6 | ||
|
|
f60e4a1355 | ||
|
|
03897c5c9d | ||
|
|
ef90f1ff3f | ||
|
|
177a67f59b | ||
|
|
1e551581f8 | ||
|
|
62c2547557 | ||
|
|
2389ab30f8 | ||
|
|
fdffc27bb6 | ||
|
|
540d19c67c | ||
|
|
46eebdc7aa | ||
|
|
700c6ffc75 | ||
|
|
6b013c05cc | ||
|
|
f541bf186c | ||
|
|
9eb3075f65 | ||
|
|
e2b8dfe96a | ||
|
|
f883fde74a | ||
|
|
ae6f2624a0 | ||
|
|
ee2953a5e1 | ||
|
|
ec8ed65feb | ||
|
|
b70699ce1c | ||
|
|
5820f874fc | ||
|
|
44c0ecdbfa | ||
|
|
7be9db8b84 | ||
|
|
69d7684b0d | ||
|
|
a88582c610 | ||
|
|
3fd0c01c05 | ||
|
|
c16537aecf | ||
|
|
79f1eb6e5e | ||
|
|
fc67dd4d0a | ||
|
|
232dad66d1 | ||
|
|
ed30ec27e7 | ||
|
|
eaab82551f | ||
|
|
d343ff0d23 | ||
|
|
400b14e021 | ||
|
|
760c7b73ad | ||
|
|
97cadc3acf | ||
|
|
7d0117bd28 | ||
|
|
956682f2c7 | ||
|
|
4558e349b5 | ||
|
|
6f7b554cdc | ||
|
|
42e08284b0 | ||
|
|
127486fdf5 | ||
|
|
4ffe36e4d0 | ||
|
|
85403321cf | ||
|
|
22cea63863 | ||
|
|
c95c5bb471 | ||
|
|
cbabaa6b0c | ||
|
|
520ffecd36 | ||
|
|
b1e2b5ba8e | ||
|
|
896a4fe981 | ||
|
|
e9a2cacb5b | ||
|
|
c190296bf9 | ||
|
|
e411ad0eb1 | ||
|
|
17085e5578 | ||
|
|
33d6bb69c0 | ||
|
|
44629e6a0a | ||
|
|
78d61f157e | ||
|
|
3c0ba09a62 | ||
|
|
e57d325bd6 | ||
|
|
260bc93a66 | ||
|
|
a9296e2a39 | ||
|
|
8371703090 | ||
|
|
fc7da015fe | ||
|
|
adf222b5e8 | ||
|
|
ade22ea825 | ||
|
|
2c8fb90ecb | ||
|
|
c67644a2e3 | ||
|
|
346f6edd7e | ||
|
|
92f586486f | ||
|
|
15607becc6 | ||
|
|
e7c6d912a4 | ||
|
|
290f7e2101 | ||
|
|
460b5fb3a4 | ||
|
|
88e09eb279 | ||
|
|
5e0fbea3b3 | ||
|
|
7b2c3afe4c | ||
|
|
2e181d0fb1 | ||
|
|
68a03211ce | ||
|
|
37ba76fdd8 | ||
|
|
78954268ab | ||
|
|
b0528b62d8 | ||
|
|
2b4dfaef7f | ||
|
|
ad887c4b12 | ||
|
|
63c62df787 | ||
|
|
c68a67d148 | ||
|
|
bd8568809f | ||
|
|
0bfb2631df | ||
|
|
3c57f08ef7 | ||
|
|
a7b103e07a | ||
|
|
64e7150765 | ||
|
|
a888f9aa04 | ||
|
|
2e9dbda077 | ||
|
|
c474e65cae | ||
|
|
f59e19d93b | ||
|
|
8a33645360 | ||
|
|
339d8a7378 | ||
|
|
f2a19c56b1 | ||
|
|
a98fd509c6 | ||
|
|
a3149aecf4 | ||
|
|
6a6ae359b6 | ||
|
|
2fa1d812f6 | ||
|
|
ef825371cf | ||
|
|
b567775129 | ||
|
|
58d71bf8e3 | ||
|
|
9fd0b85ff2 | ||
|
|
a5e21ea5f3 | ||
|
|
98620887d4 | ||
|
|
9eff08144c | ||
|
|
4ba72bc8d3 | ||
|
|
f50a9c250a | ||
|
|
743979266a | ||
|
|
4f98c960ec | ||
|
|
424b624ea9 | ||
|
|
a004a8b092 | ||
|
|
df0f52aff9 | ||
|
|
f7bd72ba2f | ||
|
|
038c0e78a6 | ||
|
|
2a2cbcd68b | ||
|
|
be654e7a31 | ||
|
|
32bd74fe27 | ||
|
|
14da697a4e | ||
|
|
2525857c20 | ||
|
|
c97ada3434 | ||
|
|
c924790f3e | ||
|
|
a110f24b05 | ||
|
|
8eaef3e1d8 | ||
|
|
082caf98e8 | ||
|
|
60602a2264 | ||
|
|
9479f1c1a1 | ||
|
|
88bc7402a2 | ||
|
|
e7b3c3239b | ||
|
|
4f4c3ef3f3 | ||
|
|
d7b0719788 | ||
|
|
7a457e4509 | ||
|
|
decfeb366c | ||
|
|
420175f5ef | ||
|
|
bdfdc0402d | ||
|
|
bb8496cb3f | ||
|
|
4bdb94fbaa | ||
|
|
05c04a35a7 | ||
|
|
4385a02f6b | ||
|
|
397dd68666 | ||
|
|
edbb60f2b5 | ||
|
|
5bf9c253f2 | ||
|
|
b0cc177d84 | ||
|
|
c60f25fb7c | ||
|
|
4ab90b694f | ||
|
|
87636f27ba | ||
|
|
571cb6d0eb | ||
|
|
f738787202 | ||
|
|
4ae1b6e07b | ||
|
|
41b8f6882c | ||
|
|
43c5163f66 | ||
|
|
8a2a9b2ea6 | ||
|
|
c70272e756 | ||
|
|
843f5d0da1 | ||
|
|
2242397280 | ||
|
|
8a641e1b4f | ||
|
|
f86fb0d0a2 | ||
|
|
a863da1dce | ||
|
|
d7cae7d5bb | ||
|
|
19f4870280 | ||
|
|
ac51d0d569 | ||
|
|
218f526a92 | ||
|
|
161b45aa12 | ||
|
|
397629587c | ||
|
|
034098fd06 | ||
|
|
e03cc01e15 | ||
|
|
0995c56506 | ||
|
|
3a5fa2954d | ||
|
|
398480415e | ||
|
|
81013ed21a | ||
|
|
53360c147a | ||
|
|
9e47da3f03 | ||
|
|
faefe10c15 | ||
|
|
a4d3150a24 | ||
|
|
e1f0676891 | ||
|
|
792ac9b77d | ||
|
|
bbbd2f7e82 | ||
|
|
d910191e83 | ||
|
|
e8a9389e6d | ||
|
|
6dce13bc34 | ||
|
|
71cdea3902 | ||
|
|
85a6e8b47e | ||
|
|
f02ad63e97 | ||
|
|
977399a73e | ||
|
|
5d4a2f2064 | ||
|
|
c5ab6fa2fa | ||
|
|
b80bf0ffb6 | ||
|
|
bff7434921 | ||
|
|
da161c7ce0 | ||
|
|
977a47bc27 | ||
|
|
957640f163 | ||
|
|
291ef87c9b | ||
|
|
115bf0af4d | ||
|
|
e40f1fd11a | ||
|
|
797ddf6205 | ||
|
|
ca4e1c19a7 | ||
|
|
d2b906bc1b | ||
|
|
94dcaae12d | ||
|
|
df47679c7f | ||
|
|
d6f3b79f20 | ||
|
|
c7556d9163 | ||
|
|
16c3833a36 | ||
|
|
007e45ad8c | ||
|
|
b9b8b35342 | ||
|
|
dd82b0f958 | ||
|
|
f150c223bc | ||
|
|
e76290e598 | ||
|
|
4f771cfa7a | ||
|
|
aa3b26c965 | ||
|
|
f4cf04232f | ||
|
|
d36cf47974 | ||
|
|
f809da58ec | ||
|
|
ff1f01be8c | ||
|
|
0ddaa8f5c2 | ||
|
|
620bed73bb | ||
|
|
c177d2b97b | ||
|
|
0758c82983 | ||
|
|
ecc2ed7d73 | ||
|
|
4b779d7512 | ||
|
|
701911b766 | ||
|
|
5fea90491c | ||
|
|
d665b7e584 | ||
|
|
7a8bbdced8 | ||
|
|
affd8062e2 | ||
|
|
45b94ecaeb | ||
|
|
acda37e334 | ||
|
|
2cfc43a4fd | ||
|
|
fb789b7bd8 | ||
|
|
b906efb23b | ||
|
|
f249d6cb26 | ||
|
|
afb6e860ea | ||
|
|
435e042ae9 | ||
|
|
d64df5e3e7 | ||
|
|
bd59802ca4 | ||
|
|
7c98ade72b | ||
|
|
c6485f8e03 | ||
|
|
a083917db1 | ||
|
|
3b5f2b86d5 | ||
|
|
f08fbf7bca | ||
|
|
e2b227df34 | ||
|
|
4c51588270 | ||
|
|
b13ea72152 | ||
|
|
5a2907b670 | ||
|
|
b6f7c604c7 | ||
|
|
c5fb2cccd5 | ||
|
|
1d1e6ae782 | ||
|
|
bff33932d9 | ||
|
|
392b89e6dd | ||
|
|
5ae0a5cf1e | ||
|
|
1a1fb126c1 | ||
|
|
5c4db266a4 | ||
|
|
e5e0add1a2 | ||
|
|
e1d20b8ff8 | ||
|
|
c6a05d8853 | ||
|
|
c34bccf7e8 | ||
|
|
0441e7396a | ||
|
|
698eb53006 | ||
|
|
3804d2df8c | ||
|
|
7147cc267e | ||
|
|
29713de6cd | ||
|
|
46f40ee534 | ||
|
|
a882ad41c5 | ||
|
|
062e8c4b84 | ||
|
|
0f0ca51bd6 | ||
|
|
af654a171f | ||
|
|
186e06bc01 | ||
|
|
4cc9bdf5e4 | ||
|
|
e05e4bec32 | ||
|
|
5a3882f388 | ||
|
|
8ec2547b4a | ||
|
|
059c339c09 | ||
|
|
724f99f17c | ||
|
|
1b24276a4a | ||
|
|
ea006993f6 | ||
|
|
7a46159539 | ||
|
|
50faa40bad | ||
|
|
9d9305300c | ||
|
|
c89455f93f | ||
|
|
7c6d67f1ad | ||
|
|
8c4dda45ef | ||
|
|
db5e76fe8c | ||
|
|
5413a1aa79 | ||
|
|
e41104208a | ||
|
|
5fca606730 | ||
|
|
0de0b6fd06 | ||
|
|
db6dbc7821 | ||
|
|
e5171e434b | ||
|
|
2df7d99a91 | ||
|
|
6def541e78 | ||
|
|
5af506e268 | ||
|
|
967919b400 | ||
|
|
575f09d97f | ||
|
|
c28383de4f | ||
|
|
c496519095 | ||
|
|
ecaa9a1d56 | ||
|
|
d34a0a9fc0 | ||
|
|
b202b43bf5 | ||
|
|
648dd73fa1 | ||
|
|
1640a8aa7d | ||
|
|
698a6bf91c | ||
|
|
c409d7ff2a | ||
|
|
f8dd175837 | ||
|
|
195c6a4089 | ||
|
|
6c431ae5ed | ||
|
|
8c01a77a7a | ||
|
|
239c68a33c | ||
|
|
df3212c304 | ||
|
|
4026c2be4f | ||
|
|
c6614bc85b | ||
|
|
31b3af4129 | ||
|
|
c4b0c44919 | ||
|
|
223ca95829 | ||
|
|
b9ae68d559 | ||
|
|
e7470e31a0 | ||
|
|
1b6d0c9bbc | ||
|
|
75639c53f0 | ||
|
|
587387dd46 | ||
|
|
ffb3c044fa | ||
|
|
921f75beba | ||
|
|
f739259407 | ||
|
|
173b28062e | ||
|
|
4f51f73b89 | ||
|
|
ca968a9e31 | ||
|
|
2957e1d78a | ||
|
|
d1b989ac12 | ||
|
|
e3047ee450 | ||
|
|
f45478260e | ||
|
|
1bfd26ee8f | ||
|
|
bbdb7375ff | ||
|
|
23322455a3 | ||
|
|
c1d4d3fc8a | ||
|
|
fc40e54261 | ||
|
|
87e833d373 | ||
|
|
dcfa9c4c0b | ||
|
|
c231b3cb79 | ||
|
|
1f468f81cc | ||
|
|
494f8d2153 | ||
|
|
0f822b2761 | ||
|
|
5ac332960e | ||
|
|
dfb462cf35 | ||
|
|
342ae6e5e2 | ||
|
|
eaf195e0c8 | ||
|
|
9460cfdc55 | ||
|
|
c44bc60667 | ||
|
|
8d6801bb85 | ||
|
|
c22b6b29e0 | ||
|
|
44997f5cd1 | ||
|
|
95f4195ca7 | ||
|
|
73eb585398 | ||
|
|
57d381b990 | ||
|
|
e5ba6ff496 | ||
|
|
128023d34e | ||
|
|
653f80f7d8 | ||
|
|
d06d4ba437 | ||
|
|
2a68bdb690 | ||
|
|
5f6a10ef22 | ||
|
|
2ad19ddd36 | ||
|
|
5fc9f5f3f9 | ||
|
|
b9632a7814 | ||
|
|
f336435adb | ||
|
|
9e83368f87 | ||
|
|
d619a7a2d7 | ||
|
|
012fb1f50b | ||
|
|
d64b575e60 | ||
|
|
aec2c2d5cd | ||
|
|
0d06d5ccee | ||
|
|
74fdaad032 | ||
|
|
d3bf0c1d8e | ||
|
|
27ce273d29 | ||
|
|
cd60ad4267 | ||
|
|
56e01046c8 | ||
|
|
518a413de7 | ||
|
|
29923af17d | ||
|
|
99a5774148 | ||
|
|
b85f335561 | ||
|
|
7b36709e18 | ||
|
|
0d50cdb0f5 | ||
|
|
eec2ff043e | ||
|
|
0e68e8069b | ||
|
|
7aa801fc1f | ||
|
|
fc080f785b | ||
|
|
1a6c9be065 | ||
|
|
b55c2d3dbc | ||
|
|
720fb0f73e | ||
|
|
0985314fb7 | ||
|
|
e759b4846a | ||
|
|
eecfce3cc9 | ||
|
|
a459230aa9 | ||
|
|
e4f57ab2fe | ||
|
|
6a9ac6f90a | ||
|
|
6883b71ce7 | ||
|
|
70552d58ac | ||
|
|
c7bda4d0be | ||
|
|
e4e20c8007 | ||
|
|
2fbcd9aaf7 | ||
|
|
723db97094 | ||
|
|
65be882b49 | ||
|
|
48765cc87d | ||
|
|
e2f6191229 | ||
|
|
19126b7c6d | ||
|
|
c92b451033 | ||
|
|
3122d0cc6b | ||
|
|
06e6fec4ca | ||
|
|
12943cc808 | ||
|
|
6ec734df13 | ||
|
|
657c54efd4 | ||
|
|
4f1f632a7d | ||
|
|
7e83d3a54d | ||
|
|
8d30d5d689 | ||
|
|
c16f7a5e02 | ||
|
|
a904e82d72 | ||
|
|
5705efc998 | ||
|
|
2694bcff67 | ||
|
|
df7c089344 | ||
|
|
616e2c1c29 | ||
|
|
3c26e00fe1 | ||
|
|
fc920becac | ||
|
|
8d608c3c1c | ||
|
|
08aa65bddb | ||
|
|
54900b35dc | ||
|
|
7696702a2a | ||
|
|
42cade17cb | ||
|
|
7565458332 | ||
|
|
b86dbc088d | ||
|
|
82c596d1e3 | ||
|
|
b3097b59c7 | ||
|
|
5ec359e929 | ||
|
|
dff2d3e989 | ||
|
|
53affed8d3 | ||
|
|
102bfcebd0 |
7
.eslintignore
Normal file
7
.eslintignore
Normal file
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
dist
|
||||
bin
|
||||
docs
|
||||
libraries
|
||||
coverage
|
||||
play
|
||||
210
.eslintrc.js
Normal file
210
.eslintrc.js
Normal file
@@ -0,0 +1,210 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
// plugins: ['prettier'], // to be activated
|
||||
extends: ['eslint:recommended', 'airbnb-base', 'plugin:jsonc/recommended-with-jsonc', 'prettier'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.json', '*.json5', '*.jsonc'],
|
||||
parser: 'jsonc-eslint-parser',
|
||||
},
|
||||
{
|
||||
files: ['package.json'],
|
||||
parser: 'jsonc-eslint-parser',
|
||||
rules: {
|
||||
'jsonc/sort-keys': [
|
||||
'off',
|
||||
{
|
||||
pathPattern: '^$',
|
||||
order: [
|
||||
'name',
|
||||
'version',
|
||||
'private',
|
||||
'packageManager',
|
||||
'description',
|
||||
'type',
|
||||
'keywords',
|
||||
'homepage',
|
||||
'bugs',
|
||||
'license',
|
||||
'author',
|
||||
'contributors',
|
||||
'funding',
|
||||
'files',
|
||||
'main',
|
||||
'module',
|
||||
'exports',
|
||||
'unpkg',
|
||||
'jsdelivr',
|
||||
'browser',
|
||||
'bin',
|
||||
'man',
|
||||
'directories',
|
||||
'repository',
|
||||
'publishConfig',
|
||||
'scripts',
|
||||
'peerDependencies',
|
||||
'peerDependenciesMeta',
|
||||
'optionalDependencies',
|
||||
'dependencies',
|
||||
'devDependencies',
|
||||
'engines',
|
||||
'config',
|
||||
'overrides',
|
||||
'pnpm',
|
||||
'husky',
|
||||
'lint-staged',
|
||||
'eslintConfig',
|
||||
],
|
||||
},
|
||||
{
|
||||
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
|
||||
order: { type: 'asc' },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
globals: {
|
||||
$: true,
|
||||
jQuery: true,
|
||||
glob: true,
|
||||
log: true,
|
||||
EditorWatchdog: true,
|
||||
React: true,
|
||||
appState: true,
|
||||
ExcalidrawLib: true,
|
||||
elements: true,
|
||||
files: true,
|
||||
ReactDOM: true,
|
||||
// src\public\app\widgets\type_widgets\relation_map.js
|
||||
jsPlumb: true,
|
||||
panzoom: true,
|
||||
logError: true,
|
||||
// src\public\app\widgets\type_widgets\image.js
|
||||
WZoom: true,
|
||||
// \src\public\app\widgets\type_widgets\read_only_text.js
|
||||
renderMathInElement: true,
|
||||
// \src\public\app\widgets\type_widgets\editable_text.js
|
||||
BalloonEditor: true,
|
||||
FancytreeNode: true,
|
||||
CKEditorInspector: true,
|
||||
// \src\public\app\widgets\type_widgets\editable_code.js
|
||||
CodeMirror: true,
|
||||
// \src\public\app\services\resizer.js
|
||||
Split: true,
|
||||
// \src\public\app\services\content_renderer.js
|
||||
mermaid: true,
|
||||
// src\public\app\services\frontend_script_api.js
|
||||
dayjs: true,
|
||||
// \src\public\app\widgets\note_map.js
|
||||
ForceGraph: true,
|
||||
// \src\public\app\setup.js
|
||||
ko: true,
|
||||
syncInProgress: true,
|
||||
// src\public\app\services\utils.js
|
||||
logInfo: true,
|
||||
__non_webpack_require__: true,
|
||||
//
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
// eslint:recommended
|
||||
'no-unused-vars': 'off',
|
||||
'linebreak-style': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
'no-empty': 'off',
|
||||
'no-constant-condition': 'off',
|
||||
'getter-return': 'off',
|
||||
'no-cond-assign': 'off',
|
||||
'no-async-promise-executor': 'off',
|
||||
'no-extra-semi': 'off',
|
||||
'no-inner-declarations': 'off',
|
||||
|
||||
// prettier
|
||||
'prettier/prettier': ['off', { endOfLine: 'auto' }],
|
||||
|
||||
// airbnb-base
|
||||
'no-console': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
'global-require': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'no-await-in-loop': 'off',
|
||||
radix: 'off',
|
||||
'import/order': 'off',
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
'prefer-destructuring': 'off',
|
||||
'no-shadow': 'off',
|
||||
'no-new': 'off',
|
||||
'no-restricted-syntax': 'off',
|
||||
strict: 'off',
|
||||
'class-methods-use-this': 'off',
|
||||
'no-else-return': 'off',
|
||||
'import/no-dynamic-require': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'prefer-template': 'off',
|
||||
'consistent-return': 'off',
|
||||
'no-continue': 'off',
|
||||
'object-shorthand': 'off',
|
||||
'one-var': 'off',
|
||||
'prefer-const': 'off',
|
||||
'spaced-comment': 'off',
|
||||
'no-loop-func': 'off',
|
||||
'arrow-body-style': 'off',
|
||||
|
||||
'guard-for-in': 'off',
|
||||
'no-return-assign': 'off',
|
||||
'dot-notation': 'off',
|
||||
|
||||
'func-names': 'off',
|
||||
'import/no-useless-path-segments': 'off',
|
||||
'default-param-last': 'off',
|
||||
'prefer-arrow-callback': 'off',
|
||||
'no-unneeded-ternary': 'off',
|
||||
'no-return-await': 'off',
|
||||
'import/extensions': 'off',
|
||||
|
||||
'no-var': 'off',
|
||||
'import/newline-after-import': 'off',
|
||||
'no-restricted-globals': 'off',
|
||||
'operator-assignment': 'off',
|
||||
'no-eval': 'off',
|
||||
'max-classes-per-file': 'off',
|
||||
'vars-on-top': 'off',
|
||||
'no-bitwise': 'off',
|
||||
'no-lonely-if': 'off',
|
||||
'no-multi-assign': 'off',
|
||||
'no-promise-executor-return': 'off',
|
||||
'no-empty-function': 'off',
|
||||
'import/no-unresolved': 'off',
|
||||
camelcase: 'off',
|
||||
eqeqeq: 'off',
|
||||
'lines-between-class-members': 'off',
|
||||
'import/no-cycle': 'off',
|
||||
'new-cap': 'off',
|
||||
'prefer-object-spread': 'off',
|
||||
'no-new-func': 'off',
|
||||
'no-unused-expressions': 'off',
|
||||
'lines-around-directive': 'off',
|
||||
'prefer-exponentiation-operator': 'off',
|
||||
'no-restricted-properties': 'off',
|
||||
'prefer-rest-params': 'off',
|
||||
'no-unreachable-loop': 'off',
|
||||
'no-alert': 'off',
|
||||
'no-useless-return': 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'prefer-regex-literals': 'off',
|
||||
'import/no-named-as-default-member': 'off',
|
||||
yoda: 'off',
|
||||
'no-script-url': 'off',
|
||||
'no-prototype-builtins':'off'
|
||||
},
|
||||
};
|
||||
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -7,7 +7,7 @@ body:
|
||||
attributes:
|
||||
label: Trilium Version
|
||||
description: What version of Trilium are you using?
|
||||
placeholder: 0.48.0-beta
|
||||
placeholder: 0.57.0-beta
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -44,3 +44,9 @@ body:
|
||||
description: A clear and concise description of the bug and any additional information.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Error logs
|
||||
description: Please provide error logs, see [wiki page](https://github.com/zadam/trilium/wiki/Error-logs) for instructions on how to submit them.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@ cert.crt
|
||||
server-package.json
|
||||
.idea/httpRequests/
|
||||
data/
|
||||
tmp/
|
||||
.eslintcache
|
||||
@@ -2,7 +2,7 @@ image:
|
||||
file: .gitpod.dockerfile
|
||||
|
||||
tasks:
|
||||
- before: nvm install 16.18.0 && nvm use 16.18.0
|
||||
- before: nvm install 18.18.0 && nvm use 18.18.0
|
||||
init: npm install
|
||||
command: npm run start-server
|
||||
|
||||
|
||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
#npx lint-staged
|
||||
4
.idea/dataSources.xml
generated
4
.idea/dataSources.xml
generated
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="SQLite - document.db" uuid="30cef30d-e704-484d-a4ca-5d3bfc2ece63">
|
||||
<data-source source="LOCAL" name="document.db" uuid="2a4ac1e6-b828-4a2a-8e4a-3f59f10aff26">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/data/document.db</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
|
||||
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/inspectionProfiles/Project_Default.xml
generated
2
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,7 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JSUnfilteredForInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
|
||||
6
.idea/jsLinters/eslint.xml
generated
Normal file
6
.idea/jsLinters/eslint.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EslintConfiguration">
|
||||
<option name="fix-on-save" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
13
.prettierrc.js
Normal file
13
.prettierrc.js
Normal file
@@ -0,0 +1,13 @@
|
||||
//https://prettier.io/docs/en/options.html
|
||||
module.exports = {
|
||||
semi: true,
|
||||
trailingComma: 'none',
|
||||
singleQuote: true,
|
||||
printWidth: 100,
|
||||
tabWidth: 4,
|
||||
useTabs: false,
|
||||
quoteProps: "as-needed",
|
||||
bracketSpacing: true,
|
||||
arrowParens: "avoid"
|
||||
// htmlWhitespaceSensitivity: 'ignore',
|
||||
};
|
||||
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
]
|
||||
}
|
||||
20
.vscode/launch.json
vendored
20
.vscode/launch.json
vendored
@@ -1,18 +1,24 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
// nodemon should be installed globally, use npm i -g nodemon
|
||||
{
|
||||
"type": "node",
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"name": "nodemon start-server",
|
||||
"program": "${workspaceFolder}/src/www",
|
||||
"request": "launch",
|
||||
"name": "start-server",
|
||||
"restart": true,
|
||||
"runtimeExecutable": "nodemon",
|
||||
"env": {
|
||||
"TRILIUM_ENV": "dev",
|
||||
"TRILIUM_DATA_DIR": "./data"
|
||||
},
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"env": {
|
||||
"TRILIUM_ENV": "dev"
|
||||
},
|
||||
"type": "node",
|
||||
"outputCapture": "std",
|
||||
"program": "${workspaceFolder}/src/www"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
33
.vscode/settings.json
vendored
Normal file
33
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.probe": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"html",
|
||||
"vue",
|
||||
"markdown",
|
||||
"json",
|
||||
"jsonc"
|
||||
],
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"html",
|
||||
"vue",
|
||||
"markdown",
|
||||
"json",
|
||||
"jsonc"
|
||||
],
|
||||
"files.eol": "\n",
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Try connecting to /api/health-check using both http and https.
|
||||
# TODO: we should only be connecting with the actual protocol that is enabled
|
||||
# TODO: this assumes we use the default port 8080
|
||||
|
||||
for proto in http https; do
|
||||
if wget --spider -S "$proto://127.0.0.1:8080/api/health-check" 2>&1 | awk 'NR==2' | grep -w "HTTP/1.1 200 OK" ; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,5 @@
|
||||
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
||||
FROM node:16.18.0-alpine
|
||||
FROM node:18.18.0-alpine
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
@@ -25,11 +25,9 @@ RUN set -x \
|
||||
&& apk del .build-dependencies \
|
||||
&& npm run webpack \
|
||||
&& npm prune --omit=dev \
|
||||
# Set the path to the newly created webpack bundle
|
||||
&& sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' src/views/desktop.ejs \
|
||||
&& sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' src/views/mobile.ejs \
|
||||
&& sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' src/views/setup.ejs \
|
||||
&& sed -i -e 's/app\/share.js/app-dist\/share.js/g' src/views/share/*.ejs
|
||||
&& cp src/public/app/share.js src/public/app-dist/. \
|
||||
&& cp -r src/public/app/doc_notes src/public/app-dist/. \
|
||||
&& rm -rf src/public/app
|
||||
|
||||
# Some setup tools need to be kept
|
||||
RUN apk add --no-cache su-exec shadow
|
||||
@@ -41,4 +39,4 @@ RUN adduser -s /bin/false node; exit 0
|
||||
EXPOSE 8080
|
||||
CMD [ "./start-docker.sh" ]
|
||||
|
||||
HEALTHCHECK CMD sh DockerHealthcheck.sh
|
||||
HEALTHCHECK --start-period=10s CMD exec su-exec node node docker_healthcheck.js
|
||||
|
||||
@@ -1,49 +1,57 @@
|
||||
# Trilium笔记
|
||||
# Trilium Notes
|
||||
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md)
|
||||
|
||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
Trilium Notes是一个分层的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
|
||||
Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
|
||||
|
||||

|
||||
|
||||
Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/).
|
||||
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
|
||||
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/>
|
||||
|
||||
## 特性
|
||||
|
||||
* 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://github.com/zadam/trilium/wiki/Cloning-notes))
|
||||
* 丰富的所见即所得笔记编辑功能,包括带有markdown[自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
|
||||
* 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
|
||||
* 支持编辑[使用源代码的笔记](https://github.com/zadam/trilium/wiki/Code-notes),包括语法高亮显示
|
||||
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记挂起](https://github.com/zadam/trilium/wiki/Note-hoisting)
|
||||
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记聚焦](https://github.com/zadam/trilium/wiki/Note-hoisting)
|
||||
* 无缝[笔记版本控制](https://github.com/zadam/trilium/wiki/Note-revisions)
|
||||
* 笔记[属性](https://github.com/zadam/trilium/wiki/Attributes)可用于笔记组织,查询和高级[脚本编写](https://github.com/zadam/trilium/wiki/Scripts)
|
||||
* [同步](https://github.com/zadam/trilium/wiki/Synchronization)与自托管同步服务器
|
||||
* 有一个[第三方提供的同步服务器托管服务](https://trilium.cc/paid-hosting)
|
||||
* 公开地[分享](https://github.com/zadam/trilium/wiki/Sharing)(发布)笔记到互联网
|
||||
* 具有按笔记粒度的强大的[笔记加密](https://github.com/zadam/trilium/wiki/Protected-notes)
|
||||
* 使用自带的 Excalidraw 来绘制图表(笔记类型“画布”)
|
||||
* [关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map),用于可视化笔记及其关系
|
||||
* [脚本](https://github.com/zadam/trilium/wiki/Scripts)-请参阅[高级展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||
* 可用性和性能均能很好地扩展至超过10万个笔记
|
||||
* 针对智能手机和平板电脑进行触摸优化的[移动前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
|
||||
* [脚本](https://github.com/zadam/trilium/wiki/Scripts) - 请参阅[高级功能展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||
* 在拥有超过 10 万条笔记时仍能保持良好的可用性和性能
|
||||
* 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
|
||||
* [夜间主题](https://github.com/zadam/trilium/wiki/Themes)
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import)和[Markdown导入导出](https://github.com/zadam/trilium/wiki/Markdown)
|
||||
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper)可轻松保存Web内容
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) 和 [Markdown 导入导出](https://github.com/zadam/trilium/wiki/Markdown)功能
|
||||
* 使用[网页剪藏](https://github.com/zadam/trilium/wiki/Web-clipper)轻松保存互联网上的内容
|
||||
|
||||
## 构建
|
||||
|
||||
Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的Web应用程序(Linux)提供的。Mac OS桌面版本可用,但[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
|
||||
Trilium 可以用作桌面应用程序(Linux 和 Windows)或服务器(Linux)上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
|
||||
|
||||
* 如果要在桌面上使用Trilium,请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制[版本](https://github.com/zadam/trilium/releases/latest),解压缩该软件包并运行`trilium`可执行文件。
|
||||
* 如果要在服务器上安装Trilium,请遵循[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
|
||||
* 当前仅支持(经过测试)最新的Chrome和Firefox浏览器。
|
||||
* 如果要在桌面上使用 Trilium,请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。
|
||||
* 如果要在服务器上安装 Trilium,请参考[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
|
||||
* 当前仅支持(测试过)最近发布的 Chrome 和 Firefox 浏览器。
|
||||
|
||||
Trilium 也提供 Flatpak:
|
||||
|
||||
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
|
||||
|
||||
## 文档
|
||||
|
||||
[有关文档页面的完整列表,请参见Wiki。](https://github.com/zadam/trilium/wiki/)
|
||||
[有关文档页面的完整列表,请参见 Wiki。](https://github.com/zadam/trilium/wiki/)
|
||||
|
||||
[中文Wiki在这里](https://github.com/baddate/trilium/wiki/)
|
||||
* [Wiki 的中文翻译版本](https://github.com/baddate/trilium/wiki/)
|
||||
|
||||
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用Trilium的灵感。
|
||||
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用 Trilium 的灵感。
|
||||
|
||||
## 贡献
|
||||
|
||||
@@ -51,7 +59,7 @@ Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的W
|
||||
|
||||
[](https://gitpod.io/#https://github.com/zadam/trilium)
|
||||
|
||||
或在本地克隆并运行
|
||||
或者克隆本仓库到本地,并运行
|
||||
|
||||
```
|
||||
npm install
|
||||
@@ -60,7 +68,15 @@ npm run start-server
|
||||
|
||||
## 致谢
|
||||
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市场上最好的所见即所得编辑器,互动性强且聆听能力强的团队
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大的没有对手。没有它,Trilium Notes将不会如此。
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市面上最好的所见即所得编辑器,拥有互动性强且聆听能力强的团队
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大到没有对手。没有它,Trilium Notes 将不会如此。
|
||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - 支持大量语言的代码编辑器
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb)强大的可视化连接库。- 用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
|
||||
## 捐赠
|
||||
|
||||
你可以通过 GitHub Sponsors,[PayPal](https://paypal.me/za4am) 或者比特币 (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) 来捐赠。
|
||||
|
||||
## 许可证
|
||||
|
||||
本程序是自由软件:你可以再发布本软件和/或修改本软件,只要你遵循 Free Software Foundation 发布的 GNU Affero General Public License 的第三版或者任何(由你选择)更晚的版本。
|
||||
|
||||
83
README.ja.md
Normal file
83
README.ja.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Trilium Notes
|
||||
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md)
|
||||
|
||||
Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://github.com/zadam/trilium/wiki/Screenshot-tour)をご覧ください:
|
||||
|
||||
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
|
||||
|
||||
ウクライナは現在、ロシアの侵略から自国を守っています。[ウクライナ軍や人道的な慈善団体への寄付](https://standforukraine.com/)をご検討ください。
|
||||
|
||||
<p float="left">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
|
||||
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
|
||||
</p>
|
||||
|
||||
## 🎁 特徴
|
||||
|
||||
* ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://github.com/zadam/trilium/wiki/Cloning-notes) を参照)
|
||||
* マークダウン[オートフォーマット](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)による、表、画像、[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)などの豊富な WYSIWYG ノート編集機能
|
||||
* シンタックスハイライトを含む[ソースコード付きノート](https://github.com/zadam/trilium/wiki/Code-notes)の編集をサポート
|
||||
* [ノート間のナビゲーション](https://github.com/zadam/trilium/wiki/Note-navigation)、全文検索、[ノートホイスト](https://github.com/zadam/trilium/wiki/Note-hoisting)が高速かつ簡単に行えます
|
||||
* シームレスな[ノートのバージョン管理](https://github.com/zadam/trilium/wiki/Note-revisions)
|
||||
* ノート[属性](https://github.com/zadam/trilium/wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://github.com/zadam/trilium/wiki/Scripts)に使用できます
|
||||
* 自己ホスト型同期サーバーとの[同期](https://github.com/zadam/trilium/wiki/Synchronization)
|
||||
* [同期サーバーをホストするサードパーティ・サービス](https://trilium.cc/paid-hosting)があります
|
||||
* 公開インターネットへのノートの[共有](https://github.com/zadam/trilium/wiki/Sharing)(公開)
|
||||
* ノートごとの粒度を持つ強力な[ノート暗号化](https://github.com/zadam/trilium/wiki/Protected-notes)
|
||||
* 組み込みの Excalidraw を使用した図のスケッチ (ノート タイプ"キャンバス")
|
||||
* ノートとその関係を可視化するための[関係図](https://github.com/zadam/trilium/wiki/Relation-map)と[リンクマップ](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
* [スクリプティング](https://github.com/zadam/trilium/wiki/Scripts) - [高度なショーケース](https://github.com/zadam/trilium/wiki/Advanced-showcases)を参照
|
||||
* 自動化のための [REST API](https://github.com/zadam/trilium/wiki/ETAPI)
|
||||
* ユーザビリティとパフォーマンスの両方で 100 000 ノート以上に拡張可能
|
||||
* スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://github.com/zadam/trilium/wiki/Mobile-frontend)
|
||||
* [ナイトテーマ](https://github.com/zadam/trilium/wiki/Themes)
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) と [Markdown のインポートとエクスポート](https://github.com/zadam/trilium/wiki/Markdown)
|
||||
* Web コンテンツを簡単に保存するための [Web クリッパー](https://github.com/zadam/trilium/wiki/Web-clipper)
|
||||
|
||||
サードパーティのテーマ、スクリプト、プラグインなどは、 [awesome-trilium](https://github.com/Nriver/awesome-trilium) をチェックしてください。
|
||||
|
||||
## 🏗 ビルド
|
||||
|
||||
Trilium は、デスクトップアプリケーション(Linux、Windows)またはサーバー上でホストされるウェブアプリケーション(Linux)として提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support) となっています。
|
||||
|
||||
* デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/zadam/trilium/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。
|
||||
* サーバーに Trilium をインストールする場合は、[このページ](https://github.com/zadam/trilium/wiki/Server-installation)に従ってください。
|
||||
* 現在、対応(動作確認)しているブラウザは、最近の Chrome と Firefox のみです。
|
||||
|
||||
Trilium は Flatpak としても提供されます:
|
||||
|
||||
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
|
||||
|
||||
## 📝 ドキュメント
|
||||
|
||||
[ドキュメントページの全リストはwikiをご覧ください。](https://github.com/zadam/trilium/wiki/)
|
||||
|
||||
また、[個人的な知識基盤のパターン](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base)を読むと、 Trilium の使い方のヒントを得ることができます。
|
||||
|
||||
## 💻 コントリビュート
|
||||
|
||||
ブラウザベースの開発環境を使用
|
||||
|
||||
[](https://gitpod.io/#https://github.com/zadam/trilium)
|
||||
|
||||
または、ローカルにクローンして実行
|
||||
```
|
||||
npm install
|
||||
npm run start-server
|
||||
```
|
||||
|
||||
## 📢 シャウトアウト
|
||||
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市場で最高の WYSIWYG エディター、非常にインタラクティブで聞き上手なチーム
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - 真の競争相手がいない、非常に機能豊富なツリーライブラリです。 Trilium Notes は、これなしでは成り立たないでしょう。
|
||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - 膨大な数の言語をサポートするコードエディタ
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://github.com/zadam/trilium/wiki/Relation-map)、[リンク図](https://github.com/zadam/trilium/wiki/Link-map)で使用。
|
||||
|
||||
## 🤝 サポート
|
||||
|
||||
GitHub スポンサー、[PayPal](https://paypal.me/za4am)もしくは Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) にて Trilium をサポートすることができます。
|
||||
|
||||
## 🔑 ライセンス
|
||||
|
||||
このプログラムはフリーソフトウェアです:フリーソフトウェア財団が発行した GNU Affero General Public License のバージョン3、またはそれ以降のバージョンのいずれかに従って、再配布および/または改変することができます。
|
||||
28
README.md
28
README.md
@@ -1,17 +1,19 @@
|
||||
# Trilium Notes
|
||||
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
|
||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md)
|
||||
|
||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases. See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
|
||||
|
||||

|
||||
<a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a>
|
||||
|
||||
Ukraine is currently defending itself from Russian aggression, please consider [donating to Ukrainian Army or humanitarian charities](https://standforukraine.com/).
|
||||
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
|
||||
<p float="left">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/>
|
||||
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/>
|
||||
</p>
|
||||
|
||||
## Features
|
||||
## 🎁 Features
|
||||
|
||||
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://github.com/zadam/trilium/wiki/Cloning-notes))
|
||||
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://github.com/zadam/trilium/wiki/Text-notes#math-support) with markdown [autoformat](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)
|
||||
@@ -33,7 +35,9 @@ Ukraine is currently defending itself from Russian aggression, please consider [
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) and [Markdown import & export](https://github.com/zadam/trilium/wiki/Markdown)
|
||||
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) for easy saving of web content
|
||||
|
||||
## Builds
|
||||
Check out [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
|
||||
|
||||
## 🏗 Builds
|
||||
|
||||
Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
|
||||
|
||||
@@ -45,13 +49,13 @@ Trilium is also provided as a Flatpak:
|
||||
|
||||
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
|
||||
|
||||
## Documentation
|
||||
## 📝 Documentation
|
||||
|
||||
[See wiki for complete list of documentation pages.](https://github.com/zadam/trilium/wiki/)
|
||||
|
||||
You can also read [Patterns of personal knowledge base](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base) to get some inspiration on how you might use Trilium.
|
||||
|
||||
## Contribute
|
||||
## 💻 Contribute
|
||||
|
||||
Use a browser based dev environment
|
||||
|
||||
@@ -63,17 +67,17 @@ npm install
|
||||
npm run start-server
|
||||
```
|
||||
|
||||
## Shoutouts
|
||||
## 📢 Shoutouts
|
||||
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
|
||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
|
||||
## Donating
|
||||
## 🤝 Support
|
||||
|
||||
You can donate using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
|
||||
You can support Trilium using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
|
||||
|
||||
## License
|
||||
## 🔑 License
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Trilium Notes
|
||||
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md)
|
||||
|
||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://github.com/zadam/trilium/wiki/Screenshot-tour):
|
||||
@@ -10,6 +10,7 @@ Trilium Notes – это приложение для заметок с иера
|
||||
Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/).
|
||||
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/>
|
||||
<img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/>
|
||||
|
||||
## Возможности
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,18 +5,3 @@ 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
|
||||
|
||||
|
||||
# hacky stop-gag measure to produce debian compatible XZ compressed debs until this is fixed: https://github.com/electron-userland/electron-installer-debian/issues/272
|
||||
cd dist
|
||||
ar x trilium_${VERSION}_amd64.deb
|
||||
rm trilium_${VERSION}_amd64.deb
|
||||
# recompress
|
||||
< control.tar.zst zstd -d | xz > control.tar.xz
|
||||
< data.tar.zst zstd -d | xz > data.tar.xz
|
||||
# create deb archive (I really do not know, what argument "sdsd" is for but something is required for ar to create the archive as desired)
|
||||
ar -m -c -a sdsd trilium_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
||||
|
||||
rm control* data* debian-binary
|
||||
|
||||
echo "Converted to XZ deb"
|
||||
|
||||
@@ -24,12 +24,10 @@ mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR
|
||||
|
||||
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
|
||||
|
||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||
|
||||
cp -r dump-db $BUILD_DIR/
|
||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
||||
|
||||
cp bin/tpl/trilium-portable.sh $BUILD_DIR/
|
||||
chmod 755 $BUILD_DIR/trilium-portable.sh
|
||||
|
||||
@@ -26,6 +26,7 @@ mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR
|
||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||
|
||||
cp -r dump-db $BUILD_DIR/
|
||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
||||
|
||||
echo "Zipping mac x64 electron distribution..."
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PKG_DIR=dist/trilium-linux-x64-server
|
||||
NODE_VERSION=16.18.0
|
||||
NODE_VERSION=18.18.0
|
||||
|
||||
if [ "$1" != "DONTCOPY" ]
|
||||
then
|
||||
@@ -31,6 +31,7 @@ chmod 755 $PKG_DIR/trilium.sh
|
||||
cp bin/tpl/anonymize-database.sql $PKG_DIR/
|
||||
|
||||
cp -r dump-db $PKG_DIR/
|
||||
rm -rf $PKG_DIR/dump-db/node_modules
|
||||
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
|
||||
|
||||
@@ -22,14 +22,12 @@ rm -rf $BUILD_DIR
|
||||
|
||||
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
|
||||
|
||||
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||
|
||||
cp -r dump-db $BUILD_DIR/
|
||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
||||
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
|
||||
|
||||
echo "Zipping windows x64 electron distribution..."
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
|
||||
@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
n exec 16.18.0 npm run webpack
|
||||
n exec 18.18.0 npm run webpack
|
||||
|
||||
DIR=$1
|
||||
|
||||
@@ -14,9 +14,6 @@ mkdir $DIR
|
||||
|
||||
echo "Copying Trilium to build directory $DIR"
|
||||
|
||||
cp -r dump-db $DIR/
|
||||
rm -rf $DIR/dump-db/node_modules
|
||||
|
||||
cp -r images $DIR/
|
||||
cp -r libraries $DIR/
|
||||
cp -r src $DIR/
|
||||
@@ -30,7 +27,7 @@ cp -r electron.js $DIR/
|
||||
cp webpack-* $DIR/
|
||||
|
||||
# run in subshell (so we return to original dir)
|
||||
(cd $DIR && n exec 16.18.0 npm install --only=prod)
|
||||
(cd $DIR && n exec 18.18.0 npm install --only=prod)
|
||||
|
||||
# cleanup of useless files in dependencies
|
||||
rm -r $DIR/node_modules/image-q/demo
|
||||
@@ -48,10 +45,6 @@ find $DIR/node_modules -name demo -exec rm -rf {} \;
|
||||
find $DIR/libraries -name "*.map" -type f -delete
|
||||
|
||||
cp $DIR/src/public/app/share.js $DIR/src/public/app-dist/
|
||||
cp -r $DIR/src/public/app/doc_notes $DIR/src/public/app-dist/
|
||||
|
||||
rm -rf $DIR/src/public/app
|
||||
|
||||
sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs
|
||||
sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs
|
||||
sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' $DIR/src/views/setup.ejs
|
||||
sed -i -e 's/app\/share.js/app-dist\/share.js/g' $DIR/src/views/share/*.ejs
|
||||
|
||||
0
bin/create-anonymization-script.js
Normal file → Executable file
0
bin/create-anonymization-script.js
Normal file → Executable file
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"src": "dist/trilium-linux-x64",
|
||||
"dest": "dist/",
|
||||
"compression": "xz",
|
||||
"name": "trilium",
|
||||
"productName": "Trilium Notes",
|
||||
"genericName": "Note taker",
|
||||
@@ -11,4 +12,4 @@
|
||||
"bin": "trilium",
|
||||
"icon": "dist/trilium-linux-x64/icon.png",
|
||||
"categories": [ "Office" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
SCHEMA_FILE_PATH=db/schema.sql
|
||||
|
||||
sqlite3 ~/trilium-data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
|
||||
sqlite3 ./data/document.db .schema | grep -v "sqlite_sequence" > "$SCHEMA_FILE_PATH"
|
||||
|
||||
echo "DB schema exported to $SCHEMA_FILE_PATH"
|
||||
@@ -1,17 +1,47 @@
|
||||
|
||||
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
|
||||
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', 'hidden', 'share');
|
||||
UPDATE note_contents SET content = 'text' WHERE content IS NOT NULL;
|
||||
UPDATE note_revisions SET title = 'title';
|
||||
UPDATE note_revision_contents SET content = 'text' WHERE content IS NOT NULL;
|
||||
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', '_hidden', '_share');
|
||||
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
|
||||
UPDATE revisions SET title = 'title';
|
||||
|
||||
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
|
||||
AND name NOT IN
|
||||
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
|
||||
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
|
||||
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
|
||||
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
|
||||
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
|
||||
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
|
||||
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
|
||||
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
|
||||
'fullContentWidth', 'shareHiddenFromTree', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
|
||||
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
|
||||
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
|
||||
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
|
||||
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation',
|
||||
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
|
||||
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name' WHERE type = 'relation'
|
||||
AND name NOT IN
|
||||
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
|
||||
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
|
||||
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
|
||||
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
|
||||
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
|
||||
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
|
||||
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
|
||||
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
|
||||
'fullContentWidth', 'shareHiddenFromTree', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
|
||||
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
|
||||
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
|
||||
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
|
||||
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation',
|
||||
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
|
||||
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
|
||||
UPDATE options SET value = 'anonymized' WHERE name IN
|
||||
('documentId', 'documentSecret', 'encryptedDataKey',
|
||||
'passwordVerificationHash', 'passwordVerificationSalt',
|
||||
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
|
||||
AND value != '';
|
||||
('documentId', 'documentSecret', 'encryptedDataKey',
|
||||
'passwordVerificationHash', 'passwordVerificationSalt',
|
||||
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
|
||||
AND value != '';
|
||||
|
||||
VACUUM;
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
set NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-no-cert-check.ps1)
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0
|
||||
./trilium.exe
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-portable.ps1)
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'
|
||||
./trilium.exe
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1; ./trilium.exe --disable-gpu"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_SAFE_MODE=1
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe --disable-gpu) ELSE (powershell.exe ./trilium-safe-mode.ps1)
|
||||
start trilium.exe --disable-gpu
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
|
||||
./trilium.exe --disable-gpu
|
||||
@@ -16,7 +16,7 @@ noBackup=false
|
||||
# host=0.0.0.0
|
||||
# port setting is relevant only for web deployments, desktop builds run on a fixed port (changeable with TRILIUM_PORT environment variable)
|
||||
port=8080
|
||||
# true for TLS/SSL/HTTPS (secure), false for HTTP (unsecure).
|
||||
# true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
|
||||
https=false
|
||||
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
|
||||
certPath=
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
- isDeleted = 0 by default
|
||||
- rename openTabs to openNoteContexts
|
||||
- unify readOnly handling to a single attribute:
|
||||
* readOnly - like now
|
||||
* readOnly=auto - like without readOnly (used to override inherited readOnly)
|
||||
|
||||
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
@@ -1 +0,0 @@
|
||||
module.exports = () => console.log("NOOP, moved to migration 0189");
|
||||
@@ -1,4 +0,0 @@
|
||||
-- black theme has been removed, dark is closest replacement
|
||||
UPDATE options SET value = 'dark' WHERE name = 'theme' AND value = 'black';
|
||||
|
||||
UPDATE options SET value = 'light' WHERE name = 'theme' AND value = 'white';
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE branches DROP COLUMN utcDateCreated;
|
||||
ALTER TABLE options DROP COLUMN utcDateCreated;
|
||||
@@ -1,33 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`entityName` TEXT NOT NULL,
|
||||
`entityId` TEXT NOT NULL,
|
||||
`hash` TEXT NOT NULL,
|
||||
`isErased` INT NOT NULL,
|
||||
`changeId` TEXT NOT NULL,
|
||||
`sourceId` TEXT NOT NULL,
|
||||
`isSynced` INTEGER NOT NULL,
|
||||
`utcDateChanged` TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged)
|
||||
SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes;
|
||||
|
||||
-- delete duplicates https://github.com/zadam/trilium/issues/2534
|
||||
DELETE FROM mig_entity_changes WHERE isErased = 0 AND id IN (
|
||||
SELECT id FROM mig_entity_changes ec
|
||||
WHERE (
|
||||
SELECT COUNT(*) FROM mig_entity_changes
|
||||
WHERE ec.entityName = mig_entity_changes.entityName
|
||||
AND ec.entityId = mig_entity_changes.entityId
|
||||
) > 1
|
||||
);
|
||||
|
||||
DROP TABLE entity_changes;
|
||||
|
||||
ALTER TABLE mig_entity_changes RENAME TO entity_changes;
|
||||
|
||||
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
|
||||
`entityName`,
|
||||
`entityId`
|
||||
);
|
||||
@@ -1,8 +0,0 @@
|
||||
UPDATE branches SET branchId = 'hidden' where branchId = (
|
||||
SELECT branchId FROM branches
|
||||
WHERE parentNoteId = 'root'
|
||||
AND noteId = 'hidden'
|
||||
AND isDeleted = 0
|
||||
ORDER BY utcDateModified
|
||||
LIMIT 1
|
||||
);
|
||||
@@ -1 +0,0 @@
|
||||
DELETE FROM options WHERE name = 'username';
|
||||
@@ -1,15 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS "etapi_tokens"
|
||||
(
|
||||
etapiTokenId TEXT PRIMARY KEY NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
tokenHash TEXT NOT NULL,
|
||||
utcDateCreated TEXT NOT NULL,
|
||||
utcDateModified TEXT NOT NULL,
|
||||
isDeleted INT NOT NULL DEFAULT 0);
|
||||
|
||||
INSERT INTO etapi_tokens (etapiTokenId, name, tokenHash, utcDateCreated, utcDateModified, isDeleted)
|
||||
SELECT apiTokenId, 'Trilium Sender', token, utcDateCreated, utcDateCreated, isDeleted FROM api_tokens;
|
||||
|
||||
DROP TABLE api_tokens;
|
||||
|
||||
UPDATE entity_changes SET entityName = 'etapi_tokens' WHERE entityName = 'api_tokens';
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = () => {
|
||||
const sql = require('../../src/services/sql');
|
||||
const crypto = require('crypto');
|
||||
|
||||
for (const {etapiTokenId, token} of sql.getRows("SELECT etapiTokenId, tokenHash AS token FROM etapi_tokens")) {
|
||||
const tokenHash = crypto.createHash('sha256').update(token).digest('base64');
|
||||
|
||||
sql.execute(`UPDATE etapi_tokens SET tokenHash = ? WHERE etapiTokenId = ?`, [tokenHash, etapiTokenId]);
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
|
||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`entityName` TEXT NOT NULL,
|
||||
`entityId` TEXT NOT NULL,
|
||||
`hash` TEXT NOT NULL,
|
||||
`isErased` INT NOT NULL,
|
||||
`changeId` TEXT NOT NULL,
|
||||
`componentId` TEXT NOT NULL,
|
||||
`instanceId` TEXT NOT NULL,
|
||||
`isSynced` INTEGER NOT NULL,
|
||||
`utcDateChanged` TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, componentId, instanceId, isSynced, utcDateChanged)
|
||||
SELECT id, entityName, entityId, hash, isErased, changeId, '', '', isSynced, utcDateChanged FROM entity_changes;
|
||||
|
||||
DROP TABLE entity_changes;
|
||||
|
||||
ALTER TABLE mig_entity_changes RENAME TO entity_changes;
|
||||
|
||||
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
|
||||
`entityName`,
|
||||
`entityId`
|
||||
);
|
||||
@@ -1 +0,0 @@
|
||||
CREATE INDEX `IDX_entity_changes_changeId` ON `entity_changes` (`changeId`);
|
||||
@@ -1,15 +0,0 @@
|
||||
const becca = require('../../src/becca/becca');
|
||||
const beccaLoader = require('../../src/becca/becca_loader');
|
||||
const cls = require('../../src/services/cls');
|
||||
|
||||
module.exports = () => {
|
||||
cls.init(() => {
|
||||
beccaLoader.load();
|
||||
|
||||
for (const note of Object.values(becca.notes)) {
|
||||
if (note.hasLabel('calendarRoot')) {
|
||||
note.addLabel('excludeFromNoteMap', "", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
-- removing potential remnants of recent notes in entity changes, see https://github.com/zadam/trilium/issues/2842
|
||||
DELETE FROM entity_changes WHERE entityName = 'recent_notes';
|
||||
@@ -1,2 +0,0 @@
|
||||
UPDATE attributes SET value = replace(value, 'setLabelValue', 'updateLabelValue') WHERE name = 'action' AND type = 'label';
|
||||
UPDATE attributes SET value = replace(value, 'setRelationTarget', 'updateRelationTarget') WHERE name = 'action' AND type = 'label';
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = () => console.log("NOOP, increased because of protected notes IV change");
|
||||
10
db/migrations/0215__content_structure.sql
Normal file
10
db/migrations/0215__content_structure.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS "blobs" (
|
||||
`blobId` TEXT NOT NULL,
|
||||
`content` TEXT NULL DEFAULT NULL,
|
||||
`dateModified` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
PRIMARY KEY(`blobId`)
|
||||
);
|
||||
|
||||
ALTER TABLE notes ADD blobId TEXT DEFAULT NULL;
|
||||
ALTER TABLE note_revisions ADD blobId TEXT DEFAULT NULL;
|
||||
62
db/migrations/0216__move_content_into_blobs.js
Normal file
62
db/migrations/0216__move_content_into_blobs.js
Normal file
@@ -0,0 +1,62 @@
|
||||
module.exports = () => {
|
||||
const sql = require("../../src/services/sql");
|
||||
const utils = require("../../src/services/utils");
|
||||
|
||||
const existingBlobIds = new Set();
|
||||
|
||||
for (const noteId of sql.getColumn(`SELECT noteId FROM note_contents`)) {
|
||||
const row = sql.getRow(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
|
||||
const blobId = utils.hashedBlobId(row.content);
|
||||
|
||||
if (!existingBlobIds.has(blobId)) {
|
||||
existingBlobIds.add(blobId);
|
||||
|
||||
sql.insert('blobs', {
|
||||
blobId,
|
||||
content: row.content,
|
||||
dateModified: row.dateModified,
|
||||
utcDateModified: row.utcDateModified
|
||||
});
|
||||
|
||||
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_contents' AND entityId = ?", [blobId, row.noteId]);
|
||||
} else {
|
||||
// duplicates
|
||||
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_contents' AND entityId = ?", [row.noteId]);
|
||||
}
|
||||
|
||||
sql.execute('UPDATE notes SET blobId = ? WHERE noteId = ?', [blobId, row.noteId]);
|
||||
}
|
||||
|
||||
for (const noteRevisionId of sql.getColumn(`SELECT noteRevisionId FROM note_revision_contents`)) {
|
||||
const row = sql.getRow(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
|
||||
const blobId = utils.hashedBlobId(row.content);
|
||||
|
||||
if (!existingBlobIds.has(blobId)) {
|
||||
existingBlobIds.add(blobId);
|
||||
|
||||
sql.insert('blobs', {
|
||||
blobId,
|
||||
content: row.content,
|
||||
dateModified: row.utcDateModified,
|
||||
utcDateModified: row.utcDateModified
|
||||
});
|
||||
|
||||
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_revision_contents' AND entityId = ?", [blobId, row.noteRevisionId]);
|
||||
} else {
|
||||
// duplicates
|
||||
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteId]);
|
||||
}
|
||||
|
||||
sql.execute('UPDATE note_revisions SET blobId = ? WHERE noteRevisionId = ?', [blobId, row.noteRevisionId]);
|
||||
}
|
||||
|
||||
const notesWithoutBlobIds = sql.getColumn("SELECT noteId FROM notes WHERE blobId IS NULL");
|
||||
if (notesWithoutBlobIds.length > 0) {
|
||||
throw new Error("BlobIds were not filled correctly in notes: " + JSON.stringify(notesWithoutBlobIds));
|
||||
}
|
||||
|
||||
const noteRevisionsWithoutBlobIds = sql.getColumn("SELECT noteRevisionId FROM note_revisions WHERE blobId IS NULL");
|
||||
if (noteRevisionsWithoutBlobIds.length > 0) {
|
||||
throw new Error("BlobIds were not filled correctly in note revisions: " + JSON.stringify(noteRevisionsWithoutBlobIds));
|
||||
}
|
||||
};
|
||||
4
db/migrations/0217__drop_content_tables.sql
Normal file
4
db/migrations/0217__drop_content_tables.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DROP TABLE note_contents;
|
||||
DROP TABLE note_revision_contents;
|
||||
|
||||
DELETE FROM entity_changes WHERE entityName IN ('note_contents', 'note_revision_contents');
|
||||
25
db/migrations/0218__rename_note_revision_to_revision.sql
Normal file
25
db/migrations/0218__rename_note_revision_to_revision.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
CREATE TABLE IF NOT EXISTS "revisions" (`revisionId` TEXT NOT NULL PRIMARY KEY,
|
||||
`noteId` TEXT NOT NULL,
|
||||
type TEXT DEFAULT '' NOT NULL,
|
||||
mime TEXT DEFAULT '' NOT NULL,
|
||||
`title` TEXT NOT NULL,
|
||||
`isProtected` INT NOT NULL DEFAULT 0,
|
||||
blobId TEXT DEFAULT NULL,
|
||||
`utcDateLastEdited` TEXT NOT NULL,
|
||||
`utcDateCreated` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
`dateLastEdited` TEXT NOT NULL,
|
||||
`dateCreated` TEXT NOT NULL);
|
||||
|
||||
INSERT INTO revisions (revisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, blobId)
|
||||
SELECT noteRevisionId, noteId, type, mime, title, isProtected, utcDateLastEdited, utcDateCreated, utcDateModified, dateLastEdited, dateCreated, blobId FROM note_revisions;
|
||||
|
||||
DROP TABLE note_revisions;
|
||||
|
||||
CREATE INDEX `IDX_revisions_noteId` ON `revisions` (`noteId`);
|
||||
CREATE INDEX `IDX_revisions_utcDateCreated` ON `revisions` (`utcDateCreated`);
|
||||
CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEdited`);
|
||||
CREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);
|
||||
CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);
|
||||
|
||||
UPDATE entity_changes SET entityName = 'revisions' WHERE entityName = 'note_revisions';
|
||||
21
db/migrations/0219__attachments.sql
Normal file
21
db/migrations/0219__attachments.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
CREATE TABLE IF NOT EXISTS "attachments"
|
||||
(
|
||||
attachmentId TEXT not null primary key,
|
||||
ownerId TEXT not null,
|
||||
role TEXT not null,
|
||||
mime TEXT not null,
|
||||
title TEXT not null,
|
||||
isProtected INT not null DEFAULT 0,
|
||||
position INT default 0 not null,
|
||||
blobId TEXT DEFAULT null,
|
||||
dateModified TEXT NOT NULL,
|
||||
utcDateModified TEXT not null,
|
||||
utcDateScheduledForErasureSince TEXT DEFAULT NULL,
|
||||
isDeleted INT not null,
|
||||
deleteId TEXT DEFAULT NULL);
|
||||
|
||||
CREATE INDEX IDX_attachments_ownerId_role
|
||||
on attachments (ownerId, role);
|
||||
|
||||
CREATE INDEX IDX_attachments_utcDateScheduledForErasureSince
|
||||
on attachments (utcDateScheduledForErasureSince);
|
||||
23
db/migrations/0220__migrate_images_to_attachments.js
Normal file
23
db/migrations/0220__migrate_images_to_attachments.js
Normal file
@@ -0,0 +1,23 @@
|
||||
module.exports = () => {
|
||||
const beccaLoader = require("../../src/becca/becca_loader");
|
||||
const becca = require("../../src/becca/becca");
|
||||
const cls = require("../../src/services/cls");
|
||||
const log = require("../../src/services/log");
|
||||
|
||||
cls.init(() => {
|
||||
beccaLoader.load();
|
||||
|
||||
for (const note of Object.values(becca.notes)) {
|
||||
try {
|
||||
const attachment = note.convertToParentAttachment({autoConversion: true});
|
||||
|
||||
if (attachment) {
|
||||
log.info(`Auto-converted note '${note.noteId}' into attachment '${attachment.attachmentId}'.`);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
log.error(`Cannot convert note '${note.noteId}' to attachment: ${e.message} ${e.stack}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
DELETE FROM options WHERE name = 'hideIncludedImages_main';
|
||||
DELETE FROM entity_changes WHERE entityName = 'options' AND entityId = 'hideIncludedImages_main';
|
||||
@@ -0,0 +1,2 @@
|
||||
UPDATE options SET name = 'openNoteContexts' WHERE name = 'openTabs';
|
||||
UPDATE entity_changes SET entityId = 'openNoteContexts' WHERE entityName = 'options' AND entityId = 'openTabs';
|
||||
1
db/migrations/0223__NOOP.sql
Normal file
1
db/migrations/0223__NOOP.sql
Normal file
@@ -0,0 +1 @@
|
||||
SELECT 1;
|
||||
14
db/migrations/0224__fix_blobIds.sql
Normal file
14
db/migrations/0224__fix_blobIds.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'X');
|
||||
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'Y');
|
||||
|
||||
UPDATE notes SET blobId = REPLACE(blobId, '+', 'X');
|
||||
UPDATE notes SET blobId = REPLACE(blobId, '/', 'Y');
|
||||
|
||||
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'X');
|
||||
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'Y');
|
||||
|
||||
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'X');
|
||||
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'Y');
|
||||
|
||||
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'X') WHERE entityName = 'blobs';
|
||||
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'Y') WHERE entityName = 'blobs';
|
||||
3
db/migrations/0225__create_blobId_indices.sql
Normal file
3
db/migrations/0225__create_blobId_indices.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
CREATE INDEX IF NOT EXISTS IDX_notes_blobId on notes (blobId);
|
||||
CREATE INDEX IF NOT EXISTS IDX_revisions_blobId on revisions (blobId);
|
||||
CREATE INDEX IF NOT EXISTS IDX_attachments_blobId on attachments (blobId);
|
||||
1
db/migrations/0226__rename_noteSize_label.sql
Normal file
1
db/migrations/0226__rename_noteSize_label.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE attributes SET value = 'contentAndAttachmentsAndRevisionsSize' WHERE name = 'orderBy' AND value = 'noteSize';
|
||||
@@ -35,6 +35,7 @@ CREATE TABLE IF NOT EXISTS "notes" (
|
||||
`isProtected` INT NOT NULL DEFAULT 0,
|
||||
`type` TEXT NOT NULL DEFAULT 'text',
|
||||
`mime` TEXT NOT NULL DEFAULT 'text/html',
|
||||
blobId TEXT DEFAULT NULL,
|
||||
`isDeleted` INT NOT NULL DEFAULT 0,
|
||||
`deleteId` TEXT DEFAULT NULL,
|
||||
`dateCreated` TEXT NOT NULL,
|
||||
@@ -42,27 +43,18 @@ CREATE TABLE IF NOT EXISTS "notes" (
|
||||
`utcDateCreated` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
PRIMARY KEY(`noteId`));
|
||||
CREATE TABLE IF NOT EXISTS "note_contents" (
|
||||
`noteId` TEXT NOT NULL,
|
||||
`content` TEXT NULL DEFAULT NULL,
|
||||
`dateModified` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
PRIMARY KEY(`noteId`)
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS "note_revisions" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
|
||||
CREATE TABLE IF NOT EXISTS "revisions" (`revisionId` TEXT NOT NULL PRIMARY KEY,
|
||||
`noteId` TEXT NOT NULL,
|
||||
type TEXT DEFAULT '' NOT NULL,
|
||||
mime TEXT DEFAULT '' NOT NULL,
|
||||
`title` TEXT NOT NULL,
|
||||
`isProtected` INT NOT NULL DEFAULT 0,
|
||||
blobId TEXT DEFAULT NULL,
|
||||
`utcDateLastEdited` TEXT NOT NULL,
|
||||
`utcDateCreated` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
`dateLastEdited` TEXT NOT NULL,
|
||||
`dateCreated` TEXT NOT NULL);
|
||||
CREATE TABLE IF NOT EXISTS "note_revision_contents" (`noteRevisionId` TEXT NOT NULL PRIMARY KEY,
|
||||
`content` TEXT,
|
||||
`utcDateModified` TEXT NOT NULL);
|
||||
CREATE TABLE IF NOT EXISTS "options"
|
||||
(
|
||||
name TEXT not null PRIMARY KEY,
|
||||
@@ -94,11 +86,11 @@ CREATE INDEX `IDX_notes_dateCreated` ON `notes` (`dateCreated`);
|
||||
CREATE INDEX `IDX_notes_dateModified` ON `notes` (`dateModified`);
|
||||
CREATE INDEX `IDX_notes_utcDateModified` ON `notes` (`utcDateModified`);
|
||||
CREATE INDEX `IDX_notes_utcDateCreated` ON `notes` (`utcDateCreated`);
|
||||
CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` (`noteId`);
|
||||
CREATE INDEX `IDX_note_revisions_utcDateCreated` ON `note_revisions` (`utcDateCreated`);
|
||||
CREATE INDEX `IDX_note_revisions_utcDateLastEdited` ON `note_revisions` (`utcDateLastEdited`);
|
||||
CREATE INDEX `IDX_note_revisions_dateCreated` ON `note_revisions` (`dateCreated`);
|
||||
CREATE INDEX `IDX_note_revisions_dateLastEdited` ON `note_revisions` (`dateLastEdited`);
|
||||
CREATE INDEX `IDX_revisions_noteId` ON `revisions` (`noteId`);
|
||||
CREATE INDEX `IDX_revisions_utcDateCreated` ON `revisions` (`utcDateCreated`);
|
||||
CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEdited`);
|
||||
CREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);
|
||||
CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);
|
||||
CREATE INDEX `IDX_entity_changes_changeId` ON `entity_changes` (`changeId`);
|
||||
CREATE INDEX IDX_attributes_name_value
|
||||
on attributes (name, value);
|
||||
@@ -112,3 +104,31 @@ CREATE TABLE IF NOT EXISTS "recent_notes"
|
||||
notePath TEXT not null,
|
||||
utcDateCreated TEXT not null
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS "blobs" (
|
||||
`blobId` TEXT NOT NULL,
|
||||
`content` TEXT NULL DEFAULT NULL,
|
||||
`dateModified` TEXT NOT NULL,
|
||||
`utcDateModified` TEXT NOT NULL,
|
||||
PRIMARY KEY(`blobId`)
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS "attachments"
|
||||
(
|
||||
attachmentId TEXT not null primary key,
|
||||
ownerId TEXT not null,
|
||||
role TEXT not null,
|
||||
mime TEXT not null,
|
||||
title TEXT not null,
|
||||
isProtected INT not null DEFAULT 0,
|
||||
position INT default 0 not null,
|
||||
blobId TEXT DEFAULT null,
|
||||
dateModified TEXT NOT NULL,
|
||||
utcDateModified TEXT not null,
|
||||
utcDateScheduledForErasureSince TEXT DEFAULT NULL,
|
||||
isDeleted INT not null,
|
||||
deleteId TEXT DEFAULT NULL);
|
||||
CREATE INDEX IDX_attachments_ownerId_role
|
||||
on attachments (ownerId, role);
|
||||
|
||||
CREATE INDEX IDX_notes_blobId on notes (blobId);
|
||||
CREATE INDEX IDX_revisions_blobId on revisions (blobId);
|
||||
CREATE INDEX IDX_attachments_blobId on attachments (blobId);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Running `docker-compose up` will create/use the "trilium-data" directory in the user home
|
||||
# Run `TRILIUM_DATA_DIR=/path/of/your/choice docker-compose up` to set a different directory
|
||||
version: '2.1'
|
||||
services:
|
||||
trilium:
|
||||
@@ -8,7 +10,7 @@ services:
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- trilium:/home/node/trilium-data
|
||||
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
|
||||
|
||||
volumes:
|
||||
trilium:
|
||||
|
||||
42
docker_healthcheck.js
Executable file
42
docker_healthcheck.js
Executable file
@@ -0,0 +1,42 @@
|
||||
const http = require("http");
|
||||
const ini = require("ini");
|
||||
const fs = require("fs");
|
||||
const dataDir = require("./src/services/data_dir");
|
||||
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
|
||||
|
||||
if (config.Network.https) {
|
||||
// built-in TLS (terminated by trilium) is not supported yet, PRs are welcome
|
||||
// for reverse proxy terminated TLS this will works since config.https will be false
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const port = require('./src/services/port');
|
||||
const host = require('./src/services/host');
|
||||
|
||||
const options = { timeout: 2000 };
|
||||
|
||||
const callback = res => {
|
||||
console.log(`STATUS: ${res.statusCode}`);
|
||||
if (res.statusCode === 200) {
|
||||
process.exit(0);
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
let request;
|
||||
|
||||
if (port !== 0) { // TCP socket.
|
||||
const url = `http://${host}:${port}/api/health-check`;
|
||||
request = http.request(url, options, callback);
|
||||
} else { // Unix socket.
|
||||
options.socketPath = host;
|
||||
options.path = '/api/health-check';
|
||||
request = http.request(options, callback);
|
||||
}
|
||||
|
||||
request.on("error", err => {
|
||||
console.log("ERROR");
|
||||
process.exit(1);
|
||||
});
|
||||
request.end();
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: AbstractEntity</title>
|
||||
<title>JSDoc: Class: AbstractBeccaEntity</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: AbstractEntity</h1>
|
||||
<h1 class="page-title">Class: AbstractBeccaEntity</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>AbstractEntity<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>AbstractBeccaEntity<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Base class for all backend entities.</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="AbstractEntity"><span class="type-signature"></span>new AbstractEntity<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="AbstractBeccaEntity"><span class="type-signature"></span>new AbstractBeccaEntity<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line16">line 16</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -259,7 +259,112 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><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="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -343,7 +448,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -427,7 +532,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -511,7 +616,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -595,7 +700,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -679,7 +784,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -725,7 +830,7 @@
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -833,7 +938,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -869,7 +974,91 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><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="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -921,7 +1110,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -957,7 +1146,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -985,13 +1174,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
2876
docs/backend_api/BAttachment.html
Normal file
2876
docs/backend_api/BAttachment.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Attribute</title>
|
||||
<title>JSDoc: Class: BAttribute</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: Attribute</h1>
|
||||
<h1 class="page-title">Class: BAttribute</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BAttribute<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
and relation (representing named relationship between source and target note)</div>
|
||||
@@ -46,7 +46,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BAttribute"><span class="type-signature"></span>new BAttribute<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line15">line 15</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line16">line 16</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line46">line 46</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line58">line 58</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line52">line 52</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line53">line 53</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line48">line 48</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line49">line 49</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line54">line 54</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -608,7 +608,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line60">line 60</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line61">line 61</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -744,7 +744,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line56">line 56</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -772,7 +772,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -802,7 +802,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -825,7 +825,117 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -891,7 +1001,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -914,7 +1024,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -980,7 +1090,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1003,7 +1113,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1069,7 +1179,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1092,7 +1202,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1128,7 +1238,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>
|
||||
<h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="BNote.html">BNote</a>|null}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1176,7 +1286,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line115">line 115</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line129">line 129</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1212,7 +1322,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Note.html">Note</a></span>
|
||||
<span class="param-type"><a href="BNote.html">BNote</a></span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
@@ -1263,7 +1373,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1286,7 +1396,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1322,7 +1432,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getTargetNote"><span class="type-signature"></span>getTargetNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>
|
||||
<h4 class="name" id="getTargetNote"><span class="type-signature"></span>getTargetNote<span class="signature">()</span><span class="type-signature"> → {<a href="BNote.html">BNote</a>|null}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1370,7 +1480,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line122">line 122</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line142">line 142</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1406,7 +1516,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Note.html">Note</a></span>
|
||||
<span class="param-type"><a href="BNote.html">BNote</a></span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
@@ -1457,7 +1567,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1480,7 +1590,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1564,7 +1674,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line137">line 137</a>
|
||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line157">line 157</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1628,7 +1738,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1718,7 +1828,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1741,7 +1851,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1777,7 +1887,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1811,7 +2010,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1834,7 +2033,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1870,7 +2069,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1898,13 +2097,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Branch</title>
|
||||
<title>JSDoc: Class: BBranch</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: Branch</h1>
|
||||
<h1 class="page-title">Class: BBranch</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,10 +28,13 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BBranch<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
parents.</div>
|
||||
parents.
|
||||
|
||||
Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||
Always check noteId instead.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -46,7 +49,7 @@ parents.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="Branch"><span class="type-signature"></span>new Branch<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BBranch"><span class="type-signature"></span>new BBranch<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -94,7 +97,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -134,7 +137,7 @@ parents.</div>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -177,7 +180,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -200,7 +203,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -268,7 +271,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line49">line 49</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -326,7 +329,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line95">line 95</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line97">line 97</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -394,7 +397,73 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line61">line 61</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isWeak"><span class="type-signature"></span>isWeak<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Branch is weak when its existence should not hinder deletion of its note.
|
||||
As a result, note with only weak branches should be immediately deleted.
|
||||
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
|
||||
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
|
||||
of deletion should not act as a clone.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line134">line 134</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -462,7 +531,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line51">line 51</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line53">line 53</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -530,7 +599,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line57">line 57</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -588,7 +657,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line109">line 109</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line112">line 112</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -656,7 +725,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line53">line 53</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -674,7 +743,7 @@ parents.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string</span></h4>
|
||||
<h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string|null</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -686,6 +755,9 @@ parents.</div>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -724,7 +796,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line55">line 55</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -792,7 +864,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line61">line 61</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line63">line 63</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -820,7 +892,7 @@ parents.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -850,7 +922,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -873,7 +945,117 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -939,7 +1121,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -962,7 +1144,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1144,7 +1326,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line130">line 130</a>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line146">line 146</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1232,7 +1414,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1255,7 +1437,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1321,7 +1503,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1344,7 +1526,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1374,6 +1556,108 @@ parents.</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="BNote.html">BNote</a>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line107">line 107</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="BNote.html">BNote</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1410,7 +1694,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1433,7 +1717,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1499,7 +1783,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1522,7 +1806,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1568,7 +1852,7 @@ parents.</div>
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1658,7 +1942,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1681,7 +1965,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1717,7 +2001,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1751,7 +2124,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1774,7 +2147,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1810,7 +2183,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1838,13 +2211,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Option</title>
|
||||
<title>JSDoc: Class: BEtapiToken</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: Option</h1>
|
||||
<h1 class="page-title">Class: BEtapiToken</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,15 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Option<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BEtapiToken<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Option represents name-value pair, either directly configurable by the user or some system property.</div>
|
||||
<div class="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
|
||||
Used by:
|
||||
- Trilium Sender
|
||||
- ETAPI clients
|
||||
|
||||
The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
|
||||
from tokenHash and token.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -45,7 +51,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="Option"><span class="type-signature"></span>new Option<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BEtapiToken"><span class="type-signature"></span>new BEtapiToken<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +99,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line11">line 11</a>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line17">line 17</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -133,7 +139,7 @@
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -176,7 +182,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -199,7 +205,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -217,7 +223,75 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isSynced"><span class="type-signature"></span>isSynced<span class="type-signature"> :boolean</span></h4>
|
||||
<h4 class="name" id="etapiTokenId"><span class="type-signature"></span>etapiTokenId<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line35">line 35</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isDeleted"><span class="type-signature"></span>isDeleted<span class="type-signature"> :boolean</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -267,7 +341,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line24">line 24</a>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -335,7 +409,143 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line20">line 20</a>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line37">line 37</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="tokenHash"><span class="type-signature"></span>tokenHash<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line39">line 39</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -403,75 +613,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line26">line 26</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line22">line 22</a>
|
||||
<a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line43">line 43</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -499,7 +641,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -529,7 +671,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -552,7 +694,117 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -618,7 +870,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -641,7 +893,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -707,7 +959,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -730,7 +982,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -796,7 +1048,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -819,7 +1071,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -885,7 +1137,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -908,7 +1160,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -974,7 +1226,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -997,7 +1249,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1043,7 +1295,7 @@
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1133,7 +1385,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1156,7 +1408,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1192,7 +1444,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1226,7 +1567,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1249,7 +1590,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1285,7 +1626,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1313,13 +1654,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: EtapiToken</title>
|
||||
<title>JSDoc: Class: BOption</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: EtapiToken</h1>
|
||||
<h1 class="page-title">Class: BOption</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,15 +28,9 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>EtapiToken<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BOption<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
|
||||
Used by:
|
||||
- Trilium Sender
|
||||
- ETAPI clients
|
||||
|
||||
The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
|
||||
from tokenHash and token.</div>
|
||||
<div class="class-description">Option represents a name-value pair, either directly configurable by the user or some system property.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -51,7 +45,7 @@ from tokenHash and token.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="EtapiToken"><span class="type-signature"></span>new EtapiToken<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BOption"><span class="type-signature"></span>new BOption<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -99,7 +93,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line17">line 17</a>
|
||||
<a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line11">line 11</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -139,7 +133,7 @@ from tokenHash and token.</div>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -182,7 +176,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -205,7 +199,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -223,75 +217,7 @@ from tokenHash and token.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="etapiTokenId"><span class="type-signature"></span>etapiTokenId<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line35">line 35</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isDeleted"><span class="type-signature"></span>isDeleted<span class="type-signature"> :boolean</span></h4>
|
||||
<h4 class="name" id="isSynced"><span class="type-signature"></span>isSynced<span class="type-signature"> :boolean</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -341,7 +267,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line29">line 29</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -409,143 +335,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line37">line 37</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="tokenHash"><span class="type-signature"></span>tokenHash<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line39">line 39</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line41">line 41</a>
|
||||
<a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -613,7 +403,75 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_etapi_token.js.html">becca/entities/etapi_token.js</a>, <a href="becca_entities_etapi_token.js.html#line43">line 43</a>
|
||||
<a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line31">line 31</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line27">line 27</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -641,7 +499,7 @@ from tokenHash and token.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -671,7 +529,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -694,7 +552,117 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -760,7 +728,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -783,7 +751,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -849,7 +817,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -872,7 +840,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -938,7 +906,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -961,7 +929,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1027,7 +995,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1050,7 +1018,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1116,7 +1084,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1139,7 +1107,7 @@ from tokenHash and token.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1185,7 +1153,7 @@ from tokenHash and token.</div>
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1275,7 +1243,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1298,7 +1266,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1334,7 +1302,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1368,7 +1425,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1391,7 +1448,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1427,7 +1484,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1455,13 +1512,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: RecentNote</title>
|
||||
<title>JSDoc: Class: BRecentNote</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: RecentNote</h1>
|
||||
<h1 class="page-title">Class: BRecentNote</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>RecentNote<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BRecentNote<span class="signature">()</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">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BRecentNote"><span class="type-signature"></span>new BRecentNote<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line11">line 11</a>
|
||||
<a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line11">line 11</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line19">line 19</a>
|
||||
<a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line19">line 19</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line21">line 21</a>
|
||||
<a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line21">line 21</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line23">line 23</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -484,7 +484,117 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -550,7 +660,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -573,7 +683,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -639,7 +749,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -662,7 +772,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -728,7 +838,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -751,7 +861,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -817,7 +927,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -840,7 +950,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -906,7 +1016,7 @@
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -929,7 +1039,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -975,7 +1085,7 @@
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1065,7 +1175,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1088,7 +1198,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1124,7 +1234,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1158,7 +1357,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1181,7 +1380,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1217,7 +1416,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1245,13 +1444,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: NoteRevision</title>
|
||||
<title>JSDoc: Class: BRevision</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Class: NoteRevision</h1>
|
||||
<h1 class="page-title">Class: BRevision</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
<header>
|
||||
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>BRevision<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">NoteRevision represents snapshot of note's title and content at some point in the past.
|
||||
<div class="class-description">Revision represents a snapshot of note's title and content at some point in the past.
|
||||
It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="NoteRevision"><span class="type-signature"></span>new NoteRevision<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="BRevision"><span class="type-signature"></span>new BRevision<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line17">line 17</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line17">line 17</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="AbstractEntity.html">AbstractEntity</a></li>
|
||||
<li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#becca">AbstractEntity#becca</a>
|
||||
<a href="AbstractBeccaEntity.html#becca">AbstractBeccaEntity#becca</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"> :number</span></h4>
|
||||
<h4 class="name" id="blobId"><span class="type-signature"></span>blobId<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ It's used for seamless note versioning.</div>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">number</span>
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
</li>
|
||||
@@ -268,7 +268,75 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line48">line 48</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line39">line 39</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"> :int</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">int</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -336,7 +404,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line40">line 40</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line43">line 43</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -404,7 +472,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line38">line 38</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -472,7 +540,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line34">line 34</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line35">line 35</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -540,7 +608,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line32">line 32</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line33">line 33</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -608,7 +676,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line28">line 28</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line29">line 29</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -626,7 +694,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="noteRevisionId"><span class="type-signature"></span>noteRevisionId<span class="type-signature"> :string</span></h4>
|
||||
<h4 class="name" id="revisionId"><span class="type-signature"></span>revisionId<span class="type-signature"> :string</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -676,7 +744,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line26">line 26</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line27">line 27</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -744,7 +812,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line36">line 36</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line37">line 37</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -812,7 +880,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line31">line 31</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -880,7 +948,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line44">line 44</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -948,7 +1016,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line42">line 42</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1016,7 +1084,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line46">line 46</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line49">line 49</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1044,7 +1112,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="_getContent"><span class="type-signature">(protected) </span>_getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1074,7 +1142,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>
|
||||
<a href="AbstractBeccaEntity.html#_getContent">AbstractBeccaEntity#_getContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1097,7 +1165,117 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line246">line 246</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="_setContent"><span class="type-signature">(protected) </span>_setContent<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#_setContent">AbstractBeccaEntity#_setContent</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1163,7 +1341,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>
|
||||
<a href="AbstractBeccaEntity.html#beforeSaving">AbstractBeccaEntity#beforeSaving</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1186,7 +1364,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1252,7 +1430,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>
|
||||
<a href="AbstractBeccaEntity.html#generateHash">AbstractBeccaEntity#generateHash</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1275,7 +1453,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1341,7 +1519,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>
|
||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1364,7 +1542,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1400,7 +1578,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
|
||||
<h4 class="name" id="getAttachments"><span class="type-signature"></span>getAttachments<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BAttachment.html">BAttachment</a>>}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1448,7 +1626,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line76">line 76</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line99">line 99</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1484,7 +1662,7 @@ It's used for seamless note versioning.</div>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">*</span>
|
||||
<span class="param-type">Array.<<a href="BAttachment.html">BAttachment</a>></span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1502,7 +1680,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
|
||||
<h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {string|Buffer}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1550,7 +1728,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line140">line 140</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1586,7 +1764,10 @@ It's used for seamless note versioning.</div>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">Object</span>
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">Buffer</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -1634,7 +1815,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>
|
||||
<a href="AbstractBeccaEntity.html#getPojoToSave">AbstractBeccaEntity#getPojoToSave</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1657,7 +1838,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1723,7 +1904,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>
|
||||
<a href="AbstractBeccaEntity.html#getUtcDateChanged">AbstractBeccaEntity#getUtcDateChanged</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1746,7 +1927,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1782,7 +1963,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isStringNote"><span class="type-signature"></span>isStringNote<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
||||
<h4 class="name" id="hasStringContent"><span class="type-signature"></span>hasStringContent<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1830,7 +2011,7 @@ It's used for seamless note versioning.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line62">line 62</a>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line65">line 65</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1898,7 +2079,7 @@ It's used for seamless note versioning.</div>
|
||||
<div class="description">
|
||||
Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
|
||||
This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1988,7 +2169,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#markAsDeleted">AbstractEntity#markAsDeleted</a>
|
||||
<a href="AbstractBeccaEntity.html#markAsDeleted">AbstractBeccaEntity#markAsDeleted</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2011,7 +2192,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line263">line 263</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2047,7 +2228,96 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="AbstractEntity.html">AbstractEntity</a>}</span></h4>
|
||||
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {this}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -2081,7 +2351,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="AbstractEntity.html#save">AbstractEntity#save</a>
|
||||
<a href="AbstractBeccaEntity.html#save">AbstractBeccaEntity#save</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2104,7 +2374,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2140,7 +2410,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="AbstractEntity.html">AbstractEntity</a></span>
|
||||
<span class="param-type">this</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -2152,6 +2422,246 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="setContent"><span class="type-signature"></span>setContent<span class="signature">(content, opts<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
<th>Attributes</th>
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>content</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>opts</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<h6>Properties</h6>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
<th>Attributes</th>
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>forceSave</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
false
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">will also save this BRevision entity</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_brevision.js.html">becca/entities/brevision.js</a>, <a href="becca_entities_brevision.js.html#line94">line 94</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2168,13 +2678,13 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
File diff suppressed because it is too large
Load Diff
356
docs/backend_api/becca_entities_abstract_becca_entity.js.html
Normal file
356
docs/backend_api/becca_entities_abstract_becca_entity.js.html
Normal file
@@ -0,0 +1,356 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/abstract_becca_entity.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/abstract_becca_entity.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const utils = require('../../services/utils');
|
||||
const sql = require('../../services/sql');
|
||||
const entityChangesService = require('../../services/entity_changes');
|
||||
const eventService = require("../../services/events");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const cls = require("../../services/cls");
|
||||
const log = require("../../services/log");
|
||||
const protectedSessionService = require("../../services/protected_session");
|
||||
const blobService = require("../../services/blob");
|
||||
|
||||
let becca = null;
|
||||
|
||||
/**
|
||||
* Base class for all backend entities.
|
||||
*/
|
||||
class AbstractBeccaEntity {
|
||||
/** @protected */
|
||||
beforeSaving() {
|
||||
this.generateIdIfNecessary();
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
generateIdIfNecessary() {
|
||||
if (!this[this.constructor.primaryKeyName]) {
|
||||
this[this.constructor.primaryKeyName] = utils.newEntityId();
|
||||
}
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
generateHash(isDeleted = false) {
|
||||
let contentToHash = "";
|
||||
|
||||
for (const propertyName of this.constructor.hashedProperties) {
|
||||
contentToHash += `|${this[propertyName]}`;
|
||||
}
|
||||
|
||||
if (isDeleted) {
|
||||
contentToHash += "|deleted";
|
||||
}
|
||||
|
||||
return utils.hash(contentToHash).substr(0, 10);
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
getUtcDateChanged() {
|
||||
return this.utcDateModified || this.utcDateCreated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @returns {Becca}
|
||||
*/
|
||||
get becca() {
|
||||
if (!becca) {
|
||||
becca = require('../becca');
|
||||
}
|
||||
|
||||
return becca;
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
putEntityChange(isDeleted = false) {
|
||||
entityChangesService.putEntityChange({
|
||||
entityName: this.constructor.entityName,
|
||||
entityId: this[this.constructor.primaryKeyName],
|
||||
hash: this.generateHash(isDeleted),
|
||||
isErased: false,
|
||||
utcDateChanged: this.getUtcDateChanged(),
|
||||
isSynced: this.constructor.entityName !== 'options' || !!this.isSynced
|
||||
});
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
getPojoToSave() {
|
||||
return this.getPojo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
||||
*
|
||||
* @returns {this}
|
||||
*/
|
||||
save(opts = {}) {
|
||||
const entityName = this.constructor.entityName;
|
||||
const primaryKeyName = this.constructor.primaryKeyName;
|
||||
|
||||
const isNewEntity = !this[primaryKeyName];
|
||||
|
||||
if (this.beforeSaving) {
|
||||
this.beforeSaving(opts);
|
||||
}
|
||||
|
||||
const pojo = this.getPojoToSave();
|
||||
|
||||
sql.transactional(() => {
|
||||
sql.upsert(entityName, primaryKeyName, pojo);
|
||||
|
||||
if (entityName === 'recent_notes') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.putEntityChange(false);
|
||||
|
||||
if (!cls.isEntityEventsDisabled()) {
|
||||
const eventPayload = {
|
||||
entityName,
|
||||
entity: this
|
||||
};
|
||||
|
||||
if (isNewEntity) {
|
||||
eventService.emit(eventService.ENTITY_CREATED, eventPayload);
|
||||
}
|
||||
|
||||
eventService.emit(eventService.ENTITY_CHANGED, eventPayload);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
_setContent(content, opts = {}) {
|
||||
// client code asks to save entity even if blobId didn't change (something else was changed)
|
||||
opts.forceSave = !!opts.forceSave;
|
||||
opts.forceFrontendReload = !!opts.forceFrontendReload;
|
||||
|
||||
if (content === null || content === undefined) {
|
||||
throw new Error(`Cannot set null content to ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}'`);
|
||||
}
|
||||
|
||||
if (this.hasStringContent()) {
|
||||
content = content.toString();
|
||||
} else {
|
||||
content = Buffer.isBuffer(content) ? content : Buffer.from(content);
|
||||
}
|
||||
|
||||
const unencryptedContentForHashCalculation = this.#getUnencryptedContentForHashCalculation(content);
|
||||
|
||||
if (this.isProtected) {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
content = protectedSessionService.encrypt(content);
|
||||
} else {
|
||||
throw new Error(`Cannot update content of blob since protected session is not available.`);
|
||||
}
|
||||
}
|
||||
|
||||
sql.transactional(() => {
|
||||
const newBlobId = this.#saveBlob(content, unencryptedContentForHashCalculation, opts);
|
||||
const oldBlobId = this.blobId;
|
||||
|
||||
if (newBlobId !== oldBlobId || opts.forceSave) {
|
||||
this.blobId = newBlobId;
|
||||
this.save();
|
||||
|
||||
if (newBlobId !== oldBlobId) {
|
||||
this.#deleteBlobIfNotUsed(oldBlobId);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#deleteBlobIfNotUsed(oldBlobId) {
|
||||
if (sql.getValue("SELECT 1 FROM notes WHERE blobId = ? LIMIT 1", [oldBlobId])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sql.getValue("SELECT 1 FROM attachments WHERE blobId = ? LIMIT 1", [oldBlobId])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sql.getValue("SELECT 1 FROM revisions WHERE blobId = ? LIMIT 1", [oldBlobId])) {
|
||||
return;
|
||||
}
|
||||
|
||||
sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]);
|
||||
// blobs are not marked as erased in entity_changes, they are just purged completely
|
||||
// this is because technically every keystroke can create a new blob and there would be just too many
|
||||
sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]);
|
||||
}
|
||||
|
||||
#getUnencryptedContentForHashCalculation(unencryptedContent) {
|
||||
if (this.isProtected) {
|
||||
// a "random" prefix makes sure that the calculated hash/blobId is different for a decrypted/encrypted content
|
||||
const encryptedPrefixSuffix = "t$[nvQg7q)&_ENCRYPTED_?M:Bf&j3jr_";
|
||||
return Buffer.isBuffer(unencryptedContent)
|
||||
? Buffer.concat([Buffer.from(encryptedPrefixSuffix), unencryptedContent])
|
||||
: `${encryptedPrefixSuffix}${unencryptedContent}`;
|
||||
} else {
|
||||
return unencryptedContent;
|
||||
}
|
||||
}
|
||||
|
||||
#saveBlob(content, unencryptedContentForHashCalculation, opts = {}) {
|
||||
/*
|
||||
* We're using the unencrypted blob for the hash calculation, because otherwise the random IV would
|
||||
* cause every content blob to be unique which would balloon the database size (esp. with revisioning).
|
||||
* This has minor security implications (it's easy to infer that given content is shared between different
|
||||
* notes/attachments), but the trade-off comes out clearly positive.
|
||||
*/
|
||||
const newBlobId = utils.hashedBlobId(unencryptedContentForHashCalculation);
|
||||
const blobNeedsInsert = !sql.getValue('SELECT 1 FROM blobs WHERE blobId = ?', [newBlobId]);
|
||||
|
||||
if (!blobNeedsInsert) {
|
||||
return newBlobId;
|
||||
}
|
||||
|
||||
const pojo = {
|
||||
blobId: newBlobId,
|
||||
content: content,
|
||||
dateModified: dateUtils.localNowDateTime(),
|
||||
utcDateModified: dateUtils.utcNowDateTime()
|
||||
};
|
||||
|
||||
sql.upsert("blobs", "blobId", pojo);
|
||||
|
||||
// we can't reuse blobId as an entity_changes hash, because this one has to be calculatable without having
|
||||
// access to the decrypted content
|
||||
const hash = blobService.calculateContentHash(pojo);
|
||||
|
||||
entityChangesService.putEntityChange({
|
||||
entityName: 'blobs',
|
||||
entityId: newBlobId,
|
||||
hash: hash,
|
||||
isErased: false,
|
||||
utcDateChanged: pojo.utcDateModified,
|
||||
isSynced: true,
|
||||
// overriding componentId will cause frontend to think the change is coming from a different component
|
||||
// and thus reload
|
||||
componentId: opts.forceFrontendReload ? utils.randomString(10) : null
|
||||
});
|
||||
|
||||
eventService.emit(eventService.ENTITY_CHANGED, {
|
||||
entityName: 'blobs',
|
||||
entity: this
|
||||
});
|
||||
|
||||
return newBlobId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @returns {string|Buffer}
|
||||
*/
|
||||
_getContent() {
|
||||
const row = sql.getRow(`SELECT content FROM blobs WHERE blobId = ?`, [this.blobId]);
|
||||
|
||||
if (!row) {
|
||||
throw new Error(`Cannot find content for ${this.constructor.primaryKeyName} '${this[this.constructor.primaryKeyName]}', blobId '${this.blobId}'`);
|
||||
}
|
||||
|
||||
return blobService.processContent(row.content, this.isProtected, this.hasStringContent());
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
*
|
||||
* This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
*
|
||||
* @param [deleteId=null]
|
||||
*/
|
||||
markAsDeleted(deleteId = null) {
|
||||
const entityId = this[this.constructor.primaryKeyName];
|
||||
const entityName = this.constructor.entityName;
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
|
||||
WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[deleteId, this.utcDateModified, entityId]);
|
||||
|
||||
if (this.dateModified) {
|
||||
this.dateModified = dateUtils.localNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[this.dateModified, entityId]);
|
||||
}
|
||||
|
||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||
|
||||
this.putEntityChange(true);
|
||||
|
||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||
}
|
||||
|
||||
markAsDeletedSimple() {
|
||||
const entityId = this[this.constructor.primaryKeyName];
|
||||
const entityName = this.constructor.entityName;
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?
|
||||
WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[this.utcDateModified, entityId]);
|
||||
|
||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||
|
||||
this.putEntityChange(true);
|
||||
|
||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AbstractBeccaEntity;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,218 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/abstract_entity.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/abstract_entity.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const utils = require('../../services/utils');
|
||||
const sql = require('../../services/sql');
|
||||
const entityChangesService = require('../../services/entity_changes');
|
||||
const eventService = require("../../services/events");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const cls = require("../../services/cls");
|
||||
const log = require("../../services/log");
|
||||
|
||||
let becca = null;
|
||||
|
||||
/**
|
||||
* Base class for all backend entities.
|
||||
*/
|
||||
class AbstractEntity {
|
||||
/** @protected */
|
||||
beforeSaving() {
|
||||
this.generateIdIfNecessary();
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
generateIdIfNecessary() {
|
||||
if (!this[this.constructor.primaryKeyName]) {
|
||||
this[this.constructor.primaryKeyName] = utils.newEntityId();
|
||||
}
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
generateHash(isDeleted = false) {
|
||||
let contentToHash = "";
|
||||
|
||||
for (const propertyName of this.constructor.hashedProperties) {
|
||||
contentToHash += "|" + this[propertyName];
|
||||
}
|
||||
|
||||
if (isDeleted) {
|
||||
contentToHash += "|deleted";
|
||||
}
|
||||
|
||||
return utils.hash(contentToHash).substr(0, 10);
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
getUtcDateChanged() {
|
||||
return this.utcDateModified || this.utcDateCreated;
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
get becca() {
|
||||
if (!becca) {
|
||||
becca = require('../becca');
|
||||
}
|
||||
|
||||
return becca;
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
addEntityChange(isDeleted = false) {
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: this.constructor.entityName,
|
||||
entityId: this[this.constructor.primaryKeyName],
|
||||
hash: this.generateHash(isDeleted),
|
||||
isErased: false,
|
||||
utcDateChanged: this.getUtcDateChanged(),
|
||||
isSynced: this.constructor.entityName !== 'options' || !!this.isSynced
|
||||
});
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
getPojoToSave() {
|
||||
return this.getPojo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
||||
*
|
||||
* @returns {AbstractEntity}
|
||||
*/
|
||||
save() {
|
||||
const entityName = this.constructor.entityName;
|
||||
const primaryKeyName = this.constructor.primaryKeyName;
|
||||
|
||||
const isNewEntity = !this[primaryKeyName];
|
||||
|
||||
if (this.beforeSaving) {
|
||||
this.beforeSaving();
|
||||
}
|
||||
|
||||
const pojo = this.getPojoToSave();
|
||||
|
||||
sql.transactional(() => {
|
||||
sql.upsert(entityName, primaryKeyName, pojo);
|
||||
|
||||
if (entityName === 'recent_notes') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.addEntityChange(false);
|
||||
|
||||
if (!cls.isEntityEventsDisabled()) {
|
||||
const eventPayload = {
|
||||
entityName,
|
||||
entity: this
|
||||
};
|
||||
|
||||
if (isNewEntity) {
|
||||
eventService.emit(eventService.ENTITY_CREATED, eventPayload);
|
||||
}
|
||||
|
||||
eventService.emit(eventService.ENTITY_CHANGED, eventPayload);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the entity as (soft) deleted. It will be completely erased later.
|
||||
*
|
||||
* This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
|
||||
*
|
||||
* @param [deleteId=null]
|
||||
*/
|
||||
markAsDeleted(deleteId = null) {
|
||||
const entityId = this[this.constructor.primaryKeyName];
|
||||
const entityName = this.constructor.entityName;
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
|
||||
WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[deleteId, this.utcDateModified, entityId]);
|
||||
|
||||
if (this.dateModified) {
|
||||
this.dateModified = dateUtils.localNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[this.dateModified, entityId]);
|
||||
}
|
||||
|
||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||
|
||||
this.addEntityChange(true);
|
||||
|
||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||
}
|
||||
|
||||
markAsDeletedSimple() {
|
||||
const entityId = this[this.constructor.primaryKeyName];
|
||||
const entityName = this.constructor.entityName;
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?
|
||||
WHERE ${this.constructor.primaryKeyName} = ?`,
|
||||
[this.utcDateModified, entityId]);
|
||||
|
||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||
|
||||
this.addEntityChange(true);
|
||||
|
||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AbstractEntity;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
289
docs/backend_api/becca_entities_battachment.js.html
Normal file
289
docs/backend_api/becca_entities_battachment.js.html
Normal file
@@ -0,0 +1,289 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/battachment.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/battachment.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const utils = require('../../services/utils');
|
||||
const dateUtils = require('../../services/date_utils');
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const protectedSessionService = require("../../services/protected_session");
|
||||
const log = require("../../services/log");
|
||||
|
||||
const attachmentRoleToNoteTypeMapping = {
|
||||
'image': 'image'
|
||||
};
|
||||
|
||||
/**
|
||||
* Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
|
||||
* larger amounts of data and generally not accessible to the user.
|
||||
*
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class BAttachment extends AbstractBeccaEntity {
|
||||
static get entityName() { return "attachments"; }
|
||||
static get primaryKeyName() { return "attachmentId"; }
|
||||
static get hashedProperties() { return ["attachmentId", "ownerId", "role", "mime", "title", "blobId",
|
||||
"utcDateScheduledForErasureSince", "utcDateModified"]; }
|
||||
|
||||
constructor(row) {
|
||||
super();
|
||||
|
||||
if (!row.ownerId?.trim()) {
|
||||
throw new Error("'ownerId' must be given to initialize a Attachment entity");
|
||||
} else if (!row.role?.trim()) {
|
||||
throw new Error("'role' must be given to initialize a Attachment entity");
|
||||
} else if (!row.mime?.trim()) {
|
||||
throw new Error("'mime' must be given to initialize a Attachment entity");
|
||||
} else if (!row.title?.trim()) {
|
||||
throw new Error("'title' must be given to initialize a Attachment entity");
|
||||
}
|
||||
|
||||
/** @type {string} */
|
||||
this.attachmentId = row.attachmentId;
|
||||
/** @type {string} either noteId or revisionId to which this attachment belongs */
|
||||
this.ownerId = row.ownerId;
|
||||
/** @type {string} */
|
||||
this.role = row.role;
|
||||
/** @type {string} */
|
||||
this.mime = row.mime;
|
||||
/** @type {string} */
|
||||
this.title = row.title;
|
||||
/** @type {int} */
|
||||
this.position = row.position;
|
||||
/** @type {string} */
|
||||
this.blobId = row.blobId;
|
||||
/** @type {boolean} */
|
||||
this.isProtected = !!row.isProtected;
|
||||
/** @type {string} */
|
||||
this.dateModified = row.dateModified;
|
||||
/** @type {string} */
|
||||
this.utcDateModified = row.utcDateModified;
|
||||
/** @type {string} */
|
||||
this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
|
||||
|
||||
/** @type {int} optionally added to the entity */
|
||||
this.contentLength = row.contentLength;
|
||||
|
||||
this.decrypt();
|
||||
}
|
||||
|
||||
/** @returns {BAttachment} */
|
||||
copy() {
|
||||
return new BAttachment({
|
||||
ownerId: this.ownerId,
|
||||
role: this.role,
|
||||
mime: this.mime,
|
||||
title: this.title,
|
||||
blobId: this.blobId,
|
||||
isProtected: this.isProtected
|
||||
});
|
||||
}
|
||||
|
||||
/** @returns {BNote} */
|
||||
getNote() {
|
||||
return this.becca.notes[this.ownerId];
|
||||
}
|
||||
|
||||
/** @returns {boolean} true if the note has string content (not binary) */
|
||||
hasStringContent() {
|
||||
return utils.isStringNote(this.type, this.mime);
|
||||
}
|
||||
|
||||
isContentAvailable() {
|
||||
return !this.attachmentId // new attachment which was not encrypted yet
|
||||
|| !this.isProtected
|
||||
|| protectedSessionService.isProtectedSessionAvailable()
|
||||
}
|
||||
|
||||
getTitleOrProtected() {
|
||||
return this.isContentAvailable() ? this.title : '[protected]';
|
||||
}
|
||||
|
||||
decrypt() {
|
||||
if (!this.isProtected || !this.attachmentId) {
|
||||
this.isDecrypted = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {
|
||||
try {
|
||||
this.title = protectedSessionService.decryptString(this.title);
|
||||
this.isDecrypted = true;
|
||||
}
|
||||
catch (e) {
|
||||
log.error(`Could not decrypt attachment ${this.attachmentId}: ${e.message} ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @returns {string|Buffer} */
|
||||
getContent() {
|
||||
return this._getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param content
|
||||
* @param {object} [opts]
|
||||
* @param {object} [opts.forceSave=false] - will also save this BAttachment entity
|
||||
* @param {object} [opts.forceFrontendReload=false] - override frontend heuristics on when to reload, instruct to reload
|
||||
*/
|
||||
setContent(content, opts) {
|
||||
this._setContent(content, opts);
|
||||
}
|
||||
|
||||
/** @returns {{note: BNote, branch: BBranch}} */
|
||||
convertToNote() {
|
||||
if (this.type === 'search') {
|
||||
throw new Error(`Note of type search cannot have child notes`);
|
||||
}
|
||||
|
||||
if (!this.getNote()) {
|
||||
throw new Error("Cannot find note of this attachment. It is possible that this is note revision's attachment. " +
|
||||
"Converting note revision's attachments to note is not (yet) supported.");
|
||||
}
|
||||
|
||||
if (!(this.role in attachmentRoleToNoteTypeMapping)) {
|
||||
throw new Error(`Mapping from attachment role '${this.role}' to note's type is not defined`);
|
||||
}
|
||||
|
||||
if (!this.isContentAvailable()) { // isProtected is the same for attachment
|
||||
throw new Error(`Cannot convert protected attachment outside of protected session`);
|
||||
}
|
||||
|
||||
const noteService = require('../../services/notes');
|
||||
|
||||
const { note, branch } = noteService.createNewNote({
|
||||
parentNoteId: this.ownerId,
|
||||
title: this.title,
|
||||
type: attachmentRoleToNoteTypeMapping[this.role],
|
||||
mime: this.mime,
|
||||
content: this.getContent(),
|
||||
isProtected: this.isProtected
|
||||
});
|
||||
|
||||
this.markAsDeleted();
|
||||
|
||||
const parentNote = this.getNote();
|
||||
|
||||
if (this.role === 'image' && parentNote.type === 'text') {
|
||||
const origContent = parentNote.getContent();
|
||||
const oldAttachmentUrl = `api/attachments/${this.attachmentId}/image/`;
|
||||
const newNoteUrl = `api/images/${note.noteId}/`;
|
||||
|
||||
const fixedContent = utils.replaceAll(origContent, oldAttachmentUrl, newNoteUrl);
|
||||
|
||||
if (fixedContent !== origContent) {
|
||||
parentNote.setContent(fixedContent);
|
||||
}
|
||||
|
||||
noteService.asyncPostProcessContent(note, fixedContent);
|
||||
}
|
||||
|
||||
return { note, branch };
|
||||
}
|
||||
|
||||
getFileName() {
|
||||
const type = this.role === 'image' ? 'image' : 'file';
|
||||
|
||||
return utils.formatDownloadTitle(this.title, type, this.mime);
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
super.beforeSaving();
|
||||
|
||||
if (this.position === undefined || this.position === null) {
|
||||
this.position = 10 + sql.getValue(`SELECT COALESCE(MAX(position), 0)
|
||||
FROM attachments
|
||||
WHERE ownerId = ?`, [this.noteId]);
|
||||
}
|
||||
|
||||
this.dateModified = dateUtils.localNowDateTime();
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
}
|
||||
|
||||
getPojo() {
|
||||
return {
|
||||
attachmentId: this.attachmentId,
|
||||
ownerId: this.ownerId,
|
||||
role: this.role,
|
||||
mime: this.mime,
|
||||
title: this.title,
|
||||
position: this.position,
|
||||
blobId: this.blobId,
|
||||
isProtected: !!this.isProtected,
|
||||
isDeleted: false,
|
||||
dateModified: this.dateModified,
|
||||
utcDateModified: this.utcDateModified,
|
||||
utcDateScheduledForErasureSince: this.utcDateScheduledForErasureSince,
|
||||
contentLength: this.contentLength
|
||||
};
|
||||
}
|
||||
|
||||
getPojoToSave() {
|
||||
const pojo = this.getPojo();
|
||||
delete pojo.contentLength;
|
||||
|
||||
if (pojo.isProtected) {
|
||||
if (this.isDecrypted) {
|
||||
pojo.title = protectedSessionService.encrypt(pojo.title);
|
||||
}
|
||||
else {
|
||||
// updating protected note outside of protected session means we will keep original ciphertexts
|
||||
delete pojo.title;
|
||||
}
|
||||
}
|
||||
|
||||
return pojo;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BAttachment;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/attribute.js</title>
|
||||
<title>JSDoc: Source: becca/entities/battribute.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/attribute.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/battribute.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,19 +28,20 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const Note = require('./note');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const BNote = require('./bnote');
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
|
||||
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
|
||||
|
||||
/**
|
||||
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
* and relation (representing named relationship between source and target note)
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class Attribute extends AbstractEntity {
|
||||
class BAttribute extends AbstractBeccaEntity {
|
||||
static get entityName() { return "attributes"; }
|
||||
static get primaryKeyName() { return "attributeId"; }
|
||||
static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable"]; }
|
||||
@@ -90,7 +91,6 @@ class Attribute extends AbstractEntity {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
if (this.attributeId) {
|
||||
this.becca.attributes[this.attributeId] = this;
|
||||
@@ -98,7 +98,7 @@ class Attribute extends AbstractEntity {
|
||||
|
||||
if (!(this.noteId in this.becca.notes)) {
|
||||
// entities can come out of order in sync, create skeleton which will be filled later
|
||||
this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));
|
||||
this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
|
||||
}
|
||||
|
||||
this.becca.notes[this.noteId].ownedAttributes.push(this);
|
||||
@@ -114,9 +114,23 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
validate() {
|
||||
if (!["label", "relation"].includes(this.type)) {
|
||||
throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (!this.name?.trim()) {
|
||||
throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (this.type === 'relation' && !(this.value in this.becca.notes)) {
|
||||
throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it targets not existing note '${this.value}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
get isAffectingSubtree() {
|
||||
return this.isInheritable
|
||||
|| (this.type === 'relation' && this.name === 'template');
|
||||
|| (this.type === 'relation' && ['template', 'inherit'].includes(this.name));
|
||||
}
|
||||
|
||||
get targetNoteId() { // alias
|
||||
@@ -138,18 +152,24 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
getNote() {
|
||||
return this.becca.getNote(this.noteId);
|
||||
const note = this.becca.getNote(this.noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
|
||||
}
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
getTargetNote() {
|
||||
if (this.type !== 'relation') {
|
||||
throw new Error(`Attribute ${this.attributeId} is not relation`);
|
||||
throw new Error(`Attribute '${this.attributeId}' is not a relation.`);
|
||||
}
|
||||
|
||||
if (!this.value) {
|
||||
@@ -160,7 +180,7 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isDefinition() {
|
||||
return this.type === 'label' && (this.name.startsWith('label:') || this.name.startsWith('relation:'));
|
||||
@@ -184,19 +204,23 @@ class Attribute extends AbstractEntity {
|
||||
return !(this.attributeId in this.becca.attributes);
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.value) {
|
||||
if (this.type === 'relation') {
|
||||
throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);
|
||||
}
|
||||
beforeSaving(opts = {}) {
|
||||
if (!opts.skipValidation) {
|
||||
this.validate();
|
||||
}
|
||||
|
||||
this.name = sanitizeAttributeName(this.name);
|
||||
|
||||
if (!this.value) {
|
||||
// null value isn't allowed
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
if (this.position === undefined) {
|
||||
// TODO: can be calculated from becca
|
||||
this.position = 1 + sql.getValue(`SELECT COALESCE(MAX(position), 0) FROM attributes WHERE noteId = ?`, [this.noteId]);
|
||||
if (this.position === undefined || this.position === null) {
|
||||
const maxExistingPosition = this.getNote().getAttributes()
|
||||
.reduce((maxPosition, attr) => Math.max(maxPosition, attr.position || 0), 0);
|
||||
|
||||
this.position = maxExistingPosition + 10;
|
||||
}
|
||||
|
||||
if (!this.isInheritable) {
|
||||
@@ -225,7 +249,7 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
|
||||
createClone(type, name, value, isInheritable) {
|
||||
return new Attribute({
|
||||
return new BAttribute({
|
||||
noteId: this.noteId,
|
||||
type: type,
|
||||
name: name,
|
||||
@@ -237,7 +261,7 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Attribute;
|
||||
module.exports = BAttribute;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -248,13 +272,13 @@ module.exports = Attribute;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
81
docs/backend_api/becca_entities_bblob.js.html
Normal file
81
docs/backend_api/becca_entities_bblob.js.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/bblob.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/bblob.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>class BBlob {
|
||||
static get entityName() { return "blobs"; }
|
||||
static get primaryKeyName() { return "blobId"; }
|
||||
static get hashedProperties() { return ["blobId", "content"]; }
|
||||
|
||||
constructor(row) {
|
||||
/** @type {string} */
|
||||
this.blobId = row.blobId;
|
||||
/** @type {string|Buffer} */
|
||||
this.content = row.content;
|
||||
/** @type {int} */
|
||||
this.contentLength = row.contentLength;
|
||||
/** @type {string} */
|
||||
this.dateModified = row.dateModified;
|
||||
/** @type {string} */
|
||||
this.utcDateModified = row.utcDateModified;
|
||||
}
|
||||
|
||||
getPojo() {
|
||||
return {
|
||||
blobId: this.blobId,
|
||||
content: this.content,
|
||||
contentLength: this.contentLength,
|
||||
dateModified: this.dateModified,
|
||||
utcDateModified: this.utcDateModified
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BBlob;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/branch.js</title>
|
||||
<title>JSDoc: Source: becca/entities/bbranch.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/branch.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/bbranch.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -28,11 +28,10 @@
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const Note = require('./note');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const BNote = require('./bnote');
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const utils = require("../../services/utils.js");
|
||||
const utils = require("../../services/utils");
|
||||
const TaskContext = require("../../services/task_context");
|
||||
const cls = require("../../services/cls");
|
||||
const log = require("../../services/log");
|
||||
@@ -41,9 +40,12 @@ const log = require("../../services/log");
|
||||
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
* parents.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||
* Always check noteId instead.
|
||||
*
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class Branch extends AbstractEntity {
|
||||
class BBranch extends AbstractBeccaEntity {
|
||||
static get entityName() { return "branches"; }
|
||||
static get primaryKeyName() { return "branchId"; }
|
||||
// notePosition is not part of hash because it would produce a lot of updates in case of reordering
|
||||
@@ -79,7 +81,7 @@ class Branch extends AbstractEntity {
|
||||
this.noteId = noteId;
|
||||
/** @type {string} */
|
||||
this.parentNoteId = parentNoteId;
|
||||
/** @type {string} */
|
||||
/** @type {string|null} */
|
||||
this.prefix = prefix;
|
||||
/** @type {int} */
|
||||
this.notePosition = notePosition;
|
||||
@@ -104,7 +106,7 @@ class Branch extends AbstractEntity {
|
||||
childNote.parentBranches.push(this);
|
||||
}
|
||||
|
||||
if (this.branchId === 'root') {
|
||||
if (this.noteId === 'root') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,25 +121,26 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
/** @returns {Note} */
|
||||
/** @returns {BNote} */
|
||||
get childNote() {
|
||||
if (!(this.noteId in this.becca.notes)) {
|
||||
// entities can come out of order in sync/import, create skeleton which will be filled later
|
||||
this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));
|
||||
this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));
|
||||
}
|
||||
|
||||
return this.becca.notes[this.noteId];
|
||||
}
|
||||
|
||||
/** @returns {BNote} */
|
||||
getNote() {
|
||||
return this.childNote;
|
||||
}
|
||||
|
||||
/** @returns {Note|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
|
||||
/** @returns {BNote|undefined} - root branch will have undefined parent, all other branches have to have a parent note */
|
||||
get parentNote() {
|
||||
if (!(this.parentNoteId in this.becca.notes) && this.parentNoteId !== 'none') {
|
||||
// entities can come out of order in sync/import, create skeleton which will be filled later
|
||||
this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId}));
|
||||
this.becca.addNote(this.parentNoteId, new BNote({noteId: this.parentNoteId}));
|
||||
}
|
||||
|
||||
return this.becca.notes[this.parentNoteId];
|
||||
@@ -147,13 +150,26 @@ class Branch extends AbstractEntity {
|
||||
return !(this.branchId in this.becca.branches);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch is weak when its existence should not hinder deletion of its note.
|
||||
* As a result, note with only weak branches should be immediately deleted.
|
||||
* An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
|
||||
* not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
|
||||
* of deletion should not act as a clone.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get isWeak() {
|
||||
return ['_share', '_lbBookmarks'].includes(this.parentNoteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a branch. If this is a last note's branch, delete the note as well.
|
||||
*
|
||||
* @param {string} [deleteId] - optional delete identified
|
||||
* @param {TaskContext} [taskContext]
|
||||
*
|
||||
* @return {boolean} - true if note has been deleted, false otherwise
|
||||
* @returns {boolean} - true if note has been deleted, false otherwise
|
||||
*/
|
||||
deleteBranch(deleteId, taskContext) {
|
||||
if (!deleteId) {
|
||||
@@ -178,8 +194,7 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.branchId === 'root'
|
||||
|| this.noteId === 'root'
|
||||
if (this.noteId === 'root'
|
||||
|| this.noteId === cls.getHoistedNoteId()) {
|
||||
|
||||
throw new Error("Can't delete root or hoisted branch/note");
|
||||
@@ -187,22 +202,24 @@ class Branch extends AbstractEntity {
|
||||
|
||||
this.markAsDeleted(deleteId);
|
||||
|
||||
const notDeletedBranches = note.getParentBranches();
|
||||
const notDeletedBranches = note.getStrongParentBranches();
|
||||
|
||||
if (notDeletedBranches.length === 0) {
|
||||
for (const weakBranch of note.getParentBranches()) {
|
||||
weakBranch.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
for (const childBranch of note.getChildBranches()) {
|
||||
childBranch.deleteBranch(deleteId, taskContext);
|
||||
}
|
||||
|
||||
// first delete children and then parent - this will show up better in recent changes
|
||||
|
||||
log.info("Deleting note " + note.noteId);
|
||||
log.info(`Deleting note '${note.noteId}'`);
|
||||
|
||||
// marking note as deleted as a signal to event handlers that the note is being deleted
|
||||
// (isDeleted is being checked against becca)
|
||||
delete this.becca.notes[note.noteId];
|
||||
this.becca.notes[note.noteId].isBeingDeleted = true;
|
||||
|
||||
for (const attribute of note.getOwnedAttributes()) {
|
||||
for (const attribute of note.getOwnedAttributes().slice()) {
|
||||
attribute.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
@@ -210,6 +227,10 @@ class Branch extends AbstractEntity {
|
||||
relation.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
for (const attachment of note.getAttachments()) {
|
||||
attachment.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
note.markAsDeleted(deleteId);
|
||||
|
||||
return true;
|
||||
@@ -220,16 +241,34 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.noteId || !this.parentNoteId) {
|
||||
throw new Error(`noteId and parentNoteId are mandatory properties for Branch`);
|
||||
}
|
||||
|
||||
this.branchId = `${this.parentNoteId}_${this.noteId}`;
|
||||
|
||||
if (this.notePosition === undefined || this.notePosition === null) {
|
||||
// TODO finding new position can be refactored into becca
|
||||
const maxNotePos = sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);
|
||||
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
|
||||
let maxNotePos = 0;
|
||||
|
||||
for (const childBranch of this.parentNote.getChildBranches()) {
|
||||
if (maxNotePos < childBranch.notePosition
|
||||
&& childBranch.noteId !== '_hidden' // hidden has a very large notePosition to always stay last
|
||||
) {
|
||||
maxNotePos = childBranch.notePosition;
|
||||
}
|
||||
}
|
||||
|
||||
this.notePosition = maxNotePos + 10;
|
||||
}
|
||||
|
||||
if (!this.isExpanded) {
|
||||
this.isExpanded = false;
|
||||
}
|
||||
|
||||
if (!this.prefix?.trim()) {
|
||||
this.prefix = null;
|
||||
}
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
super.beforeSaving();
|
||||
@@ -251,17 +290,24 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
|
||||
createClone(parentNoteId, notePosition) {
|
||||
return new Branch({
|
||||
noteId: this.noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
notePosition: notePosition,
|
||||
prefix: this.prefix,
|
||||
isExpanded: this.isExpanded
|
||||
});
|
||||
const existingBranch = this.becca.getBranchFromChildAndParent(this.noteId, parentNoteId);
|
||||
|
||||
if (existingBranch) {
|
||||
existingBranch.notePosition = notePosition;
|
||||
return existingBranch;
|
||||
} else {
|
||||
return new BBranch({
|
||||
noteId: this.noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
notePosition: notePosition,
|
||||
prefix: this.prefix,
|
||||
isExpanded: this.isExpanded
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Branch;
|
||||
module.exports = BBranch;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -272,13 +318,13 @@ module.exports = Branch;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/etapi_token.js</title>
|
||||
<title>JSDoc: Source: becca/entities/betapi_token.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/etapi_token.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/betapi_token.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const dateUtils = require('../../services/date_utils');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
|
||||
/**
|
||||
* EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
|
||||
@@ -40,9 +40,9 @@ const AbstractEntity = require("./abstract_entity");
|
||||
* The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
|
||||
* from tokenHash and token.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class EtapiToken extends AbstractEntity {
|
||||
class BEtapiToken extends AbstractBeccaEntity {
|
||||
static get entityName() { return "etapi_tokens"; }
|
||||
static get primaryKeyName() { return "etapiTokenId"; }
|
||||
static get hashedProperties() { return ["etapiTokenId", "name", "tokenHash", "utcDateCreated", "utcDateModified", "isDeleted"]; }
|
||||
@@ -103,7 +103,7 @@ class EtapiToken extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EtapiToken;
|
||||
module.exports = BEtapiToken;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -114,13 +114,13 @@ module.exports = EtapiToken;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/option.js</title>
|
||||
<title>JSDoc: Source: becca/entities/boption.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/option.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/boption.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const dateUtils = require('../../services/date_utils');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
|
||||
/**
|
||||
* Option represents name-value pair, either directly configurable by the user or some system property.
|
||||
* Option represents a name-value pair, either directly configurable by the user or some system property.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class Option extends AbstractEntity {
|
||||
class BOption extends AbstractBeccaEntity {
|
||||
static get entityName() { return "options"; }
|
||||
static get primaryKeyName() { return "name"; }
|
||||
static get hashedProperties() { return ["name", "value"]; }
|
||||
@@ -44,6 +44,11 @@ class Option extends AbstractEntity {
|
||||
constructor(row) {
|
||||
super();
|
||||
|
||||
this.updateFromRow(row);
|
||||
this.becca.options[this.name] = this;
|
||||
}
|
||||
|
||||
updateFromRow(row) {
|
||||
/** @type {string} */
|
||||
this.name = row.name;
|
||||
/** @type {string} */
|
||||
@@ -52,8 +57,6 @@ class Option extends AbstractEntity {
|
||||
this.isSynced = !!row.isSynced;
|
||||
/** @type {string} */
|
||||
this.utcDateModified = row.utcDateModified;
|
||||
|
||||
this.becca.options[this.name] = this;
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
@@ -72,7 +75,7 @@ class Option extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Option;
|
||||
module.exports = BOption;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -83,13 +86,13 @@ module.exports = Option;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/recent_note.js</title>
|
||||
<title>JSDoc: Source: becca/entities/brecent_note.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/recent_note.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/brecent_note.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
|
||||
const dateUtils = require('../../services/date_utils');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
|
||||
/**
|
||||
* RecentNote represents recently visited note.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class RecentNote extends AbstractEntity {
|
||||
class BRecentNote extends AbstractBeccaEntity {
|
||||
static get entityName() { return "recent_notes"; }
|
||||
static get primaryKeyName() { return "noteId"; }
|
||||
|
||||
@@ -60,7 +60,7 @@ class RecentNote extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RecentNote;
|
||||
module.exports = BRecentNote;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -71,13 +71,13 @@ module.exports = RecentNote;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Source: becca/entities/note_revision.js</title>
|
||||
<title>JSDoc: Source: becca/entities/brevision.js</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"> </script>
|
||||
<script src="scripts/prettify/lang-css.js"> </script>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Source: becca/entities/note_revision.js</h1>
|
||||
<h1 class="page-title">Source: becca/entities/brevision.js</h1>
|
||||
|
||||
|
||||
|
||||
@@ -30,28 +30,29 @@
|
||||
|
||||
const protectedSessionService = require('../../services/protected_session');
|
||||
const utils = require('../../services/utils');
|
||||
const sql = require('../../services/sql');
|
||||
const dateUtils = require('../../services/date_utils');
|
||||
const becca = require('../becca');
|
||||
const entityChangesService = require('../../services/entity_changes');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const BAttachment = require("./battachment");
|
||||
|
||||
/**
|
||||
* NoteRevision represents snapshot of note's title and content at some point in the past.
|
||||
* Revision represents a snapshot of note's title and content at some point in the past.
|
||||
* It's used for seamless note versioning.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
* @extends AbstractBeccaEntity
|
||||
*/
|
||||
class NoteRevision extends AbstractEntity {
|
||||
static get entityName() { return "note_revisions"; }
|
||||
static get primaryKeyName() { return "noteRevisionId"; }
|
||||
static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; }
|
||||
class BRevision extends AbstractBeccaEntity {
|
||||
static get entityName() { return "revisions"; }
|
||||
static get primaryKeyName() { return "revisionId"; }
|
||||
static get hashedProperties() { return ["revisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated",
|
||||
"utcDateLastEdited", "utcDateCreated", "utcDateModified", "blobId"]; }
|
||||
|
||||
constructor(row, titleDecrypted = false) {
|
||||
super();
|
||||
|
||||
/** @type {string} */
|
||||
this.noteRevisionId = row.noteRevisionId;
|
||||
this.revisionId = row.revisionId;
|
||||
/** @type {string} */
|
||||
this.noteId = row.noteId;
|
||||
/** @type {string} */
|
||||
@@ -63,6 +64,8 @@ class NoteRevision extends AbstractEntity {
|
||||
/** @type {string} */
|
||||
this.title = row.title;
|
||||
/** @type {string} */
|
||||
this.blobId = row.blobId;
|
||||
/** @type {string} */
|
||||
this.dateLastEdited = row.dateLastEdited;
|
||||
/** @type {string} */
|
||||
this.dateCreated = row.dateCreated;
|
||||
@@ -72,7 +75,7 @@ class NoteRevision extends AbstractEntity {
|
||||
this.utcDateCreated = row.utcDateCreated;
|
||||
/** @type {string} */
|
||||
this.utcDateModified = row.utcDateModified;
|
||||
/** @type {number} */
|
||||
/** @type {int} */
|
||||
this.contentLength = row.contentLength;
|
||||
|
||||
if (this.isProtected && !titleDecrypted) {
|
||||
@@ -87,92 +90,47 @@ class NoteRevision extends AbstractEntity {
|
||||
}
|
||||
|
||||
/** @returns {boolean} true if the note has string content (not binary) */
|
||||
isStringNote() {
|
||||
hasStringContent() {
|
||||
return utils.isStringNote(this.type, this.mime);
|
||||
}
|
||||
|
||||
isContentAvailable() {
|
||||
return !this.revisionId // new note which was not encrypted yet
|
||||
|| !this.isProtected
|
||||
|| protectedSessionService.isProtectedSessionAvailable()
|
||||
}
|
||||
|
||||
/*
|
||||
* Note revision content has quite special handling - it's not a separate entity, but a lazily loaded
|
||||
* part of NoteRevision entity with its own sync. Reason behind this hybrid design is that
|
||||
* part of Revision entity with its own sync. The reason behind this hybrid design is that
|
||||
* content can be quite large, and it's not necessary to load it / fill memory for any note access even
|
||||
* if we don't need a content, especially for bulk operations like search.
|
||||
*
|
||||
* This is the same approach as is used for Note's content.
|
||||
*/
|
||||
|
||||
/** @returns {*} */
|
||||
getContent(silentNotFoundError = false) {
|
||||
const res = sql.getRow(`SELECT content FROM note_revision_contents WHERE noteRevisionId = ?`, [this.noteRevisionId]);
|
||||
|
||||
if (!res) {
|
||||
if (silentNotFoundError) {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot find note revision content for noteRevisionId=" + this.noteRevisionId);
|
||||
}
|
||||
}
|
||||
|
||||
let content = res.content;
|
||||
|
||||
if (this.isProtected) {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
content = protectedSessionService.decrypt(content);
|
||||
}
|
||||
else {
|
||||
content = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isStringNote()) {
|
||||
return content === null
|
||||
? ""
|
||||
: content.toString("UTF-8");
|
||||
}
|
||||
else {
|
||||
return content;
|
||||
}
|
||||
/** @returns {string|Buffer} */
|
||||
getContent() {
|
||||
return this._getContent();
|
||||
}
|
||||
|
||||
setContent(content, ignoreMissingProtectedSession = false) {
|
||||
const pojo = {
|
||||
noteRevisionId: this.noteRevisionId,
|
||||
content: content,
|
||||
utcDateModified: dateUtils.utcNowDateTime()
|
||||
};
|
||||
|
||||
if (this.isProtected) {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
pojo.content = protectedSessionService.encrypt(pojo.content);
|
||||
}
|
||||
else if (!ignoreMissingProtectedSession) {
|
||||
throw new Error(`Cannot update content of noteRevisionId=${this.noteRevisionId} since we're out of protected session.`);
|
||||
}
|
||||
}
|
||||
|
||||
sql.upsert("note_revision_contents", "noteRevisionId", pojo);
|
||||
|
||||
const hash = utils.hash(this.noteRevisionId + "|" + pojo.content.toString());
|
||||
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: 'note_revision_contents',
|
||||
entityId: this.noteRevisionId,
|
||||
hash: hash,
|
||||
isErased: false,
|
||||
utcDateChanged: this.getUtcDateChanged(),
|
||||
isSynced: true
|
||||
});
|
||||
/**
|
||||
* @param content
|
||||
* @param {object} [opts]
|
||||
* @param {object} [opts.forceSave=false] - will also save this BRevision entity
|
||||
*/
|
||||
setContent(content, opts) {
|
||||
this._setContent(content, opts);
|
||||
}
|
||||
|
||||
/** @returns {{contentLength, dateModified, utcDateModified}} */
|
||||
getContentMetadata() {
|
||||
return sql.getRow(`
|
||||
SELECT
|
||||
LENGTH(content) AS contentLength,
|
||||
dateModified,
|
||||
utcDateModified
|
||||
FROM note_revision_contents
|
||||
WHERE noteRevisionId = ?`, [this.noteRevisionId]);
|
||||
/** @returns {BAttachment[]} */
|
||||
getAttachments() {
|
||||
return sql.getRows(`
|
||||
SELECT attachments.*
|
||||
FROM attachments
|
||||
WHERE ownerId = ?
|
||||
AND isDeleted = 0`, [this.revisionId])
|
||||
.map(row => new BAttachment(row));
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
@@ -183,18 +141,19 @@ class NoteRevision extends AbstractEntity {
|
||||
|
||||
getPojo() {
|
||||
return {
|
||||
noteRevisionId: this.noteRevisionId,
|
||||
revisionId: this.revisionId,
|
||||
noteId: this.noteId,
|
||||
type: this.type,
|
||||
mime: this.mime,
|
||||
isProtected: this.isProtected,
|
||||
title: this.title,
|
||||
blobId: this.blobId,
|
||||
dateLastEdited: this.dateLastEdited,
|
||||
dateCreated: this.dateCreated,
|
||||
utcDateLastEdited: this.utcDateLastEdited,
|
||||
utcDateCreated: this.utcDateCreated,
|
||||
utcDateModified: this.utcDateModified,
|
||||
content: this.content,
|
||||
content: this.content, // used when retrieving full note revision to frontend
|
||||
contentLength: this.contentLength
|
||||
};
|
||||
}
|
||||
@@ -218,7 +177,7 @@ class NoteRevision extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NoteRevision;
|
||||
module.exports = BRevision;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
@@ -229,13 +188,13 @@ module.exports = NoteRevision;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,13 +50,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line355">line 355</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line364">line 364</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line346">line 346</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line355">line 355</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line336">line 336</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line345">line 345</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -834,7 +834,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line312">line 312</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line321">line 321</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1036,7 +1036,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line323">line 323</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line332">line 332</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1238,7 +1238,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line302">line 302</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line311">line 311</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1294,13 +1294,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -44,37 +44,38 @@ const SearchContext = require("./search/search_context");
|
||||
const becca = require("../becca/becca");
|
||||
const ws = require("./ws");
|
||||
const SpacedUpdate = require("./spaced_update");
|
||||
const specialNotesService = require("./special_notes");
|
||||
const branchService = require("./branches");
|
||||
const exportService = require("./export/zip");
|
||||
|
||||
/**
|
||||
* This is the main backend API interface for scripts. It's published in the local "api" object.
|
||||
* <p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
|
||||
* available in the JS backend notes. You can use e.g. <code>api.log(api.startNote.title);</code></p>
|
||||
*
|
||||
* @constructor
|
||||
* @hideconstructor
|
||||
*/
|
||||
function BackendScriptApi(currentNote, apiParams) {
|
||||
/** @property {Note} note where script started executing */
|
||||
/** @property {BNote} note where the script started executing */
|
||||
this.startNote = apiParams.startNote;
|
||||
/** @property {Note} note where script is currently executing. Don't mix this up with concept of active note */
|
||||
/** @property {BNote} note where the script is currently executing. Don't mix this up with the concept of active note */
|
||||
this.currentNote = currentNote;
|
||||
/** @property {Entity} entity whose event triggered this executions */
|
||||
/** @property {AbstractBeccaEntity} entity whose event triggered this execution */
|
||||
this.originEntity = apiParams.originEntity;
|
||||
|
||||
for (const key in apiParams) {
|
||||
this[key] = apiParams[key];
|
||||
}
|
||||
|
||||
/** @property {axios} Axios library for HTTP requests. See https://axios-http.com/ for documentation */
|
||||
/**
|
||||
* @property {axios} Axios library for HTTP requests. See {@link https://axios-http.com} for documentation
|
||||
* @deprecated use native (browser compatible) fetch() instead
|
||||
*/
|
||||
this.axios = axios;
|
||||
/** @property {dayjs} day.js library for date manipulation. See https://day.js.org/ for documentation */
|
||||
/** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
|
||||
this.dayjs = dayjs;
|
||||
/** @property {axios} xml2js library for XML parsing. See https://github.com/Leonidas-from-XIV/node-xml2js for documentation */
|
||||
/** @property {axios} xml2js library for XML parsing. See {@link https://github.com/Leonidas-from-XIV/node-xml2js} for documentation */
|
||||
this.xml2js = xml2js;
|
||||
|
||||
// DEPRECATED - use direct api.unescapeHtml
|
||||
this.utils = {
|
||||
unescapeHtml: utils.unescapeHtml
|
||||
};
|
||||
|
||||
/**
|
||||
* Instance name identifies particular Trilium instance. It can be useful for scripts
|
||||
* if some action needs to happen on only one specific instance.
|
||||
@@ -86,32 +87,32 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
/**
|
||||
* @method
|
||||
* @param {string} noteId
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getNote = noteId => becca.getNote(noteId);
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @param {string} branchId
|
||||
* @returns {Branch|null}
|
||||
* @returns {BBranch|null}
|
||||
*/
|
||||
this.getBranch = branchId => becca.getBranch(branchId);
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @param {string} attributeId
|
||||
* @returns {Attribute|null}
|
||||
* @returns {BAttribute|null}
|
||||
*/
|
||||
this.getAttribute = attributeId => becca.getAttribute(attributeId);
|
||||
|
||||
/**
|
||||
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
|
||||
* "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
|
||||
*
|
||||
* @method
|
||||
* @param {string} query
|
||||
* @param {Object} [searchParams]
|
||||
* @returns {Note[]}
|
||||
* @returns {BNote[]}
|
||||
*/
|
||||
this.searchForNotes = (query, searchParams = {}) => {
|
||||
if (searchParams.includeArchivedNotes === undefined) {
|
||||
@@ -130,12 +131,12 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
|
||||
/**
|
||||
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||
* "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
|
||||
* "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
|
||||
*
|
||||
* @method
|
||||
* @param {string} query
|
||||
* @param {Object} [searchParams]
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.searchForNote = (query, searchParams = {}) => {
|
||||
const notes = this.searchForNotes(query, searchParams);
|
||||
@@ -149,7 +150,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @method
|
||||
* @param {string} name - attribute name
|
||||
* @param {string} [value] - attribute value
|
||||
* @returns {Note[]}
|
||||
* @returns {BNote[]}
|
||||
*/
|
||||
this.getNotesWithLabel = attributeService.getNotesWithLabel;
|
||||
|
||||
@@ -159,18 +160,18 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @method
|
||||
* @param {string} name - attribute name
|
||||
* @param {string} [value] - attribute value
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getNoteWithLabel = attributeService.getNoteWithLabel;
|
||||
|
||||
/**
|
||||
* If there's no branch between note and parent note, create one. Otherwise, do nothing.
|
||||
* If there's no branch between note and parent note, create one. Otherwise, do nothing. Returns the new or existing branch.
|
||||
*
|
||||
* @method
|
||||
* @param {string} noteId
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} prefix - if branch will be created between note and parent note, set this prefix
|
||||
* @returns {void}
|
||||
* @param {string} prefix - if branch is created between note and parent note, set this prefix
|
||||
* @returns {{branch: BBranch|null}}
|
||||
*/
|
||||
this.ensureNoteIsPresentInParent = cloningService.ensureNoteIsPresentInParent;
|
||||
|
||||
@@ -191,25 +192,19 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @param {boolean} present - true if we want the branch to exist, false if we want it gone
|
||||
* @param {string} noteId
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} prefix - if branch will be created between note and parent note, set this prefix
|
||||
* @param {string} prefix - if branch is created between note and parent note, set this prefix
|
||||
* @returns {void}
|
||||
*/
|
||||
this.toggleNoteInParent = cloningService.toggleNoteInParent;
|
||||
|
||||
/**
|
||||
* @typedef {object} CreateNoteAttribute
|
||||
* @property {string} type - attribute type - label, relation etc.
|
||||
* @property {string} name - attribute name
|
||||
* @property {string} [value] - attribute value
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create text note. See also createNewNote() for more options.
|
||||
*
|
||||
* @method
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} title
|
||||
* @param {string} content
|
||||
* @return {{note: Note, branch: Branch}} - object having "note" and "branch" keys representing respective objects
|
||||
* @returns {{note: BNote, branch: BBranch}} - object having "note" and "branch" keys representing respective objects
|
||||
*/
|
||||
this.createTextNote = (parentNoteId, title, content = '') => noteService.createNewNote({
|
||||
parentNoteId,
|
||||
@@ -222,10 +217,11 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
|
||||
* JSON MIME type. See also createNewNote() for more options.
|
||||
*
|
||||
* @method
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} title
|
||||
* @param {object} content
|
||||
* @return {{note: Note, branch: Branch}} object having "note" and "branch" keys representing respective objects
|
||||
* @returns {{note: BNote, branch: BBranch}} object having "note" and "branch" keys representing respective objects
|
||||
*/
|
||||
this.createDataNote = (parentNoteId, title, content = {}) => noteService.createNewNote({
|
||||
parentNoteId,
|
||||
@@ -235,43 +231,23 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
mime: 'application/json'
|
||||
});
|
||||
|
||||
/**
|
||||
* @typedef {object} CreateNewNoteParams
|
||||
* @property {string} parentNoteId - MANDATORY
|
||||
* @property {string} title - MANDATORY
|
||||
* @property {string|buffer} content - MANDATORY
|
||||
* @property {string} type - text, code, file, image, search, book, relation-map, canvas - MANDATORY
|
||||
* @property {string} mime - value is derived from default mimes for type
|
||||
* @property {boolean} isProtected - default is false
|
||||
* @property {boolean} isExpanded - default is false
|
||||
* @property {string} prefix - default is empty string
|
||||
* @property {int} notePosition - default is last existing notePosition in a parent + 10
|
||||
*/
|
||||
|
||||
/**
|
||||
* @method
|
||||
*
|
||||
* @param {CreateNewNoteParams} [params]
|
||||
* @returns {{note: Note, branch: Branch}} object contains newly created entities note and branch
|
||||
* @property {object} params
|
||||
* @property {string} params.parentNoteId
|
||||
* @property {string} params.title
|
||||
* @property {string|buffer} params.content
|
||||
* @property {string} params.type - text, code, file, image, search, book, relationMap, canvas
|
||||
* @property {string} [params.mime] - value is derived from default mimes for type
|
||||
* @property {boolean} [params.isProtected=false]
|
||||
* @property {boolean} [params.isExpanded=false]
|
||||
* @property {string} [params.prefix='']
|
||||
* @property {int} [params.notePosition] - default is last existing notePosition in a parent + 10
|
||||
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
||||
*/
|
||||
this.createNewNote = noteService.createNewNote;
|
||||
|
||||
/**
|
||||
* @typedef {object} CreateNoteAttribute
|
||||
* @property {string} type - attribute type - label, relation etc.
|
||||
* @property {string} name - attribute name
|
||||
* @property {string} [value] - attribute value
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} CreateNoteExtraOptions
|
||||
* @property {boolean} [json=false] - should the note be JSON
|
||||
* @property {boolean} [isProtected=false] - should the note be protected
|
||||
* @property {string} [type='text'] - note type
|
||||
* @property {string} [mime='text/html'] - MIME type of the note
|
||||
* @property {CreateNoteAttribute[]} [attributes=[]] - attributes to be created for this note
|
||||
*/
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @deprecated please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs
|
||||
@@ -279,8 +255,16 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @param {string} parentNoteId - create new note under this parent
|
||||
* @param {string} title
|
||||
* @param {string} [content=""]
|
||||
* @param {CreateNoteExtraOptions} [extraOptions={}]
|
||||
* @returns {{note: Note, branch: Branch}} object contains newly created entities note and branch
|
||||
* @param {object} [extraOptions={}]
|
||||
* @property {boolean} [extraOptions.json=false] - should the note be JSON
|
||||
* @property {boolean} [extraOptions.isProtected=false] - should the note be protected
|
||||
* @property {string} [extraOptions.type='text'] - note type
|
||||
* @property {string} [extraOptions.mime='text/html'] - MIME type of the note
|
||||
* @property {object[]} [extraOptions.attributes=[]] - attributes to be created for this note
|
||||
* @property {string} extraOptions.attributes.type - attribute type - label, relation etc.
|
||||
* @property {string} extraOptions.attributes.name - attribute name
|
||||
* @property {string} [extraOptions.attributes.value] - attribute value
|
||||
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
||||
*/
|
||||
this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {
|
||||
extraOptions.parentNoteId = parentNoteId;
|
||||
@@ -288,7 +272,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
|
||||
const parentNote = becca.getNote(parentNoteId);
|
||||
|
||||
// code note type can be inherited, otherwise text is default
|
||||
// code note type can be inherited, otherwise "text" is the default
|
||||
extraOptions.type = parentNote.type === 'code' ? 'code' : 'text';
|
||||
extraOptions.mime = parentNote.type === 'code' ? parentNote.mime : 'text/html';
|
||||
|
||||
@@ -324,7 +308,9 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
/**
|
||||
* Log given message to trilium logs and log pane in UI
|
||||
*
|
||||
* @method
|
||||
* @param message
|
||||
* @returns {void}
|
||||
*/
|
||||
this.log = message => {
|
||||
log.info(message);
|
||||
@@ -351,7 +337,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* Returns root note of the calendar.
|
||||
*
|
||||
* @method
|
||||
* @returns {Note|null}
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
|
||||
|
||||
@@ -360,19 +346,8 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*
|
||||
* @method
|
||||
* @param {string} date in YYYY-MM-DD format
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @deprecated use getDayNote instead
|
||||
*/
|
||||
this.getDateNote = dateNoteService.getDayNote;
|
||||
|
||||
/**
|
||||
* Returns day note for given date. If such note doesn't exist, it is created.
|
||||
*
|
||||
* @method
|
||||
* @param {string} date in YYYY-MM-DD format
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getDayNote = dateNoteService.getDayNote;
|
||||
|
||||
@@ -380,8 +355,8 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* Returns today's day note. If such note doesn't exist, it is created.
|
||||
*
|
||||
* @method
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getTodayNote = dateNoteService.getTodayNote;
|
||||
|
||||
@@ -390,9 +365,10 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*
|
||||
* @method
|
||||
* @param {string} date in YYYY-MM-DD format
|
||||
* @param {object} [options] - "startOfTheWeek" - either "monday" (default) or "sunday"
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @param {object} [options]
|
||||
* @param {string} [options.startOfTheWeek=monday] - either "monday" (default) or "sunday"
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getWeekNote = dateNoteService.getWeekNote;
|
||||
|
||||
@@ -401,8 +377,8 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*
|
||||
* @method
|
||||
* @param {string} date in YYYY-MM format
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getMonthNote = dateNoteService.getMonthNote;
|
||||
|
||||
@@ -411,16 +387,29 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*
|
||||
* @method
|
||||
* @param {string} year in YYYY format
|
||||
* @param {Note} [rootNote] - specify calendar root note, normally leave empty to use default calendar
|
||||
* @returns {Note|null}
|
||||
* @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use the default calendar
|
||||
* @returns {BNote|null}
|
||||
*/
|
||||
this.getYearNote = dateNoteService.getYearNote;
|
||||
|
||||
/**
|
||||
* Sort child notes of a given note.
|
||||
*
|
||||
* @method
|
||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||
* @param {object} [sortConfig]
|
||||
* @property {string} [sortConfig.sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name
|
||||
* See {@link https://github.com/zadam/trilium/wiki/Sorting} for details.
|
||||
* @property {boolean} [sortConfig.reverse=false]
|
||||
* @property {boolean} [sortConfig.foldersFirst=false]
|
||||
* @returns {void}
|
||||
*/
|
||||
this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);
|
||||
this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(
|
||||
parentNoteId,
|
||||
sortConfig.sortBy || "title",
|
||||
!!sortConfig.reverse,
|
||||
!!sortConfig.foldersFirst
|
||||
);
|
||||
|
||||
/**
|
||||
* This method finds note by its noteId and prefix and either sets it to the given parentNoteId
|
||||
@@ -429,10 +418,11 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
|
||||
*
|
||||
* @method
|
||||
* @deprecated - this method is pretty confusing and serves specialized purpose only
|
||||
* @deprecated this method is pretty confusing and serves specialized purpose only
|
||||
* @param {string} noteId
|
||||
* @param {string} prefix
|
||||
* @param {string|null} parentNoteId
|
||||
* @returns {void}
|
||||
*/
|
||||
this.setNoteToParent = treeService.setNoteToParent;
|
||||
|
||||
@@ -450,7 +440,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* Return randomly generated string of given length. This random string generation is NOT cryptographically secure.
|
||||
*
|
||||
* @method
|
||||
* @param {number} length of the string
|
||||
* @param {int} length of the string
|
||||
* @returns {string} random string
|
||||
*/
|
||||
this.randomString = utils.randomString;
|
||||
@@ -476,19 +466,143 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget
|
||||
*/
|
||||
this.refreshTree = () => {};
|
||||
|
||||
/**
|
||||
* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||
* @returns {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||
*/
|
||||
this.getAppInfo = () => appInfo
|
||||
|
||||
/**
|
||||
* Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||
*
|
||||
* @method
|
||||
* @param {object} opts
|
||||
* @property {string} opts.id - id of the launcher, only alphanumeric at least 6 characters long
|
||||
* @property {string} opts.type - one of
|
||||
* * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
|
||||
* * "script" - activating the launcher will execute the script (specified in scriptNoteId param)
|
||||
* * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
|
||||
* @property {string} opts.title
|
||||
* @property {boolean} [opts.isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
|
||||
* @property {string} [opts.icon] - name of the boxicon to be used (e.g. "bx-time")
|
||||
* @property {string} [opts.keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"
|
||||
* @property {string} [opts.targetNoteId] - for type "note"
|
||||
* @property {string} [opts.scriptNoteId] - for type "script"
|
||||
* @property {string} [opts.widgetNoteId] - for type "customWidget"
|
||||
* @returns {{note: BNote}}
|
||||
*/
|
||||
this.createOrUpdateLauncher = opts => {
|
||||
if (!opts.id) { throw new Error("ID is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (!opts.id.match(/[a-z0-9]{6,1000}/i)) { throw new Error(`ID must be an alphanumeric string at least 6 characters long.`); }
|
||||
if (!opts.type) { throw new Error("Launcher Type is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (!["note", "script", "customWidget"].includes(opts.type)) { throw new Error(`Given launcher type '${opts.type}'`); }
|
||||
if (!opts.title?.trim()) { throw new Error("Title is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (opts.type === 'note' && !opts.targetNoteId) { throw new Error("targetNoteId is mandatory for launchers of type 'note'"); }
|
||||
if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }
|
||||
if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }
|
||||
|
||||
const parentNoteId = opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';
|
||||
const noteId = 'al_' + opts.id;
|
||||
|
||||
const launcherNote =
|
||||
becca.getNote(noteId) ||
|
||||
specialNotesService.createLauncher({
|
||||
noteId: noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
launcherType: opts.type,
|
||||
}).note;
|
||||
|
||||
if (launcherNote.title !== opts.title) {
|
||||
launcherNote.title = opts.title;
|
||||
launcherNote.save();
|
||||
}
|
||||
|
||||
if (launcherNote.getParentBranches().length === 1) {
|
||||
const branch = launcherNote.getParentBranches()[0];
|
||||
|
||||
if (branch.parentNoteId !== parentNoteId) {
|
||||
branchService.moveBranchToNote(branch, parentNoteId);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.type === 'note') {
|
||||
launcherNote.setRelation('target', opts.targetNoteId);
|
||||
} else if (opts.type === 'script') {
|
||||
launcherNote.setRelation('script', opts.scriptNoteId);
|
||||
} else if (opts.type === 'customWidget') {
|
||||
launcherNote.setRelation('widget', opts.widgetNoteId);
|
||||
} else {
|
||||
throw new Error(`Unrecognized launcher type '${opts.type}'`);
|
||||
}
|
||||
|
||||
if (opts.keyboardShortcut) {
|
||||
launcherNote.setLabel('keyboardShortcut', opts.keyboardShortcut);
|
||||
} else {
|
||||
launcherNote.removeLabel('keyboardShortcut');
|
||||
}
|
||||
|
||||
if (opts.icon) {
|
||||
launcherNote.setLabel('iconClass', `bx ${opts.icon}`);
|
||||
} else {
|
||||
launcherNote.removeLabel('iconClass');
|
||||
}
|
||||
|
||||
return {note: launcherNote};
|
||||
};
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @param {string} noteId
|
||||
* @param {string} format - either 'html' or 'markdown'
|
||||
* @param {string} zipFilePath
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
this.exportSubtreeToZipFile = async (noteId, format, zipFilePath) => await exportService.exportToZipFile(noteId, format, zipFilePath);
|
||||
|
||||
/**
|
||||
* Executes given anonymous function on the frontend(s).
|
||||
* Internally this serializes the anonymous function into string and sends it to frontend(s) via WebSocket.
|
||||
* Note that there can be multiple connected frontend instances (e.g. in different tabs). In such case, all
|
||||
* instances execute the given function.
|
||||
*
|
||||
* @method
|
||||
* @param {string} script - script to be executed on the frontend
|
||||
* @param {Array.<?>} params - list of parameters to the anonymous function to be sent to frontend
|
||||
* @returns {undefined} - no return value is provided.
|
||||
*/
|
||||
this.runOnFrontend = async (script, params = []) => {
|
||||
if (typeof script === "function") {
|
||||
script = script.toString();
|
||||
}
|
||||
|
||||
ws.sendMessageToAllClients({
|
||||
type: 'execute-script',
|
||||
script: script,
|
||||
params: prepareParams(params),
|
||||
startNoteId: this.startNote.noteId,
|
||||
currentNoteId: this.currentNote.noteId,
|
||||
originEntityName: "notes", // currently there's no other entity on the frontend which can trigger event
|
||||
originEntityId: this.originEntity?.noteId || null
|
||||
});
|
||||
|
||||
function prepareParams(params) {
|
||||
if (!params) {
|
||||
return params;
|
||||
}
|
||||
|
||||
return params.map(p => {
|
||||
if (typeof p === "function") {
|
||||
return `!@#Function: ${p.toString()}`;
|
||||
}
|
||||
else {
|
||||
return p;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
|
||||
*
|
||||
* @type {{becca: Becca}}
|
||||
* @property {Becca} becca - provides access to the backend in-memory object graph, see {@link https://github.com/zadam/trilium/blob/master/src/becca/becca.js}
|
||||
*/
|
||||
this.__private = {
|
||||
becca
|
||||
@@ -506,13 +620,13 @@ module.exports = BackendScriptApi;
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
@@ -54,16 +54,22 @@ const LOG_ALL_QUERIES = false;
|
||||
});
|
||||
|
||||
function insert(tableName, rec, replace = false) {
|
||||
const keys = Object.keys(rec);
|
||||
const keys = Object.keys(rec || {});
|
||||
if (keys.length === 0) {
|
||||
log.error("Can't insert empty object into table " + tableName);
|
||||
log.error(`Can't insert empty object into table ${tableName}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const columns = keys.join(", ");
|
||||
const questionMarks = keys.map(p => "?").join(", ");
|
||||
|
||||
const query = "INSERT " + (replace ? "OR REPLACE" : "") + " INTO " + tableName + "(" + columns + ") VALUES (" + questionMarks + ")";
|
||||
const query = `INSERT
|
||||
${replace ? "OR REPLACE" : ""} INTO
|
||||
${tableName}
|
||||
(
|
||||
${columns}
|
||||
)
|
||||
VALUES (${questionMarks})`;
|
||||
|
||||
const res = execute(query, Object.values(rec));
|
||||
|
||||
@@ -75,15 +81,15 @@ function replace(tableName, rec) {
|
||||
}
|
||||
|
||||
function upsert(tableName, primaryKey, rec) {
|
||||
const keys = Object.keys(rec);
|
||||
const keys = Object.keys(rec || {});
|
||||
if (keys.length === 0) {
|
||||
log.error("Can't upsert empty object into table " + tableName);
|
||||
log.error(`Can't upsert empty object into table ${tableName}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const columns = keys.join(", ");
|
||||
|
||||
const questionMarks = keys.map(colName => "@" + colName).join(", ");
|
||||
const questionMarks = keys.map(colName => `@${colName}`).join(", ");
|
||||
|
||||
const updateMarks = keys.map(colName => `${colName} = @${colName}`).join(", ");
|
||||
|
||||
@@ -239,7 +245,7 @@ function wrap(query, func) {
|
||||
// in these cases error should be simply ignored.
|
||||
console.log(e.message);
|
||||
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
|
||||
throw e;
|
||||
@@ -278,6 +284,9 @@ function transactional(func) {
|
||||
require('../becca/becca_loader').load();
|
||||
}
|
||||
|
||||
// the maxEntityChangeId has been incremented during failed transaction, need to recalculate
|
||||
require('./entity_changes').recalculateMaxEntityChangeId();
|
||||
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -300,7 +309,7 @@ function fillParamList(paramIds, truncate = true) {
|
||||
}
|
||||
|
||||
// doing it manually to avoid this showing up on the sloq query list
|
||||
const s = stmt(`INSERT INTO param_list VALUES ` + paramIds.map(paramId => `(?)`).join(','), paramIds);
|
||||
const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`);
|
||||
|
||||
s.run(paramIds);
|
||||
}
|
||||
@@ -325,7 +334,7 @@ module.exports = {
|
||||
* @method
|
||||
* @param {string} query - SQL query with ? used as parameter placeholder
|
||||
* @param {object[]} [params] - array of params if needed
|
||||
* @return [object] - single value
|
||||
* @returns [object] - single value
|
||||
*/
|
||||
getValue,
|
||||
|
||||
@@ -335,7 +344,7 @@ module.exports = {
|
||||
* @method
|
||||
* @param {string} query - SQL query with ? used as parameter placeholder
|
||||
* @param {object[]} [params] - array of params if needed
|
||||
* @return {object} - map of column name to column value
|
||||
* @returns {object} - map of column name to column value
|
||||
*/
|
||||
getRow,
|
||||
getRowOrNull,
|
||||
@@ -346,7 +355,7 @@ module.exports = {
|
||||
* @method
|
||||
* @param {string} query - SQL query with ? used as parameter placeholder
|
||||
* @param {object[]} [params] - array of params if needed
|
||||
* @return {object[]} - array of all rows, each row is a map of column name to column value
|
||||
* @returns {object[]} - array of all rows, each row is a map of column name to column value
|
||||
*/
|
||||
getRows,
|
||||
getRawRows,
|
||||
@@ -359,7 +368,7 @@ module.exports = {
|
||||
* @method
|
||||
* @param {string} query - SQL query with ? used as parameter placeholder
|
||||
* @param {object[]} [params] - array of params if needed
|
||||
* @return {object} - map of first column to second column
|
||||
* @returns {object} - map of first column to second column
|
||||
*/
|
||||
getMap,
|
||||
|
||||
@@ -369,7 +378,7 @@ module.exports = {
|
||||
* @method
|
||||
* @param {string} query - SQL query with ? used as parameter placeholder
|
||||
* @param {object[]} [params] - array of params if needed
|
||||
* @return {object[]} - array of first column of all returned rows
|
||||
* @returns {object[]} - array of first column of all returned rows
|
||||
*/
|
||||
getColumn,
|
||||
|
||||
@@ -398,13 +407,13 @@ module.exports = {
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractEntity.html">AbstractEntity</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user