sinch.domains.conversation.models.v1.sinch_events package

class sinch.domains.conversation.models.v1.sinch_events.ConversationSinchEventBase(
*,
app_id: Annotated[str, Strict(strict=True)],
project_id: Annotated[str, Strict(strict=True)],
accepted_time: datetime | None = None,
event_time: datetime | None = None,
message_metadata: Annotated[str, Strict(strict=True)] | None = None,
correlation_id: Annotated[str, Strict(strict=True)] | None = None,
**extra_data: Any,
)[source]

Bases: SinchEvent

Base fields present on every Conversation API Sinch Event payload.

Parameters:
  • app_id (Annotated[str, Strict(strict=True)])

  • project_id (Annotated[str, Strict(strict=True)])

  • accepted_time (datetime | None)

  • event_time (datetime | None)

  • message_metadata (Annotated[str, Strict(strict=True)] | None)

  • correlation_id (Annotated[str, Strict(strict=True)] | None)

  • extra_data (Any)

app_id: Annotated[str, Strict(strict=True)]
project_id: Annotated[str, Strict(strict=True)]
accepted_time: datetime | None
event_time: datetime | None
message_metadata: Annotated[str, Strict(strict=True)] | None
correlation_id: Annotated[str, Strict(strict=True)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.InboundMessage(
*,
accept_time: datetime | None = None,
channel_identity: ChannelIdentity | None = None,
contact_id: Annotated[str, Strict(strict=True)] | None = None,
conversation_id: Annotated[str, Strict(strict=True)] | None = None,
direction: Literal['TO_APP', 'TO_CONTACT'] | Annotated[str, Strict(strict=True)] | None = None,
id: Annotated[str, Strict(strict=True)] | None = None,
metadata: Annotated[str, Strict(strict=True)] | None = None,
injected: Annotated[bool, Strict(strict=True)] | None = None,
sender_id: Annotated[str, Strict(strict=True)] | None = None,
processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None = None,
contact_message: ChannelSpecificContactMessage | ChoiceResponseContactMessage | FallbackContactMessage | LocationContactMessage | MediaCardContactMessage | MediaContactMessage | ProductResponseContactMessage | TextContactMessage | None = None,
**extra_data: Any,
)[source]

Bases: MessageCommonProps, SinchEvent

Inbound message container (contact message + channel/contact info).

Parameters:
contact_message: ChannelSpecificContactMessage | ChoiceResponseContactMessage | FallbackContactMessage | LocationContactMessage | MediaCardContactMessage | MediaContactMessage | ProductResponseContactMessage | TextContactMessage | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.MessageDeliveryReceiptEvent(
*,
app_id: Annotated[str, Strict(strict=True)],
project_id: Annotated[str, Strict(strict=True)],
accepted_time: datetime | None = None,
event_time: datetime | None = None,
message_metadata: Annotated[str, Strict(strict=True)] | None = None,
correlation_id: Annotated[str, Strict(strict=True)] | None = None,
message_delivery_report: MessageDeliveryReport = None,
**extra_data: Any,
)[source]

Bases: ConversationSinchEventBase

Sinch Event for MESSAGE_DELIVERY (delivery receipt for app messages).

Parameters:
  • app_id (Annotated[str, Strict(strict=True)])

  • project_id (Annotated[str, Strict(strict=True)])

  • accepted_time (datetime | None)

  • event_time (datetime | None)

  • message_metadata (Annotated[str, Strict(strict=True)] | None)

  • correlation_id (Annotated[str, Strict(strict=True)] | None)

  • message_delivery_report (MessageDeliveryReport)

  • extra_data (Any)

message_delivery_report: MessageDeliveryReport
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.MessageDeliveryReport(
*,
message_id: Annotated[str, Strict(strict=True)] | None = None,
conversation_id: Annotated[str, Strict(strict=True)] | None = None,
status: Literal['QUEUED_ON_CHANNEL', 'DELIVERED', 'READ', 'FAILED', 'SWITCHING_CHANNEL'] | Annotated[str, Strict(strict=True)] | None = None,
channel_identity: ChannelIdentity | None = None,
contact_id: Annotated[str, Strict(strict=True)] | None = None,
metadata: Annotated[str, Strict(strict=True)] | None = None,
processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None = None,
reason: Reason | None = None,
**extra_data: Any,
)[source]

Bases: SinchEvent

Delivery report for an app message (MESSAGE_DELIVERY trigger).

Parameters:
  • message_id (Annotated[str, Strict(strict=True)] | None)

  • conversation_id (Annotated[str, Strict(strict=True)] | None)

  • status (Literal['QUEUED_ON_CHANNEL', 'DELIVERED', 'READ', 'FAILED', 'SWITCHING_CHANNEL'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • channel_identity (ChannelIdentity | None)

  • contact_id (Annotated[str, Strict(strict=True)] | None)

  • metadata (Annotated[str, Strict(strict=True)] | None)

  • processing_mode (Literal['CONVERSATION', 'DISPATCH'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • reason (Reason | None)

  • extra_data (Any)

message_id: Annotated[str, Strict(strict=True)] | None
conversation_id: Annotated[str, Strict(strict=True)] | None
status: Literal['QUEUED_ON_CHANNEL', 'DELIVERED', 'READ', 'FAILED', 'SWITCHING_CHANNEL'] | Annotated[str, Strict(strict=True)] | None
channel_identity: ChannelIdentity | None
contact_id: Annotated[str, Strict(strict=True)] | None
metadata: Annotated[str, Strict(strict=True)] | None
processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None
reason: Reason | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.MessageInboundEvent(
*,
app_id: Annotated[str, Strict(strict=True)],
project_id: Annotated[str, Strict(strict=True)],
accepted_time: datetime | None = None,
event_time: datetime | None = None,
message_metadata: Annotated[str, Strict(strict=True)] | None = None,
correlation_id: Annotated[str, Strict(strict=True)] | None = None,
message: InboundMessage,
**extra_data: Any,
)[source]

Bases: ConversationSinchEventBase

Sinch Event for MESSAGE_INBOUND (inbound message from user).

Parameters:
  • app_id (Annotated[str, Strict(strict=True)])

  • project_id (Annotated[str, Strict(strict=True)])

  • accepted_time (datetime | None)

  • event_time (datetime | None)

  • message_metadata (Annotated[str, Strict(strict=True)] | None)

  • correlation_id (Annotated[str, Strict(strict=True)] | None)

  • message (InboundMessage)

  • extra_data (Any)

message: InboundMessage
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.MessageSubmitEvent(
*,
app_id: Annotated[str, Strict(strict=True)],
project_id: Annotated[str, Strict(strict=True)],
accepted_time: datetime | None = None,
event_time: datetime | None = None,
message_metadata: Annotated[str, Strict(strict=True)] | None = None,
correlation_id: Annotated[str, Strict(strict=True)] | None = None,
message_submit_notification: MessageSubmitNotification,
**extra_data: Any,
)[source]

Bases: ConversationSinchEventBase

Sinch Event for MESSAGE_SUBMIT (message submission notification).

Parameters:
  • app_id (Annotated[str, Strict(strict=True)])

  • project_id (Annotated[str, Strict(strict=True)])

  • accepted_time (datetime | None)

  • event_time (datetime | None)

  • message_metadata (Annotated[str, Strict(strict=True)] | None)

  • correlation_id (Annotated[str, Strict(strict=True)] | None)

  • message_submit_notification (MessageSubmitNotification)

  • extra_data (Any)

message_submit_notification: MessageSubmitNotification
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sinch.domains.conversation.models.v1.sinch_events.MessageSubmitNotification(
*,
message_id: Annotated[str, Strict(strict=True)] | None = None,
conversation_id: Annotated[str, Strict(strict=True)] | None = None,
channel_identity: ChannelIdentity | None = None,
contact_id: Annotated[str, Strict(strict=True)] | None = None,
submitted_message: CardAppMessage | CarouselAppMessage | ChoiceAppMessage | ContactInfoAppMessage | ListAppMessage | LocationAppMessage | MediaAppMessage | TemplateAppMessage | TextAppMessage | None = None,
metadata: Annotated[str, Strict(strict=True)] | None = None,
processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None = None,
**extra_data: Any,
)[source]

Bases: SinchEvent

Notification that an app message was submitted (MESSAGE_SUBMIT trigger).

Parameters:
message_id: Annotated[str, Strict(strict=True)] | None
conversation_id: Annotated[str, Strict(strict=True)] | None
channel_identity: ChannelIdentity | None
contact_id: Annotated[str, Strict(strict=True)] | None
submitted_message: CardAppMessage | CarouselAppMessage | ChoiceAppMessage | ContactInfoAppMessage | ListAppMessage | LocationAppMessage | MediaAppMessage | TemplateAppMessage | TextAppMessage | None
metadata: Annotated[str, Strict(strict=True)] | None
processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].