UNPKG

@mindconnect/mindconnect-nodejs

Version:

MindConnect Library for NodeJS (community based)

64 lines (63 loc) 2.46 kB
import { DiagnosticInformation, OnlineStatus, PagedDiagnosticActivation, PagedDiagnosticInformation } from ".."; import { CredentialAuth } from "./credential-auth"; import { OnboardingStatus } from "./mindconnect-models"; /** * This class can be used to perform some setup tasks * which can't be performed with the mindconnect agent itself. * * It is mostly used by the CLI to offboard the agents, clean up etc. * * @export * @class MindConnectSetup */ export declare class MindConnectSetup extends CredentialAuth { /** * Register the agent for diagnostics. * * @param {string} agentId * @returns * * @memberOf MindConnectSetup */ RegisterForDiagnostic(agentId: string): Promise<any>; /** * Unregister the agent from the diagnostics. * * @param {string} agentId * @param {boolean} [ignoreError=false] * @returns * * @memberOf MindConnectSetup */ DeleteDiagnostic(agentId: string, ignoreError?: boolean): Promise<true | undefined>; private DeleteActivation; /** * Delete all diagnostic activations. As there are only 5 global diagnostic activations this can have unintended consequences. * Use with care. * * @memberOf MindConnectSetup */ DeleteAllDiagnosticActivations(): Promise<void>; /** * Gets all registered agents for diagnostic. * * @returns {Promise<PagedDiagnosticActivation>} * * @memberOf MindConnectSetup */ GetDiagnosticActivations(): Promise<PagedDiagnosticActivation>; /** * Gets the diagnostic information for the registered agent(s) * * @param {string} [agentId] - Optional: If passed, only logs for this agent will be retrieved. * @param {(x: DiagnosticInformation[], ...args: any[]) => any} [callback] - Optional: pass the function which will handle the paged diagnostic info. The CLI uses printing to console function * @param {*} [callbackOptions] * @returns * * @memberOf MindConnectSetup */ GetDiagnosticInformation(agentId?: string, callback?: (x: DiagnosticInformation[], ...args: any[]) => any, callbackOptions?: any, skipToLast?: boolean): Promise<PagedDiagnosticInformation>; private GetPagedInforamtion; GetAgentStatus(agentId: string): Promise<OnlineStatus>; GetBoardingStatus(agentId: string): Promise<OnboardingStatus>; }