WebIndex/types/blog.ts
2025-01-13 23:12:06 +08:00

73 lines
1.2 KiB
TypeScript

declare global {
interface IBlogResponse<T> {
status: string
message: string
data: T
}
interface IPostsData {
page: number
pageSize: number
pages: number
count: number
dataSet: []
}
interface IPost {
cid: string
title: string
created: string
modified: string
slug: string
commentsNum: string
type: string
digest: string
password: string
categories: ICategory[]
category: string
directory: string[]
date: IDate
year: string
month: string
day: string
hidden: boolean
pathinfo: string
permalink: string
url: string
isMarkdown: boolean
feedUrl: string
feedRssUrl: string
feedAtomUrl: string
fields: unknown
}
interface ICategory {
mid: string
name: string
slug: string
type: string
description: string
count: string
order: string
parent: string
cid: string
directory: string[]
url: string
feedUrl: string
feedRssUrl: string
feedAtomUrl: string
}
interface IDate {
timeStamp: number
year: string
month: string
day: string
}
interface IPostFull extends IPost {
text: string
}
}