peyk.platform_core.adapters.bale

Bale raw-model -> normalized dispatcher contracts.

Functions

normalize_callback(raw)

Convert a Bale 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 Bale 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_update(raw)

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

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

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

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

Convert a Bale callback query to the neutral callback type.

peyk.platform_core.adapters.bale.normalize_chat_member(raw: object) IncomingChatMemberStatusUpdate | None[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.bale.normalize_pre_checkout_query(raw: PreCheckoutQuery) 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.bale.normalize_update(raw: Update) Message | CallbackQuery | IncomingPreCheckoutQuery | 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.