Skip to main content

Types

Author​

type Author = {
id: string
email: string
firstName: string
lastName: string
avatarUrl?: string
company?: string
}

BlockPluginConstructor​

type BlockPluginConstructor = (blockPlugin: BlockPlugin) => RichTextPlugin

Brick​

type Brick<T = {}> = React.FC<T> & { schema: IBlockType }

Bricks​

type Bricks = { [key: string]: Brick<any> }

BrickStory​

type BrickStory = {
id: string
name: string
imageUrl?: string
props: Props
}

Language​

type Language = {
code: string
name: string
}

MarkPluginConstructor​

type MarkPluginConstructor = (markPlugin: MarkPlugin) => RichTextPlugin

Page​

type Page = {
id: string
type: string
name: string
slug: string
meta: IMeta
customValues?: Props
externalData?: Props
content: IContentBlock[]
authorId?: string
author: Author
invalidBlocksTypes?: string[]
status: PageStatus
isLocked: boolean
tags: string[]
createdAt: string
publishedAt?: string
language: string
translations: Translation[]
}

PageFromList​

type PageFromList = Omit<Page, 'content'>

PageFromListWithPagination​

export type PagesFromListWithPagination = {
items: PageFromList[]
pagination: {
page: number
pageSize: number
totalItems: number
totalPages: number
}
}

PageValues​

type PageValues = Omit<Page, 'content'>

PartialPage​

type PartialPage = {
id?: string
type?: string
name?: string
slug?: string
meta?: IMeta
content?: IContentBlock[]
authorId?: string
author?: Author
invalidBlocksTypes?: string[]
status?: PageStatus
isLocked?: boolean
tags?: string[]
createdAt?: string
publishedAt?: string
language?: string
translations?: string[]
}

Props​

type Props = { [key: string]: any }
type RenderLocalLink = ({
href,
target,
className,
activeClassName,
isAdmin,
children,
}: {
href: string
target?: string
className?: string
activeClassName?: string
isAdmin?: boolean
children: React.ReactNode
}) => React.ReactElement

Translation​

type Translation = {
language: string
slug: string
}

User​

type User = {
id: string
email: string
firstName: string
lastName: string
company: string
avatarUrl?: string
isAdmin: boolean
token: string
appName: string
deployHookUrl?: string
deployHookMethod?: string
deployHookTriggerOnScheduledPublishing: boolean
deployHookStagingUrl?: string
deployHookStagingMethod?: string
deployHookStagingTriggerOnScheduledPublishing: boolean
eventsHookUrl?: string
canCreatePage: boolean
canDeletePage: boolean
canDeploy: boolean
canDeployStaging: boolean
role: string
plan: string
languages: Language[]
defaultLanguage: string
} | null