/**
 * Gmail Node - Version 2.1
 * Discriminator: resource=draft, operation=get
 */


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

export type GmailV21DraftGetParams = {
  resource: 'draft';
  operation: 'get';
  authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
 * Draft ID
 */
    messageId?: string | Expression<string> | PlaceholderValue;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'.
     * @default attachment_
     */
    dataPropertyAttachmentsPrefixName?: string | Expression<string> | PlaceholderValue;
    /** Whether the draft's attachments will be downloaded
     * @default false
     */
    downloadAttachments?: boolean | Expression<boolean>;
  };
};

export type GmailV21DraftGetOutput = {
  date?: string;
  from?: {
    html?: string;
    text?: string;
    value?: Array<{
      address?: string;
      name?: string;
    }>;
  };
  headers?: {
    'content-type'?: string;
    date?: string;
    from?: string;
    'message-id'?: string;
    'mime-version'?: string;
    subject?: string;
  };
  id?: string;
  labelIds?: Array<string>;
  messageId?: string;
  sizeEstimate?: number;
  subject?: string;
  text?: string;
  textAsHtml?: string;
  threadId?: string;
};

export type GmailV21DraftGetNode = {
  type: 'n8n-nodes-base.gmail';
  version: 2.1;
  credentials?: Credentials;
  config: NodeConfig<GmailV21DraftGetParams>;
  output?: Items<GmailV21DraftGetOutput>;
};