import { ESTypeMapping , ESMapping , availableFieldTypes , DataTypeFieldConfig , DataTypeVersion , dataTypeVersions , DataTypeFields , DataTypeConfig , DeprecatedFieldType , FieldType , } from '@terascope/types' ; import BaseType from './types/base-type' ; /** An object of base fields with their child fields */ export type GroupedFields = Record < string , string [ ] > ; export type GraphQLTypesResult = { baseType : string ; inputType ? : string ; customTypes : string [ ] ; } ; export type GraphQLOptions = { typeName ? : string ; description ? : string ; customTypes ? : string [ ] ; references ? : string [ ] ; useSnakeCase ? : boolean ; createInputType ? : boolean ; includeAllInputFields ? : boolean ; } ; export type MergeGraphQLOptions = { removeScalars ? : boolean ; references ? : GraphQLTypeReferences ; customTypes ? : string [ ] ; createInputTypes ? : boolean ; useSnakeCase ? : boolean ; includeAllInputFields ? : boolean ; } ; export type GraphQLTypeReferences = { __all ? : string [ ] ; } & { [ typeName ] : string [ ] ; } ; deprecated export type AvailableType = DeprecatedFieldType ; deprecated export const AvailableTypes = availableFieldTypes as ReadonlyArray < DeprecatedFieldType > ; deprecated export type AvailableVersion = DataTypeVersion ; deprecated export const AvailableVersions = dataTypeVersions ; deprecated export type FieldTypeConfig = DataTypeFieldConfig ; type ActualType = Record < FieldType , { new ( field , config ) : BaseType ; } > ; export type DataTypeMapping = { [ key in DataTypeVersion ] : ActualType ; } ; deprecated export type TypeConfigFields = DataTypeFields ; export type { DataTypeConfig } ; export interface GraphQLType { type : string ; customTypes : string [ ] ; } export interface TypeESMapping { mapping : { [ key ] : ESTypeMapping ; } ; analyzer ? : { [ key ] : any ; } ; tokenizer ? : { [ key ] : any ; } ; } export interface ESMappingOptions { /**
     * The elasticsearch index type
     */ typeName ? : string ; /**
     * Any elasticsearch mapping overrides,
     * uses a deep assignment so nested fields can be overwritten.
     */ overrides ? : Partial < ESMapping > ; default version ? : number ; }