55 lines
1,020 B
TypeScript
55 lines
1,020 B
TypeScript
export type SessionUser = {
|
|
id: string;
|
|
email: string;
|
|
name: string | null;
|
|
role: string;
|
|
};
|
|
|
|
export type PostAuthor = {
|
|
name: string;
|
|
slug: string;
|
|
bio?: string | null;
|
|
avatarColor?: string;
|
|
};
|
|
|
|
export type PostSummary = {
|
|
id: string;
|
|
slug: string;
|
|
title: string;
|
|
excerpt: string;
|
|
status?: string;
|
|
publishedAt: string | Date | null;
|
|
readingMinutes: number;
|
|
featured: boolean;
|
|
author: PostAuthor;
|
|
tags: { name: string; slug: string }[];
|
|
};
|
|
|
|
export type PostDetail = PostSummary & {
|
|
body: string;
|
|
updatedAt?: string | Date;
|
|
tagIds?: string[];
|
|
author: PostAuthor & { id?: string };
|
|
};
|
|
|
|
export type TagSummary = { id: string; name: string; slug: string; count?: number };
|
|
|
|
export type AuthorSummary = {
|
|
id: string;
|
|
name: string;
|
|
slug: string;
|
|
bio?: string | null;
|
|
avatarColor?: string;
|
|
count?: number;
|
|
};
|
|
|
|
export type DocSummary = {
|
|
id: string;
|
|
slug: string;
|
|
title: string;
|
|
section: string;
|
|
order: number;
|
|
status?: string;
|
|
updatedAt?: string | Date;
|
|
};
|