Add Elasticsearch node (#1791)

* 🎉 Initial node scaffolding

*  Implement index operations

*  Implement document operations

* 🔨 Clean up details

* 🔨 Fix casing

* 🔨 Fix indentation

*  Minor fixes

* ✏️ Update descriptions

* 🔥 Remove wrong placeholder

*  Refactor to implement specifyIndexBy

* 👕 Appease linter

* Revert " Refactor to implement specifyIndexBy"

This reverts commit 02ea0d30804b14f0b489678cd4e5deeb95848883.

* 🔥 Remove unused file

*  Return source always in document:get and getAll

*  Rename to options in document:getAll

*  Rename to options in document:get

*  Send content as JSON

*  Add simplify param to document:get

*  Rename docvalue fields

*  Make document ID optional in document:index

*  Implement sendInputData

* 👕 Fix lintings

* Add define and automap to document:index

* WIP on document:update

* 🔨 Adjust document:update per feedback

* 🔥 Remove logging

*  Improve Elasticsearch node

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Iván Ovejero
2021-07-17 11:43:45 +02:00
committed by GitHub
parent e2e57539d6
commit ca1bbcea5d
10 changed files with 1637 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class ElasticsearchApi implements ICredentialType {
name = 'elasticsearchApi';
displayName = 'Elasticsearch API';
documentationUrl = 'elasticsearch';
properties = [
{
displayName: 'Username',
name: 'username',
type: 'string' as NodePropertyTypes,
default: '',
},
{
displayName: 'Password',
name: 'password',
type: 'string' as NodePropertyTypes,
typeOptions: {
password: true,
},
default: '',
},
{
displayName: 'Base URL',
name: 'baseUrl',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'https://abc.elastic-cloud.com:9243',
description: 'Referred to as \'endpoint\' in the Elasticsearch dashboard.',
},
];
}