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.
- kalir/__init__.py +11 -0
- kalir/api/__init__.py +1 -0
- kalir/api/assets/__init__.py +1 -0
- kalir/api/assets/create_asset.py +193 -0
- kalir/api/assets/delete_asset.py +182 -0
- kalir/api/assets/get_asset.py +186 -0
- kalir/api/assets/list_assets.py +165 -0
- kalir/api/assets/update_asset.py +206 -0
- kalir/api/events/__init__.py +1 -0
- kalir/api/events/get_event.py +194 -0
- kalir/api/events/ingest_event.py +215 -0
- kalir/api/events/list_events.py +259 -0
- kalir/api/exposures/__init__.py +1 -0
- kalir/api/exposures/count_exposures.py +165 -0
- kalir/api/exposures/get_infostealer_summary.py +181 -0
- kalir/api/exposures/list_exposures.py +225 -0
- kalir/api/incidents/__init__.py +1 -0
- kalir/api/incidents/get_incident.py +194 -0
- kalir/api/incidents/list_incidents.py +265 -0
- kalir/api/incidents/update_incident_status.py +207 -0
- kalir/api/intel/__init__.py +1 -0
- kalir/api/intel/get_ransomware_stats.py +165 -0
- kalir/api/intel/list_ransomware_victims.py +165 -0
- kalir/api/mentions/__init__.py +1 -0
- kalir/api/mentions/list_mentions.py +283 -0
- kalir/api/overview/__init__.py +1 -0
- kalir/api/overview/get_overview.py +184 -0
- kalir/api/phishing/__init__.py +1 -0
- kalir/api/phishing/list_phishing.py +245 -0
- kalir/api/reports/__init__.py +1 -0
- kalir/api/reports/create_report.py +193 -0
- kalir/api/reports/download_report.py +186 -0
- kalir/api/reports/list_reports.py +165 -0
- kalir/api/rules/__init__.py +1 -0
- kalir/api/rules/create_rule.py +193 -0
- kalir/api/rules/delete_rule.py +183 -0
- kalir/api/rules/get_rule.py +187 -0
- kalir/api/rules/list_rules.py +165 -0
- kalir/api/rules/replace_rule.py +207 -0
- kalir/api/takedowns/__init__.py +1 -0
- kalir/api/takedowns/count_takedowns.py +165 -0
- kalir/api/takedowns/create_takedown.py +193 -0
- kalir/api/takedowns/delete_takedown.py +183 -0
- kalir/api/takedowns/get_takedown.py +187 -0
- kalir/api/takedowns/list_takedowns.py +165 -0
- kalir/api/takedowns/replace_takedown.py +210 -0
- kalir/api/takedowns/update_takedown.py +210 -0
- kalir/api/webhooks/__init__.py +1 -0
- kalir/api/webhooks/create_webhook.py +222 -0
- kalir/api/webhooks/delete_webhook.py +190 -0
- kalir/api/webhooks/get_webhook.py +194 -0
- kalir/api/webhooks/get_webhook_delivery.py +194 -0
- kalir/api/webhooks/list_webhook_deliveries.py +239 -0
- kalir/api/webhooks/list_webhook_event_types.py +165 -0
- kalir/api/webhooks/list_webhooks.py +172 -0
- kalir/api/webhooks/retry_webhook_delivery.py +190 -0
- kalir/api/webhooks/rotate_webhook_secret.py +202 -0
- kalir/api/webhooks/send_webhook_test.py +202 -0
- kalir/api/webhooks/update_webhook.py +229 -0
- kalir/client.py +271 -0
- kalir/errors.py +14 -0
- kalir/models/__init__.py +195 -0
- kalir/models/asset.py +162 -0
- kalir/models/asset_create.py +122 -0
- kalir/models/asset_create_asset_type.py +14 -0
- kalir/models/asset_create_metadata.py +64 -0
- kalir/models/count_exposures_response_200.py +78 -0
- kalir/models/count_takedowns_response_200.py +96 -0
- kalir/models/create_report_body.py +96 -0
- kalir/models/create_report_body_type.py +10 -0
- kalir/models/create_webhook_response_201.py +111 -0
- kalir/models/error.py +84 -0
- kalir/models/error_error.py +106 -0
- kalir/models/error_error_type.py +15 -0
- kalir/models/event.py +151 -0
- kalir/models/event_asset.py +87 -0
- kalir/models/event_ingest.py +146 -0
- kalir/models/event_ingest_asset.py +87 -0
- kalir/models/event_ingest_evidence.py +64 -0
- kalir/models/event_ingest_source.py +87 -0
- kalir/models/exposure.py +137 -0
- kalir/models/exposure_webhook_event.py +152 -0
- kalir/models/exposure_webhook_event_data.py +115 -0
- kalir/models/exposure_webhook_event_data_exposure.py +149 -0
- kalir/models/exposure_webhook_event_data_infection.py +136 -0
- kalir/models/exposure_webhook_event_type.py +8 -0
- kalir/models/get_incident_response_200.py +174 -0
- kalir/models/get_infostealer_summary_response_200.py +100 -0
- kalir/models/get_ransomware_stats_response_200.py +156 -0
- kalir/models/get_ransomware_stats_response_200_top_countries_7d_item.py +64 -0
- kalir/models/get_ransomware_stats_response_200_top_groups_7d_item.py +64 -0
- kalir/models/incident.py +170 -0
- kalir/models/incident_severity.py +10 -0
- kalir/models/incident_status.py +10 -0
- kalir/models/incident_webhook_event.py +152 -0
- kalir/models/incident_webhook_event_data.py +115 -0
- kalir/models/incident_webhook_event_data_previous.py +88 -0
- kalir/models/incident_webhook_event_type.py +9 -0
- kalir/models/infostealer_domain_summary.py +122 -0
- kalir/models/infostealer_domain_summary_snapshot.py +201 -0
- kalir/models/infostealer_domain_summary_snapshot_top_employee_urls_item.py +87 -0
- kalir/models/infostealer_domain_summary_snapshot_top_families_item.py +87 -0
- kalir/models/list_assets_response_200.py +100 -0
- kalir/models/list_events_response_200.py +109 -0
- kalir/models/list_exposures_response_200.py +127 -0
- kalir/models/list_incidents_bucket.py +10 -0
- kalir/models/list_incidents_response_200.py +149 -0
- kalir/models/list_incidents_response_200_counts.py +106 -0
- kalir/models/list_incidents_status.py +12 -0
- kalir/models/list_mentions_response_200.py +122 -0
- kalir/models/list_mentions_source.py +8 -0
- kalir/models/list_phishing_response_200.py +122 -0
- kalir/models/list_phishing_verdict.py +11 -0
- kalir/models/list_ransomware_victims_response_200.py +109 -0
- kalir/models/list_ransomware_victims_response_200_victims_item.py +64 -0
- kalir/models/list_reports_response_200.py +109 -0
- kalir/models/list_rules_response_200.py +100 -0
- kalir/models/list_takedowns_response_200.py +109 -0
- kalir/models/list_webhook_deliveries_response_200.py +122 -0
- kalir/models/list_webhook_event_types_response_200.py +100 -0
- kalir/models/list_webhook_event_types_response_200_data_item.py +87 -0
- kalir/models/list_webhooks_response_200.py +100 -0
- kalir/models/mention.py +194 -0
- kalir/models/mention_source.py +8 -0
- kalir/models/overview.py +231 -0
- kalir/models/overview_assets.py +96 -0
- kalir/models/overview_exposures.py +105 -0
- kalir/models/overview_incidents.py +114 -0
- kalir/models/overview_phishing.py +87 -0
- kalir/models/overview_risk_level.py +10 -0
- kalir/models/overview_takedowns.py +87 -0
- kalir/models/pagination.py +105 -0
- kalir/models/phishing_domain.py +186 -0
- kalir/models/phishing_domain_verdict.py +11 -0
- kalir/models/report.py +182 -0
- kalir/models/report_parameters.py +181 -0
- kalir/models/report_parameters_date_range.py +11 -0
- kalir/models/report_parameters_language.py +8 -0
- kalir/models/report_parameters_sections_item.py +15 -0
- kalir/models/report_status.py +10 -0
- kalir/models/rotate_webhook_secret_response_200.py +87 -0
- kalir/models/rule.py +174 -0
- kalir/models/rule_input.py +134 -0
- kalir/models/rule_input_actions_item.py +64 -0
- kalir/models/takedown.py +163 -0
- kalir/models/takedown_create.py +113 -0
- kalir/models/takedown_update.py +96 -0
- kalir/models/update_incident_status_body.py +90 -0
- kalir/models/update_incident_status_body_status.py +10 -0
- kalir/models/webhook_delivery.py +274 -0
- kalir/models/webhook_delivery_payload.py +64 -0
- kalir/models/webhook_delivery_status.py +9 -0
- kalir/models/webhook_endpoint.py +216 -0
- kalir/models/webhook_endpoint_input.py +124 -0
- kalir/models/webhook_endpoint_input_event_types_item.py +11 -0
- kalir/models/webhook_incident.py +232 -0
- kalir/models/webhook_incident_severity.py +10 -0
- kalir/py.typed +1 -0
- kalir/types.py +53 -0
- kalir/webhooks.py +63 -0
- kalir_python-0.1.0.dist-info/METADATA +76 -0
- kalir_python-0.1.0.dist-info/RECORD +163 -0
- kalir_python-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,100 @@
|
|
|
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.webhook_endpoint import WebhookEndpoint
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="ListWebhooksResponse200")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class ListWebhooksResponse200:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
data (list[WebhookEndpoint] | Unset):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
data: list[WebhookEndpoint] | 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
|
+
from ..models.webhook_endpoint import WebhookEndpoint # noqa: PLC0415
|
|
41
|
+
data: list[dict[str, Any]] | Unset = UNSET
|
|
42
|
+
if not isinstance(self.data, Unset):
|
|
43
|
+
data = []
|
|
44
|
+
for data_item_data in self.data:
|
|
45
|
+
data_item = data_item_data.to_dict()
|
|
46
|
+
data.append(data_item)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update({
|
|
54
|
+
})
|
|
55
|
+
if data is not UNSET:
|
|
56
|
+
field_dict["data"] = data
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
64
|
+
from ..models.webhook_endpoint import WebhookEndpoint # noqa: PLC0415
|
|
65
|
+
d = dict(src_dict)
|
|
66
|
+
_data = d.pop("data", UNSET)
|
|
67
|
+
data: list[WebhookEndpoint] | Unset = UNSET
|
|
68
|
+
if _data is not UNSET:
|
|
69
|
+
data = []
|
|
70
|
+
for data_item_data in _data:
|
|
71
|
+
data_item = WebhookEndpoint.from_dict(data_item_data)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
data.append(data_item)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
list_webhooks_response_200 = cls(
|
|
79
|
+
data=data,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
list_webhooks_response_200.additional_properties = d
|
|
84
|
+
return list_webhooks_response_200
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def additional_keys(self) -> list[str]:
|
|
88
|
+
return list(self.additional_properties.keys())
|
|
89
|
+
|
|
90
|
+
def __getitem__(self, key: str) -> Any:
|
|
91
|
+
return self.additional_properties[key]
|
|
92
|
+
|
|
93
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
94
|
+
self.additional_properties[key] = value
|
|
95
|
+
|
|
96
|
+
def __delitem__(self, key: str) -> None:
|
|
97
|
+
del self.additional_properties[key]
|
|
98
|
+
|
|
99
|
+
def __contains__(self, key: str) -> bool:
|
|
100
|
+
return key in self.additional_properties
|
kalir/models/mention.py
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
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.mention_source import MentionSource
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
from typing import cast
|
|
14
|
+
from uuid import UUID
|
|
15
|
+
import datetime
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
T = TypeVar("T", bound="Mention")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_attrs_define
|
|
27
|
+
class Mention:
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (UUID | Unset):
|
|
31
|
+
source (MentionSource | Unset):
|
|
32
|
+
source_name (str | Unset):
|
|
33
|
+
title (str | Unset):
|
|
34
|
+
url (str | Unset):
|
|
35
|
+
matched_term (str | Unset):
|
|
36
|
+
context (str | Unset): Snippet around the match.
|
|
37
|
+
intel_value (str | Unset):
|
|
38
|
+
screenshot_url (str | Unset):
|
|
39
|
+
detected_at (datetime.datetime | Unset):
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
id: UUID | Unset = UNSET
|
|
43
|
+
source: MentionSource | Unset = UNSET
|
|
44
|
+
source_name: str | Unset = UNSET
|
|
45
|
+
title: str | Unset = UNSET
|
|
46
|
+
url: str | Unset = UNSET
|
|
47
|
+
matched_term: str | Unset = UNSET
|
|
48
|
+
context: str | Unset = UNSET
|
|
49
|
+
intel_value: str | Unset = UNSET
|
|
50
|
+
screenshot_url: str | Unset = UNSET
|
|
51
|
+
detected_at: datetime.datetime | Unset = UNSET
|
|
52
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> dict[str, Any]:
|
|
59
|
+
id: str | Unset = UNSET
|
|
60
|
+
if not isinstance(self.id, Unset):
|
|
61
|
+
id = str(self.id)
|
|
62
|
+
|
|
63
|
+
source: str | Unset = UNSET
|
|
64
|
+
if not isinstance(self.source, Unset):
|
|
65
|
+
source = self.source.value
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
source_name = self.source_name
|
|
69
|
+
|
|
70
|
+
title = self.title
|
|
71
|
+
|
|
72
|
+
url = self.url
|
|
73
|
+
|
|
74
|
+
matched_term = self.matched_term
|
|
75
|
+
|
|
76
|
+
context = self.context
|
|
77
|
+
|
|
78
|
+
intel_value = self.intel_value
|
|
79
|
+
|
|
80
|
+
screenshot_url = self.screenshot_url
|
|
81
|
+
|
|
82
|
+
detected_at: str | Unset = UNSET
|
|
83
|
+
if not isinstance(self.detected_at, Unset):
|
|
84
|
+
detected_at = self.detected_at.isoformat()
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
field_dict: dict[str, Any] = {}
|
|
88
|
+
field_dict.update(self.additional_properties)
|
|
89
|
+
field_dict.update({
|
|
90
|
+
})
|
|
91
|
+
if id is not UNSET:
|
|
92
|
+
field_dict["id"] = id
|
|
93
|
+
if source is not UNSET:
|
|
94
|
+
field_dict["source"] = source
|
|
95
|
+
if source_name is not UNSET:
|
|
96
|
+
field_dict["source_name"] = source_name
|
|
97
|
+
if title is not UNSET:
|
|
98
|
+
field_dict["title"] = title
|
|
99
|
+
if url is not UNSET:
|
|
100
|
+
field_dict["url"] = url
|
|
101
|
+
if matched_term is not UNSET:
|
|
102
|
+
field_dict["matched_term"] = matched_term
|
|
103
|
+
if context is not UNSET:
|
|
104
|
+
field_dict["context"] = context
|
|
105
|
+
if intel_value is not UNSET:
|
|
106
|
+
field_dict["intel_value"] = intel_value
|
|
107
|
+
if screenshot_url is not UNSET:
|
|
108
|
+
field_dict["screenshot_url"] = screenshot_url
|
|
109
|
+
if detected_at is not UNSET:
|
|
110
|
+
field_dict["detected_at"] = detected_at
|
|
111
|
+
|
|
112
|
+
return field_dict
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
118
|
+
d = dict(src_dict)
|
|
119
|
+
_id = d.pop("id", UNSET)
|
|
120
|
+
id: UUID | Unset
|
|
121
|
+
if isinstance(_id, Unset):
|
|
122
|
+
id = UNSET
|
|
123
|
+
else:
|
|
124
|
+
id = UUID(_id)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
_source = d.pop("source", UNSET)
|
|
130
|
+
source: MentionSource | Unset
|
|
131
|
+
if isinstance(_source, Unset):
|
|
132
|
+
source = UNSET
|
|
133
|
+
else:
|
|
134
|
+
source = MentionSource(_source)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
source_name = d.pop("source_name", UNSET)
|
|
140
|
+
|
|
141
|
+
title = d.pop("title", UNSET)
|
|
142
|
+
|
|
143
|
+
url = d.pop("url", UNSET)
|
|
144
|
+
|
|
145
|
+
matched_term = d.pop("matched_term", UNSET)
|
|
146
|
+
|
|
147
|
+
context = d.pop("context", UNSET)
|
|
148
|
+
|
|
149
|
+
intel_value = d.pop("intel_value", UNSET)
|
|
150
|
+
|
|
151
|
+
screenshot_url = d.pop("screenshot_url", UNSET)
|
|
152
|
+
|
|
153
|
+
_detected_at = d.pop("detected_at", UNSET)
|
|
154
|
+
detected_at: datetime.datetime | Unset
|
|
155
|
+
if isinstance(_detected_at, Unset):
|
|
156
|
+
detected_at = UNSET
|
|
157
|
+
else:
|
|
158
|
+
detected_at = datetime.datetime.fromisoformat(_detected_at)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
mention = cls(
|
|
164
|
+
id=id,
|
|
165
|
+
source=source,
|
|
166
|
+
source_name=source_name,
|
|
167
|
+
title=title,
|
|
168
|
+
url=url,
|
|
169
|
+
matched_term=matched_term,
|
|
170
|
+
context=context,
|
|
171
|
+
intel_value=intel_value,
|
|
172
|
+
screenshot_url=screenshot_url,
|
|
173
|
+
detected_at=detected_at,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
mention.additional_properties = d
|
|
178
|
+
return mention
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def additional_keys(self) -> list[str]:
|
|
182
|
+
return list(self.additional_properties.keys())
|
|
183
|
+
|
|
184
|
+
def __getitem__(self, key: str) -> Any:
|
|
185
|
+
return self.additional_properties[key]
|
|
186
|
+
|
|
187
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
188
|
+
self.additional_properties[key] = value
|
|
189
|
+
|
|
190
|
+
def __delitem__(self, key: str) -> None:
|
|
191
|
+
del self.additional_properties[key]
|
|
192
|
+
|
|
193
|
+
def __contains__(self, key: str) -> bool:
|
|
194
|
+
return key in self.additional_properties
|
kalir/models/overview.py
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
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.overview_risk_level import OverviewRiskLevel
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
from typing import cast
|
|
14
|
+
import datetime
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from ..models.overview_assets import OverviewAssets
|
|
18
|
+
from ..models.overview_exposures import OverviewExposures
|
|
19
|
+
from ..models.overview_incidents import OverviewIncidents
|
|
20
|
+
from ..models.overview_phishing import OverviewPhishing
|
|
21
|
+
from ..models.overview_takedowns import OverviewTakedowns
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
T = TypeVar("T", bound="Overview")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@_attrs_define
|
|
32
|
+
class Overview:
|
|
33
|
+
"""
|
|
34
|
+
Attributes:
|
|
35
|
+
risk_score (int | Unset):
|
|
36
|
+
risk_level (OverviewRiskLevel | Unset):
|
|
37
|
+
incidents (OverviewIncidents | Unset):
|
|
38
|
+
exposures (OverviewExposures | Unset):
|
|
39
|
+
phishing (OverviewPhishing | Unset):
|
|
40
|
+
takedowns (OverviewTakedowns | Unset):
|
|
41
|
+
assets (OverviewAssets | Unset):
|
|
42
|
+
generated_at (datetime.datetime | Unset):
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
risk_score: int | Unset = UNSET
|
|
46
|
+
risk_level: OverviewRiskLevel | Unset = UNSET
|
|
47
|
+
incidents: OverviewIncidents | Unset = UNSET
|
|
48
|
+
exposures: OverviewExposures | Unset = UNSET
|
|
49
|
+
phishing: OverviewPhishing | Unset = UNSET
|
|
50
|
+
takedowns: OverviewTakedowns | Unset = UNSET
|
|
51
|
+
assets: OverviewAssets | Unset = UNSET
|
|
52
|
+
generated_at: datetime.datetime | Unset = UNSET
|
|
53
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> dict[str, Any]:
|
|
60
|
+
from ..models.overview_assets import OverviewAssets # noqa: PLC0415
|
|
61
|
+
from ..models.overview_exposures import OverviewExposures # noqa: PLC0415
|
|
62
|
+
from ..models.overview_incidents import OverviewIncidents # noqa: PLC0415
|
|
63
|
+
from ..models.overview_phishing import OverviewPhishing # noqa: PLC0415
|
|
64
|
+
from ..models.overview_takedowns import OverviewTakedowns # noqa: PLC0415
|
|
65
|
+
risk_score = self.risk_score
|
|
66
|
+
|
|
67
|
+
risk_level: str | Unset = UNSET
|
|
68
|
+
if not isinstance(self.risk_level, Unset):
|
|
69
|
+
risk_level = self.risk_level.value
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
incidents: dict[str, Any] | Unset = UNSET
|
|
73
|
+
if not isinstance(self.incidents, Unset):
|
|
74
|
+
incidents = self.incidents.to_dict()
|
|
75
|
+
|
|
76
|
+
exposures: dict[str, Any] | Unset = UNSET
|
|
77
|
+
if not isinstance(self.exposures, Unset):
|
|
78
|
+
exposures = self.exposures.to_dict()
|
|
79
|
+
|
|
80
|
+
phishing: dict[str, Any] | Unset = UNSET
|
|
81
|
+
if not isinstance(self.phishing, Unset):
|
|
82
|
+
phishing = self.phishing.to_dict()
|
|
83
|
+
|
|
84
|
+
takedowns: dict[str, Any] | Unset = UNSET
|
|
85
|
+
if not isinstance(self.takedowns, Unset):
|
|
86
|
+
takedowns = self.takedowns.to_dict()
|
|
87
|
+
|
|
88
|
+
assets: dict[str, Any] | Unset = UNSET
|
|
89
|
+
if not isinstance(self.assets, Unset):
|
|
90
|
+
assets = self.assets.to_dict()
|
|
91
|
+
|
|
92
|
+
generated_at: str | Unset = UNSET
|
|
93
|
+
if not isinstance(self.generated_at, Unset):
|
|
94
|
+
generated_at = self.generated_at.isoformat()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
field_dict: dict[str, Any] = {}
|
|
98
|
+
field_dict.update(self.additional_properties)
|
|
99
|
+
field_dict.update({
|
|
100
|
+
})
|
|
101
|
+
if risk_score is not UNSET:
|
|
102
|
+
field_dict["risk_score"] = risk_score
|
|
103
|
+
if risk_level is not UNSET:
|
|
104
|
+
field_dict["risk_level"] = risk_level
|
|
105
|
+
if incidents is not UNSET:
|
|
106
|
+
field_dict["incidents"] = incidents
|
|
107
|
+
if exposures is not UNSET:
|
|
108
|
+
field_dict["exposures"] = exposures
|
|
109
|
+
if phishing is not UNSET:
|
|
110
|
+
field_dict["phishing"] = phishing
|
|
111
|
+
if takedowns is not UNSET:
|
|
112
|
+
field_dict["takedowns"] = takedowns
|
|
113
|
+
if assets is not UNSET:
|
|
114
|
+
field_dict["assets"] = assets
|
|
115
|
+
if generated_at is not UNSET:
|
|
116
|
+
field_dict["generated_at"] = generated_at
|
|
117
|
+
|
|
118
|
+
return field_dict
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
124
|
+
from ..models.overview_assets import OverviewAssets # noqa: PLC0415
|
|
125
|
+
from ..models.overview_exposures import OverviewExposures # noqa: PLC0415
|
|
126
|
+
from ..models.overview_incidents import OverviewIncidents # noqa: PLC0415
|
|
127
|
+
from ..models.overview_phishing import OverviewPhishing # noqa: PLC0415
|
|
128
|
+
from ..models.overview_takedowns import OverviewTakedowns # noqa: PLC0415
|
|
129
|
+
d = dict(src_dict)
|
|
130
|
+
risk_score = d.pop("risk_score", UNSET)
|
|
131
|
+
|
|
132
|
+
_risk_level = d.pop("risk_level", UNSET)
|
|
133
|
+
risk_level: OverviewRiskLevel | Unset
|
|
134
|
+
if isinstance(_risk_level, Unset):
|
|
135
|
+
risk_level = UNSET
|
|
136
|
+
else:
|
|
137
|
+
risk_level = OverviewRiskLevel(_risk_level)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
_incidents = d.pop("incidents", UNSET)
|
|
143
|
+
incidents: OverviewIncidents | Unset
|
|
144
|
+
if isinstance(_incidents, Unset):
|
|
145
|
+
incidents = UNSET
|
|
146
|
+
else:
|
|
147
|
+
incidents = OverviewIncidents.from_dict(_incidents)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
_exposures = d.pop("exposures", UNSET)
|
|
153
|
+
exposures: OverviewExposures | Unset
|
|
154
|
+
if isinstance(_exposures, Unset):
|
|
155
|
+
exposures = UNSET
|
|
156
|
+
else:
|
|
157
|
+
exposures = OverviewExposures.from_dict(_exposures)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
_phishing = d.pop("phishing", UNSET)
|
|
163
|
+
phishing: OverviewPhishing | Unset
|
|
164
|
+
if isinstance(_phishing, Unset):
|
|
165
|
+
phishing = UNSET
|
|
166
|
+
else:
|
|
167
|
+
phishing = OverviewPhishing.from_dict(_phishing)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
_takedowns = d.pop("takedowns", UNSET)
|
|
173
|
+
takedowns: OverviewTakedowns | Unset
|
|
174
|
+
if isinstance(_takedowns, Unset):
|
|
175
|
+
takedowns = UNSET
|
|
176
|
+
else:
|
|
177
|
+
takedowns = OverviewTakedowns.from_dict(_takedowns)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
_assets = d.pop("assets", UNSET)
|
|
183
|
+
assets: OverviewAssets | Unset
|
|
184
|
+
if isinstance(_assets, Unset):
|
|
185
|
+
assets = UNSET
|
|
186
|
+
else:
|
|
187
|
+
assets = OverviewAssets.from_dict(_assets)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
_generated_at = d.pop("generated_at", UNSET)
|
|
193
|
+
generated_at: datetime.datetime | Unset
|
|
194
|
+
if isinstance(_generated_at, Unset):
|
|
195
|
+
generated_at = UNSET
|
|
196
|
+
else:
|
|
197
|
+
generated_at = datetime.datetime.fromisoformat(_generated_at)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
overview = cls(
|
|
203
|
+
risk_score=risk_score,
|
|
204
|
+
risk_level=risk_level,
|
|
205
|
+
incidents=incidents,
|
|
206
|
+
exposures=exposures,
|
|
207
|
+
phishing=phishing,
|
|
208
|
+
takedowns=takedowns,
|
|
209
|
+
assets=assets,
|
|
210
|
+
generated_at=generated_at,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
overview.additional_properties = d
|
|
215
|
+
return overview
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def additional_keys(self) -> list[str]:
|
|
219
|
+
return list(self.additional_properties.keys())
|
|
220
|
+
|
|
221
|
+
def __getitem__(self, key: str) -> Any:
|
|
222
|
+
return self.additional_properties[key]
|
|
223
|
+
|
|
224
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
225
|
+
self.additional_properties[key] = value
|
|
226
|
+
|
|
227
|
+
def __delitem__(self, key: str) -> None:
|
|
228
|
+
del self.additional_properties[key]
|
|
229
|
+
|
|
230
|
+
def __contains__(self, key: str) -> bool:
|
|
231
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,96 @@
|
|
|
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="OverviewAssets")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OverviewAssets:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
domains (int | Unset):
|
|
27
|
+
email_patterns (int | Unset):
|
|
28
|
+
keywords (int | Unset):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
domains: int | Unset = UNSET
|
|
32
|
+
email_patterns: int | Unset = UNSET
|
|
33
|
+
keywords: int | Unset = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
domains = self.domains
|
|
42
|
+
|
|
43
|
+
email_patterns = self.email_patterns
|
|
44
|
+
|
|
45
|
+
keywords = self.keywords
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
field_dict: dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update({
|
|
51
|
+
})
|
|
52
|
+
if domains is not UNSET:
|
|
53
|
+
field_dict["domains"] = domains
|
|
54
|
+
if email_patterns is not UNSET:
|
|
55
|
+
field_dict["email_patterns"] = email_patterns
|
|
56
|
+
if keywords is not UNSET:
|
|
57
|
+
field_dict["keywords"] = keywords
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
65
|
+
d = dict(src_dict)
|
|
66
|
+
domains = d.pop("domains", UNSET)
|
|
67
|
+
|
|
68
|
+
email_patterns = d.pop("email_patterns", UNSET)
|
|
69
|
+
|
|
70
|
+
keywords = d.pop("keywords", UNSET)
|
|
71
|
+
|
|
72
|
+
overview_assets = cls(
|
|
73
|
+
domains=domains,
|
|
74
|
+
email_patterns=email_patterns,
|
|
75
|
+
keywords=keywords,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
overview_assets.additional_properties = d
|
|
80
|
+
return overview_assets
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def additional_keys(self) -> list[str]:
|
|
84
|
+
return list(self.additional_properties.keys())
|
|
85
|
+
|
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
|
87
|
+
return self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
90
|
+
self.additional_properties[key] = value
|
|
91
|
+
|
|
92
|
+
def __delitem__(self, key: str) -> None:
|
|
93
|
+
del self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __contains__(self, key: str) -> bool:
|
|
96
|
+
return key in self.additional_properties
|