补齐后台埋点导出和任务事件选择

后台埋点查询支持日期筛选和导出全部模式

新增后台真实 event key 列表接口

任务配置页改用真实 user 埋点 key 候选

更新后台埋点查询文档和定向测试
This commit is contained in:
2026-06-26 16:49:33 +08:00
parent 607042a250
commit a8c3f8cf0f
10 changed files with 613 additions and 88 deletions
+13
View File
@@ -15,6 +15,7 @@ import type {
AdminMeResponse,
AdminOverviewResponse,
AdminTrackingEventListQuery,
AdminTrackingEventKeyListResponse,
AdminTrackingEventListResponse,
AdminUpdateWorkVisibilityRequest,
AdminUpdateWorkVisibilityResponse,
@@ -192,6 +193,13 @@ export function listAdminTrackingEvents(
);
}
export function listAdminTrackingEventKeys(token: string) {
return request<AdminTrackingEventKeyListResponse>(
'/admin/api/tracking/event-keys',
{ token },
);
}
export function getAdminCreationEntryConfig(token: string) {
return request<AdminCreationEntryConfigResponse>(
'/admin/api/creation-entry/config',
@@ -430,9 +438,14 @@ function buildQueryString(query: AdminTrackingEventListQuery) {
appendQueryParam(params, 'userId', query.userId);
appendQueryParam(params, 'scopeKind', query.scopeKind);
appendQueryParam(params, 'scopeId', query.scopeId);
appendQueryParam(params, 'startDate', query.startDate);
appendQueryParam(params, 'endDate', query.endDate);
if (typeof query.limit === 'number' && Number.isFinite(query.limit)) {
params.set('limit', String(query.limit));
}
if (query.exportAll) {
params.set('exportAll', 'true');
}
const queryString = params.toString();
return queryString ? `?${queryString}` : '';
}