n8n-nodes-base
Version:
Base nodes of n8n
73 lines (69 loc) • 2.55 kB
text/typescript
/**
* Google Drive Node - Version 2
* Discriminator: resource=file, operation=download
*/
interface Credentials {
googleApi: CredentialReference;
googleDriveOAuth2Api: CredentialReference;
}
/** Download a file */
export type GoogleDriveV2FileDownloadParams = {
resource: 'file';
operation: 'download';
/**
* Authentication
* @default oAuth2
*/
authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
* The ID of the file
* @default {"mode":"list","value":""}
*/
fileId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
* Put Output File in Field
* @hint The name of the output binary field to put the file in
* @default data
*/
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @default {}
*/
options?: {
/** Google File Conversion
* @default {}
*/
googleFileConversion?: {
/** Conversion
*/
conversion?: {
/** Format used to export when downloading Google Docs files
* @default application/vnd.openxmlformats-officedocument.wordprocessingml.document
*/
docsToFormat?: 'text/html' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.oasis.opendocument.text' | 'application/pdf' | 'application/rtf' | Expression<string>;
/** Format used to export when downloading Google Drawings files
* @default image/jpeg
*/
drawingsToFormat?: 'image/jpeg' | 'image/png' | 'image/svg+xml' | 'application/pdf' | 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/pdf' | 'application/vnd.oasis.opendocument.presentation' | 'text/plain' | Expression<string>;
/** Format used to export when downloading Google Spreadsheets files
* @default application/x-vnd.oasis.opendocument.spreadsheet
*/
sheetsToFormat?: 'application/x-vnd.oasis.opendocument.spreadsheet' | 'application/pdf' | 'text/csv' | Expression<string>;
};
};
/** File name. Ex: data.pdf.
*/
fileName?: string | Expression<string> | PlaceholderValue;
};
};
export type GoogleDriveV2FileDownloadNode = {
type: 'n8n-nodes-base.googleDrive';
version: 2;
credentials?: Credentials;
config: NodeConfig<GoogleDriveV2FileDownloadParams>;
};