pixelarraythirdparty 1.3.4__tar.gz → 1.3.5__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.
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/PKG-INFO +1 -1
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/__init__.py +1 -1
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/custom_events/custom_events.py +33 -1
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project_dashboard/project_dashboard.py +20 -9
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/PKG-INFO +1 -1
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pyproject.toml +1 -1
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/LICENSE +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/MANIFEST.in +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/client.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/cron/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/cron/cron.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/custom_events/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/feedback/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/feedback/feedback.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/order/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/order/order.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/product/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/product/product.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project/project.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project_dashboard/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/support_chat/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/support_chat/support_chat.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/unified_login/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/unified_login/unified_login.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/user/__init__.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/user/user.py +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/SOURCES.txt +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/dependency_links.txt +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/requires.txt +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/top_level.txt +0 -0
- {pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/setup.cfg +0 -0
|
@@ -20,7 +20,7 @@ from .support_chat.support_chat import SupportChatManagerAsync
|
|
|
20
20
|
from .custom_events.custom_events import CustomEventsManagerAsync
|
|
21
21
|
from .project_dashboard.project_dashboard import ProjectDashboardManagerAsync
|
|
22
22
|
|
|
23
|
-
__version__ = "1.3.
|
|
23
|
+
__version__ = "1.3.5"
|
|
24
24
|
__author__ = "Lu qi"
|
|
25
25
|
__email__ = "qi.lu@pixelarrayai.com"
|
|
26
26
|
|
|
@@ -62,6 +62,38 @@ class CustomEventsManagerAsync(AsyncClient):
|
|
|
62
62
|
"POST", "/api/custom-events/definitions/create", json=body
|
|
63
63
|
)
|
|
64
64
|
|
|
65
|
+
async def get_custom_event_common_field_schema(
|
|
66
|
+
self, project_name: str
|
|
67
|
+
) -> Tuple[Dict[str, Any], bool]:
|
|
68
|
+
"""
|
|
69
|
+
description:
|
|
70
|
+
查询项目自定义事件公共维度(GET /api/custom-events/common-field-schema)
|
|
71
|
+
"""
|
|
72
|
+
return await self._request(
|
|
73
|
+
"GET",
|
|
74
|
+
"/api/custom-events/common-field-schema",
|
|
75
|
+
params={"project_name": project_name},
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
async def update_custom_event_common_field_schema(
|
|
79
|
+
self,
|
|
80
|
+
project_name: str,
|
|
81
|
+
field_schema: List[Dict[str, Any]],
|
|
82
|
+
) -> Tuple[Dict[str, Any], bool]:
|
|
83
|
+
"""
|
|
84
|
+
description:
|
|
85
|
+
更新项目公共维度;传空列表表示恢复服务端内置默认(POST /api/custom-events/common-field-schema/update)
|
|
86
|
+
parameters:
|
|
87
|
+
field_schema: 每项含 name、type、required、可选 nullable、description
|
|
88
|
+
"""
|
|
89
|
+
body: Dict[str, Any] = {
|
|
90
|
+
"project_name": project_name,
|
|
91
|
+
"field_schema": field_schema or [],
|
|
92
|
+
}
|
|
93
|
+
return await self._request(
|
|
94
|
+
"POST", "/api/custom-events/common-field-schema/update", json=body
|
|
95
|
+
)
|
|
96
|
+
|
|
65
97
|
async def report_custom_event(
|
|
66
98
|
self,
|
|
67
99
|
project_name: str,
|
|
@@ -71,7 +103,7 @@ class CustomEventsManagerAsync(AsyncClient):
|
|
|
71
103
|
) -> Tuple[Dict[str, Any], bool]:
|
|
72
104
|
"""
|
|
73
105
|
description:
|
|
74
|
-
|
|
106
|
+
上报单条自定义事件日志(有效载荷 = 项目公共维度 ∪ 该事件 field_schema;未传的公共键由服务端补 null)
|
|
75
107
|
parameters:
|
|
76
108
|
project_name(str): 项目名称(与 projects.name 一致)
|
|
77
109
|
event_key(str): 事件键
|
|
@@ -12,6 +12,8 @@ def _resolve_dashboard_path(scope: str) -> Optional[str]:
|
|
|
12
12
|
return "/api/project-dashboard/dashboard/dau"
|
|
13
13
|
if s.upper() == "RETENTION" or s == "留存":
|
|
14
14
|
return "/api/project-dashboard/dashboard/retention"
|
|
15
|
+
if s.upper() == "TOTAL_USERS" or s == "总用户":
|
|
16
|
+
return "/api/project-dashboard/dashboard/total-users"
|
|
15
17
|
return None
|
|
16
18
|
|
|
17
19
|
|
|
@@ -28,13 +30,13 @@ class ProjectDashboardManagerAsync(AsyncClient):
|
|
|
28
30
|
) -> Tuple[Dict[str, Any], bool]:
|
|
29
31
|
"""
|
|
30
32
|
description:
|
|
31
|
-
查询项目看板指标;scope 为 DNU、DAU、RETENTION
|
|
33
|
+
查询项目看板指标;scope 为 DNU、DAU、RETENTION、TOTAL_USERS 或中文「留存」「总用户」。
|
|
32
34
|
parameters:
|
|
33
35
|
project_name(str): 项目名称(与统一登录 project_name 一致)
|
|
34
36
|
scope(str): DNU | DAU | RETENTION | 留存
|
|
35
37
|
start_date(str, optional): 开始日期 YYYY-MM-DD;不传则服务端默认 T-7
|
|
36
38
|
end_date(str, optional): 结束日期 YYYY-MM-DD;不传则服务端默认 T-0
|
|
37
|
-
retention_days(str
|
|
39
|
+
retention_days(str): scope 为留存时必填;逗号分隔天数,如 1,7,14,20
|
|
38
40
|
return:
|
|
39
41
|
data(dict): 成功时为 DauData / DnuData / RetentionData 结构(见接口文档)
|
|
40
42
|
success(bool): 是否成功
|
|
@@ -42,14 +44,23 @@ class ProjectDashboardManagerAsync(AsyncClient):
|
|
|
42
44
|
path = _resolve_dashboard_path(scope)
|
|
43
45
|
if not path:
|
|
44
46
|
return (
|
|
45
|
-
{"message": "scope 无效,应为 DNU、DAU、RETENTION 或 留存"},
|
|
47
|
+
{"message": "scope 无效,应为 DNU、DAU、RETENTION、TOTAL_USERS 或 留存 / 总用户"},
|
|
48
|
+
False,
|
|
49
|
+
)
|
|
50
|
+
is_retention = "/retention" in path
|
|
51
|
+
is_total_users = "/total-users" in path
|
|
52
|
+
rd = (retention_days or "").strip()
|
|
53
|
+
if is_retention and not rd:
|
|
54
|
+
return (
|
|
55
|
+
{"message": "scope 为留存时须传入 retention_days(逗号分隔正整数,如 1,7,14)"},
|
|
46
56
|
False,
|
|
47
57
|
)
|
|
48
58
|
params: Dict[str, Any] = {"project_name": project_name}
|
|
49
|
-
if
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
if not is_total_users:
|
|
60
|
+
if start_date:
|
|
61
|
+
params["start_date"] = start_date
|
|
62
|
+
if end_date:
|
|
63
|
+
params["end_date"] = end_date
|
|
64
|
+
if rd:
|
|
65
|
+
params["retention_days"] = rd
|
|
55
66
|
return await self._request("GET", path, params=params)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/cron/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/feedback/__init__.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/feedback/feedback.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/order/__init__.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/order/order.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/product/__init__.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/product/product.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project/__init__.py
RENAMED
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/project/project.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty/user/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pixelarraythirdparty-1.3.4 → pixelarraythirdparty-1.3.5}/pixelarraythirdparty.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|