From f108775a6a822abe430971e7d708aeaf9f1e2d79 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:28:40 +0000 Subject: [PATCH 1/4] chore(deps): update dependency jsdoc to v4.0.4 --- package-lock.json | 28 ++++++++++++++-------------- package.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47e4aede6..d70bdb233 100644 --- a/package-lock.json +++ b/package-lock.json @@ -149,7 +149,7 @@ "esm": "3.2.25", "iconsur": "1.7.0", "jasmine": "5.5.0", - "jsdoc": "4.0.3", + "jsdoc": "4.0.4", "lorem-ipsum": "2.0.8", "nodemon": "3.1.7", "rcedit": "4.0.1", @@ -5399,10 +5399,11 @@ } }, "node_modules/bluebird": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz", - "integrity": "sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==", - "dev": true + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" }, "node_modules/bmp-js": { "version": "0.1.0", @@ -12020,10 +12021,11 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/jsdoc": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz", - "integrity": "sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.4.tgz", + "integrity": "sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@babel/parser": "^7.20.15", "@jsdoc/salty": "^0.2.1", @@ -12048,17 +12050,12 @@ "node": ">=12.0.0" } }, - "node_modules/jsdoc/node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "node_modules/jsdoc/node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12068,6 +12065,7 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, + "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -12080,6 +12078,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -12092,6 +12091,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, diff --git a/package.json b/package.json index 8c67cfba6..83ebcef2f 100644 --- a/package.json +++ b/package.json @@ -189,7 +189,7 @@ "esm": "3.2.25", "iconsur": "1.7.0", "jasmine": "5.5.0", - "jsdoc": "4.0.3", + "jsdoc": "4.0.4", "lorem-ipsum": "2.0.8", "nodemon": "3.1.7", "rcedit": "4.0.1", From 6bbff3efd82eb36b9060d60252c90ff358651405 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 11 Dec 2024 18:31:29 +0200 Subject: [PATCH 2/4] chore(frontend-docs): fix warnings & update --- docs/frontend_api/BasicWidget.html | 659 +++++++++++++++++- docs/frontend_api/FAttachment.html | 2 +- docs/frontend_api/FAttribute.html | 2 +- docs/frontend_api/FBranch.html | 2 +- docs/frontend_api/FNote.html | 142 ++-- docs/frontend_api/FrontendScriptApi.html | 98 +-- docs/frontend_api/NoteContextAwareWidget.html | 592 +++++++++++++++- docs/frontend_api/RightPanelWidget.html | 593 +++++++++++++++- .../frontend_api/entities_fattachment.js.html | 2 +- docs/frontend_api/entities_fattribute.js.html | 2 +- docs/frontend_api/entities_fblob.js.html | 2 +- docs/frontend_api/entities_fbranch.js.html | 2 +- docs/frontend_api/entities_fnote.js.html | 5 +- docs/frontend_api/global.html | 6 +- docs/frontend_api/index.html | 2 +- .../services_frontend_script_api.js.html | 14 +- .../frontend_api/widgets_basic_widget.js.html | 83 ++- .../widgets_note_context_aware_widget.js.html | 19 +- .../widgets_right_panel_widget.js.html | 8 +- src/public/app/widgets/basic_widget.js | 2 +- .../app/widgets/note_context_aware_widget.js | 2 +- 21 files changed, 2070 insertions(+), 169 deletions(-) diff --git a/docs/frontend_api/BasicWidget.html b/docs/frontend_api/BasicWidget.html index 2e8edd905..69f029e13 100644 --- a/docs/frontend_api/BasicWidget.html +++ b/docs/frontend_api/BasicWidget.html @@ -95,7 +95,7 @@

new BasicW
Source:
@@ -151,6 +151,176 @@

Methods

+

css(name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + +

cssBlock(block) → {this}

@@ -252,7 +422,7 @@
Parameters:
Source:
@@ -365,7 +535,95 @@

doRenderSource:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

isEnabled()

+ + + + + + +
+ Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -390,6 +648,399 @@

doRenderReturns:

+ + +
+ whether the widget is enabled. +
+ + + + + + + + + + + + + + + +

optChild(condition, …components)

+ + + + + + +
+ Conditionally adds the given components as children to this component. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
condition + + +boolean + + + + + + + + + + whether to add the components.
components + + +any + + + + + + + + + + <repeatable>
+ +
the components to be added as children to this component provided the condition is truthy.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + + + + + + + + + + + + +

optCss(condition, name, value)

+ + + + + + +
+ Sets the CSS attribute of the given name to the given value, but only if the condition provided is truthy. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
condition + + +boolean + + + + `true` in order to apply the CSS, `false` to ignore it.
name + + +string + + + + the name of the CSS attribute to set (e.g. `padding-left`).
value + + +string + + + + the value of the CSS attribute to set (e.g. `12px`).
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ self for chaining. +
+ + + + @@ -417,7 +1068,7 @@

Home

Classes

  • Based on enabled, the attribute is either set or removed.

    Parameters

    • type: AttributeType

      attribute type ('relation', 'label' etc.)

    • enabled: boolean

      toggle On or Off

    • name: string

      attribute name

    • Optionalvalue: string

      attribute value (optional)

      -

    Returns void

  • Based on enabled, label is either set or removed.

    +

Returns void

  • Based on enabled, label is either set or removed.

    Parameters

    • enabled: boolean

      toggle On or Off

    • name: string

      label name

    • Optionalvalue: string

      label value (optional)

      -

    Returns void

  • Based on enabled, relation is either set or removed.

    +

Returns void

  • Based on enabled, relation is either set or removed.

    Parameters

    • enabled: boolean

      toggle On or Off

    • name: string

      relation name

    • Optionalvalue: string

      relation value (noteId)

      -

    Returns void

+

Returns void

diff --git a/docs/backend_api/classes/becca_entities_boption.default.html b/docs/backend_api/classes/becca_entities_boption.default.html index e8f01a50c..b13ceb36f 100644 --- a/docs/backend_api/classes/becca_entities_boption.default.html +++ b/docs/backend_api/classes/becca_entities_boption.default.html @@ -1,5 +1,5 @@ default | trilium

Option represents a name-value pair, either directly configurable by the user or some system property.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
name: string
utcDateCreated: string
utcDateModified?: string
value: string

Accessors

Methods

  • Returns {
        isSynced: undefined | boolean;
        name: string;
        utcDateModified: undefined | string;
        value: string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
name: string
utcDateCreated: string
utcDateModified?: string
value: string

Accessors

Methods

  • Returns {
        isSynced: undefined | boolean;
        name: string;
        utcDateModified: undefined | string;
        value: string;
    }

  • 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.

    -

    Parameters

    • deleteId: null | string = null

    Returns void

+

Parameters

  • deleteId: null | string = null

Returns void

diff --git a/docs/backend_api/classes/becca_entities_brecent_note.default.html b/docs/backend_api/classes/becca_entities_brecent_note.default.html index 716fc9814..5d536c7b8 100644 --- a/docs/backend_api/classes/becca_entities_brecent_note.default.html +++ b/docs/backend_api/classes/becca_entities_brecent_note.default.html @@ -1,5 +1,5 @@ default | trilium

RecentNote represents recently visited note.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
noteId: string
notePath: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
noteId: string
notePath: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • 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.

    -

    Parameters

    • deleteId: null | string = null

    Returns void

+

Parameters

  • deleteId: null | string = null

Returns void

diff --git a/docs/backend_api/classes/becca_entities_brevision.default.html b/docs/backend_api/classes/becca_entities_brevision.default.html index 42a0b64e5..da201582a 100644 --- a/docs/backend_api/classes/becca_entities_brevision.default.html +++ b/docs/backend_api/classes/becca_entities_brevision.default.html @@ -1,6 +1,6 @@ default | trilium

Revision represents a snapshot of note's title and content at some point in the past. It's used for seamless note versioning.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateCreated?: string
dateLastEdited?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateCreated?: string
dateLastEdited?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • 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.

    -

    Parameters

    • deleteId: null | string = null

    Returns void

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

+

Parameters

  • deleteId: null | string = null

Returns void

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html index b50d16189..e0d1e5e48 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html @@ -1,4 +1,4 @@ -AttachmentRow | trilium
interface AttachmentRow {
    attachmentId?: string;
    blobId?: string;
    content?: string | Buffer<ArrayBufferLike>;
    contentLength?: number;
    dateModified?: string;
    isProtected?: boolean;
    mime: string;
    ownerId?: string;
    position?: number;
    role: string;
    title: string;
    utcDateModified?: string;
    utcDateScheduledForErasureSince?: string;
}

Properties

attachmentId? +AttachmentRow | trilium
interface AttachmentRow {
    attachmentId?: string;
    blobId?: string;
    content?: string | Buffer<ArrayBufferLike>;
    contentLength?: number;
    dateModified?: string;
    isProtected?: boolean;
    mime: string;
    ownerId?: string;
    position?: number;
    role: string;
    title: string;
    utcDateModified?: string;
    utcDateScheduledForErasureSince?: string;
}

Properties

attachmentId?: string
blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateModified?: string
isProtected?: boolean
mime: string
ownerId?: string
position?: number
role: string
title: string
utcDateModified?: string
utcDateScheduledForErasureSince?: string
+

Properties

attachmentId?: string
blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateModified?: string
isProtected?: boolean
mime: string
ownerId?: string
position?: number
role: string
title: string
utcDateModified?: string
utcDateScheduledForErasureSince?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html index 13232fc56..badc7f521 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html @@ -1,4 +1,4 @@ -AttributeRow | trilium
interface AttributeRow {
    attributeId?: string;
    isInheritable?: boolean;
    name: string;
    noteId?: string;
    position?: null | number;
    type: AttributeType;
    utcDateModified?: string;
    value?: string;
}

Properties

attributeId? +AttributeRow | trilium
interface AttributeRow {
    attributeId?: string;
    isInheritable?: boolean;
    name: string;
    noteId?: string;
    position?: null | number;
    type: AttributeType;
    utcDateModified?: string;
    value?: string;
}

Properties

attributeId?: string
isInheritable?: boolean
name: string
noteId?: string
position?: null | number
utcDateModified?: string
value?: string
+

Properties

attributeId?: string
isInheritable?: boolean
name: string
noteId?: string
position?: null | number
utcDateModified?: string
value?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html index f5a23e08a..2f038e1c2 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html @@ -1,6 +1,6 @@ -BlobRow | trilium
interface BlobRow {
    blobId: string;
    content: string | Buffer<ArrayBufferLike>;
    contentLength: number;
    dateModified: string;
    utcDateModified: string;
}

Properties

blobId +BlobRow | trilium
interface BlobRow {
    blobId: string;
    content: string | Buffer<ArrayBufferLike>;
    contentLength: number;
    dateModified: string;
    utcDateModified: string;
}

Properties

blobId: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateModified: string
utcDateModified: string
+

Properties

blobId: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateModified: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html index b5225a135..293f63d5e 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html @@ -1,4 +1,4 @@ -BranchRow | trilium
interface BranchRow {
    branchId?: string;
    isDeleted?: boolean;
    isExpanded?: boolean;
    noteId: string;
    notePosition?: null | number;
    parentNoteId: string;
    prefix?: null | string;
    utcDateModified?: string;
}

Properties

branchId? +BranchRow | trilium
interface BranchRow {
    branchId?: string;
    isDeleted?: boolean;
    isExpanded?: boolean;
    noteId: string;
    notePosition?: null | number;
    parentNoteId: string;
    prefix?: null | string;
    utcDateModified?: string;
}

Properties

branchId?: string
isDeleted?: boolean
isExpanded?: boolean
noteId: string
notePosition?: null | number
parentNoteId: string
prefix?: null | string
utcDateModified?: string
+

Properties

branchId?: string
isDeleted?: boolean
isExpanded?: boolean
noteId: string
notePosition?: null | number
parentNoteId: string
prefix?: null | string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html index 6a8afd207..f21d78572 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html @@ -1,7 +1,7 @@ -EtapiTokenRow | trilium
interface EtapiTokenRow {
    etapiTokenId?: string;
    isDeleted?: boolean;
    name: string;
    tokenHash: string;
    utcDateCreated?: string;
    utcDateModified?: string;
}

Properties

etapiTokenId? +EtapiTokenRow | trilium
interface EtapiTokenRow {
    etapiTokenId?: string;
    isDeleted?: boolean;
    name: string;
    tokenHash: string;
    utcDateCreated?: string;
    utcDateModified?: string;
}

Properties

etapiTokenId?: string
isDeleted?: boolean
name: string
tokenHash: string
utcDateCreated?: string
utcDateModified?: string
+

Properties

etapiTokenId?: string
isDeleted?: boolean
name: string
tokenHash: string
utcDateCreated?: string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html index e1ec0ca59..4a56f60b9 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html @@ -1,4 +1,4 @@ -NoteRow | trilium
interface NoteRow {
    blobId: string;
    content?: string | Buffer<ArrayBufferLike>;
    dateCreated: string;
    dateModified: string;
    deleteId: string;
    isDeleted: boolean;
    isProtected: boolean;
    mime: string;
    noteId: string;
    title: string;
    type:
        | "search"
        | "file"
        | "text"
        | "code"
        | "relationMap"
        | "render"
        | "book"
        | "mermaid"
        | "canvas"
        | "image"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "webView"
        | "mindMap";
    utcDateCreated: string;
    utcDateModified: string;
}

Properties

blobId +NoteRow | trilium
interface NoteRow {
    blobId: string;
    content?: string | Buffer<ArrayBufferLike>;
    dateCreated: string;
    dateModified: string;
    deleteId: string;
    isDeleted: boolean;
    isProtected: boolean;
    mime: string;
    noteId: string;
    title: string;
    type:
        | "search"
        | "file"
        | "text"
        | "code"
        | "relationMap"
        | "render"
        | "book"
        | "mermaid"
        | "canvas"
        | "image"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "webView"
        | "mindMap";
    utcDateCreated: string;
    utcDateModified: string;
}

Properties

blobId: string
content?: string | Buffer<ArrayBufferLike>
dateCreated: string
dateModified: string
deleteId: string
isDeleted: boolean
isProtected: boolean
mime: string
noteId: string
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified: string
+

Properties

blobId: string
content?: string | Buffer<ArrayBufferLike>
dateCreated: string
dateModified: string
deleteId: string
isDeleted: boolean
isProtected: boolean
mime: string
noteId: string
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html index 951402e00..6b9427cd8 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html @@ -1,11 +1,11 @@ OptionRow | trilium

Database representation of an option.

Options are key-value pairs that are used to store information such as user preferences (for example the current theme, sync server information), but also information about the state of the application).

-
interface OptionRow {
    isSynced: boolean;
    name: string;
    utcDateModified?: string;
    value: string;
}

Properties

interface OptionRow {
    isSynced: boolean;
    name: string;
    utcDateModified?: string;
    value: string;
}

Properties

isSynced: boolean

true if the value should be synced across multiple instances (e.g. locale) or false if it should be local-only (e.g. theme).

-
name: string

The name of the option.

-
utcDateModified?: string
value: string

The value of the option.

-
+
name: string

The name of the option.

+
utcDateModified?: string
value: string

The value of the option.

+
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html index d7458d9da..d4fdb1f9d 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html @@ -1,4 +1,4 @@ -RecentNoteRow | trilium
interface RecentNoteRow {
    noteId: string;
    notePath: string;
    utcDateCreated?: string;
}

Properties

noteId +RecentNoteRow | trilium
interface RecentNoteRow {
    noteId: string;
    notePath: string;
    utcDateCreated?: string;
}

Properties

noteId: string
notePath: string
utcDateCreated?: string
+

Properties

noteId: string
notePath: string
utcDateCreated?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html index a6a5402d3..64ed1ab21 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html @@ -1,4 +1,4 @@ -RevisionRow | trilium
interface RevisionRow {
    blobId?: string;
    contentLength?: number;
    dateCreated: string;
    dateLastEdited?: string;
    isProtected?: boolean;
    mime: string;
    noteId: string;
    revisionId?: string;
    title: string;
    type: string;
    utcDateCreated: string;
    utcDateLastEdited?: string;
    utcDateModified: string;
}

Properties

blobId? +RevisionRow | trilium
interface RevisionRow {
    blobId?: string;
    contentLength?: number;
    dateCreated: string;
    dateLastEdited?: string;
    isProtected?: boolean;
    mime: string;
    noteId: string;
    revisionId?: string;
    title: string;
    type: string;
    utcDateCreated: string;
    utcDateLastEdited?: string;
    utcDateModified: string;
}

Properties

blobId?: string
contentLength?: number
dateCreated: string
dateLastEdited?: string
isProtected?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified: string
+

Properties

blobId?: string
contentLength?: number
dateCreated: string
dateLastEdited?: string
isProtected?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified: string
diff --git a/docs/backend_api/types/becca_entities_rows.AttributeType.html b/docs/backend_api/types/becca_entities_rows.AttributeType.html index 26f515f7b..c55212d07 100644 --- a/docs/backend_api/types/becca_entities_rows.AttributeType.html +++ b/docs/backend_api/types/becca_entities_rows.AttributeType.html @@ -1 +1 @@ -AttributeType | trilium
AttributeType: "label" | "relation" | "label-definition" | "relation-definition"
+AttributeType | trilium
AttributeType: "label" | "relation" | "label-definition" | "relation-definition"
diff --git a/docs/backend_api/types/becca_entities_rows.NoteType.html b/docs/backend_api/types/becca_entities_rows.NoteType.html index f509dd66e..8352415bc 100644 --- a/docs/backend_api/types/becca_entities_rows.NoteType.html +++ b/docs/backend_api/types/becca_entities_rows.NoteType.html @@ -1 +1 @@ -NoteType | trilium
NoteType: typeof ALLOWED_NOTE_TYPES[number]
+NoteType | trilium
NoteType: typeof ALLOWED_NOTE_TYPES[number]
diff --git a/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html index 57d702701..9e0de4bf4 100644 --- a/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html +++ b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html @@ -1,4 +1,4 @@ ALLOWED_NOTE_TYPES | trilium

Variable ALLOWED_NOTE_TYPESConst

ALLOWED_NOTE_TYPES: readonly [
    "file",
    "image",
    "search",
    "noteMap",
    "launcher",
    "doc",
    "contentWidget",
    "text",
    "relationMap",
    "render",
    "canvas",
    "mermaid",
    "book",
    "webView",
    "code",
    "mindMap",
] = ...

There are many different Note types, some of which are entirely opaque to the end user. Those types should be used only for checking against, they are not for direct use.

-
+
diff --git a/docs/backend_api/variables/services_backend_script_api.default.html b/docs/backend_api/variables/services_backend_script_api.default.html index 7f9939dd7..0411fa280 100644 --- a/docs/backend_api/variables/services_backend_script_api.default.html +++ b/docs/backend_api/variables/services_backend_script_api.default.html @@ -1 +1 @@ -default | trilium
default: new (currentNote: default, apiParams: ApiParams) => Api
+default | trilium
default: new (currentNote: default, apiParams: ApiParams) => Api
diff --git a/docs/backend_api/variables/services_sql.default.html b/docs/backend_api/variables/services_sql.default.html index ccc3ed24f..037d90e28 100644 --- a/docs/backend_api/variables/services_sql.default.html +++ b/docs/backend_api/variables/services_sql.default.html @@ -1,7 +1,7 @@ default | trilium
default: {
    copyDatabase: (targetFilePath: string) => Promise<void>;
    dbConnection: Database;
    disableSlowQueryLogging: <T>(cb: () => T) => T;
    execute: (query: string, params?: any) => RunResult;
    executeMany: (query: string, params: any) => void;
    executeScript: (query: string) => DatabaseType;
    fillParamList: (
        paramIds: string[] | Set<string>,
        truncate?: boolean,
    ) => void;
    getColumn: <T>(query: string, params?: any) => T[];
    getManyRows: <T>(query: string, params: any) => T[];
    getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>;
    getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[];
    getRow: <T>(query: string, params?: any) => T;
    getRowOrNull: <T>(query: string, params?: any) => T | null;
    getRows: <T>(query: string, params?: any) => T[];
    getValue: <T>(query: string, params?: any) => T;
    insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint;
    iterateRows: <T>(query: string, params?: any) => IterableIterator<T>;
    rebuildIntegrationTestDatabase: () => void;
    replace: <T extends {}>(tableName: string, rec: T) => number | null;
    transactional: <T>(
        func: (statement: Statement<unknown[], unknown>) => T,
    ) => any;
    upsert: <T extends {}>(
        tableName: string,
        primaryKey: string,
        rec: T,
    ) => void;
}

Type declaration

  • copyDatabase: (targetFilePath: string) => Promise<void>
  • dbConnection: Database
  • disableSlowQueryLogging: <T>(cb: () => T) => T
  • execute: (query: string, params?: any) => RunResult

    Execute SQL

    -
  • executeMany: (query: string, params: any) => void
  • executeScript: (query: string) => DatabaseType
  • fillParamList: (paramIds: string[] | Set<string>, truncate?: boolean) => void
  • getColumn: <T>(query: string, params?: any) => T[]

    Get a first column in an array.

    -
  • getManyRows: <T>(query: string, params: any) => T[]
  • getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>

    Get a map of first column mapping to second column.

    -
  • getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[]
  • getRow: <T>(query: string, params?: any) => T

    Get first returned row.

    -
  • getRowOrNull: <T>(query: string, params?: any) => T | null
  • getRows: <T>(query: string, params?: any) => T[]

    Get all returned rows.

    -
  • getValue: <T>(query: string, params?: any) => T

    Get single value from the given query - first column from first returned row.

    -
  • insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint
  • iterateRows: <T>(query: string, params?: any) => IterableIterator<T>
  • rebuildIntegrationTestDatabase: () => void
  • replace: <T extends {}>(tableName: string, rec: T) => number | null
  • transactional: <T>(func: (statement: Statement<unknown[], unknown>) => T) => any
  • upsert: <T extends {}>(tableName: string, primaryKey: string, rec: T) => void
+
  • executeMany: (query: string, params: any) => void
  • executeScript: (query: string) => DatabaseType
  • fillParamList: (paramIds: string[] | Set<string>, truncate?: boolean) => void
  • getColumn: <T>(query: string, params?: any) => T[]

    Get a first column in an array.

    +
  • getManyRows: <T>(query: string, params: any) => T[]
  • getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>

    Get a map of first column mapping to second column.

    +
  • getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[]
  • getRow: <T>(query: string, params?: any) => T

    Get first returned row.

    +
  • getRowOrNull: <T>(query: string, params?: any) => T | null
  • getRows: <T>(query: string, params?: any) => T[]

    Get all returned rows.

    +
  • getValue: <T>(query: string, params?: any) => T

    Get single value from the given query - first column from first returned row.

    +
  • insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint
  • iterateRows: <T>(query: string, params?: any) => IterableIterator<T>
  • rebuildIntegrationTestDatabase: () => void
  • replace: <T extends {}>(tableName: string, rec: T) => number | null
  • transactional: <T>(func: (statement: Statement<unknown[], unknown>) => T) => any
  • upsert: <T extends {}>(tableName: string, primaryKey: string, rec: T) => void
  • diff --git a/src/services/sql.ts b/src/services/sql.ts index 0f1cf5ea4..d2b14c669 100644 --- a/src/services/sql.ts +++ b/src/services/sql.ts @@ -347,7 +347,6 @@ export default { /** * Get single value from the given query - first column from first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns single value @@ -357,7 +356,6 @@ export default { /** * Get first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of column name to column value @@ -368,7 +366,6 @@ export default { /** * Get all returned rows. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - array of all rows, each row is a map of column name to column value @@ -381,7 +378,6 @@ export default { /** * Get a map of first column mapping to second column. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of first column to second column @@ -391,7 +387,6 @@ export default { /** * Get a first column in an array. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns array of first column of all returned rows @@ -401,7 +396,6 @@ export default { /** * Execute SQL * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed */