n8n-nodes-rocketcyber 0.1.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE.md +19 -0
  3. package/README.md +75 -0
  4. package/dist/credentials/RocketCyberApi.credentials.d.ts +10 -0
  5. package/dist/credentials/RocketCyberApi.credentials.js +51 -0
  6. package/dist/credentials/RocketCyberApi.credentials.js.map +1 -0
  7. package/dist/nodes/RocketCyber/RocketCyber.node.d.ts +10 -0
  8. package/dist/nodes/RocketCyber/RocketCyber.node.js +62 -0
  9. package/dist/nodes/RocketCyber/RocketCyber.node.js.map +1 -0
  10. package/dist/nodes/RocketCyber/RocketCyber.node.json +16 -0
  11. package/dist/nodes/RocketCyber/rocketcyber.svg +8 -0
  12. package/dist/nodes/RocketCyber/shared/engine.d.ts +3 -0
  13. package/dist/nodes/RocketCyber/shared/engine.js +78 -0
  14. package/dist/nodes/RocketCyber/shared/engine.js.map +1 -0
  15. package/dist/nodes/RocketCyber/shared/errors.d.ts +6 -0
  16. package/dist/nodes/RocketCyber/shared/errors.js +47 -0
  17. package/dist/nodes/RocketCyber/shared/errors.js.map +1 -0
  18. package/dist/nodes/RocketCyber/shared/methods.d.ts +2 -0
  19. package/dist/nodes/RocketCyber/shared/methods.js +13 -0
  20. package/dist/nodes/RocketCyber/shared/methods.js.map +1 -0
  21. package/dist/nodes/RocketCyber/shared/properties.d.ts +2 -0
  22. package/dist/nodes/RocketCyber/shared/properties.js +118 -0
  23. package/dist/nodes/RocketCyber/shared/properties.js.map +1 -0
  24. package/dist/nodes/RocketCyber/shared/registry.d.ts +5 -0
  25. package/dist/nodes/RocketCyber/shared/registry.js +212 -0
  26. package/dist/nodes/RocketCyber/shared/registry.js.map +1 -0
  27. package/dist/nodes/RocketCyber/shared/transport.d.ts +4 -0
  28. package/dist/nodes/RocketCyber/shared/transport.js +51 -0
  29. package/dist/nodes/RocketCyber/shared/transport.js.map +1 -0
  30. package/dist/nodes/RocketCyber/shared/types.d.ts +29 -0
  31. package/dist/nodes/RocketCyber/shared/types.js +3 -0
  32. package/dist/nodes/RocketCyber/shared/types.js.map +1 -0
  33. package/dist/package.json +65 -0
  34. package/package.json +65 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ All notable changes to `n8n-nodes-rocketcyber` will be documented here.
4
+
5
+ ## 0.1.0 — 2026-05-29
6
+
7
+ Initial release.
8
+
9
+ ### Added
10
+
11
+ - **RocketCyber node** (`usableAsTool: true`) — connects n8n to the RocketCyber (Kaseya managed SOC) v3 API (`https://api-<region>.rocketcyber.com/v3`). Read-only.
12
+ - **8 resources**: Account, Agent, Incident, Event, Firewall, Microsoft 365, App, Microsoft Defender.
13
+ - **Operations**: Get Many (with Return All / Limit) for list resources; Get for single-object resources (Account, Defender); Get Summary for Event.
14
+ - **Verified filters** (the API enforces a strict per-endpoint allowlist): Account ID on every resource; Status (`open`/`resolved`) on Incident; Status (`active`/`inactive`) on App; Verdict (`informational`/`suspicious`/`malicious`) on Event; required App on Event → Get Many, populated live from `/apps`.
15
+ - **Pagination engine** handling all three RocketCyber response shapes: page-based (`agents`/`incidents`/`events`/`firewalls`), whole-collection (`apps`/`office`), and single-object (`account`/`defender`/`events/summary`).
16
+ - **RocketCyber API credential** — region selector (US/EU/AU) + provider API token, with a live `GET /account` connection test.
17
+ - **Official RocketCyber rocket mark** as the node icon.
18
+ - **44 unit tests** across the registry, properties generator, transport, error mapping, and execution engine.
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2026 Tristen Rice
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # n8n-nodes-rocketcyber
2
+
3
+ An [n8n](https://n8n.io) community node for [RocketCyber](https://www.rocketcyber.com/) — the Kaseya managed SOC / MDR platform. Query incidents, agents, events, firewall threats, Microsoft 365 and Defender security data, and your provider account hierarchy directly from your workflows.
4
+
5
+ The node is **read-only** (the RocketCyber v3 API exposes only `GET` endpoints) and is **AI-agent ready** (`usableAsTool`), so it can be wired straight into an AI Agent for SOC triage, reporting, and enrichment.
6
+
7
+ ## Installation
8
+
9
+ In n8n, go to **Settings → Community Nodes → Install** and enter:
10
+
11
+ ```
12
+ n8n-nodes-rocketcyber
13
+ ```
14
+
15
+ Or install from the command line in your n8n root:
16
+
17
+ ```bash
18
+ npm install n8n-nodes-rocketcyber
19
+ ```
20
+
21
+ ## Credentials
22
+
23
+ Create a **RocketCyber API** credential:
24
+
25
+ | Field | Description |
26
+ |-------|-------------|
27
+ | **Region** | Your RocketCyber data region: US (`api-us`), EU (`api-eu`), or AU (`api-au`). |
28
+ | **API Token** | A provider API token. In the RocketCyber console go to **Provider Settings → API** and generate a token. |
29
+
30
+ The credential test calls `GET /account`, so an invalid token or wrong region fails immediately at save time.
31
+
32
+ ## Resources & operations
33
+
34
+ All operations are read-only.
35
+
36
+ | Resource | Operations | Endpoint |
37
+ |----------|-----------|----------|
38
+ | **Account** | Get | `/account` |
39
+ | **Agent** | Get Many | `/agents` |
40
+ | **Incident** | Get Many | `/incidents` |
41
+ | **Event** | Get Many, Get Summary | `/events`, `/events/summary` |
42
+ | **Firewall** | Get Many | `/firewalls` |
43
+ | **Microsoft 365** | Get Many | `/office` |
44
+ | **App** | Get Many | `/apps` |
45
+ | **Microsoft Defender** | Get | `/defender` |
46
+
47
+ `Get Many` operations support **Return All** (auto-paginate) or a **Limit**.
48
+
49
+ ## Filters
50
+
51
+ The RocketCyber API enforces a strict per-endpoint parameter allowlist, so the node only exposes filters the API actually accepts:
52
+
53
+ | Filter | Applies to | Values |
54
+ |--------|-----------|--------|
55
+ | **Account ID** | every resource | An MSP customer account ID. Leave empty for provider-level data across all customers. |
56
+ | **Status** | Incident | `open`, `resolved` |
57
+ | **Status** | App | `active`, `inactive` |
58
+ | **Verdict** | Event | `informational`, `suspicious`, `malicious` |
59
+ | **App** | Event (Get Many) | **Required.** The event source — picked from a dropdown populated live from `/apps`, or supplied as an ID via an expression. |
60
+
61
+ > **Events require an App.** `GET /events` returns events for a single app source, so the **App** field is required for the Event → Get Many operation. Use **Event → Get Summary** for a count of events per app.
62
+
63
+ ## Use as an AI tool
64
+
65
+ This node sets `usableAsTool: true`. In an AI Agent, connect it as a tool and the model can call operations like "get many open incidents for account 52171" or "get the Defender summary" on its own. Because every endpoint is read-only, there is no risk of the model mutating SOC data.
66
+
67
+ ## Notes
68
+
69
+ - **Read-only:** RocketCyber's v3 API has no create/update/delete endpoints; this node mirrors that.
70
+ - **Pagination:** `agents`, `incidents`, `events`, and `firewalls` are page-based; `apps` and `office` return their full collection in a single request; `account`, `defender`, and the event summary return a single object.
71
+ - **Rate limits:** RocketCyber rate-limits the API; the node returns a clear "rate limited" error on `429` so you can add a Wait/retry as needed.
72
+
73
+ ## License
74
+
75
+ [MIT](LICENSE.md) © Tristen Rice
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class RocketCyberApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: "file:../nodes/RocketCyber/rocketcyber.svg";
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RocketCyberApi = void 0;
4
+ class RocketCyberApi {
5
+ constructor() {
6
+ this.name = 'rocketCyberApi';
7
+ this.displayName = 'RocketCyber API';
8
+ this.icon = 'file:../nodes/RocketCyber/rocketcyber.svg';
9
+ this.documentationUrl = 'https://github.com/Earney-IT/n8n-nodes-rocketcyber';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Region',
13
+ name: 'region',
14
+ type: 'options',
15
+ default: 'api-us',
16
+ description: 'Your RocketCyber API region',
17
+ options: [
18
+ { name: 'US', value: 'api-us' },
19
+ { name: 'EU', value: 'api-eu' },
20
+ { name: 'AU', value: 'api-au' },
21
+ ],
22
+ },
23
+ {
24
+ displayName: 'API Token',
25
+ name: 'apiToken',
26
+ type: 'string',
27
+ typeOptions: { password: true },
28
+ required: true,
29
+ default: '',
30
+ description: 'RocketCyber API access token (Provider Settings → API tab)',
31
+ },
32
+ ];
33
+ this.authenticate = {
34
+ type: 'generic',
35
+ properties: {
36
+ headers: {
37
+ Authorization: '=Bearer {{$credentials.apiToken}}',
38
+ },
39
+ },
40
+ };
41
+ this.test = {
42
+ request: {
43
+ baseURL: '={{"https://" + $credentials.region + ".rocketcyber.com/v3"}}',
44
+ url: '/account',
45
+ method: 'GET',
46
+ },
47
+ };
48
+ }
49
+ }
50
+ exports.RocketCyberApi = RocketCyberApi;
51
+ //# sourceMappingURL=RocketCyberApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RocketCyberApi.credentials.js","sourceRoot":"","sources":["../../credentials/RocketCyberApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QAExB,gBAAW,GAAG,iBAAiB,CAAC;QAEhC,SAAI,GAAG,2CAAoD,CAAC;QAE5D,qBAAgB,GAAG,oDAAoD,CAAC;QAExE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,6BAA6B;gBAC1C,OAAO,EAAE;oBACR,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;iBAC/B;aACD;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,4DAA4D;aAC7D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,mCAAmC;iBAClD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,+DAA+D;gBACxE,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAlDD,wCAkDC"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class RocketCyber implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getApps(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ };
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RocketCyber = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const properties_1 = require("./shared/properties");
6
+ const engine_1 = require("./shared/engine");
7
+ const methods_1 = require("./shared/methods");
8
+ class RocketCyber {
9
+ constructor() {
10
+ this.description = {
11
+ displayName: 'RocketCyber',
12
+ name: 'rocketCyber',
13
+ icon: 'file:rocketcyber.svg',
14
+ group: ['transform'],
15
+ version: 1,
16
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
17
+ description: 'Query RocketCyber managed-SOC data: incidents, agents, events, firewalls, Microsoft 365, Defender status, apps, and accounts',
18
+ defaults: {
19
+ name: 'RocketCyber',
20
+ },
21
+ usableAsTool: true,
22
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
23
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
24
+ credentials: [
25
+ {
26
+ name: 'rocketCyberApi',
27
+ required: true,
28
+ },
29
+ ],
30
+ properties: (0, properties_1.buildProperties)(),
31
+ };
32
+ this.methods = {
33
+ loadOptions: {
34
+ async getApps() {
35
+ return methods_1.getApps.call(this);
36
+ },
37
+ },
38
+ };
39
+ }
40
+ async execute() {
41
+ const items = this.getInputData();
42
+ const out = [];
43
+ for (let i = 0; i < items.length; i++) {
44
+ try {
45
+ const rows = await engine_1.executeRocketCyber.call(this, i);
46
+ for (const row of rows) {
47
+ out.push({ json: row, pairedItem: { item: i } });
48
+ }
49
+ }
50
+ catch (err) {
51
+ if (this.continueOnFail()) {
52
+ out.push({ json: { error: err.message }, pairedItem: { item: i } });
53
+ continue;
54
+ }
55
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), err, { itemIndex: i });
56
+ }
57
+ }
58
+ return [out];
59
+ }
60
+ }
61
+ exports.RocketCyber = RocketCyber;
62
+ //# sourceMappingURL=RocketCyber.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RocketCyber.node.js","sourceRoot":"","sources":["../../../nodes/RocketCyber/RocketCyber.node.ts"],"names":[],"mappings":";;;AAAA,+CASsB;AACtB,oDAAsD;AACtD,4CAAqD;AACrD,8CAA2C;AAE3C,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EACV,8HAA8H;YAC/H,QAAQ,EAAE;gBACT,IAAI,EAAE,aAAa;aACnB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,gBAAgB;oBACtB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE,IAAA,4BAAe,GAAE;SAC7B,CAAC;QAEF,YAAO,GAAG;YACT,WAAW,EAAE;gBACZ,KAAK,CAAC,OAAO;oBACZ,OAAO,iBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC3B,CAAC;aACD;SACD,CAAC;IAyBH,CAAC;IAvBA,KAAK,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAyB,EAAE,CAAC;QAErC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC;gBACJ,MAAM,IAAI,GAAG,MAAM,2BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBACpD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;oBACxB,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;gBAClD,CAAC;YACF,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAG,GAAa,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC/E,SAAS;gBACV,CAAC;gBAGD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,GAAY,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9E,CAAC;QACF,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACD;AAxDD,kCAwDC"}
@@ -0,0 +1,16 @@
1
+ {
2
+ "node": "n8n-nodes-rocketcyber.rocketCyber",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Security"],
6
+ "subcategories": {
7
+ "Security": ["SOC", "Incident Response"]
8
+ },
9
+ "resources": {
10
+ "primaryDocumentation": [
11
+ {
12
+ "url": "https://github.com/Earney-IT/n8n-nodes-rocketcyber"
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="198.2 -2.6 54 54" width="60" height="60">
3
+ <title>RocketCyber</title>
4
+ <g transform="translate(0.000000, -1.000000)" fill="#84BF41" fill-rule="evenodd" stroke="none">
5
+ <polyline points="233.569 22.473 242.797 0.928 226.316 17.593 216.222 16.532 207.641 29.286 213.431 24.18 220.998 25.002 216.418 30.826 222.46 31.154 225.04 36.627 228.71 30.19 232.322 36.89 229.773 44.177 238.355 31.423 233.569 22.473"></polyline>
6
+ <path d="M220.431,42.165 L220.304,40.518 L218.261,42.133 L218.116,40.237 L215.183,41.935 L215.651,38.579 L213.84,39.159 L214.567,36.658 L212.992,37.16 L213.52,34.952 L219.671,35.173 L222.251,40.875 L220.431,42.165 Z M221.39,32.563 L211.235,32.309 L207.856,39.666 L211.191,37.72 L208.554,43.969 L212.392,41.725 L209.849,49.866 L216.432,44.443 L215.8,48.844 L220.594,44.046 L220.048,47.869 L225.521,42.053 L221.39,32.563 L221.39,32.563 Z"></path>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ import { IDataObject, IExecuteFunctions } from 'n8n-workflow';
2
+ export declare function extractList(resp: unknown): IDataObject[];
3
+ export declare function executeRocketCyber(this: IExecuteFunctions, i: number): Promise<IDataObject[]>;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractList = extractList;
4
+ exports.executeRocketCyber = executeRocketCyber;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const transport_1 = require("./transport");
7
+ const registry_1 = require("./registry");
8
+ function extractList(resp) {
9
+ if (Array.isArray(resp))
10
+ return resp;
11
+ const env = resp;
12
+ if (env && Array.isArray(env.data))
13
+ return env.data;
14
+ return [resp];
15
+ }
16
+ async function fetchPaginatedLimited(endpoint, qs, limit) {
17
+ var _a, _b, _c;
18
+ const collected = [];
19
+ const pageSize = Math.min(Math.max(limit, 1), 100);
20
+ for (let page = 1; collected.length < limit; page++) {
21
+ const resp = await transport_1.rocketCyberApiRequest.call(this, 'GET', endpoint, { ...qs, page, pageSize });
22
+ const env = resp;
23
+ const data = (_a = env === null || env === void 0 ? void 0 : env.data) !== null && _a !== void 0 ? _a : [];
24
+ collected.push(...data);
25
+ const currentPage = (_b = env === null || env === void 0 ? void 0 : env.currentPage) !== null && _b !== void 0 ? _b : page;
26
+ const totalPages = (_c = env === null || env === void 0 ? void 0 : env.totalPages) !== null && _c !== void 0 ? _c : 1;
27
+ if (data.length < pageSize || data.length === 0 || currentPage >= totalPages)
28
+ break;
29
+ }
30
+ return collected.slice(0, limit);
31
+ }
32
+ async function executeRocketCyber(i) {
33
+ var _a;
34
+ const resourceValue = this.getNodeParameter('resource', i);
35
+ const operationValue = this.getNodeParameter('operation', i);
36
+ const resource = (0, registry_1.getResource)(resourceValue);
37
+ if (!resource) {
38
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resourceValue}`, {
39
+ itemIndex: i,
40
+ });
41
+ }
42
+ const op = (0, registry_1.getOperation)(resource, operationValue);
43
+ if (!op) {
44
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation "${operationValue}" for resource "${resourceValue}"`, { itemIndex: i });
45
+ }
46
+ const qs = {};
47
+ const collection = this.getNodeParameter('filters', i, {});
48
+ for (const [key, value] of Object.entries(collection)) {
49
+ if (value !== undefined && value !== null && value !== '')
50
+ qs[key] = value;
51
+ }
52
+ for (const f of [...resource.filters, ...((_a = op.filters) !== null && _a !== void 0 ? _a : [])]) {
53
+ if (!f.required)
54
+ continue;
55
+ const value = this.getNodeParameter(f.name, i);
56
+ if (value !== undefined && value !== null && value !== '')
57
+ qs[f.name] = value;
58
+ }
59
+ if (op.shape === 'object') {
60
+ const resp = await transport_1.rocketCyberApiRequest.call(this, 'GET', op.endpoint, qs);
61
+ return extractList(resp);
62
+ }
63
+ const returnAll = this.getNodeParameter('returnAll', i, false);
64
+ if (op.shape === 'list') {
65
+ const resp = await transport_1.rocketCyberApiRequest.call(this, 'GET', op.endpoint, qs);
66
+ const items = extractList(resp);
67
+ if (returnAll)
68
+ return items;
69
+ const limit = this.getNodeParameter('limit', i, 50);
70
+ return items.slice(0, limit);
71
+ }
72
+ if (returnAll) {
73
+ return await transport_1.rocketCyberApiRequestAllItems.call(this, op.endpoint, qs);
74
+ }
75
+ const limit = this.getNodeParameter('limit', i, 50);
76
+ return await fetchPaginatedLimited.call(this, op.endpoint, qs, limit);
77
+ }
78
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/engine.ts"],"names":[],"mappings":";;AAKA,kCAKC;AAiCD,gDAsDC;AAjGD,+CAAkF;AAClF,2CAAmF;AACnF,yCAAuD;AAGvD,SAAgB,WAAW,CAAC,IAAa;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAqB,CAAC;IACtD,MAAM,GAAG,GAAG,IAAiC,CAAC;IAC9C,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,GAAG,CAAC,IAAqB,CAAC;IACrE,OAAO,CAAC,IAAmB,CAAC,CAAC;AAC9B,CAAC;AAGD,KAAK,UAAU,qBAAqB,CAEnC,QAAgB,EAChB,EAAe,EACf,KAAa;;IAEb,MAAM,SAAS,GAAkB,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAEnD,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,MAAM,iCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAChG,MAAM,GAAG,GAAG,IAA2E,CAAC;Q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MAAM,iCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,SAAS;YAAE,OAAO,KAAK,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;QAC9D,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAGD,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,MAAM,yCAA6B,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;IAC9D,OAAO,MAAM,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { INode } from 'n8n-workflow';
2
+ type MinimalCtx = {
3
+ getNode: () => INode;
4
+ };
5
+ export declare function toNodeError(ctx: MinimalCtx, error: unknown): never;
6
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toNodeError = toNodeError;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ function toNodeError(ctx, error) {
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
7
+ const err = error;
8
+ if (err.response) {
9
+ const status = (_c = (_b = (_a = err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.statusCode) !== null && _c !== void 0 ? _c : (_d = err.response) === null || _d === void 0 ? void 0 : _d.status;
10
+ const detail = (_h = (_g = (_f = (_e = err.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.message) !== null && _g !== void 0 ? _g : err === null || err === void 0 ? void 0 : err.message) !== null && _h !== void 0 ? _h : 'No detail available';
11
+ const errorObj = error;
12
+ switch (status) {
13
+ case 400:
14
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
15
+ message: `Bad request: ${detail}`,
16
+ httpCode: '400',
17
+ });
18
+ case 401:
19
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
20
+ message: 'Authentication failed — check the RocketCyber API token and region.',
21
+ httpCode: '401',
22
+ });
23
+ case 403:
24
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
25
+ message: `Access forbidden. (${detail})`,
26
+ httpCode: '403',
27
+ });
28
+ case 404:
29
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
30
+ message: `Not found. (${detail})`,
31
+ httpCode: '404',
32
+ });
33
+ case 429:
34
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
35
+ message: `Rate limited — slow down requests and retry. (${detail})`,
36
+ httpCode: '429',
37
+ });
38
+ default:
39
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), errorObj, {
40
+ message: `RocketCyber API error (${status}): ${detail}`,
41
+ httpCode: String(status),
42
+ });
43
+ }
44
+ }
45
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `RocketCyber request failed: ${(_j = err === null || err === void 0 ? void 0 : err.message) !== null && _j !== void 0 ? _j : 'No error message available'}`);
46
+ }
47
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/errors.ts"],"names":[],"mappings":";;AAUA,kCA4DC;AAtED,+CAAgE;AAUhE,SAAgB,WAAW,CAAC,GAAe,EAAE,KAAc;;IAC1D,MAAM,GAAG,GAAG,KAMX,CAAC;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,iDAAiD,MAAM,GAAG;oBACnE,QAAQ,EAAE,KAAK;iBACf,CAAC,CAAC;YACJ;gBACC,MAAM,IAAI,2BAAY,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE;oBAC/C,OAAO,EAAE,0BAA0B,MAAM,MAAM,MAAM,EAAE;oBACvD,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;iBACxB,CAAC,CAAC;QACL,CAAC;IACF,CAAC;IAED,MAAM,IAAI,iCAAkB,CAC3B,GAAG,CAAC,OAAO,EAAE,EACb,+BAA+B,MAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAA8B,mCAAI,4BAA4B,EAAE,CACrG,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function getApps(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getApps = getApps;
4
+ const transport_1 = require("./transport");
5
+ async function getApps() {
6
+ var _a;
7
+ const resp = (await transport_1.rocketCyberApiRequest.call(this, 'GET', '/apps'));
8
+ const apps = (_a = resp === null || resp === void 0 ? void 0 : resp.data) !== null && _a !== void 0 ? _a : [];
9
+ return apps
10
+ .map((app) => ({ name: app.name, value: app.id }))
11
+ .sort((a, b) => a.name.localeCompare(b.name));
12
+ }
13
+ //# sourceMappingURL=methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/methods.ts"],"names":[],"mappings":";;AAOA,0BAUC;AAhBD,2CAAoD;AAM7C,KAAK,UAAU,OAAO;;IAG5B,MAAM,IAAI,GAAG,CAAC,MAAM,iCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAEnE,CAAC;IACF,MAAM,IAAI,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,mCAAI,EAAE,CAAC;IAC9B,OAAO,IAAI;SACT,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;SACjD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare function buildProperties(): INodeProperties[];
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildProperties = buildProperties;
4
+ const registry_1 = require("./registry");
5
+ const LIST_SHAPES = new Set(['paginated', 'list']);
6
+ function isListLike(resource) {
7
+ return resource.operations.filter((o) => LIST_SHAPES.has(o.shape)).map((o) => o.value);
8
+ }
9
+ function requiredFilterProp(f, resourceValue, operationValue) {
10
+ var _a;
11
+ const prop = {
12
+ displayName: f.displayName,
13
+ name: f.name,
14
+ type: f.type === 'options' ? 'options' : f.type,
15
+ default: (_a = f.default) !== null && _a !== void 0 ? _a : (f.type === 'number' ? 0 : ''),
16
+ description: f.description,
17
+ displayOptions: { show: { resource: [resourceValue], operation: [operationValue] } },
18
+ };
19
+ if (f.required)
20
+ prop.required = true;
21
+ if (f.type === 'options') {
22
+ if (f.loadOptionsMethod) {
23
+ prop.typeOptions = { loadOptionsMethod: f.loadOptionsMethod };
24
+ }
25
+ else {
26
+ prop.options = f.options;
27
+ }
28
+ }
29
+ return prop;
30
+ }
31
+ function collectionOption(f) {
32
+ var _a;
33
+ const opt = {
34
+ displayName: f.displayName,
35
+ name: f.name,
36
+ type: f.type === 'options' ? 'options' : f.type,
37
+ default: (_a = f.default) !== null && _a !== void 0 ? _a : (f.type === 'number' ? 0 : f.type === 'boolean' ? false : ''),
38
+ description: f.description,
39
+ };
40
+ if (f.type === 'options' && f.options)
41
+ opt.options = f.options;
42
+ return opt;
43
+ }
44
+ function buildProperties() {
45
+ var _a;
46
+ const props = [];
47
+ props.push({
48
+ displayName: 'Resource',
49
+ name: 'resource',
50
+ type: 'options',
51
+ noDataExpression: true,
52
+ options: registry_1.RESOURCES.map((r) => ({ name: r.name, value: r.value, description: r.description })),
53
+ default: registry_1.RESOURCES[0].value,
54
+ });
55
+ for (const r of registry_1.RESOURCES) {
56
+ props.push({
57
+ displayName: 'Operation',
58
+ name: 'operation',
59
+ type: 'options',
60
+ noDataExpression: true,
61
+ displayOptions: { show: { resource: [r.value] } },
62
+ options: r.operations.map((o) => ({
63
+ name: o.name,
64
+ value: o.value,
65
+ action: o.action,
66
+ description: o.description,
67
+ })),
68
+ default: r.operations[0].value,
69
+ });
70
+ }
71
+ for (const r of registry_1.RESOURCES) {
72
+ const listOps = isListLike(r);
73
+ if (listOps.length === 0)
74
+ continue;
75
+ props.push({
76
+ displayName: 'Return All',
77
+ name: 'returnAll',
78
+ type: 'boolean',
79
+ default: false,
80
+ description: 'Whether to return all results or only up to a given limit',
81
+ displayOptions: { show: { resource: [r.value], operation: listOps } },
82
+ });
83
+ props.push({
84
+ displayName: 'Limit',
85
+ name: 'limit',
86
+ type: 'number',
87
+ default: 50,
88
+ typeOptions: { minValue: 1 },
89
+ description: 'Max number of results to return',
90
+ displayOptions: {
91
+ show: { resource: [r.value], operation: listOps, returnAll: [false] },
92
+ },
93
+ });
94
+ }
95
+ for (const r of registry_1.RESOURCES) {
96
+ for (const op of r.operations) {
97
+ const all = [...r.filters, ...((_a = op.filters) !== null && _a !== void 0 ? _a : [])];
98
+ const required = all.filter((f) => f.required);
99
+ const optional = all.filter((f) => !f.required);
100
+ for (const f of required) {
101
+ props.push(requiredFilterProp(f, r.value, op.value));
102
+ }
103
+ if (optional.length > 0) {
104
+ props.push({
105
+ displayName: 'Filters',
106
+ name: 'filters',
107
+ type: 'collection',
108
+ placeholder: 'Add Filter',
109
+ default: {},
110
+ displayOptions: { show: { resource: [r.value], operation: [op.value] } },
111
+ options: optional.map(collectionOption),
112
+ });
113
+ }
114
+ }
115
+ }
116
+ return props;
117
+ }
118
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/properties.ts"],"names":[],"mappings":";;AAsDA,0CAgFC;AApID,yCAAuC;AAEvC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnD,SAAS,UAAU,CAAC,QAA4B;IAC/C,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACxF,CAAC;AAGD,SAAS,kBAAkB,CAC1B,CAAmB,EACnB,aAAqB,EACrB,cAAsB;;IAEtB,MAAM,IAAI,GAAoB;QAC7B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QAC/C,OAAO,EAAE,MAAA,CAAC,CAAC,OAAO,mCAAI,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,C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AAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzB,KAAK,CAAC,IAAI,CAAC;oBACV,WAAW,EAAE,SAAS;oBACtB,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,YAAY;oBAClB,WAAW,EAAE,YAAY;oBACzB,OAAO,EAAE,EAAE;oBACX,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE;oBACxE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;iBACvC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { FilterDescriptor, ResourceDescriptor } from './types';
2
+ export declare const RESOURCES: ResourceDescriptor[];
3
+ export declare function getResource(value: string): ResourceDescriptor | undefined;
4
+ export declare function getOperation(resource: ResourceDescriptor, value: string): import("./types").OperationDescriptor | undefined;
5
+ export declare function filtersFor(resource: ResourceDescriptor, operationValue: string): FilterDescriptor[];
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESOURCES = void 0;
4
+ exports.getResource = getResource;
5
+ exports.getOperation = getOperation;
6
+ exports.filtersFor = filtersFor;
7
+ const accountId = {
8
+ displayName: 'Account ID',
9
+ name: 'accountId',
10
+ type: 'number',
11
+ default: 0,
12
+ description: 'MSP customer account ID to scope the results to. Leave empty to return provider-level data across all customers.',
13
+ };
14
+ exports.RESOURCES = [
15
+ {
16
+ value: 'account',
17
+ name: 'Account',
18
+ description: 'Provider account profile and its customer hierarchy',
19
+ filters: [accountId],
20
+ operations: [
21
+ {
22
+ value: 'get',
23
+ name: 'Get',
24
+ action: 'Get the account',
25
+ description: 'Retrieve the provider account (name, hierarchy, address, customer IDs)',
26
+ endpoint: '/account',
27
+ shape: 'object',
28
+ },
29
+ ],
30
+ },
31
+ {
32
+ value: 'agent',
33
+ name: 'Agent',
34
+ description: 'Installed RocketCyber agents (endpoints)',
35
+ filters: [accountId],
36
+ operations: [
37
+ {
38
+ value: 'getAll',
39
+ name: 'Get Many',
40
+ action: 'Get many agents',
41
+ description: 'List installed RocketCyber agents (endpoints)',
42
+ endpoint: '/agents',
43
+ shape: 'paginated',
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ value: 'incident',
49
+ name: 'Incident',
50
+ description: 'Managed-SOC security incidents',
51
+ filters: [
52
+ accountId,
53
+ {
54
+ displayName: 'Status',
55
+ name: 'status',
56
+ type: 'options',
57
+ default: 'open',
58
+ description: 'Filter incidents by resolution status',
59
+ options: [
60
+ { name: 'Open', value: 'open' },
61
+ { name: 'Resolved', value: 'resolved' },
62
+ ],
63
+ },
64
+ ],
65
+ operations: [
66
+ {
67
+ value: 'getAll',
68
+ name: 'Get Many',
69
+ action: 'Get many incidents',
70
+ description: 'List managed-SOC security incidents',
71
+ endpoint: '/incidents',
72
+ shape: 'paginated',
73
+ },
74
+ ],
75
+ },
76
+ {
77
+ value: 'event',
78
+ name: 'Event',
79
+ description: 'Raw security events from a specific app, plus an event-count summary',
80
+ filters: [accountId],
81
+ operations: [
82
+ {
83
+ value: 'getAll',
84
+ name: 'Get Many',
85
+ action: 'Get many events',
86
+ description: 'List raw security events for a given app (App is required)',
87
+ endpoint: '/events',
88
+ shape: 'paginated',
89
+ filters: [
90
+ {
91
+ displayName: 'App Name or ID',
92
+ name: 'appId',
93
+ type: 'options',
94
+ default: '',
95
+ description: 'The app (event source) to pull events from. Choose from the list, or specify an ID using an expression. Required by the RocketCyber API.',
96
+ required: true,
97
+ loadOptionsMethod: 'getApps',
98
+ },
99
+ {
100
+ displayName: 'Verdict',
101
+ name: 'verdict',
102
+ type: 'options',
103
+ default: 'informational',
104
+ description: 'Filter events by verdict',
105
+ options: [
106
+ { name: 'Informational', value: 'informational' },
107
+ { name: 'Suspicious', value: 'suspicious' },
108
+ { name: 'Malicious', value: 'malicious' },
109
+ ],
110
+ },
111
+ ],
112
+ },
113
+ {
114
+ value: 'summary',
115
+ name: 'Get Summary',
116
+ action: 'Get the event summary',
117
+ description: 'Aggregate event counts keyed by app ID',
118
+ endpoint: '/events/summary',
119
+ shape: 'object',
120
+ },
121
+ ],
122
+ },
123
+ {
124
+ value: 'firewall',
125
+ name: 'Firewall',
126
+ description: 'Firewall-detected threat events',
127
+ filters: [accountId],
128
+ operations: [
129
+ {
130
+ value: 'getAll',
131
+ name: 'Get Many',
132
+ action: 'Get many firewall events',
133
+ description: 'List firewall-detected threat events',
134
+ endpoint: '/firewalls',
135
+ shape: 'paginated',
136
+ },
137
+ ],
138
+ },
139
+ {
140
+ value: 'office',
141
+ name: 'Microsoft 365',
142
+ description: 'Microsoft 365 secure-score and security data',
143
+ filters: [accountId],
144
+ operations: [
145
+ {
146
+ value: 'getAll',
147
+ name: 'Get Many',
148
+ action: 'Get many Microsoft 365 records',
149
+ description: 'List Microsoft 365 secure-score / security records',
150
+ endpoint: '/office',
151
+ shape: 'list',
152
+ },
153
+ ],
154
+ },
155
+ {
156
+ value: 'app',
157
+ name: 'App',
158
+ description: 'Available RocketCyber apps (event sources / integrations)',
159
+ filters: [
160
+ accountId,
161
+ {
162
+ displayName: 'Status',
163
+ name: 'status',
164
+ type: 'options',
165
+ default: 'active',
166
+ description: 'Filter apps by activation status',
167
+ options: [
168
+ { name: 'Active', value: 'active' },
169
+ { name: 'Inactive', value: 'inactive' },
170
+ ],
171
+ },
172
+ ],
173
+ operations: [
174
+ {
175
+ value: 'getAll',
176
+ name: 'Get Many',
177
+ action: 'Get many apps',
178
+ description: 'List available RocketCyber apps (event sources)',
179
+ endpoint: '/apps',
180
+ shape: 'list',
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ value: 'defender',
186
+ name: 'Microsoft Defender',
187
+ description: 'Microsoft Defender device-health and risk summary',
188
+ filters: [accountId],
189
+ operations: [
190
+ {
191
+ value: 'get',
192
+ name: 'Get',
193
+ action: 'Get the Defender summary',
194
+ description: 'Retrieve the Microsoft Defender health and risk summary',
195
+ endpoint: '/defender',
196
+ shape: 'object',
197
+ },
198
+ ],
199
+ },
200
+ ];
201
+ function getResource(value) {
202
+ return exports.RESOURCES.find((r) => r.value === value);
203
+ }
204
+ function getOperation(resource, value) {
205
+ return resource.operations.find((o) => o.value === value);
206
+ }
207
+ function filtersFor(resource, operationValue) {
208
+ var _a;
209
+ const op = getOperation(resource, operationValue);
210
+ return [...resource.filters, ...((_a = op === null || op === void 0 ? void 0 : op.filters) !== null && _a !== void 0 ? _a : [])];
211
+ }
212
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/registry.ts"],"names":[],"mappings":";;;AA6MA,kCAEC;AAED,oCAEC;AAGD,gCAGC;AAvND,MAAM,SAAS,GAAqB;IACnC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC;IACV,WAAW,EACV,kHAAkH;CACnH,CAAC;AAOW,QAAA,SAAS,GAAyB;IAC9C;QACC,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,qDAAqD;QAClE,OAAO,EAAE,CAAC,SAAS,CAAC;QACpB,UAAU,EAAE;YACX;gBACC,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,iBAAiB;gBACzB,WAAW,EAAE,wEAAwE;gBACrF,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,QAAQ;aACf;SACD;KACD;IACD;QACC,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,CAAC,SAAS,CAAC;QACpB,UAAU,EAAE;YACX;gBACC,KAAK,EAAE,QAAQ;gBACf,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9E,MAAM,EAAE,GAAG,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,mCAAI,EAAE,CAAC,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IDataObject, IExecuteFunctions, IExecuteSingleFunctions, IHookFunctions, IHttpRequestMethods, ILoadOptionsFunctions, IPollFunctions } from 'n8n-workflow';
2
+ export type RcCtx = IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions | IHookFunctions;
3
+ export declare function rocketCyberApiRequest(this: RcCtx, method: IHttpRequestMethods, resource: string, qs?: IDataObject): Promise<unknown>;
4
+ export declare function rocketCyberApiRequestAllItems(this: RcCtx, resource: string, qs?: IDataObject, pageSize?: number): Promise<IDataObject[]>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rocketCyberApiRequest = rocketCyberApiRequest;
4
+ exports.rocketCyberApiRequestAllItems = rocketCyberApiRequestAllItems;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const errors_1 = require("./errors");
7
+ async function rocketCyberApiRequest(method, resource, qs = {}) {
8
+ var _a;
9
+ const creds = await this.getCredentials('rocketCyberApi');
10
+ const region = String((_a = creds.region) !== null && _a !== void 0 ? _a : 'api-us');
11
+ const baseUrl = `https://${region}.rocketcyber.com/v3`;
12
+ const path = String(resource).replace(/^\/+/, '');
13
+ const url = `${baseUrl}/${path}`;
14
+ const options = {
15
+ method,
16
+ url,
17
+ qs,
18
+ json: true,
19
+ headers: {
20
+ Accept: 'application/json',
21
+ },
22
+ };
23
+ try {
24
+ return await this.helpers.httpRequestWithAuthentication.call(this, 'rocketCyberApi', options);
25
+ }
26
+ catch (error) {
27
+ throw (0, errors_1.toNodeError)(this, error);
28
+ }
29
+ }
30
+ async function rocketCyberApiRequestAllItems(resource, qs = {}, pageSize = 100) {
31
+ var _a, _b, _c;
32
+ const MAX_PAGES = 200;
33
+ const out = [];
34
+ for (let page = 1;; page++) {
35
+ if (page > MAX_PAGES) {
36
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `RocketCyber returned more than ${MAX_PAGES} pages. Add filters (e.g. accountId, dateRange) to narrow the result set.`);
37
+ }
38
+ const pageQs = { ...qs, page, pageSize };
39
+ const resp = await rocketCyberApiRequest.call(this, 'GET', resource, pageQs);
40
+ const envelope = resp;
41
+ const data = (_a = envelope === null || envelope === void 0 ? void 0 : envelope.data) !== null && _a !== void 0 ? _a : [];
42
+ out.push(...data);
43
+ const currentPage = (_b = envelope === null || envelope === void 0 ? void 0 : envelope.currentPage) !== null && _b !== void 0 ? _b : page;
44
+ const totalPages = (_c = envelope === null || envelope === void 0 ? void 0 : envelope.totalPages) !== null && _c !== void 0 ? _c : 1;
45
+ if (currentPage >= totalPages || data.length < pageSize || data.length === 0) {
46
+ break;
47
+ }
48
+ }
49
+ return out;
50
+ }
51
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/transport.ts"],"names":[],"mappings":";;AAiCA,sDAgCC;AAgBD,sEAsCC;AAvHD,+CAUsB;AACtB,qCAAuC;AAsBhC,KAAK,UAAU,qBAAqB,CAE1C,MAA2B,EAC3B,QAAgB,EAChB,KAAkB,EAAE;;IAEpB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAE1D,MAAM,MAAM,GAAG,MAAM,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,QAAQ,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,WAAW,MAAM,qBAAqB,CAAC;IACvD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,E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,CAAC;QAElB,MAAM,WAAW,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,mCAAI,IAAI,CAAC;QAClD,MAAM,UAAU,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,mCAAI,CAAC,CAAC;QAE7C,IAAI,WAAW,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9E,MAAM;QACP,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { INodePropertyOptions } from 'n8n-workflow';
2
+ export type ResponseShape = 'paginated' | 'list' | 'object';
3
+ export type FilterType = 'string' | 'number' | 'boolean' | 'options';
4
+ export interface FilterDescriptor {
5
+ name: string;
6
+ displayName: string;
7
+ type: FilterType;
8
+ description: string;
9
+ required?: boolean;
10
+ default?: string | number | boolean;
11
+ options?: INodePropertyOptions[];
12
+ loadOptionsMethod?: string;
13
+ }
14
+ export interface OperationDescriptor {
15
+ value: string;
16
+ name: string;
17
+ action: string;
18
+ description: string;
19
+ endpoint: string;
20
+ shape: ResponseShape;
21
+ filters?: FilterDescriptor[];
22
+ }
23
+ export interface ResourceDescriptor {
24
+ value: string;
25
+ name: string;
26
+ description: string;
27
+ operations: OperationDescriptor[];
28
+ filters: FilterDescriptor[];
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../nodes/RocketCyber/shared/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "n8n-nodes-rocketcyber",
3
+ "version": "0.1.0",
4
+ "description": "RocketCyber (Kaseya managed SOC) node for n8n — query incidents, agents, events, firewalls, Microsoft 365, Defender status, and accounts. AI-agent ready.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/Earney-IT/n8n-nodes-rocketcyber",
7
+ "keywords": [
8
+ "n8n-community-node-package",
9
+ "rocketcyber",
10
+ "kaseya",
11
+ "soc",
12
+ "mdr",
13
+ "siem",
14
+ "security",
15
+ "msp"
16
+ ],
17
+ "author": {
18
+ "name": "Tristen Rice",
19
+ "email": "Tristen@earneyit.com"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/Earney-IT/n8n-nodes-rocketcyber.git"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/Earney-IT/n8n-nodes-rocketcyber/issues"
27
+ },
28
+ "scripts": {
29
+ "build": "n8n-node build",
30
+ "build:watch": "tsc --watch",
31
+ "dev": "n8n-node dev",
32
+ "lint": "n8n-node lint",
33
+ "lint:fix": "n8n-node lint --fix",
34
+ "test": "jest",
35
+ "release": "n8n-node release",
36
+ "prepublishOnly": "n8n-node build && npm test && n8n-node lint"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "CHANGELOG.md"
42
+ ],
43
+ "n8n": {
44
+ "n8nNodesApiVersion": 1,
45
+ "strict": false,
46
+ "credentials": [
47
+ "dist/credentials/RocketCyberApi.credentials.js"
48
+ ],
49
+ "nodes": [
50
+ "dist/nodes/RocketCyber/RocketCyber.node.js"
51
+ ]
52
+ },
53
+ "devDependencies": {
54
+ "@n8n/node-cli": "*",
55
+ "@types/jest": "^30.0.0",
56
+ "jest": "^30.4.2",
57
+ "prettier": "3.8.3",
58
+ "release-it": "20.0.1",
59
+ "ts-jest": "^29.4.11",
60
+ "typescript": "5.9.3"
61
+ },
62
+ "peerDependencies": {
63
+ "n8n-workflow": "*"
64
+ }
65
+ }
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "n8n-nodes-rocketcyber",
3
+ "version": "0.1.0",
4
+ "description": "RocketCyber (Kaseya managed SOC) node for n8n — query incidents, agents, events, firewalls, Microsoft 365, Defender status, and accounts. AI-agent ready.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/Earney-IT/n8n-nodes-rocketcyber",
7
+ "keywords": [
8
+ "n8n-community-node-package",
9
+ "rocketcyber",
10
+ "kaseya",
11
+ "soc",
12
+ "mdr",
13
+ "siem",
14
+ "security",
15
+ "msp"
16
+ ],
17
+ "author": {
18
+ "name": "Tristen Rice",
19
+ "email": "Tristen@earneyit.com"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/Earney-IT/n8n-nodes-rocketcyber.git"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/Earney-IT/n8n-nodes-rocketcyber/issues"
27
+ },
28
+ "scripts": {
29
+ "build": "n8n-node build",
30
+ "build:watch": "tsc --watch",
31
+ "dev": "n8n-node dev",
32
+ "lint": "n8n-node lint",
33
+ "lint:fix": "n8n-node lint --fix",
34
+ "test": "jest",
35
+ "release": "n8n-node release",
36
+ "prepublishOnly": "n8n-node build && npm test && n8n-node lint"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "CHANGELOG.md"
42
+ ],
43
+ "n8n": {
44
+ "n8nNodesApiVersion": 1,
45
+ "strict": false,
46
+ "credentials": [
47
+ "dist/credentials/RocketCyberApi.credentials.js"
48
+ ],
49
+ "nodes": [
50
+ "dist/nodes/RocketCyber/RocketCyber.node.js"
51
+ ]
52
+ },
53
+ "devDependencies": {
54
+ "@n8n/node-cli": "*",
55
+ "@types/jest": "^30.0.0",
56
+ "jest": "^30.4.2",
57
+ "prettier": "3.8.3",
58
+ "release-it": "20.0.1",
59
+ "ts-jest": "^29.4.11",
60
+ "typescript": "5.9.3"
61
+ },
62
+ "peerDependencies": {
63
+ "n8n-workflow": "*"
64
+ }
65
+ }