@be-link/ecommerce-client-backend-service-node-sdk 0.1.74 → 0.1.76
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.
package/modules/BaseService.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export default abstract class BaseService {
|
|
|
7
7
|
/** URL一级路径 */
|
|
8
8
|
protected abstract prefixUrl: string;
|
|
9
9
|
/** 子网域名 */
|
|
10
|
-
protected readonly natDevHost = "
|
|
11
|
-
protected readonly natProdHost = "http://
|
|
10
|
+
protected readonly natDevHost = "https://ecommerce-dev.wejourney.top/client-backend";
|
|
11
|
+
protected readonly natProdHost = "http://10.1.32.74/client-backend";
|
|
12
12
|
/** 公网域名 */
|
|
13
13
|
protected readonly publicDevHost = "https://ecommerce-dev.wejourney.top/client-backend";
|
|
14
14
|
protected readonly publicProdHost = "";
|
package/modules/BaseService.js
CHANGED
|
@@ -12,8 +12,8 @@ const string_1 = require("../utils/string");
|
|
|
12
12
|
class BaseService {
|
|
13
13
|
constructor() {
|
|
14
14
|
/** 子网域名 */
|
|
15
|
-
this.natDevHost = '
|
|
16
|
-
this.natProdHost = 'http://
|
|
15
|
+
this.natDevHost = 'https://ecommerce-dev.wejourney.top/client-backend';
|
|
16
|
+
this.natProdHost = 'http://10.1.32.74/client-backend';
|
|
17
17
|
/** 公网域名 */
|
|
18
18
|
this.publicDevHost = 'https://ecommerce-dev.wejourney.top/client-backend';
|
|
19
19
|
this.publicProdHost = '';
|
|
@@ -6,8 +6,6 @@ declare class UserDataServiceClass extends BaseService implements UserDataServic
|
|
|
6
6
|
exportUserList(request: UserDataService.Request.ExportUserList): Promise<UserDataService.Response.ExportUserList>;
|
|
7
7
|
getLiveRoomUserList(request: UserDataService.Request.GetLiveRoomUserList): Promise<UserDataService.Response.GetLiveRoomUserList>;
|
|
8
8
|
exportLiveRoomUserList(request: UserDataService.Request.ExportLiveRoomUserList): Promise<UserDataService.Response.ExportLiveRoomUserList>;
|
|
9
|
-
getUserLiveWatchSummary(request: UserDataService.Request.GetUserLiveWatchSummary): Promise<UserDataService.Response.GetUserLiveWatchSummary>;
|
|
10
|
-
getUserLiveWatchCalendar(request: UserDataService.Request.GetUserLiveWatchCalendar): Promise<UserDataService.Response.GetUserLiveWatchCalendar>;
|
|
11
9
|
}
|
|
12
10
|
export declare const userDataService: UserDataServiceClass;
|
|
13
11
|
export default userDataService;
|
|
@@ -33,12 +33,6 @@ let UserDataServiceClass = class UserDataServiceClass extends BaseService_1.defa
|
|
|
33
33
|
exportLiveRoomUserList(request) {
|
|
34
34
|
return (0, http_1.callApi)(this.getApiUrl(this.exportLiveRoomUserList), request);
|
|
35
35
|
}
|
|
36
|
-
getUserLiveWatchSummary(request) {
|
|
37
|
-
return (0, http_1.callApi)(this.getApiUrl(this.getUserLiveWatchSummary), request);
|
|
38
|
-
}
|
|
39
|
-
getUserLiveWatchCalendar(request) {
|
|
40
|
-
return (0, http_1.callApi)(this.getApiUrl(this.getUserLiveWatchCalendar), request);
|
|
41
|
-
}
|
|
42
36
|
};
|
|
43
37
|
__decorate([
|
|
44
38
|
(0, tsoa_1.OperationId)('获取用户列表'),
|
|
@@ -60,16 +54,6 @@ __decorate([
|
|
|
60
54
|
(0, tsoa_1.Post)('export-live-room-user-list'),
|
|
61
55
|
__param(0, (0, tsoa_1.Body)())
|
|
62
56
|
], UserDataServiceClass.prototype, "exportLiveRoomUserList", null);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, tsoa_1.OperationId)('获取用户看播汇总数据'),
|
|
65
|
-
(0, tsoa_1.Post)('get-user-live-watch-summary'),
|
|
66
|
-
__param(0, (0, tsoa_1.Body)())
|
|
67
|
-
], UserDataServiceClass.prototype, "getUserLiveWatchSummary", null);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, tsoa_1.OperationId)('获取用户看播日历数据'),
|
|
70
|
-
(0, tsoa_1.Post)('get-user-live-watch-calendar'),
|
|
71
|
-
__param(0, (0, tsoa_1.Body)())
|
|
72
|
-
], UserDataServiceClass.prototype, "getUserLiveWatchCalendar", null);
|
|
73
57
|
UserDataServiceClass = __decorate([
|
|
74
58
|
(0, tsoa_1.Route)('userData'),
|
|
75
59
|
(0, tsoa_1.Tags)('UserData')
|
|
@@ -93,20 +93,6 @@ export declare namespace UserDataService {
|
|
|
93
93
|
/** 每页数量,默认20,最大1000 */
|
|
94
94
|
pageSize?: number;
|
|
95
95
|
}
|
|
96
|
-
/**
|
|
97
|
-
* 获取用户看播汇总数据
|
|
98
|
-
*/
|
|
99
|
-
interface GetUserLiveWatchSummary {
|
|
100
|
-
/** 用户ID */
|
|
101
|
-
userId: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* 获取用户看播日历数据
|
|
105
|
-
*/
|
|
106
|
-
interface GetUserLiveWatchCalendar {
|
|
107
|
-
/** 用户ID */
|
|
108
|
-
userId: string;
|
|
109
|
-
}
|
|
110
96
|
}
|
|
111
97
|
namespace Response {
|
|
112
98
|
/**
|
|
@@ -150,77 +136,12 @@ export declare namespace UserDataService {
|
|
|
150
136
|
*/
|
|
151
137
|
interface ExportLiveRoomUserList extends IBatchExport {
|
|
152
138
|
}
|
|
153
|
-
/**
|
|
154
|
-
* 获取用户看播汇总数据响应
|
|
155
|
-
*/
|
|
156
|
-
interface GetUserLiveWatchSummary {
|
|
157
|
-
/** 已观看场次(进入过直播间的场次数) */
|
|
158
|
-
watchedCount: number;
|
|
159
|
-
/** 已完播场次(观看时长达到完播阈值的场次数) */
|
|
160
|
-
completedCount: number;
|
|
161
|
-
/** 总观看时长(分钟),前端展示如 "127.5h" 时可自行换算为小时 */
|
|
162
|
-
totalWatchDurationMinutes: number;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* 获取用户看播日历数据响应
|
|
166
|
-
*/
|
|
167
|
-
interface GetUserLiveWatchCalendar {
|
|
168
|
-
/**
|
|
169
|
-
* 按天的看播记录(长度固定 14)
|
|
170
|
-
* 排序:可以从近到远或从远到近,自行约定
|
|
171
|
-
*/
|
|
172
|
-
days: UserLiveWatchDayItem[];
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* 用户看播日历 - 单日数据
|
|
177
|
-
*/
|
|
178
|
-
interface UserLiveWatchDayItem {
|
|
179
|
-
/** 日期字符串,例如 "2026-01-15" */
|
|
180
|
-
date: string;
|
|
181
|
-
/** 周几,前端用来展示,例如 "周一"(可选) */
|
|
182
|
-
weekDay: string;
|
|
183
|
-
/** 早场记录(实际 9:00~10:15,统计窗口 8:45~11:00) */
|
|
184
|
-
morningSession: UserLiveWatchSessionItem;
|
|
185
|
-
/** 午场记录(实际 14:00~15:15,统计窗口 13:45~16:00) */
|
|
186
|
-
noonSession: UserLiveWatchSessionItem;
|
|
187
|
-
/** 晚场记录(实际 20:00~21:15,统计窗口 19:45~22:00) */
|
|
188
|
-
eveningSession: UserLiveWatchSessionItem;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* 用户看播日历 - 单场次数据
|
|
192
|
-
*/
|
|
193
|
-
interface UserLiveWatchSessionItem {
|
|
194
|
-
/**
|
|
195
|
-
* 该时间段内选中的直播间ID:
|
|
196
|
-
* - 有直播且被选中那场 ⇒ 对应 liveStreamRoomId
|
|
197
|
-
* - NO_LIVE(无直播)时可以不返回或返回空字符串
|
|
198
|
-
*/
|
|
199
|
-
liveStreamRoomId?: string;
|
|
200
|
-
/**
|
|
201
|
-
* 选中直播间名称:
|
|
202
|
-
* - 有直播且被选中那场 ⇒ 对应名称
|
|
203
|
-
* - NO_LIVE 时可以不返回或返回空字符串
|
|
204
|
-
*/
|
|
205
|
-
liveStreamRoomName?: string;
|
|
206
|
-
/** 用户在该时间段选中直播的观看总时长(分钟,向下取整的整数) */
|
|
207
|
-
watchMinutes: number;
|
|
208
|
-
/**
|
|
209
|
-
* 看播状态(英文枚举,前端根据状态展示对应颜色):
|
|
210
|
-
* - COMPLETED ⇒ 已完成
|
|
211
|
-
* - INCOMPLETE ⇒ 未完成(包括 AudienceStatistics 有记录但分钟数为 0 的情况)
|
|
212
|
-
* - NOT_WATCHED ⇒ 未观看(有直播但用户完全没看,没有任何 AudienceStatistics 记录)
|
|
213
|
-
* - NO_LIVE ⇒ 无直播(该时间段内没有任何直播)
|
|
214
|
-
*/
|
|
215
|
-
status: 'COMPLETED' | 'INCOMPLETE' | 'NOT_WATCHED' | 'NO_LIVE';
|
|
216
139
|
}
|
|
217
140
|
interface BaseController {
|
|
218
141
|
getUserList(request: Request.GetUserList, req?: FastifyRequest): Promise<Response.GetUserList>;
|
|
219
142
|
exportUserList(request: Request.ExportUserList, req?: FastifyRequest): Promise<Response.ExportUserList>;
|
|
220
143
|
getLiveRoomUserList(request: Request.GetLiveRoomUserList, req?: FastifyRequest): Promise<Response.GetLiveRoomUserList>;
|
|
221
144
|
exportLiveRoomUserList(request: Request.ExportLiveRoomUserList, req?: FastifyRequest): Promise<Response.ExportLiveRoomUserList>;
|
|
222
|
-
getUserLiveWatchSummary(request: Request.GetUserLiveWatchSummary, req?: FastifyRequest): Promise<Response.GetUserLiveWatchSummary>;
|
|
223
|
-
getUserLiveWatchCalendar(request: Request.GetUserLiveWatchCalendar, req?: FastifyRequest): Promise<Response.GetUserLiveWatchCalendar>;
|
|
224
145
|
}
|
|
225
146
|
}
|
|
226
147
|
/**
|