/**
 * Elasticsearch Node - Version 1
 * Discriminator: resource=document, operation=getAll
 */


interface Credentials {
  elasticsearchApi: CredentialReference;
}

/** Get many documents */
export type ElasticsearchV1DocumentGetAllParams = {
  resource: 'document';
  operation: 'getAll';
/**
 * ID of the index containing the documents to retrieve
 */
    indexId?: string | Expression<string> | PlaceholderValue;
/**
 * 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 50
 */
    limit?: number | Expression<number>;
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simple?: boolean | Expression<boolean>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** If false, return an error if any of the following targets only missing/closed indices: wildcard expression, index alias, or &lt;code&gt;_all&lt;/code&gt; value. Defaults to true.
     * @default true
     */
    allow_no_indices?: boolean | Expression<boolean>;
    /** &lt;p&gt;If true, return partial results if there are shard request timeouts or shard failures.&lt;/p&gt;&lt;p&gt;If false, returns an error with no partial results. Defaults to true.&lt;/p&gt;.
     * @default true
     */
    allow_partial_search_results?: boolean | Expression<boolean>;
    /** Number of shard results that should be reduced at once on the coordinating node. Defaults to 512.
     * @default 512
     */
    batched_reduce_size?: number | Expression<number>;
    /** Whether network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. Defaults to true.
     * @default true
     */
    ccs_minimize_roundtrips?: boolean | Expression<boolean>;
    /** Comma-separated list of fields to return as the docvalue representation of a field for each hit
     */
    docvalue_fields?: string | Expression<string> | PlaceholderValue;
    /** Type of index that wildcard expressions can match. Defaults to &lt;code&gt;open&lt;/code&gt;
     * @default open
     */
    expand_wildcards?: 'all' | 'closed' | 'hidden' | 'none' | 'open' | Expression<string>;
    /** Whether to return detailed information about score computation as part of a hit. Defaults to false.
     * @default false
     */
    explain?: boolean | Expression<boolean>;
    /** Whether concrete, expanded or aliased indices are ignored when frozen. Defaults to true.
     * @default true
     */
    ignore_throttled?: boolean | Expression<boolean>;
    /** Whether missing or closed indices are not included in the response. Defaults to false.
     * @default false
     */
    ignore_unavailable?: boolean | Expression<boolean>;
    /** Define the number of shard requests per node this search executes concurrently. Defaults to 5.
     * @default 5
     */
    max_concurrent_shard_requests?: number | Expression<number>;
    /** Define a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting. Only used if the number of shards the search request expands to exceeds the threshold.
     * @default 1
     */
    pre_filter_shard_size?: number | Expression<number>;
    /** Query in the &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html"&gt;Elasticsearch Query DSL&lt;/a&gt;
     */
    query?: IDataObject | string | Expression<string>;
    /** Whether the caching of search results is enabled for requests where size is 0. See &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html"&gt;Elasticsearch shard request cache settings&lt;/a&gt;.
     * @default false
     */
    request_cache?: boolean | Expression<boolean>;
    /** Target this primary shard
     */
    routing?: string | Expression<string> | PlaceholderValue;
    /** How distributed term frequencies are calculated for relevance scoring. Defaults to Query then Fetch.
     * @default query_then_fetch
     */
    search_type?: 'dfs_query_then_fetch' | 'query_then_fetch' | Expression<string>;
    /** Whether to return the sequence number and primary term of the last modification of each hit. See &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html"&gt;Optimistic concurrency control&lt;/a&gt;.
     * @default false
     */
    seq_no_primary_term?: boolean | Expression<boolean>;
    /** Comma-separated list of &lt;code&gt;field:direction&lt;/code&gt; pairs
     */
    sort?: string | Expression<string> | PlaceholderValue;
    /** Comma-separated list of source fields to exclude from the response
     */
    _source_excludes?: string | Expression<string> | PlaceholderValue;
    /** Comma-separated list of source fields to include in the response
     */
    _source_includes?: string | Expression<string> | PlaceholderValue;
    /** Tag of the request for logging and statistical purposes
     */
    stats?: string | Expression<string> | PlaceholderValue;
    /** Whether to retrieve the document fields stored in the index rather than the document &lt;code&gt;_source&lt;/code&gt;. Defaults to false.
     * @default false
     */
    stored_fields?: boolean | Expression<boolean>;
    /** Max number of documents to collect for each shard
     * @default 0
     */
    terminate_after?: number | Expression<number>;
    /** Period to wait for active shards. Defaults to &lt;code&gt;1m&lt;/code&gt; (one minute). See the &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units"&gt;Elasticsearch time units reference&lt;/a&gt;
     * @default 1m
     */
    timeout?: string | Expression<string> | PlaceholderValue;
    /** Whether to calculate and return document scores, even if the scores are not used for sorting. Defaults to false.
     * @default false
     */
    track_scores?: boolean | Expression<boolean>;
    /** Number of hits matching the query to count accurately. Defaults to 10000.
     * @default 10000
     */
    track_total_hits?: number | Expression<number>;
    /** Whether to return document version as part of a hit. Defaults to false.
     * @default false
     */
    version?: boolean | Expression<boolean>;
  };
};

export type ElasticsearchV1DocumentGetAllOutput = {
  _id?: string;
};

export type ElasticsearchV1DocumentGetAllNode = {
  type: 'n8n-nodes-base.elasticsearch';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<ElasticsearchV1DocumentGetAllParams>;
  output?: Items<ElasticsearchV1DocumentGetAllOutput>;
};