Skip to content

Commit

Permalink
[Discover] Rearrange consts
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Feb 8, 2024
1 parent caf273a commit 4bd7a3d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
3 changes: 0 additions & 3 deletions src/plugins/saved_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ export const SavedSearchType = 'search';

export const LATEST_VERSION = 1;

export const MIN_SAVED_SEARCH_SAMPLE_SIZE = 1;
export const MAX_SAVED_SEARCH_SAMPLE_SIZE = 10000;

export type SavedSearchContentType = typeof SavedSearchType;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import {
updateOptionsSchema,
createResultSchema,
} from '@kbn/content-management-utils';
import { MIN_SAVED_SEARCH_SAMPLE_SIZE, MAX_SAVED_SEARCH_SAMPLE_SIZE } from '../../constants';
import {
MIN_SAVED_SEARCH_SAMPLE_SIZE,
MAX_SAVED_SEARCH_SAMPLE_SIZE,
} from '@kbn/saved-search-so-plugin/common';

const sortSchema = schema.arrayOf(schema.string(), { maxSize: 2 });

Expand Down
17 changes: 6 additions & 11 deletions src/plugins/saved_search/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
* Side Public License, v 1.
*/

export {
VIEW_MODE,
MIN_SAVED_SEARCH_SAMPLE_SIZE,
MAX_SAVED_SEARCH_SAMPLE_SIZE,
} from '@kbn/saved-search-so-plugin/common';
export { getSavedSearchUrl, getSavedSearchFullPathUrl } from './saved_searches_url';
export { fromSavedSearchAttributes } from './saved_searches_utils';

Expand All @@ -16,15 +21,5 @@ export type {
SavedSearchAttributes,
} from './types';

export enum VIEW_MODE {
DOCUMENT_LEVEL = 'documents',
AGGREGATED_LEVEL = 'aggregated',
}

export {
SavedSearchType,
LATEST_VERSION,
MIN_SAVED_SEARCH_SAMPLE_SIZE,
MAX_SAVED_SEARCH_SAMPLE_SIZE,
} from './constants';
export { SavedSearchType, LATEST_VERSION } from './constants';
export { getKibanaContextFn } from './expressions/kibana_context';
2 changes: 0 additions & 2 deletions src/plugins/saved_search_so/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Side Public License, v 1.
*/

// TODO: extract into a package?

export const MIN_SAVED_SEARCH_SAMPLE_SIZE = 1;
export const MAX_SAVED_SEARCH_SAMPLE_SIZE = 10000;

Expand Down

0 comments on commit 4bd7a3d

Please sign in to comment.