/**
 * Microsoft Outlook Node - Version 2
 * Discriminator: resource=folderMessage, operation=getAll
 */


interface Credentials {
  microsoftOutlookOAuth2Api: CredentialReference;
}

/** List and search calendars */
export type MicrosoftOutlookV2FolderMessageGetAllParams = {
  resource: 'folderMessage';
  operation: 'getAll';
/**
 * Folder
 * @default {"mode":"list","value":""}
 */
    folderId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
 * 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 100
 */
    limit?: number | Expression<number>;
/**
 * 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'>;
/**
 * Filters
 * @default {}
 */
    filtersUI?: {
        /** Values
     */
    values?: {
      /** Filter By
       * @default filters
       */
      filterBy?: 'filters' | 'search' | Expression<string>;
      /** Only return messages that contains search term. Without specific message properties, the search is carried out on the default search properties of from, subject, and body. &lt;a href="https://docs.microsoft.com/en-us/graph/query-parameters#search-parameter target="_blank"&gt;More info&lt;/a&gt;.
       * @displayOptions.show { filterBy: ["search"] }
       */
      search?: string | Expression<string> | PlaceholderValue;
      /** Filters
       * @displayOptions.show { filterBy: ["filters"] }
       * @default {}
       */
      filters?: {
    /** Filter Query
     * @hint Search query to filter messages. &lt;a href="https://learn.microsoft.com/en-us/graph/filter-query-parameter"&gt;More info&lt;/a&gt;.
     */
    custom?: string | Expression<string> | PlaceholderValue;
    /** Has Attachments
     * @default false
     */
    hasAttachments?: boolean | Expression<boolean>;
    /** Read Status
     * @hint Filter messages by whether they have been read or not
     * @default unread
     */
    readStatus?: 'both' | 'unread' | 'read' | Expression<string>;
    /** Get all messages received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds.
     */
    receivedAfter?: string | Expression<string>;
    /** Get all messages received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds.
     */
    receivedBefore?: string | Expression<string>;
    /** Sender name or email to filter by
     */
    sender?: string | Expression<string> | PlaceholderValue;
  };
    };
  };
/**
 * 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>;
  };
};

export type MicrosoftOutlookV2FolderMessageGetAllOutput = {
  '@odata.etag'?: string;
  bodyPreview?: string;
  categories?: Array<string>;
  conversationId?: string;
  from?: {
    emailAddress?: {
      address?: string;
      name?: string;
    };
  };
  hasAttachments?: boolean;
  id?: string;
  receivedDateTime?: string;
  sentDateTime?: string;
  subject?: string;
};

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