telegrinder 0.1.dev158__py3-none-any.whl → 0.1.dev159__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of telegrinder might be problematic. Click here for more details.

@@ -1,9 +1,9 @@
1
1
  import typing
2
2
 
3
- from fntypes.variative import Variative
3
+ from fntypes.co import Some, Variative
4
4
 
5
5
  from telegrinder.model import Model
6
- from telegrinder.msgspec_utils import Nothing, Option
6
+ from telegrinder.msgspec_utils import Nothing, Option, datetime
7
7
  from telegrinder.types.enums import * # noqa: F403
8
8
 
9
9
 
@@ -235,6 +235,20 @@ class Update(Model):
235
235
  """Optional. A boost was removed from a chat. The bot must be an administrator
236
236
  in the chat to receive these updates."""
237
237
 
238
+ @property
239
+ def update_type(self) -> Option[UpdateType]:
240
+ """Incoming update type."""
241
+
242
+ if update := next(
243
+ filter(
244
+ lambda x: bool(x[1]),
245
+ self.to_dict(exclude_fields={"update_id"}).items(),
246
+ ),
247
+ None,
248
+ ):
249
+ return Some(UpdateType(update[0]))
250
+ return Nothing
251
+
238
252
 
239
253
  class WebhookInfo(Model):
240
254
  """Object `WebhookInfo`, see the [documentation](https://core.telegram.org/bots/api#webhookinfo)
@@ -253,7 +267,7 @@ class WebhookInfo(Model):
253
267
  ip_address: Option[str] = Nothing
254
268
  """Optional. Currently used webhook IP address."""
255
269
 
256
- last_error_date: Option[int] = Nothing
270
+ last_error_date: Option[datetime] = Nothing
257
271
  """Optional. Unix time for the most recent error that happened when trying
258
272
  to deliver an update via webhook."""
259
273
 
@@ -261,7 +275,7 @@ class WebhookInfo(Model):
261
275
  """Optional. Error message in human-readable format for the most recent error
262
276
  that happened when trying to deliver an update via webhook."""
263
277
 
264
- last_synchronization_error_date: Option[int] = Nothing
278
+ last_synchronization_error_date: Option[datetime] = Nothing
265
279
  """Optional. Unix time of the most recent error that happened when trying to
266
280
  synchronize available updates with Telegram datacenters."""
267
281
 
@@ -275,7 +289,7 @@ class WebhookInfo(Model):
275
289
 
276
290
 
277
291
  class User(Model):
278
- """User object `User`, see the [documentation](https://core.telegram.org/bots/api#user)
292
+ """Object `User`, see the [documentation](https://core.telegram.org/bots/api#user)
279
293
 
280
294
  This object represents a Telegram user or bot."""
281
295
 
@@ -317,14 +331,14 @@ class User(Model):
317
331
  """Optional. True, if the bot supports inline queries. Returned only in getMe."""
318
332
 
319
333
  @property
320
- def color(self) -> DefaultUserColor:
321
- """User's or bot's color."""
334
+ def default_accent_color(self) -> DefaultAccentColor:
335
+ """User's or bot's accent color (non-premium)."""
322
336
 
323
- return DefaultUserColor(self.id % 7)
337
+ return DefaultAccentColor(self.id % 7)
324
338
 
325
339
  @property
326
340
  def full_name(self) -> str:
327
- """User's or bot's `first_name` + `last_name`."""
341
+ """User's or bot's full name (`first_name` + `last_name`)."""
328
342
 
329
343
  return self.first_name + self.last_name.map(lambda v: " " + v).unwrap_or("")
330
344
 
@@ -392,7 +406,7 @@ class Chat(Model):
392
406
  """Optional. Custom emoji identifier of the emoji status of the chat or the
393
407
  other party in a private chat. Returned only in getChat."""
394
408
 
395
- emoji_status_expiration_date: Option[int] = Nothing
409
+ emoji_status_expiration_date: Option[datetime] = Nothing
396
410
  """Optional. Expiration date of the emoji status of the chat or the other party
397
411
  in a private chat, in Unix time, if any. Returned only in getChat."""
398
412
 
@@ -486,16 +500,23 @@ class Chat(Model):
486
500
  """Optional. For supergroups, the location to which the supergroup is connected.
487
501
  Returned only in getChat."""
488
502
 
503
+ @property
504
+ def full_name(self) -> Option[str]:
505
+ """Optional. Full name (`first_name` + `last_name`) of the
506
+ other party in a `private` chat."""
507
+
508
+ return self.first_name.map(lambda x: x + " " + self.last_name.unwrap_or(""))
509
+
489
510
 
490
511
  class Message(MaybeInaccessibleMessage):
491
- """Message object `Message`, see the [documentation](https://core.telegram.org/bots/api#message)
512
+ """Object `Message`, see the [documentation](https://core.telegram.org/bots/api#message)
492
513
 
493
514
  This object represents a message."""
494
515
 
495
516
  message_id: int
496
517
  """Unique message identifier inside this chat."""
497
518
 
498
- date: int
519
+ date: datetime
499
520
  """Date the message was sent in Unix time. It is always a positive number, representing
500
521
  a valid date."""
501
522
 
@@ -559,7 +580,7 @@ class Message(MaybeInaccessibleMessage):
559
580
  via_bot: Option["User"] = Nothing
560
581
  """Optional. Bot through which the message was sent."""
561
582
 
562
- edit_date: Option[int] = Nothing
583
+ edit_date: Option[datetime] = Nothing
563
584
  """Optional. Date the message was last edited in Unix time."""
564
585
 
565
586
  has_protected_content: Option[bool] = Nothing
@@ -795,12 +816,29 @@ class Message(MaybeInaccessibleMessage):
795
816
 
796
817
  @property
797
818
  def from_user(self) -> "User":
798
- """`from_user` instead of `from_.unwrap()`"""
819
+ """`from_user` instead of `from_.unwrap()`."""
799
820
 
800
821
  return self.from_.unwrap()
801
822
 
823
+ @property
824
+ def chat_id(self) -> int:
825
+ """`chat_id` instead of `chat.id`."""
826
+
827
+ return self.chat.id
828
+
829
+ @property
830
+ def chat_title(self) -> str:
831
+ """Chat title, for `supergroups`, `channels` and `group` chats.
832
+ Full name, for `private` chat."""
833
+
834
+ return (
835
+ self.chat.full_name.unwrap()
836
+ if self.chat.type == ChatType.PRIVATE
837
+ else self.chat.title.unwrap()
838
+ )
839
+
802
840
  def __eq__(self, other: "Message") -> bool:
803
- return self.message_id == other.message_id and self.chat.id == other.chat.id
841
+ return self.message_id == other.message_id and self.chat_id == other.chat_id
804
842
 
805
843
 
806
844
  class MessageId(Model):
@@ -812,8 +850,8 @@ class MessageId(Model):
812
850
  """Unique message identifier."""
813
851
 
814
852
 
815
- class InaccessibleMessage(Model):
816
- """Model object `InaccessibleMessage`, see the [documentation](https://core.telegram.org/bots/api#inaccessiblemessage)
853
+ class InaccessibleMessage(MaybeInaccessibleMessage):
854
+ """Object `InaccessibleMessage`, see the [documentation](https://core.telegram.org/bots/api#inaccessiblemessage)
817
855
 
818
856
  This object describes a message that was deleted or is otherwise inaccessible to the bot.
819
857
  """
@@ -1021,7 +1059,7 @@ class MessageOriginUser(MessageOrigin):
1021
1059
  type: typing.Literal["user"]
1022
1060
  """Type of the message origin, always `user`."""
1023
1061
 
1024
- date: int
1062
+ date: datetime
1025
1063
  """Date the message was sent originally in Unix time."""
1026
1064
 
1027
1065
  sender_user: "User"
@@ -1036,7 +1074,7 @@ class MessageOriginHiddenUser(MessageOrigin):
1036
1074
  type: typing.Literal["hidden_user"]
1037
1075
  """Type of the message origin, always `hidden_user`."""
1038
1076
 
1039
- date: int
1077
+ date: datetime
1040
1078
  """Date the message was sent originally in Unix time."""
1041
1079
 
1042
1080
  sender_user_name: str
@@ -1051,7 +1089,7 @@ class MessageOriginChat(MessageOrigin):
1051
1089
  type: typing.Literal["chat"]
1052
1090
  """Type of the message origin, always `chat`."""
1053
1091
 
1054
- date: int
1092
+ date: datetime
1055
1093
  """Date the message was sent originally in Unix time."""
1056
1094
 
1057
1095
  sender_chat: "Chat"
@@ -1070,7 +1108,7 @@ class MessageOriginChannel(MessageOrigin):
1070
1108
  type: typing.Literal["channel"]
1071
1109
  """Type of the message origin, always `channel`."""
1072
1110
 
1073
- date: int
1111
+ date: datetime
1074
1112
  """Date the message was sent originally in Unix time."""
1075
1113
 
1076
1114
  chat: "Chat"
@@ -1401,7 +1439,7 @@ class Poll(Model):
1401
1439
  is_anonymous: bool
1402
1440
  """True, if the poll is anonymous."""
1403
1441
 
1404
- type: str
1442
+ type: typing.Literal["regular", "quiz"]
1405
1443
  """Poll type, currently can be `regular` or `quiz`."""
1406
1444
 
1407
1445
  allows_multiple_answers: bool
@@ -1423,7 +1461,7 @@ class Poll(Model):
1423
1461
  open_period: Option[int] = Nothing
1424
1462
  """Optional. Amount of time in seconds the poll will be active after creation."""
1425
1463
 
1426
- close_date: Option[int] = Nothing
1464
+ close_date: Option[datetime] = Nothing
1427
1465
  """Optional. Point in time (Unix timestamp) when the poll will be automatically
1428
1466
  closed."""
1429
1467
 
@@ -1650,7 +1688,7 @@ class VideoChatScheduled(Model):
1650
1688
  This object represents a service message about a video chat scheduled in the chat.
1651
1689
  """
1652
1690
 
1653
- start_date: int
1691
+ start_date: datetime
1654
1692
  """Point in time (Unix timestamp) when the video chat is supposed to be started
1655
1693
  by a chat administrator."""
1656
1694
 
@@ -1696,7 +1734,7 @@ class Giveaway(Model):
1696
1734
  chats: list["Chat"]
1697
1735
  """The list of chats which the user must join to participate in the giveaway."""
1698
1736
 
1699
- winners_selection_date: int
1737
+ winners_selection_date: datetime
1700
1738
  """Point in time (Unix timestamp) when winners of the giveaway will be selected."""
1701
1739
 
1702
1740
  winner_count: int
@@ -1735,7 +1773,7 @@ class GiveawayWinners(Model):
1735
1773
  giveaway_message_id: int
1736
1774
  """Identifier of the message with the giveaway in the chat."""
1737
1775
 
1738
- winners_selection_date: int
1776
+ winners_selection_date: datetime
1739
1777
  """Point in time (Unix timestamp) when winners of the giveaway were selected."""
1740
1778
 
1741
1779
  winner_count: int
@@ -2005,7 +2043,7 @@ class KeyboardButtonPollType(Model):
2005
2043
  This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
2006
2044
  """
2007
2045
 
2008
- type: Option[str] = Nothing
2046
+ type: Option[typing.Literal["quiz", "regular"]] = Nothing
2009
2047
  """Optional. If quiz is passed, the user will be allowed to create only polls
2010
2048
  in the quiz mode. If regular is passed, only regular polls will be allowed.
2011
2049
  Otherwise, the user will be allowed to create a poll of any type."""
@@ -2253,7 +2291,7 @@ class ChatInviteLink(Model):
2253
2291
  name: Option[str] = Nothing
2254
2292
  """Optional. Invite link name."""
2255
2293
 
2256
- expire_date: Option[int] = Nothing
2294
+ expire_date: Option[datetime] = Nothing
2257
2295
  """Optional. Point in time (Unix timestamp) when the link will expire or has
2258
2296
  been expired."""
2259
2297
 
@@ -2310,19 +2348,19 @@ class ChatAdministratorRights(Model):
2310
2348
 
2311
2349
  can_post_messages: Option[bool] = Nothing
2312
2350
  """Optional. True, if the administrator can post messages in the channel,
2313
- or access channel statistics; channels only."""
2351
+ or access channel statistics; for channels only."""
2314
2352
 
2315
2353
  can_edit_messages: Option[bool] = Nothing
2316
2354
  """Optional. True, if the administrator can edit messages of other users and
2317
- can pin messages; channels only."""
2355
+ can pin messages; for channels only."""
2318
2356
 
2319
2357
  can_pin_messages: Option[bool] = Nothing
2320
- """Optional. True, if the user is allowed to pin messages; groups and supergroups
2358
+ """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2321
2359
  only."""
2322
2360
 
2323
2361
  can_manage_topics: Option[bool] = Nothing
2324
2362
  """Optional. True, if the user is allowed to create, rename, close, and reopen
2325
- forum topics; supergroups only."""
2363
+ forum topics; for supergroups only."""
2326
2364
 
2327
2365
 
2328
2366
  class ChatMemberUpdated(Model):
@@ -2336,7 +2374,7 @@ class ChatMemberUpdated(Model):
2336
2374
  from_: "User"
2337
2375
  """Performer of the action, which resulted in the change."""
2338
2376
 
2339
- date: int
2377
+ date: datetime
2340
2378
  """Date the change was done in Unix time."""
2341
2379
 
2342
2380
  old_chat_member: Variative[
@@ -2439,19 +2477,19 @@ class ChatMemberAdministrator(ChatMember):
2439
2477
 
2440
2478
  can_post_messages: Option[bool] = Nothing
2441
2479
  """Optional. True, if the administrator can post messages in the channel,
2442
- or access channel statistics; channels only."""
2480
+ or access channel statistics; for channels only."""
2443
2481
 
2444
2482
  can_edit_messages: Option[bool] = Nothing
2445
2483
  """Optional. True, if the administrator can edit messages of other users and
2446
- can pin messages; channels only."""
2484
+ can pin messages; for channels only."""
2447
2485
 
2448
2486
  can_pin_messages: Option[bool] = Nothing
2449
- """Optional. True, if the user is allowed to pin messages; groups and supergroups
2487
+ """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2450
2488
  only."""
2451
2489
 
2452
2490
  can_manage_topics: Option[bool] = Nothing
2453
2491
  """Optional. True, if the user is allowed to create, rename, close, and reopen
2454
- forum topics; supergroups only."""
2492
+ forum topics; for supergroups only."""
2455
2493
 
2456
2494
  custom_title: Option[str] = Nothing
2457
2495
  """Optional. Custom title for this user."""
@@ -2528,7 +2566,7 @@ class ChatMemberRestricted(ChatMember):
2528
2566
  can_manage_topics: bool
2529
2567
  """True, if the user is allowed to create forum topics."""
2530
2568
 
2531
- until_date: int
2569
+ until_date: datetime
2532
2570
  """Date when restrictions will be lifted for this user; Unix time. If 0, then
2533
2571
  the user is restricted forever."""
2534
2572
 
@@ -2558,7 +2596,7 @@ class ChatMemberBanned(ChatMember):
2558
2596
  user: "User"
2559
2597
  """Information about the user."""
2560
2598
 
2561
- until_date: int
2599
+ until_date: datetime
2562
2600
  """Date when restrictions will be lifted for this user; Unix time. If 0, then
2563
2601
  the user is banned forever."""
2564
2602
 
@@ -2583,7 +2621,7 @@ class ChatJoinRequest(Model):
2583
2621
  5 minutes to send messages until the join request is processed, assuming
2584
2622
  no other administrator contacted the user."""
2585
2623
 
2586
- date: int
2624
+ date: datetime
2587
2625
  """Date the request was sent in Unix time."""
2588
2626
 
2589
2627
  bio: Option[str] = Nothing
@@ -2711,7 +2749,7 @@ class MessageReactionUpdated(Model):
2711
2749
  message_id: int
2712
2750
  """Unique identifier of the message inside the chat."""
2713
2751
 
2714
- date: int
2752
+ date: datetime
2715
2753
  """Date of the change in Unix time."""
2716
2754
 
2717
2755
  old_reaction: list[Variative["ReactionTypeEmoji", "ReactionTypeCustomEmoji"]]
@@ -2739,7 +2777,7 @@ class MessageReactionCountUpdated(Model):
2739
2777
  message_id: int
2740
2778
  """Unique message identifier inside the chat."""
2741
2779
 
2742
- date: int
2780
+ date: datetime
2743
2781
  """Date of the change in Unix time."""
2744
2782
 
2745
2783
  reactions: list["ReactionCount"]
@@ -2976,10 +3014,10 @@ class ChatBoost(Model):
2976
3014
  boost_id: str
2977
3015
  """Unique identifier of the boost."""
2978
3016
 
2979
- add_date: int
3017
+ add_date: datetime
2980
3018
  """Point in time (Unix timestamp) when the chat was boosted."""
2981
3019
 
2982
- expiration_date: int
3020
+ expiration_date: datetime
2983
3021
  """Point in time (Unix timestamp) when the boost will automatically expire,
2984
3022
  unless the booster's Telegram Premium subscription is prolonged."""
2985
3023
 
@@ -3012,7 +3050,7 @@ class ChatBoostRemoved(Model):
3012
3050
  boost_id: str
3013
3051
  """Unique identifier of the boost."""
3014
3052
 
3015
- remove_date: int
3053
+ remove_date: datetime
3016
3054
  """Point in time (Unix timestamp) when the boost was removed."""
3017
3055
 
3018
3056
  source: Variative[
@@ -3055,7 +3093,7 @@ class InputMediaPhoto(InputMedia):
3055
3093
  type: typing.Literal["photo"]
3056
3094
  """Type of the result, must be photo."""
3057
3095
 
3058
- media: str
3096
+ media: Variative["InputFile", str]
3059
3097
  """File to send. Pass a file_id to send a file that exists on the Telegram servers
3060
3098
  (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3061
3099
  or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
@@ -3085,7 +3123,7 @@ class InputMediaVideo(InputMedia):
3085
3123
  type: typing.Literal["video"]
3086
3124
  """Type of the result, must be video."""
3087
3125
 
3088
- media: str
3126
+ media: Variative["InputFile", str]
3089
3127
  """File to send. Pass a file_id to send a file that exists on the Telegram servers
3090
3128
  (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3091
3129
  or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
@@ -3137,7 +3175,7 @@ class InputMediaAnimation(InputMedia):
3137
3175
  type: typing.Literal["animation"]
3138
3176
  """Type of the result, must be animation."""
3139
3177
 
3140
- media: str
3178
+ media: Variative["InputFile", str]
3141
3179
  """File to send. Pass a file_id to send a file that exists on the Telegram servers
3142
3180
  (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3143
3181
  or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
@@ -3185,7 +3223,7 @@ class InputMediaAudio(InputMedia):
3185
3223
  type: typing.Literal["audio"]
3186
3224
  """Type of the result, must be audio."""
3187
3225
 
3188
- media: str
3226
+ media: Variative["InputFile", str]
3189
3227
  """File to send. Pass a file_id to send a file that exists on the Telegram servers
3190
3228
  (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3191
3229
  or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
@@ -3230,7 +3268,7 @@ class InputMediaDocument(InputMedia):
3230
3268
  type: typing.Literal["document"]
3231
3269
  """Type of the result, must be document."""
3232
3270
 
3233
- media: str
3271
+ media: Variative["InputFile", str]
3234
3272
  """File to send. Pass a file_id to send a file that exists on the Telegram servers
3235
3273
  (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3236
3274
  or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
@@ -3270,7 +3308,7 @@ class InputFile(typing.NamedTuple):
3270
3308
  """
3271
3309
 
3272
3310
  filename: str
3273
- """Filename."""
3311
+ """File name."""
3274
3312
 
3275
3313
  data: bytes
3276
3314
  """Bytes of file."""
@@ -3594,7 +3632,9 @@ class InlineQueryResultGif(InlineQueryResult):
3594
3632
  gif_duration: Option[int] = Nothing
3595
3633
  """Optional. Duration of the GIF in seconds."""
3596
3634
 
3597
- thumbnail_mime_type: Option[str] = Nothing
3635
+ thumbnail_mime_type: Option[
3636
+ typing.Literal["image/jpeg", "image/gif", "video/mp4"]
3637
+ ] = Nothing
3598
3638
  """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
3599
3639
  or `video/mp4`. Defaults to `image/jpeg`."""
3600
3640
 
@@ -3655,7 +3695,9 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
3655
3695
  mpeg4_duration: Option[int] = Nothing
3656
3696
  """Optional. Video duration in seconds."""
3657
3697
 
3658
- thumbnail_mime_type: Option[str] = Nothing
3698
+ thumbnail_mime_type: Option[
3699
+ typing.Literal["image/jpeg", "image/gif", "video/mp4"]
3700
+ ] = Nothing
3659
3701
  """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
3660
3702
  or `video/mp4`. Defaults to `image/jpeg`."""
3661
3703
 
@@ -3869,7 +3911,7 @@ class InlineQueryResultDocument(InlineQueryResult):
3869
3911
  document_url: str
3870
3912
  """A valid URL for the file."""
3871
3913
 
3872
- mime_type: str
3914
+ mime_type: typing.Literal["application/pdf", "application/zip"]
3873
3915
  """MIME type of the content of the file, either `application/pdf` or `application/zip`."""
3874
3916
 
3875
3917
  caption: Option[str] = Nothing
@@ -4873,7 +4915,7 @@ class PassportFile(Model):
4873
4915
  file_size: int
4874
4916
  """File size in bytes."""
4875
4917
 
4876
- file_date: int
4918
+ file_date: datetime
4877
4919
  """Unix time when the file was uploaded."""
4878
4920
 
4879
4921
 
@@ -4894,43 +4936,43 @@ class EncryptedPassportElement(Model):
4894
4936
 
4895
4937
  data: Option[str] = Nothing
4896
4938
  """Optional. Base64-encoded encrypted Telegram Passport element data provided
4897
- by the user, available for `personal_details`, `passport`, `driver_license`,
4939
+ by the user; available only for `personal_details`, `passport`, `driver_license`,
4898
4940
  `identity_card`, `internal_passport` and `address` types. Can be decrypted
4899
4941
  and verified using the accompanying EncryptedCredentials."""
4900
4942
 
4901
4943
  phone_number: Option[str] = Nothing
4902
- """Optional. User's verified phone number, available only for `phone_number`
4944
+ """Optional. User's verified phone number; available only for `phone_number`
4903
4945
  type."""
4904
4946
 
4905
4947
  email: Option[str] = Nothing
4906
- """Optional. User's verified email address, available only for `email` type."""
4948
+ """Optional. User's verified email address; available only for `email` type."""
4907
4949
 
4908
4950
  files: Option[list["PassportFile"]] = Nothing
4909
- """Optional. Array of encrypted files with documents provided by the user,
4910
- available for `utility_bill`, `bank_statement`, `rental_agreement`,
4951
+ """Optional. Array of encrypted files with documents provided by the user;
4952
+ available only for `utility_bill`, `bank_statement`, `rental_agreement`,
4911
4953
  `passport_registration` and `temporary_registration` types. Files
4912
4954
  can be decrypted and verified using the accompanying EncryptedCredentials."""
4913
4955
 
4914
4956
  front_side: Option["PassportFile"] = Nothing
4915
4957
  """Optional. Encrypted file with the front side of the document, provided
4916
- by the user. Available for `passport`, `driver_license`, `identity_card`
4958
+ by the user; available only for `passport`, `driver_license`, `identity_card`
4917
4959
  and `internal_passport`. The file can be decrypted and verified using
4918
4960
  the accompanying EncryptedCredentials."""
4919
4961
 
4920
4962
  reverse_side: Option["PassportFile"] = Nothing
4921
4963
  """Optional. Encrypted file with the reverse side of the document, provided
4922
- by the user. Available for `driver_license` and `identity_card`. The
4923
- file can be decrypted and verified using the accompanying EncryptedCredentials."""
4964
+ by the user; available only for `driver_license` and `identity_card`.
4965
+ The file can be decrypted and verified using the accompanying EncryptedCredentials."""
4924
4966
 
4925
4967
  selfie: Option["PassportFile"] = Nothing
4926
4968
  """Optional. Encrypted file with the selfie of the user holding a document,
4927
- provided by the user; available for `passport`, `driver_license`, `identity_card`
4928
- and `internal_passport`. The file can be decrypted and verified using
4929
- the accompanying EncryptedCredentials."""
4969
+ provided by the user; available if requested for `passport`, `driver_license`,
4970
+ `identity_card` and `internal_passport`. The file can be decrypted and
4971
+ verified using the accompanying EncryptedCredentials."""
4930
4972
 
4931
4973
  translation: Option[list["PassportFile"]] = Nothing
4932
4974
  """Optional. Array of encrypted files with translated versions of documents
4933
- provided by the user. Available if requested for `passport`, `driver_license`,
4975
+ provided by the user; available if requested for `passport`, `driver_license`,
4934
4976
  `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`,
4935
4977
  `rental_agreement`, `passport_registration` and `temporary_registration`
4936
4978
  types. Files can be decrypted and verified using the accompanying EncryptedCredentials."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: telegrinder
3
- Version: 0.1.dev158
3
+ Version: 0.1.dev159
4
4
  Summary: Framework for effective and reliable async telegram bot building.
5
5
  Home-page: https://github.com/timoniq/telegrinder
6
6
  License: MIT
@@ -14,12 +14,13 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.11
17
18
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
19
  Classifier: Topic :: Software Development :: Quality Assurance
19
20
  Classifier: Typing :: Typed
20
21
  Requires-Dist: PyYAML (>=6.0,<7.0)
21
22
  Requires-Dist: aiohttp (>=3.8.1,<4.0.0)
22
- Requires-Dist: certifi (>=2022.6.15,<2023.0.0)
23
+ Requires-Dist: certifi (>=2023.7.22,<2024.0.0)
23
24
  Requires-Dist: choicelib (>=0.1.5,<0.2.0)
24
25
  Requires-Dist: colorama (>=0.4.0,<0.5.0)
25
26
  Requires-Dist: envparse (>=0.2.0,<0.3.0)
@@ -1,17 +1,18 @@
1
1
  telegrinder/__init__.py,sha256=tuusAaob1cu2swfwv86_eSZWpJrfEcCZ2QyzS8u6HAM,2821
2
2
  telegrinder/api/__init__.py,sha256=pIDtnsL0NwT5PgVm43Gkp-ByOqDsqnD-oFDiC9tcPT4,246
3
- telegrinder/api/abc.py,sha256=Ms81jKwz0XTcFMvoT5AwuRnbaBuxgVYnRCqrI6RFfLU,1509
4
- telegrinder/api/api.py,sha256=E9VOqhp55GDxpSRTDxYq6cLcqYs6eXTKJ4ohWPcMLxA,1966
3
+ telegrinder/api/abc.py,sha256=5oaHWAd-BJ5vp0Okpef5EOnHxsiVsUmf6i4b-C86Eus,1570
4
+ telegrinder/api/api.py,sha256=eolmdAiFQ2rDrES7fd7gdah6nwEuVFqx4wFkeCOZO-w,2408
5
5
  telegrinder/api/error.py,sha256=7qOYpP3P-s1p235Gp4VhCxcpY5VX8KyK_md3_-M-NCQ,390
6
6
  telegrinder/api/response.py,sha256=d7Oxd5kOdbZNJiALkzkecHl8Y3K_BzCmsRq2Sn3otqA,491
7
7
  telegrinder/bot/__init__.py,sha256=tLEUne5ftvKUVlkMAtPTO1_TSHkYJBbG73LuiBeC7gk,1560
8
8
  telegrinder/bot/bot.py,sha256=C-egmfFZdYDBCxcyfq7GrIWUZ1WOZeUD9ulVG5Ksbd0,2222
9
9
  telegrinder/bot/cute_types/__init__.py,sha256=HeuWq297lY209MssrEbj5MsxsGfOhwVLo1pH_-pHv_I,295
10
- telegrinder/bot/cute_types/base.py,sha256=W1kifloiXh6SdyJPeaAot7Z4o60PUfVNH-Lzkb6S4RU,1115
11
- telegrinder/bot/cute_types/callback_query.py,sha256=lZPQGOEEWK2Vh6FfXPPxeDinCTREEskEewg8XFGATs8,2522
12
- telegrinder/bot/cute_types/inline_query.py,sha256=08XA8dHmTyfCXIUkyMWrfTrjW6I8t2v1UcB17lKWvmk,1254
13
- telegrinder/bot/cute_types/message.py,sha256=JJ3rVNZJJj7KjNhRum-tV4a8vPv4bhPTy4v368ysxaI,6888
14
- telegrinder/bot/cute_types/update.py,sha256=6BAvgX6uRlJUT-XkBLTtnZX5UKLhO6-qqTaMod4WfrM,572
10
+ telegrinder/bot/cute_types/base.py,sha256=uvm9XcdPqnE0vq6DcuuIqWSfp2UO-zuQIs7Fa5GlJLY,4631
11
+ telegrinder/bot/cute_types/callback_query.py,sha256=9R7fyOzgAKu0kZYb1aGl3vy8RzhF5SlUiyBTy2ULLnQ,21217
12
+ telegrinder/bot/cute_types/inline_query.py,sha256=EaTtFRf-6DH-q6dsd_0MPOQJaVo8e-8nGXFeU6nts3g,1223
13
+ telegrinder/bot/cute_types/message.py,sha256=peuiGPrvrsZjIlZqK_bptSQYfQm88e3y9VjplH_kroQ,141368
14
+ telegrinder/bot/cute_types/update.py,sha256=VakZ2FwapOJvpEBIyzuiT8eftHHzBS-uPXrAUROQxOg,752
15
+ telegrinder/bot/cute_types/utils.py,sha256=_Ek2r4gQF3two0EAdDYx9AL-0A4P4wdmXnzt8sN2HrI,25567
15
16
  telegrinder/bot/dispatch/__init__.py,sha256=o10t98PY1BuIGaJcloxfbgUYp0bf5ZqAaBQScIaV3VQ,1322
16
17
  telegrinder/bot/dispatch/abc.py,sha256=3bOKEFJTKarwqWTDqhscVw2U5FBllJ-TyId-aUPzb7c,454
17
18
  telegrinder/bot/dispatch/composition.py,sha256=3oYaL7IOnYC2Al0SJ4pk89LTqH8i0eP48t-4-BDtqRQ,2546
@@ -30,7 +31,7 @@ telegrinder/bot/dispatch/return_manager/callback_query.py,sha256=FV_bVdJRbtVNRvf
30
31
  telegrinder/bot/dispatch/return_manager/inline_query.py,sha256=erJ54AXSG_1lACnzmP1CIQYT4RkHT4Ml5PeRD1bkHK4,452
31
32
  telegrinder/bot/dispatch/return_manager/message.py,sha256=eXjQEm1qBv5W9MfvdAfleytarR7UY_Ksnpv4EAaMfQY,824
32
33
  telegrinder/bot/dispatch/view/__init__.py,sha256=iMReW_At2YzenjUGOgrVnOcHLVJAIQAfI9DdQElZdcM,379
33
- telegrinder/bot/dispatch/view/abc.py,sha256=YbGTIPMh9tXsombgxhfYhxVdcz4O5NBVy98xf521hm0,4475
34
+ telegrinder/bot/dispatch/view/abc.py,sha256=5jW5WU4KAMaWjVMU3ZUa8FPhMfG3b4a5_kvvkVOEe_g,4544
34
35
  telegrinder/bot/dispatch/view/box.py,sha256=PbIZrAArerS0DjrltTtDorUNqTMyTaXKyF_F6KwMHzc,1197
35
36
  telegrinder/bot/dispatch/view/callback_query.py,sha256=iL6DbB8ucXGvlv0w8eyMeZ94S1xz181pIn2yvYK1N_8,636
36
37
  telegrinder/bot/dispatch/view/inline_query.py,sha256=ZcT1iCE8uRQ_PeaXGcOsXrMmIl2ow0YTTtDzuQ2kgjU,527
@@ -47,7 +48,7 @@ telegrinder/bot/rules/abc.py,sha256=tOP7hTMaIWgSxRDWrabJRIYBxKsQE8b9a_Vh1xJuFB8,
47
48
  telegrinder/bot/rules/adapter/__init__.py,sha256=jFWpi3te8n-Ega3caCwLiA3iTW7F86brae0TZzH_BaU,231
48
49
  telegrinder/bot/rules/adapter/abc.py,sha256=VxRGQbNtdfA6gZyTk0JjJBdB5n_7g6uwseewtovZEK8,558
49
50
  telegrinder/bot/rules/adapter/errors.py,sha256=2r_UBTWm5-heU-NchBfobC1f848EWeC64nKvprGnAAY,73
50
- telegrinder/bot/rules/adapter/event.py,sha256=MDPqFQ9sbQK2MDNTHgyJ7lTwohhJ7e89ZE5FKUNUkVs,1436
51
+ telegrinder/bot/rules/adapter/event.py,sha256=7VnPRLQnrK0lc5UD0Yjq46B2MO567kswRf9IaX1uFsg,1704
51
52
  telegrinder/bot/rules/adapter/raw_update.py,sha256=K0bwq3Hh-hIs_xbEYDOgZHMS4r-Zvo3VKs1B3gkJLGA,752
52
53
  telegrinder/bot/rules/callback_data.py,sha256=J81mF2m-108Cr9o_j-ySFbMvDVo8aXLLDEQCUa5punI,5744
53
54
  telegrinder/bot/rules/command.py,sha256=2qzcLr_r4g7i5Hndhfd7zyoDfVCLPplr-Ijbr_yE4jo,3322
@@ -68,13 +69,13 @@ telegrinder/bot/scenario/__init__.py,sha256=sH-n6ZhVPgAiAgQVY9Y8QA4wjkjR5a5z63Oa
68
69
  telegrinder/bot/scenario/abc.py,sha256=3AZYRjZlkbDtyFbsKdZ6BefzWYlJ0DOrGwh8jI3nzv4,474
69
70
  telegrinder/bot/scenario/checkbox.py,sha256=lTPXTxIISCQk2qDmtdj5KLcFsxp5p0QjK8ybT8KHpsk,3956
70
71
  telegrinder/bot/scenario/choice.py,sha256=dbRBBSHwODtik95vm4A5SPMbRrDjqVxUbTfNHnnzsFo,1448
71
- telegrinder/client/__init__.py,sha256=E0g_8KuMWzPqw7OMnCtI8pNn_nfmoA8LXiUTnSFLO4E,130
72
- telegrinder/client/abc.py,sha256=DFC_ct2PQCHXIliD0hYx_dQX0uLgc_ApuOAX_6QKQAM,1177
73
- telegrinder/client/aiohttp.py,sha256=cNm3oPV-qiW8FfGUMBu_lfR335HDQnE3f91kBi9rD0w,3615
74
- telegrinder/model.py,sha256=Nc3bqzdh1JZnllnITs7bAraTOB0J4auuUtT_NPjraLY,2443
75
- telegrinder/modules.py,sha256=KwMYS1JNZRl80GwPDUrqh79JR1o4LWbdtOZgsjOXwmk,7513
72
+ telegrinder/client/__init__.py,sha256=ZiS1Wb_l_kv3FHzEEi1oXtFLwlA_HXmWOzeN0xA3E7Y,104
73
+ telegrinder/client/abc.py,sha256=OxsTX_PLYBEeFT9zpidFUzAbQL9BM7rQqru7zdn5DiQ,1611
74
+ telegrinder/client/aiohttp.py,sha256=vGJDAttRVasDZJn39KgUFFZ0nowf7iXTRKcFTO85vwQ,4163
75
+ telegrinder/model.py,sha256=5qD85dXcIf_wb0k0lTfstn0VBxrfDi3LyWF8F4eI9eg,4382
76
+ telegrinder/modules.py,sha256=FSkGq7pAg5ENsByinw7OWBND20Qfy9SwASjUOdUbetU,7571
76
77
  telegrinder/msgspec_json.py,sha256=aWio-5B0pPIEyARFCtHfSAWBDZoWdwRAaijxxGCeRL0,349
77
- telegrinder/msgspec_utils.py,sha256=ic39xr1LG7IbaKmF6QJDPbxcYrVVuqEVWfgJp3_XgR0,6168
78
+ telegrinder/msgspec_utils.py,sha256=OAsssWwhQDNguk5xAfBICEYPs4IdsNlv0a1Znnu_NV0,6658
78
79
  telegrinder/node/__init__.py,sha256=01XTe8GPUBp5LXayDshihTxre7ejf99NYte20d08JLM,706
79
80
  telegrinder/node/attachment.py,sha256=vMnD2tWQQQ6PFuXEIq2ZdL91xcBxiwlAkMkqJqseLlk,2587
80
81
  telegrinder/node/base.py,sha256=iszAnP2pD3REDpUfufbVyJmg0rkXt2-ByeG6LgmS7Zc,2221
@@ -88,8 +89,8 @@ telegrinder/node/tools/__init__.py,sha256=TI_o7MbS4DUOSkNNgJGLocXfRybPFv2WOhBty0
88
89
  telegrinder/node/tools/generator.py,sha256=bc3kJSvS2TdIcBXkEbI4tpfhnvVe16m9ba5-WcIPy0c,1025
89
90
  telegrinder/node/update.py,sha256=QD-m9soBgsP3voTbhaErWdE1FciwYyJCIFNDYf_zra0,253
90
91
  telegrinder/rules.py,sha256=BFB8RFwKKxqs9HFfo_p0RfulQNonPZAX8cHpmnG7qCU,39
91
- telegrinder/tools/__init__.py,sha256=mn70EbB-tXw9psPzt5J5t_8wc7HdSIblsNpG8mwKCxk,3493
92
- telegrinder/tools/buttons.py,sha256=BOTCGtp0pugRquMDkroJ-lw1GoNL2jtbE_5CqmxZRU0,1807
92
+ telegrinder/tools/__init__.py,sha256=zIK3iFniWQsXKQ6pKoCzRhauf2KK_I3wt8K-SvuU60Q,2738
93
+ telegrinder/tools/buttons.py,sha256=BmhmLLT6XCa7FbevWEUxgz0nibHDTamMPogBA0eRBY0,2490
93
94
  telegrinder/tools/error_handler/__init__.py,sha256=iW1EDWLy3HOoRinEpxydg9qeFmg2i5CphZ1S6QyakpY,155
94
95
  telegrinder/tools/error_handler/abc.py,sha256=HaKgC-WWHe-6WoY-ATz-sGh536qeO48EGEzsrmVOjt4,764
95
96
  telegrinder/tools/error_handler/error_handler.py,sha256=H-sfsZ-TsGokBSMrGTE-r1N3-xnGuKOJQqh5sRFgcmk,5423
@@ -106,7 +107,6 @@ telegrinder/tools/i18n/base.py,sha256=sJwgw6lobMIQEKIC4QH5O4sPKZADHAcxltZJvTtvaF
106
107
  telegrinder/tools/i18n/middleware/__init__.py,sha256=y5ZX6s3fOix_Yn98UNO8VqQ7ihJbQ_e5Uz01RgL7pHg,82
107
108
  telegrinder/tools/i18n/middleware/base.py,sha256=Gc0G4ix4xlYCcUzO4SHH1L-1h3c3vmudvNuxeuwZDSE,685
108
109
  telegrinder/tools/i18n/simple.py,sha256=vgkrleAQiYKcE9-2jn0QLvgr09xEXUsnpmygizt77bA,1619
109
- telegrinder/tools/inline_query.py,sha256=lMdBAs9vkZSt78OOGNd6XptGpIsRIE0_Qat238CsBq0,23601
110
110
  telegrinder/tools/kb_set/__init__.py,sha256=k1KCQTnvEgJ2y4KlghhJWOh5rccwg_27cs8264NtMmk,156
111
111
  telegrinder/tools/kb_set/base.py,sha256=mbZs-ViUErfSibzyN064IqZp76LBJPg3NB4D9v4VFtg,243
112
112
  telegrinder/tools/kb_set/yaml.py,sha256=gQZ9Ju0b8DAUrJKPehQDAL1KDszb0NiDzLsF1tT-H58,2022
@@ -117,10 +117,10 @@ telegrinder/tools/loop_wrapper/loop_wrapper.py,sha256=ZEwuqqEz-r5BehCRG-E5K1lg2i
117
117
  telegrinder/tools/magic.py,sha256=roaB5fSymJMXMPMgVWbYjwpK23tDYF8HV_XXL_jxv7Q,1802
118
118
  telegrinder/tools/parse_mode.py,sha256=JyQ-x9YAMPLhIIiUX01acyKkpWgs5TBA07W-iUyPHpE,92
119
119
  telegrinder/types/__init__.py,sha256=pvPKWDXq9PBiIOCW8dFcJMqgr1kAqodPhwT-u8I4kug,78
120
- telegrinder/types/enums.py,sha256=Lnxc9fAT8de5bN1m9rsvxsldWw_O7X7Rexxtdn39zxQ,18015
121
- telegrinder/types/methods.py,sha256=7ErHlq2AraUZtHZWH95TmpfTW34C4fvZdegEmkAVnCQ,183757
122
- telegrinder/types/objects.py,sha256=tNWJ1ifPL8IuZHpNeOyNLzyI3GSDu0kWzMAi3ZI-81g,203259
123
- telegrinder-0.1.dev158.dist-info/LICENSE,sha256=J9ngGsqHCNNjpm3xYPT7EnlzsnjhfqNXej5mJFjM6lw,1094
124
- telegrinder-0.1.dev158.dist-info/METADATA,sha256=7cKd1GWAYL9GJniKdtmt7VHoaiHn3gS9imZ32dSWefc,2760
125
- telegrinder-0.1.dev158.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
126
- telegrinder-0.1.dev158.dist-info/RECORD,,
120
+ telegrinder/types/enums.py,sha256=G99ptakbToTC277W-kcYEz_8TfvbT5RmYDaWrCyxyg8,18079
121
+ telegrinder/types/methods.py,sha256=4NMqR4qWO7YNYst2OH7YBB6xewgcmUKZmBXadfxM0QM,186251
122
+ telegrinder/types/objects.py,sha256=ehY6vVPQAayXiEgr3lW2NCTCfJdODqpPlbHrHLEjUfA,204929
123
+ telegrinder-0.1.dev159.dist-info/LICENSE,sha256=J9ngGsqHCNNjpm3xYPT7EnlzsnjhfqNXej5mJFjM6lw,1094
124
+ telegrinder-0.1.dev159.dist-info/METADATA,sha256=hvy7ioh5m3yDr2kIfaYMbr_KXsE-4UTHFBvuGtEdRro,2811
125
+ telegrinder-0.1.dev159.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
126
+ telegrinder-0.1.dev159.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.7.0
2
+ Generator: poetry-core 1.5.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any