diff --git a/docs/create-angular-plugin.md b/docs/create-angular-plugin.md index e5377a9..591a015 100644 --- a/docs/create-angular-plugin.md +++ b/docs/create-angular-plugin.md @@ -27,11 +27,11 @@ Next, create a `manifest.json` file inside the `/src/assets` directory. This fil "code": "/assets/plugin.js", "icon": "/assets/icon.png", "permissions": [ - "content:read", "content:write", - "library:read", "library:write", - "user:read" + "user:read", + "comment:read", + "allow:downloads" ] } ``` diff --git a/docs/create-plugin.md b/docs/create-plugin.md index 637271b..e886ff6 100644 --- a/docs/create-plugin.md +++ b/docs/create-plugin.md @@ -31,11 +31,11 @@ Next, create a `manifest.json` file inside the `/public` directory. This file is "code": "/plugin.js", "icon": "/icon.png", "permissions": [ - "content:read", "content:write", - "library:read", "library:write", - "user:read" + "user:read", + "comment:read", + "allow:downloads" ] } ``` diff --git a/libs/plugin-types/index.d.ts b/libs/plugin-types/index.d.ts index 0a00515..4396672 100644 --- a/libs/plugin-types/index.d.ts +++ b/libs/plugin-types/index.d.ts @@ -497,6 +497,7 @@ export interface Comment { /** * Remove the current comment from its comment thread. Only the owner can remove their comments. + * Requires the `comment:write` permission. */ remove(): void; } @@ -535,18 +536,21 @@ export interface CommentThread { /** * List of `comments` ordered by creation date. + * Requires the `comment:read` o `comment:write` permission. */ findComments(): Promise; /** * Creates a new comment after the last one in the thread. The current user will * be used as the creation user. + * Requires the `comment:write` permission. */ reply(content: string): Promise; /** * Removes the current comment thread. Only the user that created the thread can * remove it. + * Requires the `comment:write` permission. */ remove(): void; } @@ -2840,11 +2844,13 @@ export interface Page extends PluginData { * Creates a new comment thread in the `position`. Optionaly adds * it into the `board`. * Returns the thread created. + * Requires the `comment:write` permission. */ addCommentThread(content: string, position: Point): Promise; /** * Removes the comment thread. + * Requires the `comment:read` or `comment:write` permission. */ removeCommentThread(commentThread: CommentThread): Promise; @@ -2854,8 +2860,9 @@ export interface Page extends PluginData { * user has engaged. * - `showResolved`: by default resolved comments will be hidden. If `true` * the resolved will be returned. + * Requires the `comment:read` or `comment:write` permission. */ - findCommentThreads(criteria: { + findCommentThreads(criteria?: { onlyYours: boolean; showResolved: boolean; }): Promise;