konecty-sdk-python 2.0.2__tar.gz → 2.0.4__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.
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/client.py +28 -34
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/query.py +1 -1
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/stream.py +1 -1
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/PKG-INFO +1 -1
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/pyproject.toml +1 -1
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/.gitignore +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/__init__.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/cli/__init__.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/cli/apply.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/cli/backup.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/cli/pull.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/__init__.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/exceptions.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/__init__.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/cross_module_query.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/kpi.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/query_json.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/file_manager.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/filters.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/http.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/model.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/serialization.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/__init__.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/aggregation.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/base.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/change_user.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/comments.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/export.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/files.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/notifications.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/subscriptions.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/settings.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/types.py +0 -0
- {konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/README.md +0 -0
|
@@ -7,16 +7,12 @@ from typing import Any, AsyncGenerator, Dict, List, Literal, Optional, Union, ca
|
|
|
7
7
|
|
|
8
8
|
import aiohttp
|
|
9
9
|
|
|
10
|
-
from .exceptions import
|
|
11
|
-
|
|
12
|
-
KonectyError,
|
|
13
|
-
KonectyValidationError,
|
|
14
|
-
)
|
|
10
|
+
from .exceptions import KonectyAPIError, KonectyError, KonectyValidationError
|
|
11
|
+
from .feature_types.kpi import KpiConfig
|
|
15
12
|
from .file_manager import FileManager
|
|
16
13
|
from .filters import KonectyFilter, KonectyFindParams
|
|
17
|
-
from .http import request as _http_request
|
|
18
14
|
from .http import StreamResponse
|
|
19
|
-
from .
|
|
15
|
+
from .http import request as _http_request
|
|
20
16
|
from .serialization import json_serial
|
|
21
17
|
from .services.aggregation import AggregationService
|
|
22
18
|
from .services.change_user import ChangeUserService
|
|
@@ -104,7 +100,9 @@ class KonectyClient:
|
|
|
104
100
|
...
|
|
105
101
|
total = result.total
|
|
106
102
|
"""
|
|
107
|
-
return await self._stream.find_stream(
|
|
103
|
+
return await self._stream.find_stream(
|
|
104
|
+
module, options, include_total=include_total
|
|
105
|
+
)
|
|
108
106
|
|
|
109
107
|
async def count_stream(
|
|
110
108
|
self,
|
|
@@ -234,13 +232,9 @@ class KonectyClient:
|
|
|
234
232
|
self, module: str, data_id: str, comment_id: str, text: str
|
|
235
233
|
) -> Any:
|
|
236
234
|
"""Update a comment."""
|
|
237
|
-
return await self._comments.update_comment(
|
|
238
|
-
module, data_id, comment_id, text
|
|
239
|
-
)
|
|
235
|
+
return await self._comments.update_comment(module, data_id, comment_id, text)
|
|
240
236
|
|
|
241
|
-
async def delete_comment(
|
|
242
|
-
self, module: str, data_id: str, comment_id: str
|
|
243
|
-
) -> Any:
|
|
237
|
+
async def delete_comment(self, module: str, data_id: str, comment_id: str) -> Any:
|
|
244
238
|
"""Delete (soft) a comment."""
|
|
245
239
|
return await self._comments.delete_comment(module, data_id, comment_id)
|
|
246
240
|
|
|
@@ -248,9 +242,7 @@ class KonectyClient:
|
|
|
248
242
|
self, module: str, data_id: str, query: str = ""
|
|
249
243
|
) -> Any:
|
|
250
244
|
"""Search users for @mention autocomplete."""
|
|
251
|
-
return await self._comments.search_comment_users(
|
|
252
|
-
module, data_id, query
|
|
253
|
-
)
|
|
245
|
+
return await self._comments.search_comment_users(module, data_id, query)
|
|
254
246
|
|
|
255
247
|
async def search_comments(
|
|
256
248
|
self,
|
|
@@ -330,21 +322,15 @@ class KonectyClient:
|
|
|
330
322
|
self._change_user_service = ChangeUserService(self)
|
|
331
323
|
return self._change_user_service
|
|
332
324
|
|
|
333
|
-
async def change_user_add(
|
|
334
|
-
self, module: str, ids: List[Any], users: Any
|
|
335
|
-
) -> Any:
|
|
325
|
+
async def change_user_add(self, module: str, ids: List[Any], users: Any) -> Any:
|
|
336
326
|
"""Add users to records."""
|
|
337
327
|
return await self._change_user.add_users(module, ids, users)
|
|
338
328
|
|
|
339
|
-
async def change_user_remove(
|
|
340
|
-
self, module: str, ids: List[Any], users: Any
|
|
341
|
-
) -> Any:
|
|
329
|
+
async def change_user_remove(self, module: str, ids: List[Any], users: Any) -> Any:
|
|
342
330
|
"""Remove users from records."""
|
|
343
331
|
return await self._change_user.remove_users(module, ids, users)
|
|
344
332
|
|
|
345
|
-
async def change_user_define(
|
|
346
|
-
self, module: str, ids: List[Any], users: Any
|
|
347
|
-
) -> Any:
|
|
333
|
+
async def change_user_define(self, module: str, ids: List[Any], users: Any) -> Any:
|
|
348
334
|
"""Define users on records."""
|
|
349
335
|
return await self._change_user.define_users(module, ids, users)
|
|
350
336
|
|
|
@@ -662,7 +648,7 @@ class KonectyClient:
|
|
|
662
648
|
async def get_setting(self, key: str) -> Optional[str]:
|
|
663
649
|
"""Obtém uma configuração do Konecty."""
|
|
664
650
|
setting = await self.find_one(
|
|
665
|
-
"Setting", KonectyFilter.create().add_condition("
|
|
651
|
+
"Setting", KonectyFilter.create().add_condition("name", "equals", key)
|
|
666
652
|
)
|
|
667
653
|
if setting is None:
|
|
668
654
|
return None
|
|
@@ -671,13 +657,15 @@ class KonectyClient:
|
|
|
671
657
|
def get_setting_sync(self, key: str) -> Optional[str]:
|
|
672
658
|
"""Versão síncrona de get_setting."""
|
|
673
659
|
setting = self.find_one_sync(
|
|
674
|
-
"Setting", KonectyFilter.create().add_condition("
|
|
660
|
+
"Setting", KonectyFilter.create().add_condition("name", "equals", key)
|
|
675
661
|
)
|
|
676
662
|
if setting is None:
|
|
677
663
|
return None
|
|
678
664
|
return cast(str, setting.get("value"))
|
|
679
665
|
|
|
680
|
-
async def get_settings(
|
|
666
|
+
async def get_settings(
|
|
667
|
+
self, keys: List[str], *, module: str | None = None
|
|
668
|
+
) -> Dict[str, str]:
|
|
681
669
|
"""Obtém múltiplas configurações do Konecty.
|
|
682
670
|
|
|
683
671
|
Args:
|
|
@@ -689,7 +677,9 @@ class KonectyClient:
|
|
|
689
677
|
if not keys:
|
|
690
678
|
return {}
|
|
691
679
|
|
|
692
|
-
filter_params = KonectyFilter.create().add_condition("
|
|
680
|
+
filter_params = KonectyFilter.create().add_condition("name", "in", keys)
|
|
681
|
+
if module:
|
|
682
|
+
filter_params.add_condition("module", "equals", module)
|
|
693
683
|
find_params = KonectyFindParams(filter=filter_params)
|
|
694
684
|
|
|
695
685
|
settings = await self.find("Setting", find_params)
|
|
@@ -697,13 +687,15 @@ class KonectyClient:
|
|
|
697
687
|
result = {}
|
|
698
688
|
|
|
699
689
|
for setting in settings:
|
|
700
|
-
key = setting.get("
|
|
690
|
+
key = setting.get("name")
|
|
701
691
|
value = setting.get("value")
|
|
702
692
|
result[key] = cast(str, value)
|
|
703
693
|
|
|
704
694
|
return result
|
|
705
695
|
|
|
706
|
-
def get_settings_sync(
|
|
696
|
+
def get_settings_sync(
|
|
697
|
+
self, keys: List[str], *, module: str | None = None
|
|
698
|
+
) -> Dict[str, str]:
|
|
707
699
|
"""Versão síncrona de get_settings.
|
|
708
700
|
|
|
709
701
|
Args:
|
|
@@ -715,7 +707,9 @@ class KonectyClient:
|
|
|
715
707
|
if not keys:
|
|
716
708
|
return {}
|
|
717
709
|
|
|
718
|
-
filter_params = KonectyFilter.create().add_condition("
|
|
710
|
+
filter_params = KonectyFilter.create().add_condition("name", "in", keys)
|
|
711
|
+
if module:
|
|
712
|
+
filter_params.add_condition("module", "equals", module)
|
|
719
713
|
find_params = KonectyFindParams(filter=filter_params)
|
|
720
714
|
|
|
721
715
|
settings = self.find_sync("Setting", find_params)
|
|
@@ -723,7 +717,7 @@ class KonectyClient:
|
|
|
723
717
|
result = {}
|
|
724
718
|
|
|
725
719
|
for setting in settings:
|
|
726
|
-
key = setting.get("
|
|
720
|
+
key = setting.get("name")
|
|
727
721
|
value = setting.get("value")
|
|
728
722
|
result[key] = cast(str, value)
|
|
729
723
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/feature_types/kpi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/__init__.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/aggregation.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/change_user.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/comments.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/export.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/files.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/notifications.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.2 → konecty_sdk_python-2.0.4}/KonectySdkPython/lib/services/subscriptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|