/**
 * Elasticsearch Node - Version 1
 * Discriminator: resource=index, operation=get
 */


interface Credentials {
  elasticsearchApi: CredentialReference;
}

/** Get a document */
export type ElasticsearchV1IndexGetParams = {
  resource: 'index';
  operation: 'get';
/**
 * ID of the index to retrieve
 */
    indexId?: string | Expression<string> | PlaceholderValue;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** 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>;
    /** Type of index that wildcard expressions can match. Defaults to &lt;code&gt;open&lt;/code&gt;
     * @default all
     */
    expand_wildcards?: 'all' | 'closed' | 'hidden' | 'none' | 'open' | Expression<string>;
    /** Whether to return settings in flat format. Defaults to false.
     * @default false
     */
    flat_settings?: boolean | Expression<boolean>;
    /** Whether to request that target a missing index return an error. Defaults to false.
     * @default false
     */
    ignore_unavailable?: boolean | Expression<boolean>;
    /** Whether to return all default settings in the response. Defaults to false.
     * @default false
     */
    include_defaults?: boolean | Expression<boolean>;
    /** Whether to retrieve information from the local node only. Defaults to false.
     * @default false
     */
    local?: boolean | Expression<boolean>;
    /** Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to &lt;code&gt;1m&lt;/code&gt;. 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
     */
    master_timeout?: string | Expression<string> | PlaceholderValue;
  };
};

export type ElasticsearchV1IndexGetOutput = {
  id?: string;
  mappings?: {
    properties?: {
      author?: {
        fields?: {
          keyword?: {
            ignore_above?: number;
            type?: string;
          };
        };
        type?: string;
      };
      name?: {
        fields?: {
          keyword?: {
            ignore_above?: number;
            type?: string;
          };
        };
        type?: string;
      };
      page_count?: {
        type?: string;
      };
      release_date?: {
        type?: string;
      };
    };
  };
  settings?: {
    index?: {
      creation_date?: string;
      number_of_replicas?: string;
      number_of_shards?: string;
      provided_name?: string;
      routing?: {
        allocation?: {
          include?: {
            _tier_preference?: string;
          };
        };
      };
      uuid?: string;
      version?: {
        created?: string;
      };
    };
  };
};

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