Skip to content

Commit

Permalink
feat: aurora support
Browse files Browse the repository at this point in the history
  • Loading branch information
kutuzov13 committed Dec 28, 2024
1 parent eb5d648 commit 9500f79
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pybotx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
from pybotx.client.smartapps_api.smartapp_manifest import (
SmartappManifest,
SmartappManifestAndroidParams,
SmartappManifestAuroraParams,
SmartappManifestIosParams,
SmartappManifestUnreadCounterParams,
SmartappManifestWebParams,
Expand Down Expand Up @@ -238,6 +239,7 @@
"SmartAppEvent",
"SmartappManifest",
"SmartappManifestAndroidParams",
"SmartappManifestAuroraParams",
"SmartappManifestIosParams",
"SmartappManifestUnreadCounterParams",
"SmartappManifestWebLayoutChoices",
Expand Down
5 changes: 5 additions & 0 deletions pybotx/client/smartapps_api/smartapp_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class SmartappManifestAndroidParams(VerifiedPayloadBaseModel):
fullscreen_layout: bool = False


class SmartappManifestAuroraParams(VerifiedPayloadBaseModel):
fullscreen_layout: bool = False


class SmartappManifestWebParams(VerifiedPayloadBaseModel):
default_layout: WebLayoutChoices = WebLayoutChoices.minimal
expanded_layout: WebLayoutChoices = WebLayoutChoices.half
Expand All @@ -40,6 +44,7 @@ class SmartappManifestPayload(UnverifiedPayloadBaseModel):
ios: Missing[SmartappManifestIosParams] = Undefined
android: Missing[SmartappManifestAndroidParams] = Undefined
web: Missing[SmartappManifestWebParams] = Undefined
aurora: Missing[SmartappManifestAuroraParams] = Undefined
unread_counter_link: Missing[SmartappManifestUnreadCounterParams] = Undefined


Expand Down
3 changes: 3 additions & 0 deletions pybotx/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ClientPlatforms(AutoName):
ANDROID = auto()
IOS = auto()
DESKTOP = auto()
AURORA = auto()


class MentionTypes(AutoName):
Expand Down Expand Up @@ -109,6 +110,7 @@ class BotAPIClientPlatforms(Enum):
ANDROID = "android"
IOS = "ios"
DESKTOP = "desktop"
AURORA = "aurora"


class BotAPIEntityTypes(StrEnum):
Expand Down Expand Up @@ -166,6 +168,7 @@ def convert_client_platform_to_domain(
BotAPIClientPlatforms.ANDROID: ClientPlatforms.ANDROID,
BotAPIClientPlatforms.IOS: ClientPlatforms.IOS,
BotAPIClientPlatforms.DESKTOP: ClientPlatforms.DESKTOP,
BotAPIClientPlatforms.AURORA: ClientPlatforms.AURORA,
}

converted_type = client_platforms_mapping.get(client_platform)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybotx"
version = "0.73.0"
version = "0.73.1"
description = "A python library for interacting with eXpress BotX API"
authors = [
"Sidnev Nikolay <[email protected]>",
Expand Down

0 comments on commit 9500f79

Please sign in to comment.