From ba757252cc934e1be5c7f830587eea1e863d098d Mon Sep 17 00:00:00 2001 From: jld3103 Date: Wed, 22 Mar 2023 09:01:13 +0100 Subject: [PATCH] Update nextcloud notes to 4.7.1 --- external/nextcloud-notes | 2 +- .../nextcloud/lib/src/nextcloud.openapi.dart | 5 ++- .../lib/src/nextcloud.openapi.g.dart | 1 + .../nextcloud/lib/src/nextcloud.openapi.json | 3 +- packages/nextcloud/test/notes.dart | 8 ++-- specs/notes.json | 5 ++- specs/templates/notes.json | 45 +++++++++++++++++-- tool/Dockerfile.dev | 2 +- 8 files changed, 58 insertions(+), 13 deletions(-) diff --git a/external/nextcloud-notes b/external/nextcloud-notes index 75c6794a..d80f0278 160000 --- a/external/nextcloud-notes +++ b/external/nextcloud-notes @@ -1 +1 @@ -Subproject commit 75c6794aa8b1ef986f6f5af5d3f4408ac08c8a1d +Subproject commit d80f02787c55078d36df0489cd144896daba799b diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index 59d0524c..e468a542 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -4048,7 +4048,8 @@ class NextcloudNotesNote { enum NextcloudNotesSettings_NoteMode { edit('edit'), - preview('preview'); + preview('preview'), + rich('rich'); const NextcloudNotesSettings_NoteMode(this.value); @@ -4060,6 +4061,8 @@ enum NextcloudNotesSettings_NoteMode { return NextcloudNotesSettings_NoteMode.edit; case 'preview': return NextcloudNotesSettings_NoteMode.preview; + case 'rich': + return NextcloudNotesSettings_NoteMode.rich; default: throw Exception('Can not parse NextcloudNotesSettings_NoteMode from "$value"'); } diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart index 990a1cf9..42a11ef2 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart @@ -1498,6 +1498,7 @@ Map _$NextcloudNotesSettingsToJson(NextcloudNotesSettings insta const _$NextcloudNotesSettings_NoteModeEnumMap = { NextcloudNotesSettings_NoteMode.edit: 'edit', NextcloudNotesSettings_NoteMode.preview: 'preview', + NextcloudNotesSettings_NoteMode.rich: 'rich', }; NextcloudNotificationsNotificationAction _$NextcloudNotificationsNotificationActionFromJson(Map json) { diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.json b/packages/nextcloud/lib/src/nextcloud.openapi.json index 09f1ccd8..1c0b8e34 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.json +++ b/packages/nextcloud/lib/src/nextcloud.openapi.json @@ -1250,7 +1250,8 @@ "type": "string", "enum": [ "edit", - "preview" + "preview", + "rich" ] } } diff --git a/packages/nextcloud/test/notes.dart b/packages/nextcloud/test/notes.dart index 9b6fed66..9d33801b 100644 --- a/packages/nextcloud/test/notes.dart +++ b/packages/nextcloud/test/notes.dart @@ -115,7 +115,7 @@ Future run(final DockerImage image) async { test('Get settings', () async { final response = await client.notes.getSettings(); expect(response.notesPath, 'Notes'); - expect(response.fileSuffix, '.txt'); + expect(response.fileSuffix, '.md'); expect(response.noteMode, NextcloudNotesSettings_NoteMode.edit); }); @@ -123,17 +123,17 @@ Future run(final DockerImage image) async { var response = await client.notes.updateSettings( notesSettings: NextcloudNotesSettings( notesPath: 'Test Notes', - fileSuffix: '.md', + fileSuffix: '.txt', noteMode: NextcloudNotesSettings_NoteMode.preview, ), ); expect(response.notesPath, 'Test Notes'); - expect(response.fileSuffix, '.md'); + expect(response.fileSuffix, '.txt'); expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview); response = await client.notes.getSettings(); expect(response.notesPath, 'Test Notes'); - expect(response.fileSuffix, '.md'); + expect(response.fileSuffix, '.txt'); expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview); }); }); diff --git a/specs/notes.json b/specs/notes.json index 1ae7c292..3a6e21e2 100644 --- a/specs/notes.json +++ b/specs/notes.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "Notes", - "version": "4.6.0", + "version": "4.7.1", "description": "Distraction-free notes and writing", "license": { "name": "agpl", @@ -142,7 +142,8 @@ "type": "string", "enum": [ "edit", - "preview" + "preview", + "rich" ] } } diff --git a/specs/templates/notes.json b/specs/templates/notes.json index c6175b7d..d5a5b471 100644 --- a/specs/templates/notes.json +++ b/specs/templates/notes.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "Notes", - "version": "4.6.0", + "version": "4.7.1", "description": "Distraction-free notes and writing", "license": { "name": "agpl", @@ -49,9 +49,28 @@ { "name": "category", "in": "query", - "required": true, + "required": false, "schema": { - "type": "string" + "type": "string", + "default": "" + } + }, + { + "name": "content", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" } } ], @@ -433,6 +452,26 @@ } } }, + "/apps/notes/settings/migrate": { + "post": { + "operationId": "settings-migrate-TODO", + "tags": [ + "notes" + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, "/apps/notes/api/{apiVersion}/notes": { "parameters": [ { diff --git a/tool/Dockerfile.dev b/tool/Dockerfile.dev index 3c2cc700..eed07998 100644 --- a/tool/Dockerfile.dev +++ b/tool/Dockerfile.dev @@ -12,7 +12,7 @@ RUN OC_PASS="user1" ./occ user:add --password-from-env --display-name "User One" RUN OC_PASS="user2" ./occ user:add --password-from-env --display-name "User Two" user2 RUN ./occ app:install news # 21.0.0 -RUN ./occ app:install notes # 4.6.0 +RUN ./occ app:install notes # 4.7.1 RUN ./occ app:install uppush # 1.2.0 RUN ./occ app:enable password_policy