@@ -154,17 +154,19 @@ class AsyncElasticsearch(object):
154
154
async def create (
155
155
self ,
156
156
* ,
157
- index : Any ,
158
- id : Any ,
159
- body : Mapping [str , Any ],
160
- doc_type : Optional [Any ] = ...,
161
- pipeline : Optional [Any ] = ...,
162
- refresh : Optional [Any ] = ...,
163
- routing : Optional [Any ] = ...,
164
- timeout : Optional [Any ] = ...,
165
- version : Optional [Any ] = ...,
166
- version_type : Optional [Any ] = ...,
167
- wait_for_active_shards : Optional [Any ] = ...,
157
+ index : str ,
158
+ id : str ,
159
+ document : Any ,
160
+ doc_type : Optional [str ] = ...,
161
+ pipeline : Optional [str ] = ...,
162
+ refresh : Optional [Union [Union [Literal ["wait_for" ], str ], bool ]] = ...,
163
+ routing : Optional [str ] = ...,
164
+ timeout : Optional [Union [int , str ]] = ...,
165
+ version : Optional [int ] = ...,
166
+ version_type : Optional [
167
+ Union [Literal ["internal" , "external" , "external_gte" , "force" ], str ]
168
+ ] = ...,
169
+ wait_for_active_shards : Optional [Union [Union [Literal ["all" ], str ], int ]] = ...,
168
170
pretty : Optional [bool ] = ...,
169
171
human : Optional [bool ] = ...,
170
172
error_trace : Optional [bool ] = ...,
@@ -181,21 +183,23 @@ class AsyncElasticsearch(object):
181
183
async def index (
182
184
self ,
183
185
* ,
184
- index : Any ,
185
- body : Mapping [ str , Any ] ,
186
- doc_type : Optional [Any ] = ...,
187
- id : Optional [Any ] = ...,
188
- if_primary_term : Optional [Any ] = ...,
189
- if_seq_no : Optional [Any ] = ...,
190
- op_type : Optional [Any ] = ...,
191
- pipeline : Optional [Any ] = ...,
192
- refresh : Optional [Any ] = ...,
186
+ index : str ,
187
+ document : Any ,
188
+ doc_type : Optional [str ] = ...,
189
+ id : Optional [str ] = ...,
190
+ if_primary_term : Optional [int ] = ...,
191
+ if_seq_no : Optional [int ] = ...,
192
+ op_type : Optional [Union [ Literal [ "index" , "create" ], str ] ] = ...,
193
+ pipeline : Optional [str ] = ...,
194
+ refresh : Optional [Union [ Union [ Literal [ "wait_for" ], str ], bool ] ] = ...,
193
195
require_alias : Optional [bool ] = ...,
194
- routing : Optional [Any ] = ...,
195
- timeout : Optional [Any ] = ...,
196
- version : Optional [Any ] = ...,
197
- version_type : Optional [Any ] = ...,
198
- wait_for_active_shards : Optional [Any ] = ...,
196
+ routing : Optional [str ] = ...,
197
+ timeout : Optional [Union [int , str ]] = ...,
198
+ version : Optional [int ] = ...,
199
+ version_type : Optional [
200
+ Union [Literal ["internal" , "external" , "external_gte" , "force" ], str ]
201
+ ] = ...,
202
+ wait_for_active_shards : Optional [Union [Union [Literal ["all" ], str ], int ]] = ...,
199
203
pretty : Optional [bool ] = ...,
200
204
human : Optional [bool ] = ...,
201
205
error_trace : Optional [bool ] = ...,
@@ -291,17 +295,19 @@ class AsyncElasticsearch(object):
291
295
async def delete (
292
296
self ,
293
297
* ,
294
- index : Any ,
295
- id : Any ,
296
- doc_type : Optional [Any ] = ...,
297
- if_primary_term : Optional [Any ] = ...,
298
- if_seq_no : Optional [Any ] = ...,
299
- refresh : Optional [Any ] = ...,
300
- routing : Optional [Any ] = ...,
301
- timeout : Optional [Any ] = ...,
302
- version : Optional [Any ] = ...,
303
- version_type : Optional [Any ] = ...,
304
- wait_for_active_shards : Optional [Any ] = ...,
298
+ index : str ,
299
+ id : str ,
300
+ doc_type : Optional [str ] = ...,
301
+ if_primary_term : Optional [int ] = ...,
302
+ if_seq_no : Optional [int ] = ...,
303
+ refresh : Optional [Union [Union [Literal ["wait_for" ], str ], bool ]] = ...,
304
+ routing : Optional [str ] = ...,
305
+ timeout : Optional [Union [int , str ]] = ...,
306
+ version : Optional [int ] = ...,
307
+ version_type : Optional [
308
+ Union [Literal ["internal" , "external" , "external_gte" , "force" ], str ]
309
+ ] = ...,
310
+ wait_for_active_shards : Optional [Union [Union [Literal ["all" ], str ], int ]] = ...,
305
311
pretty : Optional [bool ] = ...,
306
312
human : Optional [bool ] = ...,
307
313
error_trace : Optional [bool ] = ...,
@@ -407,19 +413,21 @@ class AsyncElasticsearch(object):
407
413
async def exists (
408
414
self ,
409
415
* ,
410
- index : Any ,
411
- id : Any ,
412
- doc_type : Optional [Any ] = ...,
413
- _source : Optional [Any ] = ...,
414
- _source_excludes : Optional [Any ] = ...,
415
- _source_includes : Optional [Any ] = ...,
416
- preference : Optional [Any ] = ...,
416
+ index : str ,
417
+ id : str ,
418
+ doc_type : Optional [str ] = ...,
419
+ _source : Optional [Union [ Union [ List [ str ], str ], bool ] ] = ...,
420
+ _source_excludes : Optional [Union [ List [ str ], str ] ] = ...,
421
+ _source_includes : Optional [Union [ List [ str ], str ] ] = ...,
422
+ preference : Optional [str ] = ...,
417
423
realtime : Optional [bool ] = ...,
418
424
refresh : Optional [bool ] = ...,
419
- routing : Optional [Any ] = ...,
420
- stored_fields : Optional [Any ] = ...,
421
- version : Optional [Any ] = ...,
422
- version_type : Optional [Any ] = ...,
425
+ routing : Optional [str ] = ...,
426
+ stored_fields : Optional [Union [List [str ], str ]] = ...,
427
+ version : Optional [int ] = ...,
428
+ version_type : Optional [
429
+ Union [Literal ["internal" , "external" , "external_gte" , "force" ], str ]
430
+ ] = ...,
423
431
pretty : Optional [bool ] = ...,
424
432
human : Optional [bool ] = ...,
425
433
error_trace : Optional [bool ] = ...,
@@ -432,7 +440,7 @@ class AsyncElasticsearch(object):
432
440
api_key : Optional [Union [str , Tuple [str , str ]]] = ...,
433
441
params : Optional [MutableMapping [str , Any ]] = ...,
434
442
headers : Optional [MutableMapping [str , str ]] = ...,
435
- ) -> bool : ...
443
+ ) -> Any : ...
436
444
async def exists_source (
437
445
self ,
438
446
* ,
@@ -519,19 +527,21 @@ class AsyncElasticsearch(object):
519
527
async def get (
520
528
self ,
521
529
* ,
522
- index : Any ,
523
- id : Any ,
524
- doc_type : Optional [Any ] = ...,
525
- _source : Optional [Any ] = ...,
526
- _source_excludes : Optional [Any ] = ...,
527
- _source_includes : Optional [Any ] = ...,
528
- preference : Optional [Any ] = ...,
530
+ index : str ,
531
+ id : str ,
532
+ doc_type : Optional [str ] = ...,
533
+ _source : Optional [Union [ Union [ List [ str ], str ], bool ] ] = ...,
534
+ _source_excludes : Optional [Union [ List [ str ], str ] ] = ...,
535
+ _source_includes : Optional [Union [ List [ str ], str ] ] = ...,
536
+ preference : Optional [str ] = ...,
529
537
realtime : Optional [bool ] = ...,
530
538
refresh : Optional [bool ] = ...,
531
- routing : Optional [Any ] = ...,
532
- stored_fields : Optional [Any ] = ...,
533
- version : Optional [Any ] = ...,
534
- version_type : Optional [Any ] = ...,
539
+ routing : Optional [str ] = ...,
540
+ stored_fields : Optional [Union [List [str ], str ]] = ...,
541
+ version : Optional [int ] = ...,
542
+ version_type : Optional [
543
+ Union [Literal ["internal" , "external" , "external_gte" , "force" ], str ]
544
+ ] = ...,
535
545
pretty : Optional [bool ] = ...,
536
546
human : Optional [bool ] = ...,
537
547
error_trace : Optional [bool ] = ...,
@@ -1020,22 +1030,28 @@ class AsyncElasticsearch(object):
1020
1030
async def update (
1021
1031
self ,
1022
1032
* ,
1023
- index : Any ,
1024
- id : Any ,
1033
+ index : str ,
1034
+ id : str ,
1025
1035
body : Mapping [str , Any ],
1026
- doc_type : Optional [Any ] = ...,
1027
- _source : Optional [Any ] = ...,
1028
- _source_excludes : Optional [Any ] = ...,
1029
- _source_includes : Optional [Any ] = ...,
1030
- if_primary_term : Optional [Any ] = ...,
1031
- if_seq_no : Optional [Any ] = ...,
1032
- lang : Optional [Any ] = ...,
1033
- refresh : Optional [Any ] = ...,
1036
+ doc_type : Optional [str ] = ...,
1037
+ _source : Optional [Union [Union [List [str ], str ], bool ]] = ...,
1038
+ _source_excludes : Optional [Union [List [str ], str ]] = ...,
1039
+ _source_includes : Optional [Union [List [str ], str ]] = ...,
1040
+ detect_noop : Optional [bool ] = ...,
1041
+ doc : Optional [Any ] = ...,
1042
+ doc_as_upsert : Optional [bool ] = ...,
1043
+ if_primary_term : Optional [int ] = ...,
1044
+ if_seq_no : Optional [int ] = ...,
1045
+ lang : Optional [str ] = ...,
1046
+ refresh : Optional [Union [Union [Literal ["wait_for" ], str ], bool ]] = ...,
1034
1047
require_alias : Optional [bool ] = ...,
1035
- retry_on_conflict : Optional [Any ] = ...,
1036
- routing : Optional [Any ] = ...,
1037
- timeout : Optional [Any ] = ...,
1038
- wait_for_active_shards : Optional [Any ] = ...,
1048
+ retry_on_conflict : Optional [int ] = ...,
1049
+ routing : Optional [str ] = ...,
1050
+ script : Optional [Union [Mapping [str , Any ], str ]] = ...,
1051
+ scripted_upsert : Optional [bool ] = ...,
1052
+ timeout : Optional [Union [int , str ]] = ...,
1053
+ upsert : Optional [Any ] = ...,
1054
+ wait_for_active_shards : Optional [Union [Union [Literal ["all" ], str ], int ]] = ...,
1039
1055
pretty : Optional [bool ] = ...,
1040
1056
human : Optional [bool ] = ...,
1041
1057
error_trace : Optional [bool ] = ...,
0 commit comments