@@ -354,6 +354,9 @@ async def browse_objects(
354
354
"""
355
355
Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
356
356
"""
357
+ if isinstance (browse_params , dict ):
358
+ browse_params = BrowseParamsObject ().from_dict (browse_params )
359
+
357
360
if browse_params is None :
358
361
browse_params = BrowseParamsObject (hits_per_page = 1000 )
359
362
@@ -385,6 +388,9 @@ async def browse_rules(
385
388
"""
386
389
Helper: Iterate on the `search_rules` method of the client to allow aggregating rules of an index.
387
390
"""
391
+ if isinstance (search_rules_params , dict ):
392
+ search_rules_params = SearchRulesParams ().from_dict (search_rules_params )
393
+
388
394
if search_rules_params is None :
389
395
search_rules_params = SearchRulesParams (hits_per_page = 1000 )
390
396
@@ -418,6 +424,11 @@ async def browse_synonyms(
418
424
"""
419
425
Helper: Iterate on the `search_synonyms` method of the client to allow aggregating synonyms of an index.
420
426
"""
427
+ if isinstance (search_synonyms_params , dict ):
428
+ search_synonyms_params = SearchSynonymsParams ().from_dict (
429
+ search_synonyms_params
430
+ )
431
+
421
432
if search_synonyms_params is None :
422
433
search_synonyms_params = SearchSynonymsParams (hits_per_page = 1000 , page = 0 )
423
434
hits_per_page = 1000
@@ -453,6 +464,7 @@ async def generate_secured_api_key(
453
464
"""
454
465
if restrictions is None :
455
466
restrictions = SecuredApiKeyRestrictions ()
467
+
456
468
restrictions_dict = {}
457
469
if isinstance (restrictions , SecuredApiKeyRestrictions ):
458
470
restrictions_dict = restrictions .to_dict ()
@@ -5384,6 +5396,9 @@ def browse_objects(
5384
5396
"""
5385
5397
Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
5386
5398
"""
5399
+ if isinstance (browse_params , dict ):
5400
+ browse_params = BrowseParamsObject ().from_dict (browse_params )
5401
+
5387
5402
if browse_params is None :
5388
5403
browse_params = BrowseParamsObject (hits_per_page = 1000 )
5389
5404
@@ -5415,6 +5430,9 @@ def browse_rules(
5415
5430
"""
5416
5431
Helper: Iterate on the `search_rules` method of the client to allow aggregating rules of an index.
5417
5432
"""
5433
+ if isinstance (search_rules_params , dict ):
5434
+ search_rules_params = SearchRulesParams ().from_dict (search_rules_params )
5435
+
5418
5436
if search_rules_params is None :
5419
5437
search_rules_params = SearchRulesParams (hits_per_page = 1000 )
5420
5438
@@ -5448,6 +5466,11 @@ def browse_synonyms(
5448
5466
"""
5449
5467
Helper: Iterate on the `search_synonyms` method of the client to allow aggregating synonyms of an index.
5450
5468
"""
5469
+ if isinstance (search_synonyms_params , dict ):
5470
+ search_synonyms_params = SearchSynonymsParams ().from_dict (
5471
+ search_synonyms_params
5472
+ )
5473
+
5451
5474
if search_synonyms_params is None :
5452
5475
search_synonyms_params = SearchSynonymsParams (hits_per_page = 1000 , page = 0 )
5453
5476
hits_per_page = 1000
@@ -5481,6 +5504,7 @@ def generate_secured_api_key(
5481
5504
"""
5482
5505
if restrictions is None :
5483
5506
restrictions = SecuredApiKeyRestrictions ()
5507
+
5484
5508
restrictions_dict = {}
5485
5509
if isinstance (restrictions , SecuredApiKeyRestrictions ):
5486
5510
restrictions_dict = restrictions .to_dict ()
0 commit comments