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 1
1
import { DynamoDBStreamEvent } from 'aws-lambda' ;
2
2
import bodyBuilder , { AggregationBuilder , FilterBuilder , QueryBuilder } from 'bodybuilder' ;
3
3
import { AttributeValue as attr } from 'dynamodb-data-types' ;
4
- import { Client , IndicesCreateParams , SearchResponse } from 'elasticsearch' ;
4
+ import { Client , ConfigOptions , IndicesCreateParams , SearchResponse } from 'elasticsearch' ;
5
5
import httpAwsEs from 'http-aws-es' ;
6
6
import { excludeKeys , validateConfig } from './utils' ;
7
7
@@ -59,6 +59,7 @@ export interface IElasticModelConfig {
59
59
idField ?: string ;
60
60
apiVersion ?: string ;
61
61
excludedFields ?: string [ ] ;
62
+ clientConfig : ConfigOptions ;
62
63
}
63
64
64
65
export class ElasticModel < T extends Item > {
@@ -91,7 +92,8 @@ export class ElasticModel<T extends Item> {
91
92
this . client = new Client ( {
92
93
hosts : config . host ,
93
94
apiVersion : config . apiVersion || '7.1' ,
94
- connectionClass : httpAwsEs
95
+ connectionClass : httpAwsEs ,
96
+ ...config . clientConfig
95
97
} ) ;
96
98
}
97
99
You can’t perform that action at this time.
0 commit comments