Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Sep 3, 2020
1 parent c3d82a8 commit a055a5b
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';

import { HostItem, HostsFields } from '../common';
import { CursorType, Inspect, Maybe, PageInfoPaginated, RequestOptionsPaginated } from '../..';
import { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common';
import { RequestOptionsPaginated } from '../..';

export interface HostsEdges {
node: HostItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import {
Inspect,
Maybe,
PageInfoPaginated,
RequestOptionsPaginated,
StringOrNumber,
Hit,
TotalHit,
} from '../../';
} from '../../../common';
import { RequestOptionsPaginated } from '../../';

export interface AuthenticationsStrategyResponse extends IEsSearchResponse {
edges: AuthenticationsEdges[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { CloudEcs } from '../../../../ecs/cloud';
import { HostEcs, OsEcs } from '../../../../ecs/host';
import { Maybe, SearchHit, TotalValue } from '../..';
import { Maybe, SearchHit, TotalValue } from '../../../common';

export enum HostPolicyResponseActionStatus {
success = 'success',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*/

import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';
import { Inspect, Maybe, RequestOptionsPaginated } from '../..';
import { Inspect, Maybe } from '../../../common';
import { RequestOptionsPaginated } from '../..';
import { HostsFields } from '../common';

export interface HostFirstLastSeenRequestOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

export * from './authentications';
export * from './all';
export * from './common';
export * from './overview';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';

import { Inspect, Maybe, TimerangeInput } from '../../../common';
import { HostItem, HostsFields } from '../common';
import { Inspect, Maybe, RequestOptionsPaginated, TimerangeInput } from '../..';
import { RequestOptionsPaginated } from '../..';

export interface HostOverviewStrategyResponse extends IEsSearchResponse {
hostOverview: HostItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
*/

import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';
import {
Maybe,
CursorType,
Inspect,
RequestOptionsPaginated,
PageInfoPaginated,
GenericBuckets,
} from '../..';
import { Maybe, CursorType, Inspect, PageInfoPaginated, GenericBuckets } from '../../../common';
import { RequestOptionsPaginated } from '../..';

export interface NetworkHttpRequestOptions extends RequestOptionsPaginated {
ip?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*/

import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';
import { CursorType, Inspect, Maybe, PageInfoPaginated, RequestOptionsPaginated } from '../..';
import { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common';
import { RequestOptionsPaginated } from '../..';
import { FlowTargetSourceDest } from '../common';

export interface TlsBuckets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

import { IEsSearchResponse } from '../../../../../../../../src/plugins/data/common';
import { GeoEcs } from '../../../../ecs/geo';
import { CursorType, Inspect, Maybe, PageInfoPaginated, RequestOptionsPaginated } from '../..';
import { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common';
import { RequestOptionsPaginated } from '../..';
import { FlowTargetSourceDest } from '../common';

export enum NetworkTopTablesFields {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ import {
HostPolicyResponseActionStatus,
HostsQueries,
PageInfoPaginated,
} from '../../../../common/search_strategy/security_solution';
import {
AuthenticationsRequestOptions,
AuthenticationsStrategyResponse,
AuthenticationsEdges,
} from '../../../../common/search_strategy/security_solution/hosts/authentications';
} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';

import { inputsModel, State } from '../../../common/store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
HostsQueries,
HostsRequestOptions,
HostsStrategyResponse,
} from '../../../../common/search_strategy/security_solution';
} from '../../../../common/search_strategy';
import { ESTermQuery } from '../../../../common/typed_json';

import * as i18n from './translations';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
NetworkTopCountriesEdges,
NetworkTopTablesFields,
SortField,
} from '../../../../common/search_strategy/security_solution';
} from '../../../../common/search_strategy';
import { State } from '../../../common/store';

import { Criteria, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
NetworkHttpRequestOptions,
NetworkHttpStrategyResponse,
SortField,
} from '../../../../common/search_strategy/security_solution';
} from '../../../../common/search_strategy';
import { AbortError } from '../../../../../../../src/plugins/data/common';
import * as i18n from './translations';
import { InspectResponse } from '../../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { DEFAULT_INDEX_KEY } from '../../../../common/constants';
import { inputsModel, State } from '../../../common/store';
import { useKibana } from '../../../common/lib/kibana';
import { createFilter } from '../../../common/containers/helpers';
import { PageInfoPaginated } from '../../../../common/search_strategy/security_solution';
import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers';
import { networkModel, networkSelectors } from '../../store';
import {
Expand All @@ -23,7 +22,8 @@ import {
NetworkTopCountriesEdges,
NetworkTopCountriesRequestOptions,
NetworkTopCountriesStrategyResponse,
} from '../../../../common/search_strategy/security_solution/network';
PageInfoPaginated,
} from '../../../../common/search_strategy';
import { AbortError } from '../../../../../../../src/plugins/data/common';
import { getInspectResponse } from '../../../helpers';
import { InspectResponse } from '../../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const useTimelineDetails = ({
const searchSubscription$ = data.search
.search<TimelineDetailsRequestOptions, TimelineDetailsStrategyResponse>(request, {
strategy: 'securitySolutionTimelineSearchStrategy',
signal: abortCtrl.current.signal,
abortSignal: abortCtrl.current.signal,
})
.subscribe({
next: (response) => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { SecurityPluginSetup } from '../../security/public';
import { AppFrontendLibs } from './common/lib/lib';
import { ResolverPluginSetup } from './resolver/types';
import { Inspect } from '../common/search_strategy/security_solution';
import { Inspect } from '../common/search_strategy';

export interface SetupPlugins {
home?: HomePublicPluginSetup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
HostsRequestOptions,
SortField,
HostsFields,
} from '../../../../../../common/search_strategy/security_solution';
} from '../../../../../../common/search_strategy';
import { createQueryFilterClauses } from '../../../../../utils/build_query';
import { assertUnreachable } from '../../../../../../common/utility_types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import { get, getOr } from 'lodash/fp';
import { set } from '@elastic/safer-lodash-set/fp';
import { mergeFieldsWithHit } from '../../../../../utils/build_query';
import { toArray } from '../../../../helpers/to_array';
import {
AuthenticationsEdges,
AuthenticationHit,
AuthenticationBucket,
} from '../../../../../../common/search_strategy/security_solution/hosts/authentications';
import { toArray } from '../../../../helpers/to_array';
import {
FactoryQueryTypes,
StrategyResponseType,
} from '../../../../../../common/search_strategy/security_solution';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { getOr } from 'lodash/fp';
import { IEsSearchResponse } from '../../../../../../../../../src/plugins/data/common';

import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants';
import { HostsQueries } from '../../../../../../common/search_strategy/security_solution';
import {
HostsQueries,
AuthenticationsEdges,
AuthenticationsRequestOptions,
AuthenticationsStrategyResponse,
AuthenticationHit,
} from '../../../../../../common/search_strategy/security_solution/hosts/authentications';
} from '../../../../../../common/search_strategy/security_solution/hosts';

import { inspectStringifyObject } from '../../../../../utils/build_query';
import { SecuritySolutionFactory } from '../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution';
import { HostsQueries } from '../../../../../common/search_strategy/security_solution/hosts';
import {
FactoryQueryTypes,
HostsQueries,
} from '../../../../../common/search_strategy/security_solution';

import { SecuritySolutionFactory } from '../types';
import { allHosts } from './all';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

import { createQueryFilterClauses } from '../../../../../utils/build_query';

import {
NetworkHttpRequestOptions,
SortField,
} from '../../../../../../common/search_strategy/security_solution';
import { NetworkHttpRequestOptions, SortField } from '../../../../../../common/search_strategy';

const getCountAgg = () => ({
http_count: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution';
import { NetworkQueries } from '../../../../../common/search_strategy/security_solution/network';
import {
FactoryQueryTypes,
NetworkQueries,
} from '../../../../../common/search_strategy/security_solution';

import { SecuritySolutionFactory } from '../types';
import { networkHttp } from './http';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
SortField,
Direction,
TlsFields,
} from '../../../../../../common/search_strategy/security_solution';
} from '../../../../../../common/search_strategy';

const getAggs = (querySize: number, sort: SortField<TlsFields>) => ({
count: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
NetworkTopTablesFields,
NetworkTopCountriesRequestOptions,
SortField,
} from '../../../../../../common/search_strategy/security_solution';
} from '../../../../../../common/search_strategy';

const getCountAgg = (flowTarget: FlowTargetSourceDest) => ({
top_countries_count: {
Expand Down

0 comments on commit a055a5b

Please sign in to comment.