bytekit-sdk 0.3.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.
- bytekit/__init__.py +8 -0
- bytekit/api/__init__.py +1 -0
- bytekit/api/account/__init__.py +1 -0
- bytekit/api/account/get_account.py +157 -0
- bytekit/api/bulk/__init__.py +1 -0
- bytekit/api/bulk/create_bulk.py +204 -0
- bytekit/api/bulk/delete_bulk.py +177 -0
- bytekit/api/bulk/get_bulk.py +157 -0
- bytekit/api/bulk/list_bulk_screenshots.py +152 -0
- bytekit/api/fetch/__init__.py +1 -0
- bytekit/api/fetch/get_fetch.py +254 -0
- bytekit/api/fetch/post_fetch.py +178 -0
- bytekit/api/fetch_bulk/__init__.py +1 -0
- bytekit/api/fetch_bulk/create_fetch_bulk.py +180 -0
- bytekit/api/fetch_bulk/get_fetch_bulk.py +157 -0
- bytekit/api/monitors/__init__.py +1 -0
- bytekit/api/monitors/create_monitor.py +180 -0
- bytekit/api/monitors/delete_monitor.py +155 -0
- bytekit/api/monitors/get_monitor.py +157 -0
- bytekit/api/monitors/list_monitor_captures.py +188 -0
- bytekit/api/monitors/list_monitors.py +193 -0
- bytekit/api/monitors/update_monitor.py +191 -0
- bytekit/api/scrape/__init__.py +1 -0
- bytekit/api/scrape/create_scrape.py +197 -0
- bytekit/api/scrape/get_scrape.py +231 -0
- bytekit/api/scrape_bulk/__init__.py +1 -0
- bytekit/api/scrape_bulk/create_scrape_bulk.py +188 -0
- bytekit/api/scrape_bulk/get_scrape_bulk.py +157 -0
- bytekit/api/screenshots/__init__.py +1 -0
- bytekit/api/screenshots/create_screenshot.py +208 -0
- bytekit/api/screenshots/get_screenshot.py +177 -0
- bytekit/api/search/__init__.py +1 -0
- bytekit/api/search/create_search.py +225 -0
- bytekit/api/sitemap/__init__.py +1 -0
- bytekit/api/sitemap/create_sitemap.py +192 -0
- bytekit/api/sitemap/get_sitemap.py +157 -0
- bytekit/api/usage/__init__.py +1 -0
- bytekit/api/usage/get_usage.py +126 -0
- bytekit/api/usage/get_usage_by_endpoint.py +215 -0
- bytekit/api/usage/get_usage_daily.py +203 -0
- bytekit/api/webhooks/__init__.py +1 -0
- bytekit/api/webhooks/list_webhook_deliveries.py +214 -0
- bytekit/api/webhooks/retry_webhook_delivery.py +165 -0
- bytekit/client.py +418 -0
- bytekit/errors.py +18 -0
- bytekit/models/__init__.py +401 -0
- bytekit/models/account_bearer_response.py +207 -0
- bytekit/models/account_bearer_response_api_key.py +134 -0
- bytekit/models/account_bearer_response_api_key_environment.py +8 -0
- bytekit/models/account_bearer_response_auto_topup.py +83 -0
- bytekit/models/account_bearer_response_plan.py +150 -0
- bytekit/models/account_bearer_response_subscription.py +85 -0
- bytekit/models/account_bearer_response_subscription_plan.py +99 -0
- bytekit/models/account_bearer_response_subscription_status.py +10 -0
- bytekit/models/account_session_response.py +164 -0
- bytekit/models/account_session_response_notifications.py +51 -0
- bytekit/models/account_session_response_plan.py +150 -0
- bytekit/models/bandwidth_balance.py +91 -0
- bytekit/models/capture_response.py +216 -0
- bytekit/models/capture_response_outcome.py +10 -0
- bytekit/models/clip.py +83 -0
- bytekit/models/cookie.py +90 -0
- bytekit/models/create_bulk_body.py +155 -0
- bytekit/models/create_bulk_body_defaults.py +423 -0
- bytekit/models/create_bulk_body_defaults_device.py +9 -0
- bytekit/models/create_bulk_body_defaults_device_scale_factor_type_1.py +9 -0
- bytekit/models/create_bulk_body_defaults_device_scale_factor_type_2_type_1.py +9 -0
- bytekit/models/create_bulk_body_defaults_device_scale_factor_type_3_type_1.py +9 -0
- bytekit/models/create_bulk_body_defaults_formats_item.py +12 -0
- bytekit/models/create_bulk_body_defaults_type.py +9 -0
- bytekit/models/create_bulk_body_defaults_viewport_type_0.py +67 -0
- bytekit/models/create_bulk_body_defaults_wait_until.py +10 -0
- bytekit/models/create_bulk_body_items_item.py +380 -0
- bytekit/models/create_bulk_body_items_item_device.py +9 -0
- bytekit/models/create_bulk_body_items_item_formats_item.py +12 -0
- bytekit/models/create_bulk_body_items_item_scenario.py +10 -0
- bytekit/models/create_bulk_body_items_item_type.py +9 -0
- bytekit/models/create_bulk_body_items_item_viewport_type_0.py +67 -0
- bytekit/models/create_bulk_body_items_item_wait_until.py +10 -0
- bytekit/models/create_bulk_response_202.py +164 -0
- bytekit/models/create_bulk_response_202_status.py +10 -0
- bytekit/models/create_fetch_bulk_body.py +161 -0
- bytekit/models/create_fetch_bulk_body_defaults.py +91 -0
- bytekit/models/create_fetch_bulk_body_defaults_format.py +9 -0
- bytekit/models/create_fetch_bulk_body_metadata.py +44 -0
- bytekit/models/create_fetch_bulk_body_urls_item_type_1.py +102 -0
- bytekit/models/create_fetch_bulk_body_urls_item_type_1_format.py +9 -0
- bytekit/models/create_fetch_bulk_response_202.py +44 -0
- bytekit/models/create_scrape_bulk_body.py +179 -0
- bytekit/models/create_scrape_bulk_body_custom.py +52 -0
- bytekit/models/create_scrape_bulk_body_defaults.py +167 -0
- bytekit/models/create_scrape_bulk_body_defaults_formats_item.py +12 -0
- bytekit/models/create_scrape_bulk_body_defaults_headers.py +44 -0
- bytekit/models/create_scrape_bulk_body_items_item.py +226 -0
- bytekit/models/create_scrape_bulk_body_items_item_custom.py +50 -0
- bytekit/models/create_scrape_bulk_body_items_item_formats_item.py +12 -0
- bytekit/models/create_scrape_bulk_body_items_item_headers.py +44 -0
- bytekit/models/create_scrape_bulk_body_items_item_metadata.py +44 -0
- bytekit/models/create_scrape_bulk_response_202.py +166 -0
- bytekit/models/create_scrape_bulk_response_202_status.py +10 -0
- bytekit/models/create_search_body.py +140 -0
- bytekit/models/create_search_body_date_range.py +13 -0
- bytekit/models/create_search_body_type.py +10 -0
- bytekit/models/create_search_response_200.py +119 -0
- bytekit/models/create_search_response_200_results_item.py +161 -0
- bytekit/models/create_search_response_200_results_item_image.py +113 -0
- bytekit/models/create_search_response_502.py +46 -0
- bytekit/models/create_search_response_502_error.py +8 -0
- bytekit/models/credit_balance.py +91 -0
- bytekit/models/delete_bulk_response_200.py +164 -0
- bytekit/models/delete_bulk_response_200_status.py +11 -0
- bytekit/models/error.py +83 -0
- bytekit/models/error_error.py +100 -0
- bytekit/models/error_status.py +8 -0
- bytekit/models/fetch_request.py +276 -0
- bytekit/models/fetch_request_cache_ttl_type_1.py +8 -0
- bytekit/models/fetch_request_custom.py +48 -0
- bytekit/models/fetch_request_format.py +9 -0
- bytekit/models/fetch_request_markdown_images.py +11 -0
- bytekit/models/fetch_request_markdown_links.py +11 -0
- bytekit/models/fetch_request_markdown_mode.py +10 -0
- bytekit/models/get_bulk_response_200.py +164 -0
- bytekit/models/get_bulk_response_200_status.py +11 -0
- bytekit/models/get_fetch_bulk_response_200.py +44 -0
- bytekit/models/get_fetch_cache_ttl_type_1.py +8 -0
- bytekit/models/get_fetch_format.py +9 -0
- bytekit/models/get_scrape_bulk_response_200.py +164 -0
- bytekit/models/get_scrape_bulk_response_200_status.py +11 -0
- bytekit/models/get_usage_by_endpoint_response_200.py +114 -0
- bytekit/models/get_usage_by_endpoint_response_200_rows_item.py +90 -0
- bytekit/models/get_usage_by_endpoint_response_200_rows_item_endpoint.py +17 -0
- bytekit/models/get_usage_by_endpoint_response_200_totals.py +67 -0
- bytekit/models/get_usage_daily_response_200.py +97 -0
- bytekit/models/get_usage_daily_response_200_data_item.py +219 -0
- bytekit/models/get_usage_response_200.py +344 -0
- bytekit/models/get_usage_response_200_plan_type.py +10 -0
- bytekit/models/list_bulk_screenshots_response_200.py +44 -0
- bytekit/models/list_monitor_captures_response_200.py +101 -0
- bytekit/models/list_monitors_response_200.py +101 -0
- bytekit/models/list_monitors_status.py +12 -0
- bytekit/models/list_webhook_deliveries_response_200.py +101 -0
- bytekit/models/list_webhook_deliveries_status.py +11 -0
- bytekit/models/metadata.py +44 -0
- bytekit/models/monitor_create_request.py +219 -0
- bytekit/models/monitor_create_request_interval_type.py +11 -0
- bytekit/models/monitor_create_request_notify_on.py +9 -0
- bytekit/models/monitor_create_request_options.py +44 -0
- bytekit/models/monitor_create_request_scrape_options.py +44 -0
- bytekit/models/monitor_create_request_type.py +9 -0
- bytekit/models/monitor_create_request_webhook_headers.py +44 -0
- bytekit/models/monitor_create_response.py +423 -0
- bytekit/models/monitor_response.py +411 -0
- bytekit/models/monitor_response_interval_type.py +11 -0
- bytekit/models/monitor_response_metadata_type_0.py +44 -0
- bytekit/models/monitor_response_status.py +12 -0
- bytekit/models/monitor_response_type.py +9 -0
- bytekit/models/monitor_response_webhook_headers_type_0.py +44 -0
- bytekit/models/monitor_update_request.py +223 -0
- bytekit/models/monitor_update_request_interval_type.py +11 -0
- bytekit/models/monitor_update_request_notify_on.py +9 -0
- bytekit/models/monitor_update_request_options.py +44 -0
- bytekit/models/monitor_update_request_scrape_options.py +44 -0
- bytekit/models/monitor_update_request_status.py +9 -0
- bytekit/models/monitor_update_request_webhook_headers.py +44 -0
- bytekit/models/scrape_error_envelope.py +113 -0
- bytekit/models/scrape_error_envelope_error.py +93 -0
- bytekit/models/scrape_error_envelope_error_code.py +18 -0
- bytekit/models/scrape_error_envelope_schema_version.py +8 -0
- bytekit/models/scrape_error_envelope_status.py +8 -0
- bytekit/models/scrape_formats.py +183 -0
- bytekit/models/scrape_markdown_tokens.py +75 -0
- bytekit/models/scrape_metadata.py +262 -0
- bytekit/models/scrape_queued_envelope.py +124 -0
- bytekit/models/scrape_queued_envelope_schema_version.py +8 -0
- bytekit/models/scrape_queued_envelope_status.py +8 -0
- bytekit/models/scrape_request.py +485 -0
- bytekit/models/scrape_request_cache_ttl_type_1.py +8 -0
- bytekit/models/scrape_request_custom.py +48 -0
- bytekit/models/scrape_request_events_item.py +10 -0
- bytekit/models/scrape_request_formats_item.py +12 -0
- bytekit/models/scrape_request_headers.py +44 -0
- bytekit/models/scrape_request_markdown_images.py +11 -0
- bytekit/models/scrape_request_markdown_links.py +11 -0
- bytekit/models/scrape_request_markdown_mode.py +10 -0
- bytekit/models/scrape_request_token_encoding.py +9 -0
- bytekit/models/scrape_request_x_internal_scrape_path.py +8 -0
- bytekit/models/scrape_scored_image.py +128 -0
- bytekit/models/scrape_scored_link.py +94 -0
- bytekit/models/scrape_stats.py +75 -0
- bytekit/models/scrape_success_envelope.py +345 -0
- bytekit/models/scrape_success_envelope_cache.py +10 -0
- bytekit/models/scrape_success_envelope_custom.py +48 -0
- bytekit/models/scrape_success_envelope_schema_version.py +8 -0
- bytekit/models/scrape_success_envelope_status.py +8 -0
- bytekit/models/scrape_table.py +96 -0
- bytekit/models/scrape_table_kind.py +10 -0
- bytekit/models/scrape_warning.py +88 -0
- bytekit/models/scrape_warning_code.py +17 -0
- bytekit/models/screenshot_request.py +445 -0
- bytekit/models/screenshot_request_device.py +9 -0
- bytekit/models/screenshot_request_device_scale_factor_type_1.py +9 -0
- bytekit/models/screenshot_request_device_scale_factor_type_2_type_1.py +9 -0
- bytekit/models/screenshot_request_device_scale_factor_type_3_type_1.py +9 -0
- bytekit/models/screenshot_request_format.py +9 -0
- bytekit/models/screenshot_request_headers.py +44 -0
- bytekit/models/screenshot_request_wait_until.py +10 -0
- bytekit/models/screenshot_response.py +264 -0
- bytekit/models/screenshot_response_status.py +11 -0
- bytekit/models/sitemap_request.py +210 -0
- bytekit/models/sitemap_request_process_type_0.py +90 -0
- bytekit/models/sitemap_request_process_type_0_options.py +44 -0
- bytekit/models/sitemap_request_strategy.py +10 -0
- bytekit/models/sitemap_response.py +418 -0
- bytekit/models/sitemap_response_cache.py +10 -0
- bytekit/models/sitemap_response_metadata_type_0.py +44 -0
- bytekit/models/sitemap_response_process_type_0.py +44 -0
- bytekit/models/sitemap_response_sources_type_0.py +44 -0
- bytekit/models/sitemap_response_status.py +11 -0
- bytekit/models/viewport.py +67 -0
- bytekit/models/webhook_delivery_response.py +270 -0
- bytekit/models/webhook_delivery_response_event_type.py +14 -0
- bytekit/models/webhook_delivery_response_status.py +11 -0
- bytekit/py.typed +0 -0
- bytekit/types.py +54 -0
- bytekit_sdk-0.3.0.dist-info/METADATA +141 -0
- bytekit_sdk-0.3.0.dist-info/RECORD +227 -0
- bytekit_sdk-0.3.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
TYPE_CHECKING,
|
|
4
|
+
Any,
|
|
5
|
+
TypeVar,
|
|
6
|
+
Union,
|
|
7
|
+
cast,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from attrs import define as _attrs_define
|
|
11
|
+
from attrs import field as _attrs_field
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.capture_response import CaptureResponse
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ListMonitorCapturesResponse200")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ListMonitorCapturesResponse200:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
data (list['CaptureResponse']):
|
|
25
|
+
next_cursor (Union[None, str]):
|
|
26
|
+
has_more (bool):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
data: list["CaptureResponse"]
|
|
30
|
+
next_cursor: Union[None, str]
|
|
31
|
+
has_more: bool
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
data = []
|
|
36
|
+
for data_item_data in self.data:
|
|
37
|
+
data_item = data_item_data.to_dict()
|
|
38
|
+
data.append(data_item)
|
|
39
|
+
|
|
40
|
+
next_cursor: Union[None, str]
|
|
41
|
+
next_cursor = self.next_cursor
|
|
42
|
+
|
|
43
|
+
has_more = self.has_more
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"data": data,
|
|
50
|
+
"next_cursor": next_cursor,
|
|
51
|
+
"has_more": has_more,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
from ..models.capture_response import CaptureResponse
|
|
60
|
+
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
data = []
|
|
63
|
+
_data = d.pop("data")
|
|
64
|
+
for data_item_data in _data:
|
|
65
|
+
data_item = CaptureResponse.from_dict(data_item_data)
|
|
66
|
+
|
|
67
|
+
data.append(data_item)
|
|
68
|
+
|
|
69
|
+
def _parse_next_cursor(data: object) -> Union[None, str]:
|
|
70
|
+
if data is None:
|
|
71
|
+
return data
|
|
72
|
+
return cast(Union[None, str], data)
|
|
73
|
+
|
|
74
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
75
|
+
|
|
76
|
+
has_more = d.pop("has_more")
|
|
77
|
+
|
|
78
|
+
list_monitor_captures_response_200 = cls(
|
|
79
|
+
data=data,
|
|
80
|
+
next_cursor=next_cursor,
|
|
81
|
+
has_more=has_more,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
list_monitor_captures_response_200.additional_properties = d
|
|
85
|
+
return list_monitor_captures_response_200
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
TYPE_CHECKING,
|
|
4
|
+
Any,
|
|
5
|
+
TypeVar,
|
|
6
|
+
Union,
|
|
7
|
+
cast,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from attrs import define as _attrs_define
|
|
11
|
+
from attrs import field as _attrs_field
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.monitor_response import MonitorResponse
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ListMonitorsResponse200")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ListMonitorsResponse200:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
data (list['MonitorResponse']):
|
|
25
|
+
next_cursor (Union[None, str]):
|
|
26
|
+
has_more (bool):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
data: list["MonitorResponse"]
|
|
30
|
+
next_cursor: Union[None, str]
|
|
31
|
+
has_more: bool
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
data = []
|
|
36
|
+
for data_item_data in self.data:
|
|
37
|
+
data_item = data_item_data.to_dict()
|
|
38
|
+
data.append(data_item)
|
|
39
|
+
|
|
40
|
+
next_cursor: Union[None, str]
|
|
41
|
+
next_cursor = self.next_cursor
|
|
42
|
+
|
|
43
|
+
has_more = self.has_more
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"data": data,
|
|
50
|
+
"next_cursor": next_cursor,
|
|
51
|
+
"has_more": has_more,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
from ..models.monitor_response import MonitorResponse
|
|
60
|
+
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
data = []
|
|
63
|
+
_data = d.pop("data")
|
|
64
|
+
for data_item_data in _data:
|
|
65
|
+
data_item = MonitorResponse.from_dict(data_item_data)
|
|
66
|
+
|
|
67
|
+
data.append(data_item)
|
|
68
|
+
|
|
69
|
+
def _parse_next_cursor(data: object) -> Union[None, str]:
|
|
70
|
+
if data is None:
|
|
71
|
+
return data
|
|
72
|
+
return cast(Union[None, str], data)
|
|
73
|
+
|
|
74
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
75
|
+
|
|
76
|
+
has_more = d.pop("has_more")
|
|
77
|
+
|
|
78
|
+
list_monitors_response_200 = cls(
|
|
79
|
+
data=data,
|
|
80
|
+
next_cursor=next_cursor,
|
|
81
|
+
has_more=has_more,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
list_monitors_response_200.additional_properties = d
|
|
85
|
+
return list_monitors_response_200
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
TYPE_CHECKING,
|
|
4
|
+
Any,
|
|
5
|
+
TypeVar,
|
|
6
|
+
Union,
|
|
7
|
+
cast,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from attrs import define as _attrs_define
|
|
11
|
+
from attrs import field as _attrs_field
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.webhook_delivery_response import WebhookDeliveryResponse
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="ListWebhookDeliveriesResponse200")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class ListWebhookDeliveriesResponse200:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
data (list['WebhookDeliveryResponse']):
|
|
25
|
+
next_cursor (Union[None, str]):
|
|
26
|
+
has_more (bool):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
data: list["WebhookDeliveryResponse"]
|
|
30
|
+
next_cursor: Union[None, str]
|
|
31
|
+
has_more: bool
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
data = []
|
|
36
|
+
for data_item_data in self.data:
|
|
37
|
+
data_item = data_item_data.to_dict()
|
|
38
|
+
data.append(data_item)
|
|
39
|
+
|
|
40
|
+
next_cursor: Union[None, str]
|
|
41
|
+
next_cursor = self.next_cursor
|
|
42
|
+
|
|
43
|
+
has_more = self.has_more
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"data": data,
|
|
50
|
+
"next_cursor": next_cursor,
|
|
51
|
+
"has_more": has_more,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
from ..models.webhook_delivery_response import WebhookDeliveryResponse
|
|
60
|
+
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
data = []
|
|
63
|
+
_data = d.pop("data")
|
|
64
|
+
for data_item_data in _data:
|
|
65
|
+
data_item = WebhookDeliveryResponse.from_dict(data_item_data)
|
|
66
|
+
|
|
67
|
+
data.append(data_item)
|
|
68
|
+
|
|
69
|
+
def _parse_next_cursor(data: object) -> Union[None, str]:
|
|
70
|
+
if data is None:
|
|
71
|
+
return data
|
|
72
|
+
return cast(Union[None, str], data)
|
|
73
|
+
|
|
74
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
75
|
+
|
|
76
|
+
has_more = d.pop("has_more")
|
|
77
|
+
|
|
78
|
+
list_webhook_deliveries_response_200 = cls(
|
|
79
|
+
data=data,
|
|
80
|
+
next_cursor=next_cursor,
|
|
81
|
+
has_more=has_more,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
list_webhook_deliveries_response_200.additional_properties = d
|
|
85
|
+
return list_webhook_deliveries_response_200
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="Metadata")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class Metadata:
|
|
12
|
+
"""Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized."""
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
metadata = cls()
|
|
26
|
+
|
|
27
|
+
metadata.additional_properties = d
|
|
28
|
+
return metadata
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import (
|
|
3
|
+
TYPE_CHECKING,
|
|
4
|
+
Any,
|
|
5
|
+
TypeVar,
|
|
6
|
+
Union,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from attrs import define as _attrs_define
|
|
10
|
+
|
|
11
|
+
from ..models.monitor_create_request_interval_type import (
|
|
12
|
+
MonitorCreateRequestIntervalType,
|
|
13
|
+
)
|
|
14
|
+
from ..models.monitor_create_request_notify_on import MonitorCreateRequestNotifyOn
|
|
15
|
+
from ..models.monitor_create_request_type import MonitorCreateRequestType
|
|
16
|
+
from ..types import UNSET, Unset
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from ..models.metadata import Metadata
|
|
20
|
+
from ..models.monitor_create_request_options import MonitorCreateRequestOptions
|
|
21
|
+
from ..models.monitor_create_request_scrape_options import (
|
|
22
|
+
MonitorCreateRequestScrapeOptions,
|
|
23
|
+
)
|
|
24
|
+
from ..models.monitor_create_request_webhook_headers import (
|
|
25
|
+
MonitorCreateRequestWebhookHeaders,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
T = TypeVar("T", bound="MonitorCreateRequest")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@_attrs_define
|
|
33
|
+
class MonitorCreateRequest:
|
|
34
|
+
"""
|
|
35
|
+
Attributes:
|
|
36
|
+
url (str):
|
|
37
|
+
interval_type (MonitorCreateRequestIntervalType):
|
|
38
|
+
webhook_url (str): Webhook endpoint URL (HTTPS only; http:// rejected with 400 invalid_url, reason
|
|
39
|
+
scheme_unsupported)
|
|
40
|
+
type_ (Union[Unset, MonitorCreateRequestType]):
|
|
41
|
+
cron_expression (Union[Unset, str]): 5-field cron expression. Required when interval_type is "cron".
|
|
42
|
+
change_threshold (Union[Unset, float]):
|
|
43
|
+
notify_on (Union[Unset, MonitorCreateRequestNotifyOn]):
|
|
44
|
+
webhook_secret (Union[Unset, str]):
|
|
45
|
+
webhook_headers (Union[Unset, MonitorCreateRequestWebhookHeaders]): Max 20 headers. Keys must match
|
|
46
|
+
/^[A-Za-z0-9-]+$/ and not be reserved.
|
|
47
|
+
options (Union[Unset, MonitorCreateRequestOptions]): Screenshot monitor options (device, viewport, format,
|
|
48
|
+
etc.).
|
|
49
|
+
scrape_options (Union[Unset, MonitorCreateRequestScrapeOptions]): Scrape monitor options (formats, country,
|
|
50
|
+
headers, etc.). Only for type=scrape.
|
|
51
|
+
metadata (Union[Unset, Metadata]): Arbitrary key-value metadata. Max 4096 bytes when JSON-serialized.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
url: str
|
|
55
|
+
interval_type: MonitorCreateRequestIntervalType
|
|
56
|
+
webhook_url: str
|
|
57
|
+
type_: Union[Unset, MonitorCreateRequestType] = UNSET
|
|
58
|
+
cron_expression: Union[Unset, str] = UNSET
|
|
59
|
+
change_threshold: Union[Unset, float] = UNSET
|
|
60
|
+
notify_on: Union[Unset, MonitorCreateRequestNotifyOn] = UNSET
|
|
61
|
+
webhook_secret: Union[Unset, str] = UNSET
|
|
62
|
+
webhook_headers: Union[Unset, "MonitorCreateRequestWebhookHeaders"] = UNSET
|
|
63
|
+
options: Union[Unset, "MonitorCreateRequestOptions"] = UNSET
|
|
64
|
+
scrape_options: Union[Unset, "MonitorCreateRequestScrapeOptions"] = UNSET
|
|
65
|
+
metadata: Union[Unset, "Metadata"] = UNSET
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> dict[str, Any]:
|
|
68
|
+
url = self.url
|
|
69
|
+
|
|
70
|
+
interval_type = self.interval_type.value
|
|
71
|
+
|
|
72
|
+
webhook_url = self.webhook_url
|
|
73
|
+
|
|
74
|
+
type_: Union[Unset, str] = UNSET
|
|
75
|
+
if not isinstance(self.type_, Unset):
|
|
76
|
+
type_ = self.type_.value
|
|
77
|
+
|
|
78
|
+
cron_expression = self.cron_expression
|
|
79
|
+
|
|
80
|
+
change_threshold = self.change_threshold
|
|
81
|
+
|
|
82
|
+
notify_on: Union[Unset, str] = UNSET
|
|
83
|
+
if not isinstance(self.notify_on, Unset):
|
|
84
|
+
notify_on = self.notify_on.value
|
|
85
|
+
|
|
86
|
+
webhook_secret = self.webhook_secret
|
|
87
|
+
|
|
88
|
+
webhook_headers: Union[Unset, dict[str, Any]] = UNSET
|
|
89
|
+
if not isinstance(self.webhook_headers, Unset):
|
|
90
|
+
webhook_headers = self.webhook_headers.to_dict()
|
|
91
|
+
|
|
92
|
+
options: Union[Unset, dict[str, Any]] = UNSET
|
|
93
|
+
if not isinstance(self.options, Unset):
|
|
94
|
+
options = self.options.to_dict()
|
|
95
|
+
|
|
96
|
+
scrape_options: Union[Unset, dict[str, Any]] = UNSET
|
|
97
|
+
if not isinstance(self.scrape_options, Unset):
|
|
98
|
+
scrape_options = self.scrape_options.to_dict()
|
|
99
|
+
|
|
100
|
+
metadata: Union[Unset, dict[str, Any]] = UNSET
|
|
101
|
+
if not isinstance(self.metadata, Unset):
|
|
102
|
+
metadata = self.metadata.to_dict()
|
|
103
|
+
|
|
104
|
+
field_dict: dict[str, Any] = {}
|
|
105
|
+
|
|
106
|
+
field_dict.update(
|
|
107
|
+
{
|
|
108
|
+
"url": url,
|
|
109
|
+
"interval_type": interval_type,
|
|
110
|
+
"webhook_url": webhook_url,
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
if type_ is not UNSET:
|
|
114
|
+
field_dict["type"] = type_
|
|
115
|
+
if cron_expression is not UNSET:
|
|
116
|
+
field_dict["cron_expression"] = cron_expression
|
|
117
|
+
if change_threshold is not UNSET:
|
|
118
|
+
field_dict["change_threshold"] = change_threshold
|
|
119
|
+
if notify_on is not UNSET:
|
|
120
|
+
field_dict["notify_on"] = notify_on
|
|
121
|
+
if webhook_secret is not UNSET:
|
|
122
|
+
field_dict["webhook_secret"] = webhook_secret
|
|
123
|
+
if webhook_headers is not UNSET:
|
|
124
|
+
field_dict["webhook_headers"] = webhook_headers
|
|
125
|
+
if options is not UNSET:
|
|
126
|
+
field_dict["options"] = options
|
|
127
|
+
if scrape_options is not UNSET:
|
|
128
|
+
field_dict["scrape_options"] = scrape_options
|
|
129
|
+
if metadata is not UNSET:
|
|
130
|
+
field_dict["metadata"] = metadata
|
|
131
|
+
|
|
132
|
+
return field_dict
|
|
133
|
+
|
|
134
|
+
@classmethod
|
|
135
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
136
|
+
from ..models.metadata import Metadata
|
|
137
|
+
from ..models.monitor_create_request_options import MonitorCreateRequestOptions
|
|
138
|
+
from ..models.monitor_create_request_scrape_options import (
|
|
139
|
+
MonitorCreateRequestScrapeOptions,
|
|
140
|
+
)
|
|
141
|
+
from ..models.monitor_create_request_webhook_headers import (
|
|
142
|
+
MonitorCreateRequestWebhookHeaders,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
d = dict(src_dict)
|
|
146
|
+
url = d.pop("url")
|
|
147
|
+
|
|
148
|
+
interval_type = MonitorCreateRequestIntervalType(d.pop("interval_type"))
|
|
149
|
+
|
|
150
|
+
webhook_url = d.pop("webhook_url")
|
|
151
|
+
|
|
152
|
+
_type_ = d.pop("type", UNSET)
|
|
153
|
+
type_: Union[Unset, MonitorCreateRequestType]
|
|
154
|
+
if isinstance(_type_, Unset):
|
|
155
|
+
type_ = UNSET
|
|
156
|
+
else:
|
|
157
|
+
type_ = MonitorCreateRequestType(_type_)
|
|
158
|
+
|
|
159
|
+
cron_expression = d.pop("cron_expression", UNSET)
|
|
160
|
+
|
|
161
|
+
change_threshold = d.pop("change_threshold", UNSET)
|
|
162
|
+
|
|
163
|
+
_notify_on = d.pop("notify_on", UNSET)
|
|
164
|
+
notify_on: Union[Unset, MonitorCreateRequestNotifyOn]
|
|
165
|
+
if isinstance(_notify_on, Unset):
|
|
166
|
+
notify_on = UNSET
|
|
167
|
+
else:
|
|
168
|
+
notify_on = MonitorCreateRequestNotifyOn(_notify_on)
|
|
169
|
+
|
|
170
|
+
webhook_secret = d.pop("webhook_secret", UNSET)
|
|
171
|
+
|
|
172
|
+
_webhook_headers = d.pop("webhook_headers", UNSET)
|
|
173
|
+
webhook_headers: Union[Unset, MonitorCreateRequestWebhookHeaders]
|
|
174
|
+
if isinstance(_webhook_headers, Unset):
|
|
175
|
+
webhook_headers = UNSET
|
|
176
|
+
else:
|
|
177
|
+
webhook_headers = MonitorCreateRequestWebhookHeaders.from_dict(
|
|
178
|
+
_webhook_headers
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_options = d.pop("options", UNSET)
|
|
182
|
+
options: Union[Unset, MonitorCreateRequestOptions]
|
|
183
|
+
if isinstance(_options, Unset):
|
|
184
|
+
options = UNSET
|
|
185
|
+
else:
|
|
186
|
+
options = MonitorCreateRequestOptions.from_dict(_options)
|
|
187
|
+
|
|
188
|
+
_scrape_options = d.pop("scrape_options", UNSET)
|
|
189
|
+
scrape_options: Union[Unset, MonitorCreateRequestScrapeOptions]
|
|
190
|
+
if isinstance(_scrape_options, Unset):
|
|
191
|
+
scrape_options = UNSET
|
|
192
|
+
else:
|
|
193
|
+
scrape_options = MonitorCreateRequestScrapeOptions.from_dict(
|
|
194
|
+
_scrape_options
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
_metadata = d.pop("metadata", UNSET)
|
|
198
|
+
metadata: Union[Unset, Metadata]
|
|
199
|
+
if isinstance(_metadata, Unset):
|
|
200
|
+
metadata = UNSET
|
|
201
|
+
else:
|
|
202
|
+
metadata = Metadata.from_dict(_metadata)
|
|
203
|
+
|
|
204
|
+
monitor_create_request = cls(
|
|
205
|
+
url=url,
|
|
206
|
+
interval_type=interval_type,
|
|
207
|
+
webhook_url=webhook_url,
|
|
208
|
+
type_=type_,
|
|
209
|
+
cron_expression=cron_expression,
|
|
210
|
+
change_threshold=change_threshold,
|
|
211
|
+
notify_on=notify_on,
|
|
212
|
+
webhook_secret=webhook_secret,
|
|
213
|
+
webhook_headers=webhook_headers,
|
|
214
|
+
options=options,
|
|
215
|
+
scrape_options=scrape_options,
|
|
216
|
+
metadata=metadata,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
return monitor_create_request
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="MonitorCreateRequestOptions")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MonitorCreateRequestOptions:
|
|
12
|
+
"""Screenshot monitor options (device, viewport, format, etc.)."""
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
monitor_create_request_options = cls()
|
|
26
|
+
|
|
27
|
+
monitor_create_request_options.additional_properties = d
|
|
28
|
+
return monitor_create_request_options
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|