/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { NumericID, UUID } from '../../value-objects/id'; import { Timeframe } from '../timeframe/timeframe'; import { RawDashboardSearch } from './raw-dashboard-search'; export interface BaseDashboardSearch { name: string | null; timeframeOverride: Timeframe | null; cachedSearchID: NumericID | null; variablePreviewValue: string | null; color: string | null; } export declare type QueryDashboardSearch = { type: 'query'; query: string; }; export declare type TemplateDashboardSearch = { type: 'template'; templateID: UUID; }; export declare type SavedQueryDashboardSearch = { type: 'savedQuery'; savedQueryID: UUID; }; export declare type ScheduledQueryDashboardSearch = { type: 'scheduledSearch'; scheduledSearchID: UUID; }; export declare type LegacyDashboardSearch = RawDashboardSearch & { type: 'legacy'; }; export declare type TypedDashboardSearch = LegacyDashboardSearch | QueryDashboardSearch | TemplateDashboardSearch | SavedQueryDashboardSearch | ScheduledQueryDashboardSearch; export declare type DashboardSearch = BaseDashboardSearch & TypedDashboardSearch;