CMS / foldkit-cms

Entities and operations

Cms.Entities is Entry, Draft and Revision, related: an entry has one optional draft and many revisions. They are ordinary Entities. Register them with Remote beside your own, and list them with Crud.list; an entry's state is a derived member the server supplies with its clock.

Cms.Operations is what an author may ask, as Remote mutations: SaveDraft, DiscardDraft, Publish, Unpublish, Schedule, Unschedule, Archive, Unarchive, Restore. They are the same for every content type. SaveDraft and Publish each carry what they were based on, so a second author's save or publish is a conflict and not an overwrite. Cms.operations is the list, for Remote.make({ mutations }).

An entry's id is EntryId, branded, so an entry is not opened with a post's id. The client names something new (Cms.newEntryId()), and the first save of an id nobody has makes the entry, so an editor need not wait to learn what it edits.