List users on a workspace
@@ -12366,6 +12374,8 @@
Methods
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -12376,6 +12386,8 @@
Methods
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
diff --git a/docs/api-docs/slack_sdk/web/base_client.html b/docs/api-docs/slack_sdk/web/base_client.html
index c9bf3ac3..8daa5c76 100644
--- a/docs/api-docs/slack_sdk/web/base_client.html
+++ b/docs/api-docs/slack_sdk/web/base_client.html
@@ -48,7 +48,6 @@
Module slack_sdk.web.base_client
from urllib.parse import urlencode
from urllib.request import Request, urlopen, OpenerDirector, ProxyHandler, HTTPSHandler
-import slack_sdk.errors as err
from slack_sdk.errors import SlackRequestError
from .deprecation import show_deprecation_warning_if_any
from .internal_utils import (
@@ -328,7 +327,8 @@
Module slack_sdk.web.base_client
response_body_data = json.loads(response["body"])
except json.decoder.JSONDecodeError:
message = _build_unexpected_body_error_message(response.get("body", ""))
- raise err.SlackApiError(message, response)
+ self._logger.error(f"Failed to decode Slack API response: {message}")
+ response_body_data = {"ok": False, "error": message}
all_params: Dict[str, Any] = copy.copy(body_params) if body_params is not None else {}
if query_params:
@@ -911,7 +911,8 @@
response_body_data = json.loads(response["body"])
except json.decoder.JSONDecodeError:
message = _build_unexpected_body_error_message(response.get("body", ""))
- raise err.SlackApiError(message, response)
+ self._logger.error(f"Failed to decode Slack API response: {message}")
+ response_body_data = {"ok": False, "error": message}
all_params: Dict[str, Any] = copy.copy(body_params) if body_params is not None else {}
if query_params:
diff --git a/docs/api-docs/slack_sdk/web/client.html b/docs/api-docs/slack_sdk/web/client.html
index c3ade57b..e2750b7b 100644
--- a/docs/api-docs/slack_sdk/web/client.html
+++ b/docs/api-docs/slack_sdk/web/client.html
@@ -1695,6 +1695,8 @@
Module slack_sdk.web.client
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -1705,6 +1707,8 @@
Module slack_sdk.web.client
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
@@ -6742,6 +6746,8 @@
Note
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -6752,6 +6758,8 @@
Note
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
@@ -12344,7 +12352,7 @@
Methods
-def admin_users_list(self, *, team_id: str, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> SlackResponse
+def admin_users_list(self, *, team_id: str, include_deactivated_user_workspaces: Optional[bool] = None, is_active: Optional[bool] = None, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> SlackResponse
List users on a workspace
@@ -12357,6 +12365,8 @@
Methods
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -12367,6 +12377,8 @@
Methods
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
diff --git a/docs/api-docs/slack_sdk/web/index.html b/docs/api-docs/slack_sdk/web/index.html
index 1a494fb9..8d513a59 100644
--- a/docs/api-docs/slack_sdk/web/index.html
+++ b/docs/api-docs/slack_sdk/web/index.html
@@ -2116,6 +2116,8 @@
Note
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -2126,6 +2128,8 @@
Note
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
@@ -7718,7 +7722,7 @@
Methods
-def admin_users_list(self, *, team_id: str, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> SlackResponse
+def admin_users_list(self, *, team_id: str, include_deactivated_user_workspaces: Optional[bool] = None, is_active: Optional[bool] = None, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> SlackResponse
List users on a workspace
@@ -7731,6 +7735,8 @@
Methods
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -7741,6 +7747,8 @@
Methods
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
diff --git a/docs/api-docs/slack_sdk/web/internal_utils.html b/docs/api-docs/slack_sdk/web/internal_utils.html
index 3fbe8fde..9dd756cc 100644
--- a/docs/api-docs/slack_sdk/web/internal_utils.html
+++ b/docs/api-docs/slack_sdk/web/internal_utils.html
@@ -258,9 +258,10 @@
Module slack_sdk.web.internal_utils
A boolean value.
"""
# Only admin.conversations.search returns next_cursor at the top level
- present = ("next_cursor" in data and data["next_cursor"] != "") or (
+ present = ("next_cursor" in data and data["next_cursor"] is not None and data["next_cursor"] != "") or (
"response_metadata" in data
and "next_cursor" in data["response_metadata"]
+ and data["response_metadata"]["next_cursor"] is not None
and data["response_metadata"]["next_cursor"] != ""
)
return present
diff --git a/docs/api-docs/slack_sdk/web/legacy_client.html b/docs/api-docs/slack_sdk/web/legacy_client.html
index 00827a9c..7b09ffc9 100644
--- a/docs/api-docs/slack_sdk/web/legacy_client.html
+++ b/docs/api-docs/slack_sdk/web/legacy_client.html
@@ -1705,6 +1705,8 @@
Module slack_sdk.web.legacy_client
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -1715,6 +1717,8 @@
Module slack_sdk.web.legacy_client
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
@@ -6752,6 +6756,8 @@
Note
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -6762,6 +6768,8 @@
Note
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
@@ -12354,7 +12362,7 @@
Methods
-def admin_users_list(self, *, team_id: str, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> Union[_asyncio.Future, LegacySlackResponse]
+def admin_users_list(self, *, team_id: str, include_deactivated_user_workspaces: Optional[bool] = None, is_active: Optional[bool] = None, cursor: Optional[str] = None, limit: Optional[int] = None, **kwargs) ‑> Union[_asyncio.Future, LegacySlackResponse]
List users on a workspace
@@ -12367,6 +12375,8 @@
Methods
self,
*,
team_id: str,
+ include_deactivated_user_workspaces: Optional[bool] = None,
+ is_active: Optional[bool] = None,
cursor: Optional[str] = None,
limit: Optional[int] = None,
**kwargs,
@@ -12377,6 +12387,8 @@
Methods
kwargs.update(
{
"team_id": team_id,
+ "include_deactivated_user_workspaces": include_deactivated_user_workspaces,
+ "is_active": is_active,
"cursor": cursor,
"limit": limit,
}
diff --git a/slack_sdk/version.py b/slack_sdk/version.py
index db0f5d09..457fcb91 100644
--- a/slack_sdk/version.py
+++ b/slack_sdk/version.py
@@ -1,2 +1,2 @@
"""Check the latest version at https://pypi.org/project/slack-sdk/"""
-__version__ = "3.23.0"
+__version__ = "3.23.1"