peyk.platform_core.adapters.telegram

Telegram raw-model -> normalized dispatcher contracts.

Functions

normalize_bot_membership_from_message(raw)

Performs the normalize bot membership from message operation for the platform-core client.

normalize_callback(raw)

Convert a Telegram callback query to the neutral callback type.

normalize_chat_member(raw)

Performs the normalize chat member operation for the platform-core client.

normalize_message(raw)

Convert a Telegram message to the neutral bound-action type.

normalize_pre_checkout_query(raw)

Performs the normalize pre checkout query operation for the platform-core client.

normalize_shipping_query(raw)

Performs the normalize shipping query operation for the platform-core client.

normalize_update(raw)

Performs the normalize update operation for the platform-core client.

peyk.platform_core.adapters.telegram.normalize_message(raw: Message) Message[source]

Convert a Telegram message to the neutral bound-action type.

peyk.platform_core.adapters.telegram.normalize_callback(raw: CallbackQuery) CallbackQuery[source]

Convert a Telegram callback query to the neutral callback type.

peyk.platform_core.adapters.telegram.normalize_chat_member(raw: ChatMemberUpdated) IncomingChatMemberStatusUpdate[source]

Performs the normalize chat member operation for the platform-core client.

Parameters:

raw – Value used by this operation.

Returns:

Result produced by the platform-core operation.

peyk.platform_core.adapters.telegram.normalize_pre_checkout_query(raw: object) IncomingPreCheckoutQuery[source]

Performs the normalize pre checkout query operation for the platform-core client.

Parameters:

raw – Value used by this operation.

Returns:

Result produced by the platform-core operation.

peyk.platform_core.adapters.telegram.normalize_shipping_query(raw: object) IncomingShippingQuery[source]

Performs the normalize shipping query operation for the platform-core client.

Parameters:

raw – Value used by this operation.

Returns:

Result produced by the platform-core operation.

peyk.platform_core.adapters.telegram.normalize_bot_membership_from_message(raw: Message) IncomingBotMembershipChange | None[source]

Performs the normalize bot membership from message operation for the platform-core client.

Parameters:

raw – Value used by this operation.

Returns:

Result produced by the platform-core operation.

peyk.platform_core.adapters.telegram.normalize_update(raw: Update) Message | CallbackQuery | IncomingChatMemberStatusUpdate | IncomingPreCheckoutQuery | IncomingShippingQuery | Update[source]

Performs the normalize update operation for the platform-core client.

Parameters:

raw – Value used by this operation.

Returns:

Result produced by the platform-core operation.