File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { DynamoDBStreamEvent } from 'aws-lambda' ;
22import bodyBuilder , { AggregationBuilder , FilterBuilder , QueryBuilder } from 'bodybuilder' ;
33import { AttributeValue as attr } from 'dynamodb-data-types' ;
4- import { Client , IndicesCreateParams , SearchResponse } from 'elasticsearch' ;
4+ import { Client , ConfigOptions , IndicesCreateParams , SearchResponse } from 'elasticsearch' ;
55import httpAwsEs from 'http-aws-es' ;
66import { excludeKeys , validateConfig } from './utils' ;
77
@@ -59,6 +59,7 @@ export interface IElasticModelConfig {
5959 idField ?: string ;
6060 apiVersion ?: string ;
6161 excludedFields ?: string [ ] ;
62+ clientConfig : ConfigOptions ;
6263}
6364
6465export class ElasticModel < T extends Item > {
@@ -91,7 +92,8 @@ export class ElasticModel<T extends Item> {
9192 this . client = new Client ( {
9293 hosts : config . host ,
9394 apiVersion : config . apiVersion || '7.1' ,
94- connectionClass : httpAwsEs
95+ connectionClass : httpAwsEs ,
96+ ...config . clientConfig
9597 } ) ;
9698 }
9799
You can’t perform that action at this time.
0 commit comments