megaplan-sdk 0.1.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.
- megaplan_sdk/__init__.py +67 -0
- megaplan_sdk/auth.py +185 -0
- megaplan_sdk/cache.py +192 -0
- megaplan_sdk/client.py +201 -0
- megaplan_sdk/constants.py +16 -0
- megaplan_sdk/exceptions.py +180 -0
- megaplan_sdk/helpers.py +108 -0
- megaplan_sdk/http_client.py +390 -0
- megaplan_sdk/logging_config.py +53 -0
- megaplan_sdk/models/__init__.py +22 -0
- megaplan_sdk/models/base.py +16 -0
- megaplan_sdk/models/comment.py +58 -0
- megaplan_sdk/models/common.py +107 -0
- megaplan_sdk/models/contractor.py +137 -0
- megaplan_sdk/models/deal.py +96 -0
- megaplan_sdk/models/department.py +40 -0
- megaplan_sdk/models/employee.py +117 -0
- megaplan_sdk/models/project.py +76 -0
- megaplan_sdk/models/task.py +75 -0
- megaplan_sdk/resources/__init__.py +15 -0
- megaplan_sdk/resources/auth.py +73 -0
- megaplan_sdk/resources/base.py +794 -0
- megaplan_sdk/resources/comments.py +148 -0
- megaplan_sdk/resources/contractors.py +173 -0
- megaplan_sdk/resources/deals.py +625 -0
- megaplan_sdk/resources/departments.py +70 -0
- megaplan_sdk/resources/employees.py +216 -0
- megaplan_sdk/resources/full_details.py +143 -0
- megaplan_sdk/resources/projects.py +854 -0
- megaplan_sdk/resources/tasks.py +932 -0
- megaplan_sdk/types.py +56 -0
- megaplan_sdk-0.1.0.dist-info/METADATA +1383 -0
- megaplan_sdk-0.1.0.dist-info/RECORD +36 -0
- megaplan_sdk-0.1.0.dist-info/WHEEL +5 -0
- megaplan_sdk-0.1.0.dist-info/licenses/LICENSE +21 -0
- megaplan_sdk-0.1.0.dist-info/top_level.txt +1 -0
megaplan_sdk/types.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Type definitions for Megaplan SDK."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class LinkEntity(TypedDict, total=False):
|
|
9
|
+
"""Link entity for references (only contentType and id)."""
|
|
10
|
+
|
|
11
|
+
contentType: str
|
|
12
|
+
id: int
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TaskFilterConfig(TypedDict, total=False):
|
|
16
|
+
"""Task filter configuration."""
|
|
17
|
+
|
|
18
|
+
pass # Will be extended based on API documentation
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class TradeFilterConfig(TypedDict, total=False):
|
|
22
|
+
"""Trade filter configuration."""
|
|
23
|
+
|
|
24
|
+
pass # Will be extended based on API documentation
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ProjectFilterConfig(TypedDict, total=False):
|
|
28
|
+
"""Project filter configuration."""
|
|
29
|
+
|
|
30
|
+
pass # Will be extended based on API documentation
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
FilterType = int | str | TaskFilterConfig | TradeFilterConfig | ProjectFilterConfig
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RequestParams(TypedDict, total=False):
|
|
37
|
+
"""Common request parameters."""
|
|
38
|
+
|
|
39
|
+
filter: FilterType | None
|
|
40
|
+
limit: int | None
|
|
41
|
+
pageAfter: LinkEntity | None
|
|
42
|
+
pageBefore: LinkEntity | None
|
|
43
|
+
pageWith: LinkEntity | None
|
|
44
|
+
fields: Any | None
|
|
45
|
+
sortBy: list[dict[str, str]] | None
|
|
46
|
+
onlyRequestedFields: bool | None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class AuthTokenResponse(TypedDict):
|
|
50
|
+
"""OAuth2 token response."""
|
|
51
|
+
|
|
52
|
+
access_token: str
|
|
53
|
+
expires_in: int
|
|
54
|
+
token_type: str
|
|
55
|
+
scope: str | None
|
|
56
|
+
refresh_token: str | None
|