UNPKG

@mindconnect/mindconnect-nodejs

Version:

NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy

97 lines (96 loc) 6.12 kB
import { SdkClient } from "../common/sdk-client"; import { EventAnalyticsModels } from "./eventanalytics-models"; /** * * Provides the essential functionality for a data-driven analysis of the event data. * * @export * @class EventAnalyticsClient * @extends {SdkClient} */ export declare class EventAnalyticsClient extends SdkClient { private _baseUrl; /** * * Finds the most frequent events, which are sorted by the number of appearances in a dataset in a descending order. * * @param {EventAnalyticsModels.TopEventsInputDataModel} data * Data structure with three parts - numberOfTopPositionsRequired, eventsMetadata, and events. * * numberOfTopPositionsRequired * How many top positions will be returned in the response. Has to be a positive integer. * If not specified, the default value 10 will be used. * * eventsMetadata * Metadata for the events list specifying the property name of the item in the events list that contains the text of the event. * * events * List with the events that will be processed. * @returns {Promise<EventAnalyticsModels.TopEventOutput>} * * Tuple containing frequency of event and event text * @example * [ { "appearances": 2, "text": "StatusFlame On" }, { "appearances": 1, "text": "INTRODUCING FUEL" } ] * @memberOf EventAnalyticsClient */ FindTopEvents(data: EventAnalyticsModels.TopEventsInputDataModel): Promise<EventAnalyticsModels.TopEventOutput>; /** * * Finds the most frequent events, which are sorted by the number of appearances in a dataset in a descending order. * * @param {EventAnalyticsModels.EventSearchInputDataModel} data * Data structure with three parts - numberOfTopPositionsRequired, eventsMetadata, and events. * *numberOfTopPositionsRequired * How many top positions will be returned in the response. Has to be a positive integer. If not specified, the default value 10 will be used. * *eventsMetadata * Metadata for the events list specifying the property name of the item in the events list that contains the text of the event. * *events * List with the events that will be processed. * @returns {Promise<EventAnalyticsModels.EventArrayOutput>} * Tuple containing frequency of event and event text * @example * [ { "appearances": 2, "text": "Status@Flame On" }, { "appearances": 1, "text": "INTRODUCING FUEL" } ] * @memberOf EventAnalyticsClient */ FilterEvents(data: EventAnalyticsModels.EventSearchInputDataModel): Promise<EventAnalyticsModels.EventArrayOutput>; /** * * The microservice takes as an input the entire dataset and the time resolution (example 100ms). * * The micro service will output the given time interval (startTime, endTime) and the resulted number of event occurrences. * * @param {EventAnalyticsModels.EventInput} data * Data structure with two parts eventsMetadata, events. * * eventsMetadata * Metadata for the events list specifying the property name of the item in the events list that contains the text of the event (eventTextPropertyName) and time window length in miliseconds of the period in which time interval will be split (splitInterval). * * events * List with the events that will be processed. * @returns {Promise<EventAnalyticsModels.EventCountOutput>} * Model containing startTime, endTime and number of events produced between startTime and endTime * @memberOf EventAnalyticsClient */ CountEvents(data: EventAnalyticsModels.EventInput): Promise<EventAnalyticsModels.EventCountOutput>; /** * * Determine pre-existing relationships between events for a requested temporal resolution (example 500ms) and reduce the data set by aggregating events with duplicate value. * * @param {EventAnalyticsModels.EventInput} data * Data structure with two parts eventsMetadata, events. * * eventsMetadata * Metadata for the events list specifying the property name of the item in the events list that contains the text of the event (eventTextPropertyName) and time window length in miliseconds of the period in which time interval will be split (splitInterval). * *events * List with the events that will be processed. * @returns {Promise<EventAnalyticsModels.DuplicateEventArrayOutput>} * * @memberOf EventAnalyticsClient */ RemoveDuplicateEvents(data: EventAnalyticsModels.EventInput): Promise<EventAnalyticsModels.DuplicateEventArrayOutput>; /** * Finds all instances of the specified pattern(s) in a collection of events. * * @param {EventAnalyticsModels.PatternMatchingInputDataModel} data * Data structure with four parts - maxPatternInterval, patternsList, nonEvents and eventsInput. * * maxPatternInterval * The maximum time length (in milliseconds) of the sliding window where the pattern occurs (Maximum difference allowed between the first event of the pattern and the last one). * * patternsList * The patterns to be found in events. The eventText can contain regular expressions. The acceptable syntax for the regular expressions is the java syntax. minRepetitions and maxRepetitions represent the minimum and maximum number of events of the specified type that are allowed to occur in order for the pattern to be matched on the events. * * nonEvents * A list of events that is not allowed to be part of a pattern. Any pattern which contains a non-event is excluded from the final report. * * eventsInput * Metadata for the events list specifying the property name of the item in the events list that contains the text of the event and the list with the events that will be processed. * @returns {Promise<EventAnalyticsModels.PatternMatchingOutput>} * Data model describing the output for the Pattern Matching functionality * @memberOf EventAnalyticsClient */ MatchEventPatterns(data: EventAnalyticsModels.PatternMatchingInputDataModel): Promise<EventAnalyticsModels.PatternMatchingOutput>; }