@unified-live/youtube 0.0.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.
@@ -0,0 +1,1143 @@
1
+ import { Archive, Broadcast, Channel, Content, PlatformPlugin, RateLimitStrategy, ResolvedUrl } from "@unified-live/core";
2
+
3
+ //#region src/generated/youtube-api.d.ts
4
+ interface components {
5
+ schemas: {
6
+ /** @description Rights management policy for YouTube resources. */AccessPolicy: {
7
+ /** @description The value of allowed indicates whether the access to the policy is allowed or denied by default. */allowed?: boolean; /** @description A list of region codes that identify countries where the default policy do not apply. */
8
+ exception?: string[];
9
+ }; /** @description A *channel* resource contains information about a YouTube channel. */
10
+ Channel: {
11
+ /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#channel". */kind?: string; /** @description The ID that YouTube uses to uniquely identify the channel. */
12
+ id?: string;
13
+ statistics?: components["schemas"]["ChannelStatistics"];
14
+ contentOwnerDetails?: components["schemas"]["ChannelContentOwnerDetails"]; /** @description Etag of this resource. */
15
+ etag?: string;
16
+ snippet?: components["schemas"]["ChannelSnippet"];
17
+ topicDetails?: components["schemas"]["ChannelTopicDetails"];
18
+ brandingSettings?: components["schemas"]["ChannelBrandingSettings"]; /** @description Localizations for different languages */
19
+ localizations?: {
20
+ [key: string]: components["schemas"]["ChannelLocalization"];
21
+ };
22
+ auditDetails?: components["schemas"]["ChannelAuditDetails"];
23
+ conversionPings?: components["schemas"]["ChannelConversionPings"];
24
+ contentDetails?: components["schemas"]["ChannelContentDetails"];
25
+ status?: components["schemas"]["ChannelStatus"];
26
+ }; /** @description The auditDetails object encapsulates channel data that is relevant for YouTube Partners during the audit process. */
27
+ ChannelAuditDetails: {
28
+ /** @description Whether or not the channel has any copyright strikes. */copyrightStrikesGoodStanding?: boolean; /** @description Whether or not the channel has any unresolved claims. */
29
+ contentIdClaimsGoodStanding?: boolean; /** @description Whether or not the channel respects the community guidelines. */
30
+ communityGuidelinesGoodStanding?: boolean;
31
+ }; /** @description Branding properties of a YouTube channel. */
32
+ ChannelBrandingSettings: {
33
+ channel?: components["schemas"]["ChannelSettings"];
34
+ watch?: components["schemas"]["WatchSettings"];
35
+ image?: components["schemas"]["ImageSettings"];
36
+ /**
37
+ * @deprecated
38
+ * @description Additional experimental branding properties.
39
+ */
40
+ hints?: components["schemas"]["PropertyValue"][];
41
+ }; /** @description Details about the content of a channel. */
42
+ ChannelContentDetails: {
43
+ relatedPlaylists?: {
44
+ /** @description The ID of the playlist that contains the channel"s uploaded videos. Use the videos.insert method to upload new videos and the videos.delete method to delete previously uploaded videos. */uploads?: string;
45
+ /**
46
+ * @deprecated
47
+ * @description The ID of the playlist that contains the channel"s favorite videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.
48
+ */
49
+ favorites?: string;
50
+ /**
51
+ * @deprecated
52
+ * @description The ID of the playlist that contains the channel"s watch history. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.
53
+ */
54
+ watchHistory?: string;
55
+ /**
56
+ * @deprecated
57
+ * @description The ID of the playlist that contains the channel"s watch later playlist. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.
58
+ */
59
+ watchLater?: string; /** @description The ID of the playlist that contains the channel"s liked videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list. */
60
+ likes?: string;
61
+ };
62
+ }; /** @description The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel. */
63
+ ChannelContentOwnerDetails: {
64
+ /** @description The ID of the content owner linked to the channel. */contentOwner?: string;
65
+ /**
66
+ * Format: date-time
67
+ * @description The date and time when the channel was linked to the content owner.
68
+ */
69
+ timeLinked?: string;
70
+ }; /** @description Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping. */
71
+ ChannelConversionPing: {
72
+ /**
73
+ * @description Defines the context of the ping.
74
+ * @enum {string}
75
+ */
76
+ context?: "subscribe" | "unsubscribe" | "cview"; /** @description The url (without the schema) that the player shall send the ping to. It's at caller's descretion to decide which schema to use (http vs https) Example of a returned url: //googleads.g.doubleclick.net/pagead/ viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append biscotti authentication (ms param in case of mobile, for example) to this ping. */
77
+ conversionUrl?: string;
78
+ }; /** @description The conversionPings object encapsulates information about conversion pings that need to be respected by the channel. */
79
+ ChannelConversionPings: {
80
+ /** @description Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping. */pings?: components["schemas"]["ChannelConversionPing"][];
81
+ };
82
+ ChannelListResponse: {
83
+ /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#channelListResponse". */kind?: string;
84
+ items?: components["schemas"]["Channel"][];
85
+ /**
86
+ * @deprecated
87
+ * @description Serialized EventId of the request which produced this response.
88
+ */
89
+ eventId?: string; /** @description The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. */
90
+ nextPageToken?: string;
91
+ /**
92
+ * @deprecated
93
+ * @description The visitorId identifies the visitor.
94
+ */
95
+ visitorId?: string; /** @description Etag of this resource. */
96
+ etag?: string;
97
+ tokenPagination?: components["schemas"]["TokenPagination"]; /** @description The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. */
98
+ prevPageToken?: string;
99
+ pageInfo?: components["schemas"]["PageInfo"];
100
+ }; /** @description Channel localization setting */
101
+ ChannelLocalization: {
102
+ /** @description The localized strings for channel's title. */title?: string; /** @description The localized strings for channel's description. */
103
+ description?: string;
104
+ }; /** @description Branding properties for the channel view. */
105
+ ChannelSettings: {
106
+ /** @description The trailer of the channel, for users that are not subscribers. */unsubscribedTrailer?: string;
107
+ /**
108
+ * @deprecated
109
+ * @description The list of featured channels.
110
+ */
111
+ featuredChannelsUrls?: string[];
112
+ /**
113
+ * @deprecated
114
+ * @description Whether user-submitted comments left on the channel page need to be approved by the channel owner to be publicly visible.
115
+ */
116
+ moderateComments?: boolean;
117
+ /**
118
+ * @deprecated
119
+ * @description Which content tab users should see when viewing the channel.
120
+ */
121
+ defaultTab?: string; /** @description Specifies the channel title. */
122
+ title?: string; /** @description Lists keywords associated with the channel, comma-separated. */
123
+ keywords?: string;
124
+ /**
125
+ * @deprecated
126
+ * @description Whether the tab to browse the videos should be displayed.
127
+ */
128
+ showBrowseView?: boolean;
129
+ /**
130
+ * @deprecated
131
+ * @description Title for the featured channels tab.
132
+ */
133
+ featuredChannelsTitle?: string;
134
+ /**
135
+ * @deprecated
136
+ * @description A prominent color that can be rendered on this channel page.
137
+ */
138
+ profileColor?: string;
139
+ defaultLanguage?: string; /** @description Specifies the channel description. */
140
+ description?: string;
141
+ /**
142
+ * @deprecated
143
+ * @description Whether related channels should be proposed.
144
+ */
145
+ showRelatedChannels?: boolean; /** @description The country of the channel. */
146
+ country?: string; /** @description The ID for a Google Analytics account to track and measure traffic to the channels. */
147
+ trackingAnalyticsAccountId?: string;
148
+ }; /** @description Basic details about a channel, including title, description and thumbnails. */
149
+ ChannelSnippet: {
150
+ /** @description The language of the channel's default title and description. */defaultLanguage?: string; /** @description The country of the channel. */
151
+ country?: string;
152
+ /**
153
+ * Format: date-time
154
+ * @description The date and time that the channel was created.
155
+ */
156
+ publishedAt?: string; /** @description The description of the channel. */
157
+ description?: string;
158
+ thumbnails?: components["schemas"]["ThumbnailDetails"];
159
+ localized?: components["schemas"]["ChannelLocalization"]; /** @description The channel's title. */
160
+ title?: string; /** @description The custom url of the channel. */
161
+ customUrl?: string;
162
+ }; /** @description Statistics about a channel: number of subscribers, number of videos in the channel, etc. */
163
+ ChannelStatistics: {
164
+ /** @description The number of videos uploaded to the channel. */videoCount?: string; /** @description The number of comments for the channel. */
165
+ commentCount?: string; /** @description The number of subscribers that the channel has. */
166
+ subscriberCount?: string; /** @description The number of times the channel has been viewed. */
167
+ viewCount?: string; /** @description Whether or not the number of subscribers is shown for this user. */
168
+ hiddenSubscriberCount?: boolean;
169
+ }; /** @description JSON template for the status part of a channel. */
170
+ ChannelStatus: {
171
+ madeForKids?: boolean; /** @description Whether the channel is considered ypp monetization enabled. See go/yppornot for more details. */
172
+ isChannelMonetizationEnabled?: boolean;
173
+ /**
174
+ * @description Privacy status of the channel.
175
+ * @enum {string}
176
+ */
177
+ privacyStatus?: "public" | "unlisted" | "private"; /** @description If true, then the user is linked to either a YouTube username or G+ account. Otherwise, the user doesn't have a public YouTube identity. */
178
+ isLinked?: boolean;
179
+ /**
180
+ * @description The long uploads status of this channel. See https://support.google.com/youtube/answer/71673 for more information.
181
+ * @enum {string}
182
+ */
183
+ longUploadsStatus?: "longUploadsUnspecified" | "allowed" | "eligible" | "disallowed";
184
+ selfDeclaredMadeForKids?: boolean;
185
+ }; /** @description Freebase topic information related to the channel. */
186
+ ChannelTopicDetails: {
187
+ /** @description A list of Wikipedia URLs that describe the channel's content. */topicCategories?: string[];
188
+ /**
189
+ * @deprecated
190
+ * @description A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API.
191
+ */
192
+ topicIds?: string[];
193
+ }; /** @description Ratings schemes. The country-specific ratings are mostly for movies and shows. LINT.IfChange */
194
+ ContentRating: {
195
+ /**
196
+ * @description The video's Motion Picture Association of America (MPAA) rating.
197
+ * @enum {string}
198
+ */
199
+ mpaaRating?: "mpaaUnspecified" | "mpaaG" | "mpaaPg" | "mpaaPg13" | "mpaaR" | "mpaaNc17" | "mpaaX" | "mpaaUnrated";
200
+ /**
201
+ * @description The video's Office of Film and Literature Classification (OFLC - New Zealand) rating.
202
+ * @enum {string}
203
+ */
204
+ oflcRating?: "oflcUnspecified" | "oflcG" | "oflcPg" | "oflcM" | "oflcR13" | "oflcR15" | "oflcR16" | "oflcR18" | "oflcUnrated" | "oflcRp13" | "oflcRp16" | "oflcRp18";
205
+ /**
206
+ * @description The National Media Council ratings system for United Arab Emirates.
207
+ * @enum {string}
208
+ */
209
+ nmcRating?: "nmcUnspecified" | "nmcG" | "nmcPg" | "nmcPg13" | "nmcPg15" | "nmc15plus" | "nmc18plus" | "nmc18tc" | "nmcUnrated";
210
+ /**
211
+ * @description The video's rating in Peru.
212
+ * @enum {string}
213
+ */
214
+ pefilmRating?: "pefilmUnspecified" | "pefilmPt" | "pefilmPg" | "pefilm14" | "pefilm18" | "pefilmUnrated";
215
+ /**
216
+ * @description The video's rating from Statens medieråd (Sweden's National Media Council).
217
+ * @enum {string}
218
+ */
219
+ smsaRating?: "smsaUnspecified" | "smsaA" | "smsa7" | "smsa11" | "smsa15" | "smsaUnrated";
220
+ /**
221
+ * @description The video's rating from Malaysia's Film Censorship Board.
222
+ * @enum {string}
223
+ */
224
+ fcbmRating?: "fcbmUnspecified" | "fcbmU" | "fcbmPg13" | "fcbmP13" | "fcbm18" | "fcbm18sx" | "fcbm18pa" | "fcbm18sg" | "fcbm18pl" | "fcbmUnrated";
225
+ /**
226
+ * @description The video's rating in Poland.
227
+ * @enum {string}
228
+ */
229
+ nbcplRating?: "nbcplUnspecified" | "nbcplI" | "nbcplIi" | "nbcplIii" | "nbcplIv" | "nbcpl18plus" | "nbcplUnrated";
230
+ /**
231
+ * @description Rating system in Turkey - Evaluation and Classification Board of the Ministry of Culture and Tourism
232
+ * @enum {string}
233
+ */
234
+ ecbmctRating?: "ecbmctUnspecified" | "ecbmctG" | "ecbmct7a" | "ecbmct7plus" | "ecbmct13a" | "ecbmct13plus" | "ecbmct15a" | "ecbmct15plus" | "ecbmct18plus" | "ecbmctUnrated";
235
+ /**
236
+ * @description The video's INCAA (Instituto Nacional de Cine y Artes Audiovisuales - Argentina) rating.
237
+ * @enum {string}
238
+ */
239
+ incaaRating?: "incaaUnspecified" | "incaaAtp" | "incaaSam13" | "incaaSam16" | "incaaSam18" | "incaaC" | "incaaUnrated";
240
+ /**
241
+ * @description The video's NICAM/Kijkwijzer rating from the Nederlands Instituut voor de Classificatie van Audiovisuele Media (Netherlands).
242
+ * @enum {string}
243
+ */
244
+ kijkwijzerRating?: "kijkwijzerUnspecified" | "kijkwijzerAl" | "kijkwijzer6" | "kijkwijzer9" | "kijkwijzer12" | "kijkwijzer16" | "kijkwijzer18" | "kijkwijzerUnrated";
245
+ /**
246
+ * @description The video's rating from France's Conseil supérieur de l’audiovisuel, which rates broadcast content.
247
+ * @enum {string}
248
+ */
249
+ csaRating?: "csaUnspecified" | "csaT" | "csa10" | "csa12" | "csa16" | "csa18" | "csaInterdiction" | "csaUnrated";
250
+ /**
251
+ * @description The video's rating from the Commission de Contrôle des Films (Belgium).
252
+ * @enum {string}
253
+ */
254
+ cicfRating?: "cicfUnspecified" | "cicfE" | "cicfKtEa" | "cicfKntEna" | "cicfUnrated";
255
+ /**
256
+ * @description The rating system for MENA countries, a clone of MPAA. It is needed to prevent titles go live w/o additional QC check, since some of them can be inappropriate for the countries at all. See b/33408548 for more details.
257
+ * @enum {string}
258
+ */
259
+ menaMpaaRating?: "menaMpaaUnspecified" | "menaMpaaG" | "menaMpaaPg" | "menaMpaaPg13" | "menaMpaaR" | "menaMpaaUnrated";
260
+ /**
261
+ * @description The video's rating from Singapore's Media Development Authority (MDA) and, specifically, it's Board of Film Censors (BFC).
262
+ * @enum {string}
263
+ */
264
+ mdaRating?: "mdaUnspecified" | "mdaG" | "mdaPg" | "mdaPg13" | "mdaNc16" | "mdaM18" | "mdaR21" | "mdaUnrated";
265
+ /**
266
+ * @description The video's General Directorate of Radio, Television and Cinematography (Mexico) rating.
267
+ * @enum {string}
268
+ */
269
+ rtcRating?: "rtcUnspecified" | "rtcAa" | "rtcA" | "rtcB" | "rtcB15" | "rtcC" | "rtcD" | "rtcUnrated";
270
+ /**
271
+ * @description The video's Eirin (映倫) rating. Eirin is the Japanese rating system.
272
+ * @enum {string}
273
+ */
274
+ eirinRating?: "eirinUnspecified" | "eirinG" | "eirinPg12" | "eirinR15plus" | "eirinR18plus" | "eirinUnrated";
275
+ /**
276
+ * @description The video's Anatel (Asociación Nacional de Televisión) rating for Chilean television.
277
+ * @enum {string}
278
+ */
279
+ anatelRating?: "anatelUnspecified" | "anatelF" | "anatelI" | "anatelI7" | "anatelI10" | "anatelI12" | "anatelR" | "anatelA" | "anatelUnrated";
280
+ /**
281
+ * @description The video's rating from the Movie and Television Review and Classification Board (Philippines).
282
+ * @enum {string}
283
+ */
284
+ mtrcbRating?: "mtrcbUnspecified" | "mtrcbG" | "mtrcbPg" | "mtrcbR13" | "mtrcbR16" | "mtrcbR18" | "mtrcbX" | "mtrcbUnrated";
285
+ /**
286
+ * @description The video's rating from Medietilsynet, the Norwegian Media Authority.
287
+ * @enum {string}
288
+ */
289
+ medietilsynetRating?: "medietilsynetUnspecified" | "medietilsynetA" | "medietilsynet6" | "medietilsynet7" | "medietilsynet9" | "medietilsynet11" | "medietilsynet12" | "medietilsynet15" | "medietilsynet18" | "medietilsynetUnrated";
290
+ /**
291
+ * @description The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI (CNA).
292
+ * @enum {string}
293
+ */
294
+ cnaRating?: "cnaUnspecified" | "cnaAp" | "cna12" | "cna15" | "cna18" | "cna18plus" | "cnaUnrated";
295
+ /**
296
+ * @description A rating that YouTube uses to identify age-restricted content.
297
+ * @enum {string}
298
+ */
299
+ ytRating?: "ytUnspecified" | "ytAgeRestricted";
300
+ /**
301
+ * @description The video's rating in Greece.
302
+ * @enum {string}
303
+ */
304
+ grfilmRating?: "grfilmUnspecified" | "grfilmK" | "grfilmE" | "grfilmK12" | "grfilmK13" | "grfilmK15" | "grfilmK17" | "grfilmK18" | "grfilmUnrated";
305
+ /**
306
+ * @description The video's rating in Iceland.
307
+ * @enum {string}
308
+ */
309
+ smaisRating?: "smaisUnspecified" | "smaisL" | "smais7" | "smais12" | "smais14" | "smais16" | "smais18" | "smaisUnrated";
310
+ /**
311
+ * @description The video's rating in Venezuela.
312
+ * @enum {string}
313
+ */
314
+ resorteviolenciaRating?: "resorteviolenciaUnspecified" | "resorteviolenciaA" | "resorteviolenciaB" | "resorteviolenciaC" | "resorteviolenciaD" | "resorteviolenciaE" | "resorteviolenciaUnrated";
315
+ /**
316
+ * @description The video's rating in Switzerland.
317
+ * @enum {string}
318
+ */
319
+ chfilmRating?: "chfilmUnspecified" | "chfilm0" | "chfilm6" | "chfilm12" | "chfilm16" | "chfilm18" | "chfilmUnrated";
320
+ /**
321
+ * @description The video's rating from Nigeria's National Film and Video Censors Board.
322
+ * @enum {string}
323
+ */
324
+ nfvcbRating?: "nfvcbUnspecified" | "nfvcbG" | "nfvcbPg" | "nfvcb12" | "nfvcb12a" | "nfvcb15" | "nfvcb18" | "nfvcbRe" | "nfvcbUnrated";
325
+ /**
326
+ * @description The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.
327
+ * @enum {string}
328
+ */
329
+ mpaatRating?: "mpaatUnspecified" | "mpaatGb" | "mpaatRb";
330
+ /**
331
+ * @description The video's rating from Italy's Autorità per le Garanzie nelle Comunicazioni (AGCOM).
332
+ * @enum {string}
333
+ */
334
+ agcomRating?: "agcomUnspecified" | "agcomT" | "agcomVm14" | "agcomVm18" | "agcomUnrated";
335
+ /**
336
+ * @description The video's rating from South Africa's Film and Publication Board.
337
+ * @enum {string}
338
+ */
339
+ fpbRating?: "fpbUnspecified" | "fpbA" | "fpbPg" | "fpb79Pg" | "fpb1012Pg" | "fpb13" | "fpb16" | "fpb18" | "fpbX18" | "fpbXx" | "fpbUnrated" | "fpb10";
340
+ /**
341
+ * @description The video's Consejo de Calificación Cinematográfica (Chile) rating.
342
+ * @enum {string}
343
+ */
344
+ cccRating?: "cccUnspecified" | "cccTe" | "ccc6" | "ccc14" | "ccc18" | "ccc18v" | "ccc18s" | "cccUnrated";
345
+ /**
346
+ * @description The video's Instituto de la Cinematografía y de las Artes Audiovisuales (ICAA - Spain) rating.
347
+ * @enum {string}
348
+ */
349
+ icaaRating?: "icaaUnspecified" | "icaaApta" | "icaa7" | "icaa12" | "icaa13" | "icaa16" | "icaa18" | "icaaX" | "icaaUnrated";
350
+ /**
351
+ * @description Rating system for Canadian TV - Canadian TV Classification System The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian English-language broadcasts. For more information, see the Canadian Broadcast Standards Council website.
352
+ * @enum {string}
353
+ */
354
+ catvRating?: "catvUnspecified" | "catvC" | "catvC8" | "catvG" | "catvPg" | "catv14plus" | "catv18plus" | "catvUnrated" | "catvE";
355
+ /**
356
+ * @description The video's rating from Taiwan's Ministry of Culture (文化部).
357
+ * @enum {string}
358
+ */
359
+ moctwRating?: "moctwUnspecified" | "moctwG" | "moctwP" | "moctwPg" | "moctwR" | "moctwUnrated" | "moctwR12" | "moctwR15";
360
+ /**
361
+ * @description The video's rating from Thailand's Board of Film and Video Censors.
362
+ * @enum {string}
363
+ */
364
+ bfvcRating?: "bfvcUnspecified" | "bfvcG" | "bfvcE" | "bfvc13" | "bfvc15" | "bfvc18" | "bfvc20" | "bfvcB" | "bfvcUnrated";
365
+ /**
366
+ * @description The video's rating in Slovakia.
367
+ * @enum {string}
368
+ */
369
+ skfilmRating?: "skfilmUnspecified" | "skfilmG" | "skfilmP2" | "skfilmP5" | "skfilmP8" | "skfilmUnrated"; /** @description Reasons that explain why the video received its DJCQT (Brazil) rating. */
370
+ djctqRatingReasons?: ("djctqRatingReasonUnspecified" | "djctqViolence" | "djctqExtremeViolence" | "djctqSexualContent" | "djctqNudity" | "djctqSex" | "djctqExplicitSex" | "djctqDrugs" | "djctqLegalDrugs" | "djctqIllegalDrugs" | "djctqInappropriateLanguage" | "djctqCriminalActs" | "djctqImpactingContent" | "djctqFear" | "djctqMedicalProcedures" | "djctqSensitiveTopics" | "djctqFantasyViolence")[];
371
+ /**
372
+ * @description The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute).
373
+ * @enum {string}
374
+ */
375
+ mekuRating?: "mekuUnspecified" | "mekuS" | "meku7" | "meku12" | "meku16" | "meku18" | "mekuUnrated";
376
+ /**
377
+ * @description The video's rating in Egypt.
378
+ * @enum {string}
379
+ */
380
+ egfilmRating?: "egfilmUnspecified" | "egfilmGn" | "egfilm18" | "egfilmBn" | "egfilmUnrated";
381
+ /**
382
+ * @description The video's rating from Luxembourg's Commission de surveillance de la classification des films (CSCF).
383
+ * @enum {string}
384
+ */
385
+ cscfRating?: "cscfUnspecified" | "cscfAl" | "cscfA" | "cscf6" | "cscf9" | "cscf12" | "cscf16" | "cscf18" | "cscfUnrated";
386
+ /**
387
+ * @description The video's Australian Classification Board (ACB) or Australian Communications and Media Authority (ACMA) rating. ACMA ratings are used to classify children's television programming.
388
+ * @enum {string}
389
+ */
390
+ acbRating?: "acbUnspecified" | "acbE" | "acbP" | "acbC" | "acbG" | "acbPg" | "acbM" | "acbMa15plus" | "acbR18plus" | "acbUnrated";
391
+ /**
392
+ * @description The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian French-language broadcasts. For more information, see the Canadian Broadcast Standards Council website.
393
+ * @enum {string}
394
+ */
395
+ catvfrRating?: "catvfrUnspecified" | "catvfrG" | "catvfr8plus" | "catvfr13plus" | "catvfr16plus" | "catvfr18plus" | "catvfrUnrated" | "catvfrE";
396
+ /**
397
+ * @description The video's rating from Hong Kong's Office for Film, Newspaper and Article Administration.
398
+ * @enum {string}
399
+ */
400
+ fcoRating?: "fcoUnspecified" | "fcoI" | "fcoIia" | "fcoIib" | "fcoIi" | "fcoIii" | "fcoUnrated";
401
+ /**
402
+ * @description The video's British Board of Film Classification (BBFC) rating.
403
+ * @enum {string}
404
+ */
405
+ bbfcRating?: "bbfcUnspecified" | "bbfcU" | "bbfcPg" | "bbfc12a" | "bbfc12" | "bbfc15" | "bbfc18" | "bbfcR18" | "bbfcUnrated";
406
+ /**
407
+ * @description The video's rating from the Hungarian Nemzeti Filmiroda, the Rating Committee of the National Office of Film.
408
+ * @enum {string}
409
+ */
410
+ rcnofRating?: "rcnofUnspecified" | "rcnofI" | "rcnofIi" | "rcnofIii" | "rcnofIv" | "rcnofV" | "rcnofVi" | "rcnofUnrated";
411
+ /**
412
+ * @description The video's rating from Portugal's Comissão de Classificação de Espect´culos.
413
+ * @enum {string}
414
+ */
415
+ cceRating?: "cceUnspecified" | "cceM4" | "cceM6" | "cceM12" | "cceM16" | "cceM18" | "cceUnrated" | "cceM14";
416
+ /**
417
+ * @description The video's TV Parental Guidelines (TVPG) rating.
418
+ * @enum {string}
419
+ */
420
+ tvpgRating?: "tvpgUnspecified" | "tvpgY" | "tvpgY7" | "tvpgY7Fv" | "tvpgG" | "tvpgPg" | "pg14" | "tvpgMa" | "tvpgUnrated";
421
+ /**
422
+ * @description The video's Central Board of Film Certification (CBFC - India) rating.
423
+ * @enum {string}
424
+ */
425
+ cbfcRating?: "cbfcUnspecified" | "cbfcU" | "cbfcUA" | "cbfcUA7plus" | "cbfcUA13plus" | "cbfcUA16plus" | "cbfcA" | "cbfcS" | "cbfcUnrated";
426
+ /**
427
+ * @description The video's Korea Media Rating Board (영상물등급위원회) rating. The KMRB rates videos in South Korea.
428
+ * @enum {string}
429
+ */
430
+ kmrbRating?: "kmrbUnspecified" | "kmrbAll" | "kmrb12plus" | "kmrb15plus" | "kmrbTeenr" | "kmrbR" | "kmrbUnrated";
431
+ /**
432
+ * @description The video's rating from Ireland's Raidió Teilifís Éireann.
433
+ * @enum {string}
434
+ */
435
+ rteRating?: "rteUnspecified" | "rteGa" | "rteCh" | "rtePs" | "rteMa" | "rteUnrated";
436
+ /**
437
+ * @description The video's rating from Indonesia's Lembaga Sensor Film.
438
+ * @enum {string}
439
+ */
440
+ lsfRating?: "lsfUnspecified" | "lsfSu" | "lsfA" | "lsfBo" | "lsf13" | "lsfR" | "lsf17" | "lsfD" | "lsf21" | "lsfUnrated";
441
+ /**
442
+ * @description The video's rating from the Danish Film Institute's (Det Danske Filminstitut) Media Council for Children and Young People.
443
+ * @enum {string}
444
+ */
445
+ mccypRating?: "mccypUnspecified" | "mccypA" | "mccyp7" | "mccyp11" | "mccyp15" | "mccypUnrated";
446
+ /**
447
+ * @description The video's rating from the Austrian Board of Media Classification (Bundesministerium für Unterricht, Kunst und Kultur).
448
+ * @enum {string}
449
+ */
450
+ bmukkRating?: "bmukkUnspecified" | "bmukkAa" | "bmukk6" | "bmukk8" | "bmukk10" | "bmukk12" | "bmukk14" | "bmukk16" | "bmukkUnrated";
451
+ /**
452
+ * @description The video's rating in Israel.
453
+ * @enum {string}
454
+ */
455
+ ilfilmRating?: "ilfilmUnspecified" | "ilfilmAa" | "ilfilm12" | "ilfilm14" | "ilfilm16" | "ilfilm18" | "ilfilmUnrated";
456
+ /**
457
+ * @description The video's Ministerio de Cultura (Colombia) rating.
458
+ * @enum {string}
459
+ */
460
+ mocRating?: "mocUnspecified" | "mocE" | "mocT" | "moc7" | "moc12" | "moc15" | "moc18" | "mocX" | "mocBanned" | "mocUnrated";
461
+ /**
462
+ * @description The video's rating from the Bulgarian National Film Center.
463
+ * @enum {string}
464
+ */
465
+ nfrcRating?: "nfrcUnspecified" | "nfrcA" | "nfrcB" | "nfrcC" | "nfrcD" | "nfrcX" | "nfrcUnrated";
466
+ /**
467
+ * @description The video's rating from the Ministero dei Beni e delle Attività Culturali e del Turismo (Italy).
468
+ * @enum {string}
469
+ */
470
+ mibacRating?: "mibacUnspecified" | "mibacT" | "mibacVap" | "mibacVm6" | "mibacVm12" | "mibacVm14" | "mibacVm16" | "mibacVm18" | "mibacUnrated";
471
+ /**
472
+ * @description The video's rating from Malta's Film Age-Classification Board.
473
+ * @enum {string}
474
+ */
475
+ mccaaRating?: "mccaaUnspecified" | "mccaaU" | "mccaaPg" | "mccaa12a" | "mccaa12" | "mccaa14" | "mccaa15" | "mccaa16" | "mccaa18" | "mccaaUnrated";
476
+ /**
477
+ * @description The video's rating from the Nacionãlais Kino centrs (National Film Centre of Latvia).
478
+ * @enum {string}
479
+ */
480
+ nkclvRating?: "nkclvUnspecified" | "nkclvU" | "nkclv7plus" | "nkclv12plus" | "nkclv16plus" | "nkclv18plus" | "nkclvUnrated";
481
+ /**
482
+ * @description The video's rating in the Czech Republic.
483
+ * @enum {string}
484
+ */
485
+ czfilmRating?: "czfilmUnspecified" | "czfilmU" | "czfilm12" | "czfilm14" | "czfilm18" | "czfilmUnrated";
486
+ /**
487
+ * @description The video's Canadian Home Video Rating System (CHVRS) rating.
488
+ * @enum {string}
489
+ */
490
+ chvrsRating?: "chvrsUnspecified" | "chvrsG" | "chvrsPg" | "chvrs14a" | "chvrs18a" | "chvrsR" | "chvrsE" | "chvrsUnrated"; /** @description Reasons that explain why the video received its FPB (South Africa) rating. */
491
+ fpbRatingReasons?: ("fpbRatingReasonUnspecified" | "fpbBlasphemy" | "fpbLanguage" | "fpbNudity" | "fpbPrejudice" | "fpbSex" | "fpbViolence" | "fpbDrugs" | "fpbSexualViolence" | "fpbHorror" | "fpbCriminalTechniques" | "fpbImitativeActsTechniques")[];
492
+ /**
493
+ * @description The video's Irish Film Classification Office (IFCO - Ireland) rating. See the IFCO website for more information.
494
+ * @enum {string}
495
+ */
496
+ ifcoRating?: "ifcoUnspecified" | "ifcoG" | "ifcoPg" | "ifco12" | "ifco12a" | "ifco15" | "ifco15a" | "ifco16" | "ifco18" | "ifcoUnrated";
497
+ /**
498
+ * @deprecated
499
+ * @description This property has been deprecated. Use the contentDetails.contentRating.cncRating instead.
500
+ * @enum {string}
501
+ */
502
+ fmocRating?: "fmocUnspecified" | "fmocU" | "fmoc10" | "fmoc12" | "fmoc16" | "fmoc18" | "fmocE" | "fmocUnrated";
503
+ /**
504
+ * @description The video's rating in Estonia.
505
+ * @enum {string}
506
+ */
507
+ eefilmRating?: "eefilmUnspecified" | "eefilmPere" | "eefilmL" | "eefilmMs6" | "eefilmK6" | "eefilmMs12" | "eefilmK12" | "eefilmK14" | "eefilmK16" | "eefilmUnrated";
508
+ /**
509
+ * @description The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) rating.
510
+ * @enum {string}
511
+ */
512
+ fskRating?: "fskUnspecified" | "fsk0" | "fsk6" | "fsk12" | "fsk16" | "fsk18" | "fskUnrated";
513
+ /**
514
+ * @description The video's rating from the Kenya Film Classification Board.
515
+ * @enum {string}
516
+ */
517
+ kfcbRating?: "kfcbUnspecified" | "kfcbG" | "kfcbPg" | "kfcb16plus" | "kfcbR" | "kfcbUnrated";
518
+ /**
519
+ * @description The video's Departamento de Justiça, Classificação, Qualificação e Títulos (DJCQT - Brazil) rating.
520
+ * @enum {string}
521
+ */
522
+ djctqRating?: "djctqUnspecified" | "djctqL" | "djctq10" | "djctq12" | "djctq14" | "djctq16" | "djctq18" | "djctqEr" | "djctqL10" | "djctqL12" | "djctqL14" | "djctqL16" | "djctqL18" | "djctq1012" | "djctq1014" | "djctq1016" | "djctq1018" | "djctq1214" | "djctq1216" | "djctq1218" | "djctq1416" | "djctq1418" | "djctq1618" | "djctqUnrated";
523
+ /**
524
+ * @description The video's National Film Registry of the Russian Federation (MKRF - Russia) rating.
525
+ * @enum {string}
526
+ */
527
+ russiaRating?: "russiaUnspecified" | "russia0" | "russia6" | "russia12" | "russia16" | "russia18" | "russiaUnrated";
528
+ /**
529
+ * @description Rating system in France - Commission de classification cinematographique
530
+ * @enum {string}
531
+ */
532
+ cncRating?: "cncUnspecified" | "cncT" | "cnc10" | "cnc12" | "cnc16" | "cnc18" | "cncE" | "cncInterdiction" | "cncUnrated";
533
+ /**
534
+ * @description The video's rating system for Vietnam - MCST
535
+ * @enum {string}
536
+ */
537
+ mcstRating?: "mcstUnspecified" | "mcstP" | "mcst0" | "mcstC13" | "mcstC16" | "mcst16plus" | "mcstC18" | "mcstGPg" | "mcstUnrated";
538
+ /**
539
+ * @description The video's rating from the Maldives National Bureau of Classification.
540
+ * @enum {string}
541
+ */
542
+ nbcRating?: "nbcUnspecified" | "nbcG" | "nbcPg" | "nbc12plus" | "nbc15plus" | "nbc18plus" | "nbc18plusr" | "nbcPu" | "nbcUnrated";
543
+ }; /** @description Geographical coordinates of a point, in WGS84. */
544
+ GeoPoint: {
545
+ /** @description Altitude above the reference ellipsoid, in meters. */altitude?: number; /** @description Latitude in degrees. */
546
+ latitude?: number; /** @description Longitude in degrees. */
547
+ longitude?: number;
548
+ }; /** @description Branding properties for images associated with the channel. */
549
+ ImageSettings: {
550
+ /**
551
+ * @deprecated
552
+ * @description The URL for a 1px by 1px tracking pixel that can be used to collect statistics for views of the channel or video pages.
553
+ */
554
+ trackingImageUrl?: string;
555
+ /**
556
+ * @deprecated
557
+ * @description Banner image. TV size extra high resolution (2120x1192).
558
+ */
559
+ bannerTvImageUrl?: string; /** @deprecated */
560
+ watchIconImageUrl?: string;
561
+ /**
562
+ * @deprecated
563
+ * @description Banner image. TV size high resolution (1920x1080).
564
+ */
565
+ bannerTvHighImageUrl?: string;
566
+ /**
567
+ * @deprecated
568
+ * @description Banner image. Tablet size low resolution (1138x188).
569
+ */
570
+ bannerTabletLowImageUrl?: string;
571
+ /**
572
+ * @deprecated
573
+ * @description Banner image. TV size medium resolution (1280x720).
574
+ */
575
+ bannerTvMediumImageUrl?: string;
576
+ largeBrandedBannerImageImapScript?: components["schemas"]["LocalizedProperty"];
577
+ smallBrandedBannerImageImapScript?: components["schemas"]["LocalizedProperty"];
578
+ /**
579
+ * @deprecated
580
+ * @description Banner image. Mobile size low resolution (320x88).
581
+ */
582
+ bannerMobileLowImageUrl?: string;
583
+ /**
584
+ * @deprecated
585
+ * @description Banner image. Mobile size high resolution (1440x395).
586
+ */
587
+ bannerMobileExtraHdImageUrl?: string; /** @description This is generated when a ChannelBanner.Insert request has succeeded for the given channel. */
588
+ bannerExternalUrl?: string;
589
+ backgroundImageUrl?: components["schemas"]["LocalizedProperty"];
590
+ /**
591
+ * @deprecated
592
+ * @description Banner image. Tablet size (1707x283).
593
+ */
594
+ bannerTabletImageUrl?: string;
595
+ /**
596
+ * @deprecated
597
+ * @description Banner image. Mobile size high resolution (1280x360).
598
+ */
599
+ bannerMobileHdImageUrl?: string;
600
+ /**
601
+ * @deprecated
602
+ * @description Banner image. TV size low resolution (854x480).
603
+ */
604
+ bannerTvLowImageUrl?: string;
605
+ largeBrandedBannerImageUrl?: components["schemas"]["LocalizedProperty"];
606
+ /**
607
+ * @deprecated
608
+ * @description Banner image. Mobile size (640x175).
609
+ */
610
+ bannerMobileImageUrl?: string;
611
+ /**
612
+ * @deprecated
613
+ * @description Banner image. Tablet size extra high resolution (2560x424).
614
+ */
615
+ bannerTabletExtraHdImageUrl?: string;
616
+ /**
617
+ * @deprecated
618
+ * @description Banner image. Tablet size high resolution (2276x377).
619
+ */
620
+ bannerTabletHdImageUrl?: string;
621
+ smallBrandedBannerImageUrl?: components["schemas"]["LocalizedProperty"];
622
+ /**
623
+ * @deprecated
624
+ * @description Banner image. Desktop size (1060x175).
625
+ */
626
+ bannerImageUrl?: string;
627
+ /**
628
+ * @deprecated
629
+ * @description Banner image. Mobile size medium/high resolution (960x263).
630
+ */
631
+ bannerMobileMediumHdImageUrl?: string;
632
+ };
633
+ LanguageTag: {
634
+ value?: string;
635
+ };
636
+ LocalizedProperty: {
637
+ defaultLanguage?: components["schemas"]["LanguageTag"];
638
+ default?: string;
639
+ localized?: components["schemas"]["LocalizedString"][];
640
+ };
641
+ LocalizedString: {
642
+ language?: string;
643
+ value?: string;
644
+ }; /** @description Paging details for lists of resources, including total number of items available and number of resources returned in a single page. */
645
+ PageInfo: {
646
+ /** @description The total number of results in the result set. */totalResults?: number; /** @description The number of results included in the API response. */
647
+ resultsPerPage?: number;
648
+ }; /** @description A *playlistItem* resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel. */
649
+ PlaylistItem: {
650
+ snippet?: components["schemas"]["PlaylistItemSnippet"]; /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem". */
651
+ kind?: string; /** @description Etag of this resource. */
652
+ etag?: string; /** @description The ID that YouTube uses to uniquely identify the playlist item. */
653
+ id?: string;
654
+ contentDetails?: components["schemas"]["PlaylistItemContentDetails"];
655
+ status?: components["schemas"]["PlaylistItemStatus"];
656
+ };
657
+ PlaylistItemContentDetails: {
658
+ /**
659
+ * Format: date-time
660
+ * @description The date and time that the video was published to YouTube.
661
+ */
662
+ videoPublishedAt?: string;
663
+ /**
664
+ * @deprecated
665
+ * @description The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video.
666
+ */
667
+ endAt?: string; /** @description A user-generated note for this item. */
668
+ note?: string;
669
+ /**
670
+ * @deprecated
671
+ * @description The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0.
672
+ */
673
+ startAt?: string; /** @description The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request. */
674
+ videoId?: string;
675
+ };
676
+ PlaylistItemListResponse: {
677
+ /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItemListResponse". */kind?: string; /** @description A list of playlist items that match the request criteria. */
678
+ items?: components["schemas"]["PlaylistItem"][]; /** @description The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. */
679
+ nextPageToken?: string; /** @description Serialized EventId of the request which produced this response. */
680
+ eventId?: string; /** @description The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. */
681
+ prevPageToken?: string;
682
+ etag?: string;
683
+ tokenPagination?: components["schemas"]["TokenPagination"]; /** @description The visitorId identifies the visitor. */
684
+ visitorId?: string;
685
+ pageInfo?: components["schemas"]["PageInfo"];
686
+ }; /** @description Basic details about a playlist, including title, description and thumbnails. Basic details of a YouTube Playlist item provided by the author. Next ID: 15 */
687
+ PlaylistItemSnippet: {
688
+ /** @description Channel id for the channel this video belongs to. */videoOwnerChannelId?: string;
689
+ /**
690
+ * Format: date-time
691
+ * @description The date and time that the item was added to the playlist.
692
+ */
693
+ publishedAt?: string; /** @description Channel title for the channel this video belongs to. */
694
+ videoOwnerChannelTitle?: string; /** @description Channel title for the channel that the playlist item belongs to. */
695
+ channelTitle?: string;
696
+ thumbnails?: components["schemas"]["ThumbnailDetails"]; /** @description The order in which the item appears in the playlist. The value uses a zero-based index, so the first item has a position of 0, the second item has a position of 1, and so forth. */
697
+ position?: number; /** @description The item's description. */
698
+ description?: string; /** @description The ID that YouTube uses to uniquely identify thGe playlist that the playlist item is in. */
699
+ playlistId?: string; /** @description The ID that YouTube uses to uniquely identify the user that added the item to the playlist. */
700
+ channelId?: string; /** @description The item's title. */
701
+ title?: string;
702
+ resourceId?: components["schemas"]["ResourceId"];
703
+ }; /** @description Information about the playlist item's privacy status. */
704
+ PlaylistItemStatus: {
705
+ /**
706
+ * @description This resource's privacy status.
707
+ * @enum {string}
708
+ */
709
+ privacyStatus?: "public" | "unlisted" | "private";
710
+ }; /** @description A pair Property / Value. */
711
+ PropertyValue: {
712
+ /** @description A property. */property?: string; /** @description The property's value. */
713
+ value?: string;
714
+ }; /** @description A resource id is a generic reference that points to another YouTube resource. */
715
+ ResourceId: {
716
+ /** @description The type of the API resource. */kind?: string; /** @description The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist. */
717
+ playlistId?: string; /** @description The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel. */
718
+ channelId?: string; /** @description The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video. */
719
+ videoId?: string;
720
+ };
721
+ SearchListResponse: {
722
+ /** @description Serialized EventId of the request which produced this response. */eventId?: string; /** @description The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. */
723
+ nextPageToken?: string;
724
+ regionCode?: string; /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#searchListResponse". */
725
+ kind?: string; /** @description Pagination information for token pagination. */
726
+ items?: components["schemas"]["SearchResult"][];
727
+ pageInfo?: components["schemas"]["PageInfo"]; /** @description The visitorId identifies the visitor. */
728
+ visitorId?: string; /** @description Etag of this resource. */
729
+ etag?: string;
730
+ tokenPagination?: components["schemas"]["TokenPagination"]; /** @description The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. */
731
+ prevPageToken?: string;
732
+ }; /** @description A search result contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data. */
733
+ SearchResult: {
734
+ /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#searchResult". */kind?: string; /** @description Etag of this resource. */
735
+ etag?: string;
736
+ id?: components["schemas"]["ResourceId"];
737
+ snippet?: components["schemas"]["SearchResultSnippet"];
738
+ }; /** @description Basic details about a search result, including title, description and thumbnails of the item referenced by the search result. */
739
+ SearchResultSnippet: {
740
+ /** @description The title of the channel that published the resource that the search result identifies. */channelTitle?: string;
741
+ thumbnails?: components["schemas"]["ThumbnailDetails"];
742
+ /**
743
+ * @description It indicates if the resource (video or channel) has upcoming/active live broadcast content. Or it's "none" if there is not any upcoming/active live broadcasts.
744
+ * @enum {string}
745
+ */
746
+ liveBroadcastContent?: "none" | "upcoming" | "live" | "completed"; /** @description The title of the search result. */
747
+ title?: string; /** @description The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies. */
748
+ channelId?: string; /** @description A description of the search result. */
749
+ description?: string;
750
+ /**
751
+ * Format: date-time
752
+ * @description The creation date and time of the resource that the search result identifies.
753
+ */
754
+ publishedAt?: string;
755
+ }; /** @description A thumbnail is an image representing a YouTube resource. */
756
+ Thumbnail: {
757
+ /** @description The thumbnail image's URL. */url?: string; /** @description (Optional) Height of the thumbnail image. */
758
+ height?: number; /** @description (Optional) Width of the thumbnail image. */
759
+ width?: number;
760
+ }; /** @description Internal representation of thumbnails for a YouTube resource. */
761
+ ThumbnailDetails: {
762
+ high?: components["schemas"]["Thumbnail"];
763
+ default?: components["schemas"]["Thumbnail"];
764
+ medium?: components["schemas"]["Thumbnail"];
765
+ standard?: components["schemas"]["Thumbnail"];
766
+ maxres?: components["schemas"]["Thumbnail"];
767
+ }; /** @description Stub token pagination template to suppress results. */
768
+ TokenPagination: Record<string, never>; /** @description A *video* resource represents a YouTube video. */
769
+ Video: {
770
+ /** @description Etag of this resource. */etag?: string;
771
+ recordingDetails?: components["schemas"]["VideoRecordingDetails"];
772
+ player?: components["schemas"]["VideoPlayer"];
773
+ liveStreamingDetails?: components["schemas"]["VideoLiveStreamingDetails"];
774
+ projectDetails?: components["schemas"]["VideoProjectDetails"]; /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#video". */
775
+ kind?: string;
776
+ ageGating?: components["schemas"]["VideoAgeGating"];
777
+ statistics?: components["schemas"]["VideoStatistics"];
778
+ suggestions?: components["schemas"]["VideoSuggestions"]; /** @description The ID that YouTube uses to uniquely identify the video. */
779
+ id?: string;
780
+ fileDetails?: components["schemas"]["VideoFileDetails"];
781
+ processingDetails?: components["schemas"]["VideoProcessingDetails"];
782
+ status?: components["schemas"]["VideoStatus"];
783
+ contentDetails?: components["schemas"]["VideoContentDetails"];
784
+ monetizationDetails?: components["schemas"]["VideoMonetizationDetails"]; /** @description The localizations object contains localized versions of the basic details about the video, such as its title and description. */
785
+ localizations?: {
786
+ [key: string]: components["schemas"]["VideoLocalization"];
787
+ };
788
+ topicDetails?: components["schemas"]["VideoTopicDetails"];
789
+ paidProductPlacementDetails?: components["schemas"]["VideoPaidProductPlacementDetails"];
790
+ snippet?: components["schemas"]["VideoSnippet"];
791
+ };
792
+ VideoAgeGating: {
793
+ /**
794
+ * @description Video game rating, if any.
795
+ * @enum {string}
796
+ */
797
+ videoGameRating?: "anyone" | "m15Plus" | "m16Plus" | "m17Plus"; /** @description Indicates whether or not the video has alcoholic beverage content. Only users of legal purchasing age in a particular country, as identified by ICAP, can view the content. */
798
+ alcoholContent?: boolean; /** @description Age-restricted trailers. For redband trailers and adult-rated video-games. Only users aged 18+ can view the content. The the field is true the content is restricted to viewers aged 18+. Otherwise The field won't be present. */
799
+ restricted?: boolean;
800
+ }; /** @description Details about the content of a YouTube Video. */
801
+ VideoContentDetails: {
802
+ /** @description The value of is_license_content indicates whether the video is licensed content. */licensedContent?: boolean;
803
+ contentRating?: components["schemas"]["ContentRating"]; /** @description The value of dimension indicates whether the video is available in 3D or in 2D. */
804
+ dimension?: string;
805
+ countryRestriction?: components["schemas"]["AccessPolicy"];
806
+ /**
807
+ * @description The value of definition indicates whether the video is available in high definition or only in standard definition.
808
+ * @enum {string}
809
+ */
810
+ definition?: "sd" | "hd"; /** @description The length of the video. The tag value is an ISO 8601 duration in the format PT#M#S, in which the letters PT indicate that the value specifies a period of time, and the letters M and S refer to length in minutes and seconds, respectively. The # characters preceding the M and S letters are both integers that specify the number of minutes (or seconds) of the video. For example, a value of PT15M51S indicates that the video is 15 minutes and 51 seconds long. */
811
+ duration?: string;
812
+ /**
813
+ * @description The value of captions indicates whether the video has captions or not.
814
+ * @enum {string}
815
+ */
816
+ caption?: "true" | "false";
817
+ regionRestriction?: components["schemas"]["VideoContentDetailsRegionRestriction"];
818
+ /**
819
+ * @description Specifies the projection format of the video.
820
+ * @enum {string}
821
+ */
822
+ projection?: "rectangular" | "360"; /** @description Indicates whether the video uploader has provided a custom thumbnail image for the video. This property is only visible to the video uploader. */
823
+ hasCustomThumbnail?: boolean;
824
+ }; /** @description DEPRECATED Region restriction of the video. */
825
+ VideoContentDetailsRegionRestriction: {
826
+ /** @description A list of region codes that identify countries where the video is viewable. If this property is present and a country is not listed in its value, then the video is blocked from appearing in that country. If this property is present and contains an empty list, the video is blocked in all countries. */allowed?: string[]; /** @description A list of region codes that identify countries where the video is blocked. If this property is present and a country is not listed in its value, then the video is viewable in that country. If this property is present and contains an empty list, the video is viewable in all countries. */
827
+ blocked?: string[];
828
+ }; /** @description Describes original video file properties, including technical details about audio and video streams, but also metadata information like content length, digitization time, or geotagging information. */
829
+ VideoFileDetails: {
830
+ /** @description The uploaded file's name. This field is present whether a video file or another type of file was uploaded. */fileName?: string; /** @description The date and time when the uploaded video file was created. The value is specified in ISO 8601 format. Currently, the following ISO 8601 formats are supported: - Date only: YYYY-MM-DD - Naive time: YYYY-MM-DDTHH:MM:SS - Time with timezone: YYYY-MM-DDTHH:MM:SS+HH:MM */
831
+ creationTime?: string; /** @description The uploaded video file's combined (video and audio) bitrate in bits per second. */
832
+ bitrateBps?: string; /** @description A list of audio streams contained in the uploaded video file. Each item in the list contains detailed metadata about an audio stream. */
833
+ audioStreams?: components["schemas"]["VideoFileDetailsAudioStream"][]; /** @description The uploaded video file's container format. */
834
+ container?: string; /** @description The length of the uploaded video in milliseconds. */
835
+ durationMs?: string; /** @description The uploaded file's size in bytes. This field is present whether a video file or another type of file was uploaded. */
836
+ fileSize?: string;
837
+ /**
838
+ * @description The uploaded file's type as detected by YouTube's video processing engine. Currently, YouTube only processes video files, but this field is present whether a video file or another type of file was uploaded.
839
+ * @enum {string}
840
+ */
841
+ fileType?: "video" | "audio" | "image" | "archive" | "document" | "project" | "other"; /** @description A list of video streams contained in the uploaded video file. Each item in the list contains detailed metadata about a video stream. */
842
+ videoStreams?: components["schemas"]["VideoFileDetailsVideoStream"][];
843
+ }; /** @description Information about an audio stream. */
844
+ VideoFileDetailsAudioStream: {
845
+ /** @description The audio stream's bitrate, in bits per second. */bitrateBps?: string; /** @description The number of audio channels that the stream contains. */
846
+ channelCount?: number; /** @description The audio codec that the stream uses. */
847
+ codec?: string; /** @description A value that uniquely identifies a video vendor. Typically, the value is a four-letter vendor code. */
848
+ vendor?: string;
849
+ }; /** @description Information about a video stream. */
850
+ VideoFileDetailsVideoStream: {
851
+ /** @description The video stream's bitrate, in bits per second. */bitrateBps?: string; /** @description The video stream's frame rate, in frames per second. */
852
+ frameRateFps?: number;
853
+ /**
854
+ * @description The amount that YouTube needs to rotate the original source content to properly display the video.
855
+ * @enum {string}
856
+ */
857
+ rotation?: "none" | "clockwise" | "upsideDown" | "counterClockwise" | "other"; /** @description The encoded video content's height in pixels. */
858
+ heightPixels?: number; /** @description The video content's display aspect ratio, which specifies the aspect ratio in which the video should be displayed. */
859
+ aspectRatio?: number; /** @description The encoded video content's width in pixels. You can calculate the video's encoding aspect ratio as width_pixels / height_pixels. */
860
+ widthPixels?: number; /** @description A value that uniquely identifies a video vendor. Typically, the value is a four-letter vendor code. */
861
+ vendor?: string; /** @description The video codec that the stream uses. */
862
+ codec?: string;
863
+ };
864
+ VideoListResponse: {
865
+ /**
866
+ * @deprecated
867
+ * @description Serialized EventId of the request which produced this response.
868
+ */
869
+ eventId?: string; /** @description The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set. */
870
+ nextPageToken?: string; /** @description Identifies what kind of resource this is. Value: the fixed string "youtube#videoListResponse". */
871
+ kind?: string;
872
+ items?: components["schemas"]["Video"][];
873
+ pageInfo?: components["schemas"]["PageInfo"];
874
+ /**
875
+ * @deprecated
876
+ * @description The visitorId identifies the visitor.
877
+ */
878
+ visitorId?: string; /** @description Etag of this resource. */
879
+ etag?: string;
880
+ tokenPagination?: components["schemas"]["TokenPagination"]; /** @description The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set. */
881
+ prevPageToken?: string;
882
+ }; /** @description Details about the live streaming metadata. */
883
+ VideoLiveStreamingDetails: {
884
+ /**
885
+ * Format: date-time
886
+ * @description The time that the broadcast actually started. This value will not be available until the broadcast begins.
887
+ */
888
+ actualStartTime?: string;
889
+ /**
890
+ * Format: date-time
891
+ * @description The time that the broadcast is scheduled to begin.
892
+ */
893
+ scheduledStartTime?: string; /** @description The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended. */
894
+ concurrentViewers?: string;
895
+ /**
896
+ * Format: date-time
897
+ * @description The time that the broadcast actually ended. This value will not be available until the broadcast is over.
898
+ */
899
+ actualEndTime?: string;
900
+ /**
901
+ * Format: date-time
902
+ * @description The time that the broadcast is scheduled to end. If the value is empty or the property is not present, then the broadcast is scheduled to continue indefinitely.
903
+ */
904
+ scheduledEndTime?: string; /** @description The ID of the currently active live chat attached to this video. This field is filled only if the video is a currently live broadcast that has live chat. Once the broadcast transitions to complete this field will be removed and the live chat closed down. For persistent broadcasts that live chat id will no longer be tied to this video but rather to the new video being displayed at the persistent page. */
905
+ activeLiveChatId?: string;
906
+ }; /** @description Localized versions of certain video properties (e.g. title). */
907
+ VideoLocalization: {
908
+ /** @description Localized version of the video's title. */title?: string; /** @description Localized version of the video's description. */
909
+ description?: string;
910
+ }; /** @description Details about monetization of a YouTube Video. */
911
+ VideoMonetizationDetails: {
912
+ access?: components["schemas"]["AccessPolicy"];
913
+ }; /** @description Details about paid content, such as paid product placement, sponsorships or endorsement, contained in a YouTube video and a method to inform viewers of paid promotion. This data can only be retrieved by the video owner. */
914
+ VideoPaidProductPlacementDetails: {
915
+ /** @description This boolean represents whether the video contains Paid Product Placement, Studio equivalent: https://screenshot.googleplex.com/4Me79DE6AfT2ktp.png */hasPaidProductPlacement?: boolean;
916
+ }; /** @description Player to be used for a video playback. */
917
+ VideoPlayer: {
918
+ embedHeight?: string; /** @description The embed width */
919
+ embedWidth?: string; /** @description An <iframe> tag that embeds a player that will play the video. */
920
+ embedHtml?: string;
921
+ }; /** @description Describes processing status and progress and availability of some other Video resource parts. */
922
+ VideoProcessingDetails: {
923
+ /**
924
+ * @description The video's processing status. This value indicates whether YouTube was able to process the video or if the video is still being processed.
925
+ * @enum {string}
926
+ */
927
+ processingStatus?: "processing" | "succeeded" | "failed" | "terminated"; /** @description This value indicates whether keyword (tag) suggestions are available for the video. Tags can be added to a video's metadata to make it easier for other users to find the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. */
928
+ tagSuggestionsAvailability?: string; /** @description This value indicates whether thumbnail images have been generated for the video. */
929
+ thumbnailsAvailability?: string; /** @description This value indicates whether video editing suggestions, which might improve video quality or the playback experience, are available for the video. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. */
930
+ editorSuggestionsAvailability?: string;
931
+ processingProgress?: components["schemas"]["VideoProcessingDetailsProcessingProgress"];
932
+ /**
933
+ * @description The reason that YouTube failed to process the video. This property will only have a value if the processingStatus property's value is failed.
934
+ * @enum {string}
935
+ */
936
+ processingFailureReason?: "uploadFailed" | "transcodeFailed" | "streamingFailed" | "other"; /** @description This value indicates whether file details are available for the uploaded video. You can retrieve a video's file details by requesting the fileDetails part in your videos.list() request. */
937
+ fileDetailsAvailability?: string; /** @description This value indicates whether the video processing engine has generated suggestions that might improve YouTube's ability to process the the video, warnings that explain video processing problems, or errors that cause video processing problems. You can retrieve these suggestions by requesting the suggestions part in your videos.list() request. */
938
+ processingIssuesAvailability?: string;
939
+ }; /** @description Video processing progress and completion time estimate. */
940
+ VideoProcessingDetailsProcessingProgress: {
941
+ /** @description An estimate of the total number of parts that need to be processed for the video. The number may be updated with more precise estimates while YouTube processes the video. */partsTotal?: string; /** @description An estimate of the amount of time, in millseconds, that YouTube needs to finish processing the video. */
942
+ timeLeftMs?: string; /** @description The number of parts of the video that YouTube has already processed. You can estimate the percentage of the video that YouTube has already processed by calculating: 100 * parts_processed / parts_total Note that since the estimated number of parts could increase without a corresponding increase in the number of parts that have already been processed, it is possible that the calculated progress could periodically decrease while YouTube processes a video. */
943
+ partsProcessed?: string;
944
+ }; /** @description DEPRECATED. b/157517979: This part was never populated after it was added. However, it sees non-zero traffic because there is generated client code in the wild that refers to it [1]. We keep this field and do NOT remove it because otherwise V3 would return an error when this part gets requested [2]. [1] https://developers.google.com/resources/api-libraries/documentation/youtube/v3/csharp/latest/classGoogle_1_1Apis_1_1YouTube_1_1v3_1_1Data_1_1VideoProjectDetails.html [2] http://google3/video/youtube/src/python/servers/data_api/common.py?l=1565-1569&rcl=344141677 */
945
+ VideoProjectDetails: Record<string, never>; /** @description Recording information associated with the video. */
946
+ VideoRecordingDetails: {
947
+ /** @description The text description of the location where the video was recorded. */locationDescription?: string;
948
+ location?: components["schemas"]["GeoPoint"];
949
+ /**
950
+ * Format: date-time
951
+ * @description The date and time when the video was recorded.
952
+ */
953
+ recordingDate?: string;
954
+ }; /** @description Basic details about a video, including title, description, uploader, thumbnails and category. */
955
+ VideoSnippet: {
956
+ /** @description The ID that YouTube uses to uniquely identify the channel that the video was uploaded to. */channelId?: string; /** @description The default_audio_language property specifies the language spoken in the video's default audio track. */
957
+ defaultAudioLanguage?: string; /** @description The video's description. @mutable youtube.videos.insert youtube.videos.update */
958
+ description?: string; /** @description The video's title. @mutable youtube.videos.insert youtube.videos.update */
959
+ title?: string; /** @description The language of the videos's default snippet. */
960
+ defaultLanguage?: string;
961
+ /**
962
+ * Format: date-time
963
+ * @description The date and time when the video was uploaded.
964
+ */
965
+ publishedAt?: string; /** @description The YouTube video category associated with the video. */
966
+ categoryId?: string;
967
+ thumbnails?: components["schemas"]["ThumbnailDetails"];
968
+ /**
969
+ * @description Indicates if the video is an upcoming/active live broadcast. Or it's "none" if the video is not an upcoming/active live broadcast.
970
+ * @enum {string}
971
+ */
972
+ liveBroadcastContent?: "none" | "upcoming" | "live" | "completed"; /** @description Channel title for the channel that the video belongs to. */
973
+ channelTitle?: string;
974
+ localized?: components["schemas"]["VideoLocalization"]; /** @description A list of keyword tags associated with the video. Tags may contain spaces. */
975
+ tags?: string[];
976
+ }; /** @description Statistics about the video, such as the number of times the video was viewed or liked. */
977
+ VideoStatistics: {
978
+ /** @description The number of users who have indicated that they disliked the video by giving it a negative rating. */dislikeCount?: string; /** @description The number of times the video has been viewed. */
979
+ viewCount?: string; /** @description The number of users who have indicated that they liked the video by giving it a positive rating. */
980
+ likeCount?: string;
981
+ /**
982
+ * @deprecated
983
+ * @description The number of users who currently have the video marked as a favorite video.
984
+ */
985
+ favoriteCount?: string; /** @description The number of comments for the video. */
986
+ commentCount?: string;
987
+ }; /** @description Basic details about a video category, such as its localized title. Next Id: 19 */
988
+ VideoStatus: {
989
+ /**
990
+ * Format: date-time
991
+ * @description The date and time when the video is scheduled to publish. It can be set only if the privacy status of the video is private..
992
+ */
993
+ publishAt?: string; /** @description This value indicates if the video can be embedded on another website. @mutable youtube.videos.insert youtube.videos.update */
994
+ embeddable?: boolean; /** @description This value indicates if the extended video statistics on the watch page can be viewed by everyone. Note that the view count, likes, etc will still be visible if this is disabled. @mutable youtube.videos.insert youtube.videos.update */
995
+ publicStatsViewable?: boolean; /** @description Indicates if the video contains altered or synthetic media. */
996
+ containsSyntheticMedia?: boolean;
997
+ /**
998
+ * @description The status of the uploaded video.
999
+ * @enum {string}
1000
+ */
1001
+ uploadStatus?: "uploaded" | "processed" | "failed" | "rejected" | "deleted";
1002
+ /**
1003
+ * @description This value explains why a video failed to upload. This property is only present if the uploadStatus property indicates that the upload failed.
1004
+ * @enum {string}
1005
+ */
1006
+ failureReason?: "conversion" | "invalidFile" | "emptyFile" | "tooSmall" | "codec" | "uploadAborted";
1007
+ /**
1008
+ * @description The video's license. @mutable youtube.videos.insert youtube.videos.update
1009
+ * @enum {string}
1010
+ */
1011
+ license?: "youtube" | "creativeCommon";
1012
+ /**
1013
+ * @description The video's privacy status.
1014
+ * @enum {string}
1015
+ */
1016
+ privacyStatus?: "public" | "unlisted" | "private";
1017
+ madeForKids?: boolean;
1018
+ /**
1019
+ * @description This value explains why YouTube rejected an uploaded video. This property is only present if the uploadStatus property indicates that the upload was rejected.
1020
+ * @enum {string}
1021
+ */
1022
+ rejectionReason?: "copyright" | "inappropriate" | "duplicate" | "termsOfUse" | "uploaderAccountSuspended" | "length" | "claim" | "uploaderAccountClosed" | "trademark" | "legal";
1023
+ selfDeclaredMadeForKids?: boolean;
1024
+ }; /** @description Specifies suggestions on how to improve video content, including encoding hints, tag suggestions, and editor suggestions. */
1025
+ VideoSuggestions: {
1026
+ /** @description A list of errors that will prevent YouTube from successfully processing the uploaded video video. These errors indicate that, regardless of the video's current processing status, eventually, that status will almost certainly be failed. */processingErrors?: ("audioFile" | "imageFile" | "projectFile" | "notAVideoFile" | "docFile" | "archiveFile" | "unsupportedSpatialAudioLayout")[]; /** @description A list of reasons why YouTube may have difficulty transcoding the uploaded video or that might result in an erroneous transcoding. These warnings are generated before YouTube actually processes the uploaded video file. In addition, they identify issues that are unlikely to cause the video processing to fail but that might cause problems such as sync issues, video artifacts, or a missing audio track. */
1027
+ processingWarnings?: ("unknownContainer" | "unknownVideoCodec" | "unknownAudioCodec" | "inconsistentResolution" | "hasEditlist" | "problematicVideoCodec" | "problematicAudioCodec" | "unsupportedVrStereoMode" | "unsupportedSphericalProjectionType" | "unsupportedHdrPixelFormat" | "unsupportedHdrColorMetadata" | "problematicHdrLookupTable")[]; /** @description A list of video editing operations that might improve the video quality or playback experience of the uploaded video. */
1028
+ editorSuggestions?: ("videoAutoLevels" | "videoStabilize" | "videoCrop" | "audioQuietAudioSwap")[]; /** @description A list of suggestions that may improve YouTube's ability to process the video. */
1029
+ processingHints?: ("nonStreamableMov" | "sendBestQualityVideo" | "sphericalVideo" | "spatialAudio" | "vrVideo" | "hdrVideo")[]; /** @description A list of keyword tags that could be added to the video's metadata to increase the likelihood that users will locate your video when searching or browsing on YouTube. */
1030
+ tagSuggestions?: components["schemas"]["VideoSuggestionsTagSuggestion"][];
1031
+ }; /** @description A single tag suggestion with its relevance information. */
1032
+ VideoSuggestionsTagSuggestion: {
1033
+ /** @description The keyword tag suggested for the video. */tag?: string; /** @description A set of video categories for which the tag is relevant. You can use this information to display appropriate tag suggestions based on the video category that the video uploader associates with the video. By default, tag suggestions are relevant for all categories if there are no restricts defined for the keyword. */
1034
+ categoryRestricts?: string[];
1035
+ }; /** @description Freebase topic information related to the video. */
1036
+ VideoTopicDetails: {
1037
+ /** @description A list of Wikipedia URLs that provide a high-level description of the video's content. */topicCategories?: string[]; /** @description A list of Freebase topic IDs that are centrally associated with the video. These are topics that are centrally featured in the video, and it can be said that the video is mainly about each of these. You can retrieve information about each topic using the < a href="http://wiki.freebase.com/wiki/Topic_API">Freebase Topic API. */
1038
+ topicIds?: string[]; /** @description Similar to topic_id, except that these topics are merely relevant to the video. These are topics that may be mentioned in, or appear in the video. You can retrieve information about each topic using Freebase Topic API. */
1039
+ relevantTopicIds?: string[];
1040
+ }; /** @description Branding properties for the watch. All deprecated. */
1041
+ WatchSettings: {
1042
+ /** @description The background color for the video watch page's branded area. */textColor?: string; /** @description The text color for the video watch page's branded area. */
1043
+ backgroundColor?: string; /** @description An ID that uniquely identifies a playlist that displays next to the video player. */
1044
+ featuredPlaylistId?: string;
1045
+ };
1046
+ };
1047
+ responses: never;
1048
+ parameters: never;
1049
+ requestBodies: never;
1050
+ headers: never;
1051
+ pathItems: never;
1052
+ }
1053
+ //#endregion
1054
+ //#region src/mapper.d.ts
1055
+ type Schemas = components["schemas"];
1056
+ /** YouTube Data API v3 Video resource (generated from Discovery Document). */
1057
+ type YTVideoResource = Schemas["Video"];
1058
+ /** YouTube Data API v3 Channel resource (generated from Discovery Document). */
1059
+ type YTChannelResource = Schemas["Channel"];
1060
+ /**
1061
+ * Convert a YouTube Video resource to a unified Content type.
1062
+ *
1063
+ * @param item - YouTube video resource from the API
1064
+ * @returns unified Content (Broadcast if live, ScheduledBroadcast if upcoming, Archive otherwise)
1065
+ * @throws ParseError if required fields (id, snippet, contentDetails, statistics) are missing
1066
+ * @precondition item was fetched with part=snippet,contentDetails,statistics,liveStreamingDetails
1067
+ * @postcondition returns Broadcast if currently live, ScheduledBroadcast if upcoming, Archive otherwise
1068
+ */
1069
+ declare const toContent: (item: YTVideoResource) => Content;
1070
+ /**
1071
+ * Convert a YouTube Channel resource to a unified Channel type.
1072
+ *
1073
+ * @param item - YouTube channel resource from the API
1074
+ * @returns unified Channel
1075
+ * @throws ParseError if required fields (id, snippet) are missing
1076
+ * @precondition item was fetched with part=snippet,contentDetails,statistics
1077
+ * @postcondition returns a Channel with thumbnail undefined if none available
1078
+ * @idempotency Safe — pure function
1079
+ */
1080
+ declare const toChannel: (item: YTChannelResource) => Channel;
1081
+ declare const parseDuration: (duration: string) => number;
1082
+ //#endregion
1083
+ //#region src/plugin.d.ts
1084
+ type YouTubePluginConfig = {
1085
+ apiKey: string;
1086
+ quota?: {
1087
+ dailyLimit?: number;
1088
+ }; /** Override fetch for testing. */
1089
+ fetch?: typeof globalThis.fetch;
1090
+ };
1091
+ /**
1092
+ * Creates a YouTube platform plugin.
1093
+ *
1094
+ * @param config - YouTube plugin configuration including API key
1095
+ * @returns configured PlatformPlugin for YouTube
1096
+ * @throws {ValidationError} if apiKey is empty/whitespace
1097
+ * @precondition config.apiKey is a valid YouTube Data API v3 key
1098
+ * @postcondition returns a PlatformPlugin that handles YouTube URLs and API calls
1099
+ * @idempotency Not idempotent — each call creates a new plugin instance
1100
+ */
1101
+ declare const createYouTubePlugin: (config: YouTubePluginConfig) => PlatformPlugin;
1102
+ //#endregion
1103
+ //#region src/quota.d.ts
1104
+ /** YouTube Data API v3 quota cost map. */
1105
+ declare const YOUTUBE_COST_MAP: Record<string, number>;
1106
+ /**
1107
+ * Creates a QuotaBudgetStrategy configured for YouTube.
1108
+ *
1109
+ * @param dailyLimit - optional daily quota cap (defaults to 10,000)
1110
+ * @returns rate limit strategy tracking YouTube quota
1111
+ * @precondition dailyLimit > 0
1112
+ * @postcondition returns a strategy that tracks YouTube quota consumption
1113
+ */
1114
+ declare const createYouTubeQuotaStrategy: (dailyLimit?: number) => RateLimitStrategy;
1115
+ //#endregion
1116
+ //#region src/urls.d.ts
1117
+ /**
1118
+ * Match a URL to a YouTube content or channel resource.
1119
+ *
1120
+ * @param url - URL string to match
1121
+ * @returns resolved YouTube URL or null if not a YouTube URL
1122
+ * @precondition url is a valid URL string
1123
+ * @postcondition returns ResolvedUrl for YouTube URLs, null otherwise
1124
+ * @idempotency Safe — no side effects
1125
+ */
1126
+ declare const matchYouTubeUrl: (url: string) => ResolvedUrl | null;
1127
+ //#endregion
1128
+ //#region src/index.d.ts
1129
+ /** Content from YouTube with typed `raw` field for accessing platform-specific data. */
1130
+ type YouTubeTypedContent = Content & {
1131
+ raw: YTVideoResource;
1132
+ };
1133
+ /** Broadcast from YouTube with typed `raw` field. */
1134
+ type YouTubeTypedBroadcast = Broadcast & {
1135
+ raw: YTVideoResource;
1136
+ };
1137
+ /** Archive from YouTube with typed `raw` field. */
1138
+ type YouTubeTypedArchive = Archive & {
1139
+ raw: YTVideoResource;
1140
+ };
1141
+ //#endregion
1142
+ export { type Schemas, YOUTUBE_COST_MAP, type YTChannelResource, type YTVideoResource, type YouTubePluginConfig, YouTubeTypedArchive, YouTubeTypedBroadcast, YouTubeTypedContent, createYouTubePlugin, createYouTubeQuotaStrategy, matchYouTubeUrl, parseDuration, toChannel, toContent };
1143
+ //# sourceMappingURL=index.d.mts.map