mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
server-ts: Convert services/backend_script_api
This commit is contained in:
@@ -25,6 +25,7 @@ import ws = require('./ws');
|
||||
import html2plaintext = require('html2plaintext');
|
||||
import { AttachmentRow, AttributeRow, BranchRow, NoteRow, NoteType } from '../becca/entities/rows';
|
||||
import TaskContext = require('./task_context');
|
||||
import { NoteParams } from './note-interface';
|
||||
|
||||
interface FoundLink {
|
||||
name: "imageLink" | "internalLink" | "includeNoteLink" | "relationMapLink",
|
||||
@@ -152,31 +153,6 @@ function getAndValidateParent(params: GetValidateParams) {
|
||||
return parentNote;
|
||||
}
|
||||
|
||||
interface NoteParams {
|
||||
/** optionally can force specific noteId */
|
||||
noteId?: string;
|
||||
branchId?: string;
|
||||
parentNoteId: string;
|
||||
templateNoteId?: string;
|
||||
title: string;
|
||||
content: string;
|
||||
type: NoteType;
|
||||
/** default value is derived from default mimes for type */
|
||||
mime?: string;
|
||||
/** default is false */
|
||||
isProtected?: boolean;
|
||||
/** default is false */
|
||||
isExpanded?: boolean;
|
||||
/** default is empty string */
|
||||
prefix?: string | null;
|
||||
/** default is the last existing notePosition in a parent + 10 */
|
||||
notePosition?: number;
|
||||
dateCreated?: string;
|
||||
utcDateCreated?: string;
|
||||
ignoreForbiddenParents?: boolean;
|
||||
target?: "into";
|
||||
}
|
||||
|
||||
function createNewNote(params: NoteParams): {
|
||||
note: BNote;
|
||||
branch: BBranch;
|
||||
|
||||
Reference in New Issue
Block a user