UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

57 lines (53 loc) 2.78 kB
/** * Elasticsearch Node - Version 1 * Discriminator: resource=index, operation=create */ interface Credentials { elasticsearchApi: CredentialReference; } /** Create a document */ export type ElasticsearchV1IndexCreateParams = { resource: 'index'; operation: 'create'; /** * ID of the index to create */ indexId?: string | Expression<string> | PlaceholderValue; /** * Additional Fields * @default {} */ additionalFields?: { /** Index aliases which include the index, as an &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html"&gt;alias object&lt;/a&gt; */ aliases?: IDataObject | string | Expression<string>; /** Whether a mapping type is expected in the body of mappings. Defaults to false. * @default false */ include_type_name?: boolean | Expression<boolean>; /** Mapping for fields in the index, as &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html"&gt;mapping object&lt;/a&gt; */ mappings?: IDataObject | string | Expression<string>; /** 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; /** Configuration options for the index, as an &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings"&gt;index settings object&lt;/a&gt; */ settings?: IDataObject | string | Expression<string>; /** Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to &lt;code&gt;30s&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 30s */ timeout?: string | Expression<string> | PlaceholderValue; /** The number of shard copies that must be active before proceeding with the operation. Set to &lt;code&gt;all&lt;/code&gt; or any positive integer up to the total number of shards in the index. Default: 1, the primary shard * @default 1 */ wait_for_active_shards?: string | Expression<string> | PlaceholderValue; }; }; export type ElasticsearchV1IndexCreateNode = { type: 'n8n-nodes-base.elasticsearch'; version: 1; credentials?: Credentials; config: NodeConfig<ElasticsearchV1IndexCreateParams>; };