Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { kea, MakeLogicType } from 'kea';

import { HttpLogic } from '../../../shared/http';

import { IndexingStatus } from '../schema/types';
import { IIndexingStatus } from '../../../shared/types';
import { EngineDetails } from './types';

interface EngineValues {
Expand All @@ -25,7 +25,7 @@ interface EngineValues {
interface EngineActions {
setEngineData(engine: EngineDetails): { engine: EngineDetails };
setEngineName(engineName: string): { engineName: string };
setIndexingStatus(activeReindexJob: IndexingStatus): { activeReindexJob: IndexingStatus };
setIndexingStatus(activeReindexJob: IIndexingStatus): { activeReindexJob: IIndexingStatus };
setEngineNotFound(notFound: boolean): { notFound: boolean };
clearEngine(): void;
initializeEngine(): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { ApiToken } from '../credentials/types';
import { Schema, SchemaConflicts, IndexingStatus } from '../schema/types';
import { Schema, SchemaConflicts, IIndexingStatus } from '../../../shared/types';

export interface Engine {
name: string;
Expand All @@ -26,7 +26,7 @@ export interface EngineDetails extends Engine {
schema: Schema;
schemaConflicts?: SchemaConflicts;
unconfirmedFields?: string[];
activeReindexJob?: IndexingStatus;
activeReindexJob?: IIndexingStatus;
invalidBoosts: boolean;
sample?: boolean;
isMeta: boolean;
Expand Down

This file was deleted.

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

export type SchemaTypes = 'text' | 'number' | 'geolocation' | 'date';

export interface Schema {
[key: string]: SchemaTypes;
}

// this is a mapping of schema field types ("string", "number", "geolocation", "date") to the names
// of source engines which utilize that type
export type SchemaConflictFieldTypes = {
[key in SchemaTypes]: string[];
};

export interface SchemaConflict {
fieldTypes: SchemaConflictFieldTypes;
resolution?: string;
}

// For now these values are ISchemaConflictFieldTypes, but in the near future will be ISchemaConflict
// once we implement schema conflict resolution
export interface SchemaConflicts {
[key: string]: SchemaConflictFieldTypes;
}

export interface IIndexingStatus {
percentageComplete: number;
numDocumentsWithErrors: number;
Expand Down