divan/api/src
Anas Rashid 19af91c594 Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51)
- revisions (a work's Divan text, summary, status, author/reviewer/publisher, the text it started from)
  and revision_events (who did what, with comments): the review thread and the moderation log.
- API (api/src/moderation.ts): what a moderator may do on a work, queue, drafts (one open draft per
  person and work), save, submit, approve, return/reject (reason required), publish; history; log.
  Rules come from the IAM grants: L2 drafts, an L1 covering the work reviews, an admin publishes; L1
  drafts go to the admin, admin drafts publish directly. Publishing numbers the version, writes it
  to divan-data (owned.ts) and updates the site; a draft based on an older version is refused (409).
- Line diff (api/src/diff.ts) against the text a draft started from.
- Site: ترمیم کریں / تاریخچہ on works, /mod (queue, activity log), /mod/rev/<id> (editor with the Urdu
  keyboard and Roman typing, diff, preview, actions, timeline), /mod/work/<id> (versions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:31:47 +02:00
..
admin-cli.ts Admin panel: users, password reset on request, disable, roles, delete, audit log (#27) 2026-10-08 23:08:19 +02:00
admin.test.ts Admin panel: users, password reset on request, disable, roles, delete, audit log (#27) 2026-10-08 23:08:19 +02:00
admin.ts Permissions (IAM): L2/L1 moderators and scoped grants (#29) 2026-10-08 23:13:06 +02:00
auth.test.ts Profile: full name and bio (#42) 2026-10-08 23:31:19 +02:00
auth.ts Profile: full name and bio (#42) 2026-10-08 23:31:19 +02:00
db.ts Divan v2: Node.js API + PostgreSQL (proof of concept) 2026-10-08 20:24:20 +02:00
dict-sync.ts Word dictionary: full Wiktionary data for Urdu, Persian and Arabic in PostgreSQL, kept in sync 2026-10-08 21:48:56 +02:00
dictionary.test.ts Word dictionary in full: all senses with usage examples, every IPA with dialect labels, every recording, full etymologies, synonyms, derived and related words 2026-10-08 22:27:37 +02:00
dictionary.ts Word dictionary in full: all senses with usage examples, every IPA with dialect labels, every recording, full etymologies, synonyms, derived and related words 2026-10-08 22:27:37 +02:00
diff.ts Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51) 2026-10-09 00:31:47 +02:00
divantext.test.ts Divan-owned content (#30): write works as Divan text + generated JSON for divan-data; headings; content management model 2026-10-09 00:22:31 +02:00
divantext.ts Divan-owned content (#30): write works as Divan text + generated JSON for divan-data; headings; content management model 2026-10-09 00:22:31 +02:00
import.ts Radif per ghazal, matla/maqta labels, pen name set apart; contents grouped by radif letter 2026-10-08 21:27:43 +02:00
library.test.ts Bookmarks with 🔖 for poets, books/chapters and poems; word book on its own page 2026-10-08 23:58:59 +02:00
library.ts Bookmarks with 🔖 for poets, books/chapters and poems; word book on its own page 2026-10-08 23:58:59 +02:00
moderation.test.ts Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51) 2026-10-09 00:31:47 +02:00
moderation.ts Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51) 2026-10-09 00:31:47 +02:00
owned.ts Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51) 2026-10-09 00:31:47 +02:00
permissions.test.ts Permissions (IAM): L2/L1 moderators and scoped grants (#29) 2026-10-08 23:13:06 +02:00
permissions.ts Permissions (IAM): L2/L1 moderators and scoped grants (#29) 2026-10-08 23:13:06 +02:00
search.test.ts Search: poets/writers and books separate from content; numbered pages; filter by authors with Urdu input 2026-10-09 00:14:26 +02:00
search.ts Search: poets/writers and books separate from content; numbered pages; filter by authors with Urdu input 2026-10-09 00:14:26 +02:00
server.ts Moderation: versions of works and the L2 -> L1 -> admin pipeline (#31, #51) 2026-10-09 00:31:47 +02:00
urdu.test.ts Search: highlighted matches, matching couplet or prose excerpt, exact phrase first; opened pages keep the highlight (?hl=) 2026-10-08 21:30:42 +02:00
urdu.ts Search: highlighted matches, matching couplet or prose excerpt, exact phrase first; opened pages keep the highlight (?hl=) 2026-10-08 21:30:42 +02:00