kalir-python 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. kalir/__init__.py +11 -0
  2. kalir/api/__init__.py +1 -0
  3. kalir/api/assets/__init__.py +1 -0
  4. kalir/api/assets/create_asset.py +193 -0
  5. kalir/api/assets/delete_asset.py +182 -0
  6. kalir/api/assets/get_asset.py +186 -0
  7. kalir/api/assets/list_assets.py +165 -0
  8. kalir/api/assets/update_asset.py +206 -0
  9. kalir/api/events/__init__.py +1 -0
  10. kalir/api/events/get_event.py +194 -0
  11. kalir/api/events/ingest_event.py +215 -0
  12. kalir/api/events/list_events.py +259 -0
  13. kalir/api/exposures/__init__.py +1 -0
  14. kalir/api/exposures/count_exposures.py +165 -0
  15. kalir/api/exposures/get_infostealer_summary.py +181 -0
  16. kalir/api/exposures/list_exposures.py +225 -0
  17. kalir/api/incidents/__init__.py +1 -0
  18. kalir/api/incidents/get_incident.py +194 -0
  19. kalir/api/incidents/list_incidents.py +265 -0
  20. kalir/api/incidents/update_incident_status.py +207 -0
  21. kalir/api/intel/__init__.py +1 -0
  22. kalir/api/intel/get_ransomware_stats.py +165 -0
  23. kalir/api/intel/list_ransomware_victims.py +165 -0
  24. kalir/api/mentions/__init__.py +1 -0
  25. kalir/api/mentions/list_mentions.py +283 -0
  26. kalir/api/overview/__init__.py +1 -0
  27. kalir/api/overview/get_overview.py +184 -0
  28. kalir/api/phishing/__init__.py +1 -0
  29. kalir/api/phishing/list_phishing.py +245 -0
  30. kalir/api/reports/__init__.py +1 -0
  31. kalir/api/reports/create_report.py +193 -0
  32. kalir/api/reports/download_report.py +186 -0
  33. kalir/api/reports/list_reports.py +165 -0
  34. kalir/api/rules/__init__.py +1 -0
  35. kalir/api/rules/create_rule.py +193 -0
  36. kalir/api/rules/delete_rule.py +183 -0
  37. kalir/api/rules/get_rule.py +187 -0
  38. kalir/api/rules/list_rules.py +165 -0
  39. kalir/api/rules/replace_rule.py +207 -0
  40. kalir/api/takedowns/__init__.py +1 -0
  41. kalir/api/takedowns/count_takedowns.py +165 -0
  42. kalir/api/takedowns/create_takedown.py +193 -0
  43. kalir/api/takedowns/delete_takedown.py +183 -0
  44. kalir/api/takedowns/get_takedown.py +187 -0
  45. kalir/api/takedowns/list_takedowns.py +165 -0
  46. kalir/api/takedowns/replace_takedown.py +210 -0
  47. kalir/api/takedowns/update_takedown.py +210 -0
  48. kalir/api/webhooks/__init__.py +1 -0
  49. kalir/api/webhooks/create_webhook.py +222 -0
  50. kalir/api/webhooks/delete_webhook.py +190 -0
  51. kalir/api/webhooks/get_webhook.py +194 -0
  52. kalir/api/webhooks/get_webhook_delivery.py +194 -0
  53. kalir/api/webhooks/list_webhook_deliveries.py +239 -0
  54. kalir/api/webhooks/list_webhook_event_types.py +165 -0
  55. kalir/api/webhooks/list_webhooks.py +172 -0
  56. kalir/api/webhooks/retry_webhook_delivery.py +190 -0
  57. kalir/api/webhooks/rotate_webhook_secret.py +202 -0
  58. kalir/api/webhooks/send_webhook_test.py +202 -0
  59. kalir/api/webhooks/update_webhook.py +229 -0
  60. kalir/client.py +271 -0
  61. kalir/errors.py +14 -0
  62. kalir/models/__init__.py +195 -0
  63. kalir/models/asset.py +162 -0
  64. kalir/models/asset_create.py +122 -0
  65. kalir/models/asset_create_asset_type.py +14 -0
  66. kalir/models/asset_create_metadata.py +64 -0
  67. kalir/models/count_exposures_response_200.py +78 -0
  68. kalir/models/count_takedowns_response_200.py +96 -0
  69. kalir/models/create_report_body.py +96 -0
  70. kalir/models/create_report_body_type.py +10 -0
  71. kalir/models/create_webhook_response_201.py +111 -0
  72. kalir/models/error.py +84 -0
  73. kalir/models/error_error.py +106 -0
  74. kalir/models/error_error_type.py +15 -0
  75. kalir/models/event.py +151 -0
  76. kalir/models/event_asset.py +87 -0
  77. kalir/models/event_ingest.py +146 -0
  78. kalir/models/event_ingest_asset.py +87 -0
  79. kalir/models/event_ingest_evidence.py +64 -0
  80. kalir/models/event_ingest_source.py +87 -0
  81. kalir/models/exposure.py +137 -0
  82. kalir/models/exposure_webhook_event.py +152 -0
  83. kalir/models/exposure_webhook_event_data.py +115 -0
  84. kalir/models/exposure_webhook_event_data_exposure.py +149 -0
  85. kalir/models/exposure_webhook_event_data_infection.py +136 -0
  86. kalir/models/exposure_webhook_event_type.py +8 -0
  87. kalir/models/get_incident_response_200.py +174 -0
  88. kalir/models/get_infostealer_summary_response_200.py +100 -0
  89. kalir/models/get_ransomware_stats_response_200.py +156 -0
  90. kalir/models/get_ransomware_stats_response_200_top_countries_7d_item.py +64 -0
  91. kalir/models/get_ransomware_stats_response_200_top_groups_7d_item.py +64 -0
  92. kalir/models/incident.py +170 -0
  93. kalir/models/incident_severity.py +10 -0
  94. kalir/models/incident_status.py +10 -0
  95. kalir/models/incident_webhook_event.py +152 -0
  96. kalir/models/incident_webhook_event_data.py +115 -0
  97. kalir/models/incident_webhook_event_data_previous.py +88 -0
  98. kalir/models/incident_webhook_event_type.py +9 -0
  99. kalir/models/infostealer_domain_summary.py +122 -0
  100. kalir/models/infostealer_domain_summary_snapshot.py +201 -0
  101. kalir/models/infostealer_domain_summary_snapshot_top_employee_urls_item.py +87 -0
  102. kalir/models/infostealer_domain_summary_snapshot_top_families_item.py +87 -0
  103. kalir/models/list_assets_response_200.py +100 -0
  104. kalir/models/list_events_response_200.py +109 -0
  105. kalir/models/list_exposures_response_200.py +127 -0
  106. kalir/models/list_incidents_bucket.py +10 -0
  107. kalir/models/list_incidents_response_200.py +149 -0
  108. kalir/models/list_incidents_response_200_counts.py +106 -0
  109. kalir/models/list_incidents_status.py +12 -0
  110. kalir/models/list_mentions_response_200.py +122 -0
  111. kalir/models/list_mentions_source.py +8 -0
  112. kalir/models/list_phishing_response_200.py +122 -0
  113. kalir/models/list_phishing_verdict.py +11 -0
  114. kalir/models/list_ransomware_victims_response_200.py +109 -0
  115. kalir/models/list_ransomware_victims_response_200_victims_item.py +64 -0
  116. kalir/models/list_reports_response_200.py +109 -0
  117. kalir/models/list_rules_response_200.py +100 -0
  118. kalir/models/list_takedowns_response_200.py +109 -0
  119. kalir/models/list_webhook_deliveries_response_200.py +122 -0
  120. kalir/models/list_webhook_event_types_response_200.py +100 -0
  121. kalir/models/list_webhook_event_types_response_200_data_item.py +87 -0
  122. kalir/models/list_webhooks_response_200.py +100 -0
  123. kalir/models/mention.py +194 -0
  124. kalir/models/mention_source.py +8 -0
  125. kalir/models/overview.py +231 -0
  126. kalir/models/overview_assets.py +96 -0
  127. kalir/models/overview_exposures.py +105 -0
  128. kalir/models/overview_incidents.py +114 -0
  129. kalir/models/overview_phishing.py +87 -0
  130. kalir/models/overview_risk_level.py +10 -0
  131. kalir/models/overview_takedowns.py +87 -0
  132. kalir/models/pagination.py +105 -0
  133. kalir/models/phishing_domain.py +186 -0
  134. kalir/models/phishing_domain_verdict.py +11 -0
  135. kalir/models/report.py +182 -0
  136. kalir/models/report_parameters.py +181 -0
  137. kalir/models/report_parameters_date_range.py +11 -0
  138. kalir/models/report_parameters_language.py +8 -0
  139. kalir/models/report_parameters_sections_item.py +15 -0
  140. kalir/models/report_status.py +10 -0
  141. kalir/models/rotate_webhook_secret_response_200.py +87 -0
  142. kalir/models/rule.py +174 -0
  143. kalir/models/rule_input.py +134 -0
  144. kalir/models/rule_input_actions_item.py +64 -0
  145. kalir/models/takedown.py +163 -0
  146. kalir/models/takedown_create.py +113 -0
  147. kalir/models/takedown_update.py +96 -0
  148. kalir/models/update_incident_status_body.py +90 -0
  149. kalir/models/update_incident_status_body_status.py +10 -0
  150. kalir/models/webhook_delivery.py +274 -0
  151. kalir/models/webhook_delivery_payload.py +64 -0
  152. kalir/models/webhook_delivery_status.py +9 -0
  153. kalir/models/webhook_endpoint.py +216 -0
  154. kalir/models/webhook_endpoint_input.py +124 -0
  155. kalir/models/webhook_endpoint_input_event_types_item.py +11 -0
  156. kalir/models/webhook_incident.py +232 -0
  157. kalir/models/webhook_incident_severity.py +10 -0
  158. kalir/py.typed +1 -0
  159. kalir/types.py +53 -0
  160. kalir/webhooks.py +63 -0
  161. kalir_python-0.1.0.dist-info/METADATA +76 -0
  162. kalir_python-0.1.0.dist-info/RECORD +163 -0
  163. kalir_python-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,170 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..models.incident_severity import IncidentSeverity
12
+ from ..models.incident_status import IncidentStatus
13
+ from ..types import UNSET, Unset
14
+ from typing import cast
15
+ from uuid import UUID
16
+ import datetime
17
+
18
+
19
+
20
+
21
+
22
+
23
+ T = TypeVar("T", bound="Incident")
24
+
25
+
26
+
27
+ @_attrs_define
28
+ class Incident:
29
+ """
30
+ Attributes:
31
+ incident_id (UUID | Unset):
32
+ title (str | Unset):
33
+ status (IncidentStatus | Unset):
34
+ severity (IncidentSeverity | Unset):
35
+ signal_family (str | Unset):
36
+ created_at (datetime.datetime | Unset):
37
+ """
38
+
39
+ incident_id: UUID | Unset = UNSET
40
+ title: str | Unset = UNSET
41
+ status: IncidentStatus | Unset = UNSET
42
+ severity: IncidentSeverity | Unset = UNSET
43
+ signal_family: str | Unset = UNSET
44
+ created_at: datetime.datetime | Unset = UNSET
45
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
46
+
47
+
48
+
49
+
50
+
51
+ def to_dict(self) -> dict[str, Any]:
52
+ incident_id: str | Unset = UNSET
53
+ if not isinstance(self.incident_id, Unset):
54
+ incident_id = str(self.incident_id)
55
+
56
+ title = self.title
57
+
58
+ status: str | Unset = UNSET
59
+ if not isinstance(self.status, Unset):
60
+ status = self.status.value
61
+
62
+
63
+ severity: str | Unset = UNSET
64
+ if not isinstance(self.severity, Unset):
65
+ severity = self.severity.value
66
+
67
+
68
+ signal_family = self.signal_family
69
+
70
+ created_at: str | Unset = UNSET
71
+ if not isinstance(self.created_at, Unset):
72
+ created_at = self.created_at.isoformat()
73
+
74
+
75
+ field_dict: dict[str, Any] = {}
76
+ field_dict.update(self.additional_properties)
77
+ field_dict.update({
78
+ })
79
+ if incident_id is not UNSET:
80
+ field_dict["incident_id"] = incident_id
81
+ if title is not UNSET:
82
+ field_dict["title"] = title
83
+ if status is not UNSET:
84
+ field_dict["status"] = status
85
+ if severity is not UNSET:
86
+ field_dict["severity"] = severity
87
+ if signal_family is not UNSET:
88
+ field_dict["signal_family"] = signal_family
89
+ if created_at is not UNSET:
90
+ field_dict["created_at"] = created_at
91
+
92
+ return field_dict
93
+
94
+
95
+
96
+ @classmethod
97
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
98
+ d = dict(src_dict)
99
+ _incident_id = d.pop("incident_id", UNSET)
100
+ incident_id: UUID | Unset
101
+ if isinstance(_incident_id, Unset):
102
+ incident_id = UNSET
103
+ else:
104
+ incident_id = UUID(_incident_id)
105
+
106
+
107
+
108
+
109
+ title = d.pop("title", UNSET)
110
+
111
+ _status = d.pop("status", UNSET)
112
+ status: IncidentStatus | Unset
113
+ if isinstance(_status, Unset):
114
+ status = UNSET
115
+ else:
116
+ status = IncidentStatus(_status)
117
+
118
+
119
+
120
+
121
+ _severity = d.pop("severity", UNSET)
122
+ severity: IncidentSeverity | Unset
123
+ if isinstance(_severity, Unset):
124
+ severity = UNSET
125
+ else:
126
+ severity = IncidentSeverity(_severity)
127
+
128
+
129
+
130
+
131
+ signal_family = d.pop("signal_family", UNSET)
132
+
133
+ _created_at = d.pop("created_at", UNSET)
134
+ created_at: datetime.datetime | Unset
135
+ if isinstance(_created_at, Unset):
136
+ created_at = UNSET
137
+ else:
138
+ created_at = datetime.datetime.fromisoformat(_created_at)
139
+
140
+
141
+
142
+
143
+ incident = cls(
144
+ incident_id=incident_id,
145
+ title=title,
146
+ status=status,
147
+ severity=severity,
148
+ signal_family=signal_family,
149
+ created_at=created_at,
150
+ )
151
+
152
+
153
+ incident.additional_properties = d
154
+ return incident
155
+
156
+ @property
157
+ def additional_keys(self) -> list[str]:
158
+ return list(self.additional_properties.keys())
159
+
160
+ def __getitem__(self, key: str) -> Any:
161
+ return self.additional_properties[key]
162
+
163
+ def __setitem__(self, key: str, value: Any) -> None:
164
+ self.additional_properties[key] = value
165
+
166
+ def __delitem__(self, key: str) -> None:
167
+ del self.additional_properties[key]
168
+
169
+ def __contains__(self, key: str) -> bool:
170
+ return key in self.additional_properties
@@ -0,0 +1,10 @@
1
+ from enum import StrEnum
2
+
3
+ class IncidentSeverity(StrEnum):
4
+ CRITICAL = "critical"
5
+ HIGH = "high"
6
+ LOW = "low"
7
+ MEDIUM = "medium"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,10 @@
1
+ from enum import StrEnum
2
+
3
+ class IncidentStatus(StrEnum):
4
+ ACKNOWLEDGED = "acknowledged"
5
+ CLOSED = "closed"
6
+ MITIGATED = "mitigated"
7
+ OPEN = "open"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,152 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..models.incident_webhook_event_type import IncidentWebhookEventType
12
+ from ..types import UNSET, Unset
13
+ from typing import cast
14
+ import datetime
15
+
16
+ if TYPE_CHECKING:
17
+ from ..models.incident_webhook_event_data import IncidentWebhookEventData
18
+
19
+
20
+
21
+
22
+
23
+ T = TypeVar("T", bound="IncidentWebhookEvent")
24
+
25
+
26
+
27
+ @_attrs_define
28
+ class IncidentWebhookEvent:
29
+ """
30
+ Attributes:
31
+ id (str | Unset):
32
+ type_ (IncidentWebhookEventType | Unset):
33
+ api_version (str | Unset):
34
+ created_at (datetime.datetime | Unset):
35
+ data (IncidentWebhookEventData | Unset):
36
+ """
37
+
38
+ id: str | Unset = UNSET
39
+ type_: IncidentWebhookEventType | Unset = UNSET
40
+ api_version: str | Unset = UNSET
41
+ created_at: datetime.datetime | Unset = UNSET
42
+ data: IncidentWebhookEventData | Unset = UNSET
43
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
+
45
+
46
+
47
+
48
+
49
+ def to_dict(self) -> dict[str, Any]:
50
+ from ..models.incident_webhook_event_data import IncidentWebhookEventData # noqa: PLC0415
51
+ id = self.id
52
+
53
+ type_: str | Unset = UNSET
54
+ if not isinstance(self.type_, Unset):
55
+ type_ = self.type_.value
56
+
57
+
58
+ api_version = self.api_version
59
+
60
+ created_at: str | Unset = UNSET
61
+ if not isinstance(self.created_at, Unset):
62
+ created_at = self.created_at.isoformat()
63
+
64
+ data: dict[str, Any] | Unset = UNSET
65
+ if not isinstance(self.data, Unset):
66
+ data = self.data.to_dict()
67
+
68
+
69
+ field_dict: dict[str, Any] = {}
70
+ field_dict.update(self.additional_properties)
71
+ field_dict.update({
72
+ })
73
+ if id is not UNSET:
74
+ field_dict["id"] = id
75
+ if type_ is not UNSET:
76
+ field_dict["type"] = type_
77
+ if api_version is not UNSET:
78
+ field_dict["api_version"] = api_version
79
+ if created_at is not UNSET:
80
+ field_dict["created_at"] = created_at
81
+ if data is not UNSET:
82
+ field_dict["data"] = data
83
+
84
+ return field_dict
85
+
86
+
87
+
88
+ @classmethod
89
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
90
+ from ..models.incident_webhook_event_data import IncidentWebhookEventData # noqa: PLC0415
91
+ d = dict(src_dict)
92
+ id = d.pop("id", UNSET)
93
+
94
+ _type_ = d.pop("type", UNSET)
95
+ type_: IncidentWebhookEventType | Unset
96
+ if isinstance(_type_, Unset):
97
+ type_ = UNSET
98
+ else:
99
+ type_ = IncidentWebhookEventType(_type_)
100
+
101
+
102
+
103
+
104
+ api_version = d.pop("api_version", UNSET)
105
+
106
+ _created_at = d.pop("created_at", UNSET)
107
+ created_at: datetime.datetime | Unset
108
+ if isinstance(_created_at, Unset):
109
+ created_at = UNSET
110
+ else:
111
+ created_at = datetime.datetime.fromisoformat(_created_at)
112
+
113
+
114
+
115
+
116
+ _data = d.pop("data", UNSET)
117
+ data: IncidentWebhookEventData | Unset
118
+ if isinstance(_data, Unset):
119
+ data = UNSET
120
+ else:
121
+ data = IncidentWebhookEventData.from_dict(_data)
122
+
123
+
124
+
125
+
126
+ incident_webhook_event = cls(
127
+ id=id,
128
+ type_=type_,
129
+ api_version=api_version,
130
+ created_at=created_at,
131
+ data=data,
132
+ )
133
+
134
+
135
+ incident_webhook_event.additional_properties = d
136
+ return incident_webhook_event
137
+
138
+ @property
139
+ def additional_keys(self) -> list[str]:
140
+ return list(self.additional_properties.keys())
141
+
142
+ def __getitem__(self, key: str) -> Any:
143
+ return self.additional_properties[key]
144
+
145
+ def __setitem__(self, key: str, value: Any) -> None:
146
+ self.additional_properties[key] = value
147
+
148
+ def __delitem__(self, key: str) -> None:
149
+ del self.additional_properties[key]
150
+
151
+ def __contains__(self, key: str) -> bool:
152
+ return key in self.additional_properties
@@ -0,0 +1,115 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+
14
+ if TYPE_CHECKING:
15
+ from ..models.incident_webhook_event_data_previous import IncidentWebhookEventDataPrevious
16
+ from ..models.webhook_incident import WebhookIncident
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="IncidentWebhookEventData")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class IncidentWebhookEventData:
28
+ """
29
+ Attributes:
30
+ incident (WebhookIncident | Unset):
31
+ previous (IncidentWebhookEventDataPrevious | Unset): Only on incident.updated.
32
+ """
33
+
34
+ incident: WebhookIncident | Unset = UNSET
35
+ previous: IncidentWebhookEventDataPrevious | Unset = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+
39
+
40
+
41
+
42
+ def to_dict(self) -> dict[str, Any]:
43
+ from ..models.incident_webhook_event_data_previous import IncidentWebhookEventDataPrevious # noqa: PLC0415
44
+ from ..models.webhook_incident import WebhookIncident # noqa: PLC0415
45
+ incident: dict[str, Any] | Unset = UNSET
46
+ if not isinstance(self.incident, Unset):
47
+ incident = self.incident.to_dict()
48
+
49
+ previous: dict[str, Any] | Unset = UNSET
50
+ if not isinstance(self.previous, Unset):
51
+ previous = self.previous.to_dict()
52
+
53
+
54
+ field_dict: dict[str, Any] = {}
55
+ field_dict.update(self.additional_properties)
56
+ field_dict.update({
57
+ })
58
+ if incident is not UNSET:
59
+ field_dict["incident"] = incident
60
+ if previous is not UNSET:
61
+ field_dict["previous"] = previous
62
+
63
+ return field_dict
64
+
65
+
66
+
67
+ @classmethod
68
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
69
+ from ..models.incident_webhook_event_data_previous import IncidentWebhookEventDataPrevious # noqa: PLC0415
70
+ from ..models.webhook_incident import WebhookIncident # noqa: PLC0415
71
+ d = dict(src_dict)
72
+ _incident = d.pop("incident", UNSET)
73
+ incident: WebhookIncident | Unset
74
+ if isinstance(_incident, Unset):
75
+ incident = UNSET
76
+ else:
77
+ incident = WebhookIncident.from_dict(_incident)
78
+
79
+
80
+
81
+
82
+ _previous = d.pop("previous", UNSET)
83
+ previous: IncidentWebhookEventDataPrevious | Unset
84
+ if isinstance(_previous, Unset):
85
+ previous = UNSET
86
+ else:
87
+ previous = IncidentWebhookEventDataPrevious.from_dict(_previous)
88
+
89
+
90
+
91
+
92
+ incident_webhook_event_data = cls(
93
+ incident=incident,
94
+ previous=previous,
95
+ )
96
+
97
+
98
+ incident_webhook_event_data.additional_properties = d
99
+ return incident_webhook_event_data
100
+
101
+ @property
102
+ def additional_keys(self) -> list[str]:
103
+ return list(self.additional_properties.keys())
104
+
105
+ def __getitem__(self, key: str) -> Any:
106
+ return self.additional_properties[key]
107
+
108
+ def __setitem__(self, key: str, value: Any) -> None:
109
+ self.additional_properties[key] = value
110
+
111
+ def __delitem__(self, key: str) -> None:
112
+ del self.additional_properties[key]
113
+
114
+ def __contains__(self, key: str) -> bool:
115
+ return key in self.additional_properties
@@ -0,0 +1,88 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+
13
+
14
+
15
+
16
+
17
+
18
+ T = TypeVar("T", bound="IncidentWebhookEventDataPrevious")
19
+
20
+
21
+
22
+ @_attrs_define
23
+ class IncidentWebhookEventDataPrevious:
24
+ """ Only on incident.updated.
25
+
26
+ Attributes:
27
+ status (str | Unset):
28
+ severity (str | Unset):
29
+ """
30
+
31
+ status: str | Unset = UNSET
32
+ severity: str | Unset = UNSET
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+
36
+
37
+
38
+
39
+ def to_dict(self) -> dict[str, Any]:
40
+ status = self.status
41
+
42
+ severity = self.severity
43
+
44
+
45
+ field_dict: dict[str, Any] = {}
46
+ field_dict.update(self.additional_properties)
47
+ field_dict.update({
48
+ })
49
+ if status is not UNSET:
50
+ field_dict["status"] = status
51
+ if severity is not UNSET:
52
+ field_dict["severity"] = severity
53
+
54
+ return field_dict
55
+
56
+
57
+
58
+ @classmethod
59
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
60
+ d = dict(src_dict)
61
+ status = d.pop("status", UNSET)
62
+
63
+ severity = d.pop("severity", UNSET)
64
+
65
+ incident_webhook_event_data_previous = cls(
66
+ status=status,
67
+ severity=severity,
68
+ )
69
+
70
+
71
+ incident_webhook_event_data_previous.additional_properties = d
72
+ return incident_webhook_event_data_previous
73
+
74
+ @property
75
+ def additional_keys(self) -> list[str]:
76
+ return list(self.additional_properties.keys())
77
+
78
+ def __getitem__(self, key: str) -> Any:
79
+ return self.additional_properties[key]
80
+
81
+ def __setitem__(self, key: str, value: Any) -> None:
82
+ self.additional_properties[key] = value
83
+
84
+ def __delitem__(self, key: str) -> None:
85
+ del self.additional_properties[key]
86
+
87
+ def __contains__(self, key: str) -> bool:
88
+ return key in self.additional_properties
@@ -0,0 +1,9 @@
1
+ from enum import StrEnum
2
+
3
+ class IncidentWebhookEventType(StrEnum):
4
+ INCIDENT_CREATED = "incident.created"
5
+ INCIDENT_UPDATED = "incident.updated"
6
+ PHISHING_DETECTED = "phishing.detected"
7
+
8
+ def __str__(self) -> str:
9
+ return str(self.value)
@@ -0,0 +1,122 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import UNSET, Unset
12
+ from typing import cast
13
+ import datetime
14
+
15
+ if TYPE_CHECKING:
16
+ from ..models.infostealer_domain_summary_snapshot import InfostealerDomainSummarySnapshot
17
+
18
+
19
+
20
+
21
+
22
+ T = TypeVar("T", bound="InfostealerDomainSummary")
23
+
24
+
25
+
26
+ @_attrs_define
27
+ class InfostealerDomainSummary:
28
+ """
29
+ Attributes:
30
+ domain (str | Unset):
31
+ refreshed_at (datetime.datetime | Unset):
32
+ snapshot (InfostealerDomainSummarySnapshot | Unset):
33
+ """
34
+
35
+ domain: str | Unset = UNSET
36
+ refreshed_at: datetime.datetime | Unset = UNSET
37
+ snapshot: InfostealerDomainSummarySnapshot | Unset = UNSET
38
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
+
40
+
41
+
42
+
43
+
44
+ def to_dict(self) -> dict[str, Any]:
45
+ from ..models.infostealer_domain_summary_snapshot import InfostealerDomainSummarySnapshot # noqa: PLC0415
46
+ domain = self.domain
47
+
48
+ refreshed_at: str | Unset = UNSET
49
+ if not isinstance(self.refreshed_at, Unset):
50
+ refreshed_at = self.refreshed_at.isoformat()
51
+
52
+ snapshot: dict[str, Any] | Unset = UNSET
53
+ if not isinstance(self.snapshot, Unset):
54
+ snapshot = self.snapshot.to_dict()
55
+
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update({
60
+ })
61
+ if domain is not UNSET:
62
+ field_dict["domain"] = domain
63
+ if refreshed_at is not UNSET:
64
+ field_dict["refreshed_at"] = refreshed_at
65
+ if snapshot is not UNSET:
66
+ field_dict["snapshot"] = snapshot
67
+
68
+ return field_dict
69
+
70
+
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ from ..models.infostealer_domain_summary_snapshot import InfostealerDomainSummarySnapshot # noqa: PLC0415
75
+ d = dict(src_dict)
76
+ domain = d.pop("domain", UNSET)
77
+
78
+ _refreshed_at = d.pop("refreshed_at", UNSET)
79
+ refreshed_at: datetime.datetime | Unset
80
+ if isinstance(_refreshed_at, Unset):
81
+ refreshed_at = UNSET
82
+ else:
83
+ refreshed_at = datetime.datetime.fromisoformat(_refreshed_at)
84
+
85
+
86
+
87
+
88
+ _snapshot = d.pop("snapshot", UNSET)
89
+ snapshot: InfostealerDomainSummarySnapshot | Unset
90
+ if isinstance(_snapshot, Unset):
91
+ snapshot = UNSET
92
+ else:
93
+ snapshot = InfostealerDomainSummarySnapshot.from_dict(_snapshot)
94
+
95
+
96
+
97
+
98
+ infostealer_domain_summary = cls(
99
+ domain=domain,
100
+ refreshed_at=refreshed_at,
101
+ snapshot=snapshot,
102
+ )
103
+
104
+
105
+ infostealer_domain_summary.additional_properties = d
106
+ return infostealer_domain_summary
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties