@ctera/n8n-nodes-ctera-ai 0.1.2 → 0.4.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 +24 -24
- package/README.md +68 -58
- package/dist/credentials/CteraFilesystemApi.credentials.d.ts +7 -0
- package/dist/credentials/CteraFilesystemApi.credentials.js +40 -0
- package/dist/credentials/CteraPortalOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/CteraPortalOAuth2Api.credentials.js +106 -0
- package/dist/nodes/CteraAi/CteraAi.node.js +164 -9
- package/dist/nodes/CteraAi/ctera.svg +13 -13
- package/dist/nodes/CteraFilesystem/CteraFilesystem.node.d.ts +5 -0
- package/dist/nodes/CteraFilesystem/CteraFilesystem.node.js +598 -0
- package/dist/nodes/CteraFilesystem/ctera.svg +13 -0
- package/index.js +10 -10
- package/package.json +71 -60
package/LICENSE
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 CTERA Networks
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 CTERA Networks
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
package/README.md
CHANGED
|
@@ -1,58 +1,68 @@
|
|
|
1
|
-
# n8n-nodes-ctera
|
|
2
|
-
|
|
3
|
-
n8n community
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
# n8n-nodes-ctera
|
|
2
|
+
|
|
3
|
+
n8n community nodes for CTERA integration - filesystem operations and AI-powered data intelligence.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cd ~/.n8n/nodes
|
|
9
|
+
npm install @ctera/n8n-nodes-ctera
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Restart n8n after installation.
|
|
13
|
+
|
|
14
|
+
## Nodes
|
|
15
|
+
|
|
16
|
+
### CTERA Filesystem
|
|
17
|
+
|
|
18
|
+
Perform storage operations on CTERA Portal via MCP:
|
|
19
|
+
- **File**: Read, write, copy, move, rename, delete
|
|
20
|
+
- **Directory**: List, create, delete, walk, recover
|
|
21
|
+
- **Links**: Public sharing links and permalinks
|
|
22
|
+
- **Versions**: File version history
|
|
23
|
+
|
|
24
|
+
Supports OAuth2 (Entra ID / Azure AD) authentication.
|
|
25
|
+
|
|
26
|
+
**[Detailed Documentation →](nodes/CteraFilesystem/README.md)**
|
|
27
|
+
|
|
28
|
+
### CTERA Data Intelligence
|
|
29
|
+
|
|
30
|
+
Interact with CTERA AI experts for semantic search and knowledge retrieval:
|
|
31
|
+
- **List Experts**: Discover available knowledge bases
|
|
32
|
+
- **Semantic Search**: Retrieve text chunks for RAG workflows
|
|
33
|
+
- **File Search**: Search files with metadata filters
|
|
34
|
+
- **Chat**: Get AI-generated answers
|
|
35
|
+
|
|
36
|
+
**[Detailed Documentation →](nodes/CteraAi/README.md)**
|
|
37
|
+
|
|
38
|
+
## Credentials
|
|
39
|
+
|
|
40
|
+
| Credential | Used By | Description |
|
|
41
|
+
|------------|---------|-------------|
|
|
42
|
+
| CTERA Portal OAuth2 API | Filesystem | Entra ID / Azure AD SSO authentication |
|
|
43
|
+
| CTERA AI MCP API | Data Intelligence | MCP bearer token authentication |
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Install dependencies
|
|
49
|
+
npm install
|
|
50
|
+
|
|
51
|
+
# Build
|
|
52
|
+
npm run build
|
|
53
|
+
|
|
54
|
+
# Run tests
|
|
55
|
+
npm test
|
|
56
|
+
|
|
57
|
+
# Link for local development
|
|
58
|
+
npm link
|
|
59
|
+
cd ~/.n8n/nodes && npm link @ctera/n8n-nodes-ctera
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Publishing
|
|
63
|
+
|
|
64
|
+
See [PUBLISH.md](PUBLISH.md) for npm publishing guidelines.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CteraFilesystemApi = void 0;
|
|
4
|
+
class CteraFilesystemApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'cteraFilesystemApi';
|
|
7
|
+
this.displayName = 'CTERA Filesystem API';
|
|
8
|
+
this.documentationUrl = 'https://github.com/ctera/ctera-n8n-nodes#readme';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'MCP Server URL',
|
|
12
|
+
name: 'serverUrl',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
required: true,
|
|
16
|
+
placeholder: 'https://mcp.your-domain.com',
|
|
17
|
+
description: 'The base URL of your CTERA MCP server (e.g., https://mcp.example.com)',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Bearer Token (JWT)',
|
|
21
|
+
name: 'bearerToken',
|
|
22
|
+
type: 'string',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
default: '',
|
|
27
|
+
required: true,
|
|
28
|
+
description: 'Portal JWT token for authentication. Generate via Portal Settings → API Tokens, or using: curl -k "https://<portal>/api/tokens/generate?oid=<oid>&email=<email>"',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Ignore SSL Issues',
|
|
32
|
+
name: 'allowUnauthorizedCerts',
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
default: false,
|
|
35
|
+
description: 'Whether to connect even if SSL certificate validation fails (use for self-signed certificates)',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.CteraFilesystemApi = CteraFilesystemApi;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class CteraPortalOAuth2Api implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
extends: string[];
|
|
5
|
+
displayName: string;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CteraPortalOAuth2Api = void 0;
|
|
4
|
+
class CteraPortalOAuth2Api {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'cteraPortalOAuth2Api';
|
|
7
|
+
this.extends = ['oAuth2Api'];
|
|
8
|
+
this.displayName = 'CTERA Portal OAuth2 API';
|
|
9
|
+
this.documentationUrl = 'https://github.com/ctera/ctera-n8n-nodes#oauth2-setup';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Portal URL',
|
|
13
|
+
name: 'portalUrl',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
placeholder: 'https://your-portal.ctera.com',
|
|
18
|
+
description: 'Base URL of your CTERA Portal',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Grant Type',
|
|
22
|
+
name: 'grantType',
|
|
23
|
+
type: 'hidden',
|
|
24
|
+
default: 'authorizationCode',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Authorization URL',
|
|
28
|
+
name: 'authUrl',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: '',
|
|
31
|
+
required: true,
|
|
32
|
+
placeholder: 'https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/authorize',
|
|
33
|
+
description: 'Azure AD authorization endpoint. Replace YOUR-TENANT-ID with your Azure tenant ID',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Access Token URL',
|
|
37
|
+
name: 'accessTokenUrl',
|
|
38
|
+
type: 'string',
|
|
39
|
+
default: '',
|
|
40
|
+
required: true,
|
|
41
|
+
placeholder: 'https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/token',
|
|
42
|
+
description: 'Azure AD token endpoint. Replace YOUR-TENANT-ID with your Azure tenant ID',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: 'API Scope',
|
|
46
|
+
name: 'apiScope',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: '',
|
|
49
|
+
required: true,
|
|
50
|
+
placeholder: 'api://YOUR-CLIENT-ID/access',
|
|
51
|
+
description: 'Your Azure AD API scope (e.g., api://client-id/access or api://client-id/claudeai). This is required for v2.0 tokens.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Scope',
|
|
55
|
+
name: 'scope',
|
|
56
|
+
type: 'hidden',
|
|
57
|
+
default: '={{$self.apiScope}} openid profile offline_access',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Auth URI Query Parameters',
|
|
61
|
+
name: 'authQueryParameters',
|
|
62
|
+
type: 'hidden',
|
|
63
|
+
default: '',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Authentication',
|
|
67
|
+
name: 'authentication',
|
|
68
|
+
type: 'hidden',
|
|
69
|
+
default: 'body',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Ignore SSL Issues',
|
|
73
|
+
name: 'allowUnauthorizedCerts',
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
default: false,
|
|
76
|
+
description: 'Whether to connect even if SSL certificate validation fails (use for self-signed certificates)',
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
this.authenticate = {
|
|
80
|
+
type: 'generic',
|
|
81
|
+
properties: {
|
|
82
|
+
headers: {
|
|
83
|
+
Authorization: '=Bearer {{$credentials.oauthTokenData.access_token}}',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
this.test = {
|
|
88
|
+
request: {
|
|
89
|
+
baseURL: '={{$credentials.portalUrl}}/_SRV/MCP',
|
|
90
|
+
url: '/mcp',
|
|
91
|
+
method: 'POST',
|
|
92
|
+
body: {
|
|
93
|
+
jsonrpc: '2.0',
|
|
94
|
+
method: 'tools/call',
|
|
95
|
+
params: {
|
|
96
|
+
name: 'ctera_portal_who_am_i',
|
|
97
|
+
arguments: {},
|
|
98
|
+
},
|
|
99
|
+
id: 1,
|
|
100
|
+
},
|
|
101
|
+
skipSslCertificateValidation: '={{$credentials.allowUnauthorizedCerts}}',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.CteraPortalOAuth2Api = CteraPortalOAuth2Api;
|
|
@@ -53,6 +53,11 @@ class CteraAi {
|
|
|
53
53
|
value: 'search',
|
|
54
54
|
description: 'Retrieve raw text chunks for Retrieval-Augmented Generation',
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
name: 'File Search (Files & Metadata)',
|
|
58
|
+
value: 'fileSearch',
|
|
59
|
+
description: 'Search files and return metadata with optional snippets',
|
|
60
|
+
},
|
|
56
61
|
{
|
|
57
62
|
name: 'Chat (Generative Answer)',
|
|
58
63
|
value: 'chat',
|
|
@@ -130,6 +135,80 @@ class CteraAi {
|
|
|
130
135
|
},
|
|
131
136
|
],
|
|
132
137
|
},
|
|
138
|
+
{
|
|
139
|
+
displayName: 'File Search Options',
|
|
140
|
+
name: 'fileSearchOptions',
|
|
141
|
+
type: 'collection',
|
|
142
|
+
placeholder: 'Add Option',
|
|
143
|
+
default: {},
|
|
144
|
+
displayOptions: {
|
|
145
|
+
show: {
|
|
146
|
+
operation: ['fileSearch'],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
options: [
|
|
150
|
+
{
|
|
151
|
+
displayName: 'Limit',
|
|
152
|
+
name: 'limit',
|
|
153
|
+
type: 'number',
|
|
154
|
+
default: 100,
|
|
155
|
+
description: 'Maximum number of results to return',
|
|
156
|
+
typeOptions: {
|
|
157
|
+
minValue: 1,
|
|
158
|
+
maxValue: 250,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
displayName: 'Offset',
|
|
163
|
+
name: 'offset',
|
|
164
|
+
type: 'number',
|
|
165
|
+
default: 0,
|
|
166
|
+
description: 'Pagination offset',
|
|
167
|
+
typeOptions: {
|
|
168
|
+
minValue: 0,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Sort By',
|
|
173
|
+
name: 'sort_by',
|
|
174
|
+
type: 'options',
|
|
175
|
+
options: [
|
|
176
|
+
{
|
|
177
|
+
name: 'Relevance',
|
|
178
|
+
value: 'relevance',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'Modified Date',
|
|
182
|
+
value: 'modified_at',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'Created Date',
|
|
186
|
+
value: 'created_at',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'Name',
|
|
190
|
+
value: 'name',
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
default: 'relevance',
|
|
194
|
+
description: 'Sort order for results',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
displayName: 'Include Snippet',
|
|
198
|
+
name: 'include_snippet',
|
|
199
|
+
type: 'boolean',
|
|
200
|
+
default: false,
|
|
201
|
+
description: 'Whether to return text snippet per file',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
displayName: 'Include Markdown',
|
|
205
|
+
name: 'include_markdown',
|
|
206
|
+
type: 'boolean',
|
|
207
|
+
default: false,
|
|
208
|
+
description: 'Whether to return full markdown body per file',
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
133
212
|
],
|
|
134
213
|
};
|
|
135
214
|
}
|
|
@@ -170,6 +249,28 @@ class CteraAi {
|
|
|
170
249
|
params.window_size = additionalOptions.window_size;
|
|
171
250
|
}
|
|
172
251
|
}
|
|
252
|
+
else if (operation === 'fileSearch') {
|
|
253
|
+
toolName = 'expert_file_search';
|
|
254
|
+
serverUrl = this.getNodeParameter('expertEndpointUrl', i);
|
|
255
|
+
const query = this.getNodeParameter('query', i);
|
|
256
|
+
const fileSearchOptions = this.getNodeParameter('fileSearchOptions', i, {});
|
|
257
|
+
params.query = query;
|
|
258
|
+
if (fileSearchOptions.limit !== undefined) {
|
|
259
|
+
params.limit = fileSearchOptions.limit;
|
|
260
|
+
}
|
|
261
|
+
if (fileSearchOptions.offset !== undefined) {
|
|
262
|
+
params.offset = fileSearchOptions.offset;
|
|
263
|
+
}
|
|
264
|
+
if (fileSearchOptions.sort_by) {
|
|
265
|
+
params.sort_by = fileSearchOptions.sort_by;
|
|
266
|
+
}
|
|
267
|
+
if (fileSearchOptions.include_snippet !== undefined) {
|
|
268
|
+
params.include_snippet = fileSearchOptions.include_snippet;
|
|
269
|
+
}
|
|
270
|
+
if (fileSearchOptions.include_markdown !== undefined) {
|
|
271
|
+
params.include_markdown = fileSearchOptions.include_markdown;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
173
274
|
else if (operation === 'chat') {
|
|
174
275
|
toolName = 'expert_chat';
|
|
175
276
|
serverUrl = this.getNodeParameter('expertEndpointUrl', i);
|
|
@@ -230,15 +331,69 @@ class CteraAi {
|
|
|
230
331
|
else {
|
|
231
332
|
result = parsedResponse.result;
|
|
232
333
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
334
|
+
// Handle fileSearch with fan-out pattern - each hit becomes a separate item
|
|
335
|
+
if (operation === 'fileSearch' && result && result.hits && Array.isArray(result.hits)) {
|
|
336
|
+
// Map snake_case to camelCase for n8n conventions
|
|
337
|
+
for (const hit of result.hits) {
|
|
338
|
+
returnData.push({
|
|
339
|
+
json: {
|
|
340
|
+
...items[i].json,
|
|
341
|
+
operation,
|
|
342
|
+
toolName,
|
|
343
|
+
// Map to camelCase field names
|
|
344
|
+
fileId: hit.id,
|
|
345
|
+
name: hit.name,
|
|
346
|
+
path: hit.path,
|
|
347
|
+
sizeBytes: hit.size_bytes,
|
|
348
|
+
mimeType: hit.mime_type,
|
|
349
|
+
createdAt: hit.created_at,
|
|
350
|
+
modifiedAt: hit.modified_at,
|
|
351
|
+
storageSystem: hit.storage_system,
|
|
352
|
+
bucketOrShare: hit.bucket_or_share,
|
|
353
|
+
score: hit.score,
|
|
354
|
+
standardMetadata: hit.standard_metadata,
|
|
355
|
+
customMetadata: hit.custom_metadata,
|
|
356
|
+
snippet: hit.snippet,
|
|
357
|
+
markdownBody: hit.markdown_body,
|
|
358
|
+
// Include pagination info from response
|
|
359
|
+
_meta: {
|
|
360
|
+
total: result.total,
|
|
361
|
+
limit: result.limit,
|
|
362
|
+
offset: result.offset,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
pairedItem: { item: i },
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
// If no hits, still return an item indicating empty results
|
|
369
|
+
if (result.hits.length === 0) {
|
|
370
|
+
returnData.push({
|
|
371
|
+
json: {
|
|
372
|
+
...items[i].json,
|
|
373
|
+
operation,
|
|
374
|
+
toolName,
|
|
375
|
+
result: [],
|
|
376
|
+
_meta: {
|
|
377
|
+
total: result.total || 0,
|
|
378
|
+
limit: result.limit || 0,
|
|
379
|
+
offset: result.offset || 0,
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
pairedItem: { item: i },
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
returnData.push({
|
|
388
|
+
json: {
|
|
389
|
+
...items[i].json,
|
|
390
|
+
operation,
|
|
391
|
+
toolName,
|
|
392
|
+
result,
|
|
393
|
+
},
|
|
394
|
+
pairedItem: { item: i },
|
|
395
|
+
});
|
|
396
|
+
}
|
|
242
397
|
}
|
|
243
398
|
catch (error) {
|
|
244
399
|
if (this.continueOnFail()) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g clip-path="url(#ub91fxv4ea)" transform="scale(1.15) translate(-1.8, -1.8)">
|
|
3
|
-
<path d="M20 0H4a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4z" fill="#4F5CE5"/>
|
|
4
|
-
<path d="M20.373 15.297a8.941 8.941 0 0 1-2.01 3.066A8.98 8.98 0 0 1 12 21a8.883 8.883 0 0 1-3.297-.627 8.942 8.942 0 0 1-3.066-2.01A8.981 8.981 0 0 1 3 12c0-1.163.22-2.277.627-3.297a8.943 8.943 0 0 1 2.01-3.066A8.982 8.982 0 0 1 12 3c1.163 0 2.277.22 3.297.627a8.943 8.943 0 0 1 3.066 2.01l-1.65 1.65A6.668 6.668 0 0 0 12 5.333a6.663 6.663 0 0 0-4.713 1.953A6.668 6.668 0 0 0 5.333 12a6.664 6.664 0 0 0 1.953 4.713A6.668 6.668 0 0 0 12 18.667a6.662 6.662 0 0 0 4.713-1.953 6.667 6.667 0 0 0 1.49-2.27l2.17.853z" fill="#fff" stroke="#4F5CE5" stroke-width=".667" stroke-miterlimit="10"/>
|
|
5
|
-
<path d="M18.203 14.443a6.668 6.668 0 0 1-3.543 3.67 6.608 6.608 0 0 1-2.66.554 6.669 6.669 0 0 1-6.113-4.007A6.607 6.607 0 0 1 5.333 12 6.668 6.668 0 0 1 9.34 5.887 6.607 6.607 0 0 1 12 5.333a6.667 6.667 0 0 1 4.713 1.953L14.71 9.29A3.818 3.818 0 0 0 12 8.167c-.543 0-1.06.113-1.53.316A3.85 3.85 0 0 0 8.167 12c0 .543.113 1.06.316 1.53a3.847 3.847 0 0 0 5.047 1.987 3.848 3.848 0 0 0 2.037-2.114l2.636 1.04z" fill="#fff" stroke="#4F5CE5" stroke-width=".667" stroke-miterlimit="10"/>
|
|
6
|
-
<path d="M13.874 12c0 .13-.08.247-.204.292l-1.006.372-.37 1.007a.31.31 0 0 1-.584 0l-.373-1.007-1.007-.371a.31.31 0 0 1 0-.583l1.007-.373.37-1.008a.31.31 0 0 1 .584 0l.373 1.008 1.007.37a.308.308 0 0 1 .203.293z" fill="#fff"/>
|
|
7
|
-
</g>
|
|
8
|
-
<defs>
|
|
9
|
-
<clipPath id="ub91fxv4ea">
|
|
10
|
-
<path fill="#fff" d="M0 0h24v24H0z"/>
|
|
11
|
-
</clipPath>
|
|
12
|
-
</defs>
|
|
13
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#ub91fxv4ea)" transform="scale(1.15) translate(-1.8, -1.8)">
|
|
3
|
+
<path d="M20 0H4a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4z" fill="#4F5CE5"/>
|
|
4
|
+
<path d="M20.373 15.297a8.941 8.941 0 0 1-2.01 3.066A8.98 8.98 0 0 1 12 21a8.883 8.883 0 0 1-3.297-.627 8.942 8.942 0 0 1-3.066-2.01A8.981 8.981 0 0 1 3 12c0-1.163.22-2.277.627-3.297a8.943 8.943 0 0 1 2.01-3.066A8.982 8.982 0 0 1 12 3c1.163 0 2.277.22 3.297.627a8.943 8.943 0 0 1 3.066 2.01l-1.65 1.65A6.668 6.668 0 0 0 12 5.333a6.663 6.663 0 0 0-4.713 1.953A6.668 6.668 0 0 0 5.333 12a6.664 6.664 0 0 0 1.953 4.713A6.668 6.668 0 0 0 12 18.667a6.662 6.662 0 0 0 4.713-1.953 6.667 6.667 0 0 0 1.49-2.27l2.17.853z" fill="#fff" stroke="#4F5CE5" stroke-width=".667" stroke-miterlimit="10"/>
|
|
5
|
+
<path d="M18.203 14.443a6.668 6.668 0 0 1-3.543 3.67 6.608 6.608 0 0 1-2.66.554 6.669 6.669 0 0 1-6.113-4.007A6.607 6.607 0 0 1 5.333 12 6.668 6.668 0 0 1 9.34 5.887 6.607 6.607 0 0 1 12 5.333a6.667 6.667 0 0 1 4.713 1.953L14.71 9.29A3.818 3.818 0 0 0 12 8.167c-.543 0-1.06.113-1.53.316A3.85 3.85 0 0 0 8.167 12c0 .543.113 1.06.316 1.53a3.847 3.847 0 0 0 5.047 1.987 3.848 3.848 0 0 0 2.037-2.114l2.636 1.04z" fill="#fff" stroke="#4F5CE5" stroke-width=".667" stroke-miterlimit="10"/>
|
|
6
|
+
<path d="M13.874 12c0 .13-.08.247-.204.292l-1.006.372-.37 1.007a.31.31 0 0 1-.584 0l-.373-1.007-1.007-.371a.31.31 0 0 1 0-.583l1.007-.373.37-1.008a.31.31 0 0 1 .584 0l.373 1.008 1.007.37a.308.308 0 0 1 .203.293z" fill="#fff"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="ub91fxv4ea">
|
|
10
|
+
<path fill="#fff" d="M0 0h24v24H0z"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class CteraFilesystem implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|