levelfour 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. levelfour/__init__.py +495 -0
  2. levelfour/api_keys/__init__.py +34 -0
  3. levelfour/api_keys/client.py +337 -0
  4. levelfour/api_keys/raw_client.py +621 -0
  5. levelfour/api_keys/types/__init__.py +34 -0
  6. levelfour/api_keys/types/create_api_key_request_scope.py +5 -0
  7. levelfour/async_levelfour_client.py +39 -0
  8. levelfour/base_client.py +346 -0
  9. levelfour/client.py +54 -0
  10. levelfour/core/__init__.py +127 -0
  11. levelfour/core/api_error.py +23 -0
  12. levelfour/core/client_wrapper.py +105 -0
  13. levelfour/core/datetime_utils.py +70 -0
  14. levelfour/core/file.py +67 -0
  15. levelfour/core/force_multipart.py +18 -0
  16. levelfour/core/http_client.py +776 -0
  17. levelfour/core/http_response.py +59 -0
  18. levelfour/core/http_sse/__init__.py +42 -0
  19. levelfour/core/http_sse/_api.py +112 -0
  20. levelfour/core/http_sse/_decoders.py +61 -0
  21. levelfour/core/http_sse/_exceptions.py +7 -0
  22. levelfour/core/http_sse/_models.py +17 -0
  23. levelfour/core/jsonable_encoder.py +108 -0
  24. levelfour/core/logging.py +107 -0
  25. levelfour/core/pagination.py +82 -0
  26. levelfour/core/pydantic_utilities.py +577 -0
  27. levelfour/core/query_encoder.py +58 -0
  28. levelfour/core/remove_none_from_dict.py +11 -0
  29. levelfour/core/request_options.py +35 -0
  30. levelfour/core/serialization.py +276 -0
  31. levelfour/errors/__init__.py +40 -0
  32. levelfour/errors/forbidden_error.py +11 -0
  33. levelfour/errors/unauthorized_error.py +11 -0
  34. levelfour/errors/unprocessable_entity_error.py +11 -0
  35. levelfour/evaluation/__init__.py +4 -0
  36. levelfour/evaluation/client.py +102 -0
  37. levelfour/evaluation/raw_client.py +141 -0
  38. levelfour/exceptions.py +63 -0
  39. levelfour/health/__init__.py +4 -0
  40. levelfour/health/client.py +163 -0
  41. levelfour/health/raw_client.py +164 -0
  42. levelfour/integrations/__init__.py +0 -0
  43. levelfour/integrations/django.py +26 -0
  44. levelfour/integrations/fastapi.py +39 -0
  45. levelfour/integrations/telemetry.py +66 -0
  46. levelfour/levelfour_client.py +47 -0
  47. levelfour/pagination.py +84 -0
  48. levelfour/pr_analysis/__init__.py +4 -0
  49. levelfour/pr_analysis/client.py +408 -0
  50. levelfour/pr_analysis/raw_client.py +620 -0
  51. levelfour/pr_analysis_actions/__init__.py +4 -0
  52. levelfour/pr_analysis_actions/client.py +588 -0
  53. levelfour/pr_analysis_actions/raw_client.py +939 -0
  54. levelfour/pr_analysis_installations/__init__.py +4 -0
  55. levelfour/pr_analysis_installations/client.py +470 -0
  56. levelfour/pr_analysis_installations/raw_client.py +868 -0
  57. levelfour/providers/__init__.py +34 -0
  58. levelfour/providers/client.py +1504 -0
  59. levelfour/providers/raw_client.py +2398 -0
  60. levelfour/providers/types/__init__.py +36 -0
  61. levelfour/providers/types/list_spending_breakdown_providers_response.py +11 -0
  62. levelfour/py.typed +0 -0
  63. levelfour/recommendations/__init__.py +4 -0
  64. levelfour/recommendations/client.py +1018 -0
  65. levelfour/recommendations/raw_client.py +1810 -0
  66. levelfour/savings/__init__.py +4 -0
  67. levelfour/savings/client.py +401 -0
  68. levelfour/savings/raw_client.py +624 -0
  69. levelfour/spending/__init__.py +34 -0
  70. levelfour/spending/client.py +437 -0
  71. levelfour/spending/raw_client.py +684 -0
  72. levelfour/spending/types/__init__.py +34 -0
  73. levelfour/spending/types/list_breakdown_spending_response.py +12 -0
  74. levelfour/types/__init__.py +413 -0
  75. levelfour/types/accept_terms_data.py +25 -0
  76. levelfour/types/accept_terms_response.py +27 -0
  77. levelfour/types/action_request.py +42 -0
  78. levelfour/types/api_key_created_data.py +28 -0
  79. levelfour/types/api_key_data.py +27 -0
  80. levelfour/types/authentication_error.py +5 -0
  81. levelfour/types/authorization_error.py +5 -0
  82. levelfour/types/bad_request_error.py +5 -0
  83. levelfour/types/comparison_item.py +32 -0
  84. levelfour/types/complete_wizard_data.py +27 -0
  85. levelfour/types/complete_wizard_response.py +27 -0
  86. levelfour/types/conflict_error.py +5 -0
  87. levelfour/types/cost_breakdown_data.py +35 -0
  88. levelfour/types/cost_breakdown_item.py +71 -0
  89. levelfour/types/cost_breakdown_raw_data.py +37 -0
  90. levelfour/types/cost_breakdown_raw_response.py +27 -0
  91. levelfour/types/cost_breakdown_response.py +27 -0
  92. levelfour/types/costs_breakdown_chart_data.py +48 -0
  93. levelfour/types/costs_breakdown_chart_response.py +27 -0
  94. levelfour/types/costs_breakdown_data_point.py +46 -0
  95. levelfour/types/costs_breakdown_grouped_chart_data.py +52 -0
  96. levelfour/types/costs_breakdown_grouped_chart_response.py +27 -0
  97. levelfour/types/costs_breakdown_grouped_data_point.py +36 -0
  98. levelfour/types/costs_breakdown_totals.py +41 -0
  99. levelfour/types/create_api_key_response.py +23 -0
  100. levelfour/types/daily_spending_breakdown_data.py +42 -0
  101. levelfour/types/daily_spending_breakdown_response.py +27 -0
  102. levelfour/types/daily_spending_data_point.py +31 -0
  103. levelfour/types/dashboard_summary_data.py +72 -0
  104. levelfour/types/dashboard_summary_response.py +27 -0
  105. levelfour/types/delete_endpoint_data.py +20 -0
  106. levelfour/types/delete_endpoint_response.py +23 -0
  107. levelfour/types/endpoint_data.py +23 -0
  108. levelfour/types/error_response.py +23 -0
  109. levelfour/types/error_response_error.py +21 -0
  110. levelfour/types/evaluation_status_data.py +71 -0
  111. levelfour/types/evaluation_status_response.py +27 -0
  112. levelfour/types/execution_log_command.py +21 -0
  113. levelfour/types/execution_log_entry.py +23 -0
  114. levelfour/types/execution_step_schema.py +23 -0
  115. levelfour/types/http_validation_error.py +20 -0
  116. levelfour/types/implementation_method_data.py +25 -0
  117. levelfour/types/implementation_method_response.py +27 -0
  118. levelfour/types/implementation_step.py +27 -0
  119. levelfour/types/internal_server_error.py +5 -0
  120. levelfour/types/list_api_keys_data.py +21 -0
  121. levelfour/types/list_api_keys_response.py +23 -0
  122. levelfour/types/list_endpoints_response.py +23 -0
  123. levelfour/types/metric_data_point.py +27 -0
  124. levelfour/types/metric_series.py +40 -0
  125. levelfour/types/metric_series_entry.py +25 -0
  126. levelfour/types/monthly_spending_data.py +27 -0
  127. levelfour/types/monthly_spending_data_point.py +31 -0
  128. levelfour/types/monthly_spending_response.py +27 -0
  129. levelfour/types/not_found_error.py +5 -0
  130. levelfour/types/pagination_meta.py +51 -0
  131. levelfour/types/processing_recommendation_item.py +61 -0
  132. levelfour/types/processing_recommendations_data.py +28 -0
  133. levelfour/types/processing_recommendations_response.py +27 -0
  134. levelfour/types/provider.py +46 -0
  135. levelfour/types/provider_breakdown_data.py +31 -0
  136. levelfour/types/provider_breakdown_item.py +77 -0
  137. levelfour/types/provider_breakdown_response.py +27 -0
  138. levelfour/types/provider_filter_options_data.py +51 -0
  139. levelfour/types/provider_filter_options_response.py +27 -0
  140. levelfour/types/provider_potential_savings_summary_data.py +46 -0
  141. levelfour/types/provider_potential_savings_summary_response.py +27 -0
  142. levelfour/types/provider_recommendations_summary_data.py +37 -0
  143. levelfour/types/provider_recommendations_summary_response.py +27 -0
  144. levelfour/types/provider_saved_summary_data.py +56 -0
  145. levelfour/types/provider_saved_summary_response.py +27 -0
  146. levelfour/types/provider_service_breakdown_data.py +65 -0
  147. levelfour/types/provider_service_breakdown_item.py +72 -0
  148. levelfour/types/provider_service_breakdown_raw_data.py +62 -0
  149. levelfour/types/provider_service_breakdown_raw_response.py +27 -0
  150. levelfour/types/provider_service_breakdown_response.py +27 -0
  151. levelfour/types/provider_service_costs_breakdown_data.py +62 -0
  152. levelfour/types/provider_service_costs_breakdown_response.py +27 -0
  153. levelfour/types/provider_service_costs_data_point.py +36 -0
  154. levelfour/types/provider_spending.py +61 -0
  155. levelfour/types/provider_spending_summary_data.py +67 -0
  156. levelfour/types/provider_spending_summary_response.py +27 -0
  157. levelfour/types/provider_timeline_data.py +57 -0
  158. levelfour/types/provider_timeline_response.py +27 -0
  159. levelfour/types/provider_top_service.py +36 -0
  160. levelfour/types/providers_summary_data.py +24 -0
  161. levelfour/types/providers_summary_response.py +27 -0
  162. levelfour/types/rate_limit_error.py +5 -0
  163. levelfour/types/recommendation_actions.py +60 -0
  164. levelfour/types/recommendation_detail.py +42 -0
  165. levelfour/types/recommendation_detail_response.py +27 -0
  166. levelfour/types/recommendation_filter_options_data.py +41 -0
  167. levelfour/types/recommendation_filter_options_response.py +27 -0
  168. levelfour/types/recommendation_item.py +36 -0
  169. levelfour/types/recommendation_wizard_data.py +173 -0
  170. levelfour/types/recommendation_wizard_data_metrics.py +7 -0
  171. levelfour/types/recommendation_wizard_response.py +27 -0
  172. levelfour/types/recommendations_breakdown_data.py +26 -0
  173. levelfour/types/recommendations_breakdown_response.py +27 -0
  174. levelfour/types/recommendations_overview_data.py +51 -0
  175. levelfour/types/recommendations_overview_response.py +27 -0
  176. levelfour/types/register_endpoint_response.py +23 -0
  177. levelfour/types/resource_change.py +42 -0
  178. levelfour/types/resource_snapshot.py +21 -0
  179. levelfour/types/revoke_api_key_data.py +20 -0
  180. levelfour/types/revoke_api_key_response.py +23 -0
  181. levelfour/types/risk_assessment.py +29 -0
  182. levelfour/types/risk_factor.py +27 -0
  183. levelfour/types/saved_breakdown_data.py +31 -0
  184. levelfour/types/saved_breakdown_response.py +27 -0
  185. levelfour/types/saved_by_provider_breakdown_data.py +31 -0
  186. levelfour/types/saved_by_provider_breakdown_response.py +27 -0
  187. levelfour/types/saved_by_provider_item.py +76 -0
  188. levelfour/types/saved_item.py +35 -0
  189. levelfour/types/saved_provider_summary.py +36 -0
  190. levelfour/types/saved_summary_data.py +57 -0
  191. levelfour/types/saved_summary_response.py +27 -0
  192. levelfour/types/savings_decision_data.py +28 -0
  193. levelfour/types/savings_decision_response.py +27 -0
  194. levelfour/types/spending_by_date_item.py +36 -0
  195. levelfour/types/top_recommendation.py +56 -0
  196. levelfour/types/trigger_info.py +22 -0
  197. levelfour/types/update_tag_data.py +20 -0
  198. levelfour/types/update_tag_response.py +23 -0
  199. levelfour/types/validation_error.py +24 -0
  200. levelfour/types/validation_error_loc_item.py +5 -0
  201. levelfour/webhooks/__init__.py +4 -0
  202. levelfour/webhooks/client.py +273 -0
  203. levelfour/webhooks/raw_client.py +483 -0
  204. levelfour/webhooks/verifier.py +61 -0
  205. levelfour-0.1.0.dist-info/METADATA +12 -0
  206. levelfour-0.1.0.dist-info/RECORD +208 -0
  207. levelfour-0.1.0.dist-info/WHEEL +5 -0
  208. levelfour-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,56 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class TopRecommendation(UniversalBaseModel):
10
+ """
11
+ Top recommendation for a specific provider
12
+ """
13
+
14
+ recommendation_id: str = pydantic.Field()
15
+ """
16
+ Unique identifier for the recommendation
17
+ """
18
+
19
+ service: str = pydantic.Field()
20
+ """
21
+ Service name (e.g., EC2, Cloud SQL, Virtual Machines)
22
+ """
23
+
24
+ monthly_savings: float = pydantic.Field()
25
+ """
26
+ Monthly savings amount
27
+ """
28
+
29
+ annual_savings: float = pydantic.Field()
30
+ """
31
+ Annual savings amount
32
+ """
33
+
34
+ current_monthly_spending: float = pydantic.Field()
35
+ """
36
+ Current monthly spending for this resource
37
+ """
38
+
39
+ savings_percentage: float = pydantic.Field()
40
+ """
41
+ Savings as percentage of current spending
42
+ """
43
+
44
+ status: str = pydantic.Field()
45
+ """
46
+ Display status: available, pending, processing, optimized, rejected, unavailable
47
+ """
48
+
49
+ if IS_PYDANTIC_V2:
50
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
51
+ else:
52
+
53
+ class Config:
54
+ frozen = True
55
+ smart_union = True
56
+ extra = pydantic.Extra.allow
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class TriggerInfo(UniversalBaseModel):
10
+ triggered_via: str
11
+ triggered_by_email: str
12
+ triggered_at: typing.Optional[str] = None
13
+ approved_by: typing.Optional[typing.List[str]] = None
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -0,0 +1,20 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class UpdateTagData(UniversalBaseModel):
10
+ recommendation_id: str
11
+ tag: typing.Optional[str] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from .update_tag_data import UpdateTagData
9
+
10
+
11
+ class UpdateTagResponse(UniversalBaseModel):
12
+ success: typing.Optional[bool] = None
13
+ timestamp: typing.Optional[dt.datetime] = None
14
+ data: UpdateTagData
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .validation_error_loc_item import ValidationErrorLocItem
8
+
9
+
10
+ class ValidationError(UniversalBaseModel):
11
+ loc: typing.List[ValidationErrorLocItem]
12
+ msg: str
13
+ type: str
14
+ input: typing.Optional[typing.Any] = None
15
+ ctx: typing.Optional[typing.Dict[str, typing.Any]] = None
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ValidationErrorLocItem = typing.Union[str, int]
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
@@ -0,0 +1,273 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.delete_endpoint_response import DeleteEndpointResponse
8
+ from ..types.list_endpoints_response import ListEndpointsResponse
9
+ from ..types.register_endpoint_response import RegisterEndpointResponse
10
+ from .raw_client import AsyncRawWebhooksClient, RawWebhooksClient
11
+
12
+ # this is used as the default value for optional parameters
13
+ OMIT = typing.cast(typing.Any, ...)
14
+
15
+
16
+ class WebhooksClient:
17
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
18
+ self._raw_client = RawWebhooksClient(client_wrapper=client_wrapper)
19
+
20
+ @property
21
+ def with_raw_response(self) -> RawWebhooksClient:
22
+ """
23
+ Retrieves a raw implementation of this client that returns raw responses.
24
+
25
+ Returns
26
+ -------
27
+ RawWebhooksClient
28
+ """
29
+ return self._raw_client
30
+
31
+ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListEndpointsResponse:
32
+ """
33
+ Parameters
34
+ ----------
35
+ request_options : typing.Optional[RequestOptions]
36
+ Request-specific configuration.
37
+
38
+ Returns
39
+ -------
40
+ ListEndpointsResponse
41
+ Successful Response
42
+
43
+ Examples
44
+ --------
45
+ from levelfour import BaseLevelFour
46
+
47
+ client = BaseLevelFour(
48
+ token="YOUR_TOKEN",
49
+ base_url="https://yourhost.com/path/to/api",
50
+ )
51
+ client.webhooks.list()
52
+ """
53
+ _response = self._raw_client.list(request_options=request_options)
54
+ return _response.data
55
+
56
+ def register(
57
+ self,
58
+ *,
59
+ url: str,
60
+ event_types: typing.Sequence[str],
61
+ description: typing.Optional[str] = OMIT,
62
+ request_options: typing.Optional[RequestOptions] = None,
63
+ ) -> RegisterEndpointResponse:
64
+ """
65
+ Parameters
66
+ ----------
67
+ url : str
68
+ Webhook endpoint URL
69
+
70
+ event_types : typing.Sequence[str]
71
+ Event types to subscribe to
72
+
73
+ description : typing.Optional[str]
74
+
75
+ request_options : typing.Optional[RequestOptions]
76
+ Request-specific configuration.
77
+
78
+ Returns
79
+ -------
80
+ RegisterEndpointResponse
81
+ Successful Response
82
+
83
+ Examples
84
+ --------
85
+ from levelfour import BaseLevelFour
86
+
87
+ client = BaseLevelFour(
88
+ token="YOUR_TOKEN",
89
+ base_url="https://yourhost.com/path/to/api",
90
+ )
91
+ client.webhooks.register(
92
+ url="url",
93
+ event_types=["event_types"],
94
+ )
95
+ """
96
+ _response = self._raw_client.register(
97
+ url=url, event_types=event_types, description=description, request_options=request_options
98
+ )
99
+ return _response.data
100
+
101
+ def delete(
102
+ self, endpoint_id: str, *, request_options: typing.Optional[RequestOptions] = None
103
+ ) -> DeleteEndpointResponse:
104
+ """
105
+ Parameters
106
+ ----------
107
+ endpoint_id : str
108
+ Webhook endpoint ID
109
+
110
+ request_options : typing.Optional[RequestOptions]
111
+ Request-specific configuration.
112
+
113
+ Returns
114
+ -------
115
+ DeleteEndpointResponse
116
+ Successful Response
117
+
118
+ Examples
119
+ --------
120
+ from levelfour import BaseLevelFour
121
+
122
+ client = BaseLevelFour(
123
+ token="YOUR_TOKEN",
124
+ base_url="https://yourhost.com/path/to/api",
125
+ )
126
+ client.webhooks.delete(
127
+ endpoint_id="endpoint_id",
128
+ )
129
+ """
130
+ _response = self._raw_client.delete(endpoint_id, request_options=request_options)
131
+ return _response.data
132
+
133
+
134
+ class AsyncWebhooksClient:
135
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
136
+ self._raw_client = AsyncRawWebhooksClient(client_wrapper=client_wrapper)
137
+
138
+ @property
139
+ def with_raw_response(self) -> AsyncRawWebhooksClient:
140
+ """
141
+ Retrieves a raw implementation of this client that returns raw responses.
142
+
143
+ Returns
144
+ -------
145
+ AsyncRawWebhooksClient
146
+ """
147
+ return self._raw_client
148
+
149
+ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListEndpointsResponse:
150
+ """
151
+ Parameters
152
+ ----------
153
+ request_options : typing.Optional[RequestOptions]
154
+ Request-specific configuration.
155
+
156
+ Returns
157
+ -------
158
+ ListEndpointsResponse
159
+ Successful Response
160
+
161
+ Examples
162
+ --------
163
+ import asyncio
164
+
165
+ from levelfour import AsyncBaseLevelFour
166
+
167
+ client = AsyncBaseLevelFour(
168
+ token="YOUR_TOKEN",
169
+ base_url="https://yourhost.com/path/to/api",
170
+ )
171
+
172
+
173
+ async def main() -> None:
174
+ await client.webhooks.list()
175
+
176
+
177
+ asyncio.run(main())
178
+ """
179
+ _response = await self._raw_client.list(request_options=request_options)
180
+ return _response.data
181
+
182
+ async def register(
183
+ self,
184
+ *,
185
+ url: str,
186
+ event_types: typing.Sequence[str],
187
+ description: typing.Optional[str] = OMIT,
188
+ request_options: typing.Optional[RequestOptions] = None,
189
+ ) -> RegisterEndpointResponse:
190
+ """
191
+ Parameters
192
+ ----------
193
+ url : str
194
+ Webhook endpoint URL
195
+
196
+ event_types : typing.Sequence[str]
197
+ Event types to subscribe to
198
+
199
+ description : typing.Optional[str]
200
+
201
+ request_options : typing.Optional[RequestOptions]
202
+ Request-specific configuration.
203
+
204
+ Returns
205
+ -------
206
+ RegisterEndpointResponse
207
+ Successful Response
208
+
209
+ Examples
210
+ --------
211
+ import asyncio
212
+
213
+ from levelfour import AsyncBaseLevelFour
214
+
215
+ client = AsyncBaseLevelFour(
216
+ token="YOUR_TOKEN",
217
+ base_url="https://yourhost.com/path/to/api",
218
+ )
219
+
220
+
221
+ async def main() -> None:
222
+ await client.webhooks.register(
223
+ url="url",
224
+ event_types=["event_types"],
225
+ )
226
+
227
+
228
+ asyncio.run(main())
229
+ """
230
+ _response = await self._raw_client.register(
231
+ url=url, event_types=event_types, description=description, request_options=request_options
232
+ )
233
+ return _response.data
234
+
235
+ async def delete(
236
+ self, endpoint_id: str, *, request_options: typing.Optional[RequestOptions] = None
237
+ ) -> DeleteEndpointResponse:
238
+ """
239
+ Parameters
240
+ ----------
241
+ endpoint_id : str
242
+ Webhook endpoint ID
243
+
244
+ request_options : typing.Optional[RequestOptions]
245
+ Request-specific configuration.
246
+
247
+ Returns
248
+ -------
249
+ DeleteEndpointResponse
250
+ Successful Response
251
+
252
+ Examples
253
+ --------
254
+ import asyncio
255
+
256
+ from levelfour import AsyncBaseLevelFour
257
+
258
+ client = AsyncBaseLevelFour(
259
+ token="YOUR_TOKEN",
260
+ base_url="https://yourhost.com/path/to/api",
261
+ )
262
+
263
+
264
+ async def main() -> None:
265
+ await client.webhooks.delete(
266
+ endpoint_id="endpoint_id",
267
+ )
268
+
269
+
270
+ asyncio.run(main())
271
+ """
272
+ _response = await self._raw_client.delete(endpoint_id, request_options=request_options)
273
+ return _response.data