n8n-nodes-dominusnode 1.1.0 → 1.2.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/dist/index.d.ts +4 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/nodes/DominusNodeAccount/DominusNodeAccount.node.d.ts +23 -0
- package/dist/nodes/DominusNodeAccount/DominusNodeAccount.node.js +223 -0
- package/dist/nodes/DominusNodeAccount/DominusNodeAccount.node.js.map +1 -0
- package/dist/nodes/DominusNodeKeys/DominusNodeKeys.node.d.ts +20 -0
- package/dist/nodes/DominusNodeKeys/DominusNodeKeys.node.js +145 -0
- package/dist/nodes/DominusNodeKeys/DominusNodeKeys.node.js.map +1 -0
- package/dist/nodes/DominusNodePlans/DominusNodePlans.node.d.ts +19 -0
- package/dist/nodes/DominusNodePlans/DominusNodePlans.node.js +123 -0
- package/dist/nodes/DominusNodePlans/DominusNodePlans.node.js.map +1 -0
- package/dist/nodes/DominusNodeProxy/DominusNodeProxy.node.d.ts +2 -1
- package/dist/nodes/DominusNodeProxy/DominusNodeProxy.node.js +12 -1
- package/dist/nodes/DominusNodeProxy/DominusNodeProxy.node.js.map +1 -1
- package/dist/nodes/DominusNodeTeams/DominusNodeTeams.node.d.ts +27 -0
- package/dist/nodes/DominusNodeTeams/DominusNodeTeams.node.js +258 -0
- package/dist/nodes/DominusNodeTeams/DominusNodeTeams.node.js.map +1 -0
- package/dist/nodes/DominusNodeUsage/DominusNodeUsage.node.d.ts +3 -1
- package/dist/nodes/DominusNodeUsage/DominusNodeUsage.node.js +47 -1
- package/dist/nodes/DominusNodeUsage/DominusNodeUsage.node.js.map +1 -1
- package/dist/nodes/DominusNodeWallet/DominusNodeWallet.node.d.ts +5 -1
- package/dist/nodes/DominusNodeWallet/DominusNodeWallet.node.js +44 -1
- package/dist/nodes/DominusNodeWallet/DominusNodeWallet.node.js.map +1 -1
- package/package.json +7 -3
- package/src/index.ts +4 -0
- package/src/nodes/DominusNodeAccount/DominusNodeAccount.node.ts +283 -0
- package/src/nodes/DominusNodeKeys/DominusNodeKeys.node.ts +192 -0
- package/src/nodes/DominusNodePlans/DominusNodePlans.node.ts +154 -0
- package/src/nodes/DominusNodeProxy/DominusNodeProxy.node.ts +11 -1
- package/src/nodes/DominusNodeTeams/DominusNodeTeams.node.ts +351 -0
- package/src/nodes/DominusNodeUsage/DominusNodeUsage.node.ts +53 -1
- package/src/nodes/DominusNodeWallet/DominusNodeWallet.node.ts +52 -1
- package/tests/DominusNodeProxy.test.ts +2 -2
- package/tests/DominusNodeUsage.test.ts +2 -2
- package/tests/DominusNodeWallet.test.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,7 @@ export { DominusNodeApi } from "./credentials/DominusNodeApi.credentials";
|
|
|
2
2
|
export { DominusNodeProxy } from "./nodes/DominusNodeProxy/DominusNodeProxy.node";
|
|
3
3
|
export { DominusNodeWallet } from "./nodes/DominusNodeWallet/DominusNodeWallet.node";
|
|
4
4
|
export { DominusNodeUsage } from "./nodes/DominusNodeUsage/DominusNodeUsage.node";
|
|
5
|
+
export { DominusNodeAccount } from "./nodes/DominusNodeAccount/DominusNodeAccount.node";
|
|
6
|
+
export { DominusNodeKeys } from "./nodes/DominusNodeKeys/DominusNodeKeys.node";
|
|
7
|
+
export { DominusNodePlans } from "./nodes/DominusNodePlans/DominusNodePlans.node";
|
|
8
|
+
export { DominusNodeTeams } from "./nodes/DominusNodeTeams/DominusNodeTeams.node";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DominusNodeUsage = exports.DominusNodeWallet = exports.DominusNodeProxy = exports.DominusNodeApi = void 0;
|
|
3
|
+
exports.DominusNodeTeams = exports.DominusNodePlans = exports.DominusNodeKeys = exports.DominusNodeAccount = exports.DominusNodeUsage = exports.DominusNodeWallet = exports.DominusNodeProxy = exports.DominusNodeApi = void 0;
|
|
4
4
|
var DominusNodeApi_credentials_1 = require("./credentials/DominusNodeApi.credentials");
|
|
5
5
|
Object.defineProperty(exports, "DominusNodeApi", { enumerable: true, get: function () { return DominusNodeApi_credentials_1.DominusNodeApi; } });
|
|
6
6
|
var DominusNodeProxy_node_1 = require("./nodes/DominusNodeProxy/DominusNodeProxy.node");
|
|
@@ -9,4 +9,12 @@ var DominusNodeWallet_node_1 = require("./nodes/DominusNodeWallet/DominusNodeWal
|
|
|
9
9
|
Object.defineProperty(exports, "DominusNodeWallet", { enumerable: true, get: function () { return DominusNodeWallet_node_1.DominusNodeWallet; } });
|
|
10
10
|
var DominusNodeUsage_node_1 = require("./nodes/DominusNodeUsage/DominusNodeUsage.node");
|
|
11
11
|
Object.defineProperty(exports, "DominusNodeUsage", { enumerable: true, get: function () { return DominusNodeUsage_node_1.DominusNodeUsage; } });
|
|
12
|
+
var DominusNodeAccount_node_1 = require("./nodes/DominusNodeAccount/DominusNodeAccount.node");
|
|
13
|
+
Object.defineProperty(exports, "DominusNodeAccount", { enumerable: true, get: function () { return DominusNodeAccount_node_1.DominusNodeAccount; } });
|
|
14
|
+
var DominusNodeKeys_node_1 = require("./nodes/DominusNodeKeys/DominusNodeKeys.node");
|
|
15
|
+
Object.defineProperty(exports, "DominusNodeKeys", { enumerable: true, get: function () { return DominusNodeKeys_node_1.DominusNodeKeys; } });
|
|
16
|
+
var DominusNodePlans_node_1 = require("./nodes/DominusNodePlans/DominusNodePlans.node");
|
|
17
|
+
Object.defineProperty(exports, "DominusNodePlans", { enumerable: true, get: function () { return DominusNodePlans_node_1.DominusNodePlans; } });
|
|
18
|
+
var DominusNodeTeams_node_1 = require("./nodes/DominusNodeTeams/DominusNodeTeams.node");
|
|
19
|
+
Object.defineProperty(exports, "DominusNodeTeams", { enumerable: true, get: function () { return DominusNodeTeams_node_1.DominusNodeTeams; } });
|
|
12
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uFAA0E;AAAjE,4HAAA,cAAc,OAAA;AACvB,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA;AACzB,2FAAqF;AAA5E,2HAAA,iBAAiB,OAAA;AAC1B,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uFAA0E;AAAjE,4HAAA,cAAc,OAAA;AACvB,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA;AACzB,2FAAqF;AAA5E,2HAAA,iBAAiB,OAAA;AAC1B,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA;AACzB,8FAAwF;AAA/E,6HAAA,kBAAkB,OAAA;AAC3B,qFAA+E;AAAtE,uHAAA,eAAe,OAAA;AACxB,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA;AACzB,wFAAkF;AAAzE,yHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dominus Node Account n8n community node.
|
|
3
|
+
*
|
|
4
|
+
* Operations (6 tools):
|
|
5
|
+
* - Register: Create a new account
|
|
6
|
+
* - Login: Log in with email and password
|
|
7
|
+
* - Get Account Info: Get current account details
|
|
8
|
+
* - Verify Email: Verify email with a token
|
|
9
|
+
* - Resend Verification: Resend the email verification link
|
|
10
|
+
* - Update Password: Change account password
|
|
11
|
+
*
|
|
12
|
+
* Security:
|
|
13
|
+
* - Credential sanitization in error messages
|
|
14
|
+
* - Email and password validation
|
|
15
|
+
* - Control character rejection
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
|
20
|
+
export declare class DominusNodeAccount implements INodeType {
|
|
21
|
+
description: INodeTypeDescription;
|
|
22
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dominus Node Account n8n community node.
|
|
4
|
+
*
|
|
5
|
+
* Operations (6 tools):
|
|
6
|
+
* - Register: Create a new account
|
|
7
|
+
* - Login: Log in with email and password
|
|
8
|
+
* - Get Account Info: Get current account details
|
|
9
|
+
* - Verify Email: Verify email with a token
|
|
10
|
+
* - Resend Verification: Resend the email verification link
|
|
11
|
+
* - Update Password: Change account password
|
|
12
|
+
*
|
|
13
|
+
* Security:
|
|
14
|
+
* - Credential sanitization in error messages
|
|
15
|
+
* - Email and password validation
|
|
16
|
+
* - Control character rejection
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.DominusNodeAccount = void 0;
|
|
22
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
23
|
+
const auth_1 = require("../../shared/auth");
|
|
24
|
+
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
25
|
+
const CONTROL_CHAR_RE = /[\x00-\x1f\x7f]/;
|
|
26
|
+
class DominusNodeAccount {
|
|
27
|
+
description = {
|
|
28
|
+
displayName: "Dominus Node Account",
|
|
29
|
+
name: "dominusNodeAccount",
|
|
30
|
+
icon: "file:dominusnode.svg",
|
|
31
|
+
group: ["transform"],
|
|
32
|
+
version: 1,
|
|
33
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
34
|
+
description: "Manage Dominus Node account registration, login, and settings",
|
|
35
|
+
defaults: { name: "Dominus Node Account" },
|
|
36
|
+
inputs: ["main"],
|
|
37
|
+
outputs: ["main"],
|
|
38
|
+
credentials: [{ name: "dominusNodeApi", required: true }],
|
|
39
|
+
properties: [
|
|
40
|
+
{
|
|
41
|
+
displayName: "Operation",
|
|
42
|
+
name: "operation",
|
|
43
|
+
type: "options",
|
|
44
|
+
noDataExpression: true,
|
|
45
|
+
options: [
|
|
46
|
+
{ name: "Register", value: "register", description: "Create a new account", action: "Register" },
|
|
47
|
+
{ name: "Login", value: "login", description: "Log in with email and password", action: "Login" },
|
|
48
|
+
{ name: "Get Account Info", value: "getAccountInfo", description: "Get current account details", action: "Get account info" },
|
|
49
|
+
{ name: "Verify Email", value: "verifyEmail", description: "Verify email with a token", action: "Verify email" },
|
|
50
|
+
{ name: "Resend Verification", value: "resendVerification", description: "Resend email verification link", action: "Resend verification" },
|
|
51
|
+
{ name: "Update Password", value: "updatePassword", description: "Change account password", action: "Update password" },
|
|
52
|
+
],
|
|
53
|
+
default: "getAccountInfo",
|
|
54
|
+
},
|
|
55
|
+
// --- Register / Login ---
|
|
56
|
+
{
|
|
57
|
+
displayName: "Email",
|
|
58
|
+
name: "email",
|
|
59
|
+
type: "string",
|
|
60
|
+
default: "",
|
|
61
|
+
required: true,
|
|
62
|
+
description: "Account email address",
|
|
63
|
+
displayOptions: { show: { operation: ["register", "login"] } },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: "Password",
|
|
67
|
+
name: "password",
|
|
68
|
+
type: "string",
|
|
69
|
+
typeOptions: { password: true },
|
|
70
|
+
default: "",
|
|
71
|
+
required: true,
|
|
72
|
+
description: "Account password (8-128 characters)",
|
|
73
|
+
displayOptions: { show: { operation: ["register", "login"] } },
|
|
74
|
+
},
|
|
75
|
+
// --- Verify Email ---
|
|
76
|
+
{
|
|
77
|
+
displayName: "Verification Token",
|
|
78
|
+
name: "verificationToken",
|
|
79
|
+
type: "string",
|
|
80
|
+
default: "",
|
|
81
|
+
required: true,
|
|
82
|
+
description: "Email verification token received via email",
|
|
83
|
+
displayOptions: { show: { operation: ["verifyEmail"] } },
|
|
84
|
+
},
|
|
85
|
+
// --- Update Password ---
|
|
86
|
+
{
|
|
87
|
+
displayName: "Current Password",
|
|
88
|
+
name: "currentPassword",
|
|
89
|
+
type: "string",
|
|
90
|
+
typeOptions: { password: true },
|
|
91
|
+
default: "",
|
|
92
|
+
required: true,
|
|
93
|
+
description: "Current account password",
|
|
94
|
+
displayOptions: { show: { operation: ["updatePassword"] } },
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: "New Password",
|
|
98
|
+
name: "newPassword",
|
|
99
|
+
type: "string",
|
|
100
|
+
typeOptions: { password: true },
|
|
101
|
+
default: "",
|
|
102
|
+
required: true,
|
|
103
|
+
description: "New password (8-128 characters)",
|
|
104
|
+
displayOptions: { show: { operation: ["updatePassword"] } },
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
async execute() {
|
|
109
|
+
const items = this.getInputData();
|
|
110
|
+
const returnData = [];
|
|
111
|
+
const credentials = await this.getCredentials("dominusNodeApi");
|
|
112
|
+
const apiKey = credentials.apiKey;
|
|
113
|
+
const baseUrl = credentials.baseUrl || "https://api.dominusnode.com";
|
|
114
|
+
if (!apiKey) {
|
|
115
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API Key is required");
|
|
116
|
+
}
|
|
117
|
+
const agentSecret = credentials.agentSecret || undefined;
|
|
118
|
+
const auth = new auth_1.DominusNodeAuth(apiKey, baseUrl, 30000, agentSecret);
|
|
119
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
120
|
+
for (let i = 0; i < items.length; i++) {
|
|
121
|
+
try {
|
|
122
|
+
let result;
|
|
123
|
+
switch (operation) {
|
|
124
|
+
case "register": {
|
|
125
|
+
const email = this.getNodeParameter("email", i);
|
|
126
|
+
const password = this.getNodeParameter("password", i);
|
|
127
|
+
const safeEmail = validateEmail(this, email, i);
|
|
128
|
+
const safePassword = validatePassword(this, password, i);
|
|
129
|
+
result = await auth.apiRequest("POST", "/api/auth/register", {
|
|
130
|
+
email: safeEmail,
|
|
131
|
+
password: safePassword,
|
|
132
|
+
});
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "login": {
|
|
136
|
+
const email = this.getNodeParameter("email", i);
|
|
137
|
+
const password = this.getNodeParameter("password", i);
|
|
138
|
+
const safeEmail = validateEmail(this, email, i);
|
|
139
|
+
const safePassword = validatePassword(this, password, i);
|
|
140
|
+
result = await auth.apiRequest("POST", "/api/auth/login", {
|
|
141
|
+
email: safeEmail,
|
|
142
|
+
password: safePassword,
|
|
143
|
+
});
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
case "getAccountInfo": {
|
|
147
|
+
result = await auth.apiRequest("GET", "/api/auth/me");
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case "verifyEmail": {
|
|
151
|
+
const token = this.getNodeParameter("verificationToken", i);
|
|
152
|
+
if (!token || typeof token !== "string" || token.trim().length === 0) {
|
|
153
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Verification token is required", { itemIndex: i });
|
|
154
|
+
}
|
|
155
|
+
if (CONTROL_CHAR_RE.test(token)) {
|
|
156
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Token contains invalid control characters", { itemIndex: i });
|
|
157
|
+
}
|
|
158
|
+
result = await auth.apiRequest("POST", "/api/auth/verify-email", {
|
|
159
|
+
token: token.trim(),
|
|
160
|
+
});
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
case "resendVerification": {
|
|
164
|
+
result = await auth.apiRequest("POST", "/api/auth/resend-verification");
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case "updatePassword": {
|
|
168
|
+
const currentPassword = this.getNodeParameter("currentPassword", i);
|
|
169
|
+
const newPassword = this.getNodeParameter("newPassword", i);
|
|
170
|
+
validatePassword(this, currentPassword, i);
|
|
171
|
+
validatePassword(this, newPassword, i);
|
|
172
|
+
result = await auth.apiRequest("POST", "/api/auth/change-password", {
|
|
173
|
+
currentPassword,
|
|
174
|
+
newPassword,
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
default:
|
|
179
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`, { itemIndex: i });
|
|
180
|
+
}
|
|
181
|
+
returnData.push({ json: (result ?? {}) });
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
if (this.continueOnFail()) {
|
|
185
|
+
returnData.push({
|
|
186
|
+
json: {
|
|
187
|
+
error: (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)),
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (err instanceof n8n_workflow_1.NodeOperationError)
|
|
193
|
+
throw err;
|
|
194
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)), { itemIndex: i });
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return [returnData];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.DominusNodeAccount = DominusNodeAccount;
|
|
201
|
+
// ---------------------------------------------------------------------------
|
|
202
|
+
// Validation helpers
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
function validateEmail(ctx, email, itemIndex) {
|
|
205
|
+
const trimmed = (email ?? "").trim();
|
|
206
|
+
if (!trimmed || !EMAIL_RE.test(trimmed)) {
|
|
207
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), "A valid email address is required", { itemIndex });
|
|
208
|
+
}
|
|
209
|
+
if (trimmed.length > 254) {
|
|
210
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), "Email address too long (max 254 characters)", { itemIndex });
|
|
211
|
+
}
|
|
212
|
+
return trimmed;
|
|
213
|
+
}
|
|
214
|
+
function validatePassword(ctx, password, itemIndex) {
|
|
215
|
+
if (!password || password.length < 8) {
|
|
216
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), "Password must be at least 8 characters", { itemIndex });
|
|
217
|
+
}
|
|
218
|
+
if (password.length > 128) {
|
|
219
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), "Password must be at most 128 characters", { itemIndex });
|
|
220
|
+
}
|
|
221
|
+
return password;
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=DominusNodeAccount.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DominusNodeAccount.node.js","sourceRoot":"","sources":["../../../src/nodes/DominusNodeAccount/DominusNodeAccount.node.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,+CAOsB;AAEtB,4CAAmE;AAEnE,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAC9C,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,MAAa,kBAAkB;IAC7B,WAAW,GAAyB;QAClC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,8BAA8B;QACxC,WAAW,EAAE,+DAA+D;QAC5E,QAAQ,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAC1C,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACzD,UAAU,EAAE;YACV;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,IAAI;gBACtB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,EAAE,UAAU,EAAE;oBAChG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,E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,GAAG,CAAC,OAAO,EAAE,EACb,yCAAyC,EACzC,EAAE,SAAS,EAAE,CACd,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dominus Node Keys n8n community node.
|
|
3
|
+
*
|
|
4
|
+
* Operations (3 tools):
|
|
5
|
+
* - List Keys: List all API keys
|
|
6
|
+
* - Create Key: Create a new API key
|
|
7
|
+
* - Revoke Key: Revoke an existing API key
|
|
8
|
+
*
|
|
9
|
+
* Security:
|
|
10
|
+
* - UUID validation for key IDs
|
|
11
|
+
* - Control character rejection in labels
|
|
12
|
+
* - Credential sanitization in error messages
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
|
17
|
+
export declare class DominusNodeKeys implements INodeType {
|
|
18
|
+
description: INodeTypeDescription;
|
|
19
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dominus Node Keys n8n community node.
|
|
4
|
+
*
|
|
5
|
+
* Operations (3 tools):
|
|
6
|
+
* - List Keys: List all API keys
|
|
7
|
+
* - Create Key: Create a new API key
|
|
8
|
+
* - Revoke Key: Revoke an existing API key
|
|
9
|
+
*
|
|
10
|
+
* Security:
|
|
11
|
+
* - UUID validation for key IDs
|
|
12
|
+
* - Control character rejection in labels
|
|
13
|
+
* - Credential sanitization in error messages
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DominusNodeKeys = void 0;
|
|
19
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
20
|
+
const auth_1 = require("../../shared/auth");
|
|
21
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
22
|
+
const CONTROL_CHAR_RE = /[\x00-\x1f\x7f]/;
|
|
23
|
+
class DominusNodeKeys {
|
|
24
|
+
description = {
|
|
25
|
+
displayName: "Dominus Node Keys",
|
|
26
|
+
name: "dominusNodeKeys",
|
|
27
|
+
icon: "file:dominusnode.svg",
|
|
28
|
+
group: ["transform"],
|
|
29
|
+
version: 1,
|
|
30
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
31
|
+
description: "Manage Dominus Node API keys",
|
|
32
|
+
defaults: { name: "Dominus Node Keys" },
|
|
33
|
+
inputs: ["main"],
|
|
34
|
+
outputs: ["main"],
|
|
35
|
+
credentials: [{ name: "dominusNodeApi", required: true }],
|
|
36
|
+
properties: [
|
|
37
|
+
{
|
|
38
|
+
displayName: "Operation",
|
|
39
|
+
name: "operation",
|
|
40
|
+
type: "options",
|
|
41
|
+
noDataExpression: true,
|
|
42
|
+
options: [
|
|
43
|
+
{ name: "List Keys", value: "listKeys", description: "List all API keys", action: "List keys" },
|
|
44
|
+
{ name: "Create Key", value: "createKey", description: "Create a new API key", action: "Create key" },
|
|
45
|
+
{ name: "Revoke Key", value: "revokeKey", description: "Revoke an existing API key", action: "Revoke key" },
|
|
46
|
+
],
|
|
47
|
+
default: "listKeys",
|
|
48
|
+
},
|
|
49
|
+
// --- Create Key ---
|
|
50
|
+
{
|
|
51
|
+
displayName: "Label",
|
|
52
|
+
name: "keyLabel",
|
|
53
|
+
type: "string",
|
|
54
|
+
default: "",
|
|
55
|
+
required: true,
|
|
56
|
+
description: "Label for the new API key (max 100 chars)",
|
|
57
|
+
displayOptions: { show: { operation: ["createKey"] } },
|
|
58
|
+
},
|
|
59
|
+
// --- Revoke Key ---
|
|
60
|
+
{
|
|
61
|
+
displayName: "Key ID",
|
|
62
|
+
name: "keyId",
|
|
63
|
+
type: "string",
|
|
64
|
+
default: "",
|
|
65
|
+
required: true,
|
|
66
|
+
description: "UUID of the API key to revoke",
|
|
67
|
+
displayOptions: { show: { operation: ["revokeKey"] } },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
async execute() {
|
|
72
|
+
const items = this.getInputData();
|
|
73
|
+
const returnData = [];
|
|
74
|
+
const credentials = await this.getCredentials("dominusNodeApi");
|
|
75
|
+
const apiKey = credentials.apiKey;
|
|
76
|
+
const baseUrl = credentials.baseUrl || "https://api.dominusnode.com";
|
|
77
|
+
if (!apiKey) {
|
|
78
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API Key is required");
|
|
79
|
+
}
|
|
80
|
+
const agentSecret = credentials.agentSecret || undefined;
|
|
81
|
+
const auth = new auth_1.DominusNodeAuth(apiKey, baseUrl, 30000, agentSecret);
|
|
82
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
83
|
+
for (let i = 0; i < items.length; i++) {
|
|
84
|
+
try {
|
|
85
|
+
let result;
|
|
86
|
+
switch (operation) {
|
|
87
|
+
case "listKeys": {
|
|
88
|
+
result = await auth.apiRequest("GET", "/api/keys");
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case "createKey": {
|
|
92
|
+
const label = this.getNodeParameter("keyLabel", i);
|
|
93
|
+
if (!label || typeof label !== "string" || label.length === 0) {
|
|
94
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Key label is required", { itemIndex: i });
|
|
95
|
+
}
|
|
96
|
+
if (label.length > 100) {
|
|
97
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Key label must be 100 characters or fewer", { itemIndex: i });
|
|
98
|
+
}
|
|
99
|
+
if (CONTROL_CHAR_RE.test(label)) {
|
|
100
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Key label contains invalid control characters", { itemIndex: i });
|
|
101
|
+
}
|
|
102
|
+
result = await auth.apiRequest("POST", "/api/keys", { label });
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
case "revokeKey": {
|
|
106
|
+
const keyId = this.getNodeParameter("keyId", i);
|
|
107
|
+
validateUuid(this, keyId, "keyId", i);
|
|
108
|
+
result = await auth.apiRequest("DELETE", `/api/keys/${encodeURIComponent(keyId)}`);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
default:
|
|
112
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`, { itemIndex: i });
|
|
113
|
+
}
|
|
114
|
+
returnData.push({ json: (result ?? {}) });
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
if (this.continueOnFail()) {
|
|
118
|
+
returnData.push({
|
|
119
|
+
json: {
|
|
120
|
+
error: (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)),
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (err instanceof n8n_workflow_1.NodeOperationError)
|
|
126
|
+
throw err;
|
|
127
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)), { itemIndex: i });
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return [returnData];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.DominusNodeKeys = DominusNodeKeys;
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
// Validation helpers
|
|
136
|
+
// ---------------------------------------------------------------------------
|
|
137
|
+
function validateUuid(ctx, value, fieldName, itemIndex) {
|
|
138
|
+
if (!value || typeof value !== "string") {
|
|
139
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `${fieldName} is required`, { itemIndex });
|
|
140
|
+
}
|
|
141
|
+
if (!UUID_RE.test(value)) {
|
|
142
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `${fieldName} must be a valid UUID`, { itemIndex });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=DominusNodeKeys.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DominusNodeKeys.node.js","sourceRoot":"","sources":["../../../src/nodes/DominusNodeKeys/DominusNodeKeys.node.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAOsB;AAEtB,4CAAmE;AAEnE,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAClF,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,MAAa,eAAe;IAC1B,WAAW,GAAyB;QAClC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,8BAA8B;QACxC,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QACvC,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACzD,UAAU,EAAE;YACV;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,IAAI;gBACtB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE;oBAC/F,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,EAAE,YAAY,EAAE;oBACrG,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,EAAE,YAAY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AAU,CAAC,CAAC;IACtB,CAAC;CACF;AA/ID,0CA+IC;AAED,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E,SAAS,YAAY,CACnB,GAAsB,EACtB,KAAa,EACb,SAAiB,EACjB,SAAiB;IAEjB,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,SAAS,cAAc,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACzF,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,SAAS,uBAAuB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dominus Node Plans n8n community node.
|
|
3
|
+
*
|
|
4
|
+
* Operations (3 tools):
|
|
5
|
+
* - Get Plan: Get current user plan
|
|
6
|
+
* - List Plans: List all available plans
|
|
7
|
+
* - Change Plan: Switch to a different plan
|
|
8
|
+
*
|
|
9
|
+
* Security:
|
|
10
|
+
* - UUID validation for plan IDs
|
|
11
|
+
* - Credential sanitization in error messages
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
|
16
|
+
export declare class DominusNodePlans implements INodeType {
|
|
17
|
+
description: INodeTypeDescription;
|
|
18
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dominus Node Plans n8n community node.
|
|
4
|
+
*
|
|
5
|
+
* Operations (3 tools):
|
|
6
|
+
* - Get Plan: Get current user plan
|
|
7
|
+
* - List Plans: List all available plans
|
|
8
|
+
* - Change Plan: Switch to a different plan
|
|
9
|
+
*
|
|
10
|
+
* Security:
|
|
11
|
+
* - UUID validation for plan IDs
|
|
12
|
+
* - Credential sanitization in error messages
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.DominusNodePlans = void 0;
|
|
18
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
19
|
+
const auth_1 = require("../../shared/auth");
|
|
20
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
21
|
+
class DominusNodePlans {
|
|
22
|
+
description = {
|
|
23
|
+
displayName: "Dominus Node Plans",
|
|
24
|
+
name: "dominusNodePlans",
|
|
25
|
+
icon: "file:dominusnode.svg",
|
|
26
|
+
group: ["transform"],
|
|
27
|
+
version: 1,
|
|
28
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
29
|
+
description: "Manage Dominus Node subscription plans",
|
|
30
|
+
defaults: { name: "Dominus Node Plans" },
|
|
31
|
+
inputs: ["main"],
|
|
32
|
+
outputs: ["main"],
|
|
33
|
+
credentials: [{ name: "dominusNodeApi", required: true }],
|
|
34
|
+
properties: [
|
|
35
|
+
{
|
|
36
|
+
displayName: "Operation",
|
|
37
|
+
name: "operation",
|
|
38
|
+
type: "options",
|
|
39
|
+
noDataExpression: true,
|
|
40
|
+
options: [
|
|
41
|
+
{ name: "Get Plan", value: "getPlan", description: "Get current user plan", action: "Get plan" },
|
|
42
|
+
{ name: "List Plans", value: "listPlans", description: "List all available plans", action: "List plans" },
|
|
43
|
+
{ name: "Change Plan", value: "changePlan", description: "Switch to a different plan", action: "Change plan" },
|
|
44
|
+
],
|
|
45
|
+
default: "getPlan",
|
|
46
|
+
},
|
|
47
|
+
// --- Change Plan ---
|
|
48
|
+
{
|
|
49
|
+
displayName: "Plan ID",
|
|
50
|
+
name: "planId",
|
|
51
|
+
type: "string",
|
|
52
|
+
default: "",
|
|
53
|
+
required: true,
|
|
54
|
+
description: "UUID of the plan to switch to",
|
|
55
|
+
displayOptions: { show: { operation: ["changePlan"] } },
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
async execute() {
|
|
60
|
+
const items = this.getInputData();
|
|
61
|
+
const returnData = [];
|
|
62
|
+
const credentials = await this.getCredentials("dominusNodeApi");
|
|
63
|
+
const apiKey = credentials.apiKey;
|
|
64
|
+
const baseUrl = credentials.baseUrl || "https://api.dominusnode.com";
|
|
65
|
+
if (!apiKey) {
|
|
66
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API Key is required");
|
|
67
|
+
}
|
|
68
|
+
const agentSecret = credentials.agentSecret || undefined;
|
|
69
|
+
const auth = new auth_1.DominusNodeAuth(apiKey, baseUrl, 30000, agentSecret);
|
|
70
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
71
|
+
for (let i = 0; i < items.length; i++) {
|
|
72
|
+
try {
|
|
73
|
+
let result;
|
|
74
|
+
switch (operation) {
|
|
75
|
+
case "getPlan": {
|
|
76
|
+
result = await auth.apiRequest("GET", "/api/plans/user/plan");
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case "listPlans": {
|
|
80
|
+
result = await auth.apiRequest("GET", "/api/plans");
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case "changePlan": {
|
|
84
|
+
const planId = this.getNodeParameter("planId", i);
|
|
85
|
+
validateUuid(this, planId, "planId", i);
|
|
86
|
+
result = await auth.apiRequest("PUT", "/api/plans/user/plan", { planId });
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
default:
|
|
90
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`, { itemIndex: i });
|
|
91
|
+
}
|
|
92
|
+
returnData.push({ json: (result ?? {}) });
|
|
93
|
+
}
|
|
94
|
+
catch (err) {
|
|
95
|
+
if (this.continueOnFail()) {
|
|
96
|
+
returnData.push({
|
|
97
|
+
json: {
|
|
98
|
+
error: (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)),
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (err instanceof n8n_workflow_1.NodeOperationError)
|
|
104
|
+
throw err;
|
|
105
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, auth_1.sanitizeError)(err instanceof Error ? err.message : String(err)), { itemIndex: i });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return [returnData];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.DominusNodePlans = DominusNodePlans;
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// Validation helpers
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
function validateUuid(ctx, value, fieldName, itemIndex) {
|
|
116
|
+
if (!value || typeof value !== "string") {
|
|
117
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `${fieldName} is required`, { itemIndex });
|
|
118
|
+
}
|
|
119
|
+
if (!UUID_RE.test(value)) {
|
|
120
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `${fieldName} must be a valid UUID`, { itemIndex });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=DominusNodePlans.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DominusNodePlans.node.js","sourceRoot":"","sources":["../../../src/nodes/DominusNodePlans/DominusNodePlans.node.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,+CAOsB;AAEtB,4CAAmE;AAEnE,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAElF,MAAa,gBAAgB;IAC3B,WAAW,GAAyB;QAClC,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B,EACtB,KAAa,EACb,SAAiB,EACjB,SAAiB;IAEjB,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,SAAS,cAAc,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACzF,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,SAAS,uBAAuB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dominus Node Proxy n8n community node.
|
|
3
3
|
*
|
|
4
|
-
* Operations:
|
|
4
|
+
* Operations (4 tools):
|
|
5
5
|
* - Proxied Fetch: Make HTTP requests through Dominus Node's rotating proxy network
|
|
6
6
|
* - Get Proxy Config: Retrieve proxy endpoint configuration
|
|
7
7
|
* - List Active Sessions: List currently active proxy sessions
|
|
8
|
+
* - Get Proxy Status: Get proxy pool health and availability status
|
|
8
9
|
*
|
|
9
10
|
* Security:
|
|
10
11
|
* - Full SSRF prevention (private IPs, hex/octal/decimal, IPv6 variants,
|