Skip to content

Commit e8ab4ad

Browse files
committed
Add cleared_resolution to Audit Logs API log response data
1 parent 55786c2 commit e8ab4ad

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

slack_sdk/audit_logs/v1/logs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class Details:
119119
origin_team: Optional[str]
120120
target_team: Optional[str]
121121
is_internal_integration: Optional[bool]
122+
cleared_resolution: Optional[str]
122123
app_owner_id: Optional[str]
123124
bot_scopes: Optional[List[str]]
124125
new_scopes: Optional[List[str]]
@@ -178,6 +179,7 @@ def __init__(
178179
origin_team: Optional[str] = None,
179180
target_team: Optional[str] = None,
180181
is_internal_integration: Optional[bool] = None,
182+
cleared_resolution: Optional[str] = None,
181183
app_owner_id: Optional[str] = None,
182184
bot_scopes: Optional[List[str]] = None,
183185
new_scopes: Optional[List[str]] = None,
@@ -234,6 +236,7 @@ def __init__(
234236
self.origin_team = origin_team
235237
self.target_team = target_team
236238
self.is_internal_integration = is_internal_integration
239+
self.cleared_resolution = cleared_resolution
237240
self.app_owner_id = app_owner_id
238241
self.bot_scopes = bot_scopes
239242
self.new_scopes = new_scopes

slack_sdk/oauth/installation_store/file/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def find_bot(
129129
data = json.loads(f.read())
130130
return Bot(**data)
131131
except FileNotFoundError as e:
132-
message = f"Installation data missing for enterprise: {e_id}, team: {t_id}: {e}"
132+
message = (
133+
f"Installation data missing for enterprise: {e_id}, team: {t_id}: {e}"
134+
)
133135
self.logger.debug(message)
134136
return None
135137

@@ -172,7 +174,9 @@ def find_installation(
172174
data = json.loads(f.read())
173175
return Installation(**data)
174176
except FileNotFoundError as e:
175-
message = f"Installation data missing for enterprise: {e_id}, team: {t_id}: {e}"
177+
message = (
178+
f"Installation data missing for enterprise: {e_id}, team: {t_id}: {e}"
179+
)
176180
self.logger.debug(message)
177181
return None
178182

tests/slack_sdk/audit_logs/test_response.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def test_logs_complete(self):
131131
self.assertEqual(entry.details.kicker.id, "kicker_id")
132132
self.assertEqual(entry.details.old_retention_policy.type, "old")
133133
self.assertEqual(entry.details.new_retention_policy.type, "new")
134+
self.assertEqual(entry.details.is_internal_integration, True)
135+
self.assertEqual(entry.details.cleared_resolution, "approved")
134136

135137

136138
logs_response_data = """{
@@ -331,7 +333,9 @@ def test_logs_complete(self):
331333
"new_retention_policy": {
332334
"type": "new",
333335
"duration_days": 222
334-
}
336+
},
337+
"is_internal_integration": true,
338+
"cleared_resolution": "approved"
335339
}
336340
}
337341
]

0 commit comments

Comments
 (0)