返回 AiToEarn
plat.type.ts
1 /*
2 * @Author: nevin
3 * @Date: 2025-02-07 09:48:29
4 * @LastEditTime: 2025-03-23 23:41:38
5 * @LastEditors: nevin
6 * @Description:
7 */
8 import { AccountModel } from '../../db/models/account';
9
10 export type CookiesType = Electron.Cookie[];
11
12 export interface ResponsePageInfo {
13 count?: number;
14 hasMore: boolean;
15 pcursor?: string;
16 }
17
18 // 获取平台账户信息入参
19 export interface IAccountInfoParams {
20 cookies: CookiesType;
21 }
22
23 // 获取平台账户信息返回值
24 export type AccountInfoTypeRV = Partial<AccountModel> | null;
25
26 // 获取平台账户统计信息返回值
27 export type StatisticsData = {
28 workCount?: number;
29 readCount?: number;
30 fansCount?: number;
31 income?: number;
32 };
33
34 // 获取平台账户统计信息返回值
35 export type DashboardData = {
36 fans: number;
37 read: number;
38 comment: number;
39 like: number;
40 collect: number;
41 forward: number;
42 time?: string;
43 };
44
45 // 获取某个作品的数据返回值
46 export type WorkData = {
47 dataId: string;
48 readCount?: number;
49 likeCount?: number;
50 collectCount?: number;
51 forwardCount?: number;
52 commentCount?: number; // 评论数量
53 income?: number; // 收入
54 title?: string;
55 desc?: string;
56 coverUrl?: string;
57 videoUrl?: string;
58 createTime?: string;
59 option?: {
60 xsec_token: string;
61 };
62 author?: {
63 name: string;
64 id?: string;
65 avatar: string;
66 };
67 data?: any;
68 };
69
70 // 评论
71 export type CommentData = {
72 userId: string;
73 dataId: string;
74 commentId: string;
75 parentCommentId?: string; // 上级评论ID
76 content: string;
77 likeCount?: number; // 点赞次数
78 nikeName?: string;
79 headUrl?: string;
80 data?: any; // 原数据
81 subCommentList: CommentData[]; // 子评论
82 };
83
84 // 视频发布进度回调函数类型
85 export type VideoCallbackType = (progress: number, msg?: string) => void;
86
87 // 微信视频号活动
88 export interface WxSphEvent {
89 eventCreatorNickname: string;
90 eventTopicId: string;
91 eventName: string;
92 }
93
94 // 获取用户参数
95 export interface IGetUsersParams {
96 keyword: string;
97 account: AccountModel;
98 page: number;
99 }
100
101 // 获取用户返回值
102 export interface IGetUsersResponse {
103 status: number;
104 data?: IUsersItem[];
105 }
106
107 // 用户数据
108 export interface IUsersItem {
109 image: string;
110 id: string;
111 name: string;
112 des?: string;
113 unique_id?: string;
114 follower_count?: number;
115 }
116
117 // 获取话题返回值
118 export interface IGetTopicsResponse {
119 status: number;
120 data?: ITopicsItem[];
121 }
122
123 // 话题数据 item
124 export interface ITopicsItem {
125 view_count: number;
126 name: string;
127 id: string | number;
128 }
129
130 // 话题参数
131 export interface IGetTopicsParams {
132 keyword: string;
133 account: AccountModel;
134 }
135
136 // 话题参数
137 export interface IGetLocationDataParams {
138 keywords: string;
139 latitude: number;
140 longitude: number;
141 cityName: string;
142 cookie?: Electron.Cookie[];
143 account?: AccountModel;
144 }
145
146 // 地点数据
147 export interface ILocationDataItem {
148 // 地点名称
149 name: string;
150 // 简单地址简介
151 simpleAddress: string;
152 // 地址ID
153 id: string;
154 // 小红书特有
155 poi_type?: number;
156 latitude: number;
157 longitude: number;
158 // 市
159 city: string;
160 }
161
162 // 获取地点数据返回值
163 export interface IGetLocationResponse {
164 status: number;
165 data?: ILocationDataItem[];
166 }
167
168 export interface IMixItem {
169 id: string;
170 name: string;
171 coverImg: string;
172 // 作品数量
173 feedCount: number;
174 }
175 // 获取合集返回值
176 export interface IGetMixListResponse {
177 status: number;
178 data: IMixItem[];
179 }
180
180 lines TYPESCRIPT