cisco-axl
Version:
A library to make Cisco AXL a lot easier
60 lines (59 loc) • 2.29 kB
TypeScript
interface OperationOptions {
clean?: boolean;
dataContainerIdentifierTails?: string;
removeAttributes?: boolean;
}
/**
* Cisco axlService Service
* This is a service class that uses fetch and promises to pull AXL data from Cisco CUCM
*
* @class axlService
*/
declare class axlService {
private _OPTIONS;
/**
* Creates an instance of axlService.
* @param {string} host - CUCM hostname or IP address
* @param {string} username - CUCM username with AXL permissions
* @param {string} password - CUCM password
* @param {string} version - CUCM version (e.g. "14.0")
* @memberof axlService
*/
constructor(host: string, username: string, password: string, version: string);
/**
* Test authentication credentials against the AXL endpoint
* @returns {Promise<boolean>} - Resolves to true if authentication is successful
* @memberof axlService
*/
testAuthentication(): Promise<boolean>;
/**
* Private method to test authentication using a simple GET request to the AXL endpoint
* @returns {Promise<boolean>} - Resolves with true if authentication successful, false otherwise
* @private
*/
private _testAuthenticationDirectly;
/**
* Returns a list of available AXL operations
* @param {string} [filter] - Optional filter to narrow down operations
* @returns {Promise<string[]>} - Array of operation names
* @memberof axlService
*/
returnOperations(filter?: string): Promise<string[]>;
/**
* Gets the tags required for a specific AXL operation
* @param {string} operation - The AXL operation name
* @returns {Promise<any>} - Object containing the required tags
* @memberof axlService
*/
getOperationTags(operation: string): Promise<any>;
/**
* Executes an AXL operation against the CUCM
* @param {string} operation - The AXL operation to execute
* @param {any} tags - The tags required for the operation
* @param {OperationOptions} [opts] - Optional parameters for customizing the operation
* @returns {Promise<any>} - Result of the operation
* @memberof axlService
*/
executeOperation(operation: string, tags: any, opts?: OperationOptions): Promise<any>;
}
export = axlService;