n8n-nodes-arubaclearpass 1.0.1 → 1.0.2
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Cybernetic Node Composer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -68,9 +68,16 @@ async function createEnforcementProfile() {
|
|
|
68
68
|
body.action = action;
|
|
69
69
|
}
|
|
70
70
|
// Add complex configuration
|
|
71
|
-
const
|
|
71
|
+
const profileConfigRaw = this.getNodeParameter('profileConfig', 0, '{}');
|
|
72
72
|
try {
|
|
73
|
-
|
|
73
|
+
let profileConfig;
|
|
74
|
+
// Handle both string (JSON) and object inputs
|
|
75
|
+
if (typeof profileConfigRaw === 'string') {
|
|
76
|
+
profileConfig = JSON.parse(profileConfigRaw);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
profileConfig = profileConfigRaw;
|
|
80
|
+
}
|
|
74
81
|
// Merge the profile config with the body
|
|
75
82
|
Object.entries(profileConfig).forEach(([key, value]) => {
|
|
76
83
|
body[key] = value;
|
|
@@ -168,7 +175,14 @@ async function updateEnforcementProfile() {
|
|
|
168
175
|
// Handle complex profile configuration if provided
|
|
169
176
|
if (updateFields.profileConfig) {
|
|
170
177
|
try {
|
|
171
|
-
|
|
178
|
+
let profileConfig;
|
|
179
|
+
// Handle both string (JSON) and object inputs
|
|
180
|
+
if (typeof updateFields.profileConfig === 'string') {
|
|
181
|
+
profileConfig = JSON.parse(updateFields.profileConfig);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
profileConfig = updateFields.profileConfig;
|
|
185
|
+
}
|
|
172
186
|
// Merge the profile config with the body
|
|
173
187
|
Object.entries(profileConfig).forEach(([key, value]) => {
|
|
174
188
|
body[key] = value;
|
|
@@ -219,7 +233,14 @@ async function updateEnforcementProfileByName() {
|
|
|
219
233
|
// Handle complex profile configuration if provided
|
|
220
234
|
if (updateFields.profileConfig) {
|
|
221
235
|
try {
|
|
222
|
-
|
|
236
|
+
let profileConfig;
|
|
237
|
+
// Handle both string (JSON) and object inputs
|
|
238
|
+
if (typeof updateFields.profileConfig === 'string') {
|
|
239
|
+
profileConfig = JSON.parse(updateFields.profileConfig);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
profileConfig = updateFields.profileConfig;
|
|
243
|
+
}
|
|
223
244
|
// Merge the profile config with the body
|
|
224
245
|
Object.entries(profileConfig).forEach(([key, value]) => {
|
|
225
246
|
body[key] = value;
|
|
@@ -267,9 +288,16 @@ async function replaceEnforcementProfile() {
|
|
|
267
288
|
body.action = action;
|
|
268
289
|
}
|
|
269
290
|
// Add complex configuration
|
|
270
|
-
const
|
|
291
|
+
const profileConfigRaw = this.getNodeParameter('profileConfig', 0, '{}');
|
|
271
292
|
try {
|
|
272
|
-
|
|
293
|
+
let profileConfig;
|
|
294
|
+
// Handle both string (JSON) and object inputs
|
|
295
|
+
if (typeof profileConfigRaw === 'string') {
|
|
296
|
+
profileConfig = JSON.parse(profileConfigRaw);
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
profileConfig = profileConfigRaw;
|
|
300
|
+
}
|
|
273
301
|
// Merge the profile config with the body
|
|
274
302
|
Object.entries(profileConfig).forEach(([key, value]) => {
|
|
275
303
|
body[key] = value;
|
|
@@ -316,9 +344,16 @@ async function replaceEnforcementProfileByName() {
|
|
|
316
344
|
body.action = action;
|
|
317
345
|
}
|
|
318
346
|
// Add complex configuration
|
|
319
|
-
const
|
|
347
|
+
const profileConfigRaw = this.getNodeParameter('profileConfig', 0, '{}');
|
|
320
348
|
try {
|
|
321
|
-
|
|
349
|
+
let profileConfig;
|
|
350
|
+
// Handle both string (JSON) and object inputs
|
|
351
|
+
if (typeof profileConfigRaw === 'string') {
|
|
352
|
+
profileConfig = JSON.parse(profileConfigRaw);
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
profileConfig = profileConfigRaw;
|
|
356
|
+
}
|
|
322
357
|
// Merge the profile config with the body
|
|
323
358
|
Object.entries(profileConfig).forEach(([key, value]) => {
|
|
324
359
|
body[key] = value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-arubaclearpass",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
File without changes
|