UNPKG

mongo2elastic

Version:
14 lines (13 loc) 676 B
import { estypes } from '@elastic/elasticsearch'; import makeError from 'make-error'; import { type JSONSchema } from 'mongochangestream'; import { ConvertOptions } from './types.js'; export declare const Mongo2ElasticError: makeError.Constructor<makeError.BaseError>; /** * Convert MongoDB JSON schema to Elasticsearch mapping. * * There are options that allow you to preprocess nodes, omit fields, rename * fields, and change the BSON type for fields (e.g. when a more specific * numeric type is needed). @see {@link ConvertOptions} for details. */ export declare const convertSchema: (jsonSchema: JSONSchema, options?: ConvertOptions) => estypes.MappingPropertyBase;