links search
This commit is contained in:
26
lib/types.ts
26
lib/types.ts
@@ -33,6 +33,14 @@ export interface ApiResponse<T> {
|
||||
total?: number;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
filters?: {
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
tags?: string[];
|
||||
teamId?: string;
|
||||
projectId?: string;
|
||||
searchSlug?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,18 +54,26 @@ export interface EventsQueryParams {
|
||||
userId?: string;
|
||||
teamId?: string;
|
||||
projectId?: string;
|
||||
tags?: string[]; // 标签筛选
|
||||
searchSlug?: string; // slug搜索关键词
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
sortBy?: string;
|
||||
sortOrder?: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
// 属性值类型
|
||||
export type AttributeValue = string | number | boolean | null | AttributeValue[] | { [key: string]: AttributeValue };
|
||||
|
||||
// 属性记录类型
|
||||
export type AttributesRecord = Record<string, AttributeValue>;
|
||||
|
||||
// 事件基础信息
|
||||
export interface Event {
|
||||
event_id: string;
|
||||
event_time: string;
|
||||
event_type: EventType;
|
||||
event_attributes: Record<string, any>;
|
||||
event_attributes: AttributesRecord;
|
||||
|
||||
// 链接信息
|
||||
link_id: string;
|
||||
@@ -65,7 +81,7 @@ export interface Event {
|
||||
link_label: string;
|
||||
link_title: string;
|
||||
link_original_url: string;
|
||||
link_attributes: Record<string, any>;
|
||||
link_attributes: AttributesRecord;
|
||||
link_created_at: string;
|
||||
link_expires_at: string | null;
|
||||
link_tags: string[];
|
||||
@@ -74,17 +90,17 @@ export interface Event {
|
||||
user_id: string;
|
||||
user_name: string;
|
||||
user_email: string;
|
||||
user_attributes: Record<string, any>;
|
||||
user_attributes: AttributesRecord;
|
||||
|
||||
// 团队信息
|
||||
team_id: string;
|
||||
team_name: string;
|
||||
team_attributes: Record<string, any>;
|
||||
team_attributes: AttributesRecord;
|
||||
|
||||
// 项目信息
|
||||
project_id: string;
|
||||
project_name: string;
|
||||
project_attributes: Record<string, any>;
|
||||
project_attributes: AttributesRecord;
|
||||
|
||||
// 访问者信息
|
||||
visitor_id: string;
|
||||
|
||||
Reference in New Issue
Block a user