feedsmith 2.8.0 → 3.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/common/parse.cjs +2 -2
- package/dist/common/parse.d.cts +5 -5
- package/dist/common/parse.d.ts +5 -5
- package/dist/common/parse.js +10 -10
- package/dist/common/types.d.cts +21 -9
- package/dist/common/types.d.ts +21 -9
- package/dist/common/utils.cjs +24 -12
- package/dist/common/utils.js +24 -12
- package/dist/feeds/atom/common/types.d.cts +50 -50
- package/dist/feeds/atom/common/types.d.ts +50 -50
- package/dist/feeds/atom/generate/index.d.cts +2 -2
- package/dist/feeds/atom/generate/index.d.ts +2 -2
- package/dist/feeds/atom/generate/utils.cjs +9 -9
- package/dist/feeds/atom/generate/utils.js +28 -28
- package/dist/feeds/atom/parse/index.d.cts +2 -2
- package/dist/feeds/atom/parse/index.d.ts +2 -2
- package/dist/feeds/atom/parse/utils.cjs +3 -11
- package/dist/feeds/atom/parse/utils.js +17 -25
- package/dist/feeds/json/common/types.d.cts +19 -19
- package/dist/feeds/json/common/types.d.ts +19 -19
- package/dist/feeds/json/generate/index.d.cts +2 -2
- package/dist/feeds/json/generate/index.d.ts +2 -2
- package/dist/feeds/json/parse/index.d.cts +2 -2
- package/dist/feeds/json/parse/index.d.ts +2 -2
- package/dist/feeds/rdf/common/types.d.cts +28 -28
- package/dist/feeds/rdf/common/types.d.ts +28 -28
- package/dist/feeds/rdf/parse/index.d.cts +2 -2
- package/dist/feeds/rdf/parse/index.d.ts +2 -2
- package/dist/feeds/rdf/parse/utils.cjs +2 -2
- package/dist/feeds/rdf/parse/utils.js +12 -12
- package/dist/feeds/rss/common/types.d.cts +68 -68
- package/dist/feeds/rss/common/types.d.ts +68 -68
- package/dist/feeds/rss/generate/index.d.cts +2 -2
- package/dist/feeds/rss/generate/index.d.ts +2 -2
- package/dist/feeds/rss/generate/utils.cjs +4 -4
- package/dist/feeds/rss/generate/utils.js +53 -53
- package/dist/feeds/rss/parse/index.d.cts +2 -2
- package/dist/feeds/rss/parse/index.d.ts +2 -2
- package/dist/feeds/rss/parse/utils.cjs +2 -2
- package/dist/feeds/rss/parse/utils.js +51 -51
- package/dist/namespaces/atom/common/types.d.cts +4 -3
- package/dist/namespaces/atom/common/types.d.ts +4 -3
- package/dist/namespaces/atom/generate/utils.cjs +4 -4
- package/dist/namespaces/atom/generate/utils.js +6 -6
- package/dist/namespaces/georss/common/types.d.cts +21 -19
- package/dist/namespaces/georss/common/types.d.ts +21 -19
- package/dist/namespaces/georss/generate/utils.cjs +2 -2
- package/dist/namespaces/georss/generate/utils.js +2 -2
- package/dist/namespaces/googleplay/common/types.d.cts +9 -7
- package/dist/namespaces/googleplay/common/types.d.ts +9 -7
- package/dist/namespaces/itunes/common/types.d.cts +9 -5
- package/dist/namespaces/itunes/common/types.d.ts +9 -5
- package/dist/namespaces/media/common/types.d.cts +86 -84
- package/dist/namespaces/media/common/types.d.ts +86 -84
- package/dist/namespaces/opensearch/common/types.d.cts +7 -5
- package/dist/namespaces/opensearch/common/types.d.ts +7 -5
- package/dist/namespaces/podcast/common/types.d.cts +144 -141
- package/dist/namespaces/podcast/common/types.d.ts +144 -141
- package/dist/namespaces/podcast/generate/utils.cjs +5 -2
- package/dist/namespaces/podcast/generate/utils.js +5 -2
- package/dist/namespaces/podcast/parse/utils.cjs +5 -2
- package/dist/namespaces/podcast/parse/utils.js +5 -2
- package/dist/namespaces/psc/common/types.d.cts +8 -6
- package/dist/namespaces/psc/common/types.d.ts +8 -6
- package/dist/namespaces/rawvoice/common/types.d.cts +24 -24
- package/dist/namespaces/rawvoice/common/types.d.ts +24 -24
- package/dist/namespaces/source/common/types.d.cts +20 -18
- package/dist/namespaces/source/common/types.d.ts +20 -18
- package/dist/namespaces/spotify/common/types.d.cts +22 -20
- package/dist/namespaces/spotify/common/types.d.ts +22 -20
- package/dist/namespaces/thr/common/types.d.cts +6 -6
- package/dist/namespaces/thr/common/types.d.ts +6 -6
- package/dist/opml/common/types.d.cts +11 -9
- package/dist/opml/common/types.d.ts +11 -9
- package/dist/opml/generate/index.d.cts +2 -2
- package/dist/opml/generate/index.d.ts +2 -2
- package/dist/opml/parse/index.d.cts +1 -2
- package/dist/opml/parse/index.d.ts +1 -2
- package/dist/types.d.cts +1 -2
- package/dist/types.d.ts +1 -2
- package/package.json +6 -8
|
@@ -1,87 +1,89 @@
|
|
|
1
|
-
import { DateLike } from "../../../common/types.js";
|
|
1
|
+
import { DateLike, Requirable, Strict } from "../../../common/types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/namespaces/podcast/common/types.d.ts
|
|
4
4
|
declare namespace PodcastNs {
|
|
5
5
|
/** @internal Common properties shared by Item and LiveItem. */
|
|
6
|
-
type BaseItem = {
|
|
7
|
-
transcripts?: Array<Transcript
|
|
8
|
-
chapters?: Chapters
|
|
9
|
-
soundbites?: Array<Soundbite
|
|
10
|
-
persons?: Array<Person
|
|
11
|
-
locations?: Array<Location
|
|
12
|
-
season?: Season
|
|
13
|
-
episode?: Episode
|
|
14
|
-
license?: License
|
|
15
|
-
alternateEnclosures?: Array<AlternateEnclosure
|
|
16
|
-
values?: Array<Value
|
|
17
|
-
images?: Array<Image
|
|
18
|
-
socialInteracts?: Array<SocialInteract
|
|
19
|
-
txts?: Array<Txt
|
|
20
|
-
chat?: Chat
|
|
6
|
+
type BaseItem<TStrict extends boolean = false> = {
|
|
7
|
+
transcripts?: Array<Transcript<TStrict>>;
|
|
8
|
+
chapters?: Chapters<TStrict>;
|
|
9
|
+
soundbites?: Array<Soundbite<TStrict>>;
|
|
10
|
+
persons?: Array<Person<TStrict>>;
|
|
11
|
+
locations?: Array<Location<TStrict>>;
|
|
12
|
+
season?: Season<TStrict>;
|
|
13
|
+
episode?: Episode<TStrict>;
|
|
14
|
+
license?: License<TStrict>;
|
|
15
|
+
alternateEnclosures?: Array<AlternateEnclosure<TStrict>>;
|
|
16
|
+
values?: Array<Value<TStrict>>;
|
|
17
|
+
images?: Array<Image<TStrict>>;
|
|
18
|
+
socialInteracts?: Array<SocialInteract<TStrict>>;
|
|
19
|
+
txts?: Array<Txt<TStrict>>;
|
|
20
|
+
chat?: Chat<TStrict>;
|
|
21
21
|
/** @deprecated Use `locations` (array) instead. Multiple podcast:location elements are allowed per specification. */
|
|
22
|
-
location?: Location
|
|
22
|
+
location?: Location<TStrict>;
|
|
23
23
|
/** @deprecated Use `values` (array) instead. Multiple podcast:value elements are allowed per specification. */
|
|
24
|
-
value?: Value
|
|
24
|
+
value?: Value<TStrict>;
|
|
25
25
|
/** @deprecated Use `chat` (singular) instead. Only one podcast:chat element is allowed per specification. */
|
|
26
|
-
chats?: Array<Chat
|
|
26
|
+
chats?: Array<Chat<TStrict>>;
|
|
27
27
|
};
|
|
28
|
-
type Transcript = {
|
|
29
|
-
url: string
|
|
30
|
-
type: string
|
|
28
|
+
type Transcript<TStrict extends boolean = false> = Strict<{
|
|
29
|
+
url: Requirable<string>;
|
|
30
|
+
type: Requirable<string>;
|
|
31
31
|
language?: string;
|
|
32
32
|
rel?: string;
|
|
33
|
-
}
|
|
34
|
-
type Locked = {
|
|
35
|
-
value: boolean
|
|
33
|
+
}, TStrict>;
|
|
34
|
+
type Locked<TStrict extends boolean = false> = Strict<{
|
|
35
|
+
value: Requirable<boolean>;
|
|
36
36
|
owner?: string;
|
|
37
|
-
}
|
|
38
|
-
type Funding = {
|
|
39
|
-
url: string
|
|
37
|
+
}, TStrict>;
|
|
38
|
+
type Funding<TStrict extends boolean = false> = Strict<{
|
|
39
|
+
url: Requirable<string>;
|
|
40
40
|
display?: string;
|
|
41
|
-
}
|
|
42
|
-
type Chapters = {
|
|
43
|
-
url: string
|
|
44
|
-
type: string
|
|
45
|
-
}
|
|
46
|
-
type Soundbite = {
|
|
47
|
-
startTime: number
|
|
48
|
-
duration: number
|
|
41
|
+
}, TStrict>;
|
|
42
|
+
type Chapters<TStrict extends boolean = false> = Strict<{
|
|
43
|
+
url: Requirable<string>;
|
|
44
|
+
type: Requirable<string>;
|
|
45
|
+
}, TStrict>;
|
|
46
|
+
type Soundbite<TStrict extends boolean = false> = Strict<{
|
|
47
|
+
startTime: Requirable<number>;
|
|
48
|
+
duration: Requirable<number>;
|
|
49
49
|
display?: string;
|
|
50
|
-
}
|
|
51
|
-
type Person = {
|
|
52
|
-
display: string
|
|
50
|
+
}, TStrict>;
|
|
51
|
+
type Person<TStrict extends boolean = false> = Strict<{
|
|
52
|
+
display: Requirable<string>;
|
|
53
53
|
role?: string;
|
|
54
54
|
group?: string;
|
|
55
55
|
img?: string;
|
|
56
56
|
href?: string;
|
|
57
|
-
}
|
|
58
|
-
type Location = {
|
|
59
|
-
display: string
|
|
57
|
+
}, TStrict>;
|
|
58
|
+
type Location<TStrict extends boolean = false> = Strict<{
|
|
59
|
+
display: Requirable<string>;
|
|
60
|
+
rel?: string;
|
|
60
61
|
geo?: string;
|
|
61
62
|
osm?: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
country?: string;
|
|
64
|
+
}, TStrict>;
|
|
65
|
+
type Season<TStrict extends boolean = false> = Strict<{
|
|
66
|
+
number: Requirable<number>;
|
|
65
67
|
name?: string;
|
|
66
|
-
}
|
|
67
|
-
type Episode = {
|
|
68
|
-
number: number
|
|
68
|
+
}, TStrict>;
|
|
69
|
+
type Episode<TStrict extends boolean = false> = Strict<{
|
|
70
|
+
number: Requirable<number>;
|
|
69
71
|
display?: string;
|
|
70
|
-
}
|
|
71
|
-
type Trailer<TDate extends DateLike> = {
|
|
72
|
-
display: string
|
|
73
|
-
url: string
|
|
74
|
-
pubDate: TDate
|
|
72
|
+
}, TStrict>;
|
|
73
|
+
type Trailer<TDate extends DateLike, TStrict extends boolean = false> = Strict<{
|
|
74
|
+
display: Requirable<string>;
|
|
75
|
+
url: Requirable<string>;
|
|
76
|
+
pubDate: Requirable<TDate>;
|
|
75
77
|
length?: number;
|
|
76
78
|
type?: string;
|
|
77
79
|
season?: number;
|
|
78
|
-
}
|
|
79
|
-
type License = {
|
|
80
|
-
display: string
|
|
80
|
+
}, TStrict>;
|
|
81
|
+
type License<TStrict extends boolean = false> = Strict<{
|
|
82
|
+
display: Requirable<string>;
|
|
81
83
|
url?: string;
|
|
82
|
-
}
|
|
83
|
-
type AlternateEnclosure = {
|
|
84
|
-
type: string
|
|
84
|
+
}, TStrict>;
|
|
85
|
+
type AlternateEnclosure<TStrict extends boolean = false> = Strict<{
|
|
86
|
+
type: Requirable<string>;
|
|
85
87
|
length?: number;
|
|
86
88
|
bitrate?: number;
|
|
87
89
|
height?: number;
|
|
@@ -90,133 +92,134 @@ declare namespace PodcastNs {
|
|
|
90
92
|
rel?: string;
|
|
91
93
|
codecs?: string;
|
|
92
94
|
default?: boolean;
|
|
93
|
-
sources?: Array<Source
|
|
94
|
-
integrity?: Integrity
|
|
95
|
-
}
|
|
96
|
-
type Source = {
|
|
97
|
-
uri: string
|
|
95
|
+
sources?: Array<Source<TStrict>>;
|
|
96
|
+
integrity?: Integrity<TStrict>;
|
|
97
|
+
}, TStrict>;
|
|
98
|
+
type Source<TStrict extends boolean = false> = Strict<{
|
|
99
|
+
uri: Requirable<string>;
|
|
98
100
|
contentType?: string;
|
|
99
|
-
}
|
|
100
|
-
type Integrity = {
|
|
101
|
-
type: string
|
|
102
|
-
value: string
|
|
103
|
-
}
|
|
104
|
-
type Value = {
|
|
105
|
-
type: string
|
|
106
|
-
method: string
|
|
101
|
+
}, TStrict>;
|
|
102
|
+
type Integrity<TStrict extends boolean = false> = Strict<{
|
|
103
|
+
type: Requirable<string>;
|
|
104
|
+
value: Requirable<string>;
|
|
105
|
+
}, TStrict>;
|
|
106
|
+
type Value<TStrict extends boolean = false> = Strict<{
|
|
107
|
+
type: Requirable<string>;
|
|
108
|
+
method: Requirable<string>;
|
|
107
109
|
suggested?: number;
|
|
108
|
-
valueRecipients?: Array<ValueRecipient
|
|
109
|
-
valueTimeSplits?: Array<ValueTimeSplit
|
|
110
|
-
}
|
|
111
|
-
type ValueRecipient = {
|
|
110
|
+
valueRecipients?: Array<ValueRecipient<TStrict>>;
|
|
111
|
+
valueTimeSplits?: Array<ValueTimeSplit<TStrict>>;
|
|
112
|
+
}, TStrict>;
|
|
113
|
+
type ValueRecipient<TStrict extends boolean = false> = Strict<{
|
|
112
114
|
name?: string;
|
|
113
115
|
customKey?: string;
|
|
114
116
|
customValue?: string;
|
|
115
|
-
type: string
|
|
116
|
-
address: string
|
|
117
|
-
split: number
|
|
117
|
+
type: Requirable<string>;
|
|
118
|
+
address: Requirable<string>;
|
|
119
|
+
split: Requirable<number>;
|
|
118
120
|
fee?: boolean;
|
|
119
|
-
}
|
|
121
|
+
}, TStrict>;
|
|
120
122
|
/** @internal Legacy type for parsing podcast:images with srcset attribute. */
|
|
121
123
|
type Images = {
|
|
122
124
|
srcset?: string;
|
|
123
125
|
};
|
|
124
|
-
type Image = {
|
|
125
|
-
href: string
|
|
126
|
+
type Image<TStrict extends boolean = false> = Strict<{
|
|
127
|
+
href: Requirable<string>;
|
|
126
128
|
alt?: string;
|
|
127
129
|
aspectRatio?: string;
|
|
128
130
|
width?: number;
|
|
129
131
|
height?: number;
|
|
130
132
|
type?: string;
|
|
131
133
|
purpose?: string;
|
|
132
|
-
}
|
|
133
|
-
type LiveItem<TDate extends DateLike> = BaseItem & {
|
|
134
|
-
status: string
|
|
135
|
-
start: TDate
|
|
134
|
+
}, TStrict>;
|
|
135
|
+
type LiveItem<TDate extends DateLike, TStrict extends boolean = false> = BaseItem<TStrict> & Strict<{
|
|
136
|
+
status: Requirable<string>;
|
|
137
|
+
start: Requirable<TDate>;
|
|
136
138
|
end?: TDate;
|
|
137
|
-
contentLinks?: Array<ContentLink
|
|
138
|
-
}
|
|
139
|
-
type ContentLink = {
|
|
140
|
-
href: string
|
|
139
|
+
contentLinks?: Array<ContentLink<TStrict>>;
|
|
140
|
+
}, TStrict>;
|
|
141
|
+
type ContentLink<TStrict extends boolean = false> = Strict<{
|
|
142
|
+
href: Requirable<string>;
|
|
141
143
|
display?: string;
|
|
142
|
-
}
|
|
143
|
-
type SocialInteract = {
|
|
144
|
+
}, TStrict>;
|
|
145
|
+
type SocialInteract<TStrict extends boolean = false> = Strict<{
|
|
144
146
|
uri?: string;
|
|
145
|
-
protocol: string
|
|
147
|
+
protocol: Requirable<string>;
|
|
146
148
|
accountId?: string;
|
|
147
149
|
accountUrl?: string;
|
|
148
150
|
priority?: number;
|
|
149
|
-
}
|
|
150
|
-
type Chat = {
|
|
151
|
-
server: string
|
|
152
|
-
protocol: string
|
|
151
|
+
}, TStrict>;
|
|
152
|
+
type Chat<TStrict extends boolean = false> = Strict<{
|
|
153
|
+
server: Requirable<string>;
|
|
154
|
+
protocol: Requirable<string>;
|
|
153
155
|
accountId?: string;
|
|
154
156
|
space?: string;
|
|
155
|
-
}
|
|
156
|
-
type Block = {
|
|
157
|
-
value: boolean
|
|
157
|
+
}, TStrict>;
|
|
158
|
+
type Block<TStrict extends boolean = false> = Strict<{
|
|
159
|
+
value: Requirable<boolean>;
|
|
158
160
|
id?: string;
|
|
159
|
-
}
|
|
160
|
-
type Txt = {
|
|
161
|
-
display: string
|
|
161
|
+
}, TStrict>;
|
|
162
|
+
type Txt<TStrict extends boolean = false> = Strict<{
|
|
163
|
+
display: Requirable<string>;
|
|
162
164
|
purpose?: string;
|
|
163
|
-
}
|
|
164
|
-
type RemoteItem = {
|
|
165
|
-
feedGuid: string
|
|
165
|
+
}, TStrict>;
|
|
166
|
+
type RemoteItem<TStrict extends boolean = false> = Strict<{
|
|
167
|
+
feedGuid: Requirable<string>;
|
|
166
168
|
feedUrl?: string;
|
|
167
169
|
itemGuid?: string;
|
|
168
170
|
medium?: string;
|
|
171
|
+
title?: string;
|
|
172
|
+
}, TStrict>;
|
|
173
|
+
type Podroll<TStrict extends boolean = false> = {
|
|
174
|
+
remoteItems?: Array<RemoteItem<TStrict>>;
|
|
169
175
|
};
|
|
170
|
-
type
|
|
171
|
-
|
|
172
|
-
};
|
|
173
|
-
type UpdateFrequency<TDate extends DateLike> = {
|
|
174
|
-
display: string;
|
|
176
|
+
type UpdateFrequency<TDate extends DateLike, TStrict extends boolean = false> = Strict<{
|
|
177
|
+
display: Requirable<string>;
|
|
175
178
|
complete?: boolean;
|
|
176
179
|
dtstart?: TDate;
|
|
177
180
|
rrule?: string;
|
|
178
|
-
}
|
|
181
|
+
}, TStrict>;
|
|
179
182
|
type Podping = {
|
|
180
183
|
usesPodping?: boolean;
|
|
181
184
|
};
|
|
182
|
-
type Publisher = {
|
|
183
|
-
remoteItem?: RemoteItem
|
|
185
|
+
type Publisher<TStrict extends boolean = false> = {
|
|
186
|
+
remoteItem?: RemoteItem<TStrict>;
|
|
184
187
|
};
|
|
185
|
-
type ValueTimeSplit = {
|
|
186
|
-
startTime: number
|
|
187
|
-
duration: number
|
|
188
|
+
type ValueTimeSplit<TStrict extends boolean = false> = Strict<{
|
|
189
|
+
startTime: Requirable<number>;
|
|
190
|
+
duration: Requirable<number>;
|
|
188
191
|
remoteStartTime?: number;
|
|
189
192
|
remotePercentage?: number;
|
|
190
|
-
remoteItem?: RemoteItem
|
|
191
|
-
valueRecipients?: Array<ValueRecipient
|
|
192
|
-
}
|
|
193
|
-
type Item = BaseItem
|
|
194
|
-
type Feed<TDate extends DateLike> = {
|
|
195
|
-
locked?: Locked
|
|
196
|
-
fundings?: Array<Funding
|
|
197
|
-
persons?: Array<Person
|
|
198
|
-
locations?: Array<Location
|
|
199
|
-
trailers?: Array<Trailer<TDate>>;
|
|
200
|
-
license?: License
|
|
193
|
+
remoteItem?: RemoteItem<TStrict>;
|
|
194
|
+
valueRecipients?: Array<ValueRecipient<TStrict>>;
|
|
195
|
+
}, TStrict>;
|
|
196
|
+
type Item<TStrict extends boolean = false> = BaseItem<TStrict>;
|
|
197
|
+
type Feed<TDate extends DateLike, TStrict extends boolean = false> = {
|
|
198
|
+
locked?: Locked<TStrict>;
|
|
199
|
+
fundings?: Array<Funding<TStrict>>;
|
|
200
|
+
persons?: Array<Person<TStrict>>;
|
|
201
|
+
locations?: Array<Location<TStrict>>;
|
|
202
|
+
trailers?: Array<Trailer<TDate, TStrict>>;
|
|
203
|
+
license?: License<TStrict>;
|
|
201
204
|
guid?: string;
|
|
202
|
-
values?: Array<Value
|
|
205
|
+
values?: Array<Value<TStrict>>;
|
|
203
206
|
medium?: string;
|
|
204
|
-
images?: Array<Image
|
|
205
|
-
liveItems?: Array<LiveItem<TDate>>;
|
|
206
|
-
blocks?: Array<Block
|
|
207
|
-
txts?: Array<Txt
|
|
208
|
-
remoteItems?: Array<RemoteItem
|
|
209
|
-
podroll?: Podroll
|
|
210
|
-
updateFrequency?: UpdateFrequency<TDate>;
|
|
207
|
+
images?: Array<Image<TStrict>>;
|
|
208
|
+
liveItems?: Array<LiveItem<TDate, TStrict>>;
|
|
209
|
+
blocks?: Array<Block<TStrict>>;
|
|
210
|
+
txts?: Array<Txt<TStrict>>;
|
|
211
|
+
remoteItems?: Array<RemoteItem<TStrict>>;
|
|
212
|
+
podroll?: Podroll<TStrict>;
|
|
213
|
+
updateFrequency?: UpdateFrequency<TDate, TStrict>;
|
|
211
214
|
podping?: Podping;
|
|
212
|
-
chat?: Chat
|
|
213
|
-
publisher?: Publisher
|
|
215
|
+
chat?: Chat<TStrict>;
|
|
216
|
+
publisher?: Publisher<TStrict>;
|
|
214
217
|
/** @deprecated Use `locations` (array) instead. Multiple podcast:location elements are allowed per specification. */
|
|
215
|
-
location?: Location
|
|
218
|
+
location?: Location<TStrict>;
|
|
216
219
|
/** @deprecated Use `values` (array) instead. Multiple podcast:value elements are allowed per specification. */
|
|
217
|
-
value?: Value
|
|
220
|
+
value?: Value<TStrict>;
|
|
218
221
|
/** @deprecated Use `chat` (singular) instead. Only one podcast:chat element is allowed per specification. */
|
|
219
|
-
chats?: Array<Chat
|
|
222
|
+
chats?: Array<Chat<TStrict>>;
|
|
220
223
|
};
|
|
221
224
|
}
|
|
222
225
|
//#endregion
|
|
@@ -72,8 +72,10 @@ const generateLocation = (location) => {
|
|
|
72
72
|
if (!require_utils.isObject(location)) return;
|
|
73
73
|
return require_utils.trimObject({
|
|
74
74
|
...require_utils.generateTextOrCdataString(location.display),
|
|
75
|
+
"@rel": require_utils.generatePlainString(location.rel),
|
|
75
76
|
"@geo": require_utils.generatePlainString(location.geo),
|
|
76
|
-
"@osm": require_utils.generatePlainString(location.osm)
|
|
77
|
+
"@osm": require_utils.generatePlainString(location.osm),
|
|
78
|
+
"@country": require_utils.generatePlainString(location.country)
|
|
77
79
|
});
|
|
78
80
|
};
|
|
79
81
|
const generateSeason = (season) => {
|
|
@@ -239,7 +241,8 @@ const generateRemoteItem = (remoteItem) => {
|
|
|
239
241
|
"@feedGuid": require_utils.generatePlainString(remoteItem.feedGuid),
|
|
240
242
|
"@feedUrl": require_utils.generatePlainString(remoteItem.feedUrl),
|
|
241
243
|
"@itemGuid": require_utils.generatePlainString(remoteItem.itemGuid),
|
|
242
|
-
"@medium": require_utils.generatePlainString(remoteItem.medium)
|
|
244
|
+
"@medium": require_utils.generatePlainString(remoteItem.medium),
|
|
245
|
+
"@title": require_utils.generatePlainString(remoteItem.title)
|
|
243
246
|
});
|
|
244
247
|
};
|
|
245
248
|
const generatePodroll = (podroll) => {
|
|
@@ -72,8 +72,10 @@ const generateLocation = (location) => {
|
|
|
72
72
|
if (!isObject(location)) return;
|
|
73
73
|
return trimObject({
|
|
74
74
|
...generateTextOrCdataString(location.display),
|
|
75
|
+
"@rel": generatePlainString(location.rel),
|
|
75
76
|
"@geo": generatePlainString(location.geo),
|
|
76
|
-
"@osm": generatePlainString(location.osm)
|
|
77
|
+
"@osm": generatePlainString(location.osm),
|
|
78
|
+
"@country": generatePlainString(location.country)
|
|
77
79
|
});
|
|
78
80
|
};
|
|
79
81
|
const generateSeason = (season) => {
|
|
@@ -239,7 +241,8 @@ const generateRemoteItem = (remoteItem) => {
|
|
|
239
241
|
"@feedGuid": generatePlainString(remoteItem.feedGuid),
|
|
240
242
|
"@feedUrl": generatePlainString(remoteItem.feedUrl),
|
|
241
243
|
"@itemGuid": generatePlainString(remoteItem.itemGuid),
|
|
242
|
-
"@medium": generatePlainString(remoteItem.medium)
|
|
244
|
+
"@medium": generatePlainString(remoteItem.medium),
|
|
245
|
+
"@title": generatePlainString(remoteItem.title)
|
|
243
246
|
});
|
|
244
247
|
};
|
|
245
248
|
const generatePodroll = (podroll) => {
|
|
@@ -50,8 +50,10 @@ const parsePerson = (value) => {
|
|
|
50
50
|
const parseLocation = (value) => {
|
|
51
51
|
return require_utils.trimObject({
|
|
52
52
|
display: require_utils.parseString(require_utils.retrieveText(value)),
|
|
53
|
+
rel: require_utils.parseString(value?.["@rel"]),
|
|
53
54
|
geo: require_utils.parseString(value?.["@geo"]),
|
|
54
|
-
osm: require_utils.parseString(value?.["@osm"])
|
|
55
|
+
osm: require_utils.parseString(value?.["@osm"]),
|
|
56
|
+
country: require_utils.parseString(value?.["@country"])
|
|
55
57
|
});
|
|
56
58
|
};
|
|
57
59
|
const parseSeason = (value) => {
|
|
@@ -219,7 +221,8 @@ const parseRemoteItem = (value) => {
|
|
|
219
221
|
feedGuid: require_utils.parseString(value["@feedguid"]),
|
|
220
222
|
feedUrl: require_utils.parseString(value["@feedurl"]),
|
|
221
223
|
itemGuid: require_utils.parseString(value["@itemguid"]),
|
|
222
|
-
medium: require_utils.parseString(value["@medium"])
|
|
224
|
+
medium: require_utils.parseString(value["@medium"]),
|
|
225
|
+
title: require_utils.parseString(value["@title"])
|
|
223
226
|
});
|
|
224
227
|
};
|
|
225
228
|
const parsePodroll = (value) => {
|
|
@@ -50,8 +50,10 @@ const parsePerson = (value) => {
|
|
|
50
50
|
const parseLocation = (value) => {
|
|
51
51
|
return trimObject({
|
|
52
52
|
display: parseString(retrieveText(value)),
|
|
53
|
+
rel: parseString(value?.["@rel"]),
|
|
53
54
|
geo: parseString(value?.["@geo"]),
|
|
54
|
-
osm: parseString(value?.["@osm"])
|
|
55
|
+
osm: parseString(value?.["@osm"]),
|
|
56
|
+
country: parseString(value?.["@country"])
|
|
55
57
|
});
|
|
56
58
|
};
|
|
57
59
|
const parseSeason = (value) => {
|
|
@@ -219,7 +221,8 @@ const parseRemoteItem = (value) => {
|
|
|
219
221
|
feedGuid: parseString(value["@feedguid"]),
|
|
220
222
|
feedUrl: parseString(value["@feedurl"]),
|
|
221
223
|
itemGuid: parseString(value["@itemguid"]),
|
|
222
|
-
medium: parseString(value["@medium"])
|
|
224
|
+
medium: parseString(value["@medium"]),
|
|
225
|
+
title: parseString(value["@title"])
|
|
223
226
|
});
|
|
224
227
|
};
|
|
225
228
|
const parsePodroll = (value) => {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { Requirable, Strict } from "../../../common/types.cjs";
|
|
2
|
+
|
|
1
3
|
//#region src/namespaces/psc/common/types.d.ts
|
|
2
4
|
declare namespace PscNs {
|
|
3
|
-
type Chapter = {
|
|
4
|
-
start: string
|
|
5
|
-
title: string
|
|
5
|
+
type Chapter<TStrict extends boolean = false> = Strict<{
|
|
6
|
+
start: Requirable<string>;
|
|
7
|
+
title: Requirable<string>;
|
|
6
8
|
href?: string;
|
|
7
9
|
image?: string;
|
|
8
|
-
}
|
|
9
|
-
type Item = {
|
|
10
|
-
chapters?: Array<Chapter
|
|
10
|
+
}, TStrict>;
|
|
11
|
+
type Item<TStrict extends boolean = false> = {
|
|
12
|
+
chapters?: Array<Chapter<TStrict>>;
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { Requirable, Strict } from "../../../common/types.js";
|
|
2
|
+
|
|
1
3
|
//#region src/namespaces/psc/common/types.d.ts
|
|
2
4
|
declare namespace PscNs {
|
|
3
|
-
type Chapter = {
|
|
4
|
-
start: string
|
|
5
|
-
title: string
|
|
5
|
+
type Chapter<TStrict extends boolean = false> = Strict<{
|
|
6
|
+
start: Requirable<string>;
|
|
7
|
+
title: Requirable<string>;
|
|
6
8
|
href?: string;
|
|
7
9
|
image?: string;
|
|
8
|
-
}
|
|
9
|
-
type Item = {
|
|
10
|
-
chapters?: Array<Chapter
|
|
10
|
+
}, TStrict>;
|
|
11
|
+
type Item<TStrict extends boolean = false> = {
|
|
12
|
+
chapters?: Array<Chapter<TStrict>>;
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateLike } from "../../../common/types.cjs";
|
|
1
|
+
import { DateLike, Requirable, Strict } from "../../../common/types.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/namespaces/rawvoice/common/types.d.ts
|
|
4
4
|
declare namespace RawVoiceNs {
|
|
@@ -7,20 +7,20 @@ declare namespace RawVoiceNs {
|
|
|
7
7
|
tv?: string;
|
|
8
8
|
movie?: string;
|
|
9
9
|
};
|
|
10
|
-
type LiveStream<TDate extends DateLike> = {
|
|
10
|
+
type LiveStream<TDate extends DateLike, TStrict extends boolean = false> = Strict<{
|
|
11
11
|
url?: string;
|
|
12
|
-
schedule
|
|
13
|
-
duration
|
|
12
|
+
schedule: Requirable<TDate>;
|
|
13
|
+
duration: Requirable<string>;
|
|
14
14
|
type?: string;
|
|
15
|
-
}
|
|
16
|
-
type Poster = {
|
|
17
|
-
url
|
|
18
|
-
}
|
|
19
|
-
type AlternateEnclosure = {
|
|
20
|
-
src
|
|
15
|
+
}, TStrict>;
|
|
16
|
+
type Poster<TStrict extends boolean = false> = Strict<{
|
|
17
|
+
url: Requirable<string>;
|
|
18
|
+
}, TStrict>;
|
|
19
|
+
type AlternateEnclosure<TStrict extends boolean = false> = Strict<{
|
|
20
|
+
src: Requirable<string>;
|
|
21
21
|
type?: string;
|
|
22
22
|
length?: number;
|
|
23
|
-
}
|
|
23
|
+
}, TStrict>;
|
|
24
24
|
type Subscribe = Record<string, string>;
|
|
25
25
|
type Metamark = {
|
|
26
26
|
type?: string;
|
|
@@ -29,29 +29,29 @@ declare namespace RawVoiceNs {
|
|
|
29
29
|
duration?: number;
|
|
30
30
|
value?: string;
|
|
31
31
|
};
|
|
32
|
-
type Donate = {
|
|
33
|
-
href: string
|
|
32
|
+
type Donate<TStrict extends boolean = false> = Strict<{
|
|
33
|
+
href: Requirable<string>;
|
|
34
34
|
value?: string;
|
|
35
|
-
}
|
|
36
|
-
type Feed<TDate extends DateLike> = {
|
|
35
|
+
}, TStrict>;
|
|
36
|
+
type Feed<TDate extends DateLike, TStrict extends boolean = false> = {
|
|
37
37
|
rating?: Rating;
|
|
38
38
|
liveEmbed?: string;
|
|
39
|
-
flashLiveStream?: LiveStream<TDate>;
|
|
40
|
-
httpLiveStream?: LiveStream<TDate>;
|
|
41
|
-
shoutcastLiveStream?: LiveStream<TDate>;
|
|
42
|
-
liveStream?: LiveStream<TDate>;
|
|
39
|
+
flashLiveStream?: LiveStream<TDate, TStrict>;
|
|
40
|
+
httpLiveStream?: LiveStream<TDate, TStrict>;
|
|
41
|
+
shoutcastLiveStream?: LiveStream<TDate, TStrict>;
|
|
42
|
+
liveStream?: LiveStream<TDate, TStrict>;
|
|
43
43
|
location?: string;
|
|
44
44
|
frequency?: string;
|
|
45
45
|
mycast?: boolean;
|
|
46
46
|
subscribe?: Subscribe;
|
|
47
|
-
donate?: Donate
|
|
47
|
+
donate?: Donate<TStrict>;
|
|
48
48
|
};
|
|
49
|
-
type Item = {
|
|
50
|
-
poster?: Poster
|
|
49
|
+
type Item<TStrict extends boolean = false> = {
|
|
50
|
+
poster?: Poster<TStrict>;
|
|
51
51
|
isHd?: boolean;
|
|
52
52
|
embed?: string;
|
|
53
|
-
webm?: AlternateEnclosure
|
|
54
|
-
mp4?: AlternateEnclosure
|
|
53
|
+
webm?: AlternateEnclosure<TStrict>;
|
|
54
|
+
mp4?: AlternateEnclosure<TStrict>;
|
|
55
55
|
metamarks?: Array<Metamark>;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateLike } from "../../../common/types.js";
|
|
1
|
+
import { DateLike, Requirable, Strict } from "../../../common/types.js";
|
|
2
2
|
|
|
3
3
|
//#region src/namespaces/rawvoice/common/types.d.ts
|
|
4
4
|
declare namespace RawVoiceNs {
|
|
@@ -7,20 +7,20 @@ declare namespace RawVoiceNs {
|
|
|
7
7
|
tv?: string;
|
|
8
8
|
movie?: string;
|
|
9
9
|
};
|
|
10
|
-
type LiveStream<TDate extends DateLike> = {
|
|
10
|
+
type LiveStream<TDate extends DateLike, TStrict extends boolean = false> = Strict<{
|
|
11
11
|
url?: string;
|
|
12
|
-
schedule
|
|
13
|
-
duration
|
|
12
|
+
schedule: Requirable<TDate>;
|
|
13
|
+
duration: Requirable<string>;
|
|
14
14
|
type?: string;
|
|
15
|
-
}
|
|
16
|
-
type Poster = {
|
|
17
|
-
url
|
|
18
|
-
}
|
|
19
|
-
type AlternateEnclosure = {
|
|
20
|
-
src
|
|
15
|
+
}, TStrict>;
|
|
16
|
+
type Poster<TStrict extends boolean = false> = Strict<{
|
|
17
|
+
url: Requirable<string>;
|
|
18
|
+
}, TStrict>;
|
|
19
|
+
type AlternateEnclosure<TStrict extends boolean = false> = Strict<{
|
|
20
|
+
src: Requirable<string>;
|
|
21
21
|
type?: string;
|
|
22
22
|
length?: number;
|
|
23
|
-
}
|
|
23
|
+
}, TStrict>;
|
|
24
24
|
type Subscribe = Record<string, string>;
|
|
25
25
|
type Metamark = {
|
|
26
26
|
type?: string;
|
|
@@ -29,29 +29,29 @@ declare namespace RawVoiceNs {
|
|
|
29
29
|
duration?: number;
|
|
30
30
|
value?: string;
|
|
31
31
|
};
|
|
32
|
-
type Donate = {
|
|
33
|
-
href: string
|
|
32
|
+
type Donate<TStrict extends boolean = false> = Strict<{
|
|
33
|
+
href: Requirable<string>;
|
|
34
34
|
value?: string;
|
|
35
|
-
}
|
|
36
|
-
type Feed<TDate extends DateLike> = {
|
|
35
|
+
}, TStrict>;
|
|
36
|
+
type Feed<TDate extends DateLike, TStrict extends boolean = false> = {
|
|
37
37
|
rating?: Rating;
|
|
38
38
|
liveEmbed?: string;
|
|
39
|
-
flashLiveStream?: LiveStream<TDate>;
|
|
40
|
-
httpLiveStream?: LiveStream<TDate>;
|
|
41
|
-
shoutcastLiveStream?: LiveStream<TDate>;
|
|
42
|
-
liveStream?: LiveStream<TDate>;
|
|
39
|
+
flashLiveStream?: LiveStream<TDate, TStrict>;
|
|
40
|
+
httpLiveStream?: LiveStream<TDate, TStrict>;
|
|
41
|
+
shoutcastLiveStream?: LiveStream<TDate, TStrict>;
|
|
42
|
+
liveStream?: LiveStream<TDate, TStrict>;
|
|
43
43
|
location?: string;
|
|
44
44
|
frequency?: string;
|
|
45
45
|
mycast?: boolean;
|
|
46
46
|
subscribe?: Subscribe;
|
|
47
|
-
donate?: Donate
|
|
47
|
+
donate?: Donate<TStrict>;
|
|
48
48
|
};
|
|
49
|
-
type Item = {
|
|
50
|
-
poster?: Poster
|
|
49
|
+
type Item<TStrict extends boolean = false> = {
|
|
50
|
+
poster?: Poster<TStrict>;
|
|
51
51
|
isHd?: boolean;
|
|
52
52
|
embed?: string;
|
|
53
|
-
webm?: AlternateEnclosure
|
|
54
|
-
mp4?: AlternateEnclosure
|
|
53
|
+
webm?: AlternateEnclosure<TStrict>;
|
|
54
|
+
mp4?: AlternateEnclosure<TStrict>;
|
|
55
55
|
metamarks?: Array<Metamark>;
|
|
56
56
|
};
|
|
57
57
|
}
|