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
Enable generated etapi client
mm2179d4dcf5f1f2
diff --git a/src/etapi/attributes.js b/src/etapi/attributes.jsindex 74d3dbfa9c..b4f10c93f8 100644--- a/src/etapi/attributes.js+++ b/src/etapi/attributes.js@@ -20,7 +20,7 @@ function register(router) {'isInheritable': [v.notNull, v.isBoolean]};- eu.route(router, 'post' ,'/etapi/attributes', (req, res, next) => {+ eu.route(router, 'post' ,'/etapi/attributes/:attributeId', (req, res, next) => {if (req.body.type === 'relation') {eu.getAndCheckNote(req.body.value);}diff --git a/src/etapi/branches.js b/src/etapi/branches.jsindex 6c83c09286..6258de95c5 100644--- a/src/etapi/branches.js+++ b/src/etapi/branches.js@@ -21,7 +21,7 @@ function register(router) {'isExpanded': [v.notNull, v.isBoolean]};- eu.route(router, 'post' ,'/etapi/branches', (req, res, next) => {+ eu.route(router, 'post' ,'/etapi/branches/:branchId', (req, res, next) => {const params = {};eu.validateAndPatch(params, req.body, ALLOWED_PROPERTIES_FOR_CREATE_BRANCH);diff --git a/src/etapi/etapi.openapi.yaml b/src/etapi/etapi.openapi.yamlindex b8f0b53827..83826042c8 100644--- a/src/etapi/etapi.openapi.yaml+++ b/src/etapi/etapi.openapi.yaml@@ -31,7 +31,7 @@ paths:'201':description: note createdcontent:- application/json:+ application/json; charset=utf-8:schema:properties:note:@@ -43,7 +43,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/notes:@@ -163,13 +163,13 @@ paths:'200':description: search responsecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/SearchResponse'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/notes/{noteId}:@@ -186,13 +186,13 @@ paths:'200':description: note responsecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'patch:@@ -208,13 +208,13 @@ paths:'200':description: note updatedcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'delete:@@ -226,7 +226,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/notes/{noteId}/content:@@ -288,7 +288,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/notes/{noteId}/note-revision:@@ -315,7 +315,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/branches/{branchId}:@@ -332,13 +332,13 @@ paths:'200':description: branch responsecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Branch'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'post:@@ -357,19 +357,19 @@ paths:'200':description: branch updated (branch between parent note and child note already existed)content:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Branch''201':description: branch createdcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Branch'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'patch:@@ -385,13 +385,13 @@ paths:'200':description: branch updatedcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Branch'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'delete:@@ -405,7 +405,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/attributes/{attributeId}:@@ -422,13 +422,13 @@ paths:'200':description: attribute responsecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Attribute'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'post:@@ -444,13 +444,13 @@ paths:'201':description: attribute createdcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Attribute'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'patch:@@ -466,13 +466,13 @@ paths:'200':description: attribute updatedcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Attribute'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'delete:@@ -484,7 +484,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/refresh-note-ordering/{parentNoteId}:@@ -506,7 +506,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/inbox/{date}:@@ -527,13 +527,13 @@ paths:'200':description: inbox notecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/calendar/days/{date}:@@ -552,13 +552,13 @@ paths:'200':description: day notecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/calendar/weeks/{date}:@@ -577,13 +577,13 @@ paths:'200':description: week notecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/calendar/months/{month}:@@ -602,13 +602,13 @@ paths:'200':description: month notecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/calendar/years/{year}:@@ -627,13 +627,13 @@ paths:'200':description: year notecontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Note'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/auth/login:@@ -654,7 +654,7 @@ paths:'201':description: auth tokencontent:- application/json:+ application/json; charset=utf-8:schema:properties:authToken:@@ -665,7 +665,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/auth/logout:@@ -678,7 +678,7 @@ paths:default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'/app-info:@@ -689,13 +689,13 @@ paths:'200':description: app infocontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/AppInfo'default:description: unexpected errorcontent:- application/json:+ application/json; charset=utf-8:schema:$ref: '#/components/schemas/Error'@@ -774,7 +774,7 @@ components:type: stringtype:type: string- enum: [text, code, render, file, image, search, relationMap, book, noteMap, mermaid, webView, shortcut]+ enum: [text, code, render, file, image, search, relationMap, book, noteMap, mermaid, webView, shortcut, doc, contentWidget, launcher]mime:type: stringisProtected:@@ -810,9 +810,6 @@ components:Branch:type: objectdescription: Branch places the note into the tree, it represents the relationship between a parent note and child note- required:- - noteId- - parentNoteIdproperties:branchId:$ref: '#/components/schemas/EntityId'@@ -837,8 +834,6 @@ components:Attribute:type: objectdescription: Attribute (Label, Relation) is a key-value record attached to a note.- required:- - noteIdproperties:attributeId:$ref: '#/components/schemas/EntityId'@@ -851,7 +846,7 @@ components:enum: [label, relation]name:type: string- pattern: '^[\p{L}\p{N}_:]+'+ pattern: '^[^\s]+'example: shareCssvalue:type: string@@ -881,7 +876,7 @@ components:description: debugging info on parsing the search query enabled with &debug=true parameterEntityId:type: string- pattern: '[a-zA-Z0-9]{4,32}'+ pattern: '[a-zA-Z0-9_]{4,32}'example: evnnmvHTCgInEntityIdList:type: array@@ -889,7 +884,7 @@ components:$ref: '#/components/schemas/EntityId'LocalDateTime:type: string- pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\+[0-9]{4}'+ pattern: '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}[\+\-][0-9]{4}'example: 2021-12-31 20:18:11.939+0100UtcDateTime:type: string@@ -897,10 +892,6 @@ components:example: 2021-12-31 19:18:11.939ZAppInfo:type: object- required:- - statu- - code- - messageproperties:appVersion:type: string