@@ -590,52 +590,54 @@ def import_account(
590
590
591
591
return res .decode_body (adminv1 .User .__json_decode__ )
592
592
593
- def report_action (
593
+ def report_event (
594
594
self ,
595
595
user_id : str ,
596
596
* ,
597
- action : str ,
597
+ type : Optional [ str ] = None ,
598
598
wait : Optional [bool ] = None ,
599
- ) -> adminv1 .ReportUserActionResponse :
599
+ ) -> adminv1 .ReportUserEventResponse :
600
600
"""
601
- Report a user action .
601
+ Report a user event .
602
602
603
603
If the `<externalId>@<connectionId>` user identifier syntax is
604
604
used and the user doesn't exist, they will be imported.
605
605
606
- By default, the action is processed asynchronously.
606
+ By default, the event is processed asynchronously.
607
607
608
608
:param user_id:
609
609
The identifier of the user.
610
610
611
611
This can be in the format `<externalId>@<connectionId>` where
612
612
`externalId` is the identity provider user identifier and
613
613
and `connectionId` is the User provider connection identifier.
614
- :param action:
615
- The type of action.
614
+ :param type:
615
+ The event type.
616
+
617
+ If not specified, this defaults to `CHANGED`.
616
618
:param wait:
617
619
Process the user action synchronously.
618
620
619
621
Otherwise the action is processed in the background and errors
620
622
won't be returned.
621
623
"""
622
624
req = Request (
623
- "admin.users.reportAction " ,
625
+ "admin.users.reportEvent " ,
624
626
"POST" ,
625
- f"/admin/v1/users/{ util .quote_path (user_id )} :reportAction " ,
627
+ f"/admin/v1/users/{ util .quote_path (user_id )} :event " ,
626
628
)
627
629
body : Dict [str , Any ] = {}
628
630
629
- if action :
630
- body ["action " ] = action
631
+ if type :
632
+ body ["type " ] = type
631
633
if wait :
632
634
body ["wait" ] = wait
633
635
634
636
req .set_body (body )
635
637
636
638
res = self ._transport .execute (req )
637
639
638
- return res .decode_body (adminv1 .ReportUserActionResponse .__json_decode__ )
640
+ return res .decode_body (adminv1 .ReportUserEventResponse .__json_decode__ )
639
641
640
642
def create_api_session (
641
643
self ,
@@ -1321,52 +1323,54 @@ async def import_account(
1321
1323
1322
1324
return res .decode_body (adminv1 .User .__json_decode__ )
1323
1325
1324
- async def report_action (
1326
+ async def report_event (
1325
1327
self ,
1326
1328
user_id : str ,
1327
1329
* ,
1328
- action : str ,
1330
+ type : Optional [ str ] = None ,
1329
1331
wait : Optional [bool ] = None ,
1330
- ) -> adminv1 .ReportUserActionResponse :
1332
+ ) -> adminv1 .ReportUserEventResponse :
1331
1333
"""
1332
- Report a user action .
1334
+ Report a user event .
1333
1335
1334
1336
If the `<externalId>@<connectionId>` user identifier syntax is
1335
1337
used and the user doesn't exist, they will be imported.
1336
1338
1337
- By default, the action is processed asynchronously.
1339
+ By default, the event is processed asynchronously.
1338
1340
1339
1341
:param user_id:
1340
1342
The identifier of the user.
1341
1343
1342
1344
This can be in the format `<externalId>@<connectionId>` where
1343
1345
`externalId` is the identity provider user identifier and
1344
1346
and `connectionId` is the User provider connection identifier.
1345
- :param action:
1346
- The type of action.
1347
+ :param type:
1348
+ The event type.
1349
+
1350
+ If not specified, this defaults to `CHANGED`.
1347
1351
:param wait:
1348
1352
Process the user action synchronously.
1349
1353
1350
1354
Otherwise the action is processed in the background and errors
1351
1355
won't be returned.
1352
1356
"""
1353
1357
req = Request (
1354
- "admin.users.reportAction " ,
1358
+ "admin.users.reportEvent " ,
1355
1359
"POST" ,
1356
- f"/admin/v1/users/{ util .quote_path (user_id )} :reportAction " ,
1360
+ f"/admin/v1/users/{ util .quote_path (user_id )} :event " ,
1357
1361
)
1358
1362
body : Dict [str , Any ] = {}
1359
1363
1360
- if action :
1361
- body ["action " ] = action
1364
+ if type :
1365
+ body ["type " ] = type
1362
1366
if wait :
1363
1367
body ["wait" ] = wait
1364
1368
1365
1369
req .set_body (body )
1366
1370
1367
1371
res = await self ._transport .execute (req )
1368
1372
1369
- return res .decode_body (adminv1 .ReportUserActionResponse .__json_decode__ )
1373
+ return res .decode_body (adminv1 .ReportUserEventResponse .__json_decode__ )
1370
1374
1371
1375
async def create_api_session (
1372
1376
self ,
0 commit comments