/** * Elasticsearch Node - Version 1 * Discriminator: resource=document, operation=create */ interface Credentials { elasticsearchApi: CredentialReference; } /** Create a document */ export type ElasticsearchV1DocumentCreateParams = { resource: 'document'; operation: 'create'; /** * ID of the index to add the document to */ indexId?: string | Expression | PlaceholderValue; /** * Whether to insert the input data this node receives in the new row * @default defineBelow */ dataToSend?: 'defineBelow' | 'autoMapInputData' | Expression; /** * List of input properties to avoid sending, separated by commas. Leave empty to send all properties. * @displayOptions.show { dataToSend: ["autoMapInputData"] } */ inputsToIgnore?: string | Expression | PlaceholderValue; /** * Fields to Send * @displayOptions.show { dataToSend: ["defineBelow"] } * @default {} */ fieldsUi?: { /** Field */ fieldValues?: Array<{ /** Field Name */ fieldId?: string | Expression | PlaceholderValue; /** Field Value */ fieldValue?: string | Expression | PlaceholderValue; }>; }; /** * Additional Fields * @default {} */ additionalFields?: { /** ID of the document to create and add to the index */ documentId?: string | Expression | PlaceholderValue; /** Target this primary shard */ routing?: string | Expression | PlaceholderValue; /** Period to wait for active shards. Defaults to <code>1m</code> (one minute). See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units">Elasticsearch time units reference</a> * @default 1m */ timeout?: string | Expression | PlaceholderValue; }; /** * Options * @default {} */ options?: { /** Whether to use the bulk operation to create the document/s * @default false */ bulkOperation?: boolean | Expression; /** ID of the pipeline to use to preprocess incoming documents */ pipeline?: string | Expression | PlaceholderValue; /** If true, Elasticsearch refreshes the affected shards to make this operation visible to search,if wait_for then wait for a refresh to make this operation visible to search,if false do nothing with refreshes * @default false */ refresh?: 'true' | 'wait_for' | 'false' | Expression; }; }; export type ElasticsearchV1DocumentCreateOutput = { _id?: string; _index?: string; _primary_term?: number; _seq_no?: number; _shards?: { failed?: number; successful?: number; total?: number; }; _version?: number; result?: string; }; export type ElasticsearchV1DocumentCreateNode = { type: 'n8n-nodes-base.elasticsearch'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };