Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Misc docs
Arne Keller6467265cfda6
diff --git a/_regroup/bin/generate-openapi.ts b/_regroup/bin/generate-openapi.tsindex e1c54dca7c..c422f93abf 100644--- a/_regroup/bin/generate-openapi.ts+++ b/_regroup/bin/generate-openapi.ts@@ -34,6 +34,7 @@ const options = {"./src/routes/api/setup.ts",// all other files"./src/routes/api/*.ts",+ "./src/routes/*.ts","./bin/generate-openapi.ts"]};@@ -68,7 +69,7 @@ console.log("Saved to ", outputPath);* $ref: "#/components/schemas/NoteId"* type:* type: string- * enum: ["attribute", "relation"]+ * enum: ["label", "relation"]* name:* type: string* example: "internalLink"@@ -100,6 +101,7 @@ console.log("Saved to ", outputPath);* $ref: "#/components/schemas/UtcDateTime"* Branch:* type: object+ * required: ["branchId", "noteId", "parentNoteId", "notePosition"]* properties:* branchId:* $ref: "#/components/schemas/BranchId"@@ -142,6 +144,7 @@ console.log("Saved to ", outputPath);* description: Encoded entity data. Object has one property for each database column.* Note:* type: object+ * required: ["noteId", "title", "isProtected", "type", "mime", "blobId"]* properties:* noteId:* $ref: "#/components/schemas/NoteId"diff --git a/apps/server/src/routes/login.ts b/apps/server/src/routes/login.tsindex 1b2d42b250..877d655773 100644--- a/apps/server/src/routes/login.ts+++ b/apps/server/src/routes/login.ts@@ -62,6 +62,36 @@ function setPassword(req: Request, res: Response) {res.redirect("login");}+/**+ * @swagger+ * /login:+ * post:+ * tags:+ * - auth+ * summary: Log in using password+ * description: This will give you a Trilium session, which is required for some other API endpoints. `totpToken` is only required if the user configured TOTP authentication.+ * operationId: login-normal+ * externalDocs:+ * description: HMAC calculation+ * url: https://github.com/TriliumNext/Notes/blob/v0.91.6/src/services/utils.ts#L62-L66+ * requestBody:+ * content:+ * application/x-www-form-urlencoded:+ * schema:+ * type: object+ * required:+ * - password+ * properties:+ * password:+ * type: string+ * totpToken:+ * type: string+ * responses:+ * '200':+ * description: Successful operation+ * '401':+ * description: Password / TOTP mismatch+ */function login(req: Request, res: Response) {if (openID.isOpenIDEnabled()) {res.oidc.login({diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Development and architecture/Database/attachments.md b/docs/Developer Guide/Developer Guide/Old documentation/Development and architecture/Database/attachments.mdindex 3645b15c76..274233e4f4 100644--- a/docs/Developer Guide/Developer Guide/Old documentation/Development and architecture/Database/attachments.md+++ b/docs/Developer Guide/Developer Guide/Old documentation/Development and architecture/Database/attachments.md@@ -1,2 +1,2 @@# attachments-<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>attachmentId</code></th><td>Text</td><td>Non-null</td><td> </td><td>Unique ID (e.g. <code>qhC1vzU4nwSE</code>)</td></tr><tr><th><code>ownerId</code></th><td>Text</td><td>Non-null</td><td> </td><td>The unique ID of a row in <a class="reference-link" href="notes.md">notes</a>.</td></tr><tr><th><code>role</code></th><td>Text</td><td>Non-null</td><td> </td><td>The role of the attachment: <code>image</code> for images that are attached to a note.</td></tr><tr><th><code>mime</code></th><td>Text</td><td>Non-null</td><td> </td><td>The MIME type of the attachment (e.g. <code>image/png</code>)</td></tr><tr><th><code>title</code></th><td>Text</td><td>Non-null</td><td> </td><td>The title of the attachment.</td></tr><tr><th><code>isProtected</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Protected%20entities.md">protected</a>, <code>0</code> otherwise.</td></tr><tr><th><code>position</code></th><td>Integer</td><td>Non-null</td><td>0</td><td>Not sure where the position is relevant for attachments (saw it with values of 10 and 0).</td></tr><tr><th><code>blobId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>The corresponding <code>blobId</code> from the <a class="reference-link" href="blobs.md">blobs</a> table.</td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td> </td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td> </td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateScheduledForErasure</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td> </td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td> </td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td> </td></tr></tbody></table></figure>\ No newline at end of file+<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Column Name</th><th>Data Type</th><th>Nullity</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><th><code>attachmentId</code></th><td>Text</td><td>Non-null</td><td> </td><td>Unique ID (e.g. <code>qhC1vzU4nwSE</code>)</td></tr><tr><th><code>ownerId</code></th><td>Text</td><td>Non-null</td><td> </td><td>The unique ID of a row in <a class="reference-link" href="notes.md">notes</a>.</td></tr><tr><th><code>role</code></th><td>Text</td><td>Non-null</td><td> </td><td>The role of the attachment: <code>image</code> for images that are attached to a note, <code>file</code> for uploaded files.</td></tr><tr><th><code>mime</code></th><td>Text</td><td>Non-null</td><td> </td><td>The MIME type of the attachment (e.g. <code>image/png</code>)</td></tr><tr><th><code>title</code></th><td>Text</td><td>Non-null</td><td> </td><td>The title of the attachment.</td></tr><tr><th><code>isProtected</code></th><td>Integer</td><td>Non-null</td><td>0</td><td><code>1</code> if the entity is <a href="../Protected%20entities.md">protected</a>, <code>0</code> otherwise.</td></tr><tr><th><code>position</code></th><td>Integer</td><td>Non-null</td><td>0</td><td>Not sure where the position is relevant for attachments (saw it with values of 10 and 0).</td></tr><tr><th><code>blobId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td>The corresponding <code>blobId</code> from the <a class="reference-link" href="blobs.md">blobs</a> table.</td></tr><tr><th><code>dateModified</code></th><td>Text</td><td>Non-null</td><td> </td><td>Localized modification date (e.g. <code>2023-11-08 18:43:44.204+0200</code>)</td></tr><tr><th><code>utcDateModified</code></th><td>Text</td><td>Non-null</td><td> </td><td>Modification date in UTC format (e.g. <code>2023-11-08 16:43:44.204Z</code>)</td></tr><tr><th><code>utcDateScheduledForErasure</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td> </td></tr><tr><th><code>isDeleted</code></th><td>Integer</td><td>Non-null</td><td> </td><td><code>1</code> if the entity is <a href="../Deleted%20notes.md">deleted</a>, <code>0</code> otherwise.</td></tr><tr><th><code>deleteId</code></th><td>Text</td><td>Nullable</td><td><code>null</code></td><td> </td></tr></tbody></table></figure>\ No newline at end of file