@forestnpm/n8n-nodes-forest 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/credentials/ForestApi.credentials.d.ts +9 -0
- package/dist/credentials/ForestApi.credentials.js +44 -0
- package/dist/credentials/ForestMcpApi.credentials.d.ts +7 -0
- package/dist/credentials/ForestMcpApi.credentials.js +66 -0
- package/dist/credentials/ForestMcpOAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/ForestMcpOAuth2Api.credentials.js +87 -0
- package/dist/nodes/Forest/Forest.node.d.ts +11 -0
- package/dist/nodes/Forest/Forest.node.js +26673 -0
- package/dist/nodes/Forest/forest.svg +23 -0
- package/dist/nodes/Forest/listSearch.d.ts +2 -0
- package/dist/nodes/Forest/listSearch.js +40 -0
- package/dist/nodes/Forest/resourceMapping.d.ts +2 -0
- package/dist/nodes/Forest/resourceMapping.js +100 -0
- package/dist/nodes/Forest/types.d.ts +7 -0
- package/dist/nodes/Forest/types.js +2 -0
- package/dist/nodes/Forest/utils.d.ts +38 -0
- package/dist/nodes/Forest/utils.js +185 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# n8n-nodes-forest
|
|
2
|
+
|
|
3
|
+
This is an n8n community node for integrating with Forest.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### In n8n Desktop or Self-hosted
|
|
8
|
+
|
|
9
|
+
1. Go to **Settings > Community Nodes**
|
|
10
|
+
2. Select **Install**
|
|
11
|
+
3. Enter `n8n-nodes-forest` in the input field
|
|
12
|
+
4. Click **Install**
|
|
13
|
+
|
|
14
|
+
### Manual Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm install n8n-nodes-forest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Development
|
|
21
|
+
|
|
22
|
+
### Prerequisites
|
|
23
|
+
|
|
24
|
+
- Node.js >= 18.10
|
|
25
|
+
- pnpm >= 9.1
|
|
26
|
+
|
|
27
|
+
### Setup
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Use Node.js 20
|
|
31
|
+
nvm use 20
|
|
32
|
+
|
|
33
|
+
# Install n8n
|
|
34
|
+
npm install -g n8n
|
|
35
|
+
|
|
36
|
+
# Install dependencies
|
|
37
|
+
pnpm install
|
|
38
|
+
|
|
39
|
+
# Build the project
|
|
40
|
+
pnpm build
|
|
41
|
+
|
|
42
|
+
# Run in development mode (watch)
|
|
43
|
+
pnpm dev
|
|
44
|
+
|
|
45
|
+
# Run n8n
|
|
46
|
+
n8n
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Testing in n8n
|
|
50
|
+
|
|
51
|
+
1. Build the package: `pnpm build`
|
|
52
|
+
2. Link the package globally: `pnpm link --global`
|
|
53
|
+
3. In your n8n installation directory: `pnpm link --global n8n-nodes-forest`
|
|
54
|
+
4. Restart n8n
|
|
55
|
+
|
|
56
|
+
## Credentials
|
|
57
|
+
|
|
58
|
+
This node requires Forest API credentials:
|
|
59
|
+
- **API Key**: Your Forest API key
|
|
60
|
+
- **Base URL**: The Forest API base URL (default: https://api.forestadmin.com)
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
For details on filters and aggregations syntax, see the [Forest Admin filters documentation](https://docs.forestadmin.com/developer-guide-agents-nodejs/data-sources/getting-started/queries/filters).
|
|
65
|
+
|
|
66
|
+
## Resources
|
|
67
|
+
|
|
68
|
+
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
69
|
+
- [Forest Documentation](https://docs.forestadmin.com/)
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class ForestApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForestApi = void 0;
|
|
4
|
+
class ForestApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'forestApi';
|
|
7
|
+
this.displayName = 'Forest API';
|
|
8
|
+
this.documentationUrl = 'https://docs.forestadmin.com/';
|
|
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
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Base URL',
|
|
22
|
+
name: 'baseUrl',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: 'https://api.forestadmin.com',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
this.authenticate = {
|
|
29
|
+
type: 'generic',
|
|
30
|
+
properties: {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
this.test = {
|
|
37
|
+
request: {
|
|
38
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
39
|
+
url: '/health',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.ForestApi = ForestApi;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __n8n_g = Function("return this")();
|
|
2
|
+
var __n8n_setTimeout = __n8n_g.setTimeout;
|
|
3
|
+
var __n8n_clearTimeout = __n8n_g.clearTimeout;
|
|
4
|
+
var __n8n_setInterval = __n8n_g.setInterval;
|
|
5
|
+
var __n8n_clearInterval = __n8n_g.clearInterval;
|
|
6
|
+
var __n8n_setImmediate = __n8n_g.setImmediate;
|
|
7
|
+
var __n8n_clearImmediate = __n8n_g.clearImmediate;
|
|
8
|
+
var __n8n_globalThis = __n8n_g.globalThis;
|
|
9
|
+
"use strict";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
|
|
28
|
+
// credentials/ForestMcpApi.credentials.ts
|
|
29
|
+
var ForestMcpApi_credentials_exports = {};
|
|
30
|
+
__export(ForestMcpApi_credentials_exports, {
|
|
31
|
+
ForestMcpApi: () => ForestMcpApi
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ForestMcpApi_credentials_exports);
|
|
34
|
+
var ForestMcpApi = class {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.name = "forestMcpApi";
|
|
37
|
+
this.displayName = "Forest MCP API";
|
|
38
|
+
this.documentationUrl = "https://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/ai/mcp-server";
|
|
39
|
+
this.properties = [
|
|
40
|
+
{
|
|
41
|
+
displayName: "Server URL",
|
|
42
|
+
name: "serverUrl",
|
|
43
|
+
type: "string",
|
|
44
|
+
default: "",
|
|
45
|
+
required: true,
|
|
46
|
+
placeholder: "e.g. https://your-server.com",
|
|
47
|
+
description: "The Forest Admin server URL (without /mcp suffix)"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: "Token",
|
|
51
|
+
name: "token",
|
|
52
|
+
type: "string",
|
|
53
|
+
typeOptions: {
|
|
54
|
+
password: true
|
|
55
|
+
},
|
|
56
|
+
default: "",
|
|
57
|
+
required: true,
|
|
58
|
+
description: "The Bearer token to authenticate with your Forest MCP server"
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
ForestMcpApi
|
|
66
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __n8n_g = Function("return this")();
|
|
2
|
+
var __n8n_setTimeout = __n8n_g.setTimeout;
|
|
3
|
+
var __n8n_clearTimeout = __n8n_g.clearTimeout;
|
|
4
|
+
var __n8n_setInterval = __n8n_g.setInterval;
|
|
5
|
+
var __n8n_clearInterval = __n8n_g.clearInterval;
|
|
6
|
+
var __n8n_setImmediate = __n8n_g.setImmediate;
|
|
7
|
+
var __n8n_clearImmediate = __n8n_g.clearImmediate;
|
|
8
|
+
var __n8n_globalThis = __n8n_g.globalThis;
|
|
9
|
+
"use strict";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
|
|
28
|
+
// credentials/ForestMcpOAuth2Api.credentials.ts
|
|
29
|
+
var ForestMcpOAuth2Api_credentials_exports = {};
|
|
30
|
+
__export(ForestMcpOAuth2Api_credentials_exports, {
|
|
31
|
+
ForestMcpOAuth2Api: () => ForestMcpOAuth2Api
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ForestMcpOAuth2Api_credentials_exports);
|
|
34
|
+
var ForestMcpOAuth2Api = class {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.name = "forestMcpOAuth2Api";
|
|
37
|
+
this.displayName = "Forest MCP OAuth2 API";
|
|
38
|
+
this.documentationUrl = "https://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/ai/mcp-server";
|
|
39
|
+
this.extends = ["oAuth2Api"];
|
|
40
|
+
this.properties = [
|
|
41
|
+
{
|
|
42
|
+
displayName: "Server URL",
|
|
43
|
+
name: "serverUrl",
|
|
44
|
+
type: "string",
|
|
45
|
+
default: "",
|
|
46
|
+
required: true,
|
|
47
|
+
placeholder: "e.g. https://your-server.com",
|
|
48
|
+
description: "The url of your Forest Admin server (without /mcp suffix)"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: "Use Dynamic Client Registration",
|
|
52
|
+
name: "useDynamicClientRegistration",
|
|
53
|
+
type: "boolean",
|
|
54
|
+
default: true,
|
|
55
|
+
description: "Whether to use OAuth 2.0 Dynamic Client Registration"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: "Grant Type",
|
|
59
|
+
name: "grantType",
|
|
60
|
+
type: "hidden",
|
|
61
|
+
default: "authorizationCode"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
displayName: "Authorization URL",
|
|
65
|
+
name: "authUrl",
|
|
66
|
+
type: "hidden",
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
displayName: "Access Token URL",
|
|
71
|
+
name: "accessTokenUrl",
|
|
72
|
+
type: "hidden",
|
|
73
|
+
default: ""
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayName: "Authentication",
|
|
77
|
+
name: "authentication",
|
|
78
|
+
type: "hidden",
|
|
79
|
+
default: "body"
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
ForestMcpOAuth2Api
|
|
87
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, NodeExecutionWithMetadata } from 'n8n-workflow';
|
|
2
|
+
import * as listSearch from './listSearch';
|
|
3
|
+
import * as resourceMapping from './resourceMapping';
|
|
4
|
+
export declare class Forest implements INodeType {
|
|
5
|
+
description: INodeTypeDescription;
|
|
6
|
+
methods: {
|
|
7
|
+
listSearch: typeof listSearch;
|
|
8
|
+
resourceMapping: typeof resourceMapping;
|
|
9
|
+
};
|
|
10
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][] | NodeExecutionWithMetadata[][] | null>;
|
|
11
|
+
}
|