Skip to content

Commit

Permalink
Add missing properties to Audit Logs API response data class
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Oct 9, 2024
1 parent c47ea20 commit a966e34
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions slack_sdk/audit_logs/v1/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ class Details:
matched_rule: Optional[AAARule]
request: Optional[AAARequest]
rules_checked: Optional[List[AAARule]]
disconnecting_team: Optional[str]
is_channel_canvas: Optional[bool]
linked_channel_id: Optional[str]

def __init__(
self,
Expand Down Expand Up @@ -639,6 +642,9 @@ def __init__(
matched_rule: Optional[Union[Dict[str, Any], AAARule]] = None,
request: Optional[Union[Dict[str, Any], AAARequest]] = None,
rules_checked: Optional[List[Union[Dict[str, Any], AAARule]]] = None,
disconnecting_team: Optional[str] = None,
is_channel_canvas: Optional[bool] = None,
linked_channel_id: Optional[str] = None,
**kwargs,
) -> None:
self.name = name
Expand Down Expand Up @@ -811,6 +817,9 @@ def __init__(
self.rules_checked.append(AAARule(**a))
else:
self.rules_checked.append(a)
self.disconnecting_team = disconnecting_team
self.is_channel_canvas = is_channel_canvas
self.linked_channel_id = linked_channel_id


class Channel:
Expand All @@ -821,6 +830,7 @@ class Channel:
is_org_shared: Optional[bool]
teams_shared_with: Optional[List[str]]
original_connected_channel_id: Optional[str]
is_salesforce_channel: Optional[bool]
unknown_fields: Dict[str, Any]

def __init__(
Expand All @@ -833,6 +843,7 @@ def __init__(
is_org_shared: Optional[bool] = None,
teams_shared_with: Optional[List[str]] = None,
original_connected_channel_id: Optional[str] = None,
is_salesforce_channel: Optional[bool] = None,
**kwargs,
) -> None:
self.id = id
Expand All @@ -842,6 +853,7 @@ def __init__(
self.is_org_shared = is_org_shared
self.teams_shared_with = teams_shared_with
self.original_connected_channel_id = original_connected_channel_id
self.is_salesforce_channel = is_salesforce_channel
self.unknown_fields = kwargs


Expand Down Expand Up @@ -885,6 +897,26 @@ def __init__(
self.unknown_fields = kwargs


class Message:
channel: Optional[str]
team: Optional[str]
timestamp: Optional[str]
unknown_fields: Dict[str, Any]

def __init__(
self,
*,
channel: Optional[str] = None,
team: Optional[str] = None,
timestamp: Optional[str] = None,
**kwargs,
) -> None:
self.channel = channel
self.team = team
self.timestamp = timestamp
self.unknown_fields = kwargs


class Huddle:
id: Optional[str]
date_start: Optional[int]
Expand Down Expand Up @@ -1055,6 +1087,7 @@ class Entity:
channel: Optional[Channel]
file: Optional[File]
app: Optional[App]
message: Optional[Message]
huddle: Optional[Huddle]
role: Optional[Role]
usergroup: Optional[Usergroup]
Expand All @@ -1074,6 +1107,7 @@ def __init__(
channel: Optional[Union[Channel, Dict[str, Any]]] = None,
file: Optional[Union[File, Dict[str, Any]]] = None,
app: Optional[Union[App, Dict[str, Any]]] = None,
message: Optional[Union[Message, Dict[str, Any]]] = None,
huddle: Optional[Union[Huddle, Dict[str, Any]]] = None,
role: Optional[Union[Role, Dict[str, Any]]] = None,
usergroup: Optional[Union[Usergroup, Dict[str, Any]]] = None,
Expand All @@ -1090,6 +1124,7 @@ def __init__(
self.channel = Channel(**channel) if isinstance(channel, dict) else channel
self.file = File(**file) if isinstance(file, dict) else file
self.app = App(**app) if isinstance(app, dict) else app
self.message = Message(**message) if isinstance(message, dict) else message
self.huddle = Huddle(**huddle) if isinstance(huddle, dict) else huddle
self.role = Role(**role) if isinstance(role, dict) else role
self.usergroup = Usergroup(**usergroup) if isinstance(usergroup, dict) else usergroup
Expand Down

0 comments on commit a966e34

Please sign in to comment.