From 6b429b21948acdb77b708ef6ba9ee93e2982c566 Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Thu, 17 Aug 2023 17:05:40 +0330 Subject: [PATCH] fix: update LPE post document type --- src/types/lpe.types.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/types/lpe.types.ts b/src/types/lpe.types.ts index 89b9061..76c395e 100644 --- a/src/types/lpe.types.ts +++ b/src/types/lpe.types.ts @@ -89,13 +89,7 @@ export namespace LPE { export type ContentBlock = TextBlock | ImageBlock - export type SearchResultItemData = - | ({ - type: typeof PostTypes.Article - } & Article.Metadata) - | ({ - type: typeof PostTypes.Podcast - } & Required) + export type Document = LPE.Article.Data | LPE.Podcast.Document } export namespace Article { @@ -122,6 +116,7 @@ export namespace LPE { createdAt: string | null modifiedAt: string | null + type: typeof LPE.PostTypes.Article } export type Data = Article.Metadata & { @@ -179,6 +174,7 @@ export namespace LPE { highlighted?: boolean coverImage?: Post.ImageBlock show?: Show + type: typeof LPE.PostTypes.Podcast } export type TranscriptionItem = {