@@ -361,6 +361,7 @@ if (response.success) {
361361| ` notes.add ` | 0.9.89 |
362362| ` notes.update ` | 0.9.89 |
363363| ` notes.delete ` | 0.9.89 |
364+ | ` notes.setLocation ` | 0.9.99 |
364365| ` ui.showMessage ` | 0.9.89 |
365366| ` ui.showSuccess ` | 0.9.89 |
366367| ` ui.showError ` | 0.9.89 |
@@ -3438,6 +3439,17 @@ Otzaria.linkify(document.getElementById('note'));
34383439
34393440## notes.* - הערות אישיות
34403441
3442+ להערה יש אחד משלושה סוגי מיקום (` scope` , מגרסה 0.9 .99 ):
3443+
3444+ | ` scope` | ההערה חלה על | שדות המיקום |
3445+ | -------- - | -------------- | ------------ - |
3446+ | ` 'book'` | הספר כולו, בלי מיקום | — |
3447+ | ` 'lines'` | שורה אחת, או השורות ` lineNumber` –` endLineNumber` | ` lineNumber` , ` endLineNumber` |
3448+ | ` 'words'` | מילים מסוימות בשורה אחת | ` lineNumber` , ` anchorText` |
3449+
3450+ ` lineNumber` מתחיל מ- 1 , כלומר ` sectionIndex + 1` . בספר PDF ` lineNumber` הוא מספר
3451+ עמוד, ואין בו ` 'words'` ולא ` endLineNumber` .
3452+
34413453### ` notes.list`
34423454** הרשאה: ** ` notes.read`
34433455
@@ -3447,9 +3459,20 @@ Otzaria.linkify(document.getElementById('note'));
34473459const { data } = await Otzaria.call('notes.list', {
34483460 bookId: 'בראשית'
34493461});
3450- // [{ id: "123", lineNumber: 5, content: "הערה...", contentPlain: "הערה..." }, ...]
3462+ // [{
3463+ // id: "pn_...", bookId: "בראשית",
3464+ // scope: "words", status: "located",
3465+ // lineNumber: 5, endLineNumber: null, anchorText: "ויאמר אלהים",
3466+ // content: "הערה...", contentPlain: "הערה...",
3467+ // createdAt: "2026-11-11T10:30:00.000", updatedAt: "2026-11-11T10:30:00.000"
3468+ // }, ...]
34513469` ` `
34523470
3471+ מגרסה 0.9 .99 נוספו ` bookId` , ` scope` , ` status` , ` endLineNumber` , ` anchorText` ,
3472+ ` createdAt` ו- ` updatedAt` ; במארח ישן הם חסרים. ` status` הוא ` 'located'` ,
3473+ ` 'missing'` (ההערה איבדה את מקומה כי הספר השתנה, ו- ` lineNumber` הוא ` null` ) או
3474+ ` 'book'` . ` anchorText` הן המילים בלי ניקוד ופיסוק, ו- ` null` כשההערה אינה על מילים.
3475+
34533476### ` notes.getBookNotesSummary`
34543477** הרשאה: ** ` notes.read`
34553478
@@ -3474,6 +3497,69 @@ const { data } = await Otzaria.call('notes.add', {
34743497// true
34753498` ` `
34763499
3500+ ** מיקום ההערה (מגרסה 0.9 .99 ).** בלי הפרמטרים האלה ההערה חלה על השורה ` lineNumber`
3501+ כולה, כמו קודם.
3502+
3503+ | פרמטר | פירוש |
3504+ | ------ - | ------ - |
3505+ | ` scope` | ` 'book'` להערה על הספר כולו, בלי ` lineNumber` . ` 'lines'` / ` 'words'` אופציונליים: הסוג נקבע לפי שאר הפרמטרים |
3506+ | ` endLineNumber` | הערה על השורות ` lineNumber` –` endLineNumber` |
3507+ | ` range` | הערה על מילים: עוגן בשכבת ` source` , כמו ב- ` reader.setHighlight` — ` sourceRange` של ` reader.getSelection` , או ` range` של ` reader.findTextOccurrences` עם ` layer: 'source'` |
3508+ | ` text` | הערה על מילים: המילים עצמן. ההתאמה מתעלמת מניקוד, מטעמים ומפיסוק |
3509+ | ` occurrence` | עם ` text` בלבד: איזה מופע בשורה, מ- 0. ברירת המחדל: הראשון |
3510+ | ` returnNote` | ` true` — מחזיר את ההערה שנוצרה (כמו ב- ` notes.list` , כולל ` id` ) במקום ` true` |
3511+
3512+ ` ` ` javascript
3513+ const selection = (await Otzaria.call('reader.getSelection')).data;
3514+ const { data: note } = await Otzaria.call('notes.add', {
3515+ bookId: selection.bookId,
3516+ lineNumber: selection.sectionIndex + 1,
3517+ content: 'הערה על המילים שנבחרו',
3518+ range: selection.sourceRange,
3519+ returnNote: true
3520+ });
3521+ // note.id, note.scope === 'words'
3522+
3523+ await Otzaria.call('notes.add', {
3524+ bookId: 'בראשית', lineNumber: 1, content: 'על המופע השני', text: 'את', occurrence: 1
3525+ });
3526+ await Otzaria.call('notes.add', {
3527+ bookId: 'בראשית', lineNumber: 3, endLineNumber: 5, content: 'על שלוש שורות'
3528+ });
3529+ await Otzaria.call('notes.add', {
3530+ bookId: 'בראשית', scope: 'book', content: 'על הספר כולו'
3531+ });
3532+ ` ` `
3533+
3534+ שגיאות: ` error.invalid_params` כשהפרמטרים סותרים (` range` וגם ` text` , ` scope: 'book'`
3535+ עם שורה, ` endLineNumber` עם מילים או קטן מ- ` lineNumber` ), ` range` לא תקין או בשכבה
3536+ אחרת, או שורה שאינה בספר. ` error.not_found` כשהמילים אינן בשורה; ההערה לא נוצרת.
3537+ מארח ישן מתעלם מהפרמטרים ויוצר הערה על השורה כולה (או נכשל בלי ` lineNumber` ),
3538+ ולכן תוסף שתלוי בהם צריך ` minAppVersion` של ` 0.9.99` .
3539+
3540+ ### ` notes.setLocation`
3541+ ** הרשאה: ** ` notes.write`
3542+
3543+ ** זמין מגרסה: ** ` 0.9.99`
3544+
3545+ שינוי המיקום של הערה קיימת: העברה לשורות אחרות, למילים אחרות, או לספר כולו. התוכן
3546+ אינו משתנה. הפרמטרים כמו ב- ` notes.add` , ובלי ` scope` הסוג נקבע לפיהם. מחזיר את
3547+ ההערה המעודכנת, כמו ב- ` notes.list` .
3548+
3549+ ` ` ` javascript
3550+ const { data } = await Otzaria.call('notes.setLocation', {
3551+ bookId: 'בראשית',
3552+ noteId: 'pn_...',
3553+ lineNumber: 4,
3554+ text: 'ויאמר אלהים'
3555+ });
3556+ // { id: "pn_...", scope: "words", lineNumber: 4, anchorText: "ויאמר אלהים", ... }
3557+
3558+ await Otzaria.call('notes.setLocation', { bookId: 'בראשית', noteId: 'pn_...', scope: 'book' });
3559+ ` ` `
3560+
3561+ שגיאות: כמו ב- ` notes.add` , ובנוסף ` error.not_found` כשאין הערה כזו בספר.
3562+
34773563### ` notes.update`
34783564** הרשאה: ** ` notes.write`
34793565
0 commit comments