ContentStoreinterface
import { ContentStore } from '@mortar-kit/core'
interface ContentStoreWhere documents live: raw data by collection name and slug. Implement it
to keep content anywhere (files, a database, an API). Deliberately dumb;
createContent applies every rule.
Properties
list: (collection: string) => Promise<unknown[]>Every stored document of the collection, raw, each with
slugset by the store (the key wins). [] if none.get: (collection: string, slug: string) => Promise<unknown>The raw document under
slug(withslugset), or undefined. Throws if it exists but can't be read.put: (collection: string, doc: Doc) => Promise<void>Stores
docunderdoc.slug, replacing any document there.remove: (collection: string, slug: string) => Promise<void>Removes the document under
slug; nothing happens if there is none.