@ale-de/cirrus-node
Version:
Node to consume REST API of the Alcatel-Lucent Enterprise Cirrus Cloud Network Manager
319 lines (318 loc) • 10 kB
TypeScript
import { Observable } from 'rxjs';
export declare class CirrusAPI {
private cirrus;
token: string;
cookie: string;
constructor(host: string);
get version(): string;
get headers(): {
'Content-Type': string;
'Accept': string;
'Ov-App-Version': string;
'Cookie': string;
};
login(data: CirrusAPI.loginData): Promise<unknown>;
about(): Promise<CirrusAPI.ABOUT_DATA>;
getIotInventoryWithRetry(): Observable<CirrusAPI.IOTINVENTORY_DATA[]>;
getDevices(): Promise<CirrusAPI.DEVICES_DATA[]>;
getSsid(): Promise<CirrusAPI.SSID_DATA[]>;
updateSsidStatus(ssidInstanceId: string, status: boolean): Promise<any>;
addVlan(deviceId: string, vlan: string): Promise<any>;
deleteVlan(deviceId: string, vlan: number): Promise<any>;
}
export declare namespace CirrusAPI {
export interface loginData {
username: string;
password: string;
}
enum ResultResponseType {
IotInventoryResponse = "IotInventoryResponse"
}
enum ResponseType {
RESPONSE_SYNCHRONOUS = "RESPONSE_SYNCHRONOUS",
ArrayList = "ArrayList"
}
export interface Response {
"response": ResponseType;
"finalResponse": true;
"message": {
"code": string;
"params": [];
};
"ioTInventoryVOs"?: IOTINVENTORY_DATA[];
"pageSize": number;
"pageNumber": number;
"numberOfPages": number;
"totalNumberOfRecords": number;
"translated": {
"messageObjects": {};
"numberOfPagesTranslated": "1";
"finalResponseTranslated": "true";
"ioTInventoryVOs": [];
"messageTranslated": "";
"responseTranslated": "RESPONSE_SYNCHRONOUS";
"totalNumberOfRecordsTranslated": "26";
"pageNumberTranslated": "1";
"pageSizeTranslated": "1,000";
};
}
export interface CIRRUS_RESPONSE {
"status": string;
"statusCode": number;
"type": ResultResponseType;
"response": any;
"serverVersion": string;
}
export interface DEVICES_DATA {
deviceType: string;
name: string;
ipAddress: string;
model: any;
version: string;
location: string;
geoLocation: string;
geoLocationAddress: "";
deviceDNS: "";
deviceLastUpgradeStatus: "";
backupDate: Date;
backupVersion: any;
lastKnownUpAt: Date;
description: string;
status: string;
traps: string;
seenBy: string;
runningFrom: string;
iotStatus: string;
changes: string;
discoveredDateTime: Date;
macAddress: string;
sync: boolean;
supportsSsh: boolean;
allowPortDisabling: boolean;
licenseType: string;
featureIds: any;
friendlyName: string;
vpnIp: string;
dataVPNConnectivityStatus: any;
others: {};
discoverLinks: string;
groupName: any;
instanceid: string;
}
export interface SSID_DATA {
a_mpdu: string;
a_msdu: string;
aaaProfileForExternalCP: string;
aaaServerProfileName: string;
accessPolicyName: string;
accessPolicyOption: string;
accessRoleProfileName: string;
accessRoleTab: string;
aclAndQos: [];
allowBand: string;
appliedAPGroups: string[];
arpCreatedName: string;
authenticationDatabase: string;
authenticationStrategyName: string;
broadcastFilterARP: "disable";
broadcastFilterAll: "disable";
broadcastKeyRotation: "disable";
broadcastKeyRotationTimeInterval: 15;
byodAccessStrategyName: null;
byodRegistration: false;
bypassStatus: null;
classificationStatus: "disable";
clientConnectionLoggingLevel: "NONE";
clientIsolation: "disable";
clientSessionLogging: "disable";
clientsNumber: 6;
deviceSpecificPSK: "DISABLED";
dhcpOpt82Config: "disable";
domainList: null;
dot1pDownlinkBackground: [1, 2];
dot1pDownlinkBestEffort: [0, 3];
dot1pDownlinkVideo: [4, 5];
dot1pDownlinkVoice: [6, 7];
dot1pMappingEnable: "enable";
dot1pUplinkBackground: 1;
dot1pUplinkBestEffort: 0;
dot1pUplinkVideo: 4;
dot1pUplinkVoice: 6;
downstreamBandwidth: 0;
downstreamBurst: 0;
dscpDownlinkBackground: [8, 16];
dscpDownlinkBestEffort: [0, 24];
dscpDownlinkVideo: [32, 40];
dscpDownlinkVoice: [48, 56];
dscpMappingEnable: "enable";
dscpUplinkBackground: 8;
dscpUplinkBestEffort: 0;
dscpUplinkVideo: 32;
dscpUplinkVoice: 48;
dtimInterval: 1;
e0211bClientSupport: "enable";
e0211gClientSupport: "enable";
e0211kStatus: "disable";
e0211rStatus: "disable";
e0211vStatus: "disable";
employeeDatabase: null;
encryptionType: "WPA2_PSK_AES";
entropyStatus: "disable";
essid: "Dees netwerk";
externalCaptivePortal: "disable";
externalCaptivePortalConfig: null;
guestAccessStrategyName: null;
guestPortal: false;
hideSSID: "disable";
hotspot20Status: "disable";
httpsRedirection: "enable";
instanceid: string;
l3Roaming: "disable";
localBreakoutStatus: "disable";
locationPolicy: null;
loginBy: null;
macAllowEap: null;
macAuthPassProfileName: null;
macAuthStatus: "disable";
maxClientsPerBand: 64;
maxEgressBandwidth: null;
maxEgressDepth: null;
maxIngressBandwidth: null;
maxIngressDepth: null;
migratedSSID: false;
minBasicDataRate5G: 6000;
minBasicDataRate5GStatus: "disable";
minBasicDataRate24G: 1000;
minBasicDataRate24GStatus: "disable";
minSupportedDataRate5G: 6000;
minSupportedDataRate5GStatus: "disable";
minSupportedDataRate24G: 1000;
minSupportedDataRate24GStatus: "disable";
multicastChannelUtilization: 90;
multicastOptimization: "enable";
name: string;
networkType: string;
okcStatus: "disable";
operationName: null;
passphrase: "*****";
periodPolicy: null;
pmf: "Disabled";
port: null;
portalPage: null;
portalServer: "";
portalType: "No";
preSharedKey: null;
radiusServer: null;
radiusServerProfileName: null;
redirectUrl: "";
roamingConsortiumOIList: null;
securityLevel: "Personal";
securityLevelUI: "protectedGuests";
selfRegistration: null;
socialLogin: null;
socialLoginVendors: [];
ssidStatus: "enable";
staticRoutes: null;
translated: any;
trustOriginalDSCP: "disable";
ttsIpAddress: null;
tunnelId: null;
tunnelProfileName: null;
tunnelType: null;
upstreamBandwidth: 0;
upstreamBurst: 0;
urlToRedirect: null;
useNATOverTunnel: false;
venueName: null;
venueType: null;
version: 4;
vlanId: 0;
vlanRange: ["0"];
wListDomains: [];
wepKeyIndex: null;
wlanTimer: any;
}
export interface ABOUT_DATA {
productName: string;
revision: string;
designation: string;
buildNumber: string;
buildDate: string;
fullProductName: string;
others: {
upamVersion: string;
changeList: string;
wmaVersion: string;
};
}
export interface IOTINVENTORY_DATA {
"deviceInstanceId": string;
"macAddress": string;
"deviceMac": string;
"friendlyName": string;
"ipAddress": string;
"startTime": Date;
"stopTime": Date;
"status": string;
"lastUpdated": Date;
"manufacturer": string;
"endpointversion": string;
"score": number;
"agContext": {
"unp": string;
"unpType": string;
"policyList": string;
"authType": string;
"authStatus": string;
"connError": string;
};
"networkContext": {
"port": string;
"portType": string;
"portDescription": string;
"vlan": number;
"vpnID": number;
"farEndIP": string;
};
"prof": {
"opt55": any;
"opt60": any;
"userAgents": any;
"hosts": any;
};
"category": {
"categoryName": string;
"type": string;
"hierarchy": any;
};
}
export interface OVNOTIFICATION_DATA {
'instanceId': number;
'snmpVersion': number;
'date': Date;
'uptime': number;
'synopsis': string;
'desc': string;
'acked': boolean;
'name': string;
'severity': string;
'agentIp': string;
'agentSysName': string;
'sourceIp': string;
'trapOID': string;
'snmpVars': [{
'name': string;
'value': string;
'desc': string;
}];
'enterprise': string;
'enterpriseOID': string;
'generic': number;
'specific': number;
'groupName': string;
'macAddress': string;
'deviceId': string;
'snmpV1SpecificTrapKeyList': [];
}
export {};
}