mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Move src/core/types/elasticsearch
to @kbn/es-types
(#140522)
* create empty package * move types to packages * [CI] Auto-commit changed files from 'node scripts/generate codeowners' * start fixing imports * fix more imports * fix inline import * add apm-ui as owners * [CI] Auto-commit changed files from 'node scripts/generate codeowners' * fix new usages Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
256f2e7353
commit
9579ea7235
76 changed files with 254 additions and 93 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -853,6 +853,7 @@ packages/kbn-es @elastic/kibana-operations
|
|||
packages/kbn-es-archiver @elastic/kibana-operations
|
||||
packages/kbn-es-errors @elastic/kibana-core
|
||||
packages/kbn-es-query @elastic/kibana-app-services
|
||||
packages/kbn-es-types @elastic/kibana-core @elastic/apm-ui
|
||||
packages/kbn-eslint-config @elastic/kibana-operations
|
||||
packages/kbn-eslint-plugin-disable @elastic/kibana-operations
|
||||
packages/kbn-eslint-plugin-eslint @elastic/kibana-operations
|
||||
|
|
|
@ -300,6 +300,7 @@
|
|||
"@kbn/ebt-tools": "link:bazel-bin/packages/kbn-ebt-tools",
|
||||
"@kbn/es-errors": "link:bazel-bin/packages/kbn-es-errors",
|
||||
"@kbn/es-query": "link:bazel-bin/packages/kbn-es-query",
|
||||
"@kbn/es-types": "link:bazel-bin/packages/kbn-es-types",
|
||||
"@kbn/field-types": "link:bazel-bin/packages/kbn-field-types",
|
||||
"@kbn/flot-charts": "link:bazel-bin/packages/kbn-flot-charts",
|
||||
"@kbn/handlebars": "link:bazel-bin/packages/kbn-handlebars",
|
||||
|
@ -1010,6 +1011,7 @@
|
|||
"@types/kbn__es-archiver": "link:bazel-bin/packages/kbn-es-archiver/npm_module_types",
|
||||
"@types/kbn__es-errors": "link:bazel-bin/packages/kbn-es-errors/npm_module_types",
|
||||
"@types/kbn__es-query": "link:bazel-bin/packages/kbn-es-query/npm_module_types",
|
||||
"@types/kbn__es-types": "link:bazel-bin/packages/kbn-es-types/npm_module_types",
|
||||
"@types/kbn__eslint-plugin-disable": "link:bazel-bin/packages/kbn-eslint-plugin-disable/npm_module_types",
|
||||
"@types/kbn__eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports/npm_module_types",
|
||||
"@types/kbn__field-types": "link:bazel-bin/packages/kbn-field-types/npm_module_types",
|
||||
|
|
|
@ -198,6 +198,7 @@ filegroup(
|
|||
"//packages/kbn-es-archiver:build",
|
||||
"//packages/kbn-es-errors:build",
|
||||
"//packages/kbn-es-query:build",
|
||||
"//packages/kbn-es-types:build",
|
||||
"//packages/kbn-eslint-config:build",
|
||||
"//packages/kbn-eslint-plugin-disable:build",
|
||||
"//packages/kbn-eslint-plugin-eslint:build",
|
||||
|
@ -506,6 +507,7 @@ filegroup(
|
|||
"//packages/kbn-es-archiver:build_types",
|
||||
"//packages/kbn-es-errors:build_types",
|
||||
"//packages/kbn-es-query:build_types",
|
||||
"//packages/kbn-es-types:build_types",
|
||||
"//packages/kbn-eslint-plugin-disable:build_types",
|
||||
"//packages/kbn-eslint-plugin-imports:build_types",
|
||||
"//packages/kbn-field-types:build_types",
|
||||
|
|
107
packages/kbn-es-types/BUILD.bazel
Normal file
107
packages/kbn-es-types/BUILD.bazel
Normal file
|
@ -0,0 +1,107 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||
|
||||
PKG_DIRNAME = "kbn-es-types"
|
||||
PKG_REQUIRE_NAME = "@kbn/es-types"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"**/*.ts",
|
||||
],
|
||||
exclude = [
|
||||
"**/*.config.js",
|
||||
"**/*.mock.*",
|
||||
"**/*.test.*",
|
||||
"**/*.stories.*",
|
||||
"**/__snapshots__/**",
|
||||
"**/integration_tests/**",
|
||||
"**/mocks/**",
|
||||
"**/scripts/**",
|
||||
"**/storybook/**",
|
||||
"**/test_fixtures/**",
|
||||
"**/test_helpers/**",
|
||||
],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/jest",
|
||||
"@npm//utility-types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
]
|
||||
|
||||
jsts_transpiler(
|
||||
name = "target_node",
|
||||
srcs = SRCS,
|
||||
build_pkg_name = package_name(),
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//:tsconfig.base.json",
|
||||
"//:tsconfig.bazel.json",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "tsc_types",
|
||||
args = ['--pretty'],
|
||||
srcs = SRCS,
|
||||
deps = TYPES_DEPS,
|
||||
declaration = True,
|
||||
declaration_map = True,
|
||||
emit_declaration_only = True,
|
||||
out_dir = "target_types",
|
||||
tsconfig = ":tsconfig",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_DIRNAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = RUNTIME_DEPS + [":target_node"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "npm_module",
|
||||
deps = [":" + PKG_DIRNAME],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build",
|
||||
srcs = [":npm_module"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm_types(
|
||||
name = "npm_module_types",
|
||||
srcs = SRCS,
|
||||
deps = [":tsc_types"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
tsconfig = ":tsconfig",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build_types",
|
||||
srcs = [":npm_module_types"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
3
packages/kbn-es-types/README.md
Normal file
3
packages/kbn-es-types/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# @kbn/es-types
|
||||
|
||||
This package contains 'missing' types for the `@elastic/elasticsearch` client.
|
20
packages/kbn-es-types/index.ts
Normal file
20
packages/kbn-es-types/index.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export type {
|
||||
AggregationOptionsByType,
|
||||
ESSearchOptions,
|
||||
SearchHit,
|
||||
ESSearchResponse,
|
||||
ESSearchRequest,
|
||||
ESSourceOptions,
|
||||
InferSearchResponseOf,
|
||||
AggregationResultOf,
|
||||
ESFilter,
|
||||
MaybeReadonlyArray,
|
||||
} from './src';
|
13
packages/kbn-es-types/jest.config.js
Normal file
13
packages/kbn-es-types/jest.config.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preset: '@kbn/test/jest_node',
|
||||
rootDir: '../..',
|
||||
roots: ['<rootDir>/packages/kbn-es-types'],
|
||||
};
|
7
packages/kbn-es-types/kibana.jsonc
Normal file
7
packages/kbn-es-types/kibana.jsonc
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "shared-common",
|
||||
"id": "@kbn/es-types",
|
||||
"owner": ["@elastic/kibana-core", "@elastic/apm-ui"],
|
||||
"runtimeDeps": [],
|
||||
"typeDeps": [],
|
||||
}
|
8
packages/kbn-es-types/package.json
Normal file
8
packages/kbn-es-types/package.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "@kbn/es-types",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"main": "./target_node/index.js",
|
||||
"author": "Kibana Core",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { ValuesType, UnionToIntersection } from 'utility-types';
|
||||
import type { ValuesType, UnionToIntersection } from 'utility-types';
|
||||
import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
|
||||
interface AggregationsAggregationContainer extends Record<string, any> {
|
17
packages/kbn-es-types/tsconfig.json
Normal file
17
packages/kbn-es-types/tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"extends": "../../tsconfig.bazel.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"outDir": "target_types",
|
||||
"stripInternal": false,
|
||||
"types": [
|
||||
"jest",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
]
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import DateMath from '@kbn/datemath';
|
||||
import type { DataView, DataViewField } from '@kbn/data-views-plugin/common';
|
||||
import type { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import type { FieldStatsResponse } from '../types';
|
||||
import { getFieldExampleBuckets, canProvideExamplesForField } from './field_examples_calculator';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
|
||||
import type { AiopsExplainLogRateSpikesSchema } from '../../../common/api/explain_log_rate_spikes';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import {
|
||||
ERROR_GROUP_ID,
|
||||
PROCESSOR_EVENT,
|
||||
|
|
|
@ -19,10 +19,7 @@ import { Moment } from 'moment-timezone';
|
|||
import React from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { APMConfig } from '../../server';
|
||||
import { MockApmPluginContextWrapper } from '../context/apm_plugin/mock_apm_plugin_context';
|
||||
import { UrlParamsProvider } from '../context/url_params_context/url_params_context';
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
|
||||
import { Client } from '@elastic/elasticsearch';
|
||||
import type { ClientOptions } from '@elastic/elasticsearch/lib/client';
|
||||
import {
|
||||
ESSearchResponse,
|
||||
ESSearchRequest,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse, ESSearchRequest } from '@kbn/es-types';
|
||||
|
||||
export type ESClient = ReturnType<typeof getEsClient>;
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { Setup } from '../helpers/setup_request';
|
||||
|
||||
interface SharedFields {
|
||||
|
|
|
@ -8,10 +8,7 @@
|
|||
import { merge } from 'lodash';
|
||||
import { Logger, SavedObjectsClient } from '@kbn/core/server';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { ApmIndicesConfig } from '../../../routes/settings/apm_indices/get_apm_indices';
|
||||
import { tasks } from './tasks';
|
||||
import { APMDataTelemetry } from '../types';
|
||||
|
|
|
@ -14,10 +14,7 @@ import type {
|
|||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { ValuesType } from 'utility-types';
|
||||
import { ElasticsearchClient, KibanaRequest } from '@kbn/core/server';
|
||||
import {
|
||||
ESSearchRequest,
|
||||
InferSearchResponseOf,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types';
|
||||
import { unwrapEsResponse } from '@kbn/observability-plugin/server';
|
||||
import { omit } from 'lodash';
|
||||
import { ProcessorEvent } from '@kbn/observability-plugin/common';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { uniq, defaultsDeep, cloneDeep } from 'lodash';
|
||||
import { ESSearchRequest, ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESFilter } from '@kbn/es-types';
|
||||
import { ProcessorEvent } from '@kbn/observability-plugin/common';
|
||||
import { PROCESSOR_EVENT } from '../../../../../common/elasticsearch_fieldnames';
|
||||
import { ApmIndicesConfig } from '../../../../routes/settings/apm_indices/get_apm_indices';
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { unwrapEsResponse } from '@kbn/observability-plugin/server';
|
||||
import {
|
||||
ESSearchResponse,
|
||||
ESSearchRequest,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse, ESSearchRequest } from '@kbn/es-types';
|
||||
import { APMRouteHandlerResources } from '../../../../routes/typings';
|
||||
import {
|
||||
callAsyncWithDebug,
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
import type {
|
||||
AggregationOptionsByType,
|
||||
AggregationResultOf,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
} from '@kbn/es-types';
|
||||
import { FAAS_COLDSTART } from '../../../common/elasticsearch_fieldnames';
|
||||
|
||||
export const getColdstartAggregation = () => ({
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
import type {
|
||||
AggregationOptionsByType,
|
||||
AggregationResultOf,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
} from '@kbn/es-types';
|
||||
import { EVENT_OUTCOME } from '../../../common/elasticsearch_fieldnames';
|
||||
import { EventOutcome } from '../../../common/event_outcome';
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { RuleExecutorServices } from '@kbn/alerting-plugin/server';
|
||||
|
||||
export async function alertingEsClient<TParams extends ESSearchRequest>({
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
ALERT_SEVERITY,
|
||||
} from '@kbn/rule-data-utils';
|
||||
import { compact } from 'lodash';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { KibanaRequest } from '@kbn/core/server';
|
||||
import { termQuery } from '@kbn/observability-plugin/server';
|
||||
import { createLifecycleRuleTypeFactory } from '@kbn/rule-registry-plugin/server';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { Unionize } from 'utility-types';
|
||||
import { euiLightVars as theme } from '@kbn/ui-theme';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { AggregationOptionsByType } from '@kbn/core/types/elasticsearch';
|
||||
import type { AggregationOptionsByType } from '@kbn/es-types';
|
||||
import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server';
|
||||
import { ProcessorEvent } from '@kbn/observability-plugin/common';
|
||||
import { getVizColorForIndex } from '../../../common/viz_colors';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import Boom from '@hapi/boom';
|
||||
import { sortBy, uniqBy } from 'lodash';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { MlPluginSetup } from '@kbn/ml-plugin/server';
|
||||
import { rangeQuery } from '@kbn/observability-plugin/server';
|
||||
import { getSeverity, ML_ERRORS } from '../../../common/anomaly_detection';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import { sumBy } from 'lodash';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { rangeQuery } from '@kbn/observability-plugin/server';
|
||||
import { ProcessorEvent } from '@kbn/observability-plugin/common';
|
||||
import {
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import {
|
||||
inspectSearchParams,
|
||||
SearchParamsMock,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { rangeQuery } from '@kbn/observability-plugin/server';
|
||||
import { isFiniteNumber } from '../../../../common/utils/is_finite_number';
|
||||
import { Annotation, AnnotationType } from '../../../../common/annotations';
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
unwrapEsResponse,
|
||||
WrappedElasticsearchClientError,
|
||||
} from '@kbn/observability-plugin/server';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { Annotation as ESAnnotation } from '@kbn/observability-plugin/common/annotations';
|
||||
import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server';
|
||||
import { environmentQuery } from '../../../../common/utils/environment_query';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { AggregationOptionsByType } from '@kbn/core/types/elasticsearch';
|
||||
import type { AggregationOptionsByType } from '@kbn/es-types';
|
||||
import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server';
|
||||
import { ProcessorEvent } from '@kbn/observability-plugin/common';
|
||||
import {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types';
|
||||
|
||||
// needed for backwards compatability
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types';
|
||||
import {
|
||||
SERVICE_ENVIRONMENT,
|
||||
|
|
|
@ -200,7 +200,7 @@ const agentConfigurationSearchRoute = createApmServerRoute({
|
|||
handler: async (
|
||||
resources
|
||||
): Promise<
|
||||
| import('./../../../../../../../src/core/types/elasticsearch/search').SearchHit<
|
||||
| import('@kbn/es-types').SearchHit<
|
||||
import('./../../../../common/agent_configuration/configuration_types').AgentConfiguration,
|
||||
undefined,
|
||||
undefined
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
import {
|
||||
SERVICE_NAME,
|
||||
SERVICE_ENVIRONMENT,
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import {
|
||||
ESSearchRequest,
|
||||
ESSearchResponse,
|
||||
} from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { APMConfig } from '..';
|
||||
import { ApmIndicesConfig } from '../routes/settings/apm_indices/get_apm_indices';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { defineGetCspStatusRoute, INDEX_TIMEOUT_IN_MINUTES } from './status';
|
||||
import { httpServerMock, httpServiceMock } from '@kbn/core/server/mocks';
|
||||
import type { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import {
|
||||
AgentClient,
|
||||
AgentPolicyServiceInterface,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
|
||||
import type { Agent, AgentAction, ActionStatus, CurrentUpgrade, NewAgentAction } from '../models';
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { getFlattenedObject } from '@kbn/std';
|
||||
import omit from 'lodash/omit';
|
||||
import type { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import { useEffect, useState, useMemo, useRef } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import type { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
|
||||
import type { IncomingDataList } from '../../../common/types/rest_spec/agent';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { SortResults } from '@elastic/elasticsearch/lib/api/types';
|
||||
import type { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
|
||||
import type { Agent, AgentSOAttributes, FleetServerAgent } from '../../types';
|
||||
import { getAgentStatus } from '../../../common/services/agent_status';
|
||||
|
|
|
@ -13,7 +13,7 @@ import type { SavedObjectsClientContract, ElasticsearchClient } from '@kbn/core/
|
|||
|
||||
import { toElasticsearchQuery, fromKueryExpression } from '@kbn/es-query';
|
||||
|
||||
import type { ESSearchResponse as SearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse as SearchResponse } from '@kbn/es-types';
|
||||
|
||||
import type { EnrollmentAPIKey, FleetServerEnrollmentAPIKey } from '../../types';
|
||||
import { FleetError } from '../../errors';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { SearchHit } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit } from '@kbn/es-types';
|
||||
|
||||
import type { Artifact, ArtifactElasticsearchProperties, NewArtifact } from './types';
|
||||
import { ARTIFACT_DOWNLOAD_RELATIVE_PATH } from './constants';
|
||||
|
|
|
@ -10,7 +10,7 @@ import type { TransportResult } from '@elastic/elasticsearch';
|
|||
import { errors } from '@elastic/elasticsearch';
|
||||
|
||||
import { elasticsearchServiceMock } from '@kbn/core/server/mocks';
|
||||
import type { SearchHit, ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { SearchHit, ESSearchResponse } from '@kbn/es-types';
|
||||
|
||||
import type {
|
||||
Artifact,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { ESSearchRequest } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest } from '@kbn/es-types';
|
||||
import { findInventoryFields } from '../../../../../common/inventory_models';
|
||||
import { InfraTimerangeInput, SnapshotCustomMetricInput } from '../../../../../common/http_api';
|
||||
import {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// Service for obtaining data for the ML Results dashboards.
|
||||
import { useMemo } from 'react';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { HttpService } from '../http_service';
|
||||
import { useMlKibana } from '../../contexts/kibana';
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from '@kbn/maps-plugin/common/descriptor_types';
|
||||
import type { SerializableRecord } from '@kbn/utility-types';
|
||||
import { fromKueryExpression, luceneStringToDsl, toElasticsearchQuery } from '@kbn/es-query';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { VectorSourceRequestMeta } from '@kbn/maps-plugin/common';
|
||||
import { LAYER_TYPE, SOURCE_TYPES, SCALING_TYPES } from '@kbn/maps-plugin/common';
|
||||
import { SEVERITY_COLOR_RAMP } from '../../common';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React, { useMemo } from 'react';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { ExistsFilter, PhraseFilter } from '@kbn/es-query';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { PersistableFilter } from '@kbn/lens-plugin/common';
|
||||
import { ALL_VALUES_SELECTED } from '../../configurations/constants/url_constants';
|
||||
import FieldValueSuggestions from '../../../field_value_suggestions';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import { ExistsFilter, isExistsFilter } from '@kbn/es-query';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { PersistableFilter } from '@kbn/lens-plugin/common';
|
||||
import { useValuesList } from '../../../../hooks/use_values_list';
|
||||
import { FilterProps } from './columns/filter_expanded';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { PopoverAnchorPosition } from '@elastic/eui';
|
||||
import { Dispatch, SetStateAction } from 'react';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { IInspectorInfo } from '@kbn/data-plugin/common';
|
||||
|
||||
interface CommonProps {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { IInspectorInfo, isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common';
|
||||
import { FETCH_STATUS, useFetcher } from './use_fetcher';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { capitalize, uniqBy } from 'lodash';
|
||||
import { useEffect, useState } from 'react';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { IInspectorInfo } from '@kbn/data-plugin/common';
|
||||
import { createEsParams, useEsSearch } from './use_es_search';
|
||||
import { TRANSACTION_URL } from '../components/shared/exploratory_view/configurations/constants/elasticsearch_fieldnames';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { euiPaletteColorBlind } from '@elastic/eui';
|
||||
import { InferSearchResponseOf } from '@kbn/core/types/elasticsearch';
|
||||
import { InferSearchResponseOf } from '@kbn/es-types';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { orderBy } from 'lodash';
|
||||
import { ProfilingESField } from './elasticsearch';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { ElasticsearchClient } from '@kbn/core/server';
|
||||
import { ESSearchRequest, InferSearchResponseOf } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types';
|
||||
import type { KibanaRequest } from '@kbn/core/server';
|
||||
import { unwrapEsResponse } from '@kbn/observability-plugin/server';
|
||||
import { MgetRequest, MgetResponse } from '@elastic/elasticsearch/lib/api/types';
|
||||
|
|
|
@ -13,7 +13,7 @@ import { ElasticsearchClient } from '@kbn/core/server';
|
|||
import { Logger } from '@kbn/core/server';
|
||||
import { IndexPatternsFetcher } from '@kbn/data-plugin/server';
|
||||
|
||||
import { ESSearchRequest, ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import {
|
||||
RuleDataWriteDisabledError,
|
||||
RuleDataWriterInitializationError,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import type { TransportResult } from '@elastic/elasticsearch';
|
||||
import { BulkRequest, BulkResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
|
||||
import { ESSearchRequest, ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types';
|
||||
import { FieldDescriptor } from '@kbn/data-plugin/server';
|
||||
import { ParsedExperimentalFields } from '../../common/parse_experimental_fields';
|
||||
import { ParsedTechnicalFields } from '../../common/parse_technical_fields';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type { Moment } from 'moment';
|
||||
import type { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import type { SignalSource } from '../../signals/types';
|
||||
|
||||
export type RecentTermsAggResult = ESSearchResponse<
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type { Filter } from '@kbn/es-query';
|
||||
import type { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import type { ThresholdSignalHistory, ThresholdSignalHistoryRecord } from '../types';
|
||||
|
||||
/*
|
||||
|
|
|
@ -11,7 +11,7 @@ import type {
|
|||
AggregationsMaxAggregate,
|
||||
AggregationsMinAggregate,
|
||||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import type { SignalSource } from '../types';
|
||||
import type {
|
||||
buildThresholdMultiBucketAggregation,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import type { AnomaliesSearchParams } from '.';
|
||||
import { getAnomalies } from '.';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { ESSearchRequest } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchRequest } from '@kbn/es-types';
|
||||
|
||||
interface BuildSortedEventsQueryOpts {
|
||||
aggs?: Record<string, estypes.AggregationsAggregationContainer>;
|
||||
|
|
|
@ -17,7 +17,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks';
|
|||
import { getRuleType } from './rule_type';
|
||||
import { EsQueryRuleParams, EsQueryRuleState } from './rule_type_params';
|
||||
import { ActionContext } from './action_context';
|
||||
import { ESSearchResponse, ESSearchRequest } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse, ESSearchRequest } from '@kbn/es-types';
|
||||
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
|
||||
import { coreMock } from '@kbn/core/server/mocks';
|
||||
import { ActionGroupId, ConditionMetAlertInstanceId } from './constants';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { ElasticsearchClient, SavedObjectsClientContract, KibanaRequest } from '@kbn/core/server';
|
||||
import chalk from 'chalk';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { RequestStatus } from '@kbn/inspector-plugin/common';
|
||||
import { getInspectResponse } from '@kbn/observability-plugin/server';
|
||||
import { InspectResponse } from '@kbn/observability-plugin/typings/common';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { UMElasticsearchQueryFn } from '../adapters';
|
||||
import { CONTEXT_DEFAULTS } from '../../../../common/constants';
|
||||
import { Snapshot } from '../../../../common/runtime_types';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import moment from 'moment';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { CursorPagination } from './types';
|
||||
import { CursorDirection, SortOrder } from '../../../../../common/runtime_types';
|
||||
import { UptimeESClient } from '../../lib';
|
||||
|
|
|
@ -11,7 +11,7 @@ import { Logger } from '@kbn/core/server';
|
|||
import { JsonObject } from '@kbn/utility-types';
|
||||
import { keyBy, mapValues } from 'lodash';
|
||||
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { AggregationResultOf } from '@kbn/core/types/elasticsearch';
|
||||
import type { AggregationResultOf } from '@kbn/es-types';
|
||||
import { AggregatedStatProvider } from './runtime_statistics_aggregator';
|
||||
import { parseIntervalAsSecond, asInterval, parseIntervalAsMillisecond } from '../lib/intervals';
|
||||
import { HealthStatus } from './monitoring_stats_stream';
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
EuiFlexItem,
|
||||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { FieldValueSuggestions } from '@kbn/observability-plugin/public';
|
||||
import { useLocalUIFilters } from '../hooks/use_local_uifilters';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
|
||||
import { SERVICE_ENVIRONMENT } from '../../../../../common/elasticsearch_fieldnames';
|
||||
import {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import {
|
||||
DataPublicPluginStart,
|
||||
isCompleteResponse,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { UXMetrics } from '@kbn/observability-plugin/public';
|
||||
import {
|
||||
TBT_FIELD,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import { TRANSACTION_PAGE_LOAD } from '../../../common/transaction_types';
|
||||
import {
|
||||
SERVICE_ENVIRONMENT,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESFilter } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESFilter } from '@kbn/es-types';
|
||||
import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values';
|
||||
import {
|
||||
uxLocalUIFilterNames,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ESSearchResponse } from '@kbn/core/types/elasticsearch';
|
||||
import type { ESSearchResponse } from '@kbn/es-types';
|
||||
import moment from 'moment';
|
||||
import {
|
||||
SERVICE_NAME,
|
||||
|
|
|
@ -3344,6 +3344,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/es-types@link:bazel-bin/packages/kbn-es-types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/es@link:bazel-bin/packages/kbn-es":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
@ -7385,6 +7389,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__es-types@link:bazel-bin/packages/kbn-es-types/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__eslint-plugin-disable@link:bazel-bin/packages/kbn-eslint-plugin-disable/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue