@svartz/plugin-moderation
12 exported symbols.
Interfaces
| i BuildData | What the build tells the server about the vault. |
| i ModerationOptions | The `moderation` plugin's options. |
| i ModerationServerOptions | What the server module receives: the options with every default filled in. |
| i ReportRequest | `POST <endpoint>/reports/` takes this JSON body and answers 201 with `{ report: { id } }`. |
Types
| t TargetKind |
Functions
| f moderation | The `moderation` plugin: its routes and Reports panel on the server, and the Report action in the browser. |
| f mount | Browser script entry: answer `data-svartz-report` buttons, and add **Report** to a note's page actions. The build doesn't know a host app's `paths.base`, so the routes get the deployment base here, from `context`. |
Variables
| v default | The `moderation` server module: `server: { module, options }` with `ModerationServerOptions` and the build's `BuildData`. |
| v DEFAULT_REPORTS_PER_HOUR | Reports each signed-in reader may send per hour unless `limits.reportsPerHour` says otherwise. |
| v MODERATION_PLUGIN_ID | The plugin's id, and so its URL segment: `<base><mount>/_svartz/moderation/`. |
| v REASON_MAX_LENGTH | Characters in a report's reason, counted in UTF-16 code units as `maxlength` counts them. |
| v TARGET_KINDS | What a report can be about, and how each is named: a page by its slug, a commit by its full SHA, a submission by its pull request number, an annotation by its id, and an account by its handle. |