UNPKG

@kusto/language-service

Version:

Azure Data Explorer (a.k.a Kusto) language service for javascript (legacy code)

1,130 lines (1,087 loc) 242 kB
/// <reference path="./bridge.d.ts" /> declare namespace Kusto.Charting { interface AnomalyDataHelper2 { } interface AnomalyDataHelper2Func extends Function { prototype: AnomalyDataHelper2; AnomalyDataFromServiceResult: Kusto.Charting.AnomalyDataHelper2.AnomalyDataFromServiceResultFunc; AnomalyInputOutputRecord: Kusto.Charting.AnomalyDataHelper2.AnomalyInputOutputRecordFunc; new (): AnomalyDataHelper2; TimestampColumnName: string | null; ValueColumnName: string | null; SeriesColumnName: string | null; AnomalySerieSuffix: string | null; EnchanceDataWithAnomalyDataFromServiceAsync(kustoContext: Kusto.Charting.IKustoClientContext | null, data: System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null): System.Threading.Tasks.Task$1<Kusto.Charting.AnomalyDataHelper2.AnomalyDataFromServiceResult> | null; DataItemsToDataTableLiteral(items: System.Collections.Generic.IEnumerable$1<Kusto.Charting.DataItem> | null): string | null; EnchanceDataWithAnomalyDataFromColumns(data: System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null, yColumns: string[] | null, anomalyColumns: string[] | null, anomalySeriesMap: {v: System.Collections.Generic.Dictionary$2<string,string> | null}): System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null; } var AnomalyDataHelper2: AnomalyDataHelper2Func; module AnomalyDataHelper2 { interface AnomalyDataFromServiceResult { Data: System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null; HasErrors: boolean; Message: string | null; } interface AnomalyDataFromServiceResultFunc extends Function { prototype: AnomalyDataFromServiceResult; new (): AnomalyDataFromServiceResult; } interface AnomalyInputOutputRecord { Timestamp: System.DateTime; Value: number; Series: string | null; } interface AnomalyInputOutputRecordFunc extends Function { prototype: AnomalyInputOutputRecord; new (): AnomalyInputOutputRecord; } } enum ValidationStatus { Valid = 0, PolicyViolationError = 1, PolicyViolationWarning = 2 } interface SeriesCreationException extends System.Exception { } interface SeriesCreationExceptionFunc extends Function { prototype: SeriesCreationException; new (error: string | null): SeriesCreationException; } var SeriesCreationException: SeriesCreationExceptionFunc; interface IKustoClientContext { Kusto$Charting$IKustoClientContext$ExecuteQueryAsync<TRow>(TRow: {prototype: TRow}, query: string | null): System.Threading.Tasks.Task$1<System.Collections.Generic.IEnumerable$1<TRow>> | null; ExecuteQueryAsync<TRow>(TRow: {prototype: TRow}, query: string | null): System.Threading.Tasks.Task$1<System.Collections.Generic.IEnumerable$1<TRow>> | null; } interface IChartingDataSource { /** * Amount of rows * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartingDataSource * @function Kusto$Charting$IChartingDataSource$RowsCount * @type number */ Kusto$Charting$IChartingDataSource$RowsCount: number; RowsCount: number; /** * Provides default values of NA for different types, used by JS to set the right empty values * * @instance * @abstract * @public * @this Kusto.Charting.IChartingDataSource * @memberof Kusto.Charting.IChartingDataSource * @param {string} defaultString * @param {number} defaultNumeric * @param {System.DateTime} defaultDatetime * @param {?System.TimeSpan} defaultTimespan * @return {void} */ Kusto$Charting$IChartingDataSource$SetupDefaultValues(defaultString: string | null, defaultNumeric: number, defaultDatetime: System.DateTime, defaultTimespan: System.TimeSpan | null): void; SetupDefaultValues(defaultString: string | null, defaultNumeric: number, defaultDatetime: System.DateTime, defaultTimespan: System.TimeSpan | null): void; /** * Provides access to Table schema * * @instance * @abstract * @public * @this Kusto.Charting.IChartingDataSource * @memberof Kusto.Charting.IChartingDataSource * @return {System.Collections.Generic.IEnumerable$1} Collection of Tuples where Item1:ColumnName, Item2:ColumnType */ Kusto$Charting$IChartingDataSource$GetSchema(): System.Collections.Generic.IEnumerable$1<System.Tuple$2<string,Kusto.Charting.ArgumentColumnType>> | null; GetSchema(): System.Collections.Generic.IEnumerable$1<System.Tuple$2<string,Kusto.Charting.ArgumentColumnType>> | null; /** * Provides access to data from specific cell * * @instance * @abstract * @public * @this Kusto.Charting.IChartingDataSource * @memberof Kusto.Charting.IChartingDataSource * @param {number} row Row index * @param {number} column Column index * @return {number} */ Kusto$Charting$IChartingDataSource$GetNumericValue(row: number, column: number): number; GetNumericValue(row: number, column: number): number; Kusto$Charting$IChartingDataSource$UpdateArgumentData(row: number, column: number, argumentData: Kusto.Charting.BaseArgumentData | null): void; UpdateArgumentData(row: number, column: number, argumentData: Kusto.Charting.BaseArgumentData | null): void; Kusto$Charting$IChartingDataSource$GetStringValue(row: number, column: number): string | null; GetStringValue(row: number, column: number): string | null; } interface GeospatialCoordinates { Longitude: number; Latitude: number; } interface GeospatialCoordinatesFunc extends Function { prototype: GeospatialCoordinates; new (): GeospatialCoordinates; } var GeospatialCoordinates: GeospatialCoordinatesFunc; interface DateTimeFormatter { } interface DateTimeFormatterFunc extends Function { prototype: DateTimeFormatter; new (): DateTimeFormatter; ChooseDateTimeFormat(start: System.DateTime, end: System.DateTime): string | null; } var DateTimeFormatter: DateTimeFormatterFunc; interface DataItem { SeriesName: string | null; ArgumentData: string | null; ValueData: number; ValueName: string | null; ArgumentDateTime: System.DateTime; ArgumentTimeSpan: System.TimeSpan | null; ArgumentNumeric: number; GeoCoordinates: Kusto.Charting.GeospatialCoordinates | null; SecondaryAxisYName: string | null; PrefferredChartKind: Kusto.Charting.ChartKind; Properties: string | null; /** * Truncated value of the property - used for tooltip presentation. * * @instance * @public * @readonly * @memberof Kusto.Charting.DataItem * @function PropertiesTruncated * @type string */ PropertiesTruncated: string | null; Clone(): Kusto.Charting.DataItem | null; } interface DataItemFunc extends Function { prototype: DataItem; new (): DataItem; ctor: { new (): DataItem }; $ctor1: { new (other: Kusto.Charting.DataItem | null): DataItem }; } var DataItem: DataItemFunc; interface ExtendedDouble { } interface ExtendedDoubleFunc extends Function { prototype: ExtendedDouble; new (): ExtendedDouble; IsFinite(d: number): boolean; } var ExtendedDouble: ExtendedDoubleFunc; /** @namespace Kusto.Charting */ /** * Chart meta data Describe the columns that will be used for the chart * * @abstract * @public * @class Kusto.Charting.IChartMetaData */ interface IChartMetaData { /** * The requested argument type * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$ArgumentColumnType * @type Kusto.Charting.ArgumentColumnType */ Kusto$Charting$IChartMetaData$ArgumentColumnType: Kusto.Charting.ArgumentColumnType; ArgumentColumnType: Kusto.Charting.ArgumentColumnType; /** * The index of the chart argument data column * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$ArgumentDataColumnIndex * @type number */ Kusto$Charting$IChartMetaData$ArgumentDataColumnIndex: number; ArgumentDataColumnIndex: number; Kusto$Charting$IChartMetaData$GeospatialColumnIndexes: System.Collections.Generic.IEnumerable$1<number> | null; GeospatialColumnIndexes: System.Collections.Generic.IEnumerable$1<number> | null; /** * The indexes of the chart series columns * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$SeriesIndexes * @type System.Collections.Generic.IEnumerable$1 */ Kusto$Charting$IChartMetaData$SeriesIndexes: System.Collections.Generic.IEnumerable$1<number> | null; SeriesIndexes: System.Collections.Generic.IEnumerable$1<number> | null; /** * The indexes of the chart data columns * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$DataIndexes * @type System.Collections.Generic.IEnumerable$1 */ Kusto$Charting$IChartMetaData$DataIndexes: System.Collections.Generic.IEnumerable$1<number> | null; DataIndexes: System.Collections.Generic.IEnumerable$1<number> | null; /** * Column indexes in the original data that are not used as argument, values, or series * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$UnusedIndexes * @type System.Collections.Generic.IEnumerable$1 */ Kusto$Charting$IChartMetaData$UnusedIndexes: System.Collections.Generic.IEnumerable$1<number> | null; UnusedIndexes: System.Collections.Generic.IEnumerable$1<number> | null; /** * Is the data provided as series * * @instance * @abstract * @public * @memberof Kusto.Charting.IChartMetaData * @function Kusto$Charting$IChartMetaData$IsDataFormedAsSeries * @type boolean */ Kusto$Charting$IChartMetaData$IsDataFormedAsSeries: boolean; IsDataFormedAsSeries: boolean; } interface DataChartsHelper { } interface DataChartsHelperFunc extends Function { prototype: DataChartsHelper; ArgumentData: Kusto.Charting.DataChartsHelper.ArgumentDataFunc; ChartMetaData: Kusto.Charting.DataChartsHelper.ChartMetaDataFunc; SeriesStatsCounters: Kusto.Charting.DataChartsHelper.SeriesStatsCountersFunc; GeoJSONPoint: Kusto.Charting.DataChartsHelper.GeoJSONPointFunc; GeoJSON: DataChartsHelper.GeoJSONFunc; new (): DataChartsHelper; /** * Generates set of a DataItem objects from provided structure, based on required argument parameters(column type and restrictions). Takes in account x-columns, y-columns and series if provided. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Charting.IChartingDataSource} table Data source, which has to implement IChartingDataSource. * @param {Kusto.Charting.ArgumentColumnType} argumentColumnType Required column type * @param {Kusto.Charting.ArgumentRestrictions} argumentRestrictions Argument restrictions * @param {System.Collections.Generic.IEnumerable$1} seriesColumns Optional. Names of columns to be considered as series. * @param {boolean} accumulateResults Optional. Defines the necessity of accumulation in each DataItem values from the previous ones. Default - false. * @param {string} xColumn Optional. Name of column to be considered as an argument. * @param {System.Collections.Generic.IEnumerable$1} yColumns Optional. Names of columns to be considered as a function. * @return {System.Collections.Generic.IEnumerable$1} Collection of DataItem objects. */ GetData(table: Kusto.Charting.IChartingDataSource | null, argumentColumnType?: Kusto.Charting.ArgumentColumnType, argumentRestrictions?: Kusto.Charting.ArgumentRestrictions, seriesColumns?: System.Collections.Generic.IEnumerable$1<string> | null, accumulateResults?: boolean, xColumn?: string | null, yColumns?: System.Collections.Generic.IEnumerable$1<string> | null): System.Collections.Generic.IEnumerable$1<Kusto.Charting.DataItem> | null; /** * Generates set of a DataItem objects from provided structure, based on chart meta data * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Charting.IChartingDataSource} table Data source, which has to implement IChartingDataSource. * @param {Kusto.Charting.IChartMetaData} metaData chart meta data (argument, series and data columns) for data generation * @param {boolean} accumulateResults Optional. Defines the necessity of accumulation in each DataItem values from the previous ones. Default - false. * @return {System.Collections.Generic.IEnumerable$1} Collection of DataItem objects. */ GetData$1(table: Kusto.Charting.IChartingDataSource | null, metaData: Kusto.Charting.IChartMetaData | null, accumulateResults?: boolean): System.Collections.Generic.IEnumerable$1<Kusto.Charting.DataItem> | null; /** * Figure out the chart meta data, which that will be used to generate the chart data based on required argument parameters(column type and restrictions). Takes in account x-columns, y-columns and series if provided. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Charting.IChartingDataSource} table Data source, which has to implement IChartingDataSource. * @param {Kusto.Charting.ArgumentColumnType} argumentColumnType Required column type * @param {Kusto.Charting.ArgumentRestrictions} argumentRestrictions Argument restrictions * @param {System.Collections.Generic.IEnumerable$1} seriesColumns Optional. Names of columns to be considered as series. * @param {string} xColumn Optional. Name of column to be considered as an argument. * @param {System.Collections.Generic.IEnumerable$1} yColumns Optional. Names of columns to be considered as a function. * @return {Kusto.Charting.IChartMetaData} return the actual argument, series and data columns or null if fails */ GetMetaData(table: Kusto.Charting.IChartingDataSource | null, argumentColumnType?: Kusto.Charting.ArgumentColumnType, argumentRestrictions?: Kusto.Charting.ArgumentRestrictions, seriesColumns?: System.Collections.Generic.IEnumerable$1<string> | null, xColumn?: string | null, yColumns?: System.Collections.Generic.IEnumerable$1<string> | null): Kusto.Charting.IChartMetaData | null; /** * Figure out the chart meta data, which that will be used to generate the chart data for line-chart. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Data.Utils.ChartVisualizationOptions} options * @param {Kusto.Charting.IChartingDataSource} dataSource * @param {System.Collections.Generic.List$1} data * @param {Array.<string>} yColumnsToResolve * @param {Kusto.Charting.ArgumentColumnType} argumentType * @return {System.Collections.Generic.List$1} */ GetDataForLineChart(options: Kusto.Data.Utils.ChartVisualizationOptions | null, dataSource: Kusto.Charting.IChartingDataSource | null, data: System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null, yColumnsToResolve: string[] | null, argumentType: {v: Kusto.Charting.ArgumentColumnType}): System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null; /** * Detects if provided type is numeric. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Type} type Type to be analyzed. * @param {boolean} considerDateTimeAndTimeSpanAsNumeric Optional. Defines if DateTime and TimeSpan should be considered as numeric. Default - true. * @return {boolean} True, if provided type is numreic, false - if not. */ IsNumericType(type: System.Type | null, considerDateTimeAndTimeSpanAsNumeric?: boolean): boolean; /** * Returns names of columns, from provided data source, which which may be considered as an argument. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Charting.IChartingDataSource} table Data source, which has to implement IChartingDataSource. * @param {System.Collections.Generic.IEnumerable$1} columnsToExclude Optional. Columns to be excluded from detection. * @return {System.Collections.Generic.IEnumerable$1} Collection of columns' names. */ GetAllArgumentColumns(table: Kusto.Charting.IChartingDataSource | null, columnsToExclude?: System.Collections.Generic.IEnumerable$1<string> | null): System.Collections.Generic.IEnumerable$1<string> | null; /** * Detects the first column of type string. * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Kusto.Charting.IChartingDataSource} table Data source, which has to implement IChartingDataSource. * @param {number} amountToSkip Amount of columns type string to be skipped * @return {string} Name of first column of type string. */ GetFirstStringColumnName(table: Kusto.Charting.IChartingDataSource | null, amountToSkip?: number): string | null; /** * Method fills gaps in arguments sequence in collection of DataItems, pasting new items with NaN values * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Collections.Generic.List$1} data Input collection of DataItems. For consistent result, data should be sorted. * @param {Kusto.Charting.ArgumentColumnType} argType Type of argument * @return {System.Collections.Generic.List$1} */ FillGapsWithNaNs(data: System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null, argType: Kusto.Charting.ArgumentColumnType): System.Collections.Generic.List$1<Kusto.Charting.DataItem> | null; /** * Method resolves probable type of argument based on generated data items * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Collections.Generic.IEnumerable$1} data List of DataItems, which used as data source for visualization * @return {Kusto.Charting.ArgumentColumnType} Type of data */ ResolveArgumentType(data: System.Collections.Generic.IEnumerable$1<Kusto.Charting.DataItem> | null): Kusto.Charting.ArgumentColumnType; /** * The method checks whether the data is suitable for visualization based on provided limits * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Collections.Generic.IEnumerable$1} data Data co check * @param {Kusto.Charting.ArgumentColumnType} argType Type of argument * @param {Kusto.Charting.ChartLimitsPolicy} limits Data limitations * @param {System.String} error Description of found overlimits * @return {Kusto.Charting.ValidationStatus} State of processed validation */ ValidateData(data: System.Collections.Generic.IEnumerable$1<Kusto.Charting.DataItem> | null, argType: Kusto.Charting.ArgumentColumnType, limits: Kusto.Charting.ChartLimitsPolicy | null, error: {v: string | null}): Kusto.Charting.ValidationStatus; /** * Function resolves the type of data from JSON array represented as a string * * @static * @public * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {string} value Input string. Expected to be JSON array * @return {Kusto.Charting.ArgumentColumnType} Type of data */ ResolveJsonArrayType(value: string | null): Kusto.Charting.ArgumentColumnType; /** * Calculates intervals between values in collection * * @static * @private * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {Array.<number>} collection * @return {Array.<number>} Array of doubles */ /** * from the table columns and reuirements, deduce the x, y, and series axis. * * @static * @private * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Collections.Generic.IEnumerable$1} columns * @param {Kusto.Charting.IChartingDataSource} table * @param {System.Collections.Generic.IEnumerable$1} seriesColumns * @param {Kusto.Charting.ArgumentRestrictions} argumentRestrictions * @param {Kusto.Charting.DataChartsHelper.ChartMetaData} metaData * @return {boolean} */ /** * from the table columns and requirements, deduce the x, y, and series axis. * * @static * @private * @this Kusto.Charting.DataChartsHelper * @memberof Kusto.Charting.DataChartsHelper * @param {System.Collections.Generic.IEnumerable$1} columns * @param {Kusto.Charting.IChartingDataSource} table * @param {Kusto.Charting.ArgumentRestrictions} argumentRestrictions * @param {Kusto.Charting.DataChartsHelper.ChartMetaData} metaData * @return {boolean} */ } var DataChartsHelper: DataChartsHelperFunc; module DataChartsHelper { /** * The class will pre-calculate the argument value and convert it to different types. * * @private * @class Kusto.Charting.DataChartsHelper.ArgumentData * @augments Kusto.Charting.BaseArgumentData */ interface ArgumentData extends Kusto.Charting.BaseArgumentData { } interface ArgumentDataFunc extends Function { prototype: ArgumentData; } interface ChartMetaData extends Kusto.Charting.IChartMetaData { ArgumentColumnType: Kusto.Charting.ArgumentColumnType; ArgumentDataColumnIndex: number; GeospatialColumnIndexes: System.Collections.Generic.IEnumerable$1<number> | null; SeriesIndexes: System.Collections.Generic.IEnumerable$1<number> | null; DataIndexes: System.Collections.Generic.IEnumerable$1<number> | null; IsDataFormedAsSeries: boolean; SeriesIndexesList: System.Collections.Generic.List$1<number> | null; DataIndexesList: System.Collections.Generic.List$1<number> | null; GeospatiaColumnlIndexesList: System.Collections.Generic.List$1<number> | null; UnusedIndexes: System.Collections.Generic.IEnumerable$1<number> | null; } interface ChartMetaDataFunc extends Function { prototype: ChartMetaData; new (argumentColumnType: Kusto.Charting.ArgumentColumnType): ChartMetaData; } interface SeriesStatsCounters { TotalPoints: number; NonNanPoints: number; } interface SeriesStatsCountersFunc extends Function { prototype: SeriesStatsCounters; new (): SeriesStatsCounters; } interface GeoJSONPoint { type: number; coordinates: number[] | null; } interface GeoJSONPointFunc extends Function { prototype: GeoJSONPoint; new (): GeoJSONPoint; } interface GeoJSON { } interface GeoJSONFunc extends Function { prototype: GeoJSON; Point: number; } } interface ColumnDesc { Name: string | null; Type: Kusto.Charting.ArgumentColumnType; Index: number; } interface ColumnDescFunc extends Function { prototype: ColumnDesc; new (name: string | null, type: Kusto.Charting.ArgumentColumnType, index: number): ColumnDesc; } var ColumnDesc: ColumnDescFunc; interface ChartLimitsPolicy { /** * The maximal amount of points allowed for visualization on the chart * * @instance * @public * @memberof Kusto.Charting.ChartLimitsPolicy * @function MaxPointsPerChartError * @type number */ MaxPointsPerChartError: number; /** * Amount of points above which required user's approvement to visualize chart * * @instance * @public * @memberof Kusto.Charting.ChartLimitsPolicy * @function MaxPointsPerChartWarning * @type number */ MaxPointsPerChartWarning: number; /** * The maximal amount of series allowed for visualization on the chart * * @instance * @public * @memberof Kusto.Charting.ChartLimitsPolicy * @function MaxSeriesPerChartError * @type number */ MaxSeriesPerChartError: number; /** * Amount of series above which required user's approvement to visualize chart * * @instance * @public * @memberof Kusto.Charting.ChartLimitsPolicy * @function MaxSeriesPerChartWarning * @type number */ MaxSeriesPerChartWarning: number; /** * The maximal interval of DateTime argument allowed for visualization on the chart * * @instance * @public * @memberof Kusto.Charting.ChartLimitsPolicy * @function MaxDatetimePeriodError * @type System.TimeSpan */ MaxDatetimePeriodError: System.TimeSpan; ChartType: string | null; Equals(other: Kusto.Charting.ChartLimitsPolicy | null): boolean; equals(obj: any | null): boolean; getHashCode(): number; } interface ChartLimitsPolicyFunc extends Function { prototype: ChartLimitsPolicy; new (chartType: string | null, maxPointsPerChartError: number, maxPointsPerChartWarning: number, maxSeriesPerChartError: number, maxSeriesPerChartWarning: number, maxDatetimePeriodError: System.TimeSpan): ChartLimitsPolicy; } var ChartLimitsPolicy: ChartLimitsPolicyFunc; enum ChartKind { Unspecified = 0, Line = 1, Point = 2, Bar = 3 } interface BaseArgumentData { /** * Argument Data as string * * @instance * @public * @memberof Kusto.Charting.BaseArgumentData * @type string */ Value: string | null; /** * Argument Data as DateTime * * @instance * @public * @memberof Kusto.Charting.BaseArgumentData * @type System.DateTime */ DateTime: System.DateTime; /** * Argument Data as TimeSpan * * @instance * @public * @memberof Kusto.Charting.BaseArgumentData * @type ?System.TimeSpan */ TimeSpan: System.TimeSpan | null; /** * Argument Data as numeric value * * @instance * @public * @memberof Kusto.Charting.BaseArgumentData * @type number */ NumericValue: number; } interface BaseArgumentDataFunc extends Function { prototype: BaseArgumentData; new (): BaseArgumentData; } var BaseArgumentData: BaseArgumentDataFunc; enum ArgumentRestrictions { None = 0, MustHave = 1, NotIncludedInSeries = 2, GeospatialAsSeries = 4, PreferLast = 8, NumericAsSeries = 16 } enum ArgumentColumnType { None = 0, Numeric = 2, DateTime = 4, TimeSpan = 8, String = 16, Object = 32, Geospatial = 64, DateTimeOrTimeSpan = 12, StringOrDateTimeOrTimeSpan = 28, NumericOrDateTimeOrTimeSpan = 14, StringOrObject = 48, AllExceptGeospatial = 62 } } declare namespace Kusto.Cloud.Platform.Text { /** @namespace Kusto.Cloud.Platform.Text */ /** * Processes CSL string literals. There are five kinds of string literals: Each kind of string literal may be preceeded by an 'h' to mark it as hidden - i.e. will <b>not</b> be saved in our traces. For example: h"This is a hidden string". * * @static * @abstract * @public * @class Kusto.Cloud.Platform.Text.StringLiteral */ interface StringLiteral { } interface StringLiteralFunc extends Function { prototype: StringLiteral; new (): StringLiteral; /** * Parses a CSL string literal and returns the underlying string. * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteral * @memberof Kusto.Cloud.Platform.Text.StringLiteral * @param {string} literal * @return {string} */ ParseStringLiteral(literal: string | null): string | null; /** * Parses a CSL string literal and returns the underlying string, and a flag indicating whether the string is marked "hidden" (it should not be traced or returned back as it potentially contains secrets). * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteral * @memberof Kusto.Cloud.Platform.Text.StringLiteral * @param {string} literal * @param {System.Boolean} isHidden * @return {string} */ ParseStringLiteral$1(literal: string | null, isHidden: {v: boolean}): string | null; TryParseStringLiteral(str: string | null, literal: {v: string | null}): boolean; TryParseStringLiteral$1(str: string | null, literal: {v: string | null}, isHidden: {v: boolean}): boolean; Equals(str1: string | null, str2: string | null): boolean; TrimSingleQuotes(name: string | null): string | null; TrimBrackets(input: string | null): string | null; InitArray<T>(T: {prototype: T}, arr: T[] | null, value: T): void; /** * Generate string that will be parsed as a string literal. * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteral * @memberof Kusto.Cloud.Platform.Text.StringLiteral * @param {string} value * @return {string} */ GetLiteral(value: string | null): string | null; /** * Generate string that will be parsed as a string literal. * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteral * @memberof Kusto.Cloud.Platform.Text.StringLiteral * @param {string} value * @param {boolean} hidden * @return {string} */ GetLiteral$1(value: string | null, hidden: boolean): string | null; /** * Generate string that will be parsed as a string literal. * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteral * @memberof Kusto.Cloud.Platform.Text.StringLiteral * @param {string} value * @return {string} */ GetLiteralAsHiddenString(value: string | null): string | null; } var StringLiteral: StringLiteralFunc; interface StringLiteralParser { } interface StringLiteralParserFunc extends Function { prototype: StringLiteralParser; new (): StringLiteralParser; /** * Attempts to parse a string literal. * * @static * @public * @this Kusto.Cloud.Platform.Text.StringLiteralParser * @memberof Kusto.Cloud.Platform.Text.StringLiteralParser * @param {string} literal The literal to parse. * @param {System.String} result On successful parse, the parsed value. * @param {System.Boolean} isHidden On successful parse, whether the literal is marked as "hidden" (potentially contains secrets). * @return {boolean} True on a successful parse, false otherwise. */ TryParseStringLiteral(literal: string | null, result: {v: string | null}, isHidden: {v: boolean}): boolean; } var StringLiteralParser: StringLiteralParserFunc; } /** * @memberof System * @callback System.Action * @return {void} */ /** @namespace System */ /** * @memberof System * @callback System.Func * @param {T} arg1 * @param {T} arg2 * @return {boolean} */ declare namespace Kusto.Cloud.Platform.Utils { /** @namespace Kusto.Cloud.Platform.Utils */ /** * A per-thread cache of up to one {@link } object. This code is stolen from the .NET Framework source code. It is explicitly internal to Kusto.Cloud.Platform -- so not reuse the cache in other assemblies. * * @static * @abstract * @class Kusto.Cloud.Platform.Utils.UtilsStringBuilderCache */ interface UtilsStringBuilderCache { } interface UtilsStringBuilderCacheFunc extends Function { prototype: UtilsStringBuilderCache; new (): UtilsStringBuilderCache; Acquire(capacity?: number): System.Text.StringBuilder | null; Acquire$1(value: string | null): System.Text.StringBuilder | null; Release(sb: System.Text.StringBuilder | null): void; GetStringAndRelease(sb: System.Text.StringBuilder | null): string | null; GetStringAndClear(sb: System.Text.StringBuilder | null): string | null; } var UtilsStringBuilderCache: UtilsStringBuilderCacheFunc; interface TimeSpanConstants { } interface TimeSpanConstantsFunc extends Function { prototype: TimeSpanConstants; new (): TimeSpanConstants; _2sec: System.TimeSpan; _5sec: System.TimeSpan; _10sec: System.TimeSpan; _20sec: System.TimeSpan; _1min: System.TimeSpan; _2min: System.TimeSpan; _3min: System.TimeSpan; _4min: System.TimeSpan; _5min: System.TimeSpan; _10min: System.TimeSpan; _30min: System.TimeSpan; _59min: System.TimeSpan; _60min: System.TimeSpan; _1hour: System.TimeSpan; _2hours: System.TimeSpan; _3hours: System.TimeSpan; _4hours: System.TimeSpan; _5hours: System.TimeSpan; _6hours: System.TimeSpan; _10hours: System.TimeSpan; } var TimeSpanConstants: TimeSpanConstantsFunc; /** * Options to apply when creating a display-string, intended for display on the console. * * @public * @class Kusto.Cloud.Platform.Utils.StringDisplayOptions */ interface StringDisplayOptions { /** * If enabled, will take advantage of TERM emulation characters. * * @instance * @public * @memberof Kusto.Cloud.Platform.Utils.StringDisplayOptions * @type boolean */ UseVirtualTerminalProcessing: boolean; /** * If enabled, then newline characters will be rendered as-if they are "normal" control (undisplayable) characters, not as display characters. * * @instance * @public * @memberof Kusto.Cloud.Platform.Utils.StringDisplayOptions * @type boolean */ TreatNewLinesAsUnprintableCharacters: boolean; } interface StringDisplayOptionsFunc extends Function { prototype: StringDisplayOptions; new (): StringDisplayOptions; } var StringDisplayOptions: StringDisplayOptionsFunc; /** * A helper for creating a per-thread ([ThreadStatic]) StringBuilder cache. This code is stolen from the .NET Framework source code. The code requires the caller to declare a [ThreadStatic] field member of type StringBuilder, and provide a reference to that field with each operation. See {@link } for an example. Note that it's not advisable to share such objects if their lifetime overlaps (which is why {@link } is made internal -- to prevent people from making mistakes). * * @static * @abstract * @public * @class Kusto.Cloud.Platform.Utils.StringBuilderCache */ interface StringBuilderCache { } interface StringBuilderCacheFunc extends Function { prototype: StringBuilderCache; new (): StringBuilderCache; /** * Given a [ThreadStatic] field, returns a "clean" instance of {@link }. * * @static * @public * @this Kusto.Cloud.Platform.Utils.StringBuilderCache * @memberof Kusto.Cloud.Platform.Utils.StringBuilderCache * @param {System.Text.StringBuilder} threadStaticStringBuilder [ThreadStatic] static System.Text.StringBuilder s_myStringBuilderCache * @param {number} capacity Capacity to ensure the returned object holds. * @param {number} maxBuilderSize The maximum size to allow the string builder to grow to. * @return {System.Text.StringBuilder} */ Acquire(threadStaticStringBuilder: {v: System.Text.StringBuilder | null}, capacity?: number, maxBuilderSize?: number): System.Text.StringBuilder | null; /** * Given a [ThreadStatic] field, returns an instance of {@link } with the given initial value. * * @static * @public * @this Kusto.Cloud.Platform.Utils.StringBuilderCache * @memberof Kusto.Cloud.Platform.Utils.StringBuilderCache * @param {System.Text.StringBuilder} threadStaticStringBuilder [ThreadStatic] static System.Text.StringBuilder s_myStringBuilderCache * @param {string} value Initial value to assign the {@link } being returned. * @return {System.Text.StringBuilder} */ Acquire$1(threadStaticStringBuilder: {v: System.Text.StringBuilder | null}, value: string | null): System.Text.StringBuilder | null; /** * Given a [ThreadStatic] field and an existing {@link } that was acquired from it, release the acquired instance to make it available in the future to other functions. * * @static * @public * @this Kusto.Cloud.Platform.Utils.StringBuilderCache * @memberof Kusto.Cloud.Platform.Utils.StringBuilderCache * @param {System.Text.StringBuilder} threadStaticStringBuilder [ThreadStatic] static System.Text.StringBuilder s_myStringBuilderCache * @param {System.Text.StringBuilder} sb * @param {number} maxBuilderSize * @return {void} */ Release(threadStaticStringBuilder: {v: System.Text.StringBuilder | null}, sb: System.Text.StringBuilder | null, maxBuilderSize?: number): void; /** * Given a [ThreadStatic] field and an existing {@link } that was acquired from it, release the acquired instance to make it available in the future to other functions. Returns the string held in the returned <b />. * * @static * @public * @this Kusto.Cloud.Platform.Utils.StringBuilderCache * @memberof Kusto.Cloud.Platform.Utils.StringBuilderCache * @param {System.Text.StringBuilder} threadStaticStringBuilder [ThreadStatic] static System.Text.StringBuilder s_myStringBuilderCache * @param {System.Text.StringBuilder} sb * @param {number} maxBuilderSize * @return {string} */ GetStringAndRelease(threadStaticStringBuilder: {v: System.Text.StringBuilder | null}, sb: System.Text.StringBuilder | null, maxBuilderSize?: number): string | null; GetStringAndClear(threadStaticStringBuilder: {v: System.Text.StringBuilder | null}, sb: System.Text.StringBuilder | null): string | null; } var StringBuilderCache: StringBuilderCacheFunc; /** * When implemented by an object, provides the means for callers to get a string that represents the object's state, in a secure fashion (there are no implications if that string is traced, for example). * * @abstract * @public * @class Kusto.Cloud.Platform.Utils.ITraceString */ interface ITraceString { Kusto$Cloud$Platform$Utils$ITraceString$ToTraceString(): string | null; ToTraceString(): string | null; } interface MemoryConstants { } interface MemoryConstantsFunc extends Function { prototype: MemoryConstants; new (): MemoryConstants; _1KB: number; _2KB: number; _4KB: number; _8KB: number; _16KB: number; _32KB: number; _64KB: number; _128KB: number; _256KB: number; _512KB: number; _1MB: number; _2MB: number; _16MB: number; _32MB: number; _64MB: number; _128MB: number; _512MB: number; _1GB: number; _1TB: System.Int64; _1PB: System.Int64; LargeObjectHeap: number; LargeObjectHeapChars: number; /** * When using UTF8Encoding, StreamWriter multiplies the bufferSize supplied during construction by 3. Use this constant to avoid LOH * * @static * @public * @memberof Kusto.Cloud.Platform.Utils.MemoryConstants * @constant * @default 24576 * @type number */ LargeObjectHeapCharsStreamReaderWriter: number; } var MemoryConstants: MemoryConstantsFunc; interface ExtendedStringBuilder { } interface ExtendedStringBuilderFunc extends Function { prototype: ExtendedStringBuilder; new (): ExtendedStringBuilder; InitializeStringBuildIfNeeded(value: string | null, sb: System.Text.StringBuilder | null, i: number): System.Text.StringBuilder | null; } var ExtendedStringBuilder: ExtendedStringBuilderFunc; interface ProcessConstants { } interface ProcessConstantsFunc extends Function { prototype: ProcessConstants; new (): ProcessConstants; /** * The last process return code which is "unspecial" in Kusto.Cloud.Platform. All processes that rely on KCP should not return a value that exceeds this value (as these values are used by KCP itself.) * * @static * @public * @memberof Kusto.Cloud.Platform.Utils.ProcessConstants * @constant * @default 122 * @type number */ ReturnCode_LastUnspecial: number; /** * The return code used when the code calls {@link }. * * @static * @public * @memberof Kusto.Cloud.Platform.Utils.ProcessConstants * @constant * @default 123 * @type number */ ReturnCode_FailFast: number; /** * The return code used when the process Main() function aborts due to an exception thrown. * * @static * @public * @memberof Kusto.Cloud.Platform.Utils.ProcessConstants * @constant * @default 124 * @type number */ ReturnCode_ExceptionThrown: number; } var ProcessConstants: ProcessConstantsFunc; interface ExtendedRegex { } interface ExtendedRegexFunc extends Function { prototype: ExtendedRegex; new (): ExtendedRegex; TryUnescape(str: string | null, result: {v: string | null}): boolean; TryTransformWildCardPatternToRegex(wildcardPattern: string | null): System.Text.RegularExpressions.Regex | null; IsWildCardPattern(wildcardPattern: string | null): boolean; RegexEquals(regex: System.Text.RegularExpressions.Regex | null, other: any | null): boolean; /** * Compares Regex instances based on their Pattern, Options and MatchTimeout * * @static * @public * @this Kusto.Cloud.Platform.Utils.ExtendedRegex * @memberof Kusto.Cloud.Platform.Utils.ExtendedRegex * @param {System.Text.RegularExpressions.Regex} regex * @param {System.Text.RegularExpressions.Regex} other * @return {boolean} */ RegexEquals$1(regex: System.Text.RegularExpressions.Regex | null, other: System.Text.RegularExpressions.Regex | null): boolean; /** * Compares Regex instances based on their Pattern and Options (disregards MatchTimeout) * * @static * @public * @this Kusto.Cloud.Platform.Utils.ExtendedRegex * @memberof Kusto.Cloud.Platform.Utils.ExtendedRegex * @param {System.Text.RegularExpressions.Regex} regex * @param {System.Text.RegularExpressions.Regex} other * @return {boolean} */ RegexEquivalent(regex: System.Text.RegularExpressions.Regex | null, other: System.Text.RegularExpressions.Regex | null): boolean; /** * Replaces all strings in the input string that match the regular expression with the replacement string, and count number of replacements done. * * @static * @public * @this Kusto.Cloud.Platform.Utils.ExtendedRegex * @memberof Kusto.Cloud.Platform.Utils.ExtendedRegex * @param {System.Text.RegularExpressions.Regex} regex * @param {string} input * @param {string} replacement * @param {System.Int32} replacesCount * @return {string} */ ReplaceAndCountReplacements(regex: System.Text.RegularExpressions.Regex | null, input: string | null, replacement: string | null, replacesCount: {v: number}): string | null; } var ExtendedRegex: ExtendedRegexFunc; /** * Enumerabl