Skip to content

Commit 89a469e

Browse files
Merge pull request #151 from code42/bugfix/session-contentinspection-null
update sessions contentinspection schema
2 parents 881e88f + 7d416f3 commit 89a469e

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
how a consumer would use the library or CLI tool (e.g. adding unit tests, updating documentation, etc) are not captured
1010
here.
1111

12-
## Unreleased
12+
## 2.3.1 - 2025-05-13
13+
14+
### Fixed
15+
16+
- An issue where Sessions validation would fail due to an updated content inspection schema.
1317

1418
### Updated
1519

src/_incydr_sdk/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2022-present Code42 Software <[email protected]>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "2.3.0"
4+
__version__ = "2.3.1"

src/_incydr_sdk/sessions/models/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ class ContentInspectionEvent(Model):
1818

1919

2020
class ContentInspectionResult(Model):
21-
event_results: List[ContentInspectionEvent] = Field(
22-
alias="eventResults",
23-
description="List of all content inspection events that have occurred.",
21+
detected_on_alerts: List[str] = Field(
22+
alias="detectedOnAlerts",
23+
description="A list of content categories or types found on events which triggered alerts.",
2424
)
25-
status: Optional[str]
2625

2726

2827
class Note(Model):

tests/test_sessions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@
3131
TEST_SESSION = {
3232
"actorId": TEST_SESSION_ID,
3333
"beginTime": POSIX_TS,
34-
"contentInspectionResults": {
35-
"eventResults": [
36-
{"eventId": "event-id", "piiType": ["string"], "status": "PENDING"}
37-
],
38-
"status": "PENDING",
39-
},
34+
"contentInspectionResults": {"detectedOnAlerts": ["PII"]},
4035
"contextSummary": "string",
4136
"criticalEvents": 0,
4237
"endTime": POSIX_TS,

0 commit comments

Comments
 (0)