@@ -250,6 +250,7 @@ def invite(
250
250
additional_login_ids : Optional [List [str ]] = None ,
251
251
sso_app_ids : Optional [List [str ]] = None ,
252
252
template_id : str = "" ,
253
+ test : bool = False ,
253
254
) -> dict :
254
255
"""
255
256
Create a new user and invite them via an email / text message.
@@ -278,7 +279,7 @@ def invite(
278
279
role_names ,
279
280
user_tenants ,
280
281
True ,
281
- False ,
282
+ test ,
282
283
picture ,
283
284
custom_attributes ,
284
285
verified_email ,
@@ -346,6 +347,7 @@ def update(
346
347
verified_phone : Optional [bool ] = None ,
347
348
additional_login_ids : Optional [List [str ]] = None ,
348
349
sso_app_ids : Optional [List [str ]] = None ,
350
+ test : bool = False ,
349
351
) -> dict :
350
352
"""
351
353
Update an existing user with the given various fields. IMPORTANT: All parameters are used as overrides
@@ -367,6 +369,7 @@ def update(
367
369
picture (str): Optional url for user picture
368
370
custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
369
371
sso_app_ids (List[str]): Optional, list of SSO applications IDs to be associated with the user.
372
+ test (bool, optional): Set to True to update a test user. Defaults to False.
370
373
371
374
Return value (dict):
372
375
Return dict in the format
@@ -391,7 +394,7 @@ def update(
391
394
family_name ,
392
395
role_names ,
393
396
user_tenants ,
394
- False ,
397
+ test ,
395
398
picture ,
396
399
custom_attributes ,
397
400
verified_email ,
@@ -420,6 +423,7 @@ def patch(
420
423
verified_email : Optional [bool ] = None ,
421
424
verified_phone : Optional [bool ] = None ,
422
425
sso_app_ids : Optional [List [str ]] = None ,
426
+ test : bool = False ,
423
427
) -> dict :
424
428
"""
425
429
Patches an existing user with the given various fields. Only the given fields will be used to update the user.
@@ -439,6 +443,7 @@ def patch(
439
443
picture (str): Optional url for user picture
440
444
custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
441
445
sso_app_ids (List[str]): Optional, list of SSO applications IDs to be associated with the user.
446
+ test (bool, optional): Set to True to update a test user. Defaults to False.
442
447
443
448
Return value (dict):
444
449
Return dict in the format
@@ -465,6 +470,7 @@ def patch(
465
470
verified_email ,
466
471
verified_phone ,
467
472
sso_app_ids ,
473
+ test ,
468
474
),
469
475
pswd = self ._auth .management_key ,
470
476
)
@@ -1936,6 +1942,7 @@ def _compose_patch_body(
1936
1942
verified_email : Optional [bool ],
1937
1943
verified_phone : Optional [bool ],
1938
1944
sso_app_ids : Optional [List [str ]],
1945
+ test : bool = False ,
1939
1946
) -> dict :
1940
1947
res : dict [str , Any ] = {
1941
1948
"loginId" : login_id ,
@@ -1966,4 +1973,6 @@ def _compose_patch_body(
1966
1973
res ["verifiedPhone" ] = verified_phone
1967
1974
if sso_app_ids is not None :
1968
1975
res ["ssoAppIds" ] = sso_app_ids
1976
+ if test :
1977
+ res ["test" ] = test
1969
1978
return res
0 commit comments