Skip to content

Commit

Permalink
ES client : use the new type definitions (elastic#83808)
Browse files Browse the repository at this point in the history
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <[email protected]>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <[email protected]>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <[email protected]>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <[email protected]>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <[email protected]>
Co-authored-by: Josh Dover <[email protected]>
Co-authored-by: Gidi Meir Morris <[email protected]>
Co-authored-by: Nathan Reese <[email protected]>
Co-authored-by: Wylie Conlon <[email protected]>
Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Aleh Zasypkin <[email protected]>
Co-authored-by: Dario Gieselaar <[email protected]>
Co-authored-by: restrry <[email protected]>
Co-authored-by: James Gowdy <[email protected]>
Co-authored-by: John Schulz <[email protected]>
Co-authored-by: Alison Goryachev <[email protected]>
  • Loading branch information
13 people committed Mar 25, 2021
1 parent 9724051 commit 238791b
Show file tree
Hide file tree
Showing 541 changed files with 3,666 additions and 3,051 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export interface SavedObjectsFindOptions
| [preference](./kibana-plugin-core-public.savedobjectsfindoptions.preference.md) | <code>string</code> | An optional ES preference value to be used for the query \* |
| [rootSearchFields](./kibana-plugin-core-public.savedobjectsfindoptions.rootsearchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. Unlike the <code>searchFields</code> argument, these are expected to be root fields and will not be modified. If used in conjunction with <code>searchFields</code>, both are concatenated together. |
| [search](./kibana-plugin-core-public.savedobjectsfindoptions.search.md) | <code>string</code> | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String <code>query</code> argument for more information |
| [searchAfter](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | <code>unknown[]</code> | Use the sort values from the previous page to retrieve the next page of results. |
| [searchAfter](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | <code>estypes.Id[]</code> | Use the sort values from the previous page to retrieve the next page of results. |
| [searchFields](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
| [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | <code>string</code> | |
| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | <code>estypes.SortOrder</code> | |
| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | <code>string &#124; string[]</code> | |
| [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | <code>Map&lt;string, string[] &#124; undefined&gt;</code> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Use the sort values from the previous page to retrieve the next page of results.
<b>Signature:</b>

```typescript
searchAfter?: unknown[];
searchAfter?: estypes.Id[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
sortOrder?: string;
sortOrder?: estypes.SortOrder;
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export interface SavedObjectsFindOptions
| [preference](./kibana-plugin-core-server.savedobjectsfindoptions.preference.md) | <code>string</code> | An optional ES preference value to be used for the query \* |
| [rootSearchFields](./kibana-plugin-core-server.savedobjectsfindoptions.rootsearchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. Unlike the <code>searchFields</code> argument, these are expected to be root fields and will not be modified. If used in conjunction with <code>searchFields</code>, both are concatenated together. |
| [search](./kibana-plugin-core-server.savedobjectsfindoptions.search.md) | <code>string</code> | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String <code>query</code> argument for more information |
| [searchAfter](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | <code>unknown[]</code> | Use the sort values from the previous page to retrieve the next page of results. |
| [searchAfter](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | <code>estypes.Id[]</code> | Use the sort values from the previous page to retrieve the next page of results. |
| [searchFields](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
| [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | <code>string</code> | |
| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | <code>estypes.SortOrder</code> | |
| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | <code>string &#124; string[]</code> | |
| [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | <code>Map&lt;string, string[] &#124; undefined&gt;</code> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the <code>type</code> and <code>namespaces</code> fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Use the sort values from the previous page to retrieve the next page of results.
<b>Signature:</b>

```typescript
searchAfter?: unknown[];
searchAfter?: estypes.Id[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
sortOrder?: string;
sortOrder?: estypes.SortOrder;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface SavedObjectsFindResult<T = unknown> extends SavedObject<T>
| Property | Type | Description |
| --- | --- | --- |
| [score](./kibana-plugin-core-server.savedobjectsfindresult.score.md) | <code>number</code> | The Elasticsearch <code>_score</code> of this result. |
| [sort](./kibana-plugin-core-server.savedobjectsfindresult.sort.md) | <code>unknown[]</code> | The Elasticsearch <code>sort</code> value of this result. |
| [sort](./kibana-plugin-core-server.savedobjectsfindresult.sort.md) | <code>string[]</code> | The Elasticsearch <code>sort</code> value of this result. |
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Elasticsearch `sort` value of this result.
<b>Signature:</b>

```typescript
sort?: unknown[];
sort?: string[];
```

## Remarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
export declare type IEsSearchResponse<Source = any> = IKibanaSearchResponse<SearchResponse<Source>>;
export declare type IEsSearchResponse<Source = any> = IKibanaSearchResponse<estypes.SearchResponse<Source>>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Fetch this source and reject the returned Promise on error
<b>Signature:</b>

```typescript
fetch(options?: ISearchOptions): Promise<import("elasticsearch").SearchResponse<any>>;
fetch(options?: ISearchOptions): Promise<import("@elastic/elasticsearch/api/types").SearchResponse<any>>;
```

## Parameters
Expand All @@ -25,5 +25,5 @@ fetch(options?: ISearchOptions): Promise<import("elasticsearch").SearchResponse<

<b>Returns:</b>

`Promise<import("elasticsearch").SearchResponse<any>>`
`Promise<import("@elastic/elasticsearch/api/types").SearchResponse<any>>`

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
export declare type IEsSearchResponse<Source = any> = IKibanaSearchResponse<SearchResponse<Source>>;
export declare type IEsSearchResponse<Source = any> = IKibanaSearchResponse<estypes.SearchResponse<Source>>;
```
3 changes: 2 additions & 1 deletion examples/search_examples/public/search/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export const SearchExamplesApp = ({
setResponse(res.rawResponse);
setTimeTook(res.rawResponse.took);
const avgResult: number | undefined = res.rawResponse.aggregations
? res.rawResponse.aggregations[1].value
? // @ts-expect-error @elastic/elasticsearch no way to declare a type for aggregation in the search response
res.rawResponse.aggregations[1].value
: undefined;
const message = (
<EuiText>
Expand Down
4 changes: 3 additions & 1 deletion examples/search_examples/public/search_sessions/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,15 @@ function doSearch(
const startTs = performance.now();

// Submit the search request using the `data.search` service.
// @ts-expect-error request.params is incompatible. Filter is not assignable to QueryContainer
return data.search
.search(req, { sessionId })
.pipe(
tap((res) => {
if (isCompleteResponse(res)) {
const avgResult: number | undefined = res.rawResponse.aggregations
? res.rawResponse.aggregations[1]?.value ?? res.rawResponse.aggregations[2]?.value
? // @ts-expect-error @elastic/elasticsearch no way to declare a type for aggregation in the search response
res.rawResponse.aggregations[1]?.value ?? res.rawResponse.aggregations[2]?.value
: undefined;
const message = (
<EuiText>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
},
"dependencies": {
"@elastic/datemath": "link:packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.4",
"@elastic/ems-client": "7.12.0",
"@elastic/eui": "31.7.0",
"@elastic/filesaver": "1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es-archiver/src/actions/empty_kibana_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';
import { KbnClient } from '@kbn/test';

Expand All @@ -17,7 +17,7 @@ export async function emptyKibanaIndexAction({
log,
kbnClient,
}: {
client: Client;
client: KibanaClient;
log: ToolingLog;
kbnClient: KbnClient;
}) {
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es-archiver/src/actions/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createReadStream } from 'fs';
import { Readable } from 'stream';
import { ToolingLog } from '@kbn/dev-utils';
import { KbnClient } from '@kbn/test';
import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { createPromiseFromStreams, concatStreamProviders } from '@kbn/utils';
import { ES_CLIENT_HEADERS } from '../client_headers';

Expand Down Expand Up @@ -48,7 +48,7 @@ export async function loadAction({
name: string;
skipExisting: boolean;
useCreate: boolean;
client: Client;
client: KibanaClient;
dataDir: string;
log: ToolingLog;
kbnClient: KbnClient;
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es-archiver/src/actions/save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { resolve } from 'path';
import { createWriteStream, mkdirSync } from 'fs';
import { Readable, Writable } from 'stream';
import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';
import { createListStream, createPromiseFromStreams } from '@kbn/utils';

Expand All @@ -32,7 +32,7 @@ export async function saveAction({
}: {
name: string;
indices: string | string[];
client: Client;
client: KibanaClient;
dataDir: string;
log: ToolingLog;
raw: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es-archiver/src/actions/unload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { resolve } from 'path';
import { createReadStream } from 'fs';
import { Readable, Writable } from 'stream';
import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';
import { KbnClient } from '@kbn/test';
import { createPromiseFromStreams } from '@kbn/utils';
Expand All @@ -32,7 +32,7 @@ export async function unloadAction({
kbnClient,
}: {
name: string;
client: Client;
client: KibanaClient;
dataDir: string;
log: ToolingLog;
kbnClient: KbnClient;
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/src/client_headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

export const ES_CLIENT_HEADERS = {
'x-elastic-product-origin': 'kibana',
};
} as const;
6 changes: 3 additions & 3 deletions packages/kbn-es-archiver/src/es_archiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';
import { KbnClient } from '@kbn/test';

Expand All @@ -20,14 +20,14 @@ import {
} from './actions';

interface Options {
client: Client;
client: KibanaClient;
dataDir: string;
log: ToolingLog;
kbnClient: KbnClient;
}

export class EsArchiver {
private readonly client: Client;
private readonly client: KibanaClient;
private readonly dataDir: string;
private readonly log: ToolingLog;
private readonly kbnClient: KbnClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Transform } from 'stream';
import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { Stats } from '../stats';
import { Progress } from '../progress';
import { ES_CLIENT_HEADERS } from '../../client_headers';
Expand All @@ -21,7 +21,7 @@ export function createGenerateDocRecordsStream({
progress,
query,
}: {
client: Client;
client: KibanaClient;
stats: Stats;
progress: Progress;
query?: Record<string, any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* Side Public License, v 1.
*/

import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import AggregateError from 'aggregate-error';
import { Writable } from 'stream';
import { Stats } from '../stats';
import { Progress } from '../progress';
import { ES_CLIENT_HEADERS } from '../../client_headers';

export function createIndexDocRecordsStream(
client: Client,
client: KibanaClient,
stats: Stats,
progress: Progress,
useCreate: boolean = false
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import sinon from 'sinon';
import { ToolingLog } from '@kbn/dev-utils';
import { Stats } from '../../stats';
Expand Down Expand Up @@ -67,7 +67,7 @@ const createEsClientError = (errorType: string) => {
const indexAlias = (aliases: Record<string, any>, index: string) =>
Object.keys(aliases).find((k) => aliases[k] === index);

type StubClient = Client;
type StubClient = KibanaClient;

export const createStubClient = (
existingIndices: string[] = [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ describe('esArchiver: createCreateIndexStream()', () => {
]);

sinon.assert.calledWith(client.indices.create as sinon.SinonSpy, {
method: 'PUT',
index: 'index',
body: {
settings: undefined,
Expand Down
11 changes: 4 additions & 7 deletions packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import { Transform, Readable } from 'stream';
import { inspect } from 'util';

import { Client } from '@elastic/elasticsearch';
import { estypes } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';

import { Stats } from '../stats';
Expand All @@ -18,12 +19,9 @@ import { deleteIndex } from './delete_index';
import { ES_CLIENT_HEADERS } from '../../client_headers';

interface DocRecord {
value: {
value: estypes.IndexState & {
index: string;
type: string;
settings: Record<string, any>;
mappings: Record<string, any>;
aliases: Record<string, any>;
};
}

Expand All @@ -33,7 +31,7 @@ export function createCreateIndexStream({
skipExisting = false,
log,
}: {
client: Client;
client: KibanaClient;
stats: Stats;
skipExisting?: boolean;
log: ToolingLog;
Expand Down Expand Up @@ -66,7 +64,6 @@ export function createCreateIndexStream({

await client.indices.create(
{
method: 'PUT',
index,
body: {
settings,
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-es-archiver/src/lib/indices/delete_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';
import { Stats } from '../stats';
import { ES_CLIENT_HEADERS } from '../../client_headers';
Expand All @@ -15,7 +15,7 @@ import { ES_CLIENT_HEADERS } from '../../client_headers';
const PENDING_SNAPSHOT_STATUSES = ['INIT', 'STARTED', 'WAITING'];

export async function deleteIndex(options: {
client: Client;
client: KibanaClient;
stats: Stats;
index: string | string[];
log: ToolingLog;
Expand Down Expand Up @@ -84,7 +84,7 @@ export function isDeleteWhileSnapshotInProgressError(error: any) {
* snapshotting this index to complete.
*/
export async function waitForSnapshotCompletion(
client: Client,
client: KibanaClient,
index: string | string[],
log: ToolingLog
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
*/

import { Transform } from 'stream';
import { Client } from '@elastic/elasticsearch';
import type { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { ToolingLog } from '@kbn/dev-utils';

import { Stats } from '../stats';
import { deleteIndex } from './delete_index';
import { cleanKibanaIndices } from './kibana_index';

export function createDeleteIndexStream(
client: Client,
client: KibanaClient,
stats: Stats,
log: ToolingLog,
kibanaPluginIds: string[]
Expand Down
Loading

0 comments on commit 238791b

Please sign in to comment.