fix: update LPE post document type

This commit is contained in:
Hossein Mehrabi 2023-08-17 17:05:40 +03:30
parent cf08abfcb5
commit 6b429b2194
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 3 additions and 7 deletions

View File

@ -89,13 +89,7 @@ export namespace LPE {
export type ContentBlock<D = any> = TextBlock<D> | ImageBlock<D> export type ContentBlock<D = any> = TextBlock<D> | ImageBlock<D>
export type SearchResultItemData = export type Document = LPE.Article.Data | LPE.Podcast.Document
| ({
type: typeof PostTypes.Article
} & Article.Metadata)
| ({
type: typeof PostTypes.Podcast
} & Required<Podcast.Document>)
} }
export namespace Article { export namespace Article {
@ -122,6 +116,7 @@ export namespace LPE {
createdAt: string | null createdAt: string | null
modifiedAt: string | null modifiedAt: string | null
type: typeof LPE.PostTypes.Article
} }
export type Data = Article.Metadata & { export type Data = Article.Metadata & {
@ -179,6 +174,7 @@ export namespace LPE {
highlighted?: boolean highlighted?: boolean
coverImage?: Post.ImageBlock coverImage?: Post.ImageBlock
show?: Show show?: Show
type: typeof LPE.PostTypes.Podcast
} }
export type TranscriptionItem = { export type TranscriptionItem = {