/**
 * Microsoft Outlook Node - Version 2
 * Discriminator: resource=message, operation=get
 */


interface Credentials {
  microsoftOutlookOAuth2Api: CredentialReference;
}

/** Retrieve a calendar */
export type MicrosoftOutlookV2MessageGetParams = {
  resource: 'message';
  operation: 'get';
/**
 * Message
 * @default {"mode":"list","value":""}
 */
    messageId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * Output
 * @default simple
 */
    output?: 'simple' | 'raw' | 'fields' | Expression<string>;
/**
 * The fields to add to the output
 * @displayOptions.show { output: ["fields"] }
 * @default []
 */
    fields?: Array<'bccRecipients' | 'body' | 'bodyPreview' | 'categories' | 'ccRecipients' | 'changeKey' | 'conversationId' | 'createdDateTime' | 'flag' | 'from' | 'hasAttachments' | 'importance' | 'inferenceClassification' | 'internetMessageId' | 'isDeliveryReceiptRequested' | 'isDraft' | 'isRead' | 'isReadReceiptRequested' | 'lastModifiedDateTime' | 'parentFolderId' | 'receivedDateTime' | 'replyTo' | 'sender' | 'sentDateTime' | 'subject' | 'toRecipients' | 'webLink'>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Prefix for name of the output fields to put the binary files data in. An index starting from 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0".
     * @default attachment_
     */
    attachmentsPrefix?: string | Expression<string> | PlaceholderValue;
    /** Whether the message's attachments will be downloaded and included in the output
     * @default false
     */
    downloadAttachments?: boolean | Expression<boolean>;
    /** Get MIME Content
     * @default {"values":{"binaryPropertyName":"data"}}
     */
    getMimeContent?: {
        /** Values
     */
    values?: {
      /** Put Output in Field
       * @hint The name of the output field to put the binary file data in
       */
      binaryPropertyName?: string | Expression<string> | PlaceholderValue;
      /** Optional name of the output file, if not set message ID is used
       */
      outputFileName?: string | Expression<string> | PlaceholderValue;
    };
  };
  };
};

export type MicrosoftOutlookV2MessageGetOutput = {
  '@odata.context'?: string;
  '@odata.etag'?: string;
  body?: {
    content?: string;
    contentType?: string;
  };
  bodyPreview?: string;
  categories?: Array<string>;
  ccRecipients?: Array<{
    emailAddress?: {
      address?: string;
      name?: string;
    };
  }>;
  changeKey?: string;
  conversationId?: string;
  conversationIndex?: string;
  createdDateTime?: string;
  flag?: {
    flagStatus?: string;
  };
  from?: {
    emailAddress?: {
      address?: string;
      name?: string;
    };
  };
  hasAttachments?: boolean;
  id?: string;
  importance?: string;
  inferenceClassification?: string;
  internetMessageId?: string;
  isDraft?: boolean;
  isRead?: boolean;
  isReadReceiptRequested?: boolean;
  lastModifiedDateTime?: string;
  parentFolderId?: string;
  receivedDateTime?: string;
  replyTo?: Array<{
    emailAddress?: {
      address?: string;
      name?: string;
    };
  }>;
  sender?: {
    emailAddress?: {
      address?: string;
      name?: string;
    };
  };
  sentDateTime?: string;
  subject?: string;
  toRecipients?: Array<{
    emailAddress?: {
      address?: string;
      name?: string;
    };
  }>;
  webLink?: string;
};

export type MicrosoftOutlookV2MessageGetNode = {
  type: 'n8n-nodes-base.microsoftOutlook';
  version: 2;
  credentials?: Credentials;
  config: NodeConfig<MicrosoftOutlookV2MessageGetParams>;
  output?: Items<MicrosoftOutlookV2MessageGetOutput>;
};