n8n-nodes-arubacentralnextgen
Version:
n8n community node for Aruba Central NextGen API integration with modern monitoring and management capabilities
29 lines (28 loc) • 986 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hierarchyScopes = void 0;
exports.getHierarchyEndpoint = getHierarchyEndpoint;
// helpers/hierarchyHelper.ts
exports.hierarchyScopes = [
{ name: 'Library', value: 'library' },
{ name: 'Global', value: 'global' },
{ name: 'Site Collection', value: 'siteCollection' },
{ name: 'Site', value: 'site' },
{ name: 'Device', value: 'device' },
];
function getHierarchyEndpoint(scope, id) {
switch (scope) {
case 'library':
return '/configuration/v1/library';
case 'global':
return '/configuration/v1/global';
case 'siteCollection':
return `/configuration/v1/site-collections/${id}`;
case 'site':
return `/configuration/v1/sites/${id}`;
case 'device':
return `/configuration/v1/devices/${id}`;
default:
throw new Error(`Invalid hierarchy scope: ${scope}`);
}
}