Skip to content

Commit

Permalink
ElasticSearchClient -> ElasticsearchClient
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jul 7, 2020
1 parent 413a97d commit c0d7f3a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/core/server/elasticsearch/client/cluster_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Logger } from '../../logging';
import { GetAuthHeaders, isRealRequest, Headers } from '../../http';
import { ensureRawRequest, filterHeaders } from '../../http/router';
import { ScopeableRequest } from '../types';
import { ElasticSearchClient } from './types';
import { ElasticsearchClient } from './types';
import { configureClient } from './configure_client';
import { ElasticsearchClientConfig } from './client_config';
import { ScopedClusterClient, IScopedClusterClient } from './scoped_cluster_client';
Expand All @@ -38,9 +38,9 @@ const noop = () => undefined;
**/
export interface IClusterClient {
/**
* A {@link ElasticSearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user
* A {@link ElasticsearchClient | client} to be used to query the ES cluster on behalf of the Kibana internal user
*/
readonly asInternalUser: ElasticSearchClient;
readonly asInternalUser: ElasticsearchClient;
/**
* Creates a {@link IScopedClusterClient | scoped cluster client} bound to given {@link ScopeableRequest | request}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/elasticsearch/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

export { ElasticSearchClient } from './types';
export { ElasticsearchClient } from './types';
export { IScopedClusterClient, ScopedClusterClient } from './scoped_cluster_client';
export { ElasticsearchClientConfig } from './client_config';
export { IClusterClient, ICustomClusterClient, ClusterClient } from './cluster_client';
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/elasticsearch/client/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { Client, ApiResponse } from '@elastic/elasticsearch';
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
import { ElasticSearchClient } from './types';
import { ElasticsearchClient } from './types';
import { ICustomClusterClient } from './cluster_client';

const createInternalClientMock = (): DeeplyMockedKeys<Client> => {
Expand Down Expand Up @@ -63,7 +63,7 @@ const createInternalClientMock = (): DeeplyMockedKeys<Client> => {
return (client as unknown) as DeeplyMockedKeys<Client>;
};

export type ElasticSearchClientMock = DeeplyMockedKeys<ElasticSearchClient>;
export type ElasticSearchClientMock = DeeplyMockedKeys<ElasticsearchClient>;

const createClientMock = (): ElasticSearchClientMock =>
(createInternalClientMock() as unknown) as ElasticSearchClientMock;
Expand Down
14 changes: 7 additions & 7 deletions src/core/server/elasticsearch/client/scoped_cluster_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { ElasticSearchClient } from './types';
import { ElasticsearchClient } from './types';

/**
* Serves the same purpose as the normal {@link ClusterClient | cluster client} but exposes
Expand All @@ -29,21 +29,21 @@ import { ElasticSearchClient } from './types';
**/
export interface IScopedClusterClient {
/**
* A {@link ElasticSearchClient | client} to be used to query the elasticsearch cluster
* A {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster
* on behalf of the internal Kibana user.
*/
readonly asInternalUser: ElasticSearchClient;
readonly asInternalUser: ElasticsearchClient;
/**
* A {@link ElasticSearchClient | client} to be used to query the elasticsearch cluster
* A {@link ElasticsearchClient | client} to be used to query the elasticsearch cluster
* on behalf of the user that initiated the request to the Kibana server.
*/
readonly asCurrentUser: ElasticSearchClient;
readonly asCurrentUser: ElasticsearchClient;
}

/** @internal **/
export class ScopedClusterClient implements IScopedClusterClient {
constructor(
public readonly asInternalUser: ElasticSearchClient,
public readonly asCurrentUser: ElasticSearchClient
public readonly asInternalUser: ElasticsearchClient,
public readonly asCurrentUser: ElasticsearchClient
) {}
}
2 changes: 1 addition & 1 deletion src/core/server/elasticsearch/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import type {
*
* @public
*/
export type ElasticSearchClient = Omit<
export type ElasticsearchClient = Omit<
Client,
'connectionPool' | 'transport' | 'serializer' | 'extend' | 'helpers' | 'child' | 'close'
> & {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/elasticsearch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export {
IClusterClient,
ICustomClusterClient,
ElasticsearchClientConfig,
ElasticSearchClient,
ElasticsearchClient,
IScopedClusterClient,
} from './client';

0 comments on commit c0d7f3a

Please sign in to comment.