n8n-nodes-meilisearch 0.1.0
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/LICENSE.md +19 -0
- package/README.md +92 -0
- package/dist/credentials/MeilisearchApi.credentials.d.ts +9 -0
- package/dist/credentials/MeilisearchApi.credentials.js +49 -0
- package/dist/credentials/MeilisearchApi.credentials.js.map +1 -0
- package/dist/nodes/Meilisearch/DocumentsDescription.d.ts +4 -0
- package/dist/nodes/Meilisearch/DocumentsDescription.js +255 -0
- package/dist/nodes/Meilisearch/DocumentsDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/GeneralDescription copy.d.ts +2 -0
- package/dist/nodes/Meilisearch/GeneralDescription copy.js +68 -0
- package/dist/nodes/Meilisearch/GeneralDescription copy.js.map +1 -0
- package/dist/nodes/Meilisearch/GeneralDescription.d.ts +2 -0
- package/dist/nodes/Meilisearch/GeneralDescription.js +68 -0
- package/dist/nodes/Meilisearch/GeneralDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/IndexesDescription copy.d.ts +6 -0
- package/dist/nodes/Meilisearch/IndexesDescription copy.js +518 -0
- package/dist/nodes/Meilisearch/IndexesDescription copy.js.map +1 -0
- package/dist/nodes/Meilisearch/IndexesDescription.d.ts +6 -0
- package/dist/nodes/Meilisearch/IndexesDescription.js +531 -0
- package/dist/nodes/Meilisearch/IndexesDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/KeysDescription copy.d.ts +6 -0
- package/dist/nodes/Meilisearch/KeysDescription copy.js +354 -0
- package/dist/nodes/Meilisearch/KeysDescription copy.js.map +1 -0
- package/dist/nodes/Meilisearch/KeysDescription.d.ts +6 -0
- package/dist/nodes/Meilisearch/KeysDescription.js +354 -0
- package/dist/nodes/Meilisearch/KeysDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/Meilisearch.node.d.ts +4 -0
- package/dist/nodes/Meilisearch/Meilisearch.node.js +101 -0
- package/dist/nodes/Meilisearch/Meilisearch.node.js.map +1 -0
- package/dist/nodes/Meilisearch/Meilisearch.node.json +18 -0
- package/dist/nodes/Meilisearch/SettingsDescription.d.ts +3 -0
- package/dist/nodes/Meilisearch/SettingsDescription.js +386 -0
- package/dist/nodes/Meilisearch/SettingsDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/TasksDescription copy.d.ts +6 -0
- package/dist/nodes/Meilisearch/TasksDescription copy.js +339 -0
- package/dist/nodes/Meilisearch/TasksDescription copy.js.map +1 -0
- package/dist/nodes/Meilisearch/TasksDescription.d.ts +6 -0
- package/dist/nodes/Meilisearch/TasksDescription.js +339 -0
- package/dist/nodes/Meilisearch/TasksDescription.js.map +1 -0
- package/dist/nodes/Meilisearch/meilisearch.svg +19 -0
- package/dist/package.json +51 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +51 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# n8n-nodes-meilisearch
|
|
2
|
+
|
|
3
|
+
This is an n8n community node. It lets you use the meilisearch REST API in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
[Meilisearch](https://meilisearch.com)
|
|
6
|
+
An open-source, lightning-fast, and hyper-relevant search engine that fits effortlessly into your apps, websites, and workflow.
|
|
7
|
+
|
|
8
|
+
[meilisearch API Docs](https://docs.meilisearch.com/reference/api/overview.html)
|
|
9
|
+
|
|
10
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
11
|
+
|
|
12
|
+
[Installation](#installation)
|
|
13
|
+
[Operations](#operations)
|
|
14
|
+
[Credentials](#credentials)
|
|
15
|
+
[Compatibility](#compatibility)
|
|
16
|
+
[Usage](#usage)
|
|
17
|
+
[Resources](#resources)
|
|
18
|
+
[Version history](#version-history)
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
23
|
+
|
|
24
|
+
## Operations
|
|
25
|
+
|
|
26
|
+
- Documents
|
|
27
|
+
- Add or replace documents
|
|
28
|
+
- Add or update documents
|
|
29
|
+
- Delete batch of documents by UID
|
|
30
|
+
- Delete all documents in an index
|
|
31
|
+
- Get documents
|
|
32
|
+
- Get one document by UID
|
|
33
|
+
- General
|
|
34
|
+
- Create a dump
|
|
35
|
+
- Get all index stats
|
|
36
|
+
- Get health
|
|
37
|
+
- Get version information
|
|
38
|
+
- Indexes
|
|
39
|
+
- Create an index
|
|
40
|
+
- Get stats of an index
|
|
41
|
+
- List indexes
|
|
42
|
+
- Search index
|
|
43
|
+
- Swap indexes
|
|
44
|
+
- Keys
|
|
45
|
+
- Create a new key
|
|
46
|
+
- Delete a key by its uid or key
|
|
47
|
+
- Get a single key by its uid or key
|
|
48
|
+
- Get many api keys
|
|
49
|
+
- Update a key by its uid or key
|
|
50
|
+
- Search
|
|
51
|
+
- Search an index (Also found in indexes section)
|
|
52
|
+
- Settings
|
|
53
|
+
- Get the settings of an index
|
|
54
|
+
- Reset the settings of an index
|
|
55
|
+
- Update the settings of an index
|
|
56
|
+
- Tasks
|
|
57
|
+
- Cancel tasks
|
|
58
|
+
- Delete tasks
|
|
59
|
+
- Get all tasks
|
|
60
|
+
- Get one task by UID
|
|
61
|
+
|
|
62
|
+
## Credentials
|
|
63
|
+
|
|
64
|
+
By [providing Meilisearch with a master key at launch](https://docs.meilisearch.com/learn/security/master_api_keys.html#protecting-a-meilisearch-instance), you protect your instance from unauthorized requests. The provided master key must be at least 16 bytes. From then on, you must include the `Authorization` header along with a valid API key to access protected routes (all routes except /health.)
|
|
65
|
+
|
|
66
|
+
The credentials type provided in this node send an `Authorization` header with the key you provide. e.g. `Authorization: Bearer YOURKEY`
|
|
67
|
+
|
|
68
|
+
## Compatibility
|
|
69
|
+
|
|
70
|
+
This is subject to change.
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
Use as you would any node- I tried to include useful descriptions and hints for all fields.
|
|
75
|
+
|
|
76
|
+
## Resources
|
|
77
|
+
|
|
78
|
+
* [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
79
|
+
* [n8n-nodes-meilisearch repository](https://github.com/Bwilliamson55/n8n-nodes-meilisearch)
|
|
80
|
+
* [Official Meilisearch API Reference](https://www.meilisearch.com/docs/reference/api/overview)
|
|
81
|
+
* [Official Meilisearch Docs](https://www.meilisearch.com/docs/learn/what_is_meilisearch/overview)
|
|
82
|
+
|
|
83
|
+
## Version history
|
|
84
|
+
|
|
85
|
+
- 0.1.0 - Initial release
|
|
86
|
+
- Almost all API endpoints accounted for in node operations
|
|
87
|
+
- TODO:
|
|
88
|
+
- multi-search,
|
|
89
|
+
- index settings sub-routes,
|
|
90
|
+
- auto-populating options where possible
|
|
91
|
+
- Due to the very dynamic permissions, getting options has a high chance of failure. For MVP I opted to skip loading options dynamically, such as index names.
|
|
92
|
+
- Currently index settings can be interacted with, but as the entire settings object for each index
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, IHttpRequestOptions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class MeilisearchApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeilisearchApi = void 0;
|
|
4
|
+
class MeilisearchApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'meilisearchApi';
|
|
7
|
+
this.displayName = 'Meilisearch API';
|
|
8
|
+
this.documentationUrl = 'https://docs.meilisearch.com/reference/api/overview.html#authorization';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Host URL',
|
|
12
|
+
name: 'host_url',
|
|
13
|
+
type: 'string',
|
|
14
|
+
placeholder: 'Your Meilisearch host URL - https://yourindex.com',
|
|
15
|
+
default: '',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'API Key',
|
|
19
|
+
name: 'apiKey',
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'This is tested against the /version endpoint',
|
|
22
|
+
typeOptions: { password: true },
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'The authentication test is against the /version endpoint - you can save your credentials regardless of the test result!',
|
|
27
|
+
name: 'notice',
|
|
28
|
+
type: 'notice',
|
|
29
|
+
default: '/version',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
this.test = {
|
|
33
|
+
request: {
|
|
34
|
+
url: '/version',
|
|
35
|
+
method: 'GET',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async authenticate(credentials, requestOptions) {
|
|
40
|
+
requestOptions.headers = {
|
|
41
|
+
...requestOptions.headers,
|
|
42
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
43
|
+
};
|
|
44
|
+
requestOptions.baseURL = credentials.host_url.replace(new RegExp("/$"), "");
|
|
45
|
+
return requestOptions;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MeilisearchApi = MeilisearchApi;
|
|
49
|
+
//# sourceMappingURL=MeilisearchApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MeilisearchApi.credentials.js","sourceRoot":"","sources":["../../credentials/MeilisearchApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QAExB,gBAAW,GAAG,iBAAiB,CAAC;QAEhC,qBAAgB,GAAG,wEAAwE,CAAC;QAE5F,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;gBAChE,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;gBAC3D,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,yHAAyH;gBACtI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,UAAU;aACnB;SACD,CAAC;QAcF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;IAlBA,KAAK,CAAC,YAAY,CACjB,WAA2C,EAC3C,cAAmC;QAEnC,cAAc,CAAC,OAAO,GAAG;YACxB,GAAG,cAAc,CAAC,OAAO;YACzB,aAAa,EAAE,UAAU,WAAW,CAAC,MAAM,EAAE;SAC7C,CAAC;QACF,cAAc,CAAC,OAAO,GAAI,WAAW,CAAC,QAAmB,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;QACvF,OAAO,cAAc,CAAC;IACvB,CAAC;CAQD;AAjDD,wCAiDC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentsAdditionalFields = exports.documentsFields = exports.documentsOperations = void 0;
|
|
4
|
+
exports.documentsOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['documents'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
default: 'getMany',
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Add or Replace Documents',
|
|
19
|
+
value: 'addOrReplaceDocuments',
|
|
20
|
+
action: 'Add or replace documents',
|
|
21
|
+
routing: {
|
|
22
|
+
request: {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents"}}',
|
|
25
|
+
qs: {},
|
|
26
|
+
body: {},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Add or Update Documents',
|
|
32
|
+
value: 'addOrUpdateDocuments',
|
|
33
|
+
action: 'Add or update documents',
|
|
34
|
+
routing: {
|
|
35
|
+
request: {
|
|
36
|
+
method: 'PUT',
|
|
37
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents"}}',
|
|
38
|
+
qs: {},
|
|
39
|
+
body: {},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Delete All Document',
|
|
45
|
+
value: 'deleteAllDocuments',
|
|
46
|
+
action: 'Delete all documents in an index',
|
|
47
|
+
routing: {
|
|
48
|
+
request: {
|
|
49
|
+
method: 'DELETE',
|
|
50
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents"}}',
|
|
51
|
+
qs: {},
|
|
52
|
+
body: {},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Delete Batch of Documents',
|
|
58
|
+
value: 'deleteDocumentsBatch',
|
|
59
|
+
action: 'Delete batch of documents by UID',
|
|
60
|
+
routing: {
|
|
61
|
+
request: {
|
|
62
|
+
method: 'POST',
|
|
63
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents/delete-batch"}}',
|
|
64
|
+
qs: {},
|
|
65
|
+
body: {},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Get Documents',
|
|
71
|
+
value: 'getMany',
|
|
72
|
+
action: 'Get documents',
|
|
73
|
+
routing: {
|
|
74
|
+
request: {
|
|
75
|
+
method: 'GET',
|
|
76
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents"}}',
|
|
77
|
+
qs: {},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Get One Document',
|
|
83
|
+
value: 'getDocument',
|
|
84
|
+
action: 'Get one document by UID',
|
|
85
|
+
routing: {
|
|
86
|
+
request: {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
url: '={{"/indexes/" + $parameter["uid"] + "/documents/" + $parameter["documentId"]}}',
|
|
89
|
+
qs: {},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
exports.documentsFields = [
|
|
97
|
+
{
|
|
98
|
+
displayName: 'Index UID',
|
|
99
|
+
name: 'uid',
|
|
100
|
+
description: 'Name of the index',
|
|
101
|
+
type: 'string',
|
|
102
|
+
default: '',
|
|
103
|
+
required: true,
|
|
104
|
+
displayOptions: {
|
|
105
|
+
show: {
|
|
106
|
+
resource: ['documents'],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Document ID',
|
|
112
|
+
name: 'documentId',
|
|
113
|
+
description: 'UId for the document',
|
|
114
|
+
type: 'string',
|
|
115
|
+
default: '',
|
|
116
|
+
required: true,
|
|
117
|
+
displayOptions: {
|
|
118
|
+
show: {
|
|
119
|
+
resource: ['documents'],
|
|
120
|
+
operation: ['getDocument', 'deleteDocument'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
displayName: 'UIDs',
|
|
126
|
+
name: 'uids',
|
|
127
|
+
description: 'Delete a selection of documents based on an array of document IDs',
|
|
128
|
+
hint: '1234, 5678, 9012',
|
|
129
|
+
type: 'string',
|
|
130
|
+
default: '',
|
|
131
|
+
required: true,
|
|
132
|
+
displayOptions: {
|
|
133
|
+
show: {
|
|
134
|
+
resource: ['documents'],
|
|
135
|
+
operation: ['deleteDocumentsBatch'],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
routing: {
|
|
139
|
+
request: {
|
|
140
|
+
body: ['={{$value.replaceAll(" ", "")}}'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Documents JSON',
|
|
146
|
+
name: 'documentsJson',
|
|
147
|
+
description: 'JSON objects to add, update, or replace. This must be valid JSON.',
|
|
148
|
+
hint: '{id: 1, fieldName: "fieldValue"}, {id: 2, fieldName: "fieldValue"}',
|
|
149
|
+
type: 'string',
|
|
150
|
+
default: '',
|
|
151
|
+
required: true,
|
|
152
|
+
typeOptions: {
|
|
153
|
+
rows: 4,
|
|
154
|
+
},
|
|
155
|
+
displayOptions: {
|
|
156
|
+
show: {
|
|
157
|
+
resource: ['documents'],
|
|
158
|
+
operation: ['addOrReplaceDocuments', 'addOrUpdateDocuments'],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
routing: {
|
|
162
|
+
request: {
|
|
163
|
+
body: ['={{JSON.parse($value)}}'],
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Fields',
|
|
169
|
+
name: 'fields',
|
|
170
|
+
type: 'string',
|
|
171
|
+
description: 'Comma-separated list of fields to display for an API resource. By default it contains all fields of an API resource.',
|
|
172
|
+
default: '*',
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: {
|
|
175
|
+
resource: ['documents'],
|
|
176
|
+
operation: ['getDocument'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
routing: {
|
|
180
|
+
request: {
|
|
181
|
+
qs: {
|
|
182
|
+
fields: '={{$value.replaceAll(" ", "")}}',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
exports.documentsAdditionalFields = [
|
|
189
|
+
{
|
|
190
|
+
displayName: 'Additional Fields',
|
|
191
|
+
noDataExpression: true,
|
|
192
|
+
name: 'additionalFields',
|
|
193
|
+
placeholder: 'Add Field',
|
|
194
|
+
description: 'Additional fields to add',
|
|
195
|
+
type: 'collection',
|
|
196
|
+
default: {},
|
|
197
|
+
displayOptions: {
|
|
198
|
+
show: {
|
|
199
|
+
resource: ['documents'],
|
|
200
|
+
operation: ['getMany'],
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
options: [
|
|
204
|
+
{
|
|
205
|
+
displayName: 'Offset',
|
|
206
|
+
name: 'offset',
|
|
207
|
+
description: 'Number of results to skip',
|
|
208
|
+
type: 'number',
|
|
209
|
+
typeOptions: {
|
|
210
|
+
minValue: 0,
|
|
211
|
+
},
|
|
212
|
+
default: 0,
|
|
213
|
+
routing: {
|
|
214
|
+
request: {
|
|
215
|
+
qs: {
|
|
216
|
+
offset: '={{$value}}',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
displayName: 'Limit',
|
|
223
|
+
name: 'limit',
|
|
224
|
+
description: 'Max number of results to return',
|
|
225
|
+
type: 'number',
|
|
226
|
+
typeOptions: {
|
|
227
|
+
minValue: 1,
|
|
228
|
+
},
|
|
229
|
+
default: 50,
|
|
230
|
+
routing: {
|
|
231
|
+
request: {
|
|
232
|
+
qs: {
|
|
233
|
+
limit: '={{$value}}',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
displayName: 'Fields',
|
|
240
|
+
name: 'fields',
|
|
241
|
+
type: 'string',
|
|
242
|
+
description: 'Comma-separated list of fields to display for an API resource. By default it contains all fields of an API resource.',
|
|
243
|
+
default: '*',
|
|
244
|
+
routing: {
|
|
245
|
+
request: {
|
|
246
|
+
qs: {
|
|
247
|
+
fields: '={{$value.replaceAll(" ", "")}}',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
];
|
|
255
|
+
//# sourceMappingURL=DocumentsDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentsDescription.js","sourceRoot":"","sources":["../../../nodes/Meilisearch/DocumentsDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACrD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,WAAW,CAAC;aACvB;SACD;QACD,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,0BAA0B;gBAChC,KAAK,EAAE,uBAAuB;gBAC9B,MAAM,EAAE,0BAA0B;gBAClC,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,qDAAqD;wBAC1D,EAAE,EAAE,EAAE;wBACN,IAAI,EAAE,EAAE;qBACR;iBACD;aACD;YACD;gBACC,IAAI,EAAE,yBAAyB;gBAC/B,KAAK,EAAE,sBAAsB;gBAC7B,MAAM,EAAE,yBAAyB;gBACjC,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,qDAAqD;wBAC1D,EAAE,EAAE,EAAE;wBACN,IAAI,EAAE,EAAE;qBACR;iBACD;aACD;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,MAAM,EAAE,kCAAkC;gBAC1C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,QAAQ;wBAChB,GAAG,EAAE,qDAAqD;wBAC1D,EAAE,EAAE,EAAE;wBACN,IAAI,EAAE,EAAE;qBACR;iBACD;aACD;YACD;gBACC,IAAI,EAAE,2BAA2B;gBACjC,KAAK,EAAE,sBAAsB;gBAC7B,MAAM,EAAE,kCAAkC;gBAC1C,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W,EAAE,WAAW;QACxB,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,WAAW,CAAC;gBACvB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;iBACX;gBACD,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,EAAE,EAAE;4BACH,MAAM,EAAE,aAAa;yBACrB;qBACD;iBACD;aACD;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;iBACX;gBACD,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,EAAE,EAAE;4BACH,KAAK,EAAE,aAAa;yBACpB;qBACD;iBACD;aACD;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EACV,sHAAsH;gBACvH,OAAO,EAAE,GAAG;gBACZ,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,EAAE,EAAE;4BACH,MAAM,EAAE,iCAAiC;yBACzC;qBACD;iBACD;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generalOperations = void 0;
|
|
4
|
+
exports.generalOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['general'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Dumps',
|
|
18
|
+
value: 'dumps',
|
|
19
|
+
action: 'Create a dump',
|
|
20
|
+
description: 'The /dumps route allows the creation of database dumps. Dumps are .dump files that can be used to restore Meilisearch data or migrate between different versions.',
|
|
21
|
+
routing: {
|
|
22
|
+
request: {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
url: '/dumps',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Health',
|
|
30
|
+
value: 'health',
|
|
31
|
+
action: 'Get health',
|
|
32
|
+
description: 'The /health route allows you to verify the status and availability of a Meilisearch instance',
|
|
33
|
+
routing: {
|
|
34
|
+
request: {
|
|
35
|
+
method: 'GET',
|
|
36
|
+
url: '/health',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Stats',
|
|
42
|
+
value: 'stats',
|
|
43
|
+
action: 'Get all index stats',
|
|
44
|
+
description: 'The /stats route gives extended information and metrics about indexes and the Meilisearch database',
|
|
45
|
+
routing: {
|
|
46
|
+
request: {
|
|
47
|
+
method: 'GET',
|
|
48
|
+
url: '/stats',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Version',
|
|
54
|
+
value: 'version',
|
|
55
|
+
action: 'Get version information',
|
|
56
|
+
description: 'The /version route allows you to check the version of a running Meilisearch instance',
|
|
57
|
+
routing: {
|
|
58
|
+
request: {
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: '/version',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
default: 'health',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=GeneralDescription%20copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneralDescription copy.js","sourceRoot":"","sources":["../../../nodes/Meilisearch/GeneralDescription copy.ts"],"names":[],"mappings":";;;AAIa,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,eAAe;gBACvB,WAAW,EAAE,mKAAmK;gBAChL,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,QAAQ;qBACb;iBACD;aACD;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,8FAA8F;gBAC3G,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;YAcD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,qBAAqB;gBAC7B,WAAW,EAAE,oGAAoG;gBACjH,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,QAAQ;qBACb;iBACD;aACD;YACD;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,yBAAyB;gBACjC,WAAW,EAAE,sFAAsF;gBACnG,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,UAAU;qBACf;iBACD;aACD;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generalOperations = void 0;
|
|
4
|
+
exports.generalOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['general'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Dumps',
|
|
18
|
+
value: 'dumps',
|
|
19
|
+
action: 'Create a dump',
|
|
20
|
+
description: 'The /dumps route allows the creation of database dumps. Dumps are .dump files that can be used to restore Meilisearch data or migrate between different versions.',
|
|
21
|
+
routing: {
|
|
22
|
+
request: {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
url: '/dumps',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Health',
|
|
30
|
+
value: 'health',
|
|
31
|
+
action: 'Get health',
|
|
32
|
+
description: 'The /health route allows you to verify the status and availability of a Meilisearch instance',
|
|
33
|
+
routing: {
|
|
34
|
+
request: {
|
|
35
|
+
method: 'GET',
|
|
36
|
+
url: '/health',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Stats',
|
|
42
|
+
value: 'stats',
|
|
43
|
+
action: 'Get all index stats',
|
|
44
|
+
description: 'The /stats route gives extended information and metrics about indexes and the Meilisearch database',
|
|
45
|
+
routing: {
|
|
46
|
+
request: {
|
|
47
|
+
method: 'GET',
|
|
48
|
+
url: '/stats',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Version',
|
|
54
|
+
value: 'version',
|
|
55
|
+
action: 'Get version information',
|
|
56
|
+
description: 'The /version route allows you to check the version of a running Meilisearch instance',
|
|
57
|
+
routing: {
|
|
58
|
+
request: {
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: '/version',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
default: 'health',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=GeneralDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneralDescription.js","sourceRoot":"","sources":["../../../nodes/Meilisearch/GeneralDescription.ts"],"names":[],"mappings":";;;AAIa,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,eAAe;gBACvB,WAAW,EAAE,mKAAmK;gBAChL,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,QAAQ;qBACb;iBACD;aACD;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,8FAA8F;gBAC3G,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;YAcD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,qBAAqB;gBAC7B,WAAW,EAAE,oGAAoG;gBACjH,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,QAAQ;qBACb;iBACD;aACD;YACD;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,yBAAyB;gBACjC,WAAW,EAAE,sFAAsF;gBACnG,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,UAAU;qBACf;iBACD;aACD;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const searchOperations: INodeProperties[];
|
|
3
|
+
export declare const indexesOperations: INodeProperties[];
|
|
4
|
+
export declare const searchFields: INodeProperties[];
|
|
5
|
+
export declare const indexesFields: INodeProperties[];
|
|
6
|
+
export declare const swapIndexesFields: INodeProperties[];
|