Untitled
unknown
plain_text
10 months ago
1.4 kB
3
Indexable
// SHARED
export type i18nOriginal = {
type: 'original';
language: string;
translated: {
language: string;
documentId: string;
}[];
};
export type i18nTranslated = {
type: 'translated';
language: string;
originalDocument: {
language: string;
documentId: string;
};
};
// BOOKS
export type BookCategory = {
documentId: string;
name: string;
};
export type BookSubcategory = {
id: string;
name: string;
};
export type Text = {
id?: string;
type: 'normalText' | 'boldText';
content: string;
};
export type UnorderedList = {
id?: string;
type: 'unorderedList';
fullText: string;
content: Text[];
};
export type Paragraph = {
id?: string;
type: 'paragraph';
fullText: string;
content: Text[];
};
export type Image = {
id?: string;
type: 'image';
src: string;
};
export type PageTitle = {
id?: string;
type: 'pageTitle';
content: string;
};
export type Subheader = {
id?: string;
type: 'subheader';
content: string;
};
export type Spacing = {
id?: string;
type: 'spacing';
size: number;
};
export type ChapterContentItem =
| Paragraph
| Image
| PageTitle
| Subheader
| Spacing
| UnorderedList;
export type Book = {
_id: string;
category: BookCategory;
subcategory: BookSubcategory;
chapterContent: ChapterContentItem[];
i18nOriginal?: i18nOriginal;
i18nTranslated?: i18nTranslated;
};Editor is loading...
Leave a Comment