omdaa-api-client 1.1.1__tar.gz → 1.2.0__tar.gz
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.
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/PKG-INFO +3 -3
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/pyproject.toml +3 -3
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa/client.py +10 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa/resources/__init__.py +4 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa/resources/resources.py +93 -3
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/PKG-INFO +3 -3
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/README.md +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/setup.cfg +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa/__init__.py +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa/exceptions.py +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/SOURCES.txt +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/dependency_links.txt +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/requires.txt +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/top_level.txt +0 -0
- {omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/tests/test_client.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omdaa-api-client
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: Official Python client for Omdaa WhatsApp Business API
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Official Python client for Omdaa WhatsApp Business API + Omdaa Mail
|
|
5
5
|
Author: Omdaa
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://omdaa.com
|
|
8
8
|
Project-URL: Documentation, https://omdaa.com
|
|
9
|
-
Keywords: omdaa,whatsapp,api,client,sdk
|
|
9
|
+
Keywords: omdaa,whatsapp,mail,api,client,sdk,bulk,groups
|
|
10
10
|
Requires-Python: >=3.9
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: requests>=2.28.0
|
|
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "omdaa-api-client"
|
|
7
|
-
version = "1.
|
|
8
|
-
description = "Official Python client for Omdaa WhatsApp Business API"
|
|
7
|
+
version = "1.2.0"
|
|
8
|
+
description = "Official Python client for Omdaa WhatsApp Business API + Omdaa Mail"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
authors = [{ name = "Omdaa" }]
|
|
13
|
-
keywords = ["omdaa", "whatsapp", "api", "client", "sdk"]
|
|
13
|
+
keywords = ["omdaa", "whatsapp", "mail", "api", "client", "sdk", "bulk", "groups"]
|
|
14
14
|
dependencies = [
|
|
15
15
|
"requests>=2.28.0",
|
|
16
16
|
]
|
|
@@ -58,6 +58,9 @@ class Client:
|
|
|
58
58
|
def put(self, path: str, body: Optional[dict] = None) -> dict:
|
|
59
59
|
return self.request("PUT", path, body=body or {})
|
|
60
60
|
|
|
61
|
+
def patch(self, path: str, body: Optional[dict] = None) -> dict:
|
|
62
|
+
return self.request("PATCH", path, body=body or {})
|
|
63
|
+
|
|
61
64
|
def delete(self, path: str, body: Optional[dict] = None) -> dict:
|
|
62
65
|
return self.request("DELETE", path, body=body)
|
|
63
66
|
|
|
@@ -104,6 +107,8 @@ class OmdaaClient:
|
|
|
104
107
|
AuthResource,
|
|
105
108
|
UsersResource,
|
|
106
109
|
EmailResource,
|
|
110
|
+
MailboxesResource,
|
|
111
|
+
MailResource,
|
|
107
112
|
AiResource,
|
|
108
113
|
)
|
|
109
114
|
self.messages = MessagesResource(self)
|
|
@@ -142,6 +147,8 @@ class OmdaaClient:
|
|
|
142
147
|
self.auth = AuthResource(self)
|
|
143
148
|
self.users = UsersResource(self)
|
|
144
149
|
self.email = EmailResource(self)
|
|
150
|
+
self.mailboxes = MailboxesResource(self)
|
|
151
|
+
self.mail = MailResource(self)
|
|
145
152
|
self.ai = AiResource(self)
|
|
146
153
|
|
|
147
154
|
def get(self, path: str, params: Optional[dict] = None) -> dict:
|
|
@@ -153,5 +160,8 @@ class OmdaaClient:
|
|
|
153
160
|
def put(self, path: str, body: Optional[dict] = None) -> dict:
|
|
154
161
|
return self._client.put(path, body=body)
|
|
155
162
|
|
|
163
|
+
def patch(self, path: str, body: Optional[dict] = None) -> dict:
|
|
164
|
+
return self._client.patch(path, body=body)
|
|
165
|
+
|
|
156
166
|
def delete(self, path: str, body: Optional[dict] = None) -> dict:
|
|
157
167
|
return self._client.delete(path, body=body)
|
|
@@ -35,6 +35,8 @@ from omdaa.resources.resources import (
|
|
|
35
35
|
AuthResource,
|
|
36
36
|
UsersResource,
|
|
37
37
|
EmailResource,
|
|
38
|
+
MailboxesResource,
|
|
39
|
+
MailResource,
|
|
38
40
|
AiResource,
|
|
39
41
|
)
|
|
40
42
|
|
|
@@ -75,5 +77,7 @@ __all__ = [
|
|
|
75
77
|
"AuthResource",
|
|
76
78
|
"UsersResource",
|
|
77
79
|
"EmailResource",
|
|
80
|
+
"MailboxesResource",
|
|
81
|
+
"MailResource",
|
|
78
82
|
"AiResource",
|
|
79
83
|
]
|
|
@@ -212,6 +212,22 @@ class BulkResource:
|
|
|
212
212
|
def create(self, body):
|
|
213
213
|
return self._client.post("/bulk", body)
|
|
214
214
|
|
|
215
|
+
def create_job(self, body):
|
|
216
|
+
return self.create(body)
|
|
217
|
+
|
|
218
|
+
def create_campaign(self, body):
|
|
219
|
+
"""Alias matching MCP create_bulk_campaign."""
|
|
220
|
+
return self.create(body)
|
|
221
|
+
|
|
222
|
+
def get_job_status(self, bulk_job_id):
|
|
223
|
+
return self._client.get(f"/bulk/{quote(bulk_job_id)}/status")
|
|
224
|
+
|
|
225
|
+
def pause(self, bulk_job_id):
|
|
226
|
+
return self._client.post(f"/bulk/{quote(bulk_job_id)}/pause", {})
|
|
227
|
+
|
|
228
|
+
def resume(self, bulk_job_id):
|
|
229
|
+
return self._client.post(f"/bulk/{quote(bulk_job_id)}/resume", {})
|
|
230
|
+
|
|
215
231
|
def cancel(self, bulk_id):
|
|
216
232
|
return self._client.delete(f"/bulk/{quote(bulk_id)}")
|
|
217
233
|
|
|
@@ -243,11 +259,26 @@ class GroupsResource:
|
|
|
243
259
|
def list(self, params=None):
|
|
244
260
|
return self._client.get("/groups", params=params)
|
|
245
261
|
|
|
246
|
-
def get(self, group_id):
|
|
247
|
-
return self._client.get(f"/groups/{quote(group_id)}")
|
|
262
|
+
def get(self, group_id, params=None):
|
|
263
|
+
return self._client.get(f"/groups/{quote(group_id)}", params=params)
|
|
264
|
+
|
|
265
|
+
def get_details(self, group_id, params=None):
|
|
266
|
+
return self.get(group_id, params=params)
|
|
248
267
|
|
|
249
268
|
def create(self, body):
|
|
250
|
-
return self._client.post("/groups", body)
|
|
269
|
+
return self._client.post("/groups/create", body)
|
|
270
|
+
|
|
271
|
+
def send_message(self, group_id, body):
|
|
272
|
+
return self._client.post(f"/groups/{quote(group_id)}/send", body)
|
|
273
|
+
|
|
274
|
+
def add_participants(self, group_id, body):
|
|
275
|
+
return self._client.post(f"/groups/{quote(group_id)}/participants/add", body)
|
|
276
|
+
|
|
277
|
+
def remove_participants(self, group_id, body):
|
|
278
|
+
return self._client.post(f"/groups/{quote(group_id)}/participants/remove", body)
|
|
279
|
+
|
|
280
|
+
def get_invite_link(self, group_id, params=None):
|
|
281
|
+
return self._client.get(f"/groups/{quote(group_id)}/invite-link", params=params)
|
|
251
282
|
|
|
252
283
|
def update(self, group_id, body):
|
|
253
284
|
return self._client.put(f"/groups/{quote(group_id)}", body)
|
|
@@ -605,6 +636,65 @@ class EmailResource:
|
|
|
605
636
|
def get_settings(self):
|
|
606
637
|
return self._client.get("/email/settings")
|
|
607
638
|
|
|
639
|
+
def get_status(self):
|
|
640
|
+
return self._client.get("/email/status")
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
class MailboxesResource:
|
|
644
|
+
"""Omdaa Mail mailbox lifecycle (/mailboxes). JWT required."""
|
|
645
|
+
|
|
646
|
+
def __init__(self, client):
|
|
647
|
+
self._client = client
|
|
648
|
+
|
|
649
|
+
def list(self, params=None):
|
|
650
|
+
return self._client.get("/mailboxes", params=params)
|
|
651
|
+
|
|
652
|
+
def check_availability(self, params):
|
|
653
|
+
return self._client.get("/mailboxes/check-availability", params=params)
|
|
654
|
+
|
|
655
|
+
def create(self, body):
|
|
656
|
+
return self._client.post("/mailboxes", body)
|
|
657
|
+
|
|
658
|
+
def update(self, mailbox_id, body):
|
|
659
|
+
return self._client.patch(f"/mailboxes/{quote(mailbox_id)}", body)
|
|
660
|
+
|
|
661
|
+
def update_password(self, mailbox_id, body):
|
|
662
|
+
return self._client.patch(f"/mailboxes/{quote(mailbox_id)}/password", body)
|
|
663
|
+
|
|
664
|
+
def remove(self, mailbox_id):
|
|
665
|
+
return self._client.delete(f"/mailboxes/{quote(mailbox_id)}")
|
|
666
|
+
|
|
667
|
+
def get_credentials(self, mailbox_id):
|
|
668
|
+
return self._client.get(f"/mailboxes/{quote(mailbox_id)}/credentials")
|
|
669
|
+
|
|
670
|
+
def create_app_password(self, mailbox_id, body=None):
|
|
671
|
+
return self._client.post(f"/mailboxes/{quote(mailbox_id)}/app-password", body or {})
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
class MailResource:
|
|
675
|
+
"""Omdaa Mail messages (/mail). JWT required."""
|
|
676
|
+
|
|
677
|
+
def __init__(self, client):
|
|
678
|
+
self._client = client
|
|
679
|
+
|
|
680
|
+
def list_folders(self, params=None):
|
|
681
|
+
return self._client.get("/mail/folders", params=params)
|
|
682
|
+
|
|
683
|
+
def list_messages(self, params=None):
|
|
684
|
+
return self._client.get("/mail/messages", params=params)
|
|
685
|
+
|
|
686
|
+
def get_message(self, uid, params=None):
|
|
687
|
+
return self._client.get(f"/mail/messages/{quote(str(uid))}", params=params)
|
|
688
|
+
|
|
689
|
+
def mark_seen(self, uid, body=None):
|
|
690
|
+
return self._client.patch(f"/mail/messages/{quote(str(uid))}/seen", body or {})
|
|
691
|
+
|
|
692
|
+
def delete_message(self, uid):
|
|
693
|
+
return self._client.delete(f"/mail/messages/{quote(str(uid))}")
|
|
694
|
+
|
|
695
|
+
def send(self, body):
|
|
696
|
+
return self._client.post("/mail/send", body)
|
|
697
|
+
|
|
608
698
|
|
|
609
699
|
class AiResource:
|
|
610
700
|
def __init__(self, client):
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omdaa-api-client
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: Official Python client for Omdaa WhatsApp Business API
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Official Python client for Omdaa WhatsApp Business API + Omdaa Mail
|
|
5
5
|
Author: Omdaa
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://omdaa.com
|
|
8
8
|
Project-URL: Documentation, https://omdaa.com
|
|
9
|
-
Keywords: omdaa,whatsapp,api,client,sdk
|
|
9
|
+
Keywords: omdaa,whatsapp,mail,api,client,sdk,bulk,groups
|
|
10
10
|
Requires-Python: >=3.9
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: requests>=2.28.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{omdaa_api_client-1.1.1 → omdaa_api_client-1.2.0}/src/omdaa_api_client.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|