-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
from .webhook_base_event import WebhookBaseEvent | ||
from .chat_status_enum import ChatStatusEnum | ||
import typing | ||
from ...core.pydantic_utilities import IS_PYDANTIC_V2 | ||
import pydantic | ||
|
||
|
||
class ChatEndedEvent(WebhookBaseEvent): | ||
end_time: int | ||
duration_seconds: int | ||
end_reason: ChatStatusEnum | ||
caller_number: typing.Optional[str] = None | ||
custom_session_id: typing.Optional[str] = None | ||
|
||
if IS_PYDANTIC_V2: | ||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 | ||
else: | ||
|
||
class Config: | ||
frozen = True | ||
smart_union = True | ||
extra = pydantic.Extra.allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
import typing | ||
|
||
ChatStartType = typing.Union[typing.Literal["new_chat_group", "resumed_chat_group"], typing.Any] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
from .webhook_base_event import WebhookBaseEvent | ||
from .chat_start_type import ChatStartType | ||
import typing | ||
from ...core.pydantic_utilities import IS_PYDANTIC_V2 | ||
import pydantic | ||
|
||
|
||
class ChatStartedEvent(WebhookBaseEvent): | ||
start_time: int | ||
chat_start_type: ChatStartType | ||
caller_number: typing.Optional[str] = None | ||
custom_session_id: typing.Optional[str] = None | ||
|
||
if IS_PYDANTIC_V2: | ||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 | ||
else: | ||
|
||
class Config: | ||
frozen = True | ||
smart_union = True | ||
extra = pydantic.Extra.allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
import typing | ||
|
||
ChatStatusEnum = typing.Union[ | ||
typing.Literal["ACTIVE", "USER_ENDED", "USER_TIMEOUT", "INACTIVITY_TIMEOUT", "MAX_DURATION_TIMEOUT", "ERROR"], | ||
typing.Any, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
from ...core.pydantic_utilities import UniversalBaseModel | ||
from .webhook_event_type import WebhookEventType | ||
import typing | ||
from ...core.pydantic_utilities import IS_PYDANTIC_V2 | ||
import pydantic | ||
|
||
|
||
class WebhookBaseEvent(UniversalBaseModel): | ||
""" | ||
Represents a webhook event job to be queued to the webhook delivery service. | ||
Internal fields like 'url' and 'is_active' are excluded from serialization. | ||
""" | ||
|
||
event_name: WebhookEventType | ||
chat_group_id: str | ||
chat_id: str | ||
config_id: typing.Optional[str] = None | ||
|
||
if IS_PYDANTIC_V2: | ||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 | ||
else: | ||
|
||
class Config: | ||
frozen = True | ||
smart_union = True | ||
extra = pydantic.Extra.allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
import typing | ||
from .chat_started_event import ChatStartedEvent | ||
from .chat_ended_event import ChatEndedEvent | ||
|
||
WebhookEvent = typing.Union[ChatStartedEvent, ChatEndedEvent] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
import typing | ||
|
||
WebhookEventType = typing.Union[typing.Literal["chat_started", "chat_ended"], typing.Any] |