@couleetech/n8n-nodes-enlightenedmsp 0.0.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 +124 -0
 - package/dist/credentials/BraveSearchApi.credentials.d.ts +9 -0
 - package/dist/credentials/BraveSearchApi.credentials.js +47 -0
 - package/dist/credentials/BraveSearchApi.credentials.js.map +1 -0
 - package/dist/credentials/EnlightenedMspApi.credentials.d.ts +8 -0
 - package/dist/credentials/EnlightenedMspApi.credentials.js +30 -0
 - package/dist/credentials/EnlightenedMspNats.credentials.d.ts +7 -0
 - package/dist/credentials/EnlightenedMspNats.credentials.js +47 -0
 - package/dist/credentials/McpClientApi.credentials.d.ts +7 -0
 - package/dist/credentials/McpClientApi.credentials.js +29 -0
 - package/dist/nodes/BraveSearch/BraveSearch.node.d.ts +5 -0
 - package/dist/nodes/BraveSearch/BraveSearch.node.js +213 -0
 - package/dist/nodes/BraveSearch/BraveSearch.node.js.map +1 -0
 - package/dist/nodes/BraveSearch/brave-logo-sans-text.svg +1 -0
 - package/dist/nodes/BraveSearch/types.d.ts +21 -0
 - package/dist/nodes/BraveSearch/types.js +2 -0
 - package/dist/nodes/BraveSearch/types.js.map +1 -0
 - package/dist/nodes/BraveSearchTool/BraveSearchTool.node.d.ts +7 -0
 - package/dist/nodes/BraveSearchTool/BraveSearchTool.node.js +208 -0
 - package/dist/nodes/BraveSearchTool/brave-logo-sans-text.svg +1 -0
 - package/dist/nodes/EnlightenedMsp/McpClient.node.d.ts +5 -0
 - package/dist/nodes/EnlightenedMsp/McpClient.node.js +95 -0
 - package/dist/nodes/EnlightenedMsp/TicketCreated.node.d.ts +5 -0
 - package/dist/nodes/EnlightenedMsp/TicketCreated.node.js +104 -0
 - package/dist/nodes/EnlightenedMsp/index.d.ts +2 -0
 - package/dist/nodes/EnlightenedMsp/index.js +5 -0
 - package/dist/nodes/EnlightenedMsp/mcpClient.svg +7 -0
 - package/dist/nodes/McpClient/McpClient.node.d.ts +5 -0
 - package/dist/nodes/McpClient/McpClient.node.js +95 -0
 - package/dist/nodes/McpClient/mcpClient.svg +7 -0
 - package/dist/nodes/NpmSearch/NpmSearch.node.d.ts +5 -0
 - package/dist/nodes/NpmSearch/NpmSearch.node.js +94 -0
 - package/dist/nodes/NpmSearch/npm.svg +5 -0
 - package/package.json +77 -0
 
    
        package/README.md
    ADDED
    
    | 
         @@ -0,0 +1,124 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # n8n-nodes-mcp-client
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            This package provides an n8n node for interacting with Model Context Protocol (MCP) tools. It allows you to integrate MCP-compatible AI tools into your n8n workflows.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            To install this package in your n8n instance:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 10 
     | 
    
         
            +
            npm install @coulee-tech/n8n-nodes-mcp-client
         
     | 
| 
      
 11 
     | 
    
         
            +
            ```
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            ## Features
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            - List available MCP tools
         
     | 
| 
      
 16 
     | 
    
         
            +
            - Call specific MCP tools with custom arguments
         
     | 
| 
      
 17 
     | 
    
         
            +
            - Full integration with n8n workflows
         
     | 
| 
      
 18 
     | 
    
         
            +
            - Support for standard MCP protocol communication
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            ## MCP Protocol Requirements
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            Your MCP client must:
         
     | 
| 
      
 23 
     | 
    
         
            +
            1. Accept JSON-RPC style messages via stdin
         
     | 
| 
      
 24 
     | 
    
         
            +
            2. Output responses via stdout
         
     | 
| 
      
 25 
     | 
    
         
            +
            3. Support the following methods:
         
     | 
| 
      
 26 
     | 
    
         
            +
               - `tools/list`: Lists available tools
         
     | 
| 
      
 27 
     | 
    
         
            +
               - `tools/call`: Calls a specific tool with arguments
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            Example MCP message format:
         
     | 
| 
      
 30 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 31 
     | 
    
         
            +
            // Request
         
     | 
| 
      
 32 
     | 
    
         
            +
            {
         
     | 
| 
      
 33 
     | 
    
         
            +
              "method": "tools/call",
         
     | 
| 
      
 34 
     | 
    
         
            +
              "params": {
         
     | 
| 
      
 35 
     | 
    
         
            +
                "name": "tool-name",
         
     | 
| 
      
 36 
     | 
    
         
            +
                "arguments": {
         
     | 
| 
      
 37 
     | 
    
         
            +
                  // tool-specific arguments
         
     | 
| 
      
 38 
     | 
    
         
            +
                }
         
     | 
| 
      
 39 
     | 
    
         
            +
              }
         
     | 
| 
      
 40 
     | 
    
         
            +
            }
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            // Response
         
     | 
| 
      
 43 
     | 
    
         
            +
            {
         
     | 
| 
      
 44 
     | 
    
         
            +
              "result": {
         
     | 
| 
      
 45 
     | 
    
         
            +
                // tool-specific response
         
     | 
| 
      
 46 
     | 
    
         
            +
              }
         
     | 
| 
      
 47 
     | 
    
         
            +
            }
         
     | 
| 
      
 48 
     | 
    
         
            +
            ```
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            ## Configuration
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            ### Credentials
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            To use the MCP Client node, you need to configure the following credentials:
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            1. **Command**: The command to execute for the MCP client (e.g., the path to your MCP-compatible tool)
         
     | 
| 
      
 57 
     | 
    
         
            +
            2. **Arguments**: Command-line arguments for the MCP client (comma-separated)
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            ### Node Configuration
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            The node provides two operations:
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            1. **List Tools**
         
     | 
| 
      
 64 
     | 
    
         
            +
               - Lists all available MCP tools from your configured client
         
     | 
| 
      
 65 
     | 
    
         
            +
               - No additional parameters required
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            2. **Call Tool**
         
     | 
| 
      
 68 
     | 
    
         
            +
               - Calls a specific MCP tool with custom arguments
         
     | 
| 
      
 69 
     | 
    
         
            +
               - Required parameters:
         
     | 
| 
      
 70 
     | 
    
         
            +
                 - Tool Name: The name of the tool to call
         
     | 
| 
      
 71 
     | 
    
         
            +
                 - Tool Arguments: JSON object containing the arguments for the tool
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
            ## Usage Example
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            Here's an example of how to use the MCP Client node in your workflow:
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
            1. Add the MCP Client node to your workflow
         
     | 
| 
      
 78 
     | 
    
         
            +
            2. Configure the credentials with your MCP client command and arguments
         
     | 
| 
      
 79 
     | 
    
         
            +
            3. Choose an operation:
         
     | 
| 
      
 80 
     | 
    
         
            +
               - To list tools: Select "List Tools" operation
         
     | 
| 
      
 81 
     | 
    
         
            +
               - To call a tool: Select "Call Tool" operation and provide:
         
     | 
| 
      
 82 
     | 
    
         
            +
                 ```json
         
     | 
| 
      
 83 
     | 
    
         
            +
                 {
         
     | 
| 
      
 84 
     | 
    
         
            +
                   "toolName": "your-tool-name",
         
     | 
| 
      
 85 
     | 
    
         
            +
                   "toolArguments": {
         
     | 
| 
      
 86 
     | 
    
         
            +
                     "param1": "value1",
         
     | 
| 
      
 87 
     | 
    
         
            +
                     "param2": "value2"
         
     | 
| 
      
 88 
     | 
    
         
            +
                   }
         
     | 
| 
      
 89 
     | 
    
         
            +
                 }
         
     | 
| 
      
 90 
     | 
    
         
            +
                 ```
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            ## Error Handling
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
            The node includes comprehensive error handling:
         
     | 
| 
      
 95 
     | 
    
         
            +
            - Invalid command or arguments
         
     | 
| 
      
 96 
     | 
    
         
            +
            - Tool execution failures
         
     | 
| 
      
 97 
     | 
    
         
            +
            - MCP protocol communication errors
         
     | 
| 
      
 98 
     | 
    
         
            +
            - JSON parsing errors
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            ## Development
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
            To contribute to this package:
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            1. Clone the repository
         
     | 
| 
      
 105 
     | 
    
         
            +
            2. Install dependencies:
         
     | 
| 
      
 106 
     | 
    
         
            +
               ```bash
         
     | 
| 
      
 107 
     | 
    
         
            +
               npm install
         
     | 
| 
      
 108 
     | 
    
         
            +
               ```
         
     | 
| 
      
 109 
     | 
    
         
            +
            3. Build the package:
         
     | 
| 
      
 110 
     | 
    
         
            +
               ```bash
         
     | 
| 
      
 111 
     | 
    
         
            +
               npm run build
         
     | 
| 
      
 112 
     | 
    
         
            +
               ```
         
     | 
| 
      
 113 
     | 
    
         
            +
            4. Run tests:
         
     | 
| 
      
 114 
     | 
    
         
            +
               ```bash
         
     | 
| 
      
 115 
     | 
    
         
            +
               npm test
         
     | 
| 
      
 116 
     | 
    
         
            +
               ```
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
            ## License
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            This project is licensed under the MIT License - see the LICENSE file for details.
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
            ## Support
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
            For issues and feature requests, please use the GitHub issue tracker. 
         
     | 
| 
         @@ -0,0 +1,9 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
         
     | 
| 
      
 2 
     | 
    
         
            +
            export declare class BraveSearchApi implements ICredentialType {
         
     | 
| 
      
 3 
     | 
    
         
            +
                name: string;
         
     | 
| 
      
 4 
     | 
    
         
            +
                displayName: string;
         
     | 
| 
      
 5 
     | 
    
         
            +
                documentationUrl: string;
         
     | 
| 
      
 6 
     | 
    
         
            +
                properties: INodeProperties[];
         
     | 
| 
      
 7 
     | 
    
         
            +
                authenticate: IAuthenticateGeneric;
         
     | 
| 
      
 8 
     | 
    
         
            +
                test: ICredentialTestRequest;
         
     | 
| 
      
 9 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,47 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 3 
     | 
    
         
            +
            exports.BraveSearchApi = void 0;
         
     | 
| 
      
 4 
     | 
    
         
            +
            class BraveSearchApi {
         
     | 
| 
      
 5 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 6 
     | 
    
         
            +
                    this.name = 'braveSearchApi';
         
     | 
| 
      
 7 
     | 
    
         
            +
                    this.displayName = 'Brave Search API';
         
     | 
| 
      
 8 
     | 
    
         
            +
                    this.documentationUrl = 'https://api.search.brave.com/app/documentation/web-search';
         
     | 
| 
      
 9 
     | 
    
         
            +
                    this.properties = [
         
     | 
| 
      
 10 
     | 
    
         
            +
                        {
         
     | 
| 
      
 11 
     | 
    
         
            +
                            displayName: 'API Key',
         
     | 
| 
      
 12 
     | 
    
         
            +
                            name: 'apiKey',
         
     | 
| 
      
 13 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 14 
     | 
    
         
            +
                            typeOptions: {
         
     | 
| 
      
 15 
     | 
    
         
            +
                                password: true,
         
     | 
| 
      
 16 
     | 
    
         
            +
                            },
         
     | 
| 
      
 17 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 18 
     | 
    
         
            +
                            required: true,
         
     | 
| 
      
 19 
     | 
    
         
            +
                            description: 'The API key for Brave Search. Get it from https://api.search.brave.com/app/keys',
         
     | 
| 
      
 20 
     | 
    
         
            +
                        },
         
     | 
| 
      
 21 
     | 
    
         
            +
                    ];
         
     | 
| 
      
 22 
     | 
    
         
            +
                    this.authenticate = {
         
     | 
| 
      
 23 
     | 
    
         
            +
                        type: 'generic',
         
     | 
| 
      
 24 
     | 
    
         
            +
                        properties: {
         
     | 
| 
      
 25 
     | 
    
         
            +
                            headers: {
         
     | 
| 
      
 26 
     | 
    
         
            +
                                'X-Subscription-Token': '={{$credentials.apiKey}}',
         
     | 
| 
      
 27 
     | 
    
         
            +
                                'Accept': 'application/json',
         
     | 
| 
      
 28 
     | 
    
         
            +
                            },
         
     | 
| 
      
 29 
     | 
    
         
            +
                        },
         
     | 
| 
      
 30 
     | 
    
         
            +
                    };
         
     | 
| 
      
 31 
     | 
    
         
            +
                    this.test = {
         
     | 
| 
      
 32 
     | 
    
         
            +
                        request: {
         
     | 
| 
      
 33 
     | 
    
         
            +
                            baseURL: 'https://api.search.brave.com/res/v1',
         
     | 
| 
      
 34 
     | 
    
         
            +
                            url: '/web/search',
         
     | 
| 
      
 35 
     | 
    
         
            +
                            method: 'GET',
         
     | 
| 
      
 36 
     | 
    
         
            +
                            qs: {
         
     | 
| 
      
 37 
     | 
    
         
            +
                                q: 'test'
         
     | 
| 
      
 38 
     | 
    
         
            +
                            },
         
     | 
| 
      
 39 
     | 
    
         
            +
                            headers: {
         
     | 
| 
      
 40 
     | 
    
         
            +
                                'Accept': 'application/json',
         
     | 
| 
      
 41 
     | 
    
         
            +
                            },
         
     | 
| 
      
 42 
     | 
    
         
            +
                            skipSslCertificateValidation: false,
         
     | 
| 
      
 43 
     | 
    
         
            +
                        },
         
     | 
| 
      
 44 
     | 
    
         
            +
                    };
         
     | 
| 
      
 45 
     | 
    
         
            +
                }
         
     | 
| 
      
 46 
     | 
    
         
            +
            }
         
     | 
| 
      
 47 
     | 
    
         
            +
            exports.BraveSearchApi = BraveSearchApi;
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"BraveSearchApi.credentials.js","sourceRoot":"","sources":["../../credentials/BraveSearchApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,cAAc;IAA3B;QACI,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,2DAA2D,CAAC;QAE/E,eAAU,GAAsB;YAC5B;gBACI,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACT,QAAQ,EAAE,IAAI;iBACjB;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,8BAA8B;aAC9C;SACJ,CAAC;QAEF,iBAAY,GAAyB;YACjC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACR,OAAO,EAAE;oBACL,sBAAsB,EAAE,0BAA0B;iBACrD;aACJ;SACJ,CAAC;QAEF,SAAI,GAA2B;YAC3B,OAAO,EAAE;gBACL,OAAO,EAAE,qCAAqC;gBAC9C,GAAG,EAAE,aAAa;gBAClB,MAAM,EAAE,KAAK;gBACb,EAAE,EAAE;oBACA,CAAC,EAAE,MAAM;iBACZ;aACJ;SACJ,CAAC;IACN,CAAC;CAAA;AAtCD,wCAsCC"}
         
     | 
| 
         @@ -0,0 +1,8 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
         
     | 
| 
      
 2 
     | 
    
         
            +
            export declare class EnlightenedMspApi implements ICredentialType {
         
     | 
| 
      
 3 
     | 
    
         
            +
                name: string;
         
     | 
| 
      
 4 
     | 
    
         
            +
                displayName: string;
         
     | 
| 
      
 5 
     | 
    
         
            +
                documentationUrl: string;
         
     | 
| 
      
 6 
     | 
    
         
            +
                properties: INodeProperties[];
         
     | 
| 
      
 7 
     | 
    
         
            +
                authenticate: IAuthenticateGeneric;
         
     | 
| 
      
 8 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 3 
     | 
    
         
            +
            exports.EnlightenedMspApi = void 0;
         
     | 
| 
      
 4 
     | 
    
         
            +
            class EnlightenedMspApi {
         
     | 
| 
      
 5 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 6 
     | 
    
         
            +
                    this.name = 'enlightenedMspApi';
         
     | 
| 
      
 7 
     | 
    
         
            +
                    this.displayName = 'EnlightenedMSP API';
         
     | 
| 
      
 8 
     | 
    
         
            +
                    this.documentationUrl = '';
         
     | 
| 
      
 9 
     | 
    
         
            +
                    this.properties = [
         
     | 
| 
      
 10 
     | 
    
         
            +
                        {
         
     | 
| 
      
 11 
     | 
    
         
            +
                            displayName: 'API Key',
         
     | 
| 
      
 12 
     | 
    
         
            +
                            name: 'apiKey',
         
     | 
| 
      
 13 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 14 
     | 
    
         
            +
                            typeOptions: {
         
     | 
| 
      
 15 
     | 
    
         
            +
                                password: true,
         
     | 
| 
      
 16 
     | 
    
         
            +
                            },
         
     | 
| 
      
 17 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 18 
     | 
    
         
            +
                        },
         
     | 
| 
      
 19 
     | 
    
         
            +
                    ];
         
     | 
| 
      
 20 
     | 
    
         
            +
                    this.authenticate = {
         
     | 
| 
      
 21 
     | 
    
         
            +
                        type: 'generic',
         
     | 
| 
      
 22 
     | 
    
         
            +
                        properties: {
         
     | 
| 
      
 23 
     | 
    
         
            +
                            headers: {
         
     | 
| 
      
 24 
     | 
    
         
            +
                                'x-api-key': '={{$credentials.apiKey}}',
         
     | 
| 
      
 25 
     | 
    
         
            +
                            },
         
     | 
| 
      
 26 
     | 
    
         
            +
                        },
         
     | 
| 
      
 27 
     | 
    
         
            +
                    };
         
     | 
| 
      
 28 
     | 
    
         
            +
                }
         
     | 
| 
      
 29 
     | 
    
         
            +
            }
         
     | 
| 
      
 30 
     | 
    
         
            +
            exports.EnlightenedMspApi = EnlightenedMspApi;
         
     | 
| 
         @@ -0,0 +1,47 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 3 
     | 
    
         
            +
            exports.EnlightenedMspNats = void 0;
         
     | 
| 
      
 4 
     | 
    
         
            +
            class EnlightenedMspNats {
         
     | 
| 
      
 5 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 6 
     | 
    
         
            +
                    this.name = 'enlightenedMspNats';
         
     | 
| 
      
 7 
     | 
    
         
            +
                    this.displayName = 'EnlightenedMSP NATS';
         
     | 
| 
      
 8 
     | 
    
         
            +
                    this.documentationUrl = 'https://docs.nats.io/';
         
     | 
| 
      
 9 
     | 
    
         
            +
                    this.properties = [
         
     | 
| 
      
 10 
     | 
    
         
            +
                        {
         
     | 
| 
      
 11 
     | 
    
         
            +
                            displayName: 'NATS Server URL',
         
     | 
| 
      
 12 
     | 
    
         
            +
                            name: 'natsServer',
         
     | 
| 
      
 13 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 14 
     | 
    
         
            +
                            default: 'nats://localhost:4222',
         
     | 
| 
      
 15 
     | 
    
         
            +
                            description: 'URL of the NATS server',
         
     | 
| 
      
 16 
     | 
    
         
            +
                        },
         
     | 
| 
      
 17 
     | 
    
         
            +
                        {
         
     | 
| 
      
 18 
     | 
    
         
            +
                            displayName: 'Username',
         
     | 
| 
      
 19 
     | 
    
         
            +
                            name: 'username',
         
     | 
| 
      
 20 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 21 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 22 
     | 
    
         
            +
                            description: 'Username for NATS authentication',
         
     | 
| 
      
 23 
     | 
    
         
            +
                        },
         
     | 
| 
      
 24 
     | 
    
         
            +
                        {
         
     | 
| 
      
 25 
     | 
    
         
            +
                            displayName: 'Password',
         
     | 
| 
      
 26 
     | 
    
         
            +
                            name: 'password',
         
     | 
| 
      
 27 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 28 
     | 
    
         
            +
                            typeOptions: {
         
     | 
| 
      
 29 
     | 
    
         
            +
                                password: true,
         
     | 
| 
      
 30 
     | 
    
         
            +
                            },
         
     | 
| 
      
 31 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 32 
     | 
    
         
            +
                            description: 'Password for NATS authentication',
         
     | 
| 
      
 33 
     | 
    
         
            +
                        },
         
     | 
| 
      
 34 
     | 
    
         
            +
                        {
         
     | 
| 
      
 35 
     | 
    
         
            +
                            displayName: 'Token',
         
     | 
| 
      
 36 
     | 
    
         
            +
                            name: 'token',
         
     | 
| 
      
 37 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 38 
     | 
    
         
            +
                            typeOptions: {
         
     | 
| 
      
 39 
     | 
    
         
            +
                                password: true,
         
     | 
| 
      
 40 
     | 
    
         
            +
                            },
         
     | 
| 
      
 41 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 42 
     | 
    
         
            +
                            description: 'Token for NATS authentication (if using token-based auth instead of username/password)',
         
     | 
| 
      
 43 
     | 
    
         
            +
                        },
         
     | 
| 
      
 44 
     | 
    
         
            +
                    ];
         
     | 
| 
      
 45 
     | 
    
         
            +
                }
         
     | 
| 
      
 46 
     | 
    
         
            +
            }
         
     | 
| 
      
 47 
     | 
    
         
            +
            exports.EnlightenedMspNats = EnlightenedMspNats;
         
     | 
| 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 3 
     | 
    
         
            +
            exports.McpClientApi = void 0;
         
     | 
| 
      
 4 
     | 
    
         
            +
            class McpClientApi {
         
     | 
| 
      
 5 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 6 
     | 
    
         
            +
                    this.name = 'mcpClientApi';
         
     | 
| 
      
 7 
     | 
    
         
            +
                    this.displayName = 'MCP Client API';
         
     | 
| 
      
 8 
     | 
    
         
            +
                    this.documentationUrl = 'https://github.com/modelcontextprotocol/sdk';
         
     | 
| 
      
 9 
     | 
    
         
            +
                    this.properties = [
         
     | 
| 
      
 10 
     | 
    
         
            +
                        {
         
     | 
| 
      
 11 
     | 
    
         
            +
                            displayName: 'Command',
         
     | 
| 
      
 12 
     | 
    
         
            +
                            name: 'command',
         
     | 
| 
      
 13 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 14 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 15 
     | 
    
         
            +
                            required: true,
         
     | 
| 
      
 16 
     | 
    
         
            +
                            description: 'The command to execute for MCP client',
         
     | 
| 
      
 17 
     | 
    
         
            +
                        },
         
     | 
| 
      
 18 
     | 
    
         
            +
                        {
         
     | 
| 
      
 19 
     | 
    
         
            +
                            displayName: 'Arguments',
         
     | 
| 
      
 20 
     | 
    
         
            +
                            name: 'args',
         
     | 
| 
      
 21 
     | 
    
         
            +
                            type: 'string',
         
     | 
| 
      
 22 
     | 
    
         
            +
                            default: '',
         
     | 
| 
      
 23 
     | 
    
         
            +
                            required: true,
         
     | 
| 
      
 24 
     | 
    
         
            +
                            description: 'Command arguments (comma-separated)',
         
     | 
| 
      
 25 
     | 
    
         
            +
                        },
         
     | 
| 
      
 26 
     | 
    
         
            +
                    ];
         
     | 
| 
      
 27 
     | 
    
         
            +
                }
         
     | 
| 
      
 28 
     | 
    
         
            +
            }
         
     | 
| 
      
 29 
     | 
    
         
            +
            exports.McpClientApi = McpClientApi;
         
     | 
| 
         @@ -0,0 +1,213 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            "use strict";
         
     | 
| 
      
 2 
     | 
    
         
            +
            var __importDefault = (this && this.__importDefault) || function (mod) {
         
     | 
| 
      
 3 
     | 
    
         
            +
                return (mod && mod.__esModule) ? mod : { "default": mod };
         
     | 
| 
      
 4 
     | 
    
         
            +
            };
         
     | 
| 
      
 5 
     | 
    
         
            +
            Object.defineProperty(exports, "__esModule", { value: true });
         
     | 
| 
      
 6 
     | 
    
         
            +
            exports.BraveSearch = void 0;
         
     | 
| 
      
 7 
     | 
    
         
            +
            const n8n_workflow_1 = require("n8n-workflow");
         
     | 
| 
      
 8 
     | 
    
         
            +
            const axios_1 = __importDefault(require("axios"));
         
     | 
| 
      
 9 
     | 
    
         
            +
            class BraveSearch {
         
     | 
| 
      
 10 
     | 
    
         
            +
                constructor() {
         
     | 
| 
      
 11 
     | 
    
         
            +
                    this.description = {
         
     | 
| 
      
 12 
     | 
    
         
            +
                        displayName: 'Brave Search',
         
     | 
| 
      
 13 
     | 
    
         
            +
                        name: 'braveSearch',
         
     | 
| 
      
 14 
     | 
    
         
            +
                        icon: 'file:brave-logo-sans-text.svg',
         
     | 
| 
      
 15 
     | 
    
         
            +
                        group: ['transform'],
         
     | 
| 
      
 16 
     | 
    
         
            +
                        version: 1,
         
     | 
| 
      
 17 
     | 
    
         
            +
                        subtitle: '={{$parameter["operation"]}}',
         
     | 
| 
      
 18 
     | 
    
         
            +
                        description: 'Make requests to Brave Search API',
         
     | 
| 
      
 19 
     | 
    
         
            +
                        defaults: {
         
     | 
| 
      
 20 
     | 
    
         
            +
                            name: 'Brave Search',
         
     | 
| 
      
 21 
     | 
    
         
            +
                        },
         
     | 
| 
      
 22 
     | 
    
         
            +
                        inputs: ['main'],
         
     | 
| 
      
 23 
     | 
    
         
            +
                        outputs: ['main'],
         
     | 
| 
      
 24 
     | 
    
         
            +
                        credentials: [
         
     | 
| 
      
 25 
     | 
    
         
            +
                            {
         
     | 
| 
      
 26 
     | 
    
         
            +
                                name: 'braveSearchApi',
         
     | 
| 
      
 27 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 28 
     | 
    
         
            +
                            },
         
     | 
| 
      
 29 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 30 
     | 
    
         
            +
                        properties: [
         
     | 
| 
      
 31 
     | 
    
         
            +
                            {
         
     | 
| 
      
 32 
     | 
    
         
            +
                                displayName: 'Operation',
         
     | 
| 
      
 33 
     | 
    
         
            +
                                name: 'operation',
         
     | 
| 
      
 34 
     | 
    
         
            +
                                type: 'options',
         
     | 
| 
      
 35 
     | 
    
         
            +
                                noDataExpression: true,
         
     | 
| 
      
 36 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 37 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 38 
     | 
    
         
            +
                                        name: 'Web Search',
         
     | 
| 
      
 39 
     | 
    
         
            +
                                        value: 'webSearch',
         
     | 
| 
      
 40 
     | 
    
         
            +
                                        description: 'Perform a web search',
         
     | 
| 
      
 41 
     | 
    
         
            +
                                        action: 'Perform a web search',
         
     | 
| 
      
 42 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 43 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 44 
     | 
    
         
            +
                                default: 'webSearch',
         
     | 
| 
      
 45 
     | 
    
         
            +
                            },
         
     | 
| 
      
 46 
     | 
    
         
            +
                            {
         
     | 
| 
      
 47 
     | 
    
         
            +
                                displayName: 'Query',
         
     | 
| 
      
 48 
     | 
    
         
            +
                                name: 'query',
         
     | 
| 
      
 49 
     | 
    
         
            +
                                type: 'string',
         
     | 
| 
      
 50 
     | 
    
         
            +
                                default: '',
         
     | 
| 
      
 51 
     | 
    
         
            +
                                required: true,
         
     | 
| 
      
 52 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 53 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 54 
     | 
    
         
            +
                                        operation: ['webSearch'],
         
     | 
| 
      
 55 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 56 
     | 
    
         
            +
                                },
         
     | 
| 
      
 57 
     | 
    
         
            +
                                description: 'The search query to execute',
         
     | 
| 
      
 58 
     | 
    
         
            +
                            },
         
     | 
| 
      
 59 
     | 
    
         
            +
                            {
         
     | 
| 
      
 60 
     | 
    
         
            +
                                displayName: 'Additional Fields',
         
     | 
| 
      
 61 
     | 
    
         
            +
                                name: 'additionalFields',
         
     | 
| 
      
 62 
     | 
    
         
            +
                                type: 'collection',
         
     | 
| 
      
 63 
     | 
    
         
            +
                                placeholder: 'Add Field',
         
     | 
| 
      
 64 
     | 
    
         
            +
                                default: {},
         
     | 
| 
      
 65 
     | 
    
         
            +
                                displayOptions: {
         
     | 
| 
      
 66 
     | 
    
         
            +
                                    show: {
         
     | 
| 
      
 67 
     | 
    
         
            +
                                        operation: ['webSearch'],
         
     | 
| 
      
 68 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 69 
     | 
    
         
            +
                                },
         
     | 
| 
      
 70 
     | 
    
         
            +
                                options: [
         
     | 
| 
      
 71 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 72 
     | 
    
         
            +
                                        displayName: 'Country',
         
     | 
| 
      
 73 
     | 
    
         
            +
                                        name: 'country',
         
     | 
| 
      
 74 
     | 
    
         
            +
                                        type: 'string',
         
     | 
| 
      
 75 
     | 
    
         
            +
                                        default: '',
         
     | 
| 
      
 76 
     | 
    
         
            +
                                        description: 'Country code for search results (e.g., US, GB)',
         
     | 
| 
      
 77 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 78 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 79 
     | 
    
         
            +
                                        displayName: 'Results Count',
         
     | 
| 
      
 80 
     | 
    
         
            +
                                        name: 'count',
         
     | 
| 
      
 81 
     | 
    
         
            +
                                        type: 'number',
         
     | 
| 
      
 82 
     | 
    
         
            +
                                        typeOptions: {
         
     | 
| 
      
 83 
     | 
    
         
            +
                                            minValue: 1,
         
     | 
| 
      
 84 
     | 
    
         
            +
                                            maxValue: 20,
         
     | 
| 
      
 85 
     | 
    
         
            +
                                        },
         
     | 
| 
      
 86 
     | 
    
         
            +
                                        default: 10,
         
     | 
| 
      
 87 
     | 
    
         
            +
                                        description: 'Number of results to return (max: 20)',
         
     | 
| 
      
 88 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 89 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 90 
     | 
    
         
            +
                                        displayName: 'Offset',
         
     | 
| 
      
 91 
     | 
    
         
            +
                                        name: 'offset',
         
     | 
| 
      
 92 
     | 
    
         
            +
                                        type: 'number',
         
     | 
| 
      
 93 
     | 
    
         
            +
                                        typeOptions: {
         
     | 
| 
      
 94 
     | 
    
         
            +
                                            minValue: 0,
         
     | 
| 
      
 95 
     | 
    
         
            +
                                        },
         
     | 
| 
      
 96 
     | 
    
         
            +
                                        default: 0,
         
     | 
| 
      
 97 
     | 
    
         
            +
                                        description: 'Offset for pagination',
         
     | 
| 
      
 98 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 99 
     | 
    
         
            +
                                    {
         
     | 
| 
      
 100 
     | 
    
         
            +
                                        displayName: 'Safe Search',
         
     | 
| 
      
 101 
     | 
    
         
            +
                                        name: 'safesearch',
         
     | 
| 
      
 102 
     | 
    
         
            +
                                        type: 'options',
         
     | 
| 
      
 103 
     | 
    
         
            +
                                        options: [
         
     | 
| 
      
 104 
     | 
    
         
            +
                                            {
         
     | 
| 
      
 105 
     | 
    
         
            +
                                                name: 'Strict',
         
     | 
| 
      
 106 
     | 
    
         
            +
                                                value: 'strict',
         
     | 
| 
      
 107 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 108 
     | 
    
         
            +
                                            {
         
     | 
| 
      
 109 
     | 
    
         
            +
                                                name: 'Moderate',
         
     | 
| 
      
 110 
     | 
    
         
            +
                                                value: 'moderate',
         
     | 
| 
      
 111 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 112 
     | 
    
         
            +
                                            {
         
     | 
| 
      
 113 
     | 
    
         
            +
                                                name: 'Off',
         
     | 
| 
      
 114 
     | 
    
         
            +
                                                value: 'off',
         
     | 
| 
      
 115 
     | 
    
         
            +
                                            },
         
     | 
| 
      
 116 
     | 
    
         
            +
                                        ],
         
     | 
| 
      
 117 
     | 
    
         
            +
                                        default: 'moderate',
         
     | 
| 
      
 118 
     | 
    
         
            +
                                        description: 'Safe search setting',
         
     | 
| 
      
 119 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 120 
     | 
    
         
            +
                                ],
         
     | 
| 
      
 121 
     | 
    
         
            +
                            },
         
     | 
| 
      
 122 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 123 
     | 
    
         
            +
                    };
         
     | 
| 
      
 124 
     | 
    
         
            +
                }
         
     | 
| 
      
 125 
     | 
    
         
            +
                async execute() {
         
     | 
| 
      
 126 
     | 
    
         
            +
                    var _a, _b, _c, _d, _e;
         
     | 
| 
      
 127 
     | 
    
         
            +
                    const items = this.getInputData();
         
     | 
| 
      
 128 
     | 
    
         
            +
                    const returnData = [];
         
     | 
| 
      
 129 
     | 
    
         
            +
                    let query = '';
         
     | 
| 
      
 130 
     | 
    
         
            +
                    let params;
         
     | 
| 
      
 131 
     | 
    
         
            +
                    for (let i = 0; i < items.length; i++) {
         
     | 
| 
      
 132 
     | 
    
         
            +
                        try {
         
     | 
| 
      
 133 
     | 
    
         
            +
                            const operation = this.getNodeParameter('operation', i);
         
     | 
| 
      
 134 
     | 
    
         
            +
                            if (operation === 'webSearch') {
         
     | 
| 
      
 135 
     | 
    
         
            +
                                query = this.getNodeParameter('query', i);
         
     | 
| 
      
 136 
     | 
    
         
            +
                                const additionalFields = this.getNodeParameter('additionalFields', i);
         
     | 
| 
      
 137 
     | 
    
         
            +
                                const credentials = await this.getCredentials('braveSearchApi');
         
     | 
| 
      
 138 
     | 
    
         
            +
                                if (!(credentials === null || credentials === void 0 ? void 0 : credentials.apiKey)) {
         
     | 
| 
      
 139 
     | 
    
         
            +
                                    throw new Error('No API key provided in credentials');
         
     | 
| 
      
 140 
     | 
    
         
            +
                                }
         
     | 
| 
      
 141 
     | 
    
         
            +
                                params = {
         
     | 
| 
      
 142 
     | 
    
         
            +
                                    q: query,
         
     | 
| 
      
 143 
     | 
    
         
            +
                                    ...additionalFields,
         
     | 
| 
      
 144 
     | 
    
         
            +
                                };
         
     | 
| 
      
 145 
     | 
    
         
            +
                                try {
         
     | 
| 
      
 146 
     | 
    
         
            +
                                    const response = await axios_1.default.get('https://api.search.brave.com/res/v1/web/search', {
         
     | 
| 
      
 147 
     | 
    
         
            +
                                        params,
         
     | 
| 
      
 148 
     | 
    
         
            +
                                        headers: {
         
     | 
| 
      
 149 
     | 
    
         
            +
                                            'X-Subscription-Token': credentials.apiKey,
         
     | 
| 
      
 150 
     | 
    
         
            +
                                            'Accept': 'application/json',
         
     | 
| 
      
 151 
     | 
    
         
            +
                                        },
         
     | 
| 
      
 152 
     | 
    
         
            +
                                    });
         
     | 
| 
      
 153 
     | 
    
         
            +
                                    console.log('Response status:', response.status);
         
     | 
| 
      
 154 
     | 
    
         
            +
                                    console.log('Response data structure:', Object.keys(response.data));
         
     | 
| 
      
 155 
     | 
    
         
            +
                                    if (!response.data) {
         
     | 
| 
      
 156 
     | 
    
         
            +
                                        throw new Error('Empty response from Brave Search API');
         
     | 
| 
      
 157 
     | 
    
         
            +
                                    }
         
     | 
| 
      
 158 
     | 
    
         
            +
                                    if (!response.data.web || !Array.isArray(response.data.web.results)) {
         
     | 
| 
      
 159 
     | 
    
         
            +
                                        throw new Error(`Invalid response structure. Got: ${JSON.stringify(response.data)}`);
         
     | 
| 
      
 160 
     | 
    
         
            +
                                    }
         
     | 
| 
      
 161 
     | 
    
         
            +
                                    const responseData = {
         
     | 
| 
      
 162 
     | 
    
         
            +
                                        ...response.data,
         
     | 
| 
      
 163 
     | 
    
         
            +
                                        web: {
         
     | 
| 
      
 164 
     | 
    
         
            +
                                            ...(response.data.web || {}),
         
     | 
| 
      
 165 
     | 
    
         
            +
                                            results: response.data.web.results.map((result) => ({
         
     | 
| 
      
 166 
     | 
    
         
            +
                                                ...result,
         
     | 
| 
      
 167 
     | 
    
         
            +
                                                title: result.title || '',
         
     | 
| 
      
 168 
     | 
    
         
            +
                                                url: result.url || '',
         
     | 
| 
      
 169 
     | 
    
         
            +
                                                description: result.description || ''
         
     | 
| 
      
 170 
     | 
    
         
            +
                                            }))
         
     | 
| 
      
 171 
     | 
    
         
            +
                                        }
         
     | 
| 
      
 172 
     | 
    
         
            +
                                    };
         
     | 
| 
      
 173 
     | 
    
         
            +
                                    returnData.push({
         
     | 
| 
      
 174 
     | 
    
         
            +
                                        json: responseData,
         
     | 
| 
      
 175 
     | 
    
         
            +
                                        pairedItem: i,
         
     | 
| 
      
 176 
     | 
    
         
            +
                                    });
         
     | 
| 
      
 177 
     | 
    
         
            +
                                }
         
     | 
| 
      
 178 
     | 
    
         
            +
                                catch (error) {
         
     | 
| 
      
 179 
     | 
    
         
            +
                                    if (axios_1.default.isAxiosError(error)) {
         
     | 
| 
      
 180 
     | 
    
         
            +
                                        throw new Error(`API Request failed: ${error.message}. ` +
         
     | 
| 
      
 181 
     | 
    
         
            +
                                            `Status: ${(_a = error.response) === null || _a === void 0 ? void 0 : _a.status}. ` +
         
     | 
| 
      
 182 
     | 
    
         
            +
                                            `Response: ${JSON.stringify((_b = error.response) === null || _b === void 0 ? void 0 : _b.data)}`);
         
     | 
| 
      
 183 
     | 
    
         
            +
                                    }
         
     | 
| 
      
 184 
     | 
    
         
            +
                                    throw error;
         
     | 
| 
      
 185 
     | 
    
         
            +
                                }
         
     | 
| 
      
 186 
     | 
    
         
            +
                            }
         
     | 
| 
      
 187 
     | 
    
         
            +
                        }
         
     | 
| 
      
 188 
     | 
    
         
            +
                        catch (error) {
         
     | 
| 
      
 189 
     | 
    
         
            +
                            if (this.continueOnFail()) {
         
     | 
| 
      
 190 
     | 
    
         
            +
                                returnData.push({
         
     | 
| 
      
 191 
     | 
    
         
            +
                                    json: {
         
     | 
| 
      
 192 
     | 
    
         
            +
                                        error: error.message,
         
     | 
| 
      
 193 
     | 
    
         
            +
                                        details: ((_c = error.response) === null || _c === void 0 ? void 0 : _c.data) || 'No additional error details available',
         
     | 
| 
      
 194 
     | 
    
         
            +
                                        status: ((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) || 'Unknown status',
         
     | 
| 
      
 195 
     | 
    
         
            +
                                        query: query || 'No query provided',
         
     | 
| 
      
 196 
     | 
    
         
            +
                                        params: params || 'No params available'
         
     | 
| 
      
 197 
     | 
    
         
            +
                                    },
         
     | 
| 
      
 198 
     | 
    
         
            +
                                    pairedItem: i,
         
     | 
| 
      
 199 
     | 
    
         
            +
                                });
         
     | 
| 
      
 200 
     | 
    
         
            +
                                continue;
         
     | 
| 
      
 201 
     | 
    
         
            +
                            }
         
     | 
| 
      
 202 
     | 
    
         
            +
                            throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Execution failed: ${error.message}`, {
         
     | 
| 
      
 203 
     | 
    
         
            +
                                description: ((_e = error.response) === null || _e === void 0 ? void 0 : _e.data)
         
     | 
| 
      
 204 
     | 
    
         
            +
                                    ? `API Response: ${JSON.stringify(error.response.data)}`
         
     | 
| 
      
 205 
     | 
    
         
            +
                                    : undefined,
         
     | 
| 
      
 206 
     | 
    
         
            +
                                itemIndex: i,
         
     | 
| 
      
 207 
     | 
    
         
            +
                            });
         
     | 
| 
      
 208 
     | 
    
         
            +
                        }
         
     | 
| 
      
 209 
     | 
    
         
            +
                    }
         
     | 
| 
      
 210 
     | 
    
         
            +
                    return [returnData];
         
     | 
| 
      
 211 
     | 
    
         
            +
                }
         
     | 
| 
      
 212 
     | 
    
         
            +
            }
         
     | 
| 
      
 213 
     | 
    
         
            +
            exports.BraveSearch = BraveSearch;
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"BraveSearch.node.js","sourceRoot":"","sources":["../../../nodes/BraveSearch/BraveSearch.node.ts"],"names":[],"mappings":";;;;;;AAAA,+CAOsB;AACtB,kDAA6C;AAO7C,MAAa,WAAW;IAAxB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE;gBACN,IAAI,EAAE,cAAc;aACvB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,gBAAgB;oBACtB,QAAQ,EAAE,IAAI;iBACjB;aACJ;YACD,UAAU,EAAE;gBACR;oBACI,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;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,CAAC,QAAQ,0CAAE,IAAI;oBACrC,CAAC,CAAC,cAAc,KAAK,CAAC,OAAO,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;oBAChF,CAAC,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;gBAChC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;aACzE;SACJ;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AA7LD,kCA6LC"}
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <svg width="56" height="64" viewBox="0 0 56 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M53.292 15.321l1.5-3.676s-1.909-2.043-4.227-4.358c-2.317-2.315-7.225-.953-7.225-.953L37.751 0H18.12l-5.589 6.334s-4.908-1.362-7.225.953C2.988 9.602 1.08 11.645 1.08 11.645l1.5 3.676-1.91 5.447s5.614 21.236 6.272 23.83c1.295 5.106 2.181 7.08 5.862 9.668 3.68 2.587 10.36 7.08 11.45 7.762 1.091.68 2.455 1.84 3.682 1.84 1.227 0 2.59-1.16 3.68-1.84 1.091-.681 7.77-5.175 11.452-7.762 3.68-2.587 4.567-4.562 5.862-9.668.657-2.594 6.27-23.83 6.27-23.83l-1.908-5.447z" fill="url(#paint0_linear)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M34.888 11.508c.818 0 6.885-1.157 6.885-1.157s7.189 8.68 7.189 10.536c0 1.534-.619 2.134-1.347 2.842-.152.148-.31.3-.467.468l-5.39 5.717a9.42 9.42 0 01-.176.18c-.538.54-1.33 1.336-.772 2.658l.115.269c.613 1.432 1.37 3.2.407 4.99-1.025 1.906-2.78 3.178-3.905 2.967-1.124-.21-3.766-1.589-4.737-2.218-.971-.63-4.05-3.166-4.05-4.137 0-.809 2.214-2.155 3.29-2.81.214-.13.383-.232.48-.298.111-.075.297-.19.526-.332.981-.61 2.754-1.71 2.799-2.197.055-.602.034-.778-.758-2.264-.168-.316-.365-.654-.568-1.004-.754-1.295-1.598-2.745-1.41-3.784.21-1.173 2.05-1.845 3.608-2.415.194-.07.385-.14.567-.209l1.623-.609c1.556-.582 3.284-1.229 3.57-1.36.394-.181.292-.355-.903-.468a54.655 54.655 0 01-.58-.06c-1.48-.157-4.209-.446-5.535-.077-.261.073-.553.152-.86.235-1.49.403-3.317.897-3.493 1.182-.03.05-.06.093-.089.133-.168.238-.277.394-.091 1.406.055.302.169.895.31 1.629.41 2.148 1.053 5.498 1.134 6.25.011.106.024.207.036.305.103.84.171 1.399-.805 1.622l-.255.058c-1.102.252-2.717.623-3.3.623-.584 0-2.2-.37-3.302-.623l-.254-.058c-.976-.223-.907-.782-.804-1.622.012-.098.024-.2.035-.305.081-.753.725-4.112 1.137-6.259.14-.73.253-1.32.308-1.62.185-1.012.076-1.168-.092-1.406a3.743 3.743 0 01-.09-.133c-.174-.285-2-.779-3.491-1.182-.307-.083-.6-.162-.86-.235-1.327-.37-4.055-.08-5.535.077-.226.024-.422.045-.58.06-1.196.113-1.297.287-.903.468.285.131 2.013.778 3.568 1.36.597.223 1.17.437 1.624.609.183.069.373.138.568.21 1.558.57 3.398 1.241 3.608 2.414.187 1.039-.657 2.489-1.41 3.784-.204.35-.4.688-.569 1.004-.791 1.486-.812 1.662-.757 2.264.044.488 1.816 1.587 2.798 2.197.229.142.415.257.526.332.098.066.266.168.48.298 1.076.654 3.29 2 3.29 2.81 0 .97-3.078 3.507-4.05 4.137-.97.63-3.612 2.008-4.737 2.218-1.124.21-2.88-1.061-3.904-2.966-.963-1.791-.207-3.559.406-4.99l.115-.27c.559-1.322-.233-2.118-.772-2.658a9.377 9.377 0 01-.175-.18l-5.39-5.717c-.158-.167-.316-.32-.468-.468-.728-.707-1.346-1.308-1.346-2.842 0-1.855 7.189-10.536 7.189-10.536s6.066 1.157 6.884 1.157c.653 0 1.913-.433 3.227-.885.333-.114.669-.23 1-.34 1.635-.545 2.726-.549 2.726-.549s1.09.004 2.726.549c.33.11.667.226 1 .34 1.313.452 2.574.885 3.226.885zm-1.041 30.706c1.282.66 2.192 1.128 2.536 1.343.445.278.174.803-.232 1.09-.405.285-5.853 4.499-6.381 4.965l-.215.191c-.509.459-1.159 1.044-1.62 1.044-.46 0-1.11-.586-1.62-1.044l-.213-.191c-.53-.466-5.977-4.68-6.382-4.966-.405-.286-.677-.81-.232-1.09.344-.214 1.255-.683 2.539-1.344l1.22-.629c1.92-.992 4.315-1.837 4.689-1.837.373 0 2.767.844 4.689 1.837.436.226.845.437 1.222.63z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M43.34 6.334L37.751 0H18.12l-5.589 6.334s-4.908-1.362-7.225.953c0 0 6.544-.59 8.793 3.064 0 0 6.066 1.157 6.884 1.157.818 0 2.59-.68 4.226-1.225 1.636-.545 2.727-.549 2.727-.549s1.09.004 2.726.549 3.408 1.225 4.226 1.225c.818 0 6.885-1.157 6.885-1.157 2.249-3.654 8.792-3.064 8.792-3.064-2.317-2.315-7.225-.953-7.225-.953z" fill="url(#paint1_linear)"/><defs><linearGradient id="paint0_linear" x1=".671" y1="64.319" x2="55.2" y2="64.319" gradientUnits="userSpaceOnUse"><stop stop-color="#F50"/><stop offset=".41" stop-color="#F50"/><stop offset=".582" stop-color="#FF2000"/><stop offset="1" stop-color="#FF2000"/></linearGradient><linearGradient id="paint1_linear" x1="6.278" y1="11.466" x2="50.565" y2="11.466" gradientUnits="userSpaceOnUse"><stop stop-color="#FF452A"/><stop offset="1" stop-color="#FF2000"/></linearGradient></defs></svg>
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { IDataObject } from 'n8n-workflow';
         
     | 
| 
      
 2 
     | 
    
         
            +
            export interface IBraveSearchCredentials {
         
     | 
| 
      
 3 
     | 
    
         
            +
                apiKey: string;
         
     | 
| 
      
 4 
     | 
    
         
            +
            }
         
     | 
| 
      
 5 
     | 
    
         
            +
            export interface IBraveSearchParams extends IDataObject {
         
     | 
| 
      
 6 
     | 
    
         
            +
                q: string;
         
     | 
| 
      
 7 
     | 
    
         
            +
                country?: string;
         
     | 
| 
      
 8 
     | 
    
         
            +
                count?: number;
         
     | 
| 
      
 9 
     | 
    
         
            +
                offset?: number;
         
     | 
| 
      
 10 
     | 
    
         
            +
                safesearch?: 'strict' | 'moderate' | 'off';
         
     | 
| 
      
 11 
     | 
    
         
            +
            }
         
     | 
| 
      
 12 
     | 
    
         
            +
            export interface IBraveSearchResponse {
         
     | 
| 
      
 13 
     | 
    
         
            +
                web: {
         
     | 
| 
      
 14 
     | 
    
         
            +
                    results: Array<{
         
     | 
| 
      
 15 
     | 
    
         
            +
                        title: string;
         
     | 
| 
      
 16 
     | 
    
         
            +
                        url: string;
         
     | 
| 
      
 17 
     | 
    
         
            +
                        description: string;
         
     | 
| 
      
 18 
     | 
    
         
            +
                    }>;
         
     | 
| 
      
 19 
     | 
    
         
            +
                    total?: number;
         
     | 
| 
      
 20 
     | 
    
         
            +
                };
         
     | 
| 
      
 21 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../nodes/BraveSearch/types.ts"],"names":[],"mappings":""}
         
     | 
| 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
         
     | 
| 
      
 2 
     | 
    
         
            +
            export declare class BraveSearchTool implements INodeType {
         
     | 
| 
      
 3 
     | 
    
         
            +
                description: INodeTypeDescription & {
         
     | 
| 
      
 4 
     | 
    
         
            +
                    usableAsTool?: boolean;
         
     | 
| 
      
 5 
     | 
    
         
            +
                };
         
     | 
| 
      
 6 
     | 
    
         
            +
                execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
         
     | 
| 
      
 7 
     | 
    
         
            +
            }
         
     |