33from enums .add_type import AddType
44from enums .announcement_type import AnnouncementType
55from enums .bot_entity import BotEntity
6+ from enums .buy_status import BuyStatus
67from enums .cart_action import CartAction
78from enums .coupon_type import CouponType
89from enums .cryptocurrency import Cryptocurrency
910from enums .entity_type import EntityType
11+ from enums .item_type import ItemType
1012from enums .keyboard_button import KeyboardButton
1113from enums .language import Language
14+ from enums .shipping_management_action import ShippingManagementAction
15+ from enums .shipping_type_property import ShippingOptionProperty
1216from enums .sort_order import SortOrder
1317from enums .sort_property import SortProperty
1418from enums .statistics_entity import StatisticsEntity
1519from enums .statistics_timedelta import StatisticsTimeDelta
1620from enums .user_management_operation import UserManagementOperation
1721from enums .coupon_number_of_uses import CouponNumberOfUses
22+ from enums .user_role import UserRole
1823from utils .utils import get_text
1924
2025
@@ -39,6 +44,7 @@ class SortingCallback(CallbackData, prefix="sorting"):
3944
4045
4146class AllCategoriesCallback (BaseCallback , SortingCallback , prefix = "all_categories" ):
47+ item_type : ItemType | None
4248 category_id : int | None
4349 subcategory_id : int | None
4450 quantity : int | None
@@ -47,6 +53,7 @@ class AllCategoriesCallback(BaseCallback, SortingCallback, prefix="all_categorie
4753
4854 @staticmethod
4955 def create (level : int ,
56+ item_type : ItemType | None = None ,
5057 category_id : int | None = None ,
5158 subcategory_id : int | None = None ,
5259 quantity : int | None = None ,
@@ -56,6 +63,7 @@ def create(level: int,
5663 confirmation : bool = False ,
5764 page : int = 0 ) -> 'AllCategoriesCallback' :
5865 return AllCategoriesCallback (level = level ,
66+ item_type = item_type ,
5967 category_id = category_id , subcategory_id = subcategory_id ,
6068 sort_order = sort_order , sort_property = sort_property ,
6169 quantity = quantity , is_filter_enabled = is_filter_enabled ,
@@ -67,6 +75,7 @@ class MyProfileCallback(BaseCallback, SortingCallback, prefix="my_profile"):
6775 buyItem_id : int | None = None
6876 cryptocurrency : Cryptocurrency | None = None
6977 language : Language | None = None
78+ user_role : UserRole = UserRole .USER
7079 confirmation : bool = False
7180 page : int
7281
@@ -79,13 +88,15 @@ def create(level: int,
7988 is_filter_enabled : bool = False ,
8089 cryptocurrency : Cryptocurrency | None = None ,
8190 language : Language | None = None ,
91+ user_role : UserRole = UserRole .USER ,
8292 confirmation : bool = False ,
8393 page = 0 ) -> 'MyProfileCallback' :
8494 return MyProfileCallback (level = level , buy_id = buy_id , buyItem_id = buyItem_id ,
8595 sort_order = sort_order , sort_property = sort_property ,
8696 is_filter_enabled = is_filter_enabled ,
8797 cryptocurrency = cryptocurrency ,
8898 language = language ,
99+ user_role = user_role ,
89100 confirmation = confirmation ,
90101 page = page )
91102
@@ -95,21 +106,24 @@ class CartCallback(BaseCallback, prefix="cart"):
95106 cart_id : int
96107 cart_item_id : int
97108 cart_action : CartAction | None
109+ shipping_option_id : int | None
98110 confirmation : bool
99111
100112 @staticmethod
101113 def create (level : int = 0 ,
102114 cart_id : int = - 1 ,
103115 cart_item_id : int = - 1 ,
104116 cart_action : CartAction | None = None ,
117+ shipping_option_id : int | None = None ,
105118 confirmation = False ,
106119 page : int = 0 ):
107120 return CartCallback (level = level ,
108121 cart_id = cart_id ,
109122 cart_item_id = cart_item_id ,
110123 cart_action = cart_action ,
111- page = page ,
112- confirmation = confirmation )
124+ shipping_option_id = shipping_option_id ,
125+ confirmation = confirmation ,
126+ page = page )
113127
114128
115129class AdminMenuCallback (BaseCallback , prefix = "admin_menu" ):
@@ -241,3 +255,42 @@ def create(level: int, coupon_id: int | None = None, coupon_type: CouponType | N
241255 number_of_uses = number_of_uses ,
242256 confirmation = confirmation ,
243257 page = page )
258+
259+
260+ class ShippingManagementCallback (BaseCallback , prefix = "shipping_management" ):
261+ shipping_management_action : ShippingManagementAction | None = None
262+ shipping_type_property : ShippingOptionProperty | None = None
263+ shipping_id : int | None = None
264+ page : int
265+ confirmation : bool
266+
267+ @staticmethod
268+ def create (level : int , shipping_management_action : ShippingManagementAction | None = None ,
269+ shipping_type_property : ShippingOptionProperty | None = None ,
270+ shipping_id : int | None = None , confirmation : bool = False , page : int = 0 ):
271+ return ShippingManagementCallback (level = level ,
272+ shipping_management_action = shipping_management_action ,
273+ shipping_type_property = shipping_type_property ,
274+ shipping_id = shipping_id ,
275+ confirmation = confirmation ,
276+ page = page )
277+
278+
279+ class BuysManagementCallback (BaseCallback , prefix = "buys" ):
280+ buy_id : int | None = None
281+ item_type : ItemType | None = None
282+ buy_status : BuyStatus | None = None
283+ page : int
284+ confirmation : bool = False
285+
286+ @staticmethod
287+ def create (level : int ,
288+ buy_id : int | None = None ,
289+ item_type : ItemType | None = None ,
290+ buy_status : BuyStatus | None = None ,
291+ confirmation : bool = False ,
292+ page : int = 0 ):
293+ return BuysManagementCallback (level = level , buy_id = buy_id ,
294+ item_type = item_type ,
295+ buy_status = buy_status , confirmation = confirmation ,
296+ page = page )
0 commit comments