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/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