n8n-nodes-couchbase 1.0.0 → 1.1.1
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/README.md +9 -103
- package/dist/nodes/Couchbase/Couchbase.node.d.ts +6 -27
- package/dist/nodes/Couchbase/Couchbase.node.js +31 -138
- package/dist/nodes/Couchbase/Couchbase.node.js.map +1 -1
- package/dist/nodes/Couchbase/Couchbase.node.json +3 -3
- package/dist/nodes/Couchbase/CouchbaseProperties.js +53 -20
- package/dist/nodes/Couchbase/CouchbaseProperties.js.map +1 -1
- package/dist/nodes/icons/couchbase.dark.svg +14 -0
- package/dist/nodes/icons/couchbase.svg +14 -0
- package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.d.ts +16 -0
- package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.js +337 -0
- package/dist/nodes/vector_store/VectorStoreCouchbaseSearch/VectorStoreCouchbaseSearch.node.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/processDocuments.d.ts +0 -9
- package/dist/nodes/vector_store/shared/processDocuments.js +6 -24
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
- package/dist/package.json +14 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/couchbase/connectToCouchbase.d.ts +5 -0
- package/dist/utils/couchbase/connectToCouchbase.js +70 -0
- package/dist/utils/couchbase/connectToCouchbase.js.map +1 -0
- package/dist/utils/couchbase/populateCouchbaseRLs.d.ts +25 -0
- package/dist/utils/couchbase/populateCouchbaseRLs.js +121 -0
- package/dist/utils/couchbase/populateCouchbaseRLs.js.map +1 -0
- package/dist/utils/couchbase/validateBucketScopeCollection.d.ts +2 -0
- package/dist/utils/couchbase/validateBucketScopeCollection.js +53 -0
- package/dist/utils/couchbase/validateBucketScopeCollection.js.map +1 -0
- package/dist/utils/helpers.d.ts +1 -14
- package/dist/utils/helpers.js +0 -111
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/logWrapper.d.ts +1 -8
- package/dist/utils/logWrapper.js +0 -12
- package/dist/utils/logWrapper.js.map +1 -1
- package/dist/utils/sharedFields.js.map +1 -1
- package/package.json +14 -6
- package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +0 -8
- package/dist/credentials/ExampleCredentialsApi.credentials.js +0 -46
- package/dist/credentials/ExampleCredentialsApi.credentials.js.map +0 -1
- package/dist/credentials/HttpBinApi.credentials.d.ts +0 -9
- package/dist/credentials/HttpBinApi.credentials.js +0 -43
- package/dist/credentials/HttpBinApi.credentials.js.map +0 -1
- package/dist/nodes/Couchbase/CBLogomark.svg +0 -350
- package/dist/nodes/ExampleNode/ExampleNode.node.d.ts +0 -5
- package/dist/nodes/ExampleNode/ExampleNode.node.js +0 -59
- package/dist/nodes/ExampleNode/ExampleNode.node.js.map +0 -1
- package/dist/nodes/HttpBin/HttpBin.node.d.ts +0 -4
- package/dist/nodes/HttpBin/HttpBin.node.js +0 -55
- package/dist/nodes/HttpBin/HttpBin.node.js.map +0 -1
- package/dist/nodes/HttpBin/HttpBin.node.json +0 -18
- package/dist/nodes/HttpBin/HttpVerbDescription.d.ts +0 -3
- package/dist/nodes/HttpBin/HttpVerbDescription.js +0 -236
- package/dist/nodes/HttpBin/HttpVerbDescription.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreCouchbase/VectorStoreCouchbase.node.d.ts +0 -16
- package/dist/nodes/vector_store/VectorStoreCouchbase/VectorStoreCouchbase.node.js +0 -407
- package/dist/nodes/vector_store/VectorStoreCouchbase/VectorStoreCouchbase.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreCouchbase/couchbase.svg +0 -350
- package/dist/nodes/vector_store/VectorStoreCouchbase/mongodb.dark.svg +0 -3
- package/dist/nodes/vector_store/VectorStoreCouchbase/mongodb.svg +0 -3
- package/dist/nodes/vector_store/shared/createVectorStoreNode/__tests__/utils.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/__tests__/utils.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/__tests__/utils.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/insertOperation.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/insertOperation.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/insertOperation.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/loadOperation.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/loadOperation.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/loadOperation.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/operationHandlers.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/operationHandlers.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/operationHandlers.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveAsToolOperation.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveAsToolOperation.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveAsToolOperation.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveOperation.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveOperation.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/retrieveOperation.test.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/updateOperation.test.d.ts +0 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/updateOperation.test.js +0 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/__tests__/updateOperation.test.js.map +0 -1
- package/dist/utils/N8nTool.d.ts +0 -10
- package/dist/utils/N8nTool.js +0 -86
- package/dist/utils/N8nTool.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
# n8n-nodes-couchbase
|
|
2
2
|
|
|
3
|
-
This is
|
|
3
|
+
This is a collection of n8n community nodes for using Couchbase services within n8n workflows.
|
|
4
4
|
|
|
5
|
-
Couchbase is a distributed NoSQL cloud database that offers the robustness of a relational database with the flexibility of a JSON document database, featuring key-value operations, SQL++ querying, and powerful search capabilities.
|
|
5
|
+
Couchbase is a distributed NoSQL cloud database that offers the robustness of a relational database with the flexibility of a JSON document database, featuring key-value operations, SQL++ querying, and powerful search capabilities including vector search.
|
|
6
6
|
|
|
7
7
|
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
8
8
|
|
|
9
|
-
[
|
|
10
|
-
[
|
|
9
|
+
[Nodes](#nodes)
|
|
10
|
+
[Installation](#installation)
|
|
11
11
|
[Credentials](#credentials)
|
|
12
12
|
[Compatibility](#compatibility)
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
## Nodes
|
|
15
|
+
Click on the node name to view its detailed documentation.
|
|
16
|
+
- [**Couchbase**](nodes/Couchbase/README.md): This node allows you to perform operations on The Couchbase KV, Query, and Search services. It supports creating, reading, updating, and deleting documents, as well as executing SQL++ queries and full-text searches.
|
|
17
|
+
- [**Couchbase Search Vector Store**](nodes/vector_store/VectorStoreCouchbaseSearch/README.md): This node allows you to perform vector search operations using the Couchbase Search Service. It supports retrieving, updating, and inserting documents in a vector database, as well as using the vector store as a tool for AI agents.
|
|
15
18
|
|
|
16
19
|
## Installation
|
|
17
20
|
|
|
18
21
|
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
19
22
|
|
|
20
|
-
## Operations
|
|
21
|
-
|
|
22
|
-
The Couchbase node supports operations across two main resources:
|
|
23
|
-
|
|
24
|
-
### Document & Key-Value Operations
|
|
25
|
-
- **Create**: Insert a document with a specified or auto-generated ID
|
|
26
|
-
- **Query**: Execute SQL++ queries to retrieve or manipulate documents
|
|
27
|
-
- **Read**: Retrieve a document by its ID
|
|
28
|
-
- **Upsert**: Modify an existing document identified by its ID, or create a new one if it does not exist
|
|
29
|
-
- **Delete**: Remove a document by its ID
|
|
30
|
-
|
|
31
|
-
### Search Operations
|
|
32
|
-
- **Create Index**: Create a new search index
|
|
33
|
-
- **Search & Retrieve**: Perform full-text search with multiple options:
|
|
34
|
-
- Basic search with query, fields, and limit
|
|
35
|
-
- Advanced mode with raw JSON query capabilities
|
|
36
|
-
|
|
37
23
|
## Credentials
|
|
38
24
|
|
|
39
25
|
To use the Couchbase node, you'll need to set up Couchbase credentials in n8n:
|
|
@@ -52,83 +38,3 @@ To use the Couchbase node, you'll need to set up Couchbase credentials in n8n:
|
|
|
52
38
|
|
|
53
39
|
This node has been tested with n8n version 1.86.0.
|
|
54
40
|
|
|
55
|
-
## Usage
|
|
56
|
-
|
|
57
|
-
### Document Operations
|
|
58
|
-
|
|
59
|
-
#### Creating Documents
|
|
60
|
-
1. Select the **Document & Key-Value** resource
|
|
61
|
-
2. Choose the **Create** operation
|
|
62
|
-
3. Select your target bucket, scope, and collection
|
|
63
|
-
4. You can either:
|
|
64
|
-
- Use a generated UUID for your document
|
|
65
|
-
- Specify your own document ID
|
|
66
|
-
5. Enter your document content in JSON format
|
|
67
|
-
|
|
68
|
-
#### Reading Documents
|
|
69
|
-
1. Select the **Document & Key-Value** resource
|
|
70
|
-
2. Choose the **Read** operation
|
|
71
|
-
3. Select your target bucket, scope, and collection
|
|
72
|
-
4. Enter the document ID to retrieve
|
|
73
|
-
5. The node will return the document content if found
|
|
74
|
-
|
|
75
|
-
#### Upserting Documents
|
|
76
|
-
1. Select the **Document & Key-Value** resource
|
|
77
|
-
2. Choose the **Upsert** operation
|
|
78
|
-
3. Select your target bucket, scope, and collection
|
|
79
|
-
4. Enter the document ID
|
|
80
|
-
5. Provide the new JSON document content
|
|
81
|
-
6. The document will be created if it doesn't exist, or updated if it does
|
|
82
|
-
|
|
83
|
-
#### Deleting Documents
|
|
84
|
-
1. Select the **Document & Key-Value** resource
|
|
85
|
-
2. Choose the **Delete** operation
|
|
86
|
-
3. Select your target bucket, scope, and collection
|
|
87
|
-
4. Enter the document ID to delete
|
|
88
|
-
5. The node will remove the document from the collection
|
|
89
|
-
|
|
90
|
-
#### Querying Documents with SQL++
|
|
91
|
-
1. Select the **Document & Key-Value** resource
|
|
92
|
-
2. Choose the **Query** operation
|
|
93
|
-
3. Optionally select a bucket and scope context
|
|
94
|
-
4. Enter your SQL++ query
|
|
95
|
-
```sql
|
|
96
|
-
SELECT * FROM `travel-sample`.inventory.hotel WHERE country = "United States"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Search Operations
|
|
100
|
-
|
|
101
|
-
#### Full-Text Search
|
|
102
|
-
1. Select the **Search** resource
|
|
103
|
-
2. Choose the **Search & Retrieve** operation
|
|
104
|
-
3. Enter the index name (format: `bucket.scope.index-name`)
|
|
105
|
-
4. Enter your search query
|
|
106
|
-
5. Configure optional parameters:
|
|
107
|
-
- Fields to return (comma-separated)
|
|
108
|
-
- Results limit
|
|
109
|
-
- Include term locations option
|
|
110
|
-
|
|
111
|
-
#### Advanced Search
|
|
112
|
-
1. Enable **Advanced Mode**
|
|
113
|
-
2. Enter a raw JSON query for more complex search requirements:
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"query": {
|
|
117
|
-
"match": "California"
|
|
118
|
-
},
|
|
119
|
-
"size": 5,
|
|
120
|
-
"from": 0
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
#### Creating Search Indexes
|
|
125
|
-
1. Select the **Search** resource
|
|
126
|
-
2. Choose the **Create Index** operation
|
|
127
|
-
3. Enter the index definition as a JSON object
|
|
128
|
-
|
|
129
|
-
## Resources
|
|
130
|
-
|
|
131
|
-
* [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
132
|
-
* [Couchbase Documentation](https://docs.couchbase.com/)
|
|
133
|
-
* [Couchbase Node.js SDK](https://docs.couchbase.com/nodejs-sdk/current/hello-world/start-using-sdk.html)
|
|
134
|
-
* [Couchbase Search Service](https://docs.couchbase.com/server/current/search/search-intro.html)
|
|
@@ -1,35 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
results: {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}[];
|
|
7
|
-
}>;
|
|
8
|
-
declare function couchbaseScopeSearch(this: ILoadOptionsFunctions): Promise<{
|
|
9
|
-
results: {
|
|
10
|
-
name: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}[];
|
|
13
|
-
}>;
|
|
14
|
-
declare function couchbaseCollectionSearch(this: ILoadOptionsFunctions): Promise<{
|
|
15
|
-
results: {
|
|
16
|
-
name: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}[];
|
|
19
|
-
}>;
|
|
20
|
-
declare function couchbaseCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import { populateCouchbaseBucketRL, populateCouchbaseCollectionRL, populateCouchbaseScopeRL, populateCouchbaseSearchIndexesRL } from '../../utils/couchbase/populateCouchbaseRLs';
|
|
21
3
|
export declare class Couchbase implements INodeType {
|
|
22
4
|
description: INodeTypeDescription;
|
|
23
5
|
methods: {
|
|
24
|
-
credentialTest: {
|
|
25
|
-
couchbaseCredentialTest: typeof couchbaseCredentialTest;
|
|
26
|
-
};
|
|
27
6
|
listSearch: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
populateCouchbaseBucketRL: typeof populateCouchbaseBucketRL;
|
|
8
|
+
populateCouchbaseScopeRL: typeof populateCouchbaseScopeRL;
|
|
9
|
+
populateCouchbaseCollectionRL: typeof populateCouchbaseCollectionRL;
|
|
10
|
+
populateCouchbaseSearchIndexesRL: typeof populateCouchbaseSearchIndexesRL;
|
|
31
11
|
};
|
|
32
12
|
};
|
|
33
13
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
34
14
|
}
|
|
35
|
-
export {};
|
|
@@ -28,37 +28,9 @@ const n8n_workflow_1 = require("n8n-workflow");
|
|
|
28
28
|
const couchbase_1 = require("couchbase");
|
|
29
29
|
const uuid = __importStar(require("uuid"));
|
|
30
30
|
const CouchbaseProperties_1 = require("./CouchbaseProperties");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const username = credentials.couchbaseUsername;
|
|
35
|
-
const password = credentials.couchbasePassword;
|
|
36
|
-
const selectedBucket = context.getNodeParameter('couchbaseBucket', 0, '');
|
|
37
|
-
const selectedScope = context.getNodeParameter('couchbaseScope', 0, '');
|
|
38
|
-
const selectedCollection = context.getNodeParameter('couchbaseCollection', 0, '');
|
|
39
|
-
let cluster;
|
|
40
|
-
let collection = {};
|
|
41
|
-
try {
|
|
42
|
-
cluster = await (0, couchbase_1.connect)(connectionString, {
|
|
43
|
-
username: username,
|
|
44
|
-
password: password,
|
|
45
|
-
configProfile: 'wanDevelopment',
|
|
46
|
-
});
|
|
47
|
-
if (typeof selectedBucket.value === 'string' &&
|
|
48
|
-
typeof selectedScope.value === 'string' &&
|
|
49
|
-
typeof selectedCollection.value === 'string') {
|
|
50
|
-
const bucket = cluster.bucket(selectedBucket.value);
|
|
51
|
-
collection = bucket.scope(selectedScope.value).collection(selectedCollection.value);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
if (error instanceof couchbase_1.UnambiguousTimeoutError) {
|
|
56
|
-
throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Could not connect to database: ${error.message}. Be sure the database exists, is turned on, and the connection string is correct.`);
|
|
57
|
-
}
|
|
58
|
-
throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Could not connect to database: ${error.message}`);
|
|
59
|
-
}
|
|
60
|
-
return { cluster, collection };
|
|
61
|
-
}
|
|
31
|
+
const populateCouchbaseRLs_1 = require("../../utils/couchbase/populateCouchbaseRLs");
|
|
32
|
+
const connectToCouchbase_1 = require("../../utils/couchbase/connectToCouchbase");
|
|
33
|
+
const validateBucketScopeCollection_1 = require("../../utils/couchbase/validateBucketScopeCollection");
|
|
62
34
|
function processSearchResults(rows) {
|
|
63
35
|
const processedData = rows.map((row) => Object.fromEntries(Object.entries(row).filter(([_, v]) => v !== undefined && !(v && typeof v === 'object' && Object.keys(v).length === 0))));
|
|
64
36
|
return processedData.length > 0 ? processedData : [{ message: 'No results found' }];
|
|
@@ -72,118 +44,31 @@ function transformRawJsonQueryToValidSearchOptions(rawJsonQuery) {
|
|
|
72
44
|
raw: { ...topLevelFields },
|
|
73
45
|
};
|
|
74
46
|
}
|
|
75
|
-
async function
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
for (const bucket of buckets) {
|
|
81
|
-
allBuckets.push({
|
|
82
|
-
name: `${bucket.name}`,
|
|
83
|
-
value: `${bucket.name}`,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return { results: allBuckets };
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Error: ${error.message}`);
|
|
90
|
-
}
|
|
91
|
-
finally {
|
|
92
|
-
await cluster.close();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
async function couchbaseScopeSearch() {
|
|
96
|
-
const selectedBucket = this.getNodeParameter('couchbaseBucket');
|
|
97
|
-
if (!selectedBucket || !selectedBucket.value) {
|
|
98
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please select a bucket.`);
|
|
99
|
-
}
|
|
100
|
-
const { cluster } = await connectToCouchbase(this);
|
|
47
|
+
async function getCollection(context, cluster) {
|
|
48
|
+
const couchbaseBucketName = context.getNodeParameter('couchbaseBucket', 0, '');
|
|
49
|
+
const couchbaseScopeName = context.getNodeParameter('couchbaseScope', 0, '');
|
|
50
|
+
const couchbaseCollectionName = context.getNodeParameter('couchbaseCollection', 0, '');
|
|
51
|
+
await (0, validateBucketScopeCollection_1.validateBucketScopeCollection)(context, couchbaseBucketName.value, couchbaseScopeName.value, couchbaseCollectionName.value);
|
|
101
52
|
try {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
for (const scope of scopes) {
|
|
107
|
-
allScopes.push({
|
|
108
|
-
name: `${scope.name}`,
|
|
109
|
-
value: `${scope.name}`,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return { results: allScopes };
|
|
53
|
+
return cluster
|
|
54
|
+
.bucket(couchbaseBucketName.value)
|
|
55
|
+
.scope(couchbaseScopeName.value)
|
|
56
|
+
.collection(couchbaseCollectionName.value);
|
|
113
57
|
}
|
|
114
58
|
catch (error) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Error: ${error.message}`);
|
|
119
|
-
}
|
|
120
|
-
finally {
|
|
121
|
-
await cluster.close();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async function couchbaseCollectionSearch() {
|
|
125
|
-
const { cluster } = await connectToCouchbase(this);
|
|
126
|
-
const selectedBucket = this.getNodeParameter('couchbaseBucket');
|
|
127
|
-
const selectedScope = this.getNodeParameter('couchbaseScope');
|
|
128
|
-
if (!selectedBucket || !selectedBucket.value || !selectedScope || !selectedScope.value) {
|
|
129
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Please select a bucket and scope.');
|
|
130
|
-
}
|
|
131
|
-
try {
|
|
132
|
-
const bucketName = selectedBucket.value;
|
|
133
|
-
const bucket = cluster.bucket(bucketName);
|
|
134
|
-
const bucketManager = bucket.collections();
|
|
135
|
-
const scopes = await bucketManager.getAllScopes();
|
|
136
|
-
const filteredScopes = scopes.filter((scope) => scope.name === selectedScope.value);
|
|
137
|
-
if (filteredScopes.length === 0) {
|
|
138
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Scope "${selectedScope.value}" not found in bucket "${bucketName}".`);
|
|
139
|
-
}
|
|
140
|
-
const allCollections = [];
|
|
141
|
-
for (const scope of filteredScopes) {
|
|
142
|
-
for (const collection of scope.collections) {
|
|
143
|
-
allCollections.push({
|
|
144
|
-
name: `${collection.name}`,
|
|
145
|
-
value: `${collection.name}`,
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return { results: allCollections };
|
|
150
|
-
}
|
|
151
|
-
catch (error) {
|
|
152
|
-
if (error instanceof couchbase_1.BucketNotFoundError) {
|
|
153
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please select a bucket and scope.`);
|
|
154
|
-
}
|
|
155
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Error: ${error.message}`);
|
|
156
|
-
}
|
|
157
|
-
finally {
|
|
158
|
-
await cluster.close();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
async function couchbaseCredentialTest(credential) {
|
|
162
|
-
try {
|
|
163
|
-
const { cluster } = await connectToCouchbase(this);
|
|
164
|
-
const ping = await cluster.ping();
|
|
165
|
-
console.log(ping);
|
|
166
|
-
await cluster.close();
|
|
167
|
-
}
|
|
168
|
-
catch (error) {
|
|
169
|
-
return {
|
|
170
|
-
status: 'Error',
|
|
171
|
-
message: error.message,
|
|
172
|
-
};
|
|
59
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Could not access collection: ${error.message}.`, {
|
|
60
|
+
description: 'Please ensure the selected bucket, scope, and collection exist and the credentials have permissions.',
|
|
61
|
+
});
|
|
173
62
|
}
|
|
174
|
-
return {
|
|
175
|
-
status: 'OK',
|
|
176
|
-
message: 'Connection successful!',
|
|
177
|
-
};
|
|
178
63
|
}
|
|
179
64
|
class Couchbase {
|
|
180
65
|
constructor() {
|
|
181
66
|
this.description = {
|
|
182
67
|
displayName: 'Couchbase',
|
|
183
68
|
name: 'couchbase',
|
|
184
|
-
icon: { light: 'file
|
|
69
|
+
icon: { light: 'file:../icons/couchbase.svg', dark: 'file:../icons/couchbase.dark.svg' },
|
|
185
70
|
group: ['input'],
|
|
186
|
-
version: 1.0,
|
|
71
|
+
version: [1.0, 1.1],
|
|
187
72
|
subtitle: '={{$parameter["resource"] + ": " + $parameter["operation"]}}',
|
|
188
73
|
description: 'Couchbase node to insert, update, retrieve, and delete data from a Couchbase database using KV, Query and Search services',
|
|
189
74
|
defaults: {
|
|
@@ -195,19 +80,22 @@ class Couchbase {
|
|
|
195
80
|
{
|
|
196
81
|
name: 'couchbaseApi',
|
|
197
82
|
required: true,
|
|
198
|
-
testedBy: 'couchbaseCredentialTest',
|
|
199
83
|
},
|
|
200
84
|
],
|
|
201
85
|
properties: CouchbaseProperties_1.nodeProperties,
|
|
202
86
|
};
|
|
203
87
|
this.methods = {
|
|
204
|
-
|
|
205
|
-
|
|
88
|
+
listSearch: {
|
|
89
|
+
populateCouchbaseBucketRL: populateCouchbaseRLs_1.populateCouchbaseBucketRL,
|
|
90
|
+
populateCouchbaseScopeRL: populateCouchbaseRLs_1.populateCouchbaseScopeRL,
|
|
91
|
+
populateCouchbaseCollectionRL: populateCouchbaseRLs_1.populateCouchbaseCollectionRL,
|
|
92
|
+
populateCouchbaseSearchIndexesRL: populateCouchbaseRLs_1.populateCouchbaseSearchIndexesRL,
|
|
93
|
+
},
|
|
206
94
|
};
|
|
207
95
|
}
|
|
208
96
|
async execute() {
|
|
209
97
|
const operation = this.getNodeParameter('operation', 0);
|
|
210
|
-
const { cluster
|
|
98
|
+
const { cluster } = await (0, connectToCouchbase_1.connectToCouchbase)(this);
|
|
211
99
|
const returnItems = [];
|
|
212
100
|
let responseData = [];
|
|
213
101
|
if (operation === CouchbaseProperties_1.DOCUMENT_OPS.CREATE) {
|
|
@@ -221,22 +109,26 @@ class Couchbase {
|
|
|
221
109
|
const specifiedDocumentId = this.getNodeParameter('documentId', 0, '');
|
|
222
110
|
id = specifiedDocumentId.trim();
|
|
223
111
|
}
|
|
112
|
+
const collection = await getCollection(this, cluster);
|
|
224
113
|
await collection.insert(id, documentToInsert);
|
|
225
114
|
responseData = [{ id: id, value: documentToInsert }];
|
|
226
115
|
}
|
|
227
116
|
else if (operation === CouchbaseProperties_1.DOCUMENT_OPS.UPSERT) {
|
|
228
117
|
const newDocumentValue = this.getNodeParameter('documentValue', 0, '');
|
|
229
118
|
const id = this.getNodeParameter('documentId', 0, '');
|
|
119
|
+
const collection = await getCollection(this, cluster);
|
|
230
120
|
await collection.upsert(id, newDocumentValue);
|
|
231
121
|
responseData = [{ id, value: newDocumentValue }];
|
|
232
122
|
}
|
|
233
123
|
else if (operation === CouchbaseProperties_1.DOCUMENT_OPS.DELETE) {
|
|
234
124
|
const documentId = this.getNodeParameter('documentId', 0, '');
|
|
125
|
+
const collection = await getCollection(this, cluster);
|
|
235
126
|
const removeResult = await collection.remove(documentId);
|
|
236
127
|
responseData = [{ id: documentId, value: removeResult }];
|
|
237
128
|
}
|
|
238
129
|
else if (operation === CouchbaseProperties_1.DOCUMENT_OPS.READ) {
|
|
239
130
|
const documentId = this.getNodeParameter('documentId', 0, '');
|
|
131
|
+
const collection = await getCollection(this, cluster);
|
|
240
132
|
const getResult = await collection.get(documentId);
|
|
241
133
|
const responseJson = JSON.stringify(getResult.content);
|
|
242
134
|
responseData = [{ id: documentId, value: responseJson }];
|
|
@@ -257,7 +149,9 @@ class Couchbase {
|
|
|
257
149
|
}
|
|
258
150
|
else if (operation === CouchbaseProperties_1.SEARCH_OPS.RETRIEVE) {
|
|
259
151
|
const isAdvancedMode = this.getNodeParameter('advancedMode', 0);
|
|
260
|
-
const indexName = this.getNodeParameter('indexName', 0
|
|
152
|
+
const indexName = this.getNodeParameter('indexName', 0, '', {
|
|
153
|
+
extractValue: true,
|
|
154
|
+
});
|
|
261
155
|
if (isAdvancedMode) {
|
|
262
156
|
const rawQuery = this.getNodeParameter('rawQuery', 0);
|
|
263
157
|
const transformedQuerySearchOptions = transformRawJsonQueryToValidSearchOptions(rawQuery);
|
|
@@ -286,7 +180,6 @@ class Couchbase {
|
|
|
286
180
|
await cluster.searchIndexes().upsertIndex(indexDefinition);
|
|
287
181
|
responseData = [{ message: 'Index created successfully' }];
|
|
288
182
|
}
|
|
289
|
-
await cluster.close();
|
|
290
183
|
const items = this.getInputData();
|
|
291
184
|
const itemData = generatePairedItemData(items.length);
|
|
292
185
|
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Couchbase.node.js","sourceRoot":"","sources":["../../../nodes/Couchbase/Couchbase.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAasB;AAEtB,yCA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|
|
7
7
|
"credentialDocumentation": [
|
|
8
8
|
{
|
|
9
|
-
"url": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase"
|
|
9
|
+
"url": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase?tab=readme-ov-file#credentials"
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
12
|
"primaryDocumentation": [
|
|
13
13
|
{
|
|
14
|
-
"url": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase"
|
|
14
|
+
"url": "https://github.com/Couchbase-Ecosystem/n8n-nodes-couchbase/blob/master/nodes/Couchbase/README.md"
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|
|
@@ -29,6 +29,7 @@ const createFieldWithVaryingRequirements = (displayName, name, type, groups) =>
|
|
|
29
29
|
displayOptions: showFor(group.conditions),
|
|
30
30
|
description: ((_a = group.options) === null || _a === void 0 ? void 0 : _a.description) || '',
|
|
31
31
|
placeholder: ((_b = group.options) === null || _b === void 0 ? void 0 : _b.placeholder) || '',
|
|
32
|
+
typeOptions: group.typeOptions || {},
|
|
32
33
|
default: ((_c = group.options) === null || _c === void 0 ? void 0 : _c.default) !== undefined ? group.options.default : '',
|
|
33
34
|
};
|
|
34
35
|
if (type === 'resourceLocator') {
|
|
@@ -166,17 +167,6 @@ exports.nodeProperties = [
|
|
|
166
167
|
default: SEARCH_TYPE_FULL_TEXT_VALUE,
|
|
167
168
|
description: 'Type of search to perform',
|
|
168
169
|
},
|
|
169
|
-
{
|
|
170
|
-
displayName: 'Advanced Mode',
|
|
171
|
-
name: 'advancedMode',
|
|
172
|
-
type: 'boolean',
|
|
173
|
-
displayOptions: showFor({
|
|
174
|
-
resource: RESOURCE.SEARCH,
|
|
175
|
-
operation: [exports.SEARCH_OPS.RETRIEVE],
|
|
176
|
-
}),
|
|
177
|
-
default: false,
|
|
178
|
-
description: 'Whether to use advanced mode to provide a raw JSON query',
|
|
179
|
-
},
|
|
180
170
|
...createFieldWithVaryingRequirements('Couchbase Bucket', 'couchbaseBucket', 'resourceLocator', [
|
|
181
171
|
{
|
|
182
172
|
conditions: {
|
|
@@ -198,7 +188,7 @@ exports.nodeProperties = [
|
|
|
198
188
|
name: 'list',
|
|
199
189
|
type: 'list',
|
|
200
190
|
typeOptions: {
|
|
201
|
-
searchListMethod: '
|
|
191
|
+
searchListMethod: 'populateCouchbaseBucketRL',
|
|
202
192
|
},
|
|
203
193
|
},
|
|
204
194
|
{
|
|
@@ -224,7 +214,7 @@ exports.nodeProperties = [
|
|
|
224
214
|
name: 'list',
|
|
225
215
|
type: 'list',
|
|
226
216
|
typeOptions: {
|
|
227
|
-
searchListMethod: '
|
|
217
|
+
searchListMethod: 'populateCouchbaseBucketRL',
|
|
228
218
|
},
|
|
229
219
|
},
|
|
230
220
|
{
|
|
@@ -251,13 +241,16 @@ exports.nodeProperties = [
|
|
|
251
241
|
options: {
|
|
252
242
|
description: 'The Couchbase scope to use',
|
|
253
243
|
},
|
|
244
|
+
typeOptions: {
|
|
245
|
+
loadOptionsDependsOn: ['couchbaseBucket.value'],
|
|
246
|
+
},
|
|
254
247
|
modes: [
|
|
255
248
|
{
|
|
256
249
|
displayName: 'From List',
|
|
257
250
|
name: 'list',
|
|
258
251
|
type: 'list',
|
|
259
252
|
typeOptions: {
|
|
260
|
-
searchListMethod: '
|
|
253
|
+
searchListMethod: 'populateCouchbaseScopeRL',
|
|
261
254
|
},
|
|
262
255
|
},
|
|
263
256
|
{
|
|
@@ -277,13 +270,16 @@ exports.nodeProperties = [
|
|
|
277
270
|
options: {
|
|
278
271
|
description: 'The Couchbase scope to use (optional for this operation)',
|
|
279
272
|
},
|
|
273
|
+
typeOptions: {
|
|
274
|
+
loadOptionsDependsOn: ['couchbaseBucket.value'],
|
|
275
|
+
},
|
|
280
276
|
modes: [
|
|
281
277
|
{
|
|
282
278
|
displayName: 'From List',
|
|
283
279
|
name: 'list',
|
|
284
280
|
type: 'list',
|
|
285
281
|
typeOptions: {
|
|
286
|
-
searchListMethod: '
|
|
282
|
+
searchListMethod: 'populateCouchbaseScopeRL',
|
|
287
283
|
},
|
|
288
284
|
},
|
|
289
285
|
{
|
|
@@ -305,13 +301,16 @@ exports.nodeProperties = [
|
|
|
305
301
|
resource: RESOURCE.DOCUMENT,
|
|
306
302
|
operation: [exports.DOCUMENT_OPS.CREATE, exports.DOCUMENT_OPS.READ, exports.DOCUMENT_OPS.UPSERT, exports.DOCUMENT_OPS.DELETE],
|
|
307
303
|
}),
|
|
304
|
+
typeOptions: {
|
|
305
|
+
loadOptionsDependsOn: ['couchbaseBucket.value', 'couchbaseScope.value'],
|
|
306
|
+
},
|
|
308
307
|
modes: [
|
|
309
308
|
{
|
|
310
309
|
displayName: 'From List',
|
|
311
310
|
name: 'list',
|
|
312
311
|
type: 'list',
|
|
313
312
|
typeOptions: {
|
|
314
|
-
searchListMethod: '
|
|
313
|
+
searchListMethod: 'populateCouchbaseCollectionRL',
|
|
315
314
|
},
|
|
316
315
|
},
|
|
317
316
|
{
|
|
@@ -396,15 +395,49 @@ exports.nodeProperties = [
|
|
|
396
395
|
{
|
|
397
396
|
displayName: 'Index Name',
|
|
398
397
|
name: 'indexName',
|
|
399
|
-
type: '
|
|
398
|
+
type: 'resourceLocator',
|
|
399
|
+
default: { mode: 'list', value: '' },
|
|
400
400
|
required: true,
|
|
401
|
+
description: 'The name of the search index to query',
|
|
402
|
+
typeOptions: {
|
|
403
|
+
loadOptionsDependsOn: [
|
|
404
|
+
'useScopedIndex',
|
|
405
|
+
'couchbaseBucket.value',
|
|
406
|
+
'couchbaseScope.value',
|
|
407
|
+
'couchbaseCollection.value',
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
displayOptions: showFor({
|
|
411
|
+
resource: RESOURCE.SEARCH,
|
|
412
|
+
operation: [exports.SEARCH_OPS.RETRIEVE],
|
|
413
|
+
}),
|
|
414
|
+
modes: [
|
|
415
|
+
{
|
|
416
|
+
displayName: 'From List',
|
|
417
|
+
name: 'list',
|
|
418
|
+
type: 'list',
|
|
419
|
+
typeOptions: {
|
|
420
|
+
searchListMethod: 'populateCouchbaseSearchIndexesRL',
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
displayName: 'Name',
|
|
425
|
+
name: 'name',
|
|
426
|
+
type: 'string',
|
|
427
|
+
placeholder: 'e.g. my_index',
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
displayName: 'Advanced Mode',
|
|
433
|
+
name: 'advancedMode',
|
|
434
|
+
type: 'boolean',
|
|
401
435
|
displayOptions: showFor({
|
|
402
436
|
resource: RESOURCE.SEARCH,
|
|
403
437
|
operation: [exports.SEARCH_OPS.RETRIEVE],
|
|
404
438
|
}),
|
|
405
|
-
default:
|
|
406
|
-
|
|
407
|
-
description: 'Name of the search index to query',
|
|
439
|
+
default: false,
|
|
440
|
+
description: 'Whether to use advanced mode to provide a raw JSON query',
|
|
408
441
|
},
|
|
409
442
|
{
|
|
410
443
|
displayName: 'Search Query',
|