-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
89 lines (77 loc) · 1.55 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { ImageSourcePropType } from 'react-native'
export enum FeedType {
RSS = 'RSS',
Podcast = 'Podcast',
}
export interface Feed {
url: string
title: string
description: string
language: string
favicon: string
deleted?: boolean
type?: FeedType
}
export interface FeedEntry {
id: string
link: string
title: string
description: string
published: Date
feedUrl: string
read?: boolean
bookmarked?: boolean
tags: string[]
entryType: FeedType
media?: string
cover?: string
}
export interface PlayingFeedEntry extends FeedEntry {
position?: number
duration?: number
}
export interface FeedData {
feed: Feed
entries: FeedEntry[]
}
export interface Tag {
title: string
icon: any
count: number
}
export interface CustomTag {
title: string
createdAt: Date
}
export type FeedListType =
| 'flow'
| 'bookmarks'
| 'tags'
| 'feeds'
| 'feed'
| 'playlist'
| 'podcast'
export enum FeedPublishLimit {
Week = 'week',
Month = 'month',
Year = 'year',
Ever = 'ever',
}
export enum PubEvent {
FEEDS_UPDATE = 'FEEDS_UPDATE',
ENTRYFLOW_UPDATE = 'ENTRYFLOW_UPDATE',
BOOKMARKS_UPDATE = 'BOOKMARKS_UPDATE',
TAGS_UPDATE = 'TAGS_UPDATE',
ENTRIES_UPDATE = 'ENTRIES_UPDATE',
ON_PODCAST_PORTAL = 'ON_PODCAST_PORTAL',
TOAST_MESSAGE = 'TOAST_MESSAGE',
TOAST_HIDE = 'TOAST_HIDE',
TRACK_QUEUE_UPDATE = 'TRACK_QUEUE_UPDATE',
}
export type ToastType = 'success' | 'error' | 'info' | 'warning'
export interface ToastPayload {
type: ToastType
message: string
icon?: ImageSourcePropType
duration: number
}