Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#380 - Update case and alert types #383

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions thehive4py/types/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from thehive4py.types.custom_field import InputCustomFieldValue, OutputCustomFieldValue
from thehive4py.types.observable import InputObservable
from thehive4py.types.page import InputCasePage
from thehive4py.types.procedure import InputProcedure
from thehive4py.types.share import InputShare
from thehive4py.types.task import InputTask
Expand All @@ -26,6 +27,7 @@ class InputAlert(InputAlertRequired, total=False):
customFields: List[InputCustomFieldValue]
summary: str
status: str
assignee: str
caseTemplate: str
observables: List[InputObservable]
procedures: List[InputProcedure]
Expand All @@ -42,9 +44,12 @@ class OutputAlertRequired(TypedDict):
title: str
description: str
severity: int
severityLabel: str
date: int
tlp: int
tlpLabel: str
pap: int
papLabel: str
follow: bool
observableCount: int
status: str
Expand All @@ -62,6 +67,7 @@ class OutputAlert(OutputAlertRequired, total=False):
customFields: List[OutputCustomFieldValue]
caseTemplate: str
caseId: str
assignee: str
summary: str
inProgressDate: int
closedDate: int
Expand All @@ -88,6 +94,9 @@ class InputUpdateAlert(TypedDict, total=False):
customFields: List[InputCustomFieldValue]
status: str
summary: str
assignee: str
addTags: List[str]
removeTags: List[str]


class InputBulkUpdateAlert(InputUpdateAlert):
Expand All @@ -110,6 +119,7 @@ class InputPromoteAlert(TypedDict, total=False):
customFields: List[InputCustomFieldValue]
caseTemplate: str
tasks: List[InputTask]
pages: List[InputCasePage]
sharingParameters: List[InputShare]
taskRule: str
observableRule: str
7 changes: 7 additions & 0 deletions thehive4py/types/case.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import List, Literal, TypedDict

from thehive4py.types.page import InputCasePage
from thehive4py.types.share import InputShare

from .custom_field import InputCustomFieldValue, OutputCustomFieldValue
Expand Down Expand Up @@ -54,6 +55,7 @@ class InputCase(InputCaseRequired, total=False):
customFields: List[InputCustomFieldValue]
caseTemplate: str
tasks: List[InputTask]
pages: List[InputCasePage]
sharingParameters: List[InputShare]
taskRule: str
observableRule: str
Expand All @@ -68,10 +70,13 @@ class OutputCaseRequired(TypedDict):
title: str
description: str
severity: int
severityLabel: str
startDate: int
flag: bool
tlp: int
tlpLabel: str
pap: int
papLabel: str
status: CaseStatusValue
stage: str
extraData: dict
Expand Down Expand Up @@ -119,6 +124,8 @@ class InputUpdateCase(TypedDict, total=False):
customFields: List[InputCustomFieldValue]
taskRule: str
observableRule: str
addTags: List[str]
removeTags: List[str]


class InputBulkUpdateCase(InputUpdateCase):
Expand Down
Loading