Types
Author
Section titled “Author”type Author = { id: string email: string firstName: string lastName: string avatarUrl?: string company?: string}
BlockPluginConstructor
Section titled “BlockPluginConstructor”type BlockPluginConstructor = (blockPlugin: BlockPlugin) => RichTextPlugin
type Brick<T = {}> = React.FC<T> & { schema: IBlockType<T> }
Bricks
Section titled “Bricks”type Bricks = { [key: string]: Brick<any> }
BrickStory
Section titled “BrickStory”type BrickStory<T = Props> = { id: string name: string showAsBrick?: boolean previewImageUrl?: string props: T}
Category
Section titled “Category”type type Category = { categoryName: string bricks: Brick<any>[]}
CustomRole
Section titled “CustomRole”type CustomRole = { id: string name: string}
EditingUser
Section titled “EditingUser”type EditingUser = { id: string email: string firstName: string lastName: string company: string avatarUrl?: string}
type Icon = { name: string svg: string url: string set: string}
Language
Section titled “Language”type Language = { code: string name: string}
LastEditedBy
Section titled “LastEditedBy”type LastEditedBy = { date: string user: EditingUser}
MarkPluginConstructor
Section titled “MarkPluginConstructor”type MarkPluginConstructor = (markPlugin: MarkPlugin) => RichTextPlugin
type Page = { id: string type: string name: string slug: string meta: IMeta customValues?: Props externalData?: Props content: IContentBlock[] workingContent?: IContentBlock[] committedContent?: IContentBlock[] authorId?: string author: Author invalidBlocksTypes?: string[] status: PageStatus editStatus: EditStatus isLocked: boolean tags: string[] category?: string createdAt: string publishedAt?: string scheduledForPublishingOn?: string language: string translations: Translation[] lastEditedBy: LastEditedBy}
PageFromList
Section titled “PageFromList”type PageFromList = Omit<Page, 'content'>
PageFromListWithPagination
Section titled “PageFromListWithPagination”export type PagesFromListWithPagination = { items: PageFromList[] pagination: { page: number pageSize: number totalItems: number totalPages: number }}
PageValues
Section titled “PageValues”type PageValues = Omit<Page, 'content'>
PartialPage
Section titled “PartialPage”type PartialPage = Partial<Page>
Permission
Section titled “Permission”type Permission = { canAddPage?: (user: PermissionUser, pageType: string) => boolean canAddTranslation?: ( user: PermissionUser, pageType: string, language: string ) => boolean canSeePageType?: (user: PermissionUser, pageType: string) => boolean canSeePage?: ( user: PermissionUser, page: Omit<PermissionPage, 'language'> ) => boolean canEditPage?: (user: PermissionUser, page: PermissionPage) => boolean canDeletePage?: ( user: PermissionUser, page: Omit<PermissionPage, 'language'> ) => boolean canDeleteTranslation?: (user: PermissionUser, page: PermissionPage) => boolean canUseBrick?: (user: PermissionUser, brick: PermissionBrick) => boolean}
PermissionBrick
Section titled “PermissionBrick”type PermissionBrick = { name: string category: string theme: string tags: string[]}
PermissionPage
Section titled “PermissionPage”type PermissionPage = { slug: string pageType: string language: string}
PermissionUser
Section titled “PermissionUser”type PermissionUser = { firstName: string lastName: string email: string isAdmin: boolean role: string customRole?: CustomRole}
type Props = { [key: string]: any }
RenderLocalLink
Section titled “RenderLocalLink”type RenderLocalLink = ({ href, target, className, activeClassName, isAdmin, children,}: { href: string target?: string className?: string activeClassName?: string isAdmin?: boolean children: React.ReactNode}) => React.ReactElement
RepeaterItems
Section titled “RepeaterItems”type RepeaterItemDefault = IContentBlock | Omit<IContentBlock, 'id'> | Propstype RepeaterItems<T = RepeaterItemDefault> = Array<T>
Translation
Section titled “Translation”type Translation = { language: string slug: string name: string status: PageStatus editStatus: EditStatus isLocked: boolean scheduledForPublishingOn: string}
type Theme = { themeName: string categories: Category[]}
TemplateSlot
Section titled “TemplateSlot”type TemplateSlot = { slotName: string label: string min?: number max?: number allowedBlockTypes?: string[] excludedBlockTypes?: string[] editable?: boolean getDefaultContent?: () => (string | IBrickStory | IContentBlock)[]}
type User = { id: string email: string firstName: string lastName: string company: string avatarUrl?: string isAdmin: boolean token: string appName: string appId: string appEnv: string deployHookUrl?: string deployHookMethod?: string deployHookTriggerOnScheduledPublishing: boolean deployHookStagingUrl?: string deployHookStagingMethod?: string deployHookStagingTriggerOnScheduledPublishing: boolean deployHookDevUrl?: string deployHookDevMethod?: string deployHookDevTriggerOnScheduledPublishing: boolean eventsHookUrl?: string eventsHookAuthToken?: string canCreatePage: boolean canDeletePage: boolean canDeploy: boolean canDeployStaging: boolean canDeployDev: boolean canEditPageAttributes: boolean // add to dashboard canEditSeo: boolean // add to dashboard canApprove: boolean // add to dashboard role: string customRole?: CustomRole plan: string isVerified: boolean languages: Language[] defaultLanguage: string hostname: string useWorkingCopy: boolean useApprovalWorkflow: boolean} | null