Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/convoy/api/events/create_broadcast_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def sync_detailed(

This endpoint creates a event that is broadcast to every endpoint whose subscription matches the
given event type.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -151,6 +153,8 @@ def sync(

This endpoint creates a event that is broadcast to every endpoint whose subscription matches the
given event type.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -186,6 +190,8 @@ async def asyncio_detailed(

This endpoint creates a event that is broadcast to every endpoint whose subscription matches the
given event type.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -225,6 +231,8 @@ async def asyncio(

This endpoint creates a event that is broadcast to every endpoint whose subscription matches the
given event type.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down
20 changes: 12 additions & 8 deletions src/convoy/api/events/create_dynamic_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def sync_detailed(
]:
"""Dynamic Events

This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you
supply the endpoint and the payload, and Convoy delivers the events
This endpoint creates a dynamic event without creating the endpoint and subscription ahead of time.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -141,8 +142,9 @@ def sync(
):
"""Dynamic Events

This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you
supply the endpoint and the payload, and Convoy delivers the events
This endpoint creates a dynamic event without creating the endpoint and subscription ahead of time.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -176,8 +178,9 @@ async def asyncio_detailed(
]:
"""Dynamic Events

This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you
supply the endpoint and the payload, and Convoy delivers the events
This endpoint creates a dynamic event without creating the endpoint and subscription ahead of time.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -215,8 +218,9 @@ async def asyncio(
):
"""Dynamic Events

This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you
supply the endpoint and the payload, and Convoy delivers the events
This endpoint creates a dynamic event without creating the endpoint and subscription ahead of time.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down
8 changes: 8 additions & 0 deletions src/convoy/api/events/create_endpoint_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def sync_detailed(
"""Create an event

This endpoint creates an endpoint event
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -141,6 +143,8 @@ def sync(
"""Create an event

This endpoint creates an endpoint event
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -175,6 +179,8 @@ async def asyncio_detailed(
"""Create an event

This endpoint creates an endpoint event
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -213,6 +219,8 @@ async def asyncio(
"""Create an event

This endpoint creates an endpoint event
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down
8 changes: 8 additions & 0 deletions src/convoy/api/events/create_endpoint_fanout_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def sync_detailed(
"""Fan out an event

This endpoint uses the owner_id to fan out an event to multiple endpoints.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -149,6 +151,8 @@ def sync(
"""Fan out an event

This endpoint uses the owner_id to fan out an event to multiple endpoints.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -183,6 +187,8 @@ async def asyncio_detailed(
"""Fan out an event

This endpoint uses the owner_id to fan out an event to multiple endpoints.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down Expand Up @@ -221,6 +227,8 @@ async def asyncio(
"""Fan out an event

This endpoint uses the owner_id to fan out an event to multiple endpoints.
The 201 body includes uid (the event id). Use GET /events/{eventID} or GET /eventdeliveries?eventId=
to follow the send.

Args:
project_id (str):
Expand Down
2 changes: 2 additions & 0 deletions src/convoy/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
from .models_endpoint_period_failure_rate import ModelsEndpointPeriodFailureRate
from .models_endpoint_response import ModelsEndpointResponse
from .models_event_delivery_response import ModelsEventDeliveryResponse
from .models_event_queued_response import ModelsEventQueuedResponse
from .models_event_response import ModelsEventResponse
from .models_event_response_data_type_0 import ModelsEventResponseDataType0
from .models_event_type_response import ModelsEventTypeResponse
Expand Down Expand Up @@ -870,6 +871,7 @@
"ModelsEndpointPeriodFailureRate",
"ModelsEndpointResponse",
"ModelsEventDeliveryResponse",
"ModelsEventQueuedResponse",
"ModelsEventResponse",
"ModelsEventResponseDataType0",
"ModelsEventTypeResponse",
Expand Down
12 changes: 6 additions & 6 deletions src/convoy/models/create_broadcast_event_response_201.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.models_event_response import ModelsEventResponse
from ..models.models_event_queued_response import ModelsEventQueuedResponse


T = TypeVar("T", bound="CreateBroadcastEventResponse201")
Expand All @@ -21,12 +21,12 @@ class CreateBroadcastEventResponse201:
Attributes:
message (str | Unset):
status (bool | Unset):
data (ModelsEventResponse | Unset):
data (ModelsEventQueuedResponse | Unset):
"""

message: str | Unset = UNSET
status: bool | Unset = UNSET
data: ModelsEventResponse | Unset = UNSET
data: ModelsEventQueuedResponse | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand All @@ -52,19 +52,19 @@ def to_dict(self) -> dict[str, Any]:

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.models_event_response import ModelsEventResponse
from ..models.models_event_queued_response import ModelsEventQueuedResponse

d = dict(src_dict)
message = d.pop("message", UNSET)

status = d.pop("status", UNSET)

_data = d.pop("data", UNSET)
data: ModelsEventResponse | Unset
data: ModelsEventQueuedResponse | Unset
if isinstance(_data, Unset):
data = UNSET
else:
data = ModelsEventResponse.from_dict(_data)
data = ModelsEventQueuedResponse.from_dict(_data)

create_broadcast_event_response_201 = cls(
message=message,
Expand Down
44 changes: 13 additions & 31 deletions src/convoy/models/create_dynamic_event_response_201.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast
from typing import TYPE_CHECKING, Any, TypeVar

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.handlers_stub_type_0 import HandlersStubType0
from ..models.models_event_queued_response import ModelsEventQueuedResponse


T = TypeVar("T", bound="CreateDynamicEventResponse201")
Expand All @@ -21,28 +21,22 @@ class CreateDynamicEventResponse201:
Attributes:
message (str | Unset):
status (bool | Unset):
data (HandlersStubType0 | None | Unset):
data (ModelsEventQueuedResponse | Unset):
"""

message: str | Unset = UNSET
status: bool | Unset = UNSET
data: HandlersStubType0 | None | Unset = UNSET
data: ModelsEventQueuedResponse | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
from ..models.handlers_stub_type_0 import HandlersStubType0

message = self.message

status = self.status

data: dict[str, Any] | None | Unset
if isinstance(self.data, Unset):
data = UNSET
elif isinstance(self.data, HandlersStubType0):
data: dict[str, Any] | Unset = UNSET
if not isinstance(self.data, Unset):
data = self.data.to_dict()
else:
data = self.data

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
Expand All @@ -58,31 +52,19 @@ def to_dict(self) -> dict[str, Any]:

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.handlers_stub_type_0 import HandlersStubType0
from ..models.models_event_queued_response import ModelsEventQueuedResponse

d = dict(src_dict)
message = d.pop("message", UNSET)

status = d.pop("status", UNSET)

def _parse_data(data: object) -> HandlersStubType0 | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, dict):
raise TypeError()
componentsschemashandlers_stub_type_0 = HandlersStubType0.from_dict(
data
)

return componentsschemashandlers_stub_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
return cast(HandlersStubType0 | None | Unset, data)

data = _parse_data(d.pop("data", UNSET))
_data = d.pop("data", UNSET)
data: ModelsEventQueuedResponse | Unset
if isinstance(_data, Unset):
data = UNSET
else:
data = ModelsEventQueuedResponse.from_dict(_data)

create_dynamic_event_response_201 = cls(
message=message,
Expand Down
44 changes: 13 additions & 31 deletions src/convoy/models/create_endpoint_event_response_201.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast
from typing import TYPE_CHECKING, Any, TypeVar

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.handlers_stub_type_0 import HandlersStubType0
from ..models.models_event_queued_response import ModelsEventQueuedResponse


T = TypeVar("T", bound="CreateEndpointEventResponse201")
Expand All @@ -21,28 +21,22 @@ class CreateEndpointEventResponse201:
Attributes:
message (str | Unset):
status (bool | Unset):
data (HandlersStubType0 | None | Unset):
data (ModelsEventQueuedResponse | Unset):
"""

message: str | Unset = UNSET
status: bool | Unset = UNSET
data: HandlersStubType0 | None | Unset = UNSET
data: ModelsEventQueuedResponse | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
from ..models.handlers_stub_type_0 import HandlersStubType0

message = self.message

status = self.status

data: dict[str, Any] | None | Unset
if isinstance(self.data, Unset):
data = UNSET
elif isinstance(self.data, HandlersStubType0):
data: dict[str, Any] | Unset = UNSET
if not isinstance(self.data, Unset):
data = self.data.to_dict()
else:
data = self.data

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
Expand All @@ -58,31 +52,19 @@ def to_dict(self) -> dict[str, Any]:

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.handlers_stub_type_0 import HandlersStubType0
from ..models.models_event_queued_response import ModelsEventQueuedResponse

d = dict(src_dict)
message = d.pop("message", UNSET)

status = d.pop("status", UNSET)

def _parse_data(data: object) -> HandlersStubType0 | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, dict):
raise TypeError()
componentsschemashandlers_stub_type_0 = HandlersStubType0.from_dict(
data
)

return componentsschemashandlers_stub_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
return cast(HandlersStubType0 | None | Unset, data)

data = _parse_data(d.pop("data", UNSET))
_data = d.pop("data", UNSET)
data: ModelsEventQueuedResponse | Unset
if isinstance(_data, Unset):
data = UNSET
else:
data = ModelsEventQueuedResponse.from_dict(_data)

create_endpoint_event_response_201 = cls(
message=message,
Expand Down
Loading