@be-link/ecommerce-client-backend-service-node-sdk 0.1.77 → 0.1.78

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.
@@ -7,8 +7,8 @@ export default abstract class BaseService {
7
7
  /** URL一级路径 */
8
8
  protected abstract prefixUrl: string;
9
9
  /** 子网域名 */
10
- protected readonly natDevHost = "https://ecommerce-dev.wejourney.top/client-backend";
11
- protected readonly natProdHost = "http://10.1.32.74:8090/client-backend";
10
+ protected readonly natDevHost = "http://192.168.92.0:8090/client-backend";
11
+ protected readonly natProdHost = "http://192.168.41.121:8090/client-backend";
12
12
  /** 公网域名 */
13
13
  protected readonly publicDevHost = "https://ecommerce-dev.wejourney.top/client-backend";
14
14
  protected readonly publicProdHost = "";
@@ -12,8 +12,8 @@ const string_1 = require("../utils/string");
12
12
  class BaseService {
13
13
  constructor() {
14
14
  /** 子网域名 */
15
- this.natDevHost = 'https://ecommerce-dev.wejourney.top/client-backend';
16
- this.natProdHost = 'http://10.1.32.74:8090/client-backend';
15
+ this.natDevHost = 'http://192.168.92.0:8090/client-backend';
16
+ this.natProdHost = 'http://192.168.41.121:8090/client-backend';
17
17
  /** 公网域名 */
18
18
  this.publicDevHost = 'https://ecommerce-dev.wejourney.top/client-backend';
19
19
  this.publicProdHost = '';
@@ -3,7 +3,7 @@ export declare namespace RuleService {
3
3
  interface Info {
4
4
  /** 直播间id */
5
5
  liveStreamRoomId: string;
6
- /** 规则分类:city-城市、delivery-配送、tag-标签 */
6
+ /** 规则分类:city-城市、delivery-配送、tag-标签、businessScope-主营业务 */
7
7
  cate: string;
8
8
  /** 规则值 */
9
9
  ruleValue: string;
@@ -6,6 +6,8 @@ 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>;
9
11
  }
10
12
  export declare const userDataService: UserDataServiceClass;
11
13
  export default userDataService;
@@ -33,6 +33,12 @@ 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
+ }
36
42
  };
37
43
  __decorate([
38
44
  (0, tsoa_1.OperationId)('获取用户列表'),
@@ -54,6 +60,16 @@ __decorate([
54
60
  (0, tsoa_1.Post)('export-live-room-user-list'),
55
61
  __param(0, (0, tsoa_1.Body)())
56
62
  ], 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);
57
73
  UserDataServiceClass = __decorate([
58
74
  (0, tsoa_1.Route)('userData'),
59
75
  (0, tsoa_1.Tags)('UserData')
@@ -93,6 +93,20 @@ 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
+ }
96
110
  }
97
111
  namespace Response {
98
112
  /**
@@ -136,12 +150,77 @@ export declare namespace UserDataService {
136
150
  */
137
151
  interface ExportLiveRoomUserList extends IBatchExport {
138
152
  }
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';
139
216
  }
140
217
  interface BaseController {
141
218
  getUserList(request: Request.GetUserList, req?: FastifyRequest): Promise<Response.GetUserList>;
142
219
  exportUserList(request: Request.ExportUserList, req?: FastifyRequest): Promise<Response.ExportUserList>;
143
220
  getLiveRoomUserList(request: Request.GetLiveRoomUserList, req?: FastifyRequest): Promise<Response.GetLiveRoomUserList>;
144
221
  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>;
145
224
  }
146
225
  }
147
226
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-client-backend-service-node-sdk",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "description": "EcommerceClientBackendService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/types.d.ts CHANGED
@@ -158,6 +158,8 @@ export interface ViewRecord {
158
158
  coverImage: string;
159
159
  /** 竖屏直播的封面图 URL。若未设置该参数值,则默认读取 CoverImage 的值。若通过控制台配置竖屏直播封面图且配置成功,则封面图的 URL 无协议头。若通过调用 API 接口配置竖屏直播封面图,则封面图的 URL 有协议头。 */
160
160
  verticalCoverImage: string;
161
+ /** 分享封面,用于门店分享 */
162
+ shareCover: string;
161
163
  /** 观看 URL。 */
162
164
  viewUrl: string;
163
165
  }