@@ -302,6 +302,82 @@ async def admin_apps_uninstall(
302302 kwargs .update ({"team_ids" : team_ids })
303303 return await self .api_call ("admin.apps.uninstall" , http_verb = "POST" , params = kwargs )
304304
305+ async def admin_apps_activities_list (
306+ self ,
307+ * ,
308+ app_id : Optional [str ] = None ,
309+ component_id : Optional [str ] = None ,
310+ component_type : Optional [str ] = None ,
311+ log_event_type : Optional [str ] = None ,
312+ max_date_created : Optional [int ] = None ,
313+ min_date_created : Optional [int ] = None ,
314+ min_log_level : Optional [str ] = None ,
315+ sort_direction : Optional [str ] = None ,
316+ source : Optional [str ] = None ,
317+ team_id : Optional [str ] = None ,
318+ trace_id : Optional [str ] = None ,
319+ cursor : Optional [str ] = None ,
320+ limit : Optional [int ] = None ,
321+ ** kwargs ,
322+ ) -> AsyncSlackResponse :
323+ """Get logs for a specified team/org
324+ https://api.slack.com/methods/admin.apps.activities.list
325+ """
326+ kwargs .update (
327+ {
328+ "app_id" : app_id ,
329+ "component_id" : component_id ,
330+ "component_type" : component_type ,
331+ "log_event_type" : log_event_type ,
332+ "max_date_created" : max_date_created ,
333+ "min_date_created" : min_date_created ,
334+ "min_log_level" : min_log_level ,
335+ "sort_direction" : sort_direction ,
336+ "source" : source ,
337+ "team_id" : team_id ,
338+ "trace_id" : trace_id ,
339+ "cursor" : cursor ,
340+ "limit" : limit ,
341+ }
342+ )
343+ return await self .api_call ("admin.apps.activities.list" , params = kwargs )
344+
345+ async def admin_apps_config_lookup (
346+ self ,
347+ * ,
348+ app_ids : Union [str , Sequence [str ]],
349+ ** kwargs ,
350+ ) -> AsyncSlackResponse :
351+ """Look up the app config for connectors by their IDs
352+ https://api.slack.com/methods/admin.apps.config.lookup
353+ """
354+ if isinstance (app_ids , (list , Tuple )):
355+ kwargs .update ({"app_ids" : "," .join (app_ids )})
356+ else :
357+ kwargs .update ({"app_ids" : app_ids })
358+ return await self .api_call ("admin.apps.config.lookup" , params = kwargs )
359+
360+ async def admin_apps_config_set (
361+ self ,
362+ * ,
363+ app_id : str ,
364+ domain_restrictions : Optional [Dict [str , Any ]] = None ,
365+ workflow_auth_strategy : Optional [str ] = None ,
366+ ** kwargs ,
367+ ) -> AsyncSlackResponse :
368+ """Set the app config for a connector
369+ https://api.slack.com/methods/admin.apps.config.set
370+ """
371+ kwargs .update (
372+ {
373+ "app_id" : app_id ,
374+ "workflow_auth_strategy" : workflow_auth_strategy ,
375+ }
376+ )
377+ if domain_restrictions is not None :
378+ kwargs .update ({"domain_restrictions" : json .dumps (domain_restrictions )})
379+ return await self .api_call ("admin.apps.config.set" , params = kwargs )
380+
305381 async def admin_auth_policy_getEntities (
306382 self ,
307383 * ,
@@ -948,6 +1024,72 @@ async def admin_emoji_rename(
9481024 kwargs .update ({"name" : name , "new_name" : new_name })
9491025 return await self .api_call ("admin.emoji.rename" , http_verb = "GET" , params = kwargs )
9501026
1027+ async def admin_functions_list (
1028+ self ,
1029+ * ,
1030+ app_ids : Union [str , Sequence [str ]],
1031+ team_id : Optional [str ] = None ,
1032+ cursor : Optional [str ] = None ,
1033+ limit : Optional [int ] = None ,
1034+ ** kwargs ,
1035+ ) -> AsyncSlackResponse :
1036+ """Look up functions by a set of apps
1037+ https://api.slack.com/methods/admin.functions.list
1038+ """
1039+ if isinstance (app_ids , (list , Tuple )):
1040+ kwargs .update ({"app_ids" : "," .join (app_ids )})
1041+ else :
1042+ kwargs .update ({"app_ids" : app_ids })
1043+ kwargs .update (
1044+ {
1045+ "team_id" : team_id ,
1046+ "cursor" : cursor ,
1047+ "limit" : limit ,
1048+ }
1049+ )
1050+ return await self .api_call ("admin.functions.list" , params = kwargs )
1051+
1052+ async def admin_functions_permissions_lookup (
1053+ self ,
1054+ * ,
1055+ function_ids : Union [str , Sequence [str ]],
1056+ ** kwargs ,
1057+ ) -> AsyncSlackResponse :
1058+ """Lookup the visibility of multiple Slack functions
1059+ and include the users if it is limited to particular named entities.
1060+ https://api.slack.com/methods/admin.functions.permissions.lookup
1061+ """
1062+ if isinstance (function_ids , (list , Tuple )):
1063+ kwargs .update ({"function_ids" : "," .join (function_ids )})
1064+ else :
1065+ kwargs .update ({"function_ids" : function_ids })
1066+ return await self .api_call ("admin.functions.permissions.lookup" , params = kwargs )
1067+
1068+ async def admin_functions_permissions_set (
1069+ self ,
1070+ * ,
1071+ function_id : str ,
1072+ visibility : str ,
1073+ user_ids : Optional [Union [str , Sequence [str ]]] = None ,
1074+ ** kwargs ,
1075+ ) -> AsyncSlackResponse :
1076+ """Set the visibility of a Slack function
1077+ and define the users or workspaces if it is set to named_entities
1078+ https://api.slack.com/methods/admin.functions.permissions.set
1079+ """
1080+ kwargs .update (
1081+ {
1082+ "function_id" : function_id ,
1083+ "visibility" : visibility ,
1084+ }
1085+ )
1086+ if user_ids is not None :
1087+ if isinstance (user_ids , (list , Tuple )):
1088+ kwargs .update ({"user_ids" : "," .join (user_ids )})
1089+ else :
1090+ kwargs .update ({"user_ids" : user_ids })
1091+ return await self .api_call ("admin.functions.permissions.set" , params = kwargs )
1092+
9511093 async def admin_roles_addAssignments (
9521094 self ,
9531095 * ,
@@ -1616,6 +1758,120 @@ async def admin_users_setRegular(
16161758 kwargs .update ({"team_id" : team_id , "user_id" : user_id })
16171759 return await self .api_call ("admin.users.setRegular" , params = kwargs )
16181760
1761+ async def admin_workflows_search (
1762+ self ,
1763+ * ,
1764+ app_id : Optional [str ] = None ,
1765+ collaborator_ids : Optional [Union [str , Sequence [str ]]] = None ,
1766+ cursor : Optional [str ] = None ,
1767+ limit : Optional [int ] = None ,
1768+ no_collaborators : Optional [bool ] = None ,
1769+ num_trigger_ids : Optional [int ] = None ,
1770+ query : Optional [str ] = None ,
1771+ sort : Optional [str ] = None ,
1772+ sort_dir : Optional [str ] = None ,
1773+ source : Optional [str ] = None ,
1774+ ** kwargs ,
1775+ ) -> AsyncSlackResponse :
1776+ """Search workflows within the team or enterprise
1777+ https://api.slack.com/methods/admin.workflows.search
1778+ """
1779+ if collaborator_ids is not None :
1780+ if isinstance (collaborator_ids , (list , Tuple )):
1781+ kwargs .update ({"collaborator_ids" : "," .join (collaborator_ids )})
1782+ else :
1783+ kwargs .update ({"collaborator_ids" : collaborator_ids })
1784+ kwargs .update (
1785+ {
1786+ "app_id" : app_id ,
1787+ "cursor" : cursor ,
1788+ "limit" : limit ,
1789+ "no_collaborators" : no_collaborators ,
1790+ "num_trigger_ids" : num_trigger_ids ,
1791+ "query" : query ,
1792+ "sort" : sort ,
1793+ "sort_dir" : sort_dir ,
1794+ "source" : source ,
1795+ }
1796+ )
1797+ return await self .api_call ("admin.workflows.search" , params = kwargs )
1798+
1799+ async def admin_workflows_permissions_lookup (
1800+ self ,
1801+ * ,
1802+ workflow_ids : Union [str , Sequence [str ]],
1803+ max_workflow_triggers : Optional [int ] = None ,
1804+ ** kwargs ,
1805+ ) -> AsyncSlackResponse :
1806+ """Look up the permissions for a set of workflows
1807+ https://api.slack.com/methods/admin.workflows.permissions.lookup
1808+ """
1809+ if isinstance (workflow_ids , (list , Tuple )):
1810+ kwargs .update ({"workflow_ids" : "," .join (workflow_ids )})
1811+ else :
1812+ kwargs .update ({"workflow_ids" : workflow_ids })
1813+ kwargs .update (
1814+ {
1815+ "max_workflow_triggers" : max_workflow_triggers ,
1816+ }
1817+ )
1818+ return await self .api_call ("admin.workflows.permissions.lookup" , params = kwargs )
1819+
1820+ async def admin_workflows_collaborators_add (
1821+ self ,
1822+ * ,
1823+ collaborator_ids : Union [str , Sequence [str ]],
1824+ workflow_ids : Union [str , Sequence [str ]],
1825+ ** kwargs ,
1826+ ) -> AsyncSlackResponse :
1827+ """Add collaborators to workflows within the team or enterprise
1828+ https://api.slack.com/methods/admin.workflows.collaborators.add
1829+ """
1830+ if isinstance (collaborator_ids , (list , Tuple )):
1831+ kwargs .update ({"collaborator_ids" : "," .join (collaborator_ids )})
1832+ else :
1833+ kwargs .update ({"collaborator_ids" : collaborator_ids })
1834+ if isinstance (workflow_ids , (list , Tuple )):
1835+ kwargs .update ({"workflow_ids" : "," .join (workflow_ids )})
1836+ else :
1837+ kwargs .update ({"workflow_ids" : workflow_ids })
1838+ return await self .api_call ("admin.workflows.collaborators.add" , params = kwargs )
1839+
1840+ async def admin_workflows_collaborators_remove (
1841+ self ,
1842+ * ,
1843+ collaborator_ids : Union [str , Sequence [str ]],
1844+ workflow_ids : Union [str , Sequence [str ]],
1845+ ** kwargs ,
1846+ ) -> AsyncSlackResponse :
1847+ """Remove collaborators from workflows within the team or enterprise
1848+ https://api.slack.com/methods/admin.workflows.collaborators.remove
1849+ """
1850+ if isinstance (collaborator_ids , (list , Tuple )):
1851+ kwargs .update ({"collaborator_ids" : "," .join (collaborator_ids )})
1852+ else :
1853+ kwargs .update ({"collaborator_ids" : collaborator_ids })
1854+ if isinstance (workflow_ids , (list , Tuple )):
1855+ kwargs .update ({"workflow_ids" : "," .join (workflow_ids )})
1856+ else :
1857+ kwargs .update ({"workflow_ids" : workflow_ids })
1858+ return await self .api_call ("admin.workflows.collaborators.remove" , params = kwargs )
1859+
1860+ async def admin_workflows_unpublish (
1861+ self ,
1862+ * ,
1863+ workflow_ids : Union [str , Sequence [str ]],
1864+ ** kwargs ,
1865+ ) -> AsyncSlackResponse :
1866+ """Unpublish workflows within the team or enterprise
1867+ https://api.slack.com/methods/admin.workflows.unpublish
1868+ """
1869+ if isinstance (workflow_ids , (list , Tuple )):
1870+ kwargs .update ({"workflow_ids" : "," .join (workflow_ids )})
1871+ else :
1872+ kwargs .update ({"workflow_ids" : workflow_ids })
1873+ return await self .api_call ("admin.workflows.unpublish" , params = kwargs )
1874+
16191875 async def api_test (
16201876 self ,
16211877 * ,
0 commit comments