@thecodigohub/n8n-nodes-insightshub 0.0.7 → 0.0.9
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 +8 -0
- package/dist/credentials/InsightsHub.credentials.d.ts.map +1 -0
- package/dist/credentials/InsightsHub.credentials.js.map +1 -0
- package/dist/nodes/InsightsHub.node.d.ts.map +1 -0
- package/dist/nodes/InsightsHub.node.js.map +1 -0
- package/package.json +12 -7
- package/.github/workflows/npm-publish.yml +0 -30
- package/dist/InsightsHub.credentials.d.ts.map +0 -1
- package/dist/InsightsHub.credentials.js.map +0 -1
- package/dist/InsightsHub.node.d.ts.map +0 -1
- package/dist/InsightsHub.node.js.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/insightsHub.svg +0 -3
- package/src/InsightsHub.credentials.ts +0 -19
- package/src/InsightsHub.node.ts +0 -95
- package/src/index.ts +0 -4
- package/tsconfig.json +0 -18
- /package/dist/{InsightsHub.credentials.d.ts → credentials/InsightsHub.credentials.d.ts} +0 -0
- /package/dist/{InsightsHub.credentials.js → credentials/InsightsHub.credentials.js} +0 -0
- /package/dist/{InsightsHub.node.d.ts → nodes/InsightsHub.node.d.ts} +0 -0
- /package/dist/{InsightsHub.node.js → nodes/InsightsHub.node.js} +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This is a custom n8n node for connecting to Insights Hub, an internal project for displaying dashboards.
|
|
4
4
|
|
|
5
|
+
## File Structure
|
|
6
|
+
|
|
7
|
+
This node follows the n8n convention for custom nodes:
|
|
8
|
+
|
|
9
|
+
- `nodes/` - Contains the node implementation files
|
|
10
|
+
- `credentials/` - Contains the credential type definitions
|
|
11
|
+
- `dist/` - Compiled JavaScript output (created after build)
|
|
12
|
+
|
|
5
13
|
## Installation
|
|
6
14
|
|
|
7
15
|
1. Clone this repository.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightsHub.credentials.d.ts","sourceRoot":"","sources":["../../credentials/InsightsHub.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,MAAM,cAAc,CAAC;AAEtB,qBAAa,cAAe,YAAW,eAAe;IACrD,IAAI,SAAoB;IACxB,WAAW,SAAsB;IACjC,gBAAgB,SAAwC;IACxD,UAAU;;;cAIU,iBAAiB;;;QAInC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightsHub.credentials.js","sourceRoot":"","sources":["../../credentials/InsightsHub.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,oCAAoC,CAAC,CAAC,cAAc;QACvE,eAAU,GAAG;YACZ;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAA6B;gBACnC,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAbD,wCAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightsHub.node.d.ts","sourceRoot":"","sources":["../../nodes/InsightsHub.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAEtB,qBAAa,eAAgB,YAAW,SAAS;IAChD,WAAW,EAAE,oBAAoB,CA4C/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAuCvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightsHub.node.js","sourceRoot":"","sources":["../../n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|
|
2
2
|
"name": "@thecodigohub/n8n-nodes-insightshub",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Custom n8n node for Insights Hub",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/nodes/InsightsHub.node.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
|
8
8
|
"dev": "tsc --watch",
|
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"n8n",
|
|
17
|
+
"n8n-community-node-package",
|
|
17
18
|
"insights",
|
|
18
19
|
"hub",
|
|
19
20
|
"dashboard"
|
|
20
21
|
],
|
|
22
|
+
"files": [
|
|
23
|
+
"dist/**/*"
|
|
24
|
+
],
|
|
21
25
|
"publishConfig": {
|
|
22
26
|
"access": "public"
|
|
23
27
|
},
|
|
@@ -31,16 +35,17 @@
|
|
|
31
35
|
"n8n": {
|
|
32
36
|
"n8nNodesApiVersion": 1,
|
|
33
37
|
"credentials": [
|
|
34
|
-
"dist/InsightsHub.credentials.js"
|
|
38
|
+
"dist/credentials/InsightsHub.credentials.js"
|
|
35
39
|
],
|
|
36
40
|
"nodes": [
|
|
37
|
-
"dist/InsightsHub.node.js"
|
|
41
|
+
"dist/nodes/InsightsHub.node.js"
|
|
38
42
|
]
|
|
39
43
|
},
|
|
40
|
-
"
|
|
44
|
+
"devDependencies": {
|
|
41
45
|
"@types/node": "^25.6.0",
|
|
42
|
-
"n8n-core": "^2.16.1",
|
|
43
|
-
"n8n-workflow": "^2.16.0",
|
|
44
46
|
"typescript": "^6.0.3"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"n8n-workflow": "*"
|
|
45
50
|
}
|
|
46
51
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 22
|
|
18
|
-
- run: npm ci
|
|
19
|
-
|
|
20
|
-
publish-npm:
|
|
21
|
-
needs: build
|
|
22
|
-
runs-on: ubuntu-latest
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
- uses: actions/setup-node@v4
|
|
26
|
-
with:
|
|
27
|
-
node-version: 22
|
|
28
|
-
registry-url: https://registry.npmjs.org/
|
|
29
|
-
- run: npm ci
|
|
30
|
-
- run: npm publish
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsHub.credentials.d.ts","sourceRoot":"","sources":["../src/InsightsHub.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,MAAM,cAAc,CAAC;AAEtB,qBAAa,cAAe,YAAW,eAAe;IACrD,IAAI,SAAoB;IACxB,WAAW,SAAsB;IACjC,gBAAgB,SAAwC;IACxD,UAAU;;;cAIU,iBAAiB;;;QAInC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsHub.credentials.js","sourceRoot":"","sources":["../src/InsightsHub.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,oCAAoC,CAAC,CAAC,cAAc;QACvE,eAAU,GAAG;YACZ;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAA6B;gBACnC,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAbD,wCAaC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsHub.node.d.ts","sourceRoot":"","sources":["../src/InsightsHub.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAEtB,qBAAa,eAAgB,YAAW,SAAS;IAChD,WAAW,EAAE,oBAAoB,CA4C/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAuCvE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsHub.node.js","sourceRoot":"","sources":["../src/InsightsHub.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,sBAAsB,EAAE,mBAAmB;YACjD,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;aACpB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,gBAAgB;oBACtB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,cAAc;oBAC3B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,wBAAwB;oBACrC,WAAW,EAAE,yCAAyC;oBACtD,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C,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBACvE,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;oBACvG,SAAS,EAAE,CAAC;iBACZ,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtFD,0CAsFC"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InsightsHubApi = exports.InsightsHubNode = void 0;
|
|
4
|
-
const InsightsHub_node_1 = require("./InsightsHub.node");
|
|
5
|
-
Object.defineProperty(exports, "InsightsHubNode", { enumerable: true, get: function () { return InsightsHub_node_1.InsightsHubNode; } });
|
|
6
|
-
const InsightsHub_credentials_1 = require("./InsightsHub.credentials");
|
|
7
|
-
Object.defineProperty(exports, "InsightsHubApi", { enumerable: true, get: function () { return InsightsHub_credentials_1.InsightsHubApi; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AAG5C,gGAHA,kCAAe,OAGA;AAFxB,uEAA2D;AAEjC,+FAFjB,wCAAc,OAEiB"}
|
package/insightsHub.svg
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ICredentialType,
|
|
3
|
-
NodePropertyTypes,
|
|
4
|
-
} from 'n8n-workflow';
|
|
5
|
-
|
|
6
|
-
export class InsightsHubApi implements ICredentialType {
|
|
7
|
-
name = 'insightsHubApi';
|
|
8
|
-
displayName = 'Insights Hub API';
|
|
9
|
-
documentationUrl = 'https://insights-hub.internal/docs'; // Placeholder
|
|
10
|
-
properties = [
|
|
11
|
-
{
|
|
12
|
-
displayName: 'API Token',
|
|
13
|
-
name: 'apiToken',
|
|
14
|
-
type: 'string' as NodePropertyTypes,
|
|
15
|
-
default: '',
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
}
|
package/src/InsightsHub.node.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeExecutionData,
|
|
4
|
-
INodeType,
|
|
5
|
-
INodeTypeDescription,
|
|
6
|
-
NodeOperationError,
|
|
7
|
-
} from 'n8n-workflow';
|
|
8
|
-
|
|
9
|
-
export class InsightsHubNode implements INodeType {
|
|
10
|
-
description: INodeTypeDescription = {
|
|
11
|
-
displayName: 'Insights Hub',
|
|
12
|
-
name: 'insightsHub',
|
|
13
|
-
icon: 'file:insightsHub.svg', // Placeholder icon
|
|
14
|
-
group: ['transform'],
|
|
15
|
-
version: 1,
|
|
16
|
-
description: 'Connect to Insights Hub to fetch dashboard data',
|
|
17
|
-
defaults: {
|
|
18
|
-
name: 'Insights Hub',
|
|
19
|
-
},
|
|
20
|
-
inputs: ['main'],
|
|
21
|
-
outputs: ['main'],
|
|
22
|
-
credentials: [
|
|
23
|
-
{
|
|
24
|
-
name: 'insightsHubApi',
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
properties: [
|
|
29
|
-
{
|
|
30
|
-
displayName: 'Project Name',
|
|
31
|
-
name: 'projectName',
|
|
32
|
-
type: 'string',
|
|
33
|
-
default: '',
|
|
34
|
-
placeholder: 'Enter the project name',
|
|
35
|
-
description: 'The name of the project in Insights Hub',
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
displayName: 'Operation',
|
|
40
|
-
name: 'operation',
|
|
41
|
-
type: 'options',
|
|
42
|
-
options: [
|
|
43
|
-
{
|
|
44
|
-
name: 'Get Dashboard',
|
|
45
|
-
value: 'getDashboard',
|
|
46
|
-
description: 'Fetch dashboard data',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
default: 'getDashboard',
|
|
50
|
-
description: 'The operation to perform',
|
|
51
|
-
},
|
|
52
|
-
// Add more fields here as needed
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
|
57
|
-
const items = this.getInputData();
|
|
58
|
-
const returnData: INodeExecutionData[] = [];
|
|
59
|
-
|
|
60
|
-
const credentials = await this.getCredentials('insightsHubApi');
|
|
61
|
-
const apiToken = credentials.apiToken as string;
|
|
62
|
-
|
|
63
|
-
for (let i = 0; i < items.length; i++) {
|
|
64
|
-
try {
|
|
65
|
-
const projectName = this.getNodeParameter('projectName', i) as string;
|
|
66
|
-
const operation = this.getNodeParameter('operation', i) as string;
|
|
67
|
-
|
|
68
|
-
if (operation === 'getDashboard') {
|
|
69
|
-
// Placeholder: Assume API endpoint is something like https://insights-hub.internal/api/projects/{projectName}/dashboard
|
|
70
|
-
// In real implementation, make HTTP request
|
|
71
|
-
const response = {
|
|
72
|
-
project: projectName,
|
|
73
|
-
data: 'Sample dashboard data', // Replace with actual API call
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
returnData.push({
|
|
77
|
-
json: response,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
} catch (error) {
|
|
81
|
-
if (this.continueOnFail()) {
|
|
82
|
-
returnData.push({
|
|
83
|
-
json: { error: error instanceof Error ? error.message : String(error) },
|
|
84
|
-
});
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
throw new NodeOperationError(this.getNode(), error instanceof Error ? error : new Error(String(error)), {
|
|
88
|
-
itemIndex: i,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return [returnData];
|
|
94
|
-
}
|
|
95
|
-
}
|
package/src/index.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"target": "es2019",
|
|
5
|
-
"lib": ["es2019"],
|
|
6
|
-
"outDir": "dist",
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"declarationMap": true,
|
|
14
|
-
"sourceMap": true
|
|
15
|
-
},
|
|
16
|
-
"include": ["src/**/*"],
|
|
17
|
-
"exclude": ["node_modules", "dist"]
|
|
18
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|