Ignore most likely irrelevant typescript issues.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { ApiResponse } from '@opensearch-project/opensearch';
|
||||
import { ApiResponse as ApiResponse_2 } from '@elastic/elasticsearch';
|
||||
import { BatchSearchEngineIndexer } from '@backstage/plugin-search-backend-node';
|
||||
import { BulkHelper } from '@opensearch-project/opensearch/lib/Helpers';
|
||||
import { BulkStats } from '@opensearch-project/opensearch/lib/Helpers';
|
||||
@@ -18,6 +19,7 @@ import { Readable } from 'stream';
|
||||
import { SearchEngine } from '@backstage/plugin-search-common';
|
||||
import { SearchQuery } from '@backstage/plugin-search-common';
|
||||
import { TransportRequestPromise } from '@opensearch-project/opensearch/lib/Transport';
|
||||
import { TransportRequestPromise as TransportRequestPromise_2 } from '@elastic/elasticsearch/lib/Transport';
|
||||
|
||||
// @public
|
||||
export interface BaseElasticSearchClientOptions {
|
||||
@@ -134,13 +136,17 @@ export class ElasticSearchClientWrapper {
|
||||
index,
|
||||
}: {
|
||||
index: string;
|
||||
}): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
// (undocumented)
|
||||
deleteIndex({
|
||||
index,
|
||||
}: {
|
||||
index: string | string[];
|
||||
}): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
// (undocumented)
|
||||
static fromClientOptions(
|
||||
options: ElasticSearchClientOptions,
|
||||
@@ -150,17 +156,23 @@ export class ElasticSearchClientWrapper {
|
||||
aliases,
|
||||
}: {
|
||||
aliases: string[];
|
||||
}): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
// (undocumented)
|
||||
indexExists({
|
||||
index,
|
||||
}: {
|
||||
index: string | string[];
|
||||
}): TransportRequestPromise<ApiResponse<boolean, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<boolean, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<boolean, unknown>>;
|
||||
// (undocumented)
|
||||
putIndexTemplate(
|
||||
template: ElasticSearchCustomIndexTemplate,
|
||||
): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
// (undocumented)
|
||||
search({
|
||||
index,
|
||||
@@ -168,13 +180,17 @@ export class ElasticSearchClientWrapper {
|
||||
}: {
|
||||
index: string | string[];
|
||||
body: Object;
|
||||
}): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
// (undocumented)
|
||||
updateAliases({
|
||||
actions,
|
||||
}: {
|
||||
actions: ElasticSearchAliasAction[];
|
||||
}): TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>;
|
||||
}):
|
||||
| TransportRequestPromise<ApiResponse<Record<string, any>, unknown>>
|
||||
| TransportRequestPromise_2<ApiResponse_2<Record<string, any>, unknown>>;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
||||
+3
@@ -224,6 +224,9 @@ describe('ElasticSearchClientWrapper', () => {
|
||||
osOptions = {
|
||||
provider: 'aws',
|
||||
node: 'https://my-es-cluster.eu-west-1.es.amazonaws.com',
|
||||
// todo(backstage/techdocs-core): Remove the following ts-ignore when
|
||||
// @short.io/opensearch-mock is updated to work w/opensearch >= 2.0.0
|
||||
// @ts-ignore
|
||||
connection: mock.getConnection(),
|
||||
};
|
||||
|
||||
|
||||
@@ -408,6 +408,9 @@ export async function createElasticSearchClientOptions(
|
||||
const AWSConnection = createAWSConnection(awsCredentials);
|
||||
return {
|
||||
provider: 'aws',
|
||||
// todo(backstage/techdocs-core): Remove the following ts-ignore when
|
||||
// aws-os-connection is updated to work with opensearch >= 2.0.0
|
||||
// @ts-ignore
|
||||
node: config.getString('node'),
|
||||
...AWSConnection,
|
||||
...(sslConfig
|
||||
|
||||
Reference in New Issue
Block a user