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,105 @@
|
|
|
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="OverviewExposures")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OverviewExposures:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
credentials (int | Unset):
|
|
27
|
+
with_password (int | Unset):
|
|
28
|
+
infostealer (int | Unset): Monitored mailboxes seen on infostealer-infected devices.
|
|
29
|
+
infostealer_employees (int | Unset): Employees compromised by infostealers across your domains.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
credentials: int | Unset = UNSET
|
|
33
|
+
with_password: int | Unset = UNSET
|
|
34
|
+
infostealer: int | Unset = UNSET
|
|
35
|
+
infostealer_employees: int | 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
|
+
credentials = self.credentials
|
|
44
|
+
|
|
45
|
+
with_password = self.with_password
|
|
46
|
+
|
|
47
|
+
infostealer = self.infostealer
|
|
48
|
+
|
|
49
|
+
infostealer_employees = self.infostealer_employees
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update({
|
|
55
|
+
})
|
|
56
|
+
if credentials is not UNSET:
|
|
57
|
+
field_dict["credentials"] = credentials
|
|
58
|
+
if with_password is not UNSET:
|
|
59
|
+
field_dict["with_password"] = with_password
|
|
60
|
+
if infostealer is not UNSET:
|
|
61
|
+
field_dict["infostealer"] = infostealer
|
|
62
|
+
if infostealer_employees is not UNSET:
|
|
63
|
+
field_dict["infostealer_employees"] = infostealer_employees
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
credentials = d.pop("credentials", UNSET)
|
|
73
|
+
|
|
74
|
+
with_password = d.pop("with_password", UNSET)
|
|
75
|
+
|
|
76
|
+
infostealer = d.pop("infostealer", UNSET)
|
|
77
|
+
|
|
78
|
+
infostealer_employees = d.pop("infostealer_employees", UNSET)
|
|
79
|
+
|
|
80
|
+
overview_exposures = cls(
|
|
81
|
+
credentials=credentials,
|
|
82
|
+
with_password=with_password,
|
|
83
|
+
infostealer=infostealer,
|
|
84
|
+
infostealer_employees=infostealer_employees,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
overview_exposures.additional_properties = d
|
|
89
|
+
return overview_exposures
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def additional_keys(self) -> list[str]:
|
|
93
|
+
return list(self.additional_properties.keys())
|
|
94
|
+
|
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
|
96
|
+
return self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
99
|
+
self.additional_properties[key] = value
|
|
100
|
+
|
|
101
|
+
def __delitem__(self, key: str) -> None:
|
|
102
|
+
del self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __contains__(self, key: str) -> bool:
|
|
105
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,114 @@
|
|
|
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="OverviewIncidents")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OverviewIncidents:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
open_total (int | Unset):
|
|
27
|
+
open_critical (int | Unset):
|
|
28
|
+
open_high (int | Unset):
|
|
29
|
+
open_medium (int | Unset):
|
|
30
|
+
open_low (int | Unset):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
open_total: int | Unset = UNSET
|
|
34
|
+
open_critical: int | Unset = UNSET
|
|
35
|
+
open_high: int | Unset = UNSET
|
|
36
|
+
open_medium: int | Unset = UNSET
|
|
37
|
+
open_low: int | 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
|
+
open_total = self.open_total
|
|
46
|
+
|
|
47
|
+
open_critical = self.open_critical
|
|
48
|
+
|
|
49
|
+
open_high = self.open_high
|
|
50
|
+
|
|
51
|
+
open_medium = self.open_medium
|
|
52
|
+
|
|
53
|
+
open_low = self.open_low
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update({
|
|
59
|
+
})
|
|
60
|
+
if open_total is not UNSET:
|
|
61
|
+
field_dict["open_total"] = open_total
|
|
62
|
+
if open_critical is not UNSET:
|
|
63
|
+
field_dict["open_critical"] = open_critical
|
|
64
|
+
if open_high is not UNSET:
|
|
65
|
+
field_dict["open_high"] = open_high
|
|
66
|
+
if open_medium is not UNSET:
|
|
67
|
+
field_dict["open_medium"] = open_medium
|
|
68
|
+
if open_low is not UNSET:
|
|
69
|
+
field_dict["open_low"] = open_low
|
|
70
|
+
|
|
71
|
+
return field_dict
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
open_total = d.pop("open_total", UNSET)
|
|
79
|
+
|
|
80
|
+
open_critical = d.pop("open_critical", UNSET)
|
|
81
|
+
|
|
82
|
+
open_high = d.pop("open_high", UNSET)
|
|
83
|
+
|
|
84
|
+
open_medium = d.pop("open_medium", UNSET)
|
|
85
|
+
|
|
86
|
+
open_low = d.pop("open_low", UNSET)
|
|
87
|
+
|
|
88
|
+
overview_incidents = cls(
|
|
89
|
+
open_total=open_total,
|
|
90
|
+
open_critical=open_critical,
|
|
91
|
+
open_high=open_high,
|
|
92
|
+
open_medium=open_medium,
|
|
93
|
+
open_low=open_low,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
overview_incidents.additional_properties = d
|
|
98
|
+
return overview_incidents
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def additional_keys(self) -> list[str]:
|
|
102
|
+
return list(self.additional_properties.keys())
|
|
103
|
+
|
|
104
|
+
def __getitem__(self, key: str) -> Any:
|
|
105
|
+
return self.additional_properties[key]
|
|
106
|
+
|
|
107
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
108
|
+
self.additional_properties[key] = value
|
|
109
|
+
|
|
110
|
+
def __delitem__(self, key: str) -> None:
|
|
111
|
+
del self.additional_properties[key]
|
|
112
|
+
|
|
113
|
+
def __contains__(self, key: str) -> bool:
|
|
114
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,87 @@
|
|
|
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="OverviewPhishing")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OverviewPhishing:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
active (int | Unset):
|
|
27
|
+
confirmed (int | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
active: int | Unset = UNSET
|
|
31
|
+
confirmed: int | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
active = self.active
|
|
40
|
+
|
|
41
|
+
confirmed = self.confirmed
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({
|
|
47
|
+
})
|
|
48
|
+
if active is not UNSET:
|
|
49
|
+
field_dict["active"] = active
|
|
50
|
+
if confirmed is not UNSET:
|
|
51
|
+
field_dict["confirmed"] = confirmed
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
active = d.pop("active", UNSET)
|
|
61
|
+
|
|
62
|
+
confirmed = d.pop("confirmed", UNSET)
|
|
63
|
+
|
|
64
|
+
overview_phishing = cls(
|
|
65
|
+
active=active,
|
|
66
|
+
confirmed=confirmed,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
overview_phishing.additional_properties = d
|
|
71
|
+
return overview_phishing
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,87 @@
|
|
|
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="OverviewTakedowns")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class OverviewTakedowns:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
open_ (int | Unset):
|
|
27
|
+
resolved (int | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
open_: int | Unset = UNSET
|
|
31
|
+
resolved: int | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
open_ = self.open_
|
|
40
|
+
|
|
41
|
+
resolved = self.resolved
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({
|
|
47
|
+
})
|
|
48
|
+
if open_ is not UNSET:
|
|
49
|
+
field_dict["open"] = open_
|
|
50
|
+
if resolved is not UNSET:
|
|
51
|
+
field_dict["resolved"] = resolved
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
open_ = d.pop("open", UNSET)
|
|
61
|
+
|
|
62
|
+
resolved = d.pop("resolved", UNSET)
|
|
63
|
+
|
|
64
|
+
overview_takedowns = cls(
|
|
65
|
+
open_=open_,
|
|
66
|
+
resolved=resolved,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
overview_takedowns.additional_properties = d
|
|
71
|
+
return overview_takedowns
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,105 @@
|
|
|
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="Pagination")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class Pagination:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
limit (int | Unset):
|
|
27
|
+
offset (int | Unset):
|
|
28
|
+
total (int | Unset):
|
|
29
|
+
has_more (bool | Unset):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
limit: int | Unset = UNSET
|
|
33
|
+
offset: int | Unset = UNSET
|
|
34
|
+
total: int | Unset = UNSET
|
|
35
|
+
has_more: bool | 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
|
+
limit = self.limit
|
|
44
|
+
|
|
45
|
+
offset = self.offset
|
|
46
|
+
|
|
47
|
+
total = self.total
|
|
48
|
+
|
|
49
|
+
has_more = self.has_more
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update({
|
|
55
|
+
})
|
|
56
|
+
if limit is not UNSET:
|
|
57
|
+
field_dict["limit"] = limit
|
|
58
|
+
if offset is not UNSET:
|
|
59
|
+
field_dict["offset"] = offset
|
|
60
|
+
if total is not UNSET:
|
|
61
|
+
field_dict["total"] = total
|
|
62
|
+
if has_more is not UNSET:
|
|
63
|
+
field_dict["has_more"] = has_more
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
limit = d.pop("limit", UNSET)
|
|
73
|
+
|
|
74
|
+
offset = d.pop("offset", UNSET)
|
|
75
|
+
|
|
76
|
+
total = d.pop("total", UNSET)
|
|
77
|
+
|
|
78
|
+
has_more = d.pop("has_more", UNSET)
|
|
79
|
+
|
|
80
|
+
pagination = cls(
|
|
81
|
+
limit=limit,
|
|
82
|
+
offset=offset,
|
|
83
|
+
total=total,
|
|
84
|
+
has_more=has_more,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
pagination.additional_properties = d
|
|
89
|
+
return pagination
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def additional_keys(self) -> list[str]:
|
|
93
|
+
return list(self.additional_properties.keys())
|
|
94
|
+
|
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
|
96
|
+
return self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
99
|
+
self.additional_properties[key] = value
|
|
100
|
+
|
|
101
|
+
def __delitem__(self, key: str) -> None:
|
|
102
|
+
del self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __contains__(self, key: str) -> bool:
|
|
105
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,186 @@
|
|
|
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.phishing_domain_verdict import PhishingDomainVerdict
|
|
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="PhishingDomain")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_attrs_define
|
|
27
|
+
class PhishingDomain:
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (UUID | Unset):
|
|
31
|
+
domain (str | Unset): Example: kalir-login.com.
|
|
32
|
+
impersonates (str | Unset): Example: kalir.io.
|
|
33
|
+
verdict (PhishingDomainVerdict | Unset): Automated verification outcome: `confirmed` phishing, `possible`,
|
|
34
|
+
`possible_fp` (likely benign), `inactive` (not serving content) or `unverified` (not checked yet).
|
|
35
|
+
confidence (float | Unset): Verifier confidence 0–1.
|
|
36
|
+
similarity (float | Unset): Lexical similarity to your domain 0–1.
|
|
37
|
+
reason (str | Unset):
|
|
38
|
+
screenshot_url (str | Unset):
|
|
39
|
+
detected_at (datetime.datetime | Unset):
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
id: UUID | Unset = UNSET
|
|
43
|
+
domain: str | Unset = UNSET
|
|
44
|
+
impersonates: str | Unset = UNSET
|
|
45
|
+
verdict: PhishingDomainVerdict | Unset = UNSET
|
|
46
|
+
confidence: float | Unset = UNSET
|
|
47
|
+
similarity: float | Unset = UNSET
|
|
48
|
+
reason: str | Unset = UNSET
|
|
49
|
+
screenshot_url: str | Unset = UNSET
|
|
50
|
+
detected_at: datetime.datetime | Unset = UNSET
|
|
51
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> dict[str, Any]:
|
|
58
|
+
id: str | Unset = UNSET
|
|
59
|
+
if not isinstance(self.id, Unset):
|
|
60
|
+
id = str(self.id)
|
|
61
|
+
|
|
62
|
+
domain = self.domain
|
|
63
|
+
|
|
64
|
+
impersonates = self.impersonates
|
|
65
|
+
|
|
66
|
+
verdict: str | Unset = UNSET
|
|
67
|
+
if not isinstance(self.verdict, Unset):
|
|
68
|
+
verdict = self.verdict.value
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
confidence = self.confidence
|
|
72
|
+
|
|
73
|
+
similarity = self.similarity
|
|
74
|
+
|
|
75
|
+
reason = self.reason
|
|
76
|
+
|
|
77
|
+
screenshot_url = self.screenshot_url
|
|
78
|
+
|
|
79
|
+
detected_at: str | Unset = UNSET
|
|
80
|
+
if not isinstance(self.detected_at, Unset):
|
|
81
|
+
detected_at = self.detected_at.isoformat()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
field_dict: dict[str, Any] = {}
|
|
85
|
+
field_dict.update(self.additional_properties)
|
|
86
|
+
field_dict.update({
|
|
87
|
+
})
|
|
88
|
+
if id is not UNSET:
|
|
89
|
+
field_dict["id"] = id
|
|
90
|
+
if domain is not UNSET:
|
|
91
|
+
field_dict["domain"] = domain
|
|
92
|
+
if impersonates is not UNSET:
|
|
93
|
+
field_dict["impersonates"] = impersonates
|
|
94
|
+
if verdict is not UNSET:
|
|
95
|
+
field_dict["verdict"] = verdict
|
|
96
|
+
if confidence is not UNSET:
|
|
97
|
+
field_dict["confidence"] = confidence
|
|
98
|
+
if similarity is not UNSET:
|
|
99
|
+
field_dict["similarity"] = similarity
|
|
100
|
+
if reason is not UNSET:
|
|
101
|
+
field_dict["reason"] = reason
|
|
102
|
+
if screenshot_url is not UNSET:
|
|
103
|
+
field_dict["screenshot_url"] = screenshot_url
|
|
104
|
+
if detected_at is not UNSET:
|
|
105
|
+
field_dict["detected_at"] = detected_at
|
|
106
|
+
|
|
107
|
+
return field_dict
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
113
|
+
d = dict(src_dict)
|
|
114
|
+
_id = d.pop("id", UNSET)
|
|
115
|
+
id: UUID | Unset
|
|
116
|
+
if isinstance(_id, Unset):
|
|
117
|
+
id = UNSET
|
|
118
|
+
else:
|
|
119
|
+
id = UUID(_id)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
domain = d.pop("domain", UNSET)
|
|
125
|
+
|
|
126
|
+
impersonates = d.pop("impersonates", UNSET)
|
|
127
|
+
|
|
128
|
+
_verdict = d.pop("verdict", UNSET)
|
|
129
|
+
verdict: PhishingDomainVerdict | Unset
|
|
130
|
+
if isinstance(_verdict, Unset):
|
|
131
|
+
verdict = UNSET
|
|
132
|
+
else:
|
|
133
|
+
verdict = PhishingDomainVerdict(_verdict)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
confidence = d.pop("confidence", UNSET)
|
|
139
|
+
|
|
140
|
+
similarity = d.pop("similarity", UNSET)
|
|
141
|
+
|
|
142
|
+
reason = d.pop("reason", UNSET)
|
|
143
|
+
|
|
144
|
+
screenshot_url = d.pop("screenshot_url", UNSET)
|
|
145
|
+
|
|
146
|
+
_detected_at = d.pop("detected_at", UNSET)
|
|
147
|
+
detected_at: datetime.datetime | Unset
|
|
148
|
+
if isinstance(_detected_at, Unset):
|
|
149
|
+
detected_at = UNSET
|
|
150
|
+
else:
|
|
151
|
+
detected_at = datetime.datetime.fromisoformat(_detected_at)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
phishing_domain = cls(
|
|
157
|
+
id=id,
|
|
158
|
+
domain=domain,
|
|
159
|
+
impersonates=impersonates,
|
|
160
|
+
verdict=verdict,
|
|
161
|
+
confidence=confidence,
|
|
162
|
+
similarity=similarity,
|
|
163
|
+
reason=reason,
|
|
164
|
+
screenshot_url=screenshot_url,
|
|
165
|
+
detected_at=detected_at,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
phishing_domain.additional_properties = d
|
|
170
|
+
return phishing_domain
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def additional_keys(self) -> list[str]:
|
|
174
|
+
return list(self.additional_properties.keys())
|
|
175
|
+
|
|
176
|
+
def __getitem__(self, key: str) -> Any:
|
|
177
|
+
return self.additional_properties[key]
|
|
178
|
+
|
|
179
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
180
|
+
self.additional_properties[key] = value
|
|
181
|
+
|
|
182
|
+
def __delitem__(self, key: str) -> None:
|
|
183
|
+
del self.additional_properties[key]
|
|
184
|
+
|
|
185
|
+
def __contains__(self, key: str) -> bool:
|
|
186
|
+
return key in self.additional_properties
|