Introduction
The GeneralTypes
module in OneEntry Headless CMS is designed to manage and retrieve general types used within the system. By using the defineOneEntry
function, you can create a GeneralTypes
object to interact with these types. The primary method available is getAllTypes
, which retrieves all objects of type GeneralTypeEntity
from the API. This method returns a Promise that resolves to an array of GeneralTypeEntity
objects, each containing an id
and a type
. The types cover various purposes, such as page layouts, forms, product blocks, and more, providing flexibility for different content management needs.
const config = {
token:'your-app-token',
};
const { GeneralTypes } = defineOneEntry('your-url', config);