UNPKG

@ascorbic/youtube-loader

Version:

Astro loader for YouTube videos with build-time and live loading capabilities

1,417 lines (1,416 loc) 193 kB
import { LoaderContext, Loader, LiveLoader } from 'astro/loaders'; import { z } from 'astro/zod'; declare const YouTubeThumbnailSchema: z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>; declare const YouTubeThumbnailsSchema: z.ZodObject<{ default: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; medium: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; high: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; standard: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; maxres: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }>; declare const YouTubeVideoSnippetSchema: z.ZodObject<{ publishedAt: z.ZodDate; channelId: z.ZodString; title: z.ZodString; description: z.ZodString; thumbnails: z.ZodObject<{ default: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; medium: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; high: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; standard: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; maxres: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }>; channelTitle: z.ZodString; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; categoryId: z.ZodOptional<z.ZodString>; liveBroadcastContent: z.ZodOptional<z.ZodString>; defaultLanguage: z.ZodOptional<z.ZodString>; localized: z.ZodOptional<z.ZodObject<{ title: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; description: string; }, { title: string; description: string; }>>; defaultAudioLanguage: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }>; declare const YouTubeVideoContentDetailsSchema: z.ZodObject<{ duration: z.ZodString; dimension: z.ZodOptional<z.ZodString>; definition: z.ZodOptional<z.ZodString>; caption: z.ZodOptional<z.ZodString>; licensedContent: z.ZodOptional<z.ZodBoolean>; regionRestriction: z.ZodOptional<z.ZodObject<{ allowed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; blocked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { allowed?: string[] | undefined; blocked?: string[] | undefined; }, { allowed?: string[] | undefined; blocked?: string[] | undefined; }>>; projection: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }>; declare const YouTubeVideoStatisticsSchema: z.ZodObject<{ viewCount: z.ZodOptional<z.ZodString>; likeCount: z.ZodOptional<z.ZodString>; dislikeCount: z.ZodOptional<z.ZodString>; favoriteCount: z.ZodOptional<z.ZodString>; commentCount: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }>; declare const YouTubeVideoStatusSchema: z.ZodObject<{ uploadStatus: z.ZodOptional<z.ZodString>; failureReason: z.ZodOptional<z.ZodString>; rejectionReason: z.ZodOptional<z.ZodString>; privacyStatus: z.ZodOptional<z.ZodString>; publishAt: z.ZodOptional<z.ZodDate>; license: z.ZodOptional<z.ZodString>; embeddable: z.ZodOptional<z.ZodBoolean>; publicStatsViewable: z.ZodOptional<z.ZodBoolean>; madeForKids: z.ZodOptional<z.ZodBoolean>; selfDeclaredMadeForKids: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }>; declare const YouTubeVideoSchema: z.ZodObject<{ kind: z.ZodLiteral<"youtube#video">; etag: z.ZodString; id: z.ZodString; snippet: z.ZodOptional<z.ZodObject<{ publishedAt: z.ZodDate; channelId: z.ZodString; title: z.ZodString; description: z.ZodString; thumbnails: z.ZodObject<{ default: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; medium: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; high: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; standard: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; maxres: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }>; channelTitle: z.ZodString; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; categoryId: z.ZodOptional<z.ZodString>; liveBroadcastContent: z.ZodOptional<z.ZodString>; defaultLanguage: z.ZodOptional<z.ZodString>; localized: z.ZodOptional<z.ZodObject<{ title: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; description: string; }, { title: string; description: string; }>>; defaultAudioLanguage: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }>>; contentDetails: z.ZodOptional<z.ZodObject<{ duration: z.ZodString; dimension: z.ZodOptional<z.ZodString>; definition: z.ZodOptional<z.ZodString>; caption: z.ZodOptional<z.ZodString>; licensedContent: z.ZodOptional<z.ZodBoolean>; regionRestriction: z.ZodOptional<z.ZodObject<{ allowed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; blocked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { allowed?: string[] | undefined; blocked?: string[] | undefined; }, { allowed?: string[] | undefined; blocked?: string[] | undefined; }>>; projection: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }>>; statistics: z.ZodOptional<z.ZodObject<{ viewCount: z.ZodOptional<z.ZodString>; likeCount: z.ZodOptional<z.ZodString>; dislikeCount: z.ZodOptional<z.ZodString>; favoriteCount: z.ZodOptional<z.ZodString>; commentCount: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }>>; status: z.ZodOptional<z.ZodObject<{ uploadStatus: z.ZodOptional<z.ZodString>; failureReason: z.ZodOptional<z.ZodString>; rejectionReason: z.ZodOptional<z.ZodString>; privacyStatus: z.ZodOptional<z.ZodString>; publishAt: z.ZodOptional<z.ZodDate>; license: z.ZodOptional<z.ZodString>; embeddable: z.ZodOptional<z.ZodBoolean>; publicStatsViewable: z.ZodOptional<z.ZodBoolean>; madeForKids: z.ZodOptional<z.ZodBoolean>; selfDeclaredMadeForKids: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }>>; }, "strip", z.ZodTypeAny, { kind: "youtube#video"; etag: string; id: string; status?: { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; } | undefined; snippet?: { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; } | undefined; contentDetails?: { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; } | undefined; statistics?: { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; } | undefined; }, { kind: "youtube#video"; etag: string; id: string; status?: { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; } | undefined; snippet?: { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; } | undefined; contentDetails?: { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; } | undefined; statistics?: { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; } | undefined; }>; declare const YouTubeVideoListResponseSchema: z.ZodObject<{ kind: z.ZodLiteral<"youtube#videoListResponse">; etag: z.ZodString; nextPageToken: z.ZodOptional<z.ZodString>; prevPageToken: z.ZodOptional<z.ZodString>; pageInfo: z.ZodObject<{ totalResults: z.ZodNumber; resultsPerPage: z.ZodNumber; }, "strip", z.ZodTypeAny, { totalResults: number; resultsPerPage: number; }, { totalResults: number; resultsPerPage: number; }>; items: z.ZodArray<z.ZodObject<{ kind: z.ZodLiteral<"youtube#video">; etag: z.ZodString; id: z.ZodString; snippet: z.ZodOptional<z.ZodObject<{ publishedAt: z.ZodDate; channelId: z.ZodString; title: z.ZodString; description: z.ZodString; thumbnails: z.ZodObject<{ default: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; medium: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; high: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; standard: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; maxres: z.ZodOptional<z.ZodObject<{ url: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { url: string; width?: number | undefined; height?: number | undefined; }, { url: string; width?: number | undefined; height?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }, { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }>; channelTitle: z.ZodString; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; categoryId: z.ZodOptional<z.ZodString>; liveBroadcastContent: z.ZodOptional<z.ZodString>; defaultLanguage: z.ZodOptional<z.ZodString>; localized: z.ZodOptional<z.ZodObject<{ title: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; description: string; }, { title: string; description: string; }>>; defaultAudioLanguage: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }, { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; }>>; contentDetails: z.ZodOptional<z.ZodObject<{ duration: z.ZodString; dimension: z.ZodOptional<z.ZodString>; definition: z.ZodOptional<z.ZodString>; caption: z.ZodOptional<z.ZodString>; licensedContent: z.ZodOptional<z.ZodBoolean>; regionRestriction: z.ZodOptional<z.ZodObject<{ allowed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; blocked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { allowed?: string[] | undefined; blocked?: string[] | undefined; }, { allowed?: string[] | undefined; blocked?: string[] | undefined; }>>; projection: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }, { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; }>>; statistics: z.ZodOptional<z.ZodObject<{ viewCount: z.ZodOptional<z.ZodString>; likeCount: z.ZodOptional<z.ZodString>; dislikeCount: z.ZodOptional<z.ZodString>; favoriteCount: z.ZodOptional<z.ZodString>; commentCount: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }, { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; }>>; status: z.ZodOptional<z.ZodObject<{ uploadStatus: z.ZodOptional<z.ZodString>; failureReason: z.ZodOptional<z.ZodString>; rejectionReason: z.ZodOptional<z.ZodString>; privacyStatus: z.ZodOptional<z.ZodString>; publishAt: z.ZodOptional<z.ZodDate>; license: z.ZodOptional<z.ZodString>; embeddable: z.ZodOptional<z.ZodBoolean>; publicStatsViewable: z.ZodOptional<z.ZodBoolean>; madeForKids: z.ZodOptional<z.ZodBoolean>; selfDeclaredMadeForKids: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }, { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; }>>; }, "strip", z.ZodTypeAny, { kind: "youtube#video"; etag: string; id: string; status?: { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; } | undefined; snippet?: { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; } | undefined; contentDetails?: { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projection?: string | undefined; } | undefined; statistics?: { viewCount?: string | undefined; likeCount?: string | undefined; dislikeCount?: string | undefined; favoriteCount?: string | undefined; commentCount?: string | undefined; } | undefined; }, { kind: "youtube#video"; etag: string; id: string; status?: { uploadStatus?: string | undefined; failureReason?: string | undefined; rejectionReason?: string | undefined; privacyStatus?: string | undefined; publishAt?: Date | undefined; license?: string | undefined; embeddable?: boolean | undefined; publicStatsViewable?: boolean | undefined; madeForKids?: boolean | undefined; selfDeclaredMadeForKids?: boolean | undefined; } | undefined; snippet?: { publishedAt: Date; channelId: string; title: string; description: string; thumbnails: { default?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; medium?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; high?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; standard?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; maxres?: { url: string; width?: number | undefined; height?: number | undefined; } | undefined; }; channelTitle: string; tags?: string[] | undefined; categoryId?: string | undefined; liveBroadcastContent?: string | undefined; defaultLanguage?: string | undefined; localized?: { title: string; description: string; } | undefined; defaultAudioLanguage?: string | undefined; } | undefined; contentDetails?: { duration: string; dimension?: string | undefined; definition?: string | undefined; caption?: string | undefined; licensedContent?: boolean | undefined; regionRestriction?: { allowed?: string[] | undefined; blocked?: string[] | undefined; } | undefined; projec