/**
 * Google Drive Node - Version 3
 * Discriminator: resource=file, operation=download
 */


interface Credentials {
  googleApi: CredentialReference;
  googleDriveOAuth2Api: CredentialReference;
}

/** Download a file */
export type GoogleDriveV3FileDownloadParams = {
  resource: 'file';
  operation: 'download';
  authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
 * The file to download
 * @default {"mode":"list","value":""}
 */
    fileId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
 * Options
 * @default {}
 */
    options?: {
    /** Use this field name in the following nodes, to use the binary file data
     * @hint The name of the output binary field to put the file in
     * @default data
     */
    binaryPropertyName?: string | Expression<string> | PlaceholderValue;
    /** Google File Conversion
     * @default {}
     */
    googleFileConversion?: {
        /** Conversion
     */
    conversion?: {
      /** Format used to export when downloading Google Docs files
       * @default text/html
       */
      docsToFormat?: 'text/html' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.oasis.opendocument.text' | 'application/pdf' | 'application/rtf' | 'text/plain' | Expression<string>;
      /** Format used to export when downloading Google Drawings files
       * @default image/jpeg
       */
      drawingsToFormat?: 'image/jpeg' | 'application/pdf' | 'image/png' | 'image/svg+xml' | Expression<string>;
      /** Format used to export when downloading Google Slides files
       * @default application/vnd.openxmlformats-officedocument.presentationml.presentation
       */
      slidesToFormat?: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.oasis.opendocument.presentation' | 'application/pdf' | Expression<string>;
      /** Format used to export when downloading Google Sheets files
       * @default text/csv
       */
      sheetsToFormat?: 'text/csv' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/pdf' | Expression<string>;
    };
  };
    /** File name. Ex: data.pdf.
     */
    fileName?: string | Expression<string> | PlaceholderValue;
  };
};

export type GoogleDriveV3FileDownloadOutput = {
  id?: string;
  name?: string;
};

export type GoogleDriveV3FileDownloadNode = {
  type: 'n8n-nodes-base.googleDrive';
  version: 3;
  credentials?: Credentials;
  config: NodeConfig<GoogleDriveV3FileDownloadParams>;
  output?: Items<GoogleDriveV3FileDownloadOutput>;
};