Skip to content

Commit

Permalink
Fix types after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Feb 1, 2021
1 parent 290371d commit 05669db
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
*/

import * as rt from 'io-ts';
import { DslQuery } from '../../../../../../src/plugins/data/common';
import { logSourceColumnConfigurationRT } from '../../http_api/log_sources';
import {
logEntryAfterCursorRT,
logEntryBeforeCursorRT,
logEntryCursorRT,
logEntryRT,
} from '../../log_entry';
import { jsonObjectRT } from '../../typed_json';
import { JsonObject, jsonObjectRT } from '../../typed_json';
import { searchStrategyErrorRT } from '../common/errors';

export const LOG_ENTRIES_SEARCH_STRATEGY = 'infra-log-entries';
Expand Down Expand Up @@ -49,6 +50,8 @@ export const logEntriesSearchRequestParamsRT = rt.union([

export type LogEntriesSearchRequestParams = rt.TypeOf<typeof logEntriesSearchRequestParamsRT>;

export type LogEntriesSearchRequestQuery = JsonObject | DslQuery;

export const logEntriesSearchResponsePayloadRT = rt.intersection([
rt.type({
data: rt.intersection([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { LogEntryAfterCursor } from '../../../../common/log_entry';
import { decodeOrThrow } from '../../../../common/runtime_types';
import {
logEntriesSearchRequestParamsRT,
LogEntriesSearchRequestQuery,
LogEntriesSearchResponsePayload,
logEntriesSearchResponsePayloadRT,
LOG_ENTRIES_SEARCH_STRATEGY,
} from '../../../../common/search_strategies/log_entries/log_entries';
import { JsonObject } from '../../../../common/typed_json';
import {
flattenDataSearchResponseDescriptor,
normalizeDataSearchResponses,
Expand All @@ -38,7 +38,7 @@ export const useLogEntriesAfterRequest = ({
columnOverrides?: LogSourceColumnConfiguration[];
endTimestamp: number;
highlightPhrase?: string;
query?: JsonObject;
query?: LogEntriesSearchRequestQuery;
sourceId: string;
startTimestamp: number;
}) => {
Expand Down Expand Up @@ -116,7 +116,7 @@ export const useFetchLogEntriesAfter = ({
columnOverrides?: LogSourceColumnConfiguration[];
endTimestamp: number;
highlightPhrase?: string;
query?: JsonObject;
query?: LogEntriesSearchRequestQuery;
sourceId: string;
startTimestamp: number;
}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { combineLatest, Observable, Subject } from 'rxjs';
import { last, map, startWith, switchMap } from 'rxjs/operators';
import { LogSourceColumnConfiguration } from '../../../../common/http_api/log_sources';
import { LogEntryCursor } from '../../../../common/log_entry';
import { JsonObject } from '../../../../common/typed_json';
import { LogEntriesSearchRequestQuery } from '../../../../common/search_strategies/log_entries/log_entries';
import { flattenDataSearchResponseDescriptor } from '../../../utils/data_search';
import { useObservable, useObservableState } from '../../../utils/use_observable';
import { useLogEntriesAfterRequest } from './use_fetch_log_entries_after';
Expand All @@ -26,7 +26,7 @@ export const useFetchLogEntriesAround = ({
columnOverrides?: LogSourceColumnConfiguration[];
endTimestamp: number;
highlightPhrase?: string;
query?: JsonObject;
query?: LogEntriesSearchRequestQuery;
sourceId: string;
startTimestamp: number;
}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { LogEntryBeforeCursor } from '../../../../common/log_entry';
import { decodeOrThrow } from '../../../../common/runtime_types';
import {
logEntriesSearchRequestParamsRT,
LogEntriesSearchRequestQuery,
LogEntriesSearchResponsePayload,
logEntriesSearchResponsePayloadRT,
LOG_ENTRIES_SEARCH_STRATEGY,
} from '../../../../common/search_strategies/log_entries/log_entries';
import { JsonObject } from '../../../../common/typed_json';
import {
flattenDataSearchResponseDescriptor,
normalizeDataSearchResponses,
Expand All @@ -38,7 +38,7 @@ export const useLogEntriesBeforeRequest = ({
columnOverrides?: LogSourceColumnConfiguration[];
endTimestamp: number;
highlightPhrase?: string;
query?: JsonObject;
query?: LogEntriesSearchRequestQuery;
sourceId: string;
startTimestamp: number;
}) => {
Expand Down Expand Up @@ -117,7 +117,7 @@ export const useFetchLogEntriesBefore = ({
columnOverrides?: LogSourceColumnConfiguration[];
endTimestamp: number;
highlightPhrase?: string;
query?: JsonObject;
query?: LogEntriesSearchRequestQuery;
sourceId: string;
startTimestamp: number;
}) => {
Expand Down

0 comments on commit 05669db

Please sign in to comment.