-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtypes.ts
14 lines (12 loc) · 843 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import type { fetchAdminBlogsList } from './utils/fetchAdminBlogsList';
import type { fetchArticlesForList } from './utils/fetchArticlesForList';
import type { fetchBlogsForGrid } from './utils/fetchBlogsForGrid';
import type { addSanitizedDescriptionToArticle } from './utils/sanitize-utils';
export type SanitizedArticle = ReturnType<typeof addSanitizedDescriptionToArticle>;
export type Article = Awaited<ReturnType<typeof fetchArticlesForList>>['articles'][number];
export type Blog = Awaited<ReturnType<typeof fetchBlogsForGrid>>['blogs'][number];
export type ArticleFromBlog = Blog['articles'][0];
export type BlogFromArticle = Article['blog'];
export type AdminTableBlogsRow = Awaited<ReturnType<typeof fetchAdminBlogsList>>[number];
export type BlogsType = 'public' | 'nonpublic' | 'all';
export type DisplayStyle = 'list' | 'grid';