Skip to content

Commit

Permalink
[ES body removal] @elastic/search-kibana (elastic#204876)
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo authored Jan 10, 2025
1 parent 2642aff commit d0abdbd
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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
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
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
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 @@ -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

0 comments on commit d0abdbd

Please sign in to comment.