Adds duplicateSubtree to backend API.

This commit is contained in:
Geekswordsman
2025-08-07 15:33:43 -04:00
parent faa40494d8
commit 8e04690568
2 changed files with 13 additions and 4 deletions

View File

@@ -412,6 +412,13 @@ export interface Api {
*/
backupNow(backupName: string): Promise<string>;
/**
* Exposes the backend duplicateSubtree to the API
* @param origNoteId - the noteId for the original note to be duplicated
* @param newParentNoteId - the noteId for the parent note where the duplication is to be placed.
*/
duplicateSubtree(origNoteId: string, newParentNoteId: string): { note: BNote; branch: BBranch; }
/**
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
*/
@@ -703,6 +710,7 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) {
this.runOutsideOfSync = syncMutex.doExclusively;
this.backupNow = backupService.backupNow;
this.duplicateSubtree = noteService.duplicateSubtree;
this.__private = {
becca