Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES body removal] @elastic/search-kibana #204876

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import React from 'react';
import { ApiKeyFlyout, ApiKeyFlyoutProps } from '@kbn/security-api-key-management';
import type { SecurityCreateApiKeyResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { SecurityCreateApiKeyResponse } from '@elastic/elasticsearch/lib/api/types';

const API_KEY_NAME = 'Unrestricted API Key';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/types';

import { createApiLogic } from '../../../shared/api_logic/create_api_logic';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/types';

import type { MlInferencePipeline } from '../../../../../common/types/pipelines';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { kea, MakeLogicType } from 'kea';

import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IngestSimulateResponse } from '@elastic/elasticsearch/lib/api/types';

import { Status, HttpError } from '../../../../../../../common/types/api';
import { MlInferencePipeline } from '../../../../../../../common/types/pipelines';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
IndicesGetResponse,
SecurityHasPrivilegesPrivileges,
IndicesStatsIndicesStats,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
} from '@elastic/elasticsearch/lib/api/types';
import { IScopedClusterClient } from '@kbn/core/server';

import { AlwaysShowPattern, ElasticsearchIndexWithPrivileges } from '../../../common/types/indices';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {
AggregationsMultiBucketAggregateBase,
AggregationsStringRareTermsBucketKeys,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
} from '@elastic/elasticsearch/lib/api/types';

import { ElasticsearchClient } from '@kbn/core/server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { SecurityHasPrivilegesPrivileges } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { SecurityHasPrivilegesPrivileges } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchIndex } from '@kbn/search-connectors';

import { expandAliases, getAlwaysShowAliases } from './extract_always_show_indices';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { SecurityHasPrivilegesPrivileges } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { SecurityHasPrivilegesPrivileges } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchIndex } from '@kbn/search-connectors';

import { AlwaysShowPattern } from '../../../../common/types/indices';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {
MlGetTrainedModelsStatsRequest,
MlGetTrainedModelsRequest,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
} from '@elastic/elasticsearch/lib/api/types';
import { MlTrainedModels } from '@kbn/ml-plugin/server';

import { MlModelDeploymentStatus, MlModelDeploymentState } from '../../../common/types/ml';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { MlStartTrainedModelDeploymentRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { MlStartTrainedModelDeploymentRequest } from '@elastic/elasticsearch/lib/api/types';

import { MlTrainedModels } from '@kbn/ml-plugin/server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { MlPutTrainedModelRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { MlPutTrainedModelRequest } from '@elastic/elasticsearch/lib/api/types';
import { MlTrainedModels } from '@kbn/ml-plugin/server';

import { MlModelDeploymentState, MlModelDeploymentStatus } from '../../../common/types/ml';
Expand Down Expand Up @@ -43,10 +43,8 @@ export const startMlModelDownload = async (

// we're not downloaded yet - let's initiate that...
const putRequest: MlPutTrainedModelRequest = {
body: {
input: {
field_names: ['text_field'],
},
input: {
field_names: ['text_field'],
},
model_id: modelName,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
* 2.0.
*/

import type {
MappingProperty,
MappingPropertyBase,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { MappingProperty, MappingPropertyBase } from '@elastic/elasticsearch/lib/api/types';
import type { Mappings } from '../../types';

interface VectorFieldTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { AcknowledgedResponseBase } from '@elastic/elasticsearch/lib/api/types';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
import { MutationKeys, QueryKeys } from '../../constants';
import { useKibana } from '../use_kibana';
import { INDEX_SEARCH_POLLING, IndexDocuments } from './use_document_search';
Expand Down
5 changes: 1 addition & 4 deletions x-pack/plugins/search_indices/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import type {
UsageCollectionSetup,
UsageCollectionStart,
} from '@kbn/usage-collection-plugin/public';
import type {
MappingProperty,
MappingPropertyBase,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { MappingProperty, MappingPropertyBase } from '@elastic/elasticsearch/lib/api/types';
import type {
IndexManagementPluginSetup,
IndexManagementPluginStart,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/search_indices/server/utils/index_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import type { IndicesIndexState } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { IndicesIndexState } from '@elastic/elasticsearch/lib/api/types';

export function isHidden(index: IndicesIndexState): boolean {
return index.settings?.index?.hidden === true || index.settings?.index?.hidden === 'true';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { useQuery } from '@tanstack/react-query';
import { IndexName } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IndexName } from '@elastic/elasticsearch/lib/api/types';
import { useKibana } from './use_kibana';
import { APIRoutes } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/search_playground/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
IndexName,
IndicesStatsIndexMetadataState,
Uuid,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
} from '@elastic/elasticsearch/lib/api/types';
import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
import React, { ComponentType } from 'react';
import type { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { RetrieverContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { RetrieverContainer } from '@elastic/elasticsearch/lib/api/types';
import { IndicesQuerySourceFields, QuerySourceFields } from '../types';

export type IndexFields = Record<string, string[]>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
import { Document } from '@langchain/core/documents';
import {
ChatPromptTemplate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
AggregationsAggregate,
SearchHit,
SearchResponse,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
} from '@elastic/elasticsearch/lib/api/types';
import { getValueForSelectedField } from '../utils/get_value_for_selected_field';

export interface ElasticsearchRetrieverInput extends BaseRetrieverInput {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import { isNotNullish } from '../../../common/utils/is_not_nullish';
import { isHidden, isClosed } from '../../utils/index_utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IndicesIndexState } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { IndicesIndexState } from '@elastic/elasticsearch/lib/api/types';

export function isHidden(index: IndicesIndexState): boolean {
return index.settings?.index?.hidden === true || index.settings?.index?.hidden === 'true';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type * as estypes from '@elastic/elasticsearch/lib/api/types';

import { testHasEmbeddedConsole } from './embedded_console';

Expand Down