Skip to content

Commit 460176f

Browse files
committed
Add newly added properties to Audit Logs API response data
1 parent d8dd504 commit 460176f

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

slack_sdk/audit_logs/v1/logs.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,51 @@ def __init__(
177177
self.unknown_fields = kwargs
178178

179179

180+
class Profile:
181+
real_name: Optional[str]
182+
first_name: Optional[str]
183+
last_name: Optional[str]
184+
display_name: Optional[str]
185+
image_original: Optional[str]
186+
image_24: Optional[str]
187+
image_32: Optional[str]
188+
image_48: Optional[str]
189+
image_72: Optional[str]
190+
image_192: Optional[str]
191+
image_512: Optional[str]
192+
image_1024: Optional[str]
193+
194+
def __init__(
195+
self,
196+
*,
197+
real_name: Optional[str] = None,
198+
first_name: Optional[str] = None,
199+
last_name: Optional[str] = None,
200+
display_name: Optional[str] = None,
201+
image_original: Optional[str] = None,
202+
image_24: Optional[str] = None,
203+
image_32: Optional[str] = None,
204+
image_48: Optional[str] = None,
205+
image_72: Optional[str] = None,
206+
image_192: Optional[str] = None,
207+
image_512: Optional[str] = None,
208+
image_1024: Optional[str] = None,
209+
**kwargs,
210+
) -> None:
211+
self.real_name = real_name
212+
self.first_name = first_name
213+
self.last_name = last_name
214+
self.display_name = display_name
215+
self.image_original = image_original
216+
self.image_24 = image_24
217+
self.image_32 = image_32
218+
self.image_48 = image_48
219+
self.image_72 = image_72
220+
self.image_192 = image_192
221+
self.image_512 = image_512
222+
self.image_1024 = image_1024
223+
224+
180225
class Details:
181226
name: Optional[str]
182227
new_value: Optional[Union[str, List[str], Dict[str, Any]]]
@@ -268,6 +313,12 @@ class Details:
268313
total_removal_count: Optional[int]
269314
is_flagged: Optional[str]
270315
target_user: Optional[str]
316+
idp_config_id: Optional[str]
317+
config_type: Optional[str]
318+
idp_entity_id_hash: Optional[str]
319+
label: Optional[str]
320+
previous_profile: Optional[Profile]
321+
new_profile: Optional[Profile]
271322

272323
def __init__(
273324
self,
@@ -361,6 +412,12 @@ def __init__(
361412
total_removal_count: Optional[int] = None,
362413
is_flagged: Optional[str] = None,
363414
target_user: Optional[str] = None,
415+
idp_config_id: Optional[str] = None,
416+
config_type: Optional[str] = None,
417+
idp_entity_id_hash: Optional[str] = None,
418+
label: Optional[str] = None,
419+
previous_profile: Optional[Union[Dict[str, Any], Profile]] = None,
420+
new_profile: Optional[Union[Dict[str, Any], Profile]] = None,
364421
**kwargs,
365422
) -> None:
366423
self.name = name
@@ -485,6 +542,18 @@ def __init__(
485542
self.total_removal_count = total_removal_count
486543
self.is_flagged = is_flagged
487544
self.target_user = target_user
545+
self.idp_config_id = idp_config_id
546+
self.config_type = config_type
547+
self.idp_entity_id_hash = idp_entity_id_hash
548+
self.label = label
549+
self.previous_profile = (
550+
previous_profile
551+
if previous_profile is None or isinstance(previous_profile, Profile)
552+
else Profile(**previous_profile)
553+
)
554+
self.new_profile = (
555+
previous_profile if new_profile is None or isinstance(new_profile, Profile) else Profile(**new_profile)
556+
)
488557

489558

490559
class Channel:

0 commit comments

Comments
 (0)