/**
 * YouTube Node - Version 1
 * Discriminator: resource=video, operation=getAll
 */


interface Credentials {
  youTubeOAuth2Api: CredentialReference;
}

/** Retrieve many channels */
export type YouTubeV1VideoGetAllParams = {
  resource: 'video';
  operation: 'getAll';
/**
 * Whether to return all results or only up to a given limit
 * @default false
 */
    returnAll?: boolean | Expression<boolean>;
/**
 * Max number of results to return
 * @displayOptions.show { returnAll: [false] }
 * @default 25
 */
    limit?: number | Expression<number>;
/**
 * Filters
 * @default {}
 */
    filters?: {
    /** The channelId parameter indicates that the API response should only contain resources created by the channel
     */
    channelId?: string | Expression<string> | PlaceholderValue;
    /** Whether to restrict the search to only retrieve videos uploaded via the developer's application or website
     * @default false
     */
    forDeveloper?: boolean | Expression<boolean>;
    /** The publishedAfter parameter indicates that the API response should only contain resources created at or after the specified time
     */
    publishedAfter?: string | Expression<string>;
    /** The publishedBefore parameter indicates that the API response should only contain resources created before or at the specified time
     */
    publishedBefore?: string | Expression<string>;
    /** The q parameter specifies the query term to search for
     */
    q?: string | Expression<string> | PlaceholderValue;
    /** The regionCode parameter instructs the API to select a video chart available in the specified region. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     */
    regionCode?: string | Expression<string>;
    /** The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies
     */
    relatedToVideoId?: string | Expression<string> | PlaceholderValue;
    /** The videoCategoryId parameter identifies the video category for which the chart should be retrieved
     */
    videoCategoryId?: string | Expression<string> | PlaceholderValue;
    /** Whether to restrict a search to only videos that can be played outside youtube.com
     * @default false
     */
    videoSyndicated?: boolean | Expression<boolean>;
    /** The videoType parameter lets you restrict a search to a particular type of videos
     */
    videoType?: 'any' | 'episode' | 'movie' | Expression<string>;
  };
/**
 * Options
 * @default {}
 */
    options?: {
    /** Order
     * @default relevance
     */
    order?: 'date' | 'relevance' | Expression<string>;
    /** Safe Search
     */
    safeSearch?: 'moderate' | 'none' | 'strict' | Expression<string>;
  };
};

export type YouTubeV1VideoGetAllOutput = {
  etag?: string;
  id?: {
    kind?: string;
    videoId?: string;
  };
  kind?: string;
  snippet?: {
    channelId?: string;
    channelTitle?: string;
    description?: string;
    liveBroadcastContent?: string;
    publishedAt?: string;
    publishTime?: string;
    thumbnails?: {
      'default'?: {
        height?: number;
        url?: string;
        width?: number;
      };
      high?: {
        height?: number;
        url?: string;
        width?: number;
      };
      medium?: {
        height?: number;
        url?: string;
        width?: number;
      };
    };
    title?: string;
  };
};

export type YouTubeV1VideoGetAllNode = {
  type: 'n8n-nodes-base.youTube';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<YouTubeV1VideoGetAllParams>;
  output?: Items<YouTubeV1VideoGetAllOutput>;
};