@lowdefy/connection-elasticsearch 4.0.0-alpha.1 → 4.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connections/Elasticsearch/Elasticsearch.js +3 -4
- package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.js +9 -3
- package/dist/connections/Elasticsearch/ElasticsearchDelete/schema.js +101 -0
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js +9 -3
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/schema.js +245 -0
- package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.js +9 -3
- package/dist/connections/Elasticsearch/ElasticsearchIndex/schema.js +114 -0
- package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.js +11 -8
- package/dist/connections/Elasticsearch/ElasticsearchSearch/schema.js +452 -0
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.js +9 -3
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/schema.js +201 -0
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.js +9 -3
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/schema.js +254 -0
- package/dist/connections/Elasticsearch/schema.js +471 -0
- package/dist/{connections/Elasticsearch/ElasticsearchIndex/index.js → connections.js} +2 -11
- package/dist/{connections/Elasticsearch/ElasticsearchDelete/index.js → types.js} +7 -11
- package/package.json +13 -12
- package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.json +0 -87
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.json +0 -231
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.json +0 -100
- package/dist/connections/Elasticsearch/ElasticsearchSchema.json +0 -457
- package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.json +0 -380
- package/dist/connections/Elasticsearch/ElasticsearchSearch/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.json +0 -187
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.json +0 -240
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/index.js +0 -24
- package/dist/index.js +0 -7
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Connection Schema - Elasticsearch',
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
node: {
|
|
21
|
+
description: 'The Elasticsearch endpoint to use. It can be a single string, an array of strings, or an object (or an array of objects) that represents the node',
|
|
22
|
+
examples: [
|
|
23
|
+
'http://localhost:9200',
|
|
24
|
+
'https://your.node.company.tld:443'
|
|
25
|
+
],
|
|
26
|
+
anyOf: [
|
|
27
|
+
{
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'uri',
|
|
31
|
+
pattern: '^(https?)://'
|
|
32
|
+
},
|
|
33
|
+
type: 'array'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
$ref: '#/definitions/NodeOptions'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
items: {
|
|
40
|
+
$ref: '#/definitions/NodeOptions'
|
|
41
|
+
},
|
|
42
|
+
type: 'array'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'string',
|
|
46
|
+
format: 'uri',
|
|
47
|
+
pattern: '^(https?)://'
|
|
48
|
+
},
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
nodes: {
|
|
52
|
+
description: 'The Elasticsearch endpoint to use. It can be a single string, an array of strings, or an object (or an array of objects) that represents the node',
|
|
53
|
+
examples: [
|
|
54
|
+
{
|
|
55
|
+
url: 'http://localhost:9200',
|
|
56
|
+
ssl: 'ssl options',
|
|
57
|
+
agent: 'http agent options',
|
|
58
|
+
id: 'custom node id',
|
|
59
|
+
headers: {
|
|
60
|
+
'X-Foo': 'Bar'
|
|
61
|
+
},
|
|
62
|
+
roles: {
|
|
63
|
+
master: true,
|
|
64
|
+
data: true,
|
|
65
|
+
ingest: true,
|
|
66
|
+
ml: false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
'http://localhost:9200',
|
|
70
|
+
'https://your.node.company.tld:443',
|
|
71
|
+
],
|
|
72
|
+
anyOf: [
|
|
73
|
+
{
|
|
74
|
+
items: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
format: 'uri',
|
|
77
|
+
pattern: '^(https?)://'
|
|
78
|
+
},
|
|
79
|
+
type: 'array'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
$ref: '#/definitions/NodeOptions'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
items: {
|
|
86
|
+
$ref: '#/definitions/NodeOptions'
|
|
87
|
+
},
|
|
88
|
+
type: 'array'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'string',
|
|
92
|
+
format: 'uri',
|
|
93
|
+
pattern: '^(https?)://'
|
|
94
|
+
},
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
index: {
|
|
98
|
+
description: 'Default index to use for requests.',
|
|
99
|
+
type: 'string'
|
|
100
|
+
},
|
|
101
|
+
auth: {
|
|
102
|
+
description: 'Your authentication data. You can use both basic authentication and ApiKey.',
|
|
103
|
+
examples: [
|
|
104
|
+
{
|
|
105
|
+
username: 'elastic',
|
|
106
|
+
password: 'changeMe'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
apiKey: 'base64EncodedApiKey'
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
anyOf: [
|
|
113
|
+
{
|
|
114
|
+
$ref: '#/definitions/ApiKeyAuth'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
$ref: '#/definitions/BasicAuth'
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
errorMessage: {
|
|
121
|
+
anyOf: 'Elasticsearch connection property "auth" should be an object containing credentials'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
maxRetries: {
|
|
125
|
+
description: 'Max number of retries for each request.',
|
|
126
|
+
type: 'number',
|
|
127
|
+
default: 3,
|
|
128
|
+
minimum: 0
|
|
129
|
+
},
|
|
130
|
+
requestTimeout: {
|
|
131
|
+
description: 'Max request timeout in milliseconds for each request.',
|
|
132
|
+
type: 'number',
|
|
133
|
+
default: 30000,
|
|
134
|
+
exclusiveMinimum: 0
|
|
135
|
+
},
|
|
136
|
+
pingTimeout: {
|
|
137
|
+
description: 'Max ping request timeout in milliseconds for each request.',
|
|
138
|
+
type: 'number',
|
|
139
|
+
default: 3000,
|
|
140
|
+
exclusiveMinimum: 0
|
|
141
|
+
},
|
|
142
|
+
sniffInterval: {
|
|
143
|
+
description: 'Perform a sniff operation every n milliseconds. Sniffing might not be the best solution for you, take a look here to know more: https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how',
|
|
144
|
+
type: [
|
|
145
|
+
'number',
|
|
146
|
+
'boolean'
|
|
147
|
+
],
|
|
148
|
+
default: false
|
|
149
|
+
},
|
|
150
|
+
sniffOnStart: {
|
|
151
|
+
description: 'Perform a sniff once the client is started. Sniffing might not be the best solution for you, take a look here to know more: https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how',
|
|
152
|
+
type: 'boolean'
|
|
153
|
+
},
|
|
154
|
+
sniffEndpoint: {
|
|
155
|
+
description: 'Endpoint to ping during a sniff.',
|
|
156
|
+
type: 'string',
|
|
157
|
+
default: '_nodes/_all/http'
|
|
158
|
+
},
|
|
159
|
+
sniffOnConnectionFault: {
|
|
160
|
+
description: 'Perform a sniff on connection fault. Sniffing might not be the best solution for you, take a look here to know more: https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how',
|
|
161
|
+
type: 'boolean',
|
|
162
|
+
default: false
|
|
163
|
+
},
|
|
164
|
+
resurrectStrategy: {
|
|
165
|
+
description: 'Configure the node resurrection strategy.',
|
|
166
|
+
enum: [
|
|
167
|
+
'none',
|
|
168
|
+
'optimistic',
|
|
169
|
+
'ping'
|
|
170
|
+
],
|
|
171
|
+
type: 'string',
|
|
172
|
+
default: 'ping'
|
|
173
|
+
},
|
|
174
|
+
suggestCompression: {
|
|
175
|
+
description: 'Adds accept-encoding header to every request.',
|
|
176
|
+
type: 'boolean',
|
|
177
|
+
default: false
|
|
178
|
+
},
|
|
179
|
+
compression: {
|
|
180
|
+
description: 'Enables gzip request body compression.',
|
|
181
|
+
enum: [
|
|
182
|
+
'gzip'
|
|
183
|
+
],
|
|
184
|
+
type: [
|
|
185
|
+
'string',
|
|
186
|
+
'boolean'
|
|
187
|
+
],
|
|
188
|
+
default: false
|
|
189
|
+
},
|
|
190
|
+
ssl: {
|
|
191
|
+
$ref: '#/definitions/ConnectionOptions'
|
|
192
|
+
},
|
|
193
|
+
proxy: {
|
|
194
|
+
description: 'If you are using an http(s) proxy, you can put its url here. The client will automatically handle the connection to it.',
|
|
195
|
+
type: 'string',
|
|
196
|
+
format: 'uri',
|
|
197
|
+
pattern: '^(https?)://',
|
|
198
|
+
examples: [
|
|
199
|
+
'http://localhost:8080',
|
|
200
|
+
'http://user:pwd@localhost:8080'
|
|
201
|
+
],
|
|
202
|
+
default: null
|
|
203
|
+
},
|
|
204
|
+
agent: {
|
|
205
|
+
description: 'HTTP agent options. If you want to disable the HTTP agent use entirely (and disable the `keep-alive` feature), set the agent to `false`. See https://nodejs.org/api/http.html#http_new_agent_options.',
|
|
206
|
+
default: null,
|
|
207
|
+
examples: [
|
|
208
|
+
{
|
|
209
|
+
agent: 'options'
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
agent: false
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
anyOf: [
|
|
216
|
+
{
|
|
217
|
+
$ref: '#/definitions/AgentOptions'
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
enum: [
|
|
221
|
+
false
|
|
222
|
+
],
|
|
223
|
+
type: 'boolean'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'object'
|
|
227
|
+
},
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
name: {
|
|
231
|
+
description: 'The name to identify the client instance in the events.',
|
|
232
|
+
type: 'string',
|
|
233
|
+
default: 'elasticsearch-js'
|
|
234
|
+
},
|
|
235
|
+
opaqueIdPrefix: {
|
|
236
|
+
description: 'A string that will be use to prefix any X-Opaque-Id header. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html#x-opaque-id_support[X-Opaque-Id support] for more details.',
|
|
237
|
+
default: null,
|
|
238
|
+
type: 'string'
|
|
239
|
+
},
|
|
240
|
+
headers: {
|
|
241
|
+
description: 'A set of custom headers to send in every request.',
|
|
242
|
+
examples: [
|
|
243
|
+
{
|
|
244
|
+
'X-Foo': 'Bar'
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
type: 'object',
|
|
248
|
+
default: {}
|
|
249
|
+
},
|
|
250
|
+
context: {
|
|
251
|
+
description: 'A custom object that you can use for observability in your events. It will be merged with the API level context option.',
|
|
252
|
+
type: 'object',
|
|
253
|
+
default: null
|
|
254
|
+
},
|
|
255
|
+
enableMetaHeader: {
|
|
256
|
+
description: "If true, adds an header named 'x-elastic-client-meta', containing some minimal telemetry data, such as the client and platform version.",
|
|
257
|
+
type: 'boolean',
|
|
258
|
+
default: true
|
|
259
|
+
},
|
|
260
|
+
cloud: {
|
|
261
|
+
description: 'Custom configuration for connecting to Elastic Cloud. See Authentication for more details: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html',
|
|
262
|
+
examples: [
|
|
263
|
+
{
|
|
264
|
+
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
properties: {
|
|
268
|
+
id: {
|
|
269
|
+
type: 'string'
|
|
270
|
+
},
|
|
271
|
+
password: {
|
|
272
|
+
type: 'string'
|
|
273
|
+
},
|
|
274
|
+
username: {
|
|
275
|
+
type: 'string'
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
type: 'object',
|
|
279
|
+
default: null
|
|
280
|
+
},
|
|
281
|
+
disablePrototypePoisoningProtection: {
|
|
282
|
+
description: 'By the default the client will protect you against prototype poisoning attacks. If needed you can disable prototype poisoning protection entirely or one of the two checks. Read the `secure-json-parse` documentation to learn more: https://github.com/fastify/secure-json-parse',
|
|
283
|
+
enum: [
|
|
284
|
+
'constructor',
|
|
285
|
+
false,
|
|
286
|
+
'proto',
|
|
287
|
+
true
|
|
288
|
+
],
|
|
289
|
+
default: false
|
|
290
|
+
},
|
|
291
|
+
read: {
|
|
292
|
+
type: 'boolean',
|
|
293
|
+
default: true,
|
|
294
|
+
description: 'Allow reads from the Elasticsearch index.',
|
|
295
|
+
errorMessage: {
|
|
296
|
+
type: 'Elasticsearch connection property "read" should be a boolean.'
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
write: {
|
|
300
|
+
type: 'boolean',
|
|
301
|
+
default: false,
|
|
302
|
+
description: 'Allow writes to the Elasticsearch index.',
|
|
303
|
+
errorMessage: {
|
|
304
|
+
type: 'Elasticsearch connection property "write" should be a boolean.'
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
definitions: {
|
|
309
|
+
AgentOptions: {
|
|
310
|
+
description: 'Set of configurable options to set on the agent.',
|
|
311
|
+
properties: {
|
|
312
|
+
keepAlive: {
|
|
313
|
+
description: 'Keep sockets around even when there are no outstanding requests, so they can be used for future requests without having to reestablish a TCP connection. Not to be confused with the `keep-alive` value of the `Connection` header. The `Connection: keep-alive` header is always sent when using an agent except when the `Connection` header is explicitly specified or when the `keepAlive` and `maxSockets` options are respectively set to `false` and `Infinity`, in which case `Connection: close` will be used.',
|
|
314
|
+
default: false,
|
|
315
|
+
type: 'boolean'
|
|
316
|
+
},
|
|
317
|
+
keepAliveMsecs: {
|
|
318
|
+
description: 'When using the `keepAlive` option, specifies the initial delay for TCP Keep-Alive packets. Ignored when the `keepAlive` option is `false` or `undefined`',
|
|
319
|
+
type: 'number',
|
|
320
|
+
default: 1000
|
|
321
|
+
},
|
|
322
|
+
maxFreeSockets: {
|
|
323
|
+
description: 'Maximum number of sockets to leave open in a free state. Only relevant if `keepAlive` is set to `true`',
|
|
324
|
+
type: 'number',
|
|
325
|
+
default: 256
|
|
326
|
+
},
|
|
327
|
+
maxSockets: {
|
|
328
|
+
description: 'Maximum number of sockets to allow per host. If the same host opens multiple concurrent connections, each request will use new socket until the `maxSockets` value is reached. If the host attempts to open more connections than `maxSockets`, the additional requests will enter into a pending request queue, and will enter active connection state when an existing connection terminates. This makes sure there are at most maxSockets active connections at any point in time, from a given host.',
|
|
329
|
+
type: 'number',
|
|
330
|
+
default: 'Infinity'
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
type: 'object'
|
|
334
|
+
},
|
|
335
|
+
ApiKeyAuth: {
|
|
336
|
+
description: 'The apiKey parameter can be either a base64 encoded string or an object with the values that you can obtain from the create api key endpoint. If you provide both basic authentication credentials and the ApiKey configuration, the ApiKey takes precedence.',
|
|
337
|
+
properties: {
|
|
338
|
+
apiKey: {
|
|
339
|
+
anyOf: [
|
|
340
|
+
{
|
|
341
|
+
properties: {
|
|
342
|
+
api_key: {
|
|
343
|
+
type: 'string'
|
|
344
|
+
},
|
|
345
|
+
id: {
|
|
346
|
+
type: 'string'
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
type: 'object'
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
type: 'string'
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
errorMessage: {
|
|
356
|
+
anyOf: 'Elasticsearch API key should be specified as a string, or an object containing Elasticsearch cloud credentials'
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
required: [
|
|
361
|
+
'apiKey'
|
|
362
|
+
],
|
|
363
|
+
type: 'object'
|
|
364
|
+
},
|
|
365
|
+
BasicAuth: {
|
|
366
|
+
properties: {
|
|
367
|
+
password: {
|
|
368
|
+
type: 'string'
|
|
369
|
+
},
|
|
370
|
+
username: {
|
|
371
|
+
type: 'string'
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
required: [
|
|
375
|
+
'username'
|
|
376
|
+
],
|
|
377
|
+
type: 'object',
|
|
378
|
+
errorMessage: {
|
|
379
|
+
required: 'Elasticsearch basic auth credentials must consist of at least a username'
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
ConnectionOptions: {
|
|
383
|
+
description: 'http.SecureContextOptions - See node.js SSL configuration: https://nodejs.org/api/tls.html',
|
|
384
|
+
type: 'object',
|
|
385
|
+
default: null
|
|
386
|
+
},
|
|
387
|
+
NodeOptions: {
|
|
388
|
+
examples: [
|
|
389
|
+
{
|
|
390
|
+
url: 'http://localhost:9200',
|
|
391
|
+
ssl: 'ssl options',
|
|
392
|
+
agent: 'http agent options',
|
|
393
|
+
id: 'custom node id',
|
|
394
|
+
headers: {
|
|
395
|
+
'X-Foo': 'Bar'
|
|
396
|
+
},
|
|
397
|
+
roles: {
|
|
398
|
+
master: true,
|
|
399
|
+
data: true,
|
|
400
|
+
ingest: true,
|
|
401
|
+
ml: false
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
properties: {
|
|
406
|
+
agent: {
|
|
407
|
+
$ref: '#/definitions/AgentOptions'
|
|
408
|
+
},
|
|
409
|
+
headers: {
|
|
410
|
+
type: 'object',
|
|
411
|
+
examples: [
|
|
412
|
+
{
|
|
413
|
+
'X-Foo': 'Bar'
|
|
414
|
+
},
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
id: {
|
|
418
|
+
type: 'string'
|
|
419
|
+
},
|
|
420
|
+
roles: {
|
|
421
|
+
properties: {
|
|
422
|
+
data: {
|
|
423
|
+
type: 'boolean'
|
|
424
|
+
},
|
|
425
|
+
ingest: {
|
|
426
|
+
type: 'boolean'
|
|
427
|
+
},
|
|
428
|
+
master: {
|
|
429
|
+
type: 'boolean'
|
|
430
|
+
},
|
|
431
|
+
ml: {
|
|
432
|
+
type: 'boolean'
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
type: 'object'
|
|
436
|
+
},
|
|
437
|
+
ssl: {
|
|
438
|
+
$ref: '#/definitions/ConnectionOptions'
|
|
439
|
+
},
|
|
440
|
+
url: {
|
|
441
|
+
type: 'string',
|
|
442
|
+
format: 'uri',
|
|
443
|
+
pattern: '^(https?)://'
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
type: 'object'
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
oneOf: [
|
|
450
|
+
{
|
|
451
|
+
required: [
|
|
452
|
+
'node'
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
required: [
|
|
457
|
+
'nodes'
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
errorMessage: {
|
|
462
|
+
type: 'Elasticsearch connection properties should be an object.',
|
|
463
|
+
oneOf: 'Elasticsearch connection should have required property "node" or "nodes".',
|
|
464
|
+
properties: {
|
|
465
|
+
maxRetries: 'Elasticsearch connection "maxRetries" should be 0 or greater',
|
|
466
|
+
requestTimeout: 'Elasticsearch connection "requestTimeout" should be 1 or greater',
|
|
467
|
+
pingTimeout: 'Elasticsearch connection "pingTimeout" should be 1 or greater',
|
|
468
|
+
index: 'Elasticsearch connection property "index" should be a string'
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,13 +12,4 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ export default
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.js',
|
|
18
|
-
schema: 'connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
15
|
+
*/ export { default as Elasticsearch } from './connections/Elasticsearch/Elasticsearch.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,13 +12,9 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
15
|
+
*/ import * as connections from './connections.js';
|
|
16
|
+
export default {
|
|
17
|
+
connections: Object.keys(connections),
|
|
18
|
+
requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)
|
|
19
|
+
).flat()
|
|
24
20
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-elasticsearch",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.10",
|
|
4
4
|
"licence": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy connection"
|
|
9
|
+
"lowdefy connection",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
},
|
|
28
29
|
"type": "module",
|
|
29
30
|
"exports": {
|
|
30
|
-
"
|
|
31
|
-
"./
|
|
31
|
+
"./connections": "./dist/connections.js",
|
|
32
|
+
"./types": "./dist/types.js"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"dist/*"
|
|
@@ -41,18 +42,18 @@
|
|
|
41
42
|
"test": "jest --coverage"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@elastic/elasticsearch": "7.
|
|
45
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
+
"@elastic/elasticsearch": "7.16.0",
|
|
46
|
+
"@lowdefy/helpers": "4.0.0-alpha.10"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@lowdefy/ajv": "4.0.0-alpha.
|
|
49
|
-
"@swc/cli": "0.1.
|
|
50
|
-
"@swc/core": "1.2.
|
|
51
|
-
"@swc/jest": "0.2.
|
|
52
|
-
"jest": "27.
|
|
49
|
+
"@lowdefy/ajv": "4.0.0-alpha.10",
|
|
50
|
+
"@swc/cli": "0.1.55",
|
|
51
|
+
"@swc/core": "1.2.135",
|
|
52
|
+
"@swc/jest": "0.2.17",
|
|
53
|
+
"jest": "27.5.1"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d697b4b5f354697d9481a371b90a00ca0944f486"
|
|
58
59
|
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - ElasticsearchDelete",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "Removes a JSON document from the specified index.",
|
|
6
|
-
"required": [
|
|
7
|
-
"id"
|
|
8
|
-
],
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": {
|
|
11
|
-
"anyOf": [
|
|
12
|
-
{
|
|
13
|
-
"type": "string"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "number"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"description": "Unique identifier for the document."
|
|
20
|
-
},
|
|
21
|
-
"index": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "The name of the index."
|
|
24
|
-
},
|
|
25
|
-
"if_seq_no": {
|
|
26
|
-
"type": "integer",
|
|
27
|
-
"description": "Only perform the delete operation if the last operation that has changed the document has the specified sequence number."
|
|
28
|
-
},
|
|
29
|
-
"if_primary_term": {
|
|
30
|
-
"type": "integer",
|
|
31
|
-
"description": "Only perform the delete operation if the last operation that has changed the document has the specified primary term."
|
|
32
|
-
},
|
|
33
|
-
"refresh": {
|
|
34
|
-
"anyOf": [
|
|
35
|
-
{
|
|
36
|
-
"type": "string"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "boolean"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"description": "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. Valid values: true, false, wait_for. Default: false.",
|
|
43
|
-
"enum": [
|
|
44
|
-
"true",
|
|
45
|
-
"false",
|
|
46
|
-
true,
|
|
47
|
-
false,
|
|
48
|
-
"wait_for"
|
|
49
|
-
],
|
|
50
|
-
"default": false
|
|
51
|
-
},
|
|
52
|
-
"routing": {
|
|
53
|
-
"description": "Custom value used to route operations to a specific shard.",
|
|
54
|
-
"type": "string"
|
|
55
|
-
},
|
|
56
|
-
"timeout": {
|
|
57
|
-
"type": "string",
|
|
58
|
-
"description": "Period to wait for active shards. Defaults to 1m (one minute).",
|
|
59
|
-
"default": "1m"
|
|
60
|
-
},
|
|
61
|
-
"version": {
|
|
62
|
-
"description": "Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.",
|
|
63
|
-
"type": "integer"
|
|
64
|
-
},
|
|
65
|
-
"version_type": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"description": "Specific version type.",
|
|
68
|
-
"enum": [
|
|
69
|
-
"internal",
|
|
70
|
-
"external",
|
|
71
|
-
"external_gte",
|
|
72
|
-
"force"
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"wait_for_active_shards": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: 1, the primary shard.",
|
|
78
|
-
"default": "1"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"errorMessage": {
|
|
82
|
-
"type": "ElasticsearchDelete request properties should be an object.",
|
|
83
|
-
"required": {
|
|
84
|
-
"id": "ElasticsearchDelete request should have required property \"id\"."
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|