maxapi-python 1.2.4__py3-none-any.whl → 2.0.0__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.
- maxapi_python-2.0.0.dist-info/METADATA +217 -0
- maxapi_python-2.0.0.dist-info/RECORD +140 -0
- {maxapi_python-1.2.4.dist-info → maxapi_python-2.0.0.dist-info}/WHEEL +1 -1
- pymax/__init__.py +50 -105
- pymax/api/__init__.py +17 -0
- pymax/api/auth/__init__.py +1 -0
- pymax/api/auth/enums.py +17 -0
- pymax/api/auth/payloads.py +129 -0
- pymax/api/auth/service.py +313 -0
- pymax/api/auth/types.py +13 -0
- pymax/api/chats/__init__.py +8 -0
- pymax/api/chats/enums.py +27 -0
- pymax/api/chats/payloads.py +103 -0
- pymax/api/chats/service.py +277 -0
- pymax/api/facade.py +32 -0
- pymax/api/messages/__init__.py +1 -0
- pymax/api/messages/enums.py +17 -0
- pymax/api/messages/payloads.py +92 -0
- pymax/api/messages/service.py +337 -0
- pymax/api/models.py +13 -0
- pymax/api/response.py +123 -0
- pymax/api/self/__init__.py +2 -0
- pymax/api/self/enums.py +11 -0
- pymax/api/self/payloads.py +41 -0
- pymax/api/self/service.py +142 -0
- pymax/api/session/__init__.py +1 -0
- pymax/api/session/enums.py +10 -0
- pymax/api/session/payloads.py +76 -0
- pymax/api/session/service.py +72 -0
- pymax/api/uploads/__init__.py +1 -0
- pymax/api/uploads/models.py +49 -0
- pymax/api/uploads/payloads.py +25 -0
- pymax/api/uploads/service.py +458 -0
- pymax/api/users/__init__.py +2 -0
- pymax/api/users/enums.py +12 -0
- pymax/api/users/payloads.py +16 -0
- pymax/api/users/service.py +124 -0
- pymax/app.py +273 -0
- pymax/auth/__init__.py +25 -0
- pymax/auth/base.py +37 -0
- pymax/auth/email.py +0 -0
- pymax/auth/models.py +5 -0
- pymax/auth/providers.py +127 -0
- pymax/auth/qr.py +135 -0
- pymax/auth/service.py +25 -0
- pymax/auth/sms.py +122 -0
- pymax/base.py +204 -0
- pymax/client.py +106 -0
- pymax/client_web.py +83 -0
- pymax/config.py +215 -0
- pymax/connection/__init__.py +1 -0
- pymax/connection/connection.py +205 -0
- pymax/connection/pending.py +46 -0
- pymax/connection/readers/__init__.py +2 -0
- pymax/connection/readers/base.py +6 -0
- pymax/connection/readers/tcp.py +29 -0
- pymax/connection/readers/ws.py +14 -0
- pymax/dispatch/__init__.py +10 -0
- pymax/dispatch/dispatcher.py +222 -0
- pymax/dispatch/enums.py +12 -0
- pymax/dispatch/mapping.py +73 -0
- pymax/dispatch/resolvers.py +52 -0
- pymax/dispatch/router.py +216 -0
- pymax/exceptions.py +22 -89
- pymax/files/__init__.py +9 -0
- pymax/files/base.py +82 -0
- pymax/files/file.py +76 -0
- pymax/files/photo.py +108 -0
- pymax/files/static.py +10 -0
- pymax/files/video.py +74 -0
- pymax/formatting/__init__.py +0 -0
- pymax/formatting/markdown.py +217 -0
- pymax/infra/__init__.py +1 -0
- pymax/infra/auth.py +55 -0
- pymax/infra/base.py +15 -0
- pymax/infra/chat.py +240 -0
- pymax/infra/message.py +252 -0
- pymax/infra/protocol.py +9 -0
- pymax/infra/self.py +139 -0
- pymax/infra/user.py +107 -0
- pymax/logging.py +129 -0
- pymax/protocol/__init__.py +11 -0
- pymax/protocol/base.py +13 -0
- pymax/{static/enum.py → protocol/enums.py} +36 -79
- pymax/protocol/models.py +33 -0
- pymax/protocol/tcp/__init__.py +1 -0
- pymax/protocol/tcp/compression.py +97 -0
- pymax/protocol/tcp/framing.py +68 -0
- pymax/protocol/tcp/payload.py +127 -0
- pymax/protocol/tcp/protocol.py +68 -0
- pymax/protocol/ws/__init__.py +1 -0
- pymax/protocol/ws/protocol.py +27 -0
- pymax/py.typed +0 -0
- pymax/routers.py +8 -0
- pymax/session/__init__.py +3 -0
- pymax/session/models.py +11 -0
- pymax/session/protocol.py +14 -0
- pymax/session/store.py +232 -0
- pymax/telemetry/__init__.py +3 -0
- pymax/telemetry/navigation.py +181 -0
- pymax/telemetry/payloads.py +142 -0
- pymax/telemetry/service.py +225 -0
- pymax/transport/__init__.py +0 -0
- pymax/transport/base.py +14 -0
- pymax/transport/tcp.py +93 -0
- pymax/transport/websocket.py +50 -0
- pymax/types/__init__.py +2 -0
- pymax/types/domain/__init__.py +11 -0
- pymax/types/domain/attachments/__init__.py +11 -0
- pymax/types/domain/attachments/audio.py +35 -0
- pymax/types/domain/attachments/call.py +26 -0
- pymax/types/domain/attachments/contact.py +32 -0
- pymax/types/domain/attachments/control.py +20 -0
- pymax/types/domain/attachments/enums.py +27 -0
- pymax/types/domain/attachments/file.py +56 -0
- pymax/types/domain/attachments/keyboards/__init__.py +1 -0
- pymax/types/domain/attachments/keyboards/inline.py +19 -0
- pymax/types/domain/attachments/photo.py +45 -0
- pymax/types/domain/attachments/share.py +29 -0
- pymax/types/domain/attachments/sticker.py +50 -0
- pymax/types/domain/attachments/video.py +90 -0
- pymax/types/domain/auth.py +161 -0
- pymax/types/domain/base.py +17 -0
- pymax/types/domain/chat.py +426 -0
- pymax/types/domain/element.py +24 -0
- pymax/types/domain/enums.py +24 -0
- pymax/types/domain/error.py +20 -0
- pymax/types/domain/folder.py +74 -0
- pymax/types/domain/login.py +35 -0
- pymax/types/domain/message.py +378 -0
- pymax/types/domain/name.py +20 -0
- pymax/types/domain/profile.py +15 -0
- pymax/types/domain/session.py +52 -0
- pymax/types/domain/sync.py +80 -0
- pymax/types/domain/user.py +117 -0
- pymax/types/events/__init__.py +3 -0
- pymax/types/events/file.py +5 -0
- pymax/types/events/message.py +37 -0
- pymax/types/events/video.py +5 -0
- maxapi_python-1.2.4.dist-info/METADATA +0 -205
- maxapi_python-1.2.4.dist-info/RECORD +0 -33
- pymax/core.py +0 -390
- pymax/crud.py +0 -96
- pymax/files.py +0 -138
- pymax/filters.py +0 -164
- pymax/formatter.py +0 -31
- pymax/formatting.py +0 -74
- pymax/interfaces.py +0 -552
- pymax/mixins/__init__.py +0 -40
- pymax/mixins/auth.py +0 -368
- pymax/mixins/channel.py +0 -130
- pymax/mixins/group.py +0 -458
- pymax/mixins/handler.py +0 -285
- pymax/mixins/message.py +0 -879
- pymax/mixins/scheduler.py +0 -28
- pymax/mixins/self.py +0 -259
- pymax/mixins/socket.py +0 -297
- pymax/mixins/telemetry.py +0 -112
- pymax/mixins/user.py +0 -219
- pymax/mixins/websocket.py +0 -142
- pymax/models.py +0 -8
- pymax/navigation.py +0 -187
- pymax/payloads.py +0 -367
- pymax/protocols.py +0 -123
- pymax/static/constant.py +0 -89
- pymax/types.py +0 -1220
- pymax/utils.py +0 -90
- {maxapi_python-1.2.4.dist-info → maxapi_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maxapi-python
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Python wrapper для API мессенджера Max
|
|
5
|
+
Project-URL: Homepage, https://github.com/MaxApiTeam/PyMax
|
|
6
|
+
Project-URL: Repository, https://github.com/MaxApiTeam/PyMax
|
|
7
|
+
Project-URL: Issues, https://github.com/MaxApiTeam/PyMax/issues
|
|
8
|
+
Project-URL: Documentation, https://maxapiteam.github.io/PyMax/
|
|
9
|
+
Author-email: ink <inkdev@proton.me>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,asyncio,max,messenger,tcp,websocket,wrapper
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Framework :: AsyncIO
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: aiofiles>=25.1.0
|
|
26
|
+
Requires-Dist: aiohttp>=3.13.5
|
|
27
|
+
Requires-Dist: aiosqlite>=0.22.1
|
|
28
|
+
Requires-Dist: msgpack>=1.1.2
|
|
29
|
+
Requires-Dist: pydantic>=2.10.0
|
|
30
|
+
Requires-Dist: python-socks[asyncio]>=2.8.1
|
|
31
|
+
Requires-Dist: qrcode>=8.2
|
|
32
|
+
Requires-Dist: websockets>=16.0
|
|
33
|
+
Provides-Extra: docs
|
|
34
|
+
Requires-Dist: furo>=2025.12.19; extra == 'docs'
|
|
35
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == 'docs'
|
|
36
|
+
Requires-Dist: sphinx>=8.1.3; extra == 'docs'
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'test'
|
|
39
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'test'
|
|
40
|
+
Requires-Dist: pytest-timeout>=2.1.0; extra == 'test'
|
|
41
|
+
Requires-Dist: pytest>=8.0.0; extra == 'test'
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# PyMax
|
|
45
|
+
|
|
46
|
+
Python-библиотека для Max API.
|
|
47
|
+
|
|
48
|
+
[](https://www.python.org/)
|
|
49
|
+
[](LICENSE)
|
|
50
|
+
[](https://pypi.org/project/maxapi-python/)
|
|
51
|
+
|
|
52
|
+
> [!WARNING]
|
|
53
|
+
> PyMax использует неофициальный внутренний API Max. API может измениться без
|
|
54
|
+
> предупреждения, а использование библиотеки может нарушать условия сервиса.
|
|
55
|
+
> Вы используете PyMax на свой риск; авторы и контрибьюторы не несут
|
|
56
|
+
> ответственности за блокировки аккаунтов, потерю данных или другие последствия.
|
|
57
|
+
|
|
58
|
+
## Что это
|
|
59
|
+
|
|
60
|
+
**PyMax** - асинхронная Python-библиотека для внутреннего API Max. Она умеет
|
|
61
|
+
авторизоваться в аккаунте, слушать события, отправлять сообщения, работать с
|
|
62
|
+
чатами, пользователями, файлами, сессиями и доменными типами Max через TCP или
|
|
63
|
+
WebSocket.
|
|
64
|
+
|
|
65
|
+
## Возможности
|
|
66
|
+
|
|
67
|
+
- Авторизация по телефону и SMS-коду через `Client`.
|
|
68
|
+
- QR-авторизация web-клиента через `WebClient`.
|
|
69
|
+
- Роутеры, фильтры, `on_start`, raw-события и typed events.
|
|
70
|
+
- Сообщения: отправка, ответы, reply, реакции, pin, read, delete и история.
|
|
71
|
+
- Чаты, группы, участники, invite-ссылки и настройки групп.
|
|
72
|
+
- Пользователи, контакты, профиль, папки, активные сессии и 2FA.
|
|
73
|
+
- Вложения: `Photo`, `File`, `Video`.
|
|
74
|
+
- SQLite-сессии, sync-state, reconnect и debug-логи.
|
|
75
|
+
- Pydantic-модели и удобные domain-объекты.
|
|
76
|
+
|
|
77
|
+
## Установка
|
|
78
|
+
|
|
79
|
+
Требуется Python 3.10 или новее.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install -U maxapi-python
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Через `uv`:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
uv add -U maxapi-python
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Напрямую из репозитория:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install git+https://github.com/MaxApiTeam/PyMax.git
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Быстрый старт
|
|
98
|
+
|
|
99
|
+
`Client` использует TCP-соединение. При первом запуске PyMax попросит SMS-код
|
|
100
|
+
и сохранит сессию в SQLite-файл; дальше этот файл используется автоматически.
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
import asyncio
|
|
104
|
+
|
|
105
|
+
from pymax import Client, Message
|
|
106
|
+
|
|
107
|
+
client = Client(
|
|
108
|
+
phone="+79990000000",
|
|
109
|
+
work_dir="cache",
|
|
110
|
+
session_name="main.db",
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@client.on_start()
|
|
115
|
+
async def on_start(client: Client) -> None:
|
|
116
|
+
print("Клиент запущен")
|
|
117
|
+
print("Ваш ID:", client.me.contact.id if client.me else "unknown")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@client.on_message()
|
|
121
|
+
async def on_message(message: Message, client: Client) -> None:
|
|
122
|
+
print(message.chat_id, message.sender, message.text)
|
|
123
|
+
|
|
124
|
+
if message.chat_id is not None and message.text:
|
|
125
|
+
await message.answer("Привет от PyMax")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def main() -> None:
|
|
129
|
+
await client.start()
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if __name__ == "__main__":
|
|
133
|
+
asyncio.run(main())
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## WebClient
|
|
137
|
+
|
|
138
|
+
`WebClient` использует WebSocket и QR-авторизацию:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
import asyncio
|
|
142
|
+
|
|
143
|
+
from pymax import WebClient
|
|
144
|
+
|
|
145
|
+
client = WebClient(work_dir="cache", session_name="web.db")
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
@client.on_start()
|
|
149
|
+
async def on_start(client: WebClient) -> None:
|
|
150
|
+
print("Web-клиент запущен")
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
asyncio.run(client.start())
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Роутеры
|
|
157
|
+
|
|
158
|
+
Обработчики можно регистрировать на клиенте или вынести в отдельный роутер.
|
|
159
|
+
Handler всегда принимает событие и клиента: `(event, client)`.
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
from pymax import Client, ClientRouter, Message
|
|
163
|
+
|
|
164
|
+
router = ClientRouter()
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def is_start(message: Message) -> bool:
|
|
168
|
+
return message.text == "/start"
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
@router.on_message(is_start)
|
|
172
|
+
async def start(message: Message, client: Client) -> None:
|
|
173
|
+
await message.answer("Готово")
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
client = Client(phone="+79990000000", work_dir="cache")
|
|
177
|
+
client.include_router(router)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Куда дальше
|
|
181
|
+
|
|
182
|
+
- [Getting Started](docs/getting-started.rst) - первый запуск и сессии.
|
|
183
|
+
- [Client](docs/client.rst) - жизненный цикл клиента, reconnect и sync-state.
|
|
184
|
+
- [Router](docs/router.rst) - роутеры, фильтры и raw events.
|
|
185
|
+
- [Messages](docs/messages.rst) - сообщения, реакции, история и вложения.
|
|
186
|
+
- [Files](docs/files.rst) - отправка и скачивание файлов.
|
|
187
|
+
- [FAQ](docs/faq.rst) и [Troubleshooting](docs/troubleshooting.rst) - частые
|
|
188
|
+
проблемы.
|
|
189
|
+
|
|
190
|
+
Опубликованная документация:
|
|
191
|
+
|
|
192
|
+
- [docs.pymax.org](https://docs.pymax.org/)
|
|
193
|
+
- [DeepWiki](https://deepwiki.com/MaxApiTeam/PyMax)
|
|
194
|
+
|
|
195
|
+
## Разработка
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
uv sync --all-groups
|
|
199
|
+
uv run python -c "import pymax; print(pymax.__all__)"
|
|
200
|
+
uv run sphinx-build -b html docs docs/_build/html
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Ссылки
|
|
204
|
+
|
|
205
|
+
- [GitHub](https://github.com/MaxApiTeam/PyMax)
|
|
206
|
+
- [PyPI](https://pypi.org/project/maxapi-python/)
|
|
207
|
+
- [Telegram](https://t.me/pymax_news)
|
|
208
|
+
|
|
209
|
+
## Лицензия
|
|
210
|
+
|
|
211
|
+
Проект распространяется под лицензией MIT. Подробности см. в [LICENSE](LICENSE).
|
|
212
|
+
|
|
213
|
+
## Авторы
|
|
214
|
+
|
|
215
|
+
- [ink](https://github.com/ink-developer) - основной разработчик, исследование
|
|
216
|
+
API и документация.
|
|
217
|
+
- [noxzion](https://github.com/noxzion) - оригинальный автор проекта.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
pymax/__init__.py,sha256=fmEHxWejLJiQmuvPDKBWhYJmo1c-U1Q8R6n-7kVaFPw,1255
|
|
2
|
+
pymax/app.py,sha256=yZBRWDy60DfzZFdsNDovhCI3N_hCgBkwkFSVFr13jCI,9489
|
|
3
|
+
pymax/base.py,sha256=Qy4E8Rr-4xuJE-rlFP624O35slEwUyu3gtqUcPbGr-c,7212
|
|
4
|
+
pymax/client.py,sha256=YCOZI_BIUvDKGNXBxnVErVTZ8cXr8DE8SS9UqGD85VA,3967
|
|
5
|
+
pymax/client_web.py,sha256=J0jM3ewuokVntYSvuqg6jtJMgA2yhyN8gb8V9w4qFhk,2990
|
|
6
|
+
pymax/config.py,sha256=-rqgFPlZ1E92TDFk6iG0k23GvkSWMwY4NyWHJkYPbUs,8531
|
|
7
|
+
pymax/exceptions.py,sha256=8pxjZsfgrMPrZfE3zedIbabqP75diEr2_6Xg3PGjiSQ,963
|
|
8
|
+
pymax/logging.py,sha256=K0dsOMN4LPxybIvCeo5q1yWNRL-TSbu2r5IB25lhYb0,3410
|
|
9
|
+
pymax/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
pymax/routers.py,sha256=UvIEWcBF1VPBmUFrubBQ7uo3DZylf4qdbnQGDkUYjyE,225
|
|
11
|
+
pymax/api/__init__.py,sha256=oWC09vGaP6S7_nnTJ4y5PbTkbA4U29DhafpwIqD2QGI,356
|
|
12
|
+
pymax/api/facade.py,sha256=YhwgVfpuWv__9KFXIpnw8ktUsrBzYtRPkZrMN0nfQVY,832
|
|
13
|
+
pymax/api/models.py,sha256=1i9WfX_1zz-uke0EqTu1GbmHPpUxKElEBEFeaQAIYTI,348
|
|
14
|
+
pymax/api/response.py,sha256=sWbvM-3MhJpwo0-w_5-puDpFQL62UWQxR1gzYWdw4HU,2574
|
|
15
|
+
pymax/api/auth/__init__.py,sha256=m6yw6RPrq10iNkSI8z59n3OXTnAw8VfxIALnhVztL2g,33
|
|
16
|
+
pymax/api/auth/enums.py,sha256=RnKeeBCHcleeyJ1KSRRG1QSp7I_tS6jmJKv7SUHwQnY,518
|
|
17
|
+
pymax/api/auth/payloads.py,sha256=SN7CL9fTDsVKJYjSKWwN8xBwa6OnI4BCN0sS8LxNT8E,2910
|
|
18
|
+
pymax/api/auth/service.py,sha256=DU_8RpELw1PYflbtDj5JCycfU9aD5uG2Tn63KWlCME4,10073
|
|
19
|
+
pymax/api/auth/types.py,sha256=VrYR7rIZOrW45yKnQmC5MSe9kxgXmqPzh9VG_y1tSEs,200
|
|
20
|
+
pymax/api/chats/__init__.py,sha256=UMp3uKdB3tZlnWckndgF3jaU-3-49OJE18z2d0OlmIU,155
|
|
21
|
+
pymax/api/chats/enums.py,sha256=KstEKTpBAkz0MC4rezkrtpsrlbzqyVA8qbfYP1f_jmo,603
|
|
22
|
+
pymax/api/chats/payloads.py,sha256=J5lRsx5Xzc3lzcYVxS7ptrr7dQl01oSXoEZYMhtr10M,2495
|
|
23
|
+
pymax/api/chats/service.py,sha256=fLauRNUqoZ5GGUxgrR8T7I_2lcStgWzCNWdmI2Ubzvc,9023
|
|
24
|
+
pymax/api/messages/__init__.py,sha256=fw_uF6tgSbkxvqaSVE65wU0KWsu47u1CtR0Y4BbD-K0,36
|
|
25
|
+
pymax/api/messages/enums.py,sha256=7hWOcbEjrggDoNqFUrzNPq2c1QrAdoYg_q5Tfz3e_XY,344
|
|
26
|
+
pymax/api/messages/payloads.py,sha256=P1acrWLLxIzfVRDiwPOAwFGwG69ip0nVqQdtZFuq3qc,1865
|
|
27
|
+
pymax/api/messages/service.py,sha256=tVaZa3bqWeRLoicD1oYNzmMc0s4zIntYOvdhTIpojBs,10169
|
|
28
|
+
pymax/api/self/__init__.py,sha256=TfbqL4xLb5IMhbW8mlAK-AwVFqqPWMADogKZeWtkw0A,79
|
|
29
|
+
pymax/api/self/enums.py,sha256=iKEqPy44LyQKvAPfyhpkSXgmWWohxry73F0CVgtekwY,180
|
|
30
|
+
pymax/api/self/payloads.py,sha256=-SFqkNxC5ZLKnLty_Gyz_b_P3X1esu_7Urb4HjrQxM4,774
|
|
31
|
+
pymax/api/self/service.py,sha256=HvfDyGYvm8x9RKBOF1CAFaGB1IZjqhM1S8id7Q4gc2Q,4545
|
|
32
|
+
pymax/api/session/__init__.py,sha256=zo-rCKBVBsFK-810T-Le4VbAYKt109cQ6elf0UkgiNk,36
|
|
33
|
+
pymax/api/session/enums.py,sha256=InBdwAu_filqW3rMfGrOkHgmFfqgB1ytjnCcxDq29xc,236
|
|
34
|
+
pymax/api/session/payloads.py,sha256=KJBoP_XfL2lJbXvR3tzWf2WaLn73L2LiEuqP0cdJ6u0,2258
|
|
35
|
+
pymax/api/session/service.py,sha256=8ELcsnKNHLT8hgExw5laZvHF6SIOSQB6RpXoxf1rbbI,1994
|
|
36
|
+
pymax/api/uploads/__init__.py,sha256=E7INNsBeMStze2VWMADX4mrswsQeJb85C71sSuiOpv0,35
|
|
37
|
+
pymax/api/uploads/models.py,sha256=H8KaTi8MD-WEJrJon0cusgcKevELPmhaWpCrI8vLPoU,1008
|
|
38
|
+
pymax/api/uploads/payloads.py,sha256=OqsfFJIRe2io7mltHPbDPORT8U5t27H6pvqrdNKPRHY,652
|
|
39
|
+
pymax/api/uploads/service.py,sha256=YWzA-VbGtiCBUT3w95iTi3bAkAc_1ysgliqFob1I2Bs,18369
|
|
40
|
+
pymax/api/users/__init__.py,sha256=CDakgSKwVAkX-kNoDmIo2JsFPsS7Nx3j2vIMwQnPRck,82
|
|
41
|
+
pymax/api/users/enums.py,sha256=m3d225sjWkBIRF5NNi3ChnyZ6BgKUEbPYoYwVjpifZ4,205
|
|
42
|
+
pymax/api/users/payloads.py,sha256=VoXXctQDl7WXt5zqoRKzdONqmris5Cxf7-6Hy_Gcd-A,288
|
|
43
|
+
pymax/api/users/service.py,sha256=lW5Lq9u7F91ofn5Cn-QuaOcQKn7Gry7heWQlOz2TwFM,3997
|
|
44
|
+
pymax/auth/__init__.py,sha256=KgghKg0CPcJzX_D14TvxuDzhNmoVoFGjv414NouJVgk,512
|
|
45
|
+
pymax/auth/base.py,sha256=v492FMUmSKft6oJRmCdIr33sy50Z0kqBwu5t7cVLQe4,1222
|
|
46
|
+
pymax/auth/email.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
|
+
pymax/auth/models.py,sha256=2SbjOJev1-B1bFEFM0NJPNX4wBTc4JbVDDouRHoAYc0,91
|
|
48
|
+
pymax/auth/providers.py,sha256=B3EaS-iKxrZffcxiBKjoA1TsytwybHUunjZUtbjiiVE,4148
|
|
49
|
+
pymax/auth/qr.py,sha256=VdrlaW15illIhqPaTczepA4my3P06Fa433HQ0eaucJE,4171
|
|
50
|
+
pymax/auth/service.py,sha256=cUZxs5UW9ysSaJ-UXSOz0ug3fDo1eN0xAjO7VP1MdTU,619
|
|
51
|
+
pymax/auth/sms.py,sha256=m8M1oB6XErciesIBTgeQvJhqor13h8hlyVkYWzZmISA,4045
|
|
52
|
+
pymax/connection/__init__.py,sha256=YTboFk9AfYkRUw2Hf4oxn63LTGV475fxp_oel1j4gas,42
|
|
53
|
+
pymax/connection/connection.py,sha256=UJvdAaHdxtH8tYv241rD8E7y99berY-1oeQcWJ56frk,6645
|
|
54
|
+
pymax/connection/pending.py,sha256=qezxL019d1E6oiCmSgCSfojLj7sxR1BEGgcKBWSFhok,1328
|
|
55
|
+
pymax/connection/readers/__init__.py,sha256=9g5ZbcWiHxW1kAi2ckiNqejoGHwoDwFd4WvtYQSyRzU,52
|
|
56
|
+
pymax/connection/readers/base.py,sha256=FlvyMUFoZ4FORAh0vBU6_I0BnrQ9_1twpUIKz-Vkj58,126
|
|
57
|
+
pymax/connection/readers/tcp.py,sha256=9MtFygdKQO8Lm7ZRAxdWFvApiG5wmo9gw82GqA7cRPk,1052
|
|
58
|
+
pymax/connection/readers/ws.py,sha256=IjeH5CoXvBWde46tZLx6uKONkjhCU6NeC79x3Swfw8E,368
|
|
59
|
+
pymax/dispatch/__init__.py,sha256=bvHjlw2ltujMAiegW-Sv2fSGKUnkmtPcYINUZ-Ty8qo,189
|
|
60
|
+
pymax/dispatch/dispatcher.py,sha256=rXsBfxYzL0KbK-IZgiQI-SAVFSxDX1V5YZi2Jj6bubs,6948
|
|
61
|
+
pymax/dispatch/enums.py,sha256=b2ZMBON7ls4QDjeoye-o7mPHFxMxc-CTtYBUuKyhfrQ,298
|
|
62
|
+
pymax/dispatch/mapping.py,sha256=2djWFBaoAcHthf-7DWMFBCg_ImhWmue8NvXmpwmZSiE,2400
|
|
63
|
+
pymax/dispatch/resolvers.py,sha256=XAZFy2N_zKuVztbwGKF_wzzUrrfM4cs1nGxiSP2jb1w,1511
|
|
64
|
+
pymax/dispatch/router.py,sha256=i9HCycAP3It8-Pm88P3_X3vzn7MblWzuHbB5Rx-7TLM,6590
|
|
65
|
+
pymax/files/__init__.py,sha256=TR0N6YXX4IHBsXQo8uiK68C-Xg3LSj48d4Zsv71CWZE,126
|
|
66
|
+
pymax/files/base.py,sha256=z8r8zxQVK7Z4XzvFdv_Sx9nkmx17ZeThrCP6pXgsJAM,2648
|
|
67
|
+
pymax/files/file.py,sha256=JSkuKx0fdGxzcsyMajWTosFzTlfgZYvQbh-RDp9OZyQ,2337
|
|
68
|
+
pymax/files/photo.py,sha256=TeGBzVXFpiExhMjKCLHFjCu3DYKFZ6-jub-RZ_SiCco,3523
|
|
69
|
+
pymax/files/static.py,sha256=U_KfM0rbGMEWcsBnWIhIXzzk46hHYQ7KJnrGnfDLoMs,142
|
|
70
|
+
pymax/files/video.py,sha256=fGXgSY5zH-voYPVjbDBnkGI1TeP-KOSq3DZEDFNnn68,2153
|
|
71
|
+
pymax/formatting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
+
pymax/formatting/markdown.py,sha256=ukozC8ZYtmB-dKoK9KwIwofHZ3p5NoVbRdtgNDsWmPY,6118
|
|
73
|
+
pymax/infra/__init__.py,sha256=lKq6cehhB87HltV53TD0kr0p7ekWlZlrKTpaYiq0XFw,28
|
|
74
|
+
pymax/infra/auth.py,sha256=_l9-RxbMgBeMUfHE9fszZLYB5Zt45iOumDunbUGOVZg,2215
|
|
75
|
+
pymax/infra/base.py,sha256=Ss7upi4YYdvWX9c0U3ehdbW0nVEcsaZncDmpPJ7r8oc,325
|
|
76
|
+
pymax/infra/chat.py,sha256=MPvoqV1C43o7oUXsxNt6xgwlhaJO0i0ZkeCsoKwN3xI,9034
|
|
77
|
+
pymax/infra/message.py,sha256=Hee5z9a47aZRnSAvTMdTaa5BzwMnOnSoB-z3JVX3J3o,8518
|
|
78
|
+
pymax/infra/protocol.py,sha256=I2WrAeAgATuNSdK2gvHU-MhhxdRBfSMGMovF5HPFsQw,208
|
|
79
|
+
pymax/infra/self.py,sha256=w2eHIgmKkarhfbtAdGo_iZ4Qbs2DaSzzm-TLzXKNn8E,4963
|
|
80
|
+
pymax/infra/user.py,sha256=nv9jkWpWvCWETHZsyUMmm5FWkzLTJT2SHXZ7SglZE8M,4331
|
|
81
|
+
pymax/protocol/__init__.py,sha256=rDn1Twi1iBDUk1155YI9jyeQyaGVDRuPoWdlaaLZnsw,242
|
|
82
|
+
pymax/protocol/base.py,sha256=_bisk1BU_GSMSPIqfnizSCgm_qBrdbB5cJw6foAa2tc,294
|
|
83
|
+
pymax/protocol/enums.py,sha256=9y4kn9y2pKinaT_twdeW5MXVH3O-sJF6h0v5KbC9VkA,4376
|
|
84
|
+
pymax/protocol/models.py,sha256=kno-09OoPoLKBMixS9nrDkCbxcIwvU37RlZgaq5MfVo,584
|
|
85
|
+
pymax/protocol/tcp/__init__.py,sha256=ivIZZ-UoT_MiRIUWTLiyeKSBOzf9XztSprHPHgoWNuI,34
|
|
86
|
+
pymax/protocol/tcp/compression.py,sha256=sa9xe3cjAYXsJCPPxGc6iRyctFaT15VcqQ0fiC8vk4A,3014
|
|
87
|
+
pymax/protocol/tcp/framing.py,sha256=nBnCrlIaxOMAbAVDXTAY6jdMoKlbh0jV-XCVsOO-i7U,1874
|
|
88
|
+
pymax/protocol/tcp/payload.py,sha256=vQERjBNJLaltmWOCvnSQHcpDzA7x9VBhK3oECtO0qsU,4272
|
|
89
|
+
pymax/protocol/tcp/protocol.py,sha256=2XcOE23JaUoimWohvgpIwLbqHpi_0GSO9AGCCshKMgc,2227
|
|
90
|
+
pymax/protocol/ws/__init__.py,sha256=oQK0h28B6gGItf7eHanWy_XsgUA_L9Lclnuz9ZQL9YI,33
|
|
91
|
+
pymax/protocol/ws/protocol.py,sha256=z6zzBQTlJfzwOmLsJYoYQ2L1AYpY5wYMJyPir_zfNBQ,913
|
|
92
|
+
pymax/session/__init__.py,sha256=natjnLjPjTvkfvSYtoiPxzmU44XJi0MpjWiOPD-On4g,100
|
|
93
|
+
pymax/session/models.py,sha256=jvnTHfjCX1p5TcANfWZ0vUJlciuqumatwdrgYiKm4kY,250
|
|
94
|
+
pymax/session/protocol.py,sha256=8ibp-HiaJaGmx23v7GeL0GFsvLPZZqWOuIOJnanqoCM,612
|
|
95
|
+
pymax/session/store.py,sha256=FkhrG0J2ueU2Z4PxJQxFPOcunKnpVavnAaJgPb2bx-E,7770
|
|
96
|
+
pymax/telemetry/__init__.py,sha256=6mP5y-iTbVIlqpSWIKWCTz2fFNBwkAEYwS4PFbyv9xM,71
|
|
97
|
+
pymax/telemetry/navigation.py,sha256=vlP7d863s9aIBpt9SPpjEbTXLoq3uqpuhD-VWj0w9hI,5441
|
|
98
|
+
pymax/telemetry/payloads.py,sha256=MCKYGpQ4Tvx_8LH86Et0yevea2Th2z3b7a9pfmrQRys,3959
|
|
99
|
+
pymax/telemetry/service.py,sha256=9L0K7Rl7hE79Mly2mo1QLiDqP0uiaKCzNzRBdDvFGks,7030
|
|
100
|
+
pymax/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
|
+
pymax/transport/base.py,sha256=0D3srQ36F0s23pIjqd6YzRGKK9wCmXKr3wfe2XYYlos,448
|
|
102
|
+
pymax/transport/tcp.py,sha256=HGhe5LW3KhwQRPYBKdzDWNpv9dfnOQHMUHsa14vis6M,2915
|
|
103
|
+
pymax/transport/websocket.py,sha256=7R2WgeYINNUq0BZVnzyVD1cZPCDZuVVi6b65lMndEcc,1520
|
|
104
|
+
pymax/types/__init__.py,sha256=y77mfDRgxmfcamobi0rj2d3PsxhH0zxyvKPhL2iUdS8,44
|
|
105
|
+
pymax/types/domain/__init__.py,sha256=glpM6uh_2BlaFMTM1F18EjnyvsJugIrC0M_ud6YUwVo,385
|
|
106
|
+
pymax/types/domain/auth.py,sha256=8p4qX9RAJ6dIsAmoKFrfxlq6dct689qXgrngcep48a4,5214
|
|
107
|
+
pymax/types/domain/base.py,sha256=Q32PcKR3gtrISySowR3zPyl9KeQCoUL6lfyTR3ulMzo,623
|
|
108
|
+
pymax/types/domain/chat.py,sha256=xpLutj9uCIQupAO1zu2eXzEEXL8DcQ4N6tkZQeQUsCM,18329
|
|
109
|
+
pymax/types/domain/element.py,sha256=slMVlp5Fn1H1hFUinruuP7s2wawkSrS5c1eCeY31p-g,620
|
|
110
|
+
pymax/types/domain/enums.py,sha256=eGMWnlv0mYJ8K-0FsC_wp4Co2M6YWyKI1Lx90MJ6s4g,412
|
|
111
|
+
pymax/types/domain/error.py,sha256=0UlH_eikpnToj2yrlpBxmr85IAANR1whrBdo6Nesj88,556
|
|
112
|
+
pymax/types/domain/folder.py,sha256=dS2EhMiTIEJAiynSV2CqSrPtmf2V3cjNc_aTdSKmmuY,2456
|
|
113
|
+
pymax/types/domain/login.py,sha256=1ugRakYM0MymAqgHKdvuhnwH2w4adoEHc_hbH5-56Fw,1287
|
|
114
|
+
pymax/types/domain/message.py,sha256=vb1Rmxnz145EP5_C1fpjvGLrenATN6HBivrst9M8OOc,14387
|
|
115
|
+
pymax/types/domain/name.py,sha256=qMIshIqgWkVuROxmiCRhwfJf8XtmhSBoEU6nXs_gEh0,523
|
|
116
|
+
pymax/types/domain/profile.py,sha256=taN5PjlKp4EDypVhDx89vmBDpSKh-kT-ISpu1tR2cY8,471
|
|
117
|
+
pymax/types/domain/session.py,sha256=T0b0qjI65kNQOCgx3nIkaIqynD4eGKyqnscbIlPFVnQ,2002
|
|
118
|
+
pymax/types/domain/sync.py,sha256=lBDWo4ACLq2ov5XBccfnI8s_dsGEA7O4mIJVBSUpyrc,3248
|
|
119
|
+
pymax/types/domain/user.py,sha256=diy8UmMN1-KkLJjuybnVlj7qC_0jlEzM49N0jMYk2dk,4520
|
|
120
|
+
pymax/types/domain/attachments/__init__.py,sha256=7QS5881emGVJ4YBMxHkzxYWWwRjPH9-VKWu9xzGnr8s,432
|
|
121
|
+
pymax/types/domain/attachments/audio.py,sha256=X_GR68yDCDqRlLcO4qtZPQigfmQfkRFb9OF-TZgoDkw,1075
|
|
122
|
+
pymax/types/domain/attachments/call.py,sha256=RV-BFutymZFinzUiRdaIryqx6ubku2v6y6brc-qsHOQ,818
|
|
123
|
+
pymax/types/domain/attachments/contact.py,sha256=EO-B0klgUMITL05fBgFXi99i8VzxBj3D2pLB0JBWy_M,996
|
|
124
|
+
pymax/types/domain/attachments/control.py,sha256=1Zr0pM1ODZgYRX3CDw7yGzqEgb6R_JjRSQOSI_FDpDE,502
|
|
125
|
+
pymax/types/domain/attachments/enums.py,sha256=O55YcZtpuTxu2i3MLXh0-rbwNltOkzEj9F9hygfi_hc,619
|
|
126
|
+
pymax/types/domain/attachments/file.py,sha256=3lqsPIkg75-AmcaEbXwc1eiQHIv9JpWzMc0z4u2MupE,1595
|
|
127
|
+
pymax/types/domain/attachments/photo.py,sha256=8q79OuQ0V8t-s9pZM8ClAmgJI71m-bgES4Bd5ZSNVI0,1413
|
|
128
|
+
pymax/types/domain/attachments/share.py,sha256=BHJIVjTC99wfbUn8wSN4j0aSNlEpojzv87uwbmhPPt0,924
|
|
129
|
+
pymax/types/domain/attachments/sticker.py,sha256=2CFqoUAuUjA6nclRXZUCBO2mKZd24BaBY3wz2XoR7kE,1530
|
|
130
|
+
pymax/types/domain/attachments/video.py,sha256=Jdh0ZKC6R2crbQUD8LEhMnNDYIM_gCoxDazMA_DjVNU,2888
|
|
131
|
+
pymax/types/domain/attachments/keyboards/__init__.py,sha256=1X5UGBe5E_DO7e4p8_JmJEocHLzXOezutieRuQsVpRA,45
|
|
132
|
+
pymax/types/domain/attachments/keyboards/inline.py,sha256=3RNubcqx7RZ1f6zfJ7JaNFCPx5mnmJ5vYsL1i7lSMAM,577
|
|
133
|
+
pymax/types/events/__init__.py,sha256=fNLP_8zYRsew2k-1s8wXCJeSPm8QQ4gmiZ86B51SuCw,112
|
|
134
|
+
pymax/types/events/file.py,sha256=XhpXn0Vt9OODkx1OkGb9jfQwc1uNgz1NTn_j9FZnQ8s,102
|
|
135
|
+
pymax/types/events/message.py,sha256=d4dlnpu3VCtZ4vFdRXaACvydAE9sbGGkk52E48K0U_U,1248
|
|
136
|
+
pymax/types/events/video.py,sha256=swBHYadmDS0SjLXGqVqRYsuMoVZ6MjD2aYR2fbM-AJc,104
|
|
137
|
+
maxapi_python-2.0.0.dist-info/METADATA,sha256=KNq51Db-VLPk0Vgpd2fhG6sjdcXwgQING1uTkGLLio4,7563
|
|
138
|
+
maxapi_python-2.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
139
|
+
maxapi_python-2.0.0.dist-info/licenses/LICENSE,sha256=hOR249ItqMdcly1A0amqEWRNRTq4Gv5NJtmQ3A5qK4E,1070
|
|
140
|
+
maxapi_python-2.0.0.dist-info/RECORD,,
|
pymax/__init__.py
CHANGED
|
@@ -1,113 +1,58 @@
|
|
|
1
|
-
""
|
|
2
|
-
Python wrapper для API мессенджера Max
|
|
3
|
-
"""
|
|
1
|
+
__version__ = "2.0.0"
|
|
4
2
|
|
|
5
|
-
from .core import (
|
|
6
|
-
MaxClient,
|
|
7
|
-
SocketMaxClient,
|
|
8
|
-
)
|
|
9
|
-
from .exceptions import (
|
|
10
|
-
InvalidPhoneError,
|
|
11
|
-
LoginError,
|
|
12
|
-
ResponseError,
|
|
13
|
-
ResponseStructureError,
|
|
14
|
-
SocketNotConnectedError,
|
|
15
|
-
SocketSendError,
|
|
16
|
-
WebSocketNotConnectedError,
|
|
17
|
-
)
|
|
18
|
-
from .files import (
|
|
19
|
-
File,
|
|
20
|
-
Photo,
|
|
21
|
-
)
|
|
22
|
-
from .static.enum import (
|
|
23
|
-
AccessType,
|
|
24
|
-
AttachType,
|
|
25
|
-
AuthType,
|
|
26
|
-
ChatType,
|
|
27
|
-
ContactAction,
|
|
28
|
-
DeviceType,
|
|
29
|
-
ElementType,
|
|
30
|
-
FormattingType,
|
|
31
|
-
MarkupType,
|
|
32
|
-
MessageStatus,
|
|
33
|
-
MessageType,
|
|
34
|
-
Opcode,
|
|
35
|
-
)
|
|
36
|
-
from .types import (
|
|
37
|
-
Channel,
|
|
38
|
-
Chat,
|
|
39
|
-
Contact,
|
|
40
|
-
ControlAttach,
|
|
41
|
-
Dialog,
|
|
42
|
-
Element,
|
|
43
|
-
FileAttach,
|
|
44
|
-
FileRequest,
|
|
45
|
-
Me,
|
|
46
|
-
Member,
|
|
47
|
-
Message,
|
|
48
|
-
MessageLink,
|
|
49
|
-
Name,
|
|
50
|
-
Names,
|
|
51
|
-
PhotoAttach,
|
|
52
|
-
Presence,
|
|
53
|
-
ReactionCounter,
|
|
54
|
-
ReactionInfo,
|
|
55
|
-
Session,
|
|
56
|
-
User,
|
|
57
|
-
VideoAttach,
|
|
58
|
-
VideoRequest,
|
|
59
|
-
)
|
|
60
3
|
|
|
61
|
-
|
|
4
|
+
from .auth import (
|
|
5
|
+
AuthFlow,
|
|
6
|
+
ConsolePasswordProvider,
|
|
7
|
+
ConsoleQrHandler,
|
|
8
|
+
ConsoleSmsCodeProvider,
|
|
9
|
+
PasswordProvider,
|
|
10
|
+
QrAuthFlow,
|
|
11
|
+
QrHandler,
|
|
12
|
+
SmsAuthFlow,
|
|
13
|
+
SmsCodeProvider,
|
|
14
|
+
)
|
|
15
|
+
from .client import Client
|
|
16
|
+
from .client_web import WebClient
|
|
17
|
+
from .config import ExtraConfig
|
|
18
|
+
from .dispatch import EventType, Router
|
|
19
|
+
from .exceptions import ApiError, PyMaxError, UploadError
|
|
20
|
+
from .files import File, Photo, Video
|
|
21
|
+
from .logging import configure_logging
|
|
22
|
+
from .routers import ClientRouter, WebRouter
|
|
23
|
+
from .types import Chat, Message, MessageDeleteEvent, Profile, User
|
|
24
|
+
from .types.domain.sync import SyncOverrides, SyncState
|
|
62
25
|
|
|
63
|
-
__all__ =
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"AttachType",
|
|
67
|
-
"AuthType",
|
|
68
|
-
# Типы данных
|
|
69
|
-
"Channel",
|
|
26
|
+
__all__ = (
|
|
27
|
+
"ApiError",
|
|
28
|
+
"AuthFlow",
|
|
70
29
|
"Chat",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"ElementType",
|
|
30
|
+
"Client",
|
|
31
|
+
"ClientRouter",
|
|
32
|
+
"ConsolePasswordProvider",
|
|
33
|
+
"ConsoleQrHandler",
|
|
34
|
+
"ConsoleSmsCodeProvider",
|
|
35
|
+
"EventType",
|
|
36
|
+
"ExtraConfig",
|
|
79
37
|
"File",
|
|
80
|
-
"FileAttach",
|
|
81
|
-
"FileRequest",
|
|
82
|
-
"FormattingType",
|
|
83
|
-
# Исключения
|
|
84
|
-
"InvalidPhoneError",
|
|
85
|
-
"LoginError",
|
|
86
|
-
"MarkupType",
|
|
87
|
-
# Клиент
|
|
88
|
-
"MaxClient",
|
|
89
|
-
"Me",
|
|
90
|
-
"Member",
|
|
91
38
|
"Message",
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"MessageType",
|
|
95
|
-
"Name",
|
|
96
|
-
"Names",
|
|
97
|
-
"Opcode",
|
|
39
|
+
"MessageDeleteEvent",
|
|
40
|
+
"PasswordProvider",
|
|
98
41
|
"Photo",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
42
|
+
"Profile",
|
|
43
|
+
"PyMaxError",
|
|
44
|
+
"QrAuthFlow",
|
|
45
|
+
"QrHandler",
|
|
46
|
+
"Router",
|
|
47
|
+
"SmsAuthFlow",
|
|
48
|
+
"SmsCodeProvider",
|
|
49
|
+
"SyncOverrides",
|
|
50
|
+
"SyncState",
|
|
51
|
+
"UploadError",
|
|
109
52
|
"User",
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
53
|
+
"Video",
|
|
54
|
+
"WebClient",
|
|
55
|
+
"WebRouter",
|
|
56
|
+
"__version__",
|
|
57
|
+
"configure_logging",
|
|
58
|
+
)
|
pymax/api/__init__.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from .facade import ApiFacade
|
|
7
|
+
|
|
8
|
+
__all__ = ("ApiFacade",)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def __getattr__(name: str) -> object:
|
|
12
|
+
if name == "ApiFacade":
|
|
13
|
+
from .facade import ApiFacade
|
|
14
|
+
|
|
15
|
+
return ApiFacade
|
|
16
|
+
|
|
17
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .service import AuthService
|
pymax/api/auth/enums.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AuthType(str, Enum):
|
|
5
|
+
START_AUTH = "START_AUTH"
|
|
6
|
+
CHECK_CODE = "CHECK_CODE"
|
|
7
|
+
REGISTER = "REGISTER"
|
|
8
|
+
RESEND = "RESEND"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Capability(int, Enum):
|
|
12
|
+
DEFAULT = 0 # В душе не чаю что это такое но при первой установке 2фа там 0 3 4 так что пусть будет дефолт
|
|
13
|
+
ESIA_VERIFIED_FLAG = 1
|
|
14
|
+
SECOND_FACTOR_PASSWORD_ENABLED = 2
|
|
15
|
+
SECOND_FACTOR_HAS_EMAIL = 3
|
|
16
|
+
SECOND_FACTOR_HAS_HINT = 4
|
|
17
|
+
REMOVE_2FA = 5
|