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
Revert "feat(etapi): resolve suggestions for norms from gemini"
perfectra1n280697f2f7ef
diff --git a/apps/server/etapi.openapi.yaml b/apps/server/etapi.openapi.yamlindex 2e6f941eb2..af05bdbe57 100644--- a/apps/server/etapi.openapi.yaml+++ b/apps/server/etapi.openapi.yaml@@ -446,16 +446,15 @@ paths:schema:$ref: "#/components/schemas/EntityId"get:- description: Returns revision content identified by its ID. The Content-Type header will match the revision's MIME type.+ description: Returns revision content identified by its IDoperationId: getRevisionContentresponses:"200":- description: Revision content. The Content-Type header will be set to the revision's actual MIME type (e.g., text/html, text/plain, image/png).+ description: revision content responsecontent:- application/octet-stream:+ text/html:schema:type: string- format: binarydefault:description: unexpected errorcontent:@@ -1380,16 +1379,16 @@ components:title:type: stringdescription: Title at the time of the change (may be "[protected]" for protected notes)- currentTitle:+ current_title:type: stringdescription: Current title of the note (may be "[protected]" for protected notes)- currentIsDeleted:+ current_isDeleted:type: booleandescription: Whether the note is currently deleted- currentDeleteId:+ current_deleteId:type: stringdescription: Delete ID if the note is deleted- currentIsProtected:+ current_isProtected:type: booleandescription: Whether the note is protectedutcDate:diff --git a/apps/server/spec/etapi/note-history.spec.ts b/apps/server/spec/etapi/note-history.spec.tsindex c78e8d359c..7696c00516 100644--- a/apps/server/spec/etapi/note-history.spec.ts+++ b/apps/server/spec/etapi/note-history.spec.ts@@ -42,8 +42,8 @@ describe("etapi/note-history", () => {expect(entry).toHaveProperty("title");expect(entry).toHaveProperty("utcDate");expect(entry).toHaveProperty("date");- expect(entry).toHaveProperty("currentIsDeleted");- expect(entry).toHaveProperty("currentIsProtected");+ expect(entry).toHaveProperty("current_isDeleted");+ expect(entry).toHaveProperty("current_isProtected");});it("filters history by ancestor note", async () => {@@ -83,7 +83,7 @@ describe("etapi/note-history", () => {.expect(200);const deletedEntry = response.body.find(- (entry: any) => entry.noteId === noteToDeleteId && entry.currentIsDeleted === true+ (entry: any) => entry.noteId === noteToDeleteId && entry.current_isDeleted === true);// Deleted entries should have canBeUndeleted propertydiff --git a/apps/server/src/etapi/revisions.ts b/apps/server/src/etapi/revisions.tsindex e76877ddc5..6451b18a15 100644--- a/apps/server/src/etapi/revisions.ts+++ b/apps/server/src/etapi/revisions.ts@@ -21,10 +21,10 @@ function register(router: Router) {recentChanges = sql.getRows<RecentChangeRow>(`SELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,revisions.title,revisions.utcDateCreated AS utcDate,revisions.dateCreated AS date@@ -33,10 +33,10 @@ function register(router: Router) {UNION ALLSELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,notes.title,notes.utcDateCreated AS utcDate,notes.dateCreated AS date@@ -44,10 +44,10 @@ function register(router: Router) {UNION ALLSELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,notes.title,notes.utcDateModified AS utcDate,notes.dateModified AS date@@ -68,10 +68,10 @@ function register(router: Router) {)SELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,revisions.title,revisions.utcDateCreated AS utcDate,revisions.dateCreated AS date@@ -81,10 +81,10 @@ function register(router: Router) {UNION ALLSELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,notes.title,notes.utcDateCreated AS utcDate,notes.dateCreated AS date@@ -93,10 +93,10 @@ function register(router: Router) {UNION ALLSELECTnotes.noteId,- notes.isDeleted AS currentIsDeleted,- notes.deleteId AS currentDeleteId,- notes.title AS currentTitle,- notes.isProtected AS currentIsProtected,+ notes.isDeleted AS current_isDeleted,+ notes.deleteId AS current_deleteId,+ notes.title AS current_title,+ notes.isProtected AS current_isProtected,notes.title,notes.utcDateModified AS utcDate,notes.dateModified AS date@@ -107,17 +107,17 @@ function register(router: Router) {}for (const change of recentChanges) {- if (change.currentIsProtected) {+ if (change.current_isProtected) {if (protectedSessionService.isProtectedSessionAvailable()) {change.title = protectedSessionService.decryptString(change.title) || "[protected]";- change.currentTitle = protectedSessionService.decryptString(change.currentTitle) || "[protected]";+ change.current_title = protectedSessionService.decryptString(change.current_title) || "[protected]";} else {- change.title = change.currentTitle = "[protected]";+ change.title = change.current_title = "[protected]";}}- if (change.currentIsDeleted) {- const deleteId = change.currentDeleteId;+ if (change.current_isDeleted) {+ const deleteId = change.current_deleteId;const undeletedParentBranchIds = noteService.getUndeletedParentBranchIds(change.noteId, deleteId);diff --git a/packages/commons/src/lib/server_api.ts b/packages/commons/src/lib/server_api.tsindex 7c197a7614..a15192fd28 100644--- a/packages/commons/src/lib/server_api.ts+++ b/packages/commons/src/lib/server_api.ts@@ -56,10 +56,10 @@ export interface RevisionPojo {export interface RecentChangeRow {noteId: string;- currentIsDeleted: boolean;- currentDeleteId: string;- currentTitle: string;- currentIsProtected: boolean;+ current_isDeleted: boolean;+ current_deleteId: string;+ current_title: string;+ current_isProtected: boolean;title: string;utcDate: string;date: string;