peyk.platform_core.adapters.rubika

Rubika raw-model -> normalized dispatcher contracts.

Functions

normalize_bot_membership(raw, *[, chat_id])

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

normalize_callback(raw)

Convert a Rubika inline-message callback to the neutral callback type.

normalize_chat_member(raw)

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

normalize_deleted(raw)

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

normalize_inline_message(raw)

Normalize a Rubika receiveInlineMessage callback payload.

normalize_message(raw, *[, chat_id])

Convert a Rubika message to a neutral message, using Update.chat_id.

normalize_update(raw)

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

peyk.platform_core.adapters.rubika.normalize_message(raw: Message, *, chat_id: str | None = None) Message[source]

Convert a Rubika message to a neutral message, using Update.chat_id.

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

Convert a Rubika inline-message callback to the neutral callback type.

peyk.platform_core.adapters.rubika.normalize_inline_message(raw: InlineMessage) CallbackQuery[source]

Normalize a Rubika receiveInlineMessage callback payload.

peyk.platform_core.adapters.rubika.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.rubika.normalize_bot_membership(raw: Event, *, chat_id: str | None = None) IncomingBotMembershipChange | None[source]

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

Parameters:
  • raw – Value used by this operation.

  • chat_id – Identifier of the target chat.

Returns:

Result produced by the platform-core operation.

peyk.platform_core.adapters.rubika.normalize_deleted(raw: Update) IncomingMessageDeleted[source]

Performs the normalize deleted 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.rubika.normalize_update(raw: Update) Message | IncomingMessageDeleted | IncomingBotMembershipChange | 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.