Browse Source

Merge pull request #217 from provokateurin/update/notes-4.7.1

Update nextcloud notes to 4.7.1
pull/216/head
Kate 2 years ago committed by GitHub
parent
commit
a1a183d04c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      external/nextcloud-notes
  2. 5
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  3. 1
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  4. 3
      packages/nextcloud/lib/src/nextcloud.openapi.json
  5. 8
      packages/nextcloud/test/notes.dart
  6. 5
      specs/notes.json
  7. 45
      specs/templates/notes.json
  8. 2
      tool/Dockerfile.dev

2
external/nextcloud-notes vendored

@ -1 +1 @@
Subproject commit 75c6794aa8b1ef986f6f5af5d3f4408ac08c8a1d Subproject commit d80f02787c55078d36df0489cd144896daba799b

5
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -4048,7 +4048,8 @@ class NextcloudNotesNote {
enum NextcloudNotesSettings_NoteMode { enum NextcloudNotesSettings_NoteMode {
edit('edit'), edit('edit'),
preview('preview'); preview('preview'),
rich('rich');
const NextcloudNotesSettings_NoteMode(this.value); const NextcloudNotesSettings_NoteMode(this.value);
@ -4060,6 +4061,8 @@ enum NextcloudNotesSettings_NoteMode {
return NextcloudNotesSettings_NoteMode.edit; return NextcloudNotesSettings_NoteMode.edit;
case 'preview': case 'preview':
return NextcloudNotesSettings_NoteMode.preview; return NextcloudNotesSettings_NoteMode.preview;
case 'rich':
return NextcloudNotesSettings_NoteMode.rich;
default: default:
throw Exception('Can not parse NextcloudNotesSettings_NoteMode from "$value"'); throw Exception('Can not parse NextcloudNotesSettings_NoteMode from "$value"');
} }

1
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

@ -1498,6 +1498,7 @@ Map<String, dynamic> _$NextcloudNotesSettingsToJson(NextcloudNotesSettings insta
const _$NextcloudNotesSettings_NoteModeEnumMap = { const _$NextcloudNotesSettings_NoteModeEnumMap = {
NextcloudNotesSettings_NoteMode.edit: 'edit', NextcloudNotesSettings_NoteMode.edit: 'edit',
NextcloudNotesSettings_NoteMode.preview: 'preview', NextcloudNotesSettings_NoteMode.preview: 'preview',
NextcloudNotesSettings_NoteMode.rich: 'rich',
}; };
NextcloudNotificationsNotificationAction _$NextcloudNotificationsNotificationActionFromJson(Map<String, dynamic> json) { NextcloudNotificationsNotificationAction _$NextcloudNotificationsNotificationActionFromJson(Map<String, dynamic> json) {

3
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -1250,7 +1250,8 @@
"type": "string", "type": "string",
"enum": [ "enum": [
"edit", "edit",
"preview" "preview",
"rich"
] ]
} }
} }

8
packages/nextcloud/test/notes.dart

@ -115,7 +115,7 @@ Future run(final DockerImage image) async {
test('Get settings', () async { test('Get settings', () async {
final response = await client.notes.getSettings(); final response = await client.notes.getSettings();
expect(response.notesPath, 'Notes'); expect(response.notesPath, 'Notes');
expect(response.fileSuffix, '.txt'); expect(response.fileSuffix, '.md');
expect(response.noteMode, NextcloudNotesSettings_NoteMode.edit); expect(response.noteMode, NextcloudNotesSettings_NoteMode.edit);
}); });
@ -123,17 +123,17 @@ Future run(final DockerImage image) async {
var response = await client.notes.updateSettings( var response = await client.notes.updateSettings(
notesSettings: NextcloudNotesSettings( notesSettings: NextcloudNotesSettings(
notesPath: 'Test Notes', notesPath: 'Test Notes',
fileSuffix: '.md', fileSuffix: '.txt',
noteMode: NextcloudNotesSettings_NoteMode.preview, noteMode: NextcloudNotesSettings_NoteMode.preview,
), ),
); );
expect(response.notesPath, 'Test Notes'); expect(response.notesPath, 'Test Notes');
expect(response.fileSuffix, '.md'); expect(response.fileSuffix, '.txt');
expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview); expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview);
response = await client.notes.getSettings(); response = await client.notes.getSettings();
expect(response.notesPath, 'Test Notes'); expect(response.notesPath, 'Test Notes');
expect(response.fileSuffix, '.md'); expect(response.fileSuffix, '.txt');
expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview); expect(response.noteMode, NextcloudNotesSettings_NoteMode.preview);
}); });
}); });

5
specs/notes.json

@ -2,7 +2,7 @@
"openapi": "3.1.0", "openapi": "3.1.0",
"info": { "info": {
"title": "Notes", "title": "Notes",
"version": "4.6.0", "version": "4.7.1",
"description": "Distraction-free notes and writing", "description": "Distraction-free notes and writing",
"license": { "license": {
"name": "agpl", "name": "agpl",
@ -142,7 +142,8 @@
"type": "string", "type": "string",
"enum": [ "enum": [
"edit", "edit",
"preview" "preview",
"rich"
] ]
} }
} }

45
specs/templates/notes.json

@ -2,7 +2,7 @@
"openapi": "3.1.0", "openapi": "3.1.0",
"info": { "info": {
"title": "Notes", "title": "Notes",
"version": "4.6.0", "version": "4.7.1",
"description": "Distraction-free notes and writing", "description": "Distraction-free notes and writing",
"license": { "license": {
"name": "agpl", "name": "agpl",
@ -49,9 +49,28 @@
{ {
"name": "category", "name": "category",
"in": "query", "in": "query",
"required": true, "required": false,
"schema": { "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": { "/apps/notes/api/{apiVersion}/notes": {
"parameters": [ "parameters": [
{ {

2
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 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 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:install uppush # 1.2.0
RUN ./occ app:enable password_policy RUN ./occ app:enable password_policy

Loading…
Cancel
Save