95
95
from algoliasearch .search .models .rule import Rule
96
96
from algoliasearch .search .models .save_object_response import SaveObjectResponse
97
97
from algoliasearch .search .models .save_synonym_response import SaveSynonymResponse
98
- from algoliasearch .search .models .scope_type import ScopeType
99
98
from algoliasearch .search .models .search_dictionary_entries_params import (
100
99
SearchDictionaryEntriesParams ,
101
100
)
@@ -611,6 +610,7 @@ async def replace_all_objects(
611
610
index_name : str ,
612
611
objects : List [Dict [str , Any ]],
613
612
batch_size : int = 1000 ,
613
+ scopes = ["settings" , "rules" , "synonyms" ],
614
614
request_options : Optional [Union [dict , RequestOptions ]] = None ,
615
615
) -> ReplaceAllObjectsResponse :
616
616
"""
@@ -628,11 +628,7 @@ async def _copy() -> UpdatedAtResponse:
628
628
operation_index_params = OperationIndexParams (
629
629
operation = OperationType .COPY ,
630
630
destination = tmp_index_name ,
631
- scope = [
632
- ScopeType ("settings" ),
633
- ScopeType ("rules" ),
634
- ScopeType ("synonyms" ),
635
- ],
631
+ scope = scopes ,
636
632
),
637
633
request_options = request_options ,
638
634
)
@@ -5655,6 +5651,7 @@ def replace_all_objects(
5655
5651
index_name : str ,
5656
5652
objects : List [Dict [str , Any ]],
5657
5653
batch_size : int = 1000 ,
5654
+ scopes = ["settings" , "rules" , "synonyms" ],
5658
5655
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5659
5656
) -> ReplaceAllObjectsResponse :
5660
5657
"""
@@ -5672,11 +5669,7 @@ def _copy() -> UpdatedAtResponse:
5672
5669
operation_index_params = OperationIndexParams (
5673
5670
operation = OperationType .COPY ,
5674
5671
destination = tmp_index_name ,
5675
- scope = [
5676
- ScopeType ("settings" ),
5677
- ScopeType ("rules" ),
5678
- ScopeType ("synonyms" ),
5679
- ],
5672
+ scope = scopes ,
5680
5673
),
5681
5674
request_options = request_options ,
5682
5675
)
0 commit comments