Skip to content

Commit 8a42429

Browse files
authored
feat: update generated APIs (#552)
1 parent f058b85 commit 8a42429

File tree

6 files changed

+154
-0
lines changed

6 files changed

+154
-0
lines changed

scaleway-async/scaleway_async/tem/v1alpha1/api.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
ListEmailsRequestOrderBy,
2222
ListWebhookEventsRequestOrderBy,
2323
ListWebhooksRequestOrderBy,
24+
WebhookEventStatus,
2425
WebhookEventType,
2526
CreateDomainRequest,
2627
CreateEmailRequest,
@@ -929,13 +930,25 @@ async def list_webhook_events(
929930
order_by: Optional[ListWebhookEventsRequestOrderBy] = None,
930931
page: Optional[int] = None,
931932
page_size: Optional[int] = None,
933+
email_id: Optional[str] = None,
934+
event_types: Optional[List[WebhookEventType]] = None,
935+
statuses: Optional[List[WebhookEventStatus]] = None,
936+
project_id: Optional[str] = None,
937+
organization_id: Optional[str] = None,
938+
domain_id: Optional[str] = None,
932939
) -> ListWebhookEventsResponse:
933940
"""
934941
:param webhook_id: ID of the Webhook linked to the events.
935942
:param region: Region to target. If none is passed will use default region from the config.
936943
:param order_by: (Optional) List Webhook events corresponding to specific criteria.
937944
:param page: Requested page number. Value must be greater or equal to 1.
938945
:param page_size: Requested page size. Value must be between 1 and 100.
946+
:param email_id: ID of the email linked to the events.
947+
:param event_types: List of event types linked to the events.
948+
:param statuses: List of event statuses.
949+
:param project_id: ID of the webhook Project.
950+
:param organization_id: ID of the webhook Organization.
951+
:param domain_id: ID of the domain to watch for triggering events.
939952
:return: :class:`ListWebhookEventsResponse <ListWebhookEventsResponse>`
940953
941954
Usage:
@@ -955,9 +968,16 @@ async def list_webhook_events(
955968
"GET",
956969
f"/transactional-email/v1alpha1/regions/{param_region}/webhooks/{param_webhook_id}/events",
957970
params={
971+
"domain_id": domain_id,
972+
"email_id": email_id,
973+
"event_types": event_types,
958974
"order_by": order_by,
975+
"organization_id": organization_id
976+
or self.client.default_organization_id,
959977
"page": page,
960978
"page_size": page_size or self.client.default_page_size,
979+
"project_id": project_id or self.client.default_project_id,
980+
"statuses": statuses,
961981
},
962982
)
963983

@@ -972,13 +992,25 @@ async def list_webhook_events_all(
972992
order_by: Optional[ListWebhookEventsRequestOrderBy] = None,
973993
page: Optional[int] = None,
974994
page_size: Optional[int] = None,
995+
email_id: Optional[str] = None,
996+
event_types: Optional[List[WebhookEventType]] = None,
997+
statuses: Optional[List[WebhookEventStatus]] = None,
998+
project_id: Optional[str] = None,
999+
organization_id: Optional[str] = None,
1000+
domain_id: Optional[str] = None,
9751001
) -> List[WebhookEvent]:
9761002
"""
9771003
:param webhook_id: ID of the Webhook linked to the events.
9781004
:param region: Region to target. If none is passed will use default region from the config.
9791005
:param order_by: (Optional) List Webhook events corresponding to specific criteria.
9801006
:param page: Requested page number. Value must be greater or equal to 1.
9811007
:param page_size: Requested page size. Value must be between 1 and 100.
1008+
:param email_id: ID of the email linked to the events.
1009+
:param event_types: List of event types linked to the events.
1010+
:param statuses: List of event statuses.
1011+
:param project_id: ID of the webhook Project.
1012+
:param organization_id: ID of the webhook Organization.
1013+
:param domain_id: ID of the domain to watch for triggering events.
9821014
:return: :class:`List[WebhookEvent] <List[WebhookEvent]>`
9831015
9841016
Usage:
@@ -999,5 +1031,11 @@ async def list_webhook_events_all(
9991031
"order_by": order_by,
10001032
"page": page,
10011033
"page_size": page_size,
1034+
"email_id": email_id,
1035+
"event_types": event_types,
1036+
"statuses": statuses,
1037+
"project_id": project_id,
1038+
"organization_id": organization_id,
1039+
"domain_id": domain_id,
10021040
},
10031041
)

scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@ def unmarshal_WebhookEvent(data: Any) -> WebhookEvent:
603603
if field is not None:
604604
args["project_id"] = field
605605

606+
field = data.get("domain_id", None)
607+
if field is not None:
608+
args["domain_id"] = field
609+
606610
field = data.get("type", None)
607611
if field is not None:
608612
args["type_"] = field

scaleway-async/scaleway_async/tem/v1alpha1/types.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ class WebhookEvent:
507507
ID of the Webhook Event Project.
508508
"""
509509

510+
domain_id: str
511+
"""
512+
ID of the webhook event domain.
513+
"""
514+
510515
type_: WebhookEventType
511516
"""
512517
Type of the Webhook Event.
@@ -987,6 +992,36 @@ class ListWebhookEventsRequest:
987992
Requested page size. Value must be between 1 and 100.
988993
"""
989994

995+
email_id: Optional[str]
996+
"""
997+
ID of the email linked to the events.
998+
"""
999+
1000+
event_types: Optional[List[WebhookEventType]]
1001+
"""
1002+
List of event types linked to the events.
1003+
"""
1004+
1005+
statuses: Optional[List[WebhookEventStatus]]
1006+
"""
1007+
List of event statuses.
1008+
"""
1009+
1010+
project_id: Optional[str]
1011+
"""
1012+
ID of the webhook Project.
1013+
"""
1014+
1015+
organization_id: Optional[str]
1016+
"""
1017+
ID of the webhook Organization.
1018+
"""
1019+
1020+
domain_id: Optional[str]
1021+
"""
1022+
ID of the domain to watch for triggering events.
1023+
"""
1024+
9901025

9911026
@dataclass
9921027
class ListWebhookEventsResponse:

scaleway/scaleway/tem/v1alpha1/api.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
ListEmailsRequestOrderBy,
2222
ListWebhookEventsRequestOrderBy,
2323
ListWebhooksRequestOrderBy,
24+
WebhookEventStatus,
2425
WebhookEventType,
2526
CreateDomainRequest,
2627
CreateEmailRequest,
@@ -929,13 +930,25 @@ def list_webhook_events(
929930
order_by: Optional[ListWebhookEventsRequestOrderBy] = None,
930931
page: Optional[int] = None,
931932
page_size: Optional[int] = None,
933+
email_id: Optional[str] = None,
934+
event_types: Optional[List[WebhookEventType]] = None,
935+
statuses: Optional[List[WebhookEventStatus]] = None,
936+
project_id: Optional[str] = None,
937+
organization_id: Optional[str] = None,
938+
domain_id: Optional[str] = None,
932939
) -> ListWebhookEventsResponse:
933940
"""
934941
:param webhook_id: ID of the Webhook linked to the events.
935942
:param region: Region to target. If none is passed will use default region from the config.
936943
:param order_by: (Optional) List Webhook events corresponding to specific criteria.
937944
:param page: Requested page number. Value must be greater or equal to 1.
938945
:param page_size: Requested page size. Value must be between 1 and 100.
946+
:param email_id: ID of the email linked to the events.
947+
:param event_types: List of event types linked to the events.
948+
:param statuses: List of event statuses.
949+
:param project_id: ID of the webhook Project.
950+
:param organization_id: ID of the webhook Organization.
951+
:param domain_id: ID of the domain to watch for triggering events.
939952
:return: :class:`ListWebhookEventsResponse <ListWebhookEventsResponse>`
940953
941954
Usage:
@@ -955,9 +968,16 @@ def list_webhook_events(
955968
"GET",
956969
f"/transactional-email/v1alpha1/regions/{param_region}/webhooks/{param_webhook_id}/events",
957970
params={
971+
"domain_id": domain_id,
972+
"email_id": email_id,
973+
"event_types": event_types,
958974
"order_by": order_by,
975+
"organization_id": organization_id
976+
or self.client.default_organization_id,
959977
"page": page,
960978
"page_size": page_size or self.client.default_page_size,
979+
"project_id": project_id or self.client.default_project_id,
980+
"statuses": statuses,
961981
},
962982
)
963983

@@ -972,13 +992,25 @@ def list_webhook_events_all(
972992
order_by: Optional[ListWebhookEventsRequestOrderBy] = None,
973993
page: Optional[int] = None,
974994
page_size: Optional[int] = None,
995+
email_id: Optional[str] = None,
996+
event_types: Optional[List[WebhookEventType]] = None,
997+
statuses: Optional[List[WebhookEventStatus]] = None,
998+
project_id: Optional[str] = None,
999+
organization_id: Optional[str] = None,
1000+
domain_id: Optional[str] = None,
9751001
) -> List[WebhookEvent]:
9761002
"""
9771003
:param webhook_id: ID of the Webhook linked to the events.
9781004
:param region: Region to target. If none is passed will use default region from the config.
9791005
:param order_by: (Optional) List Webhook events corresponding to specific criteria.
9801006
:param page: Requested page number. Value must be greater or equal to 1.
9811007
:param page_size: Requested page size. Value must be between 1 and 100.
1008+
:param email_id: ID of the email linked to the events.
1009+
:param event_types: List of event types linked to the events.
1010+
:param statuses: List of event statuses.
1011+
:param project_id: ID of the webhook Project.
1012+
:param organization_id: ID of the webhook Organization.
1013+
:param domain_id: ID of the domain to watch for triggering events.
9821014
:return: :class:`List[WebhookEvent] <List[WebhookEvent]>`
9831015
9841016
Usage:
@@ -999,5 +1031,11 @@ def list_webhook_events_all(
9991031
"order_by": order_by,
10001032
"page": page,
10011033
"page_size": page_size,
1034+
"email_id": email_id,
1035+
"event_types": event_types,
1036+
"statuses": statuses,
1037+
"project_id": project_id,
1038+
"organization_id": organization_id,
1039+
"domain_id": domain_id,
10021040
},
10031041
)

scaleway/scaleway/tem/v1alpha1/marshalling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@ def unmarshal_WebhookEvent(data: Any) -> WebhookEvent:
603603
if field is not None:
604604
args["project_id"] = field
605605

606+
field = data.get("domain_id", None)
607+
if field is not None:
608+
args["domain_id"] = field
609+
606610
field = data.get("type", None)
607611
if field is not None:
608612
args["type_"] = field

scaleway/scaleway/tem/v1alpha1/types.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ class WebhookEvent:
507507
ID of the Webhook Event Project.
508508
"""
509509

510+
domain_id: str
511+
"""
512+
ID of the webhook event domain.
513+
"""
514+
510515
type_: WebhookEventType
511516
"""
512517
Type of the Webhook Event.
@@ -987,6 +992,36 @@ class ListWebhookEventsRequest:
987992
Requested page size. Value must be between 1 and 100.
988993
"""
989994

995+
email_id: Optional[str]
996+
"""
997+
ID of the email linked to the events.
998+
"""
999+
1000+
event_types: Optional[List[WebhookEventType]]
1001+
"""
1002+
List of event types linked to the events.
1003+
"""
1004+
1005+
statuses: Optional[List[WebhookEventStatus]]
1006+
"""
1007+
List of event statuses.
1008+
"""
1009+
1010+
project_id: Optional[str]
1011+
"""
1012+
ID of the webhook Project.
1013+
"""
1014+
1015+
organization_id: Optional[str]
1016+
"""
1017+
ID of the webhook Organization.
1018+
"""
1019+
1020+
domain_id: Optional[str]
1021+
"""
1022+
ID of the domain to watch for triggering events.
1023+
"""
1024+
9901025

9911026
@dataclass
9921027
class ListWebhookEventsResponse:

0 commit comments

Comments
 (0)