Skip to content

Commit

Permalink
chore: update rss types
Browse files Browse the repository at this point in the history
  • Loading branch information
altaywtf committed Feb 19, 2024
1 parent 62fd857 commit b22296f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/resources/RSS/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,22 @@ export type RSSFeedParams = Pick<
dont_process_whole_feed: boolean
}

export type RSSFeedItem = {
type RSSFeedItemCommon = {
detected_date: string
id: number
publish_date: string
title: string
is_failed: boolean
failure_reason: string | null
user_file_id: number | null
processed_at: string
}

export type RSSFeedItemSucceeded = RSSFeedItemCommon & {
is_failed: false
user_file_id: null | number
}

export type RSSFeedItemFailed = RSSFeedItemCommon & {
is_failed: true
failure_reason: string
}

export type RSSFeedItem = RSSFeedItemSucceeded | RSSFeedItemFailed

0 comments on commit b22296f

Please sign in to comment.