feat: add shares service layer with batch fetch and hydration

Create shares-service.ts with fetchSharesForNotes, createShare,
revokeShare, getShareByNoteId, and getSharedNote. Integrate share
tokens into hydrateNotes pipeline alongside tags, attachments,
and collaborators.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-20 22:06:41 +01:00
committed by Fred Cabassut
co-authored by Claude Opus 4.6
parent 228a724c32
commit 90996cc72d
4 changed files with 123 additions and 1 deletions
+10
View File
@@ -80,6 +80,9 @@ importers:
markdown-it:
specifier: ^14.1.1
version: 14.1.1
nanoid:
specifier: ^5.1.7
version: 5.1.7
node-diff3:
specifier: ^3.2.0
version: 3.2.0
@@ -2998,6 +3001,11 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
nanoid@5.1.7:
resolution: {integrity: sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==}
engines: {node: ^18 || >=20}
hasBin: true
napi-build-utils@2.0.0:
resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==}
@@ -6783,6 +6791,8 @@ snapshots:
nanoid@3.3.11: {}
nanoid@5.1.7: {}
napi-build-utils@2.0.0: {}
negotiator@1.0.0: {}