[8.x] SKA: Fix outdated eslint rules (#206961) (#208486)

# Backport

This will backport the following commits from `main` to `8.x`:
- [SKA: Fix outdated eslint rules
(#206961)](https://github.com/elastic/kibana/pull/206961)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T07:49:39Z","message":"SKA:
Fix outdated eslint rules (#206961)\n\n## Summary\r\n\r\nSome eslint
rules' paths were outdated after the SKA relocations.\r\nThis PR aims at
fixing them.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c347582ffb4a27512148b7d125c7eef276477554","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-infra_services","Team:obs-ux-management"],"title":"SKA:
Fix outdated eslint
rules","number":206961,"url":"https://github.com/elastic/kibana/pull/206961","mergeCommit":{"message":"SKA:
Fix outdated eslint rules (#206961)\n\n## Summary\r\n\r\nSome eslint
rules' paths were outdated after the SKA relocations.\r\nThis PR aims at
fixing them.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c347582ffb4a27512148b7d125c7eef276477554"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206961","number":206961,"mergeCommit":{"message":"SKA:
Fix outdated eslint rules (#206961)\n\n## Summary\r\n\r\nSome eslint
rules' paths were outdated after the SKA relocations.\r\nThis PR aims at
fixing them.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c347582ffb4a27512148b7d125c7eef276477554"}}]}]
BACKPORT-->
This commit is contained in:
Gerard Soldevila 2025-01-28 14:46:39 +01:00 committed by GitHub
parent cda402ffc6
commit 2772ba7789
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
170 changed files with 1508 additions and 185 deletions

View file

@ -20,7 +20,6 @@ snapshots.js
!.buildkite
# plugin overrides
/src/core/lib/kbn_internal_native_observable
/src/platform/plugins/shared/data/common/es_query/kuery/ast/_generated_/**
/x-pack/platform/plugins/private/canvas/canvas_plugin
/x-pack/platform/plugins/private/canvas/shareable_runtime/build
@ -33,10 +32,8 @@ snapshots.js
/packages/kbn-eslint-config
/packages/kbn-plugin-generator/template
/packages/kbn-generate/templates
/packages/kbn-pm/dist
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/src/platform/packages/shared/kbn-flot-charts/lib
/src/platform/packages/shared/kbn-monaco/src/**/antlr
/src/platform/packages/shared/kbn-esql-ast/src/**/antlr

View file

@ -320,6 +320,10 @@ module.exports = {
'src/**/*.{js,mjs,ts,tsx}',
'x-pack/**/*.{js,mjs,ts,tsx}',
'packages/**/*.{js,mjs,ts,tsx}',
'src/platform/packages/**/*.{js,mjs,ts,tsx}',
'src/core/packages/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/*/packages/**/*.{js,mjs,ts,tsx}',
],
plugins: ['formatjs'],
rules: {
@ -924,7 +928,7 @@ module.exports = {
'x-pack/solutions/observability/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/ux/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/slo/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/packages/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-console': ['warn', { allow: ['error'] }],
@ -944,7 +948,7 @@ module.exports = {
'x-pack/solutions/observability/plugins/observability/**/*.stories.*',
'x-pack/solutions/observability/plugins/exploratory_view/**/*.stories.*',
'x-pack/solutions/observability/plugins/slo/**/*.stories.*',
'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/packages/**/*.{js,mjs,ts,tsx}',
],
rules: {
'react/function-component-definition': [
@ -958,9 +962,10 @@ module.exports = {
},
{
files: [
'x-pack/plugins/observability_solution/**/*.{ts,tsx}',
'x-pack/plugins/{streams,streams_app}/**/*.{ts,tsx}',
'x-pack/packages/observability/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/observability_solution/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/{streams,streams_app}/**/*.{ts,tsx}',
'x-pack/solutions/observability/packages/**/*.{ts,tsx}',
],
rules: {
'react-hooks/exhaustive-deps': [
@ -975,26 +980,26 @@ module.exports = {
{
files: [
'x-pack/platform/plugins/shared/aiops/**/*.tsx',
'x-pack/plugins/observability_solution/**/*.tsx',
'x-pack/plugins/{streams,streams_app}/**/*.{ts,tsx}',
'src/plugins/ai_assistant_management/**/*.tsx',
'x-pack/packages/observability/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/observability_solution/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/**/*.{ts,tsx}',
'src/platform/plugins/shared/ai_assistant_management/**/*.tsx',
'x-pack/solutions/observability/packages/**/*.{ts,tsx}',
],
rules: {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error',
},
},
{
files: ['x-pack/plugins/search*/**/*.tsx', 'x-pack/packages/search/**/*.tsx'],
files: ['x-pack/solutions/search/**/*.tsx'],
rules: {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn',
},
},
{
files: [
'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/plugins/{streams,streams_app}/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/solutions/observability/plugins/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/solutions/observability/packages/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'src/platform/plugins/shared/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/platform/packages/shared/observability/logs_overview/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
],
rules: {
@ -1098,8 +1103,8 @@ module.exports = {
'x-pack/platform/plugins/private/data_visualizer/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/private/transform/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/private/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/shared/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/private/ml/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
@ -1569,7 +1574,11 @@ module.exports = {
{
// typescript for front and back end
files: [
'x-pack/plugins/{alerting,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/alerting/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/stack_alerts/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/actions/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/task_manager/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/event_log/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
@ -1577,7 +1586,10 @@ module.exports = {
},
{
// typescript only for back end
files: ['x-pack/plugins/{stack_connectors,triggers_actions_ui}/server/**/*.ts'],
files: [
'x-pack/platform/plugins/shared/stack_connectors/server/**/*.ts',
'x-pack/platform/plugins/shared/triggers_actions_ui/server/**/*.ts',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
@ -1709,7 +1721,7 @@ module.exports = {
// All files
files: [
'x-pack/solutions/search/plugins/serverless_search/**/*.{ts,tsx}',
'packages/kbn-search-*',
'x-pack/solutions/search/packages/kbn-search-*',
],
rules: {
'@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error',
@ -1873,7 +1885,8 @@ module.exports = {
'x-pack/test/encrypted_saved_objects_api_integration/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/security/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/security/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/private/security/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/security/**/*.{js,mjs,ts,tsx}',
'x-pack/test/security_api_integration/**/*.{js,mjs,ts,tsx}',
'x-pack/test/security_functional/**/*.{js,mjs,ts,tsx}',
@ -1928,7 +1941,6 @@ module.exports = {
{
files: [
'src/platform/packages/shared/kbn-analytics/**',
// 'packages/kbn-telemetry-tools/**',
'src/platform/plugins/private/kibana_usage_collection/**',
'src/platform/plugins/shared/usage_collection/**',
'src/platform/plugins/shared/telemetry/**',
@ -1949,7 +1961,6 @@ module.exports = {
'x-pack/platform/plugins/shared/global_search/**',
'x-pack/platform/plugins/shared/cloud/**',
'src/platform/packages/shared/kbn-config-schema',
'src/plugins/status_page/**',
'src/platform/plugins/shared/saved_objects_management/**',
'src/platform/packages/shared/kbn-analytics/**',
'packages/kbn-telemetry-tools/**',
@ -1974,10 +1985,9 @@ module.exports = {
{
files: [
'src/core/{server,public,common}/index.ts',
'src/plugins/*/{server,public,common}/index.ts',
'src/plugins/*/*/{server,public,common}/index.ts',
'x-pack/plugins/*/{server,public,common}/index.ts',
'x-pack/plugins/*/*/{server,public,common}/index.ts',
'src/platform/plugins/**/{server,public,common}/index.ts',
'x-pack/platform/plugins/**/{server,public,common}/index.ts',
'x-pack/solutions/*/plugins/**/{server,public,common}/index.ts',
],
rules: {
'@kbn/eslint/no_export_all': 'error',

View file

@ -13,4 +13,5 @@ import { UrlForwardingPlugin } from './plugin';
export const plugin = () => new UrlForwardingPlugin();
export * from './plugin';
export type { ForwardDefinition, UrlForwardingSetup, UrlForwardingStart } from './plugin';
export { UrlForwardingPlugin } from './plugin';

View file

@ -20,7 +20,22 @@ export const plugin = () => new ChartsPlugin();
export type { ChartsPluginSetup, ChartsPluginStart } from './plugin';
export * from './static';
export {
createColorPalette,
seedColors,
CurrentTime,
EmptyPlaceholder,
useCommonChartStyles,
Endzones,
getAdjustedInterval,
renderEndzoneTooltip,
Warnings,
ColorPickerLazy,
ColorPicker,
LegendToggleLazy,
LegendToggle,
MULTILAYER_TIME_AXIS_STYLE,
} from './static';
export { lightenColor } from './services/palettes/lighten_color';
export { useActiveCursor } from './services/active_cursor';

View file

@ -32,7 +32,495 @@ export {
textBasedQueryStateToExpressionAst,
} from './query';
export type { QueryState } from './query';
export * from './search';
export type {
AggConfigSerialized,
AggConfigOptions,
IAggConfig,
AggConfigsOptions,
CreateAggConfigParams,
GenericBucket,
IAggConfigs,
AggGroupName,
AggTypeConfig,
IAggType,
AggTypesDependencies,
AggTypesRegistrySetup,
AggTypesRegistryStart,
AggsCommonSetupDependencies,
AggsCommonStartDependencies,
IBucketAggConfig,
BucketAggParam,
CalculateBoundsFn,
IBucketDateHistogramAggConfig,
AggParamsDateHistogram,
AggParamsDateRange,
AggParamsFilter,
FiltersBucketAggDependencies,
AggParamsFilters,
AggParamsGeoTile,
AutoBounds,
HistogramBucketAggDependencies,
IBucketHistogramAggConfig,
AggParamsHistogram,
AggParamsIpPrefix,
AggParamsIpRange,
CidrMaskIpRangeAggKey,
RangeIpRangeAggKey,
IpRangeKey,
RangeBucketAggDependencies,
AggParamsRange,
AggParamsSignificantTerms,
AggParamsSignificantText,
CommonAggParamsTerms,
AggParamsTermsSerialized,
AggParamsTerms,
AggParamsMultiTermsSerialized,
AggParamsMultiTerms,
AggParamsRareTerms,
AggParamsSampler,
AggParamsDiversifiedSampler,
AggParamsTimeSeries,
AggParamsAvg,
AggParamsBucketAvgSerialized,
AggParamsBucketAvg,
AggParamsBucketMaxSerialized,
AggParamsBucketMax,
AggParamsBucketMinSerialized,
AggParamsBucketMin,
AggParamsBucketSumSerialized,
AggParamsBucketSum,
AggParamsFilteredMetricSerialized,
AggParamsFilteredMetric,
FiltersMetricAggDependencies,
AggParamsCardinality,
AggParamsValueCount,
AggParamsCount,
CommonAggParamsCumulativeSum,
AggParamsCumulativeSumSerialized,
AggParamsCumulativeSum,
CommonAggParamsDerivative,
AggParamsDerivativeSerialized,
AggParamsDerivative,
AggParamsGeoBounds,
AggParamsGeoCentroid,
AggParamsMax,
AggParamsMedian,
AggParamsSinglePercentile,
IMetricAggConfig,
MetricAggParam,
IMetricAggType,
AggParamsMin,
CommonAggParamsMovingAvg,
AggParamsMovingAvgSerialized,
AggParamsMovingAvg,
AggParamsPercentileRanks,
IPercentileRanksAggConfig,
PercentileRanksMetricAggDependencies,
AggParamsPercentiles,
IPercentileAggConfig,
AggParamsRate,
AggParamsSinglePercentileRank,
CommonAggParamsSerialDiff,
AggParamsSerialDiffSerialized,
AggParamsSerialDiff,
AggParamsStdDeviation,
IStdDevAggConfig,
AggParamsSum,
BaseAggParamsTopHit,
AggParamsTopHitSerialized,
AggParamsTopHit,
BaseAggParamsTopMetrics,
AggParamsTopMetricsSerialized,
AggParamsTopMetrics,
FieldTypes,
FilterFieldFn,
IFieldParamType,
OptionedValueProp,
AggParam,
AggParamOption,
IpPrefixKey,
AggsCommonSetup,
AggsCommonStart,
AggsStart,
BaseAggParams,
AggExpressionType,
AggExpressionFunctionArgs,
AggParamsMapping,
AggFunctionsMapping,
ParsedInterval,
REASON_ID_TYPES,
Cidr,
CidrOutput,
ExpressionFunctionCidr,
DateRange,
DateRangeOutput,
ExpressionFunctionDateRange,
ExtendedBounds,
ExtendedBoundsOutput,
ExpressionFunctionExtendedBounds,
GeoBoundingBox,
GeoBoundingBoxOutput,
ExpressionFunctionGeoBoundingBox,
GeoPoint,
GeoPointOutput,
ExpressionFunctionGeoPoint,
IpPrefix,
IpPrefixOutput,
ExpressionFunctionIpPrefix,
IpRange,
IpRangeOutput,
ExpressionFunctionIpRange,
ExpressionFunctionKibana,
ExpressionFunctionKibanaContext,
ExpressionFunctionKql,
ExpressionFunctionLucene,
NumericalRange,
NumericalRangeOutput,
ExpressionFunctionNumericalRange,
QueryFilter,
QueryFilterOutput,
ExpressionFunctionQueryFilter,
ExpressionValueSearchContext,
KibanaQueryOutput,
KibanaFilter,
KibanaField,
KIBANA_CONTEXT_NAME,
KibanaContext,
EsaggsExpressionFunctionDefinition,
EsaggsStartDependencies,
RequestHandlerParams,
KibanaRange,
ExpressionFunctionRange,
ExpressionFunctionField,
ExpressionFunctionPhraseFilter,
ExpressionFunctionExistsFilter,
ExpressionFunctionRangeFilter,
ExpressionFunctionRemoveFilter,
ExpressionFunctionSelectFilter,
ExpressionFunctionKibanaFilter,
KibanaTimerangeOutput,
ExpressionFunctionKibanaTimerange,
EsRawResponse,
EsRawResponseExpressionTypeDefinition,
EqlRawResponse,
SearchTypes,
TotalValue,
BaseHit,
EqlSequence,
EqlSearchResponse,
EqlRawResponseExpressionTypeDefinition,
EsdslExpressionFunctionDefinition,
EqlExpressionFunctionDefinition,
EsqlExpressionFunctionDefinition,
SearchRequest,
FetchHandlers,
SearchError,
SearchSourceDependencies,
ISearchSource,
ISearchStartSearchSource,
SortDirectionFormat,
SortDirectionNumeric,
EsQuerySortValue,
SearchFieldValue,
SearchSourceFields,
SerializedSearchSourceFields,
SearchSourceOptions,
IInspectorInfo,
SearchSourceSearchOptions,
SearchSessionSavedObjectAttributes,
SearchSessionRequestInfo,
SearchSessionRequestStatus,
SearchSessionStatusResponse,
SearchSessionsFindResponse,
EqlRequestParams,
EqlSearchStrategyRequest,
EqlSearchStrategyResponse,
IAsyncSearchOptions,
SqlRequestParams,
SqlSearchStrategyRequest,
SqlSearchStrategyResponse,
} from './search';
export {
AggConfig,
AggConfigs,
AggGroupNames,
AggGroupLabels,
AggType,
getAggTypes,
getAggTypesFunctions,
AggTypesRegistry,
aggsRequiredUiSettings,
AggsCommonService,
autoInterval,
isAutoInterval,
intervalOptions,
BucketAggType,
isBucketAggType,
BUCKET_TYPES,
aggDateHistogramFnName,
aggDateHistogram,
isDateHistogramBucketAggConfig,
getDateHistogramBucketAgg,
aggDateRangeFnName,
aggDateRange,
getDateRangeBucketAgg,
aggFilterFnName,
aggFilter,
getFilterBucketAgg,
aggFiltersFnName,
aggFilters,
getFiltersBucketAgg,
aggGeoTileFnName,
aggGeoTile,
getGeoTitleBucketAgg,
aggHistogramFnName,
aggHistogram,
getHistogramBucketAgg,
aggIpPrefixFnName,
aggIpPrefix,
getIpPrefixBucketAgg,
aggIpRangeFnName,
aggIpRange,
IP_RANGE_TYPES,
getIpRangeBucketAgg,
CidrMask,
convertDateRangeToString,
convertIPRangeToString,
boundsDescendingRaw,
calcAutoIntervalNear,
calcAutoIntervalLessThan,
TimeBuckets,
isType,
isNumberType,
isStringType,
isStringOrNumberType,
migrateIncludeExcludeFormat,
aggRangeFnName,
aggRange,
getRangeBucketAgg,
aggSignificantTermsFnName,
aggSignificantTerms,
getSignificantTermsBucketAgg,
aggSignificantTextFnName,
aggSignificantText,
getSignificantTextBucketAgg,
aggTermsFnName,
aggTerms,
termsAggFilter,
getTermsBucketAgg,
MultiFieldKey,
isMultiFieldKey,
MULTI_FIELD_KEY_SEPARATOR,
aggMultiTermsFnName,
aggMultiTerms,
getMultiTermsBucketAgg,
aggRareTermsFnName,
aggRareTerms,
getRareTermsBucketAgg,
aggSamplerFnName,
aggSampler,
SAMPLER_AGG_NAME,
getSamplerBucketAgg,
aggDiversifiedSamplerFnName,
aggDiversifiedSampler,
DIVERSIFIED_SAMPLER_AGG_NAME,
getDiversifiedSamplerBucketAgg,
getTimeSeriesBucketAgg,
aggTimeSeriesFnName,
aggTimeSeries,
SHARD_DELAY_AGG_NAME,
aggAvgFnName,
aggAvg,
getAvgMetricAgg,
aggBucketAvgFnName,
aggBucketAvg,
getBucketAvgMetricAgg,
aggBucketMaxFnName,
aggBucketMax,
getBucketMaxMetricAgg,
aggBucketMinFnName,
aggBucketMin,
getBucketMinMetricAgg,
aggBucketSumFnName,
aggBucketSum,
getBucketSumMetricAgg,
aggFilteredMetricFnName,
aggFilteredMetric,
getFilteredMetricAgg,
aggCardinalityFnName,
aggCardinality,
getCardinalityMetricAgg,
aggValueCountFnName,
aggValueCount,
getValueCountMetricAgg,
getCountMetricAgg,
aggCountFnName,
aggCount,
aggCumulativeSumFnName,
aggCumulativeSum,
getCumulativeSumMetricAgg,
aggDerivativeFnName,
aggDerivative,
getDerivativeMetricAgg,
aggGeoBoundsFnName,
aggGeoBounds,
getGeoBoundsMetricAgg,
aggGeoCentroidFnName,
aggGeoCentroid,
getGeoCentroidMetricAgg,
parentPipelineType,
parentPipelineAggHelper,
siblingPipelineType,
siblingPipelineAggHelper,
aggMaxFnName,
aggMax,
getMaxMetricAgg,
aggMedianFnName,
aggMedian,
getMedianMetricAgg,
aggSinglePercentileFnName,
aggSinglePercentile,
getSinglePercentileMetricAgg,
MetricAggType,
isMetricAggType,
METRIC_TYPES,
aggMinFnName,
aggMin,
getMinMetricAgg,
aggMovingAvgFnName,
aggMovingAvg,
getMovingAvgMetricAgg,
aggPercentileRanksFnName,
aggPercentileRanks,
getPercentileRanksMetricAgg,
aggPercentilesFnName,
aggPercentiles,
getPercentilesMetricAgg,
aggRateFnName,
aggRate,
getRateMetricAgg,
aggSinglePercentileRankFnName,
aggSinglePercentileRank,
getSinglePercentileRankMetricAgg,
aggSerialDiffFnName,
aggSerialDiff,
getSerialDiffMetricAgg,
aggStdDeviationFnName,
aggStdDeviation,
getStdDeviationMetricAgg,
aggSumFnName,
aggSum,
getSumMetricAgg,
aggTopHitFnName,
aggTopHit,
getTopHitMetricAgg,
getTopMetricsMetricAgg,
aggTopMetricsFnName,
aggTopMetrics,
AggParamType,
BaseParamType,
FieldParamType,
JsonParamType,
OptionedParamType,
StringParamType,
getCalculateAutoTimeExpression,
dateHistogramInterval,
InvalidEsCalendarIntervalError,
InvalidEsIntervalFormatError,
isValidEsInterval,
isValidInterval,
splitStringInterval,
parseInterval,
parseEsInterval,
toAbsoluteDates,
getAggsFormats,
IpAddress,
propFilter,
inferTimeZone,
parseTimeShift,
isAbsoluteTimeShift,
REASON_IDS,
parseAbsoluteTimeShift,
validateAbsoluteTimeShift,
cidrFunction,
cidrToAst,
dateRangeFunction,
dateRangeToAst,
extendedBoundsFunction,
extendedBoundsToAst,
geoBoundingBoxFunction,
geoBoundingBoxToAst,
geoPointFunction,
geoPointToAst,
ipPrefixFunction,
ipPrefixToAst,
ipRangeFunction,
ipRangeToAst,
kibana,
kqlFunction,
luceneFunction,
numericalRangeFunction,
numericalRangeToAst,
queryFilterFunction,
queryFilterToAst,
queryToAst,
aggregateQueryToAst,
timerangeToAst,
getEsaggsMeta,
handleEsaggsRequest,
functionWrapper,
adaptToExpressionValueFilter,
rangeFunction,
fieldFunction,
phraseFilterFunction,
existsFilterFunction,
rangeFilterFunction,
removeFilterFunction,
selectFilterFunction,
kibanaFilterFunction,
filtersToAst,
kibanaTimerangeFunction,
esRawResponse,
eqlRawResponse,
getEsdslFn,
getEqlFn,
getEsqlFn,
createSearchSource,
injectReferences,
extractReferences,
parseSearchSourceJSON,
getResponseInspectorStats,
getSearchParamsFromRequest,
getEsPreference,
RequestFailure,
searchSourceRequiredUiSettings,
SearchSource,
SearchSourceService,
SortDirection,
isSerializedSearchSource,
queryToFields,
tabifyDocs,
flattenHit,
tabifyAggResponse,
tabifyGetColumns,
isAbortResponse,
isRunningResponse,
getUserTimeZone,
SearchSessionStatus,
SearchStatus,
SEARCH_SESSION_TYPE,
SEARCH_SESSIONS_TABLE_ID,
pollSearch,
ES_SEARCH_STRATEGY,
getTotalLoaded,
shimHitsTotal,
EQL_SEARCH_STRATEGY,
ENHANCED_ES_SEARCH_STRATEGY,
SQL_SEARCH_STRATEGY,
ESQL_SEARCH_STRATEGY,
ESQL_ASYNC_SEARCH_STRATEGY,
ESQL_TABLE_TYPE,
} from './search';
export type {
RefreshInterval,
TimeRangeBounds,

View file

@ -10,8 +10,9 @@
// TODO: https://github.com/elastic/kibana/issues/110892
import { DevToolsPlugin } from './plugin';
export * from './plugin';
export * from '../common/constants';
export type { DevToolsSetup } from './plugin';
export { DevToolsPlugin } from './plugin';
export { DEV_TOOLS_FEATURE_ID, ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID } from '../common/constants';
export function plugin() {
return new DevToolsPlugin();

View file

@ -7,4 +7,4 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
export type * from './types';
export type { JoinIndicesAutocompleteResult, JoinIndexAutocompleteItem } from './types';

View file

@ -9,4 +9,4 @@
// TODO: https://github.com/elastic/kibana/issues/110893
export * from './constants';
export { PLUGIN_ID, PLUGIN_NAME, JSON } from './constants';

View file

@ -9,5 +9,12 @@
// TODO: https://github.com/elastic/kibana/issues/110893
export * from './constants';
export * from './types';
export { PLUGIN_ID, PLUGIN_NAME, CONTEXT, BASE64, URL } from './constants';
export type {
Return,
ExpressionImageFunction,
OriginString,
ImageRendererConfig,
NodeDimensions,
} from './types';
export { ImageMode } from './types';

View file

@ -9,6 +9,12 @@
// TODO: https://github.com/elastic/kibana/issues/110893
export * from './constants';
export * from './types';
export * from './expression_functions';
export { PLUGIN_ID, PLUGIN_NAME, FONT_FAMILY, FONT_WEIGHT, CSS, NUMERALJS } from './constants';
export type {
Input,
Arguments,
ExpressionMetricFunction,
MetricRendererConfig,
NodeDimensions,
} from './types';
export { functions, metricFunction } from './expression_functions';

View file

@ -9,6 +9,12 @@
// TODO: https://github.com/elastic/kibana/issues/110893
export * from './constants';
export * from './types';
export * from './expression_functions';
export { PLUGIN_ID, PLUGIN_NAME, CONTEXT, BASE64, URL } from './constants';
export type {
Return,
ExpressionRepeatImageFunction,
OriginString,
RepeatImageRendererConfig,
NodeDimensions,
} from './types';
export { functions, repeatImageFunction } from './expression_functions';

View file

@ -9,5 +9,5 @@
// TODO: https://github.com/elastic/kibana/issues/110893
export * from './constants';
export * from './expression_functions';
export { PLUGIN_ID, PLUGIN_NAME, BASE64, URL } from './constants';
export { functions, revealImageFunction } from './expression_functions';

View file

@ -32,4 +32,9 @@ export {
} from './adapters/has_inspector_adapters';
export { InspectorPublicPlugin as Plugin } from './plugin';
export type { Setup, Start } from './plugin';
export * from './types';
export type {
InspectorViewProps,
InspectorViewDescription,
InspectorOptions,
InspectorSession,
} from './types';

View file

@ -10,10 +10,180 @@
// TODO: https://github.com/elastic/kibana/issues/110891
/** @public types */
export * from './types';
export * from './utils';
export * from './expression_functions';
export * from './convert_to_lens';
export type {
VisParams,
SavedVisState,
VisualizationSavedObjectAttributes,
VisualizationSavedObject,
SerializedVisData,
SerializedVis,
SupportedAggregation,
GenericSchemaConfig,
SchemaConfig,
} from './types';
export type { Dimension, PaletteConfig } from './utils';
export {
prepareLogTable,
findAccessor,
findAccessorOrFail,
getAccessorByDimension,
validateAccessor,
getColumnByAccessor,
isVisDimension,
getAccessor,
getFormatByAccessor,
getStopsWithColorsFromRanges,
} from './utils';
export type {
Arguments,
ExpressionValueVisDimension,
ExpressionFunctionVisDimension,
} from './expression_functions';
export { range, visDimension } from './expression_functions';
export type {
AggBasedColumn,
DataType,
TimeScaleUnit,
SortingHint,
FilterQuery,
Filter,
Range,
NumberValueFormat,
MinMax,
BasicFullPercentageModeConfig,
BasicPercentageModeConfig,
PercentageModeConfigWithMinMax,
PercentageModeConfig,
RangeMode,
FormatParams,
FiltersParams,
TermsParams,
DateHistogramParams,
RangeParams,
MinParams,
MaxParams,
AvgParams,
SumParams,
MedianParams,
StandardDeviationParams,
CardinalityParams,
CumulativeSumParams,
CounterRateParams,
DerivativeParams,
CountParams,
PercentileParams,
PercentileRanksParams,
LastValueParams,
MovingAverageParams,
FormulaParams,
StaticValueParams,
TimeScaleParams,
Operation,
OperationWithSourceField,
OperationWithReferences,
BaseColumn,
ColumnWithSourceField,
ColumnWithReferences,
FiltersColumn,
RangeColumn,
TermsColumn,
DateHistogramColumn,
MinColumn,
MaxColumn,
AvgColumn,
SumColumn,
MedianColumn,
StandardDeviationColumn,
CardinalityColumn,
PercentileColumn,
PercentileRanksColumn,
CountColumn,
LastValueColumn,
CumulativeSumColumn,
CounterRateColumn,
DerivativeColumn,
MovingAverageColumn,
FormulaColumn,
StaticValueColumn,
AnyColumnWithSourceField,
AnyColumnWithReferences,
Column,
GenericColumnWithMeta,
ColumnWithMeta,
Layer,
NavigateToLensContext,
ChartShapes,
CollapseFunction,
FillType,
SeriesType,
YAxisMode,
XYCurveType,
PartitionChartType,
CategoryDisplayType,
NumberDisplayType,
LegendDisplayType,
LayerType,
GaugeColorMode,
GaugeShape,
GaugeLabelMajorMode,
GaugeCentralMajorMode,
GaugeTicksPosition,
AxisExtentConfig,
YConfig,
XYDataLayerConfig,
XYReferenceLineLayerConfig,
EventAnnotationConfig,
XYAnnotationsLayerConfig,
XYLayerConfig,
AxesSettingsConfig,
LabelsOrientationConfig,
LegendConfig,
XYConfiguration,
SortingState,
PagingState,
ColumnState,
TableVisConfiguration,
MetricVisConfiguration,
PartitionLayerState,
PartitionVisConfiguration,
GaugeVisConfiguration,
HeatmapLegendConfig,
HeatmapGridConfig,
HeatmapArguments,
HeatmapLayerState,
Palette,
HeatmapConfiguration,
TagcloudVisConfiguration,
Configuration,
} from './convert_to_lens';
export {
LENS_GAUGE_ID,
GROUP_ID,
OperationsWithSourceField,
OperationsWithReferences,
Operations,
PartitionChartTypes,
CategoryDisplayTypes,
NumberDisplayTypes,
LegendDisplayTypes,
LayerTypes,
XYCurveTypes,
YAxisModes,
SeriesTypes,
FillTypes,
RANGE_MODES,
GaugeShapes,
GaugeTicksPositions,
GaugeLabelMajorModes,
GaugeCentralMajorModes,
GaugeColorModes,
CollapseFunctions,
isAnnotationsLayer,
getIndexPatternIds,
isFieldValid,
isCollapseFunction,
excludeMetaFromColumn,
} from './convert_to_lens';
export { convertToSchemaConfig } from './vis_schemas';
export {

View file

@ -14,10 +14,7 @@ import type {
ActionTypeExecutorOptions as ConnectorTypeExecutorOptions,
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
} from '@kbn/actions-plugin/server/types';
import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
} from '@kbn/actions-plugin/common/connector_feature_config';
import { AlertingConnectorFeatureId, UptimeConnectorFeatureId } from '@kbn/actions-plugin/common';
import { ConnectorAdapter } from '@kbn/alerting-plugin/server';
// see: https://en.wikipedia.org/wiki/Unicode_control_characters

View file

@ -7,4 +7,18 @@
// TODO: https://github.com/elastic/kibana/issues/110892
export * from './constants';
export {
PLUGIN,
MAJOR_VERSION,
API_BASE_PATH,
REPOSITORY_TYPES,
ON_PREM_REPOSITORY_TYPES,
MODULE_REPOSITORY_TYPES,
PLUGIN_REPOSITORY_TYPES,
REPOSITORY_PLUGINS_MAP,
APP_REQUIRED_CLUSTER_PRIVILEGES,
APP_RESTORE_INDEX_PRIVILEGES,
APP_SLM_CLUSTER_PRIVILEGES,
TIME_UNITS,
FEATURE_STATES_NONE_OPTION,
} from './constants';

View file

@ -7,14 +7,69 @@
// TODO: https://github.com/elastic/kibana/issues/110895
export * from './types';
export * from './alert_history_schema';
export * from './rewrite_request_case';
export * from './mustache_template';
export * from './validate_email_addresses';
export * from './connector_feature_config';
export * from './execution_log_types';
export * from './validate_empty_strings';
export type {
SubFeature,
ActionType,
ValidatedEmail,
ActionTypeExecutorResult,
ActionTypeExecutorRawResult,
ActionsPublicConfigType,
} from './types';
export { InvalidEmailReason, isActionTypeExecutorResult } from './types';
export {
ALERT_HISTORY_PREFIX,
AlertHistoryDefaultIndexName,
AlertHistoryEsIndexConnectorId,
buildAlertHistoryDocument,
AlertHistoryDocumentTemplate,
} from './alert_history_schema';
export type {
AsApiContract,
RewriteRequestCase,
RewriteResponseCase,
} from './rewrite_request_case';
export {
MustacheInEmailRegExp,
hasMustacheTemplate,
withoutMustacheTemplate,
} from './mustache_template';
export type { ValidateEmailAddressesOptions } from './validate_email_addresses';
export {
validateEmailAddressesAsAlwaysValid,
validateEmailAddresses,
invalidEmailsAsMessage,
} from './validate_email_addresses';
export {
AlertingConnectorFeatureId,
CasesConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
GenerativeAIForSecurityConnectorFeatureId,
GenerativeAIForObservabilityConnectorFeatureId,
GenerativeAIForSearchPlaygroundConnectorFeatureId,
EndpointSecurityConnectorFeatureId,
AlertingConnectorFeature,
CasesConnectorFeature,
UptimeConnectorFeature,
SecuritySolutionFeature,
GenerativeAIForSecurityFeature,
GenerativeAIForObservabilityFeature,
GenerativeAIForSearchPlaygroundFeature,
EndpointSecurityConnectorFeature,
areValidFeatures,
getConnectorFeatureName,
getConnectorCompatibility,
} from './connector_feature_config';
export type {
IExecutionLog,
IExecutionLogResult,
GetGlobalExecutionLogParams,
GetGlobalExecutionKPIParams,
IExecutionKPIResult,
ExecutionLogSortFields,
} from './execution_log_types';
export { EMPTY_EXECUTION_KPI_RESULT, executionLogSortableColumns } from './execution_log_types';
export { validateEmptyStrings } from './validate_empty_strings';
export const BASE_ACTION_API_PATH = '/api/actions';
export const INTERNAL_BASE_ACTION_API_PATH = '/internal/actions';

View file

@ -9,14 +9,6 @@ import { SUB_FEATURE } from '@kbn/actions-types';
import { LicenseType } from '@kbn/licensing-plugin/common/types';
import { TaskErrorSource } from '@kbn/task-manager-plugin/common';
export {
AlertingConnectorFeatureId,
CasesConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
GenerativeAIForSecurityConnectorFeatureId,
} from './connector_feature_config';
export type SubFeature = keyof typeof SUB_FEATURE;
export interface ActionType {

View file

@ -11,6 +11,7 @@ export const PLUGIN = {
ID: 'actions',
MINIMUM_LICENSE_REQUIRED: 'basic' as LicenseType, // TODO: supposed to be changed up on requirements
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getI18nName: (i18n: any): string =>
i18n.translate('xpack.actions.appName', {
defaultMessage: 'Actions',

View file

@ -245,6 +245,7 @@ export function createEphemeralExecutionEnqueuerFunction({
consumer,
// Saved Objects won't allow us to enforce unknown rather than any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
params: params as Record<string, any>,
...(apiKey ? { apiKey } : {}),
...(executionId ? { executionId } : {}),

View file

@ -62,6 +62,7 @@ const AuthB64 = Buffer.from(Auth).toString('base64');
describe('axios connections', () => {
let testServer: http.Server | https.Server | null;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let savedAxiosDefaultsAdapter: any;
beforeEach(() => {

View file

@ -49,6 +49,7 @@ const ServerResponse = 'A unique response returned by the server!';
describe('axios connections', () => {
let testServer: http.Server | https.Server | null;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let savedAxiosDefaultsAdapter: any;
beforeEach(() => {

View file

@ -66,6 +66,7 @@ describe('ensureSufficientLicense()', () => {
...sampleActionType,
// we're faking an invalid value, this requires stripping the typing
// eslint-disable-next-line @typescript-eslint/no-explicit-any
minimumLicenseRequired: 'foo' as any,
})
).toThrowErrorMatchingInlineSnapshot(`"\\"foo\\" is not a valid license type"`);

View file

@ -114,6 +114,7 @@ function addToStringDeep(object: unknown): void {
if (Array.isArray(object)) {
// instead, add an asJSON()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(object as any).asJSON = () => JSON.stringify(object);
object.forEach((element) => addToStringDeep(element));
return;

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import moment from 'moment';
import { schema, ByteSizeValue } from '@kbn/config-schema';
import { PluginInitializerContext, RequestHandlerContext } from '@kbn/core/server';

View file

@ -236,6 +236,7 @@ export interface ActionTaskParams extends SavedObjectAttributes {
actionId: string;
// Saved Objects won't allow us to enforce unknown rather than any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
params: Record<string, any>;
apiKey?: string;
executionId?: string;

View file

@ -12,6 +12,7 @@ export const PLUGIN = {
MINIMUM_LICENSE_REQUIRED: 'basic' as LicenseType, // TODO: supposed to be changed up on requirements
// all plugins seem to use getI18nName with any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
getI18nName: (i18n: any): string =>
i18n.translate('xpack.alerting.appName', {
defaultMessage: 'Alerting',

View file

@ -7,10 +7,90 @@
// TODO: https://github.com/elastic/kibana/issues/110895
export * from './rule';
export * from './rules_settings';
export * from './rule_type';
export * from './lib';
export type {
ActionVariable,
Rule,
SanitizedRule,
RuleTypeParams,
RuleActionParams,
RuleActionParam,
IntervalSchedule,
RuleActionFrequency,
AlertsFilterTimeframe,
AlertsFilter,
RuleAction,
RuleSystemAction,
MappedParamsProperties,
MappedParams,
RuleExecutionStatuses,
RuleLastRunOutcomes,
RuleExecutionStatus,
RuleMonitoringHistory,
RuleMonitoringCalculatedMetrics,
RuleMonitoringLastRun,
RuleMonitoring,
RuleLastRun,
AlertDelay,
SanitizedAlertsFilter,
SanitizedRuleAction,
AlertsHealth,
AlertingFrameworkHealth,
ResolvedSanitizedRule,
RuleTypeState,
RuleTypeMetaData,
RuleAlertData,
RuleAlertingOutcome,
RuleActionAlertsFilterProperty,
RuleActionKey,
RuleSystemActionKey,
SanitizedRuleConfig,
RuleMonitoringLastRunMetrics,
} from './rule';
export {
RuleExecutionStatusValues,
RuleLastRunOutcomeValues,
RuleExecutionStatusErrorReasons,
RuleExecutionStatusWarningReasons,
HealthStatus,
RuleLastRunOutcomeOrderMap,
} from './rule';
export type {
RulesSettingsModificationMetadata,
RulesSettingsFlappingProperties,
RulesSettingsQueryDelayProperties,
RuleSpecificFlappingProperties,
RulesSettingsFlapping,
RulesSettingsQueryDelay,
RulesSettingsProperties,
RulesSettings,
} from './rules_settings';
export {
MIN_LOOK_BACK_WINDOW,
MAX_LOOK_BACK_WINDOW,
MIN_STATUS_CHANGE_THRESHOLD,
MAX_STATUS_CHANGE_THRESHOLD,
MIN_QUERY_DELAY,
MAX_QUERY_DELAY,
RULES_SETTINGS_FEATURE_ID,
ALL_FLAPPING_SETTINGS_SUB_FEATURE_ID,
READ_FLAPPING_SETTINGS_SUB_FEATURE_ID,
ALL_QUERY_DELAY_SETTINGS_SUB_FEATURE_ID,
READ_QUERY_DELAY_SETTINGS_SUB_FEATURE_ID,
API_PRIVILEGES,
RULES_SETTINGS_SAVED_OBJECT_TYPE,
RULES_SETTINGS_FLAPPING_SAVED_OBJECT_ID,
RULES_SETTINGS_QUERY_DELAY_SAVED_OBJECT_ID,
DEFAULT_LOOK_BACK_WINDOW,
DEFAULT_STATUS_CHANGE_THRESHOLD,
DEFAULT_QUERY_DELAY,
DEFAULT_SERVERLESS_QUERY_DELAY,
DEFAULT_FLAPPING_SETTINGS,
DISABLE_FLAPPING_SETTINGS,
DEFAULT_QUERY_DELAY_SETTINGS,
DEFAULT_SERVERLESS_QUERY_DELAY_SETTINGS,
} from './rules_settings';
export type { RuleType, ActionGroup, ActionGroupIdsOf } from './rule_type';
export { validateBackfillSchedule } from './lib';
export type {
ThrottledActions,
LastScheduledActions,
@ -23,22 +103,76 @@ export type {
RuleTaskState,
RuleTaskParams,
} from '@kbn/alerting-state-types';
export type { AlertingFrameworkHealth, Flapping } from '@kbn/alerting-types';
export * from './alert_summary';
export * from './builtin_action_groups';
export * from './bulk_edit';
export * from './disabled_action_groups';
export * from './rule_notify_when_type';
export * from './parse_duration';
export * from './execution_log_types';
export * from './rule_snooze_type';
export * from './rrule_type';
export * from './rule_tags_aggregation';
export * from './iso_weekdays';
export * from './saved_objects/rules/mappings';
export * from './rule_circuit_breaker_error_message';
export * from './maintenance_window_scoped_query_error_message';
export * from './action_ref_prefix';
export type {
RuleStatusValues,
AlertStatusValues,
ExecutionDuration,
AlertSummary,
AlertStatus,
} from './alert_summary';
export type {
ReservedActionGroups,
WithoutReservedActionGroups,
RecoveredActionGroupId,
DefaultActionGroupId,
} from './builtin_action_groups';
export { getBuiltinActionGroups, RecoveredActionGroup } from './builtin_action_groups';
export type { BulkEditSkipReason, BulkActionSkipResult } from './bulk_edit';
export {
DisabledActionTypeIdsForActionGroup,
isActionGroupDisabledForActionTypeId,
} from './disabled_action_groups';
export type { RuleNotifyWhenType } from './rule_notify_when_type';
export {
validateNotifyWhenType,
RuleNotifyWhenTypeValues,
RuleNotifyWhen,
} from './rule_notify_when_type';
export {
parseDuration,
formatDuration,
convertDurationToFrequency,
getDurationNumberInItsUnit,
getDurationUnitValue,
validateDurationSchema,
} from './parse_duration';
export type {
ExecutionLogSortFields,
ActionErrorLogSortFields,
IExecutionLog,
IExecutionErrors,
IExecutionErrorsResult,
IExecutionLogResult,
IExecutionKPIResult,
} from './execution_log_types';
export {
executionLogSortableColumns,
actionErrorLogSortableColumns,
EMPTY_EXECUTION_KPI_RESULT,
} from './execution_log_types';
export type { RuleSnoozeSchedule, RuleSnooze } from './rule_snooze_type';
export type { RRuleParams, RRuleRecord } from './rrule_type';
export type {
RuleTagsAggregationOptions,
RuleTagsAggregationFormattedResult,
RuleTagsAggregationResult,
} from './rule_tags_aggregation';
export { getRuleTagsAggregation, formatRuleTagsAggregationResult } from './rule_tags_aggregation';
export type { IsoWeekday } from './iso_weekdays';
export { ISO_WEEKDAYS } from './iso_weekdays';
export { alertMappings } from './saved_objects/rules/mappings';
export {
getRuleCircuitBreakerErrorMessage,
parseRuleCircuitBreakerErrorMessage,
} from './rule_circuit_breaker_error_message';
export {
getScopedQueryErrorMessage,
isScopedQueryError,
} from './maintenance_window_scoped_query_error_message';
export {
preconfiguredConnectorActionRefPrefix,
systemConnectorActionRefPrefix,
} from './action_ref_prefix';
export type {
MaintenanceWindowModificationMetadata,

View file

@ -161,6 +161,7 @@ async function refreshFieldsInDocs(
// @ts-expect-error @elastic/elasticsearch _source is not in the type!
const freshDoc = freshResponse._source;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const conflictDoc = conflictRequest.doc as Record<string, any>;
if (!freshDoc || !conflictDoc) continue;

View file

@ -2080,11 +2080,13 @@ describe('Alerts Service', () => {
// leverage the outcome of the first retry
expect(
logger.info.mock.calls.filter(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(calls: any[]) => calls[0] === `Retrying resource initialization for context "test"`
).length
).toEqual(1);
expect(
logger.info.mock.calls.filter(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(calls: any[]) =>
calls[0] === `Resource installation for "test" succeeded after retry`
).length
@ -2157,6 +2159,7 @@ describe('Alerts Service', () => {
// Should only log the retry once because the second and third retries should be throttled
expect(
logger.info.mock.calls.filter(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(calls: any[]) => calls[0] === `Retrying resource initialization for context "test"`
).length
).toEqual(1);

View file

@ -67,15 +67,19 @@ describe('retryTransientErrors', () => {
new EsErrors.NoLivingConnectionsError('no living connection', {
warnings: [],
// eslint-disable-next-line @typescript-eslint/no-explicit-any
meta: {} as any,
}),
new EsErrors.ConnectionError('no connection'),
new EsErrors.TimeoutError('timeout'),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
new EsErrors.ResponseError({ statusCode: 503, meta: {} as any, warnings: [] }),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
new EsErrors.ResponseError({ statusCode: 408, meta: {} as any, warnings: [] }),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
new EsErrors.ResponseError({ statusCode: 410, meta: {} as any, warnings: [] }),
];

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { schema } from '@kbn/config-schema';
import { omit } from 'lodash';
import { v4 as uuidv4 } from 'uuid';

View file

@ -162,6 +162,7 @@ describe('convertMonitoringFromRawAndVerify', () => {
debug: mockLoggerDebug,
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result = convertMonitoringFromRawAndVerify(mockLogger as any, '123', monitoring);
expect(mockLoggerDebug).toHaveBeenCalledWith(
'invalid monitoring last_run.timestamp "invalid" in raw rule 123'

View file

@ -444,6 +444,7 @@ describe('RuleExecutionStatus', () => {
});
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function checkDateIsNearNow(date: any) {
expect(date instanceof Date).toBe(true);
// allow for lots of slop in the time difference

View file

@ -185,6 +185,7 @@ describe('Alerting Plugin', () => {
setup.registerType({
...sampleRuleType,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
minimumLicenseRequired: 'foo' as any,
})
).toThrowErrorMatchingInlineSnapshot(`"\\"foo\\" is not a valid license type"`);

View file

@ -12,14 +12,36 @@ export { retryIfBulkOperationConflicts } from './retry_if_bulk_operation_conflic
export { applyBulkEditOperation } from './apply_bulk_edit_operation';
export { buildKueryNodeFilter } from './build_kuery_node_filter';
export { generateAPIKeyName } from './generate_api_key_name';
export * from './mapped_params_utils';
export {
MAPPED_PARAMS_PROPERTIES,
getMappedParams,
getModifiedFilter,
getModifiedField,
getModifiedSearchFields,
getModifiedValue,
getModifiedSearch,
modifyFilterKueryNode,
} from './mapped_params_utils';
export {
apiKeyAsAlertAttributes,
apiKeyAsRuleDomainProperties,
} from './api_key_as_alert_attributes';
export * from './inject_references';
export { injectReferencesIntoActions, injectReferencesIntoParams } from './inject_references';
export { parseDate } from './parse_date';
export { includeFieldsRequiredForAuthentication } from './include_fields_required_for_authentication';
export { getAndValidateCommonBulkOptions } from './get_and_validate_common_bulk_options';
export * from './snooze_utils';
export {
getSnoozeAttributes,
getBulkSnooze,
getUnsnoozeAttributes,
getBulkUnsnooze,
clearUnscheduledSnoozeAttributes,
clearUnscheduledSnooze,
clearScheduledSnoozesAttributesById,
clearScheduledSnoozesById,
clearCurrentActiveSnoozeAttributes,
clearCurrentActiveSnooze,
verifySnoozeAttributeScheduleLimit,
verifySnoozeScheduleLimit,
} from './snooze_utils';
export { tryToRemoveTasks } from './try_to_remove_tasks';

View file

@ -24,6 +24,7 @@ export function setGlobalDate() {
// A version of date that responds to `new Date(null|undefined)` and `Date.now()`
// by returning a fixed date, otherwise should be same as Date.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Date = class Date {
constructor(...args: unknown[]) {
// sometimes the ctor has no args, sometimes has a single `null` arg

View file

@ -60,6 +60,7 @@ const getMonitoring = (attributes: RawRule) => {
const { lastExecutionDate, lastDuration } = executionStatus;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const monitoringExecution = (monitoring as any).execution;
return {

View file

@ -178,6 +178,7 @@ export const getDefaultSchedulerContext = <
alertingEventLoggerMock: jest.Mocked<AlertingEventLogger>,
actionsClientMock: jest.Mocked<PublicMethodsOf<ActionsClient>>,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
alertsClientMock: jest.Mocked<any>
) => ({
rule: getRule(),

View file

@ -28,6 +28,7 @@ export function resolvable<T>(): Promise<T> & Resolvable<T> {
// Used to convert a raw Rule's UUID to something that can be used
// to compare with a jest snapshot.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function alertWithAnyUUID(rawAlert: Record<string, any>): Record<string, any> {
if (!rawAlert?.meta?.uuid) return rawAlert;
@ -37,6 +38,7 @@ export function alertWithAnyUUID(rawAlert: Record<string, any>): Record<string,
}
export function alertsWithAnyUUID(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
rawAlerts: Record<string, any>
): Record<string, RawAlertInstance> {
const newAlerts: Record<string, RawAlertInstance> = {};

View file

@ -7,4 +7,5 @@
// TODO: https://github.com/elastic/kibana/issues/110897
export * from './drilldowns';
export type { DashboardDrilldownConfig } from './drilldowns';
export { createExtract, createInject, EMBEDDABLE_TO_DASHBOARD_DRILLDOWN } from './drilldowns';

View file

@ -5,5 +5,5 @@
* 2.0.
*/
export * from './integration_icon';
export * from './insufficient_privileges';
export { IntegrationIcon } from './integration_icon';
export { PrivilegesWarningIconWrapper } from './insufficient_privileges';

View file

@ -627,6 +627,7 @@ describe('createDataStream', () => {
test(`shouldn't throw when an error of type resource_already_exists_exception is thrown`, async () => {
// ElasticsearchError can be a bit random in shape, we need an any here
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const err = new Error('Already exists') as any;
err.body = {
error: {

View file

@ -93,6 +93,7 @@ type GetQueryBodyWithAuthFilterOpts =
})
| AggregateEventsWithAuthFilter;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type AliasAny = any;
const LEGACY_ID_CUTOFF_VERSION = '8.0.0';

View file

@ -11,4 +11,31 @@ export { API_BASE_PATH, INTERNAL_API_BASE_PATH, BASE_PATH, MAJOR_VERSION } from
export { getTemplateParameter, splitSizeAndUnits } from './lib';
export * from './types';
export type {
Aliases,
Index,
IndexSettings,
IndexSettingsResponse,
Mappings,
TemplateSerialized,
TemplateDeserialized,
TemplateType,
TemplateFromEs,
TemplateListItem,
LegacyTemplateSerialized,
EnhancedDataStreamFromEs,
Health,
DataStream,
DataStreamIndex,
DataRetention,
IndexMode,
ComponentTemplateSerialized,
ComponentTemplateDeserialized,
ComponentTemplateFromEs,
ComponentTemplateListItem,
ComponentTemplateDatastreams,
ComponentTemplateMeta,
FieldItem,
IndexWithFields,
FieldFromIndicesRequest,
} from './types';

View file

@ -43,7 +43,40 @@ export {
ResolveLogViewError,
} from './log_views/errors';
export * from './log_entry';
export type {
LogEntryTime,
LogMessageConstantPart,
LogMessageFieldPart,
LogMessagePart,
LogTimestampColumn,
LogFieldColumn,
LogMessageColumn,
LogColumn,
LogEntryContext,
LogEntryField,
LogEntry,
LogEntryCursor,
LogEntryBeforeCursor,
LogEntryAfterCursor,
LogEntryAroundCursor,
} from './log_entry';
export {
logMessageConstantPartRT,
logMessageFieldPartRT,
logMessagePartRT,
logTimestampColumnRT,
logFieldColumnRT,
logMessageColumnRT,
logColumnRT,
logEntryContextRT,
logEntryFieldRT,
logEntryRT,
logEntryCursorRT,
logEntryBeforeCursorRT,
logEntryAfterCursorRT,
logEntryAroundCursorRT,
getLogEntryCursorFromHit,
} from './log_entry';
export { convertISODateToNanoPrecision } from './utils';

View file

@ -5,6 +5,26 @@
* 2.0.
*/
export * from './index_pattern_context';
export * from './job_creator';
export * from './job_runner';
export type { IndexPatternContextValue } from './index_pattern_context';
export { IndexPatternContext } from './index_pattern_context';
export type { JobCreatorType } from './job_creator';
export {
JobCreator,
SingleMetricJobCreator,
MultiMetricJobCreator,
PopulationJobCreator,
AdvancedJobCreator,
CategorizationJobCreator,
RareJobCreator,
GeoJobCreator,
isSingleMetricJobCreator,
isMultiMetricJobCreator,
isPopulationJobCreator,
isAdvancedJobCreator,
isCategorizationJobCreator,
isRareJobCreator,
isGeoJobCreator,
jobCreatorFactory,
} from './job_creator';
export type { ProgressSubscriber } from './job_runner';
export { JobRunner } from './job_runner';

View file

@ -10,22 +10,52 @@
import { PluginInitializerContext } from '@kbn/core/server';
export type { RuleRegistryPluginSetupContract, RuleRegistryPluginStartContract } from './plugin';
export type { IRuleDataService, RuleDataPluginService } from './rule_data_plugin_service';
export { RuleDataClient } from './rule_data_client';
export type { IRuleDataClient } from './rule_data_client/types';
export type {
RacRequestHandlerContext,
RacApiRequestHandlerContext,
AlertTypeWithExecutor,
} from './types';
export * from './config';
export * from './rule_data_plugin_service';
export * from './rule_data_client';
export * from './alert_data_client/audit_events';
export type { RuleRegistryPluginConfig } from './config';
export { config, INDEX_PREFIX } from './config';
export type {
IRuleDataService,
RuleDataPluginService,
IndexOptions,
Settings,
Mappings,
Version,
Meta,
ComponentTemplateOptions,
IndexTemplateOptions,
IlmPolicyOptions,
} from './rule_data_plugin_service';
export {
RuleDataService,
Dataset,
RuleDataWriteDisabledError,
RuleDataWriterInitializationError,
} from './rule_data_plugin_service';
export type { RuleDataClientConstructorOptions, WaitResult } from './rule_data_client';
export type { IRuleDataClient, IRuleDataReader, IRuleDataWriter } from './rule_data_client/types';
export { RuleDataClient } from './rule_data_client';
export type { AlertAuditEventParams } from './alert_data_client/audit_events';
export {
AlertAuditAction,
operationAlertAuditActionMap,
alertAuditEvent,
} from './alert_data_client/audit_events';
export { createPersistenceRuleTypeWrapper } from './utils/create_persistence_rule_type_wrapper';
export * from './utils/persistence_types';
export type {
PersistenceAlertService,
SuppressedAlertService,
SuppressedAlertServiceResult,
PersistenceAlertServiceResult,
PersistenceServices,
PersistenceAlertType,
CreatePersistenceRuleTypeWrapper,
} from './utils/persistence_types';
export type { AlertsClient } from './alert_data_client/alerts_client';
export const plugin = async (initContext: PluginInitializerContext) => {

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { buildSortedEventsQuery, BuildSortedEventsQuery } from './build_sorted_events_query';
import { buildSortedEventsQuery, type BuildSortedEventsQuery } from './build_sorted_events_query';
import type { Writable } from '@kbn/utility-types';
const DefaultQuery: Writable<Partial<BuildSortedEventsQuery>> = {
@ -18,13 +18,13 @@ const DefaultQuery: Writable<Partial<BuildSortedEventsQuery>> = {
};
describe('buildSortedEventsQuery', () => {
let query: any;
let query: Partial<BuildSortedEventsQuery>;
beforeEach(() => {
query = { ...DefaultQuery };
});
test('it builds a filter with given date range', () => {
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -73,7 +73,7 @@ describe('buildSortedEventsQuery', () => {
test('it does not include searchAfterSortId if it is an empty string', () => {
query.searchAfterSortId = '';
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -123,7 +123,7 @@ describe('buildSortedEventsQuery', () => {
test('it includes searchAfterSortId if it is a valid string', () => {
const sortId = '123456789012';
query.searchAfterSortId = sortId;
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -174,7 +174,7 @@ describe('buildSortedEventsQuery', () => {
test('it includes searchAfterSortId if it is a valid number', () => {
const sortId = 123456789012;
query.searchAfterSortId = sortId;
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -230,7 +230,7 @@ describe('buildSortedEventsQuery', () => {
},
},
};
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -286,7 +286,7 @@ describe('buildSortedEventsQuery', () => {
test('it uses sortOrder if specified', () => {
query.sortOrder = 'desc';
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,
@ -335,7 +335,7 @@ describe('buildSortedEventsQuery', () => {
test('it uses track_total_hits if specified', () => {
query.track_total_hits = true;
expect(buildSortedEventsQuery(query)).toEqual({
expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({
allow_no_indices: true,
index: ['index-name'],
size: 100,

View file

@ -31,9 +31,11 @@ jest.mock('@kbn/kibana-react-plugin/public', () => {
jest.mock('@kbn/code-editor', () => ({
// Mocking CodeEditor
// eslint-disable-next-line @typescript-eslint/no-explicit-any
CodeEditor: (props: any) => (
<input
data-test-subj="mockCodeEditor"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onChange={(syntheticEvent: any) => {
props.onChange(syntheticEvent.jsonString);
}}
@ -98,6 +100,7 @@ jest.mock('@kbn/triggers-actions-ui-plugin/public', () => {
const createDataPluginMock = () => {
const dataMock = dataPluginMock.createStartContract() as DataPublicPluginStart & {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
search: ISearchStart & { search: jest.MockedFunction<any> };
};
return dataMock;

View file

@ -34,9 +34,11 @@ jest.mock('@kbn/code-editor', () => {
...original,
// Mocking CodeEditor
// eslint-disable-next-line @typescript-eslint/no-explicit-any
CodeEditor: (props: any) => (
<input
data-test-subj="mockCodeEditor"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onChange={(syntheticEvent: any) => {
props.onChange(syntheticEvent.jsonString);
}}

View file

@ -185,11 +185,13 @@ describe('Es Query utils', () => {
});
test('should return an empty array if raw runtime fields are malformed JSON', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const rawFields: any = null;
expect(convertRawRuntimeFieldtoFieldOption(rawFields)).toEqual([]);
});
test('should not return FieldOption if raw runtime fields do not include the type', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const rawFields: any = {
day_of_week: {
test: 'keyword',

View file

@ -28,6 +28,7 @@ const DefaultParams: Writable<Partial<EsQueryRuleParams>> = {
};
describe('ruleType Params validate()', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let params: any;
beforeEach(() => {
params = { ...DefaultParams };

View file

@ -23,6 +23,7 @@ describe('getEntitiesAndGenerateAlerts', () => {
instanceId: id,
});
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any;
beforeEach(() => {

View file

@ -10,6 +10,7 @@ import type { GeoContainmentAlertInstanceState } from '../types';
// Flatten agg results and get latest locations for each entity
export function transformResults(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
results: any,
dateField: string,
geoField: string

View file

@ -25,6 +25,7 @@ const DefaultParams: Writable<Partial<Params>> = {
describe('ruleType Params validate()', () => {
runTests(ParamsSchema, DefaultParams);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let params: any;
beforeEach(() => {
params = { ...DefaultParams };
@ -80,6 +81,7 @@ describe('ruleType Params validate()', () => {
});
export function runTests(schema: ObjectType, defaultTypeParams: Record<string, unknown>): void {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let params: any;
const CoreDefaultParams: Writable<Partial<CoreQueryParams>> = {

View file

@ -10,7 +10,7 @@ import type {
ActionTypeExecutorOptions as ConnectorTypeExecutorOptions,
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
} from '@kbn/actions-plugin/server/types';
import { CasesConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config';
import { CasesConnectorFeatureId } from '@kbn/actions-plugin/common';
import {
CasesWebhookActionParamsType,
CasesWebhookExecutorResultData,

View file

@ -9,11 +9,8 @@ import {
SubActionConnectorType,
ValidatorType,
} from '@kbn/actions-plugin/server/sub_action_framework/types';
import {
AlertingConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
import { urlAllowListValidator } from '@kbn/actions-plugin/server';
import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common';
import { D3SecurityConfigSchema, D3SecuritySecretsSchema } from '../../../common/d3security/schema';
import { renderParameterTemplates } from './render';
import { D3SecurityConnector } from './d3security';

View file

@ -21,7 +21,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/connector_feature_config';
} from '@kbn/actions-plugin/common';
import { withoutMustacheTemplate } from '@kbn/actions-plugin/common';
import {
renderMustacheObject,

View file

@ -237,6 +237,7 @@ function getTransportConfig(
) {
const { service, host, port, secure, user, password } = transport;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const transportConfig: Record<string, any> = {};
const proxySettings = configurationUtilities.getProxySettings();
const generalSSLSettings = configurationUtilities.getSSLSettings();

View file

@ -8,24 +8,22 @@
import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import { schema, TypeOf } from '@kbn/config-schema';
import { Logger } from '@kbn/core/server';
import type { Logger } from '@kbn/core/server';
import type {
ActionType as ConnectorType,
ActionTypeExecutorOptions as ConnectorTypeExecutorOptions,
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
} from '@kbn/actions-plugin/server/types';
import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer';
import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
import {
AlertHistoryEsIndexConnectorId,
ALERT_HISTORY_PREFIX,
buildAlertHistoryDocument,
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common';
import {
import type {
BulkOperationType,
BulkResponseItem,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';

View file

@ -17,7 +17,7 @@ import {
import { urlAllowListValidator } from '@kbn/actions-plugin/server';
import { ValidatorServices } from '@kbn/actions-plugin/server/types';
import { assertURL } from '@kbn/actions-plugin/server/sub_action_framework/helpers/validators';
import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config';
import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common';
import { GEMINI_CONNECTOR_ID, GEMINI_TITLE } from '../../../common/gemini/constants';
import { ConfigSchema, SecretsSchema } from '../../../common/gemini/schema';
import { Config, Secrets } from '../../../common/gemini/types';

View file

@ -94,6 +94,7 @@ export function chunksIntoMessage(obs$: Observable<UnifiedChatCompleteResponse>)
},
],
object: 'chat.completion',
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any
),
last(),
@ -102,6 +103,7 @@ export function chunksIntoMessage(obs$: Observable<UnifiedChatCompleteResponse>)
if (concatenatedChunk.choices[0].message.content === '') {
concatenatedChunk.choices[0].message.content = null;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
concatenatedChunk.choices[0].message.tool_calls?.forEach((toolCall: any) => {
if (toolCall.function?.arguments?.trim() === '') {
toolCall.function.arguments = '{}';

View file

@ -15,7 +15,7 @@ import {
GenerativeAIForSecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common';
import { ValidatorServices } from '@kbn/actions-plugin/server/types';
import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config';
import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common';
import { InferenceTaskType } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient, Logger } from '@kbn/core/server';
import {

View file

@ -237,6 +237,7 @@ describe('InferenceConnector', () => {
});
streamMock.complete();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
mockEsClient.inference.inference.mockResolvedValue(streamMock.transform as any);
};

View file

@ -17,7 +17,7 @@ import {
CasesConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { validate } from './validators';
import {
ExternalIncidentServiceConfigurationSchema,

View file

@ -36,7 +36,9 @@ export interface ExternalServiceCredentials {
}
export interface ExternalServiceValidation {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
config: (configObject: any, validatorServices: ValidatorServices) => void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
secrets: (secrets: any, validatorServices: ValidatorServices) => void;
}

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { AxiosResponse } from 'axios';
import { SubActionConnector } from '@kbn/actions-plugin/server';
import { SubActionRequestParams } from '@kbn/actions-plugin/server/sub_action_framework/types';

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { AxiosError, AxiosInstance, AxiosResponse } from 'axios';
import { TypeOf } from '@kbn/config-schema';
import { Logger } from '@kbn/core/server';

View file

@ -28,6 +28,7 @@ import {
export interface CreateMicrosoftDefenderConnectorMockResponse {
options: ServiceParams<MicrosoftDefenderEndpointConfig, MicrosoftDefenderEndpointSecrets>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
apiMock: { [msApiRoute: string]: (...args: any) => any | Promise<any> };
instanceMock: ConnectorInstanceMock<MicrosoftDefenderEndpointConnector>;
usageCollector: ConnectorUsageCollector;

View file

@ -19,7 +19,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { postPagerduty } from './post_pagerduty';
import { convertTimestamp } from '../lib/convert_timestamp';

View file

@ -21,7 +21,9 @@ export interface ExternalServiceCredentials {
}
export interface ExternalServiceValidation {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
config: (configObject: any, validatorServices: ValidatorServices) => void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
secrets: (secrets: any, validatorServices: ValidatorServices) => void;
}

View file

@ -170,6 +170,7 @@ class SentinelOneConnectorTestClass extends SentinelOneConnector {
downloadRemoteScriptResults: Readable.from(['test']),
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public requestSpy = jest.fn(async ({ url }: SubActionRequestParams<any>) => {
const response = createAxiosResponseMock({});

View file

@ -18,7 +18,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/connector_feature_config';
} from '@kbn/actions-plugin/common';
import { withoutControlCharacters } from '../lib/string_utils';
export type ServerLogConnectorType = ConnectorType<{}, {}, ActionParamsType>;

View file

@ -12,10 +12,7 @@ import type {
ActionTypeExecutorOptions as ConnectorTypeExecutorOptions,
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
} from '@kbn/actions-plugin/server/types';
import {
AlertingConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common';
import { validate } from '../lib/servicenow/validators';
import {
ExecutorParamsSchemaITOM,

View file

@ -18,7 +18,7 @@ import {
CasesConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { validate } from '../lib/servicenow/validators';
import {
ExecutorParamsSchemaITSM,

View file

@ -17,7 +17,7 @@ import {
AlertingConnectorFeatureId,
CasesConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { validate } from '../lib/servicenow/validators';
import {
ExecutorParamsSchemaSIR,

View file

@ -25,7 +25,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer';
import { getCustomAgents } from '@kbn/actions-plugin/server/lib/get_custom_agents';
import { TaskErrorSource } from '@kbn/task-manager-plugin/common';

View file

@ -10,7 +10,7 @@ import {
UptimeConnectorFeatureId,
AlertingConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { Logger } from '@kbn/core/server';
import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer';
import type { ValidatorServices } from '@kbn/actions-plugin/server/types';

View file

@ -15,7 +15,7 @@ import {
AlertingConnectorFeatureId,
CasesConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import {
SwimlaneExecutorResultData,
SwimlanePublicConfigurationType,

View file

@ -29,7 +29,9 @@ export interface ExternalServiceCredentials {
}
export interface ExternalServiceValidation {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
config: (configObject: any, validatorServices: ValidatorServices) => void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
secrets: (secrets: any, validatorServices: ValidatorServices) => void;
}

View file

@ -23,7 +23,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { getRetryAfterIntervalFromHeaders } from '../lib/http_response_retry_header';
import { isOk, promiseResult, Result } from '../lib/result_type';

View file

@ -14,7 +14,7 @@ import {
SecurityConnectorFeatureId,
UptimeConnectorFeatureId,
CasesConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { urlAllowListValidator } from '@kbn/actions-plugin/server';
import { TheHiveConnector } from './thehive';
import {

View file

@ -17,11 +17,10 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
ActionTypeExecutorResult,
} from '@kbn/actions-plugin/common';
import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer';
import { request } from '@kbn/actions-plugin/server/lib/axios_utils';
import { ValidatorServices } from '@kbn/actions-plugin/server/types';
import { ActionTypeExecutorResult, ValidatorServices } from '@kbn/actions-plugin/server/types';
import { getRetryAfterIntervalFromHeaders } from '../lib/http_response_retry_header';
import { promiseResult, isOk, Result } from '../lib/result_type';

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ConnectorUsageCollector, Services } from '@kbn/actions-plugin/server/types';
import { validateConfig, validateParams, validateSecrets } from '@kbn/actions-plugin/server/lib';
import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock';

View file

@ -21,7 +21,7 @@ import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
} from '@kbn/actions-plugin/common';
import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer';
import { combineHeadersWithBasicAuthHeader } from '@kbn/actions-plugin/server/lib';

View file

@ -14,10 +14,7 @@ import {
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
ValidatorServices,
} from '@kbn/actions-plugin/server/types';
import {
AlertingConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common';
import { postXmatters } from './post_xmatters';
export type XmattersConnectorType = ConnectorType<

View file

@ -37,6 +37,7 @@ beforeEach(() => jest.clearAllMocks());
const mockedDate = new Date('2019-02-12T21:01:22.479Z');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Date = class Date {
constructor() {
return mockedDate;
@ -72,6 +73,7 @@ describe('TaskClaiming', () => {
jest
.spyOn(apm, 'startTransaction')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation(() => mockApmTrans as any);
});

View file

@ -36,9 +36,11 @@ const { summarizeMonitoringStats } = jest.requireMock('../monitoring');
const mockUsageCountersSetup = usageCountersServiceMock.createSetupContract();
const mockUsageCounter = mockUsageCountersSetup.createUsageCounter('test');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const createMockClusterClient = (response: any) => {
const mockScopedClusterClient = elasticsearchServiceMock.createScopedClusterClient();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
mockScopedClusterClient.asCurrentUser.security.hasPrivileges.mockResponse(response as any);
const mockClusterClient = elasticsearchServiceMock.createClusterClient();

View file

@ -98,6 +98,7 @@ function alertingTaskLegacyIdToSavedObjectIds(
params: JSON.stringify({
...params,
alertId: newId,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any,
},
};
@ -127,6 +128,7 @@ function actionsTasksLegacyIdToSavedObjectIds(
params: JSON.stringify({
...params,
actionTaskParamsId: newId,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any,
},
};

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ObjectType, schema, TypeOf } from '@kbn/config-schema';
import { isNumber } from 'lodash';
import { isErr, tryAsResult } from './lib/result_type';

View file

@ -63,6 +63,7 @@ beforeEach(() => jest.clearAllMocks());
const mockedDate = new Date('2019-02-12T21:01:22.479Z');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Date = class Date {
constructor() {
return mockedDate;
@ -123,6 +124,7 @@ describe('TaskClaiming', () => {
jest
.spyOn(apm, 'startTransaction')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation(() => mockApmTrans as any);
jest.spyOn(taskPartitioner, 'getPartitions').mockResolvedValue([1, 3]);
});

View file

@ -54,6 +54,7 @@ beforeEach(() => jest.clearAllMocks());
const mockedDate = new Date('2019-02-12T21:01:22.479Z');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Date = class Date {
constructor() {
return mockedDate;
@ -89,6 +90,7 @@ describe('TaskClaiming', () => {
jest
.spyOn(apm, 'startTransaction')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation(() => mockApmTrans as any);
});

View file

@ -89,6 +89,7 @@ describe('TaskManagerRunner', () => {
jest
.spyOn(apm, 'startTransaction')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.mockImplementation(() => mockApmTrans as any);
});
test('makes calls to APM as expected when task markedAsRunning is success', async () => {

View file

@ -65,6 +65,7 @@ beforeEach(() => {
const mockedDate = new Date('2019-02-12T21:01:22.479Z');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).Date = class Date {
constructor() {
return mockedDate;

View file

@ -7,8 +7,39 @@
// TODO: https://github.com/elastic/kibana/issues/110895
export * from './data';
export type {
DateRange,
DateRangeInfo,
GetDateRangeInfoParams,
BuildAggregationOpts,
ParsedAggregationGroup,
ParsedAggregationResults,
TimeSeriesResult,
TimeSeriesResultRow,
MetricResult,
} from './data';
export {
MAX_INTERVALS,
getDateRangeInfo,
getTooManyIntervalsErrorMessage,
getDateStartAfterDateEndErrorMessage,
BUCKET_SELECTOR_PATH_NAME,
BUCKET_SELECTOR_FIELD,
DEFAULT_GROUPS,
MAX_SOURCE_FIELDS_TO_COPY,
isCountAggregation,
isGroupAggregation,
buildAggregation,
UngroupedGroupId,
parseAggregationResults,
} from './data';
export const BASE_TRIGGERS_ACTIONS_UI_API_PATH = '/internal/triggers_actions_ui';
export * from './parse_interval';
export * from './experimental_features';
export * from './normalized_field_types';
export { INTERVAL_STRING_RE, parseInterval } from './parse_interval';
export type { ExperimentalFeatures } from './experimental_features';
export {
allowedExperimentalValues,
parseExperimentalConfigValue,
isValidExperimentalValue,
getExperimentalAllowedValues,
} from './experimental_features';
export { NORMALIZED_FIELD_TYPES } from './normalized_field_types';

View file

@ -62,11 +62,11 @@ import {
isActionGroupDisabledForActionTypeId,
RuleActionAlertsFilterProperty,
RuleActionKey,
Flapping,
} from '@kbn/alerting-plugin/common';
import { AlertingConnectorFeatureId } from '@kbn/actions-plugin/common';
import { AlertConsumers } from '@kbn/rule-data-utils';
import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '@kbn/alerts-ui-shared/src/common/constants/rule_flapping';
import type { Flapping } from '@kbn/alerting-types';
import { RuleReducerAction, InitialRule } from './rule_reducer';
import {
RuleTypeModel,

View file

@ -23,6 +23,7 @@ const DefaultParams: Writable<Partial<CoreQueryParams>> = {
};
export function runTests(schema: ObjectType, defaultTypeParams: Record<string, unknown>): void {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let params: any;
describe('coreQueryTypes', () => {

View file

@ -64,6 +64,7 @@ export async function timeSeriesQuery(
// core query
// Constructing a typesafe ES query in JS is problematic, use any escapehatch for now
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const esQuery: any = {
index,
body: {

View file

@ -22,6 +22,7 @@ const DefaultParams: Writable<Partial<TimeSeriesQuery>> = {
describe('TimeSeriesParams validate()', () => {
runTests(TimeSeriesQuerySchema, DefaultParams);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let params: any;
beforeEach(() => {
params = { ...DefaultParams };

Some files were not shown because too many files have changed in this diff Show more