From 9705da15cde64014b3cc873e8044e5c9cccdb733 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 13 Jun 2024 14:26:21 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/tem/v1alpha1/api.py | 38 +++++++++++++++++++ .../tem/v1alpha1/marshalling.py | 4 ++ .../scaleway_async/tem/v1alpha1/types.py | 35 +++++++++++++++++ scaleway/scaleway/tem/v1alpha1/api.py | 38 +++++++++++++++++++ scaleway/scaleway/tem/v1alpha1/marshalling.py | 4 ++ scaleway/scaleway/tem/v1alpha1/types.py | 35 +++++++++++++++++ 6 files changed, 154 insertions(+) diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/api.py b/scaleway-async/scaleway_async/tem/v1alpha1/api.py index 2a6d24bad..8ed3a0f8c 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/api.py @@ -21,6 +21,7 @@ ListEmailsRequestOrderBy, ListWebhookEventsRequestOrderBy, ListWebhooksRequestOrderBy, + WebhookEventStatus, WebhookEventType, CreateDomainRequest, CreateEmailRequest, @@ -929,6 +930,12 @@ async def list_webhook_events( order_by: Optional[ListWebhookEventsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + email_id: Optional[str] = None, + event_types: Optional[List[WebhookEventType]] = None, + statuses: Optional[List[WebhookEventStatus]] = None, + project_id: Optional[str] = None, + organization_id: Optional[str] = None, + domain_id: Optional[str] = None, ) -> ListWebhookEventsResponse: """ :param webhook_id: ID of the Webhook linked to the events. @@ -936,6 +943,12 @@ async def list_webhook_events( :param order_by: (Optional) List Webhook events corresponding to specific criteria. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Requested page size. Value must be between 1 and 100. + :param email_id: ID of the email linked to the events. + :param event_types: List of event types linked to the events. + :param statuses: List of event statuses. + :param project_id: ID of the webhook Project. + :param organization_id: ID of the webhook Organization. + :param domain_id: ID of the domain to watch for triggering events. :return: :class:`ListWebhookEventsResponse ` Usage: @@ -955,9 +968,16 @@ async def list_webhook_events( "GET", f"/transactional-email/v1alpha1/regions/{param_region}/webhooks/{param_webhook_id}/events", params={ + "domain_id": domain_id, + "email_id": email_id, + "event_types": event_types, "order_by": order_by, + "organization_id": organization_id + or self.client.default_organization_id, "page": page, "page_size": page_size or self.client.default_page_size, + "project_id": project_id or self.client.default_project_id, + "statuses": statuses, }, ) @@ -972,6 +992,12 @@ async def list_webhook_events_all( order_by: Optional[ListWebhookEventsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + email_id: Optional[str] = None, + event_types: Optional[List[WebhookEventType]] = None, + statuses: Optional[List[WebhookEventStatus]] = None, + project_id: Optional[str] = None, + organization_id: Optional[str] = None, + domain_id: Optional[str] = None, ) -> List[WebhookEvent]: """ :param webhook_id: ID of the Webhook linked to the events. @@ -979,6 +1005,12 @@ async def list_webhook_events_all( :param order_by: (Optional) List Webhook events corresponding to specific criteria. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Requested page size. Value must be between 1 and 100. + :param email_id: ID of the email linked to the events. + :param event_types: List of event types linked to the events. + :param statuses: List of event statuses. + :param project_id: ID of the webhook Project. + :param organization_id: ID of the webhook Organization. + :param domain_id: ID of the domain to watch for triggering events. :return: :class:`List[WebhookEvent] ` Usage: @@ -999,5 +1031,11 @@ async def list_webhook_events_all( "order_by": order_by, "page": page, "page_size": page_size, + "email_id": email_id, + "event_types": event_types, + "statuses": statuses, + "project_id": project_id, + "organization_id": organization_id, + "domain_id": domain_id, }, ) diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py index dae106c6f..6941bd767 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py @@ -603,6 +603,10 @@ def unmarshal_WebhookEvent(data: Any) -> WebhookEvent: if field is not None: args["project_id"] = field + field = data.get("domain_id", None) + if field is not None: + args["domain_id"] = field + field = data.get("type", None) if field is not None: args["type_"] = field diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/types.py b/scaleway-async/scaleway_async/tem/v1alpha1/types.py index 0e4e1b4de..e76fb1db6 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/types.py @@ -507,6 +507,11 @@ class WebhookEvent: ID of the Webhook Event Project. """ + domain_id: str + """ + ID of the webhook event domain. + """ + type_: WebhookEventType """ Type of the Webhook Event. @@ -987,6 +992,36 @@ class ListWebhookEventsRequest: Requested page size. Value must be between 1 and 100. """ + email_id: Optional[str] + """ + ID of the email linked to the events. + """ + + event_types: Optional[List[WebhookEventType]] + """ + List of event types linked to the events. + """ + + statuses: Optional[List[WebhookEventStatus]] + """ + List of event statuses. + """ + + project_id: Optional[str] + """ + ID of the webhook Project. + """ + + organization_id: Optional[str] + """ + ID of the webhook Organization. + """ + + domain_id: Optional[str] + """ + ID of the domain to watch for triggering events. + """ + @dataclass class ListWebhookEventsResponse: diff --git a/scaleway/scaleway/tem/v1alpha1/api.py b/scaleway/scaleway/tem/v1alpha1/api.py index 3071cfe41..229bf8316 100644 --- a/scaleway/scaleway/tem/v1alpha1/api.py +++ b/scaleway/scaleway/tem/v1alpha1/api.py @@ -21,6 +21,7 @@ ListEmailsRequestOrderBy, ListWebhookEventsRequestOrderBy, ListWebhooksRequestOrderBy, + WebhookEventStatus, WebhookEventType, CreateDomainRequest, CreateEmailRequest, @@ -929,6 +930,12 @@ def list_webhook_events( order_by: Optional[ListWebhookEventsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + email_id: Optional[str] = None, + event_types: Optional[List[WebhookEventType]] = None, + statuses: Optional[List[WebhookEventStatus]] = None, + project_id: Optional[str] = None, + organization_id: Optional[str] = None, + domain_id: Optional[str] = None, ) -> ListWebhookEventsResponse: """ :param webhook_id: ID of the Webhook linked to the events. @@ -936,6 +943,12 @@ def list_webhook_events( :param order_by: (Optional) List Webhook events corresponding to specific criteria. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Requested page size. Value must be between 1 and 100. + :param email_id: ID of the email linked to the events. + :param event_types: List of event types linked to the events. + :param statuses: List of event statuses. + :param project_id: ID of the webhook Project. + :param organization_id: ID of the webhook Organization. + :param domain_id: ID of the domain to watch for triggering events. :return: :class:`ListWebhookEventsResponse ` Usage: @@ -955,9 +968,16 @@ def list_webhook_events( "GET", f"/transactional-email/v1alpha1/regions/{param_region}/webhooks/{param_webhook_id}/events", params={ + "domain_id": domain_id, + "email_id": email_id, + "event_types": event_types, "order_by": order_by, + "organization_id": organization_id + or self.client.default_organization_id, "page": page, "page_size": page_size or self.client.default_page_size, + "project_id": project_id or self.client.default_project_id, + "statuses": statuses, }, ) @@ -972,6 +992,12 @@ def list_webhook_events_all( order_by: Optional[ListWebhookEventsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + email_id: Optional[str] = None, + event_types: Optional[List[WebhookEventType]] = None, + statuses: Optional[List[WebhookEventStatus]] = None, + project_id: Optional[str] = None, + organization_id: Optional[str] = None, + domain_id: Optional[str] = None, ) -> List[WebhookEvent]: """ :param webhook_id: ID of the Webhook linked to the events. @@ -979,6 +1005,12 @@ def list_webhook_events_all( :param order_by: (Optional) List Webhook events corresponding to specific criteria. :param page: Requested page number. Value must be greater or equal to 1. :param page_size: Requested page size. Value must be between 1 and 100. + :param email_id: ID of the email linked to the events. + :param event_types: List of event types linked to the events. + :param statuses: List of event statuses. + :param project_id: ID of the webhook Project. + :param organization_id: ID of the webhook Organization. + :param domain_id: ID of the domain to watch for triggering events. :return: :class:`List[WebhookEvent] ` Usage: @@ -999,5 +1031,11 @@ def list_webhook_events_all( "order_by": order_by, "page": page, "page_size": page_size, + "email_id": email_id, + "event_types": event_types, + "statuses": statuses, + "project_id": project_id, + "organization_id": organization_id, + "domain_id": domain_id, }, ) diff --git a/scaleway/scaleway/tem/v1alpha1/marshalling.py b/scaleway/scaleway/tem/v1alpha1/marshalling.py index dae106c6f..6941bd767 100644 --- a/scaleway/scaleway/tem/v1alpha1/marshalling.py +++ b/scaleway/scaleway/tem/v1alpha1/marshalling.py @@ -603,6 +603,10 @@ def unmarshal_WebhookEvent(data: Any) -> WebhookEvent: if field is not None: args["project_id"] = field + field = data.get("domain_id", None) + if field is not None: + args["domain_id"] = field + field = data.get("type", None) if field is not None: args["type_"] = field diff --git a/scaleway/scaleway/tem/v1alpha1/types.py b/scaleway/scaleway/tem/v1alpha1/types.py index 0e4e1b4de..e76fb1db6 100644 --- a/scaleway/scaleway/tem/v1alpha1/types.py +++ b/scaleway/scaleway/tem/v1alpha1/types.py @@ -507,6 +507,11 @@ class WebhookEvent: ID of the Webhook Event Project. """ + domain_id: str + """ + ID of the webhook event domain. + """ + type_: WebhookEventType """ Type of the Webhook Event. @@ -987,6 +992,36 @@ class ListWebhookEventsRequest: Requested page size. Value must be between 1 and 100. """ + email_id: Optional[str] + """ + ID of the email linked to the events. + """ + + event_types: Optional[List[WebhookEventType]] + """ + List of event types linked to the events. + """ + + statuses: Optional[List[WebhookEventStatus]] + """ + List of event statuses. + """ + + project_id: Optional[str] + """ + ID of the webhook Project. + """ + + organization_id: Optional[str] + """ + ID of the webhook Organization. + """ + + domain_id: Optional[str] + """ + ID of the domain to watch for triggering events. + """ + @dataclass class ListWebhookEventsResponse: