@be-link/ecommerce-client-backend-service-node-sdk 0.1.70 → 0.1.72

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.
@@ -34,6 +34,11 @@ declare class DataServiceClass extends BaseService implements DataService.BaseCo
34
34
  compensateUserLastWatchTime(request: DataService.Request.CompensateUserLastWatchTime): Promise<DataService.Response.CompensateUserLastWatchTime>;
35
35
  /** 同步观众统计数据 */
36
36
  syncAudienceStatistics(): Promise<void>;
37
+ /** 同步回放观众统计(每天0点:开播日期前天/昨天的直播间回放三字段) */
38
+ syncReplayAudienceStatistics(): Promise<void>;
39
+ /** 补偿指定直播间的回放观众统计(拉火山回放写回放三字段,用于手动补偿) */
40
+ compensateReplayAudienceStatistics(request: DataService.Request.CompensateReplayAudienceStatistics): Promise<void>;
41
+ batchCompensateReplayAudienceStatistics(request: DataService.Request.BatchCompensateReplayAudienceStatistics): Promise<void>;
37
42
  /** 每日更新用户首次看播时间 */
38
43
  dailyUpdateUserFirstWatchTime(): Promise<void>;
39
44
  /** 每小时更新用户首次消费时间 */
@@ -89,6 +89,17 @@ let DataServiceClass = class DataServiceClass extends BaseService_1.default {
89
89
  syncAudienceStatistics() {
90
90
  return (0, http_1.callApi)(this.getApiUrl(this.syncAudienceStatistics), undefined);
91
91
  }
92
+ /** 同步回放观众统计(每天0点:开播日期前天/昨天的直播间回放三字段) */
93
+ syncReplayAudienceStatistics() {
94
+ return (0, http_1.callApi)(this.getApiUrl(this.syncReplayAudienceStatistics), undefined);
95
+ }
96
+ /** 补偿指定直播间的回放观众统计(拉火山回放写回放三字段,用于手动补偿) */
97
+ compensateReplayAudienceStatistics(request) {
98
+ return (0, http_1.callApi)(this.getApiUrl(this.compensateReplayAudienceStatistics), request);
99
+ }
100
+ batchCompensateReplayAudienceStatistics(request) {
101
+ return (0, http_1.callApi)(this.getApiUrl(this.batchCompensateReplayAudienceStatistics), request);
102
+ }
92
103
  /** 每日更新用户首次看播时间 */
93
104
  dailyUpdateUserFirstWatchTime() {
94
105
  return (0, http_1.callApi)(this.getApiUrl(this.dailyUpdateUserFirstWatchTime), undefined);
@@ -193,6 +204,20 @@ __decorate([
193
204
  (0, tsoa_1.OperationId)('同步观众统计数据'),
194
205
  (0, tsoa_1.Post)('sync-audience-statistics')
195
206
  ], DataServiceClass.prototype, "syncAudienceStatistics", null);
207
+ __decorate([
208
+ (0, tsoa_1.OperationId)('同步回放观众统计'),
209
+ (0, tsoa_1.Post)('sync-replay-audience-statistics')
210
+ ], DataServiceClass.prototype, "syncReplayAudienceStatistics", null);
211
+ __decorate([
212
+ (0, tsoa_1.OperationId)('补偿回放观众统计'),
213
+ (0, tsoa_1.Post)('compensate-replay-audience-statistics'),
214
+ __param(0, (0, tsoa_1.Body)())
215
+ ], DataServiceClass.prototype, "compensateReplayAudienceStatistics", null);
216
+ __decorate([
217
+ (0, tsoa_1.OperationId)('批量补偿回放观众统计'),
218
+ (0, tsoa_1.Post)('batch-compensate-replay-audience-statistics'),
219
+ __param(0, (0, tsoa_1.Body)())
220
+ ], DataServiceClass.prototype, "batchCompensateReplayAudienceStatistics", null);
196
221
  __decorate([
197
222
  (0, tsoa_1.OperationId)('每日更新用户首次看播时间'),
198
223
  (0, tsoa_1.Post)('daily-update-user-first-watch-time')
@@ -186,6 +186,24 @@ export declare namespace DataService {
186
186
  /** 直播间id */
187
187
  liveStreamRoomId: string;
188
188
  }
189
+ /**
190
+ * 补偿指定直播间的回放观众统计(拉火山回放写回放三字段)
191
+ */
192
+ interface CompensateReplayAudienceStatistics {
193
+ /** 直播间id */
194
+ liveStreamRoomId: string;
195
+ }
196
+ /**
197
+ * 批量补偿回放观众统计(按时间范围查询直播间)
198
+ */
199
+ interface BatchCompensateReplayAudienceStatistics {
200
+ /** 开始时间(秒级时间戳) */
201
+ startTime: number;
202
+ /** 结束时间(秒级时间戳) */
203
+ endTime: number;
204
+ /** 批次大小(保留兼容性,实际串行执行) */
205
+ batchSize?: number;
206
+ }
189
207
  /**
190
208
  * 每日对账任务
191
209
  */
@@ -269,6 +287,15 @@ export declare namespace DataService {
269
287
  /** 执行结果消息 */
270
288
  message: string;
271
289
  }
290
+ /**
291
+ * 手动补偿更新用户最后看播时间响应
292
+ */
293
+ interface CompensateUserLastWatchTime {
294
+ /** 是否成功 */
295
+ success: boolean;
296
+ /** 执行结果消息 */
297
+ message: string;
298
+ }
272
299
  }
273
300
  interface BaseController {
274
301
  userLiveStreamRelation(request: Request.UserLiveStreamRelation, req?: FastifyRequest): Promise<void>;
@@ -289,6 +316,9 @@ export declare namespace DataService {
289
316
  initUserExtraInfoSevenDaysAmount(req?: FastifyRequest): Promise<void>;
290
317
  compensateUserLastWatchTime(request: Request.CompensateUserLastWatchTime, req?: FastifyRequest): Promise<Response.CompensateUserLastWatchTime>;
291
318
  syncAudienceStatistics(): Promise<void>;
319
+ syncReplayAudienceStatistics(): Promise<void>;
320
+ compensateReplayAudienceStatistics(request: Request.CompensateReplayAudienceStatistics, req?: FastifyRequest): Promise<void>;
321
+ batchCompensateReplayAudienceStatistics(request: Request.BatchCompensateReplayAudienceStatistics, req?: FastifyRequest): Promise<void>;
292
322
  dailyUpdateUserFirstWatchTime(req?: FastifyRequest): Promise<void>;
293
323
  hourlyUpdateUserFirstConsumptionTime(req?: FastifyRequest): Promise<void>;
294
324
  dailyReconciliation(request?: Request.DailyReconciliation, req?: FastifyRequest): Promise<void>;
@@ -279,6 +279,8 @@ export declare namespace RoomService {
279
279
  liveStartTime: string;
280
280
  /** 看播时长 (格式 "X小时X分" 或 "X分钟") */
281
281
  watchDuration: string;
282
+ /** 回放时长 (格式 "X小时X分" 或 "X分钟") */
283
+ replayWatchDuration: string;
282
284
  /** 首次进入时间 (格式 "YYYY-MM-DD HH:mm:ss") */
283
285
  firstEntryTime: string;
284
286
  /** 最后进入时间 (格式 "YYYY-MM-DD HH:mm:ss") */
@@ -4,6 +4,8 @@ declare class UserDataServiceClass extends BaseService implements UserDataServic
4
4
  protected prefixUrl: string;
5
5
  getUserList(request: UserDataService.Request.GetUserList): Promise<UserDataService.Response.GetUserList>;
6
6
  exportUserList(request: UserDataService.Request.ExportUserList): Promise<UserDataService.Response.ExportUserList>;
7
+ getLiveRoomUserList(request: UserDataService.Request.GetLiveRoomUserList): Promise<UserDataService.Response.GetLiveRoomUserList>;
8
+ exportLiveRoomUserList(request: UserDataService.Request.ExportLiveRoomUserList): Promise<UserDataService.Response.ExportLiveRoomUserList>;
7
9
  }
8
10
  export declare const userDataService: UserDataServiceClass;
9
11
  export default userDataService;
@@ -27,6 +27,12 @@ let UserDataServiceClass = class UserDataServiceClass extends BaseService_1.defa
27
27
  exportUserList(request) {
28
28
  return (0, http_1.callApi)(this.getApiUrl(this.exportUserList), request);
29
29
  }
30
+ getLiveRoomUserList(request) {
31
+ return (0, http_1.callApi)(this.getApiUrl(this.getLiveRoomUserList), request);
32
+ }
33
+ exportLiveRoomUserList(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.exportLiveRoomUserList), request);
35
+ }
30
36
  };
31
37
  __decorate([
32
38
  (0, tsoa_1.OperationId)('获取用户列表'),
@@ -38,6 +44,16 @@ __decorate([
38
44
  (0, tsoa_1.Post)('export-user-list'),
39
45
  __param(0, (0, tsoa_1.Body)())
40
46
  ], UserDataServiceClass.prototype, "exportUserList", null);
47
+ __decorate([
48
+ (0, tsoa_1.OperationId)('获取直播间用户列表'),
49
+ (0, tsoa_1.Post)('get-live-room-user-list'),
50
+ __param(0, (0, tsoa_1.Body)())
51
+ ], UserDataServiceClass.prototype, "getLiveRoomUserList", null);
52
+ __decorate([
53
+ (0, tsoa_1.OperationId)('导出直播间用户列表'),
54
+ (0, tsoa_1.Post)('export-live-room-user-list'),
55
+ __param(0, (0, tsoa_1.Body)())
56
+ ], UserDataServiceClass.prototype, "exportLiveRoomUserList", null);
41
57
  UserDataServiceClass = __decorate([
42
58
  (0, tsoa_1.Route)('userData'),
43
59
  (0, tsoa_1.Tags)('UserData')
@@ -51,6 +51,48 @@ export declare namespace UserDataService {
51
51
  */
52
52
  interface ExportUserList extends GetUserList {
53
53
  }
54
+ /**
55
+ * 获取直播间用户列表
56
+ */
57
+ interface GetLiveRoomUserList {
58
+ /** 直播间ID */
59
+ liveStreamRoomId: string;
60
+ /** 门店ID列表(支持多选) */
61
+ storeIds?: string[];
62
+ /** 用户ID */
63
+ userId?: string;
64
+ /** 用户ID列表 */
65
+ userIds?: string[];
66
+ /** 用户昵称(支持模糊匹配) */
67
+ nickname?: string;
68
+ /** 会员等级 */
69
+ memberLevel?: string;
70
+ /** 页码,从0开始 */
71
+ pageIndex: number;
72
+ /** 每页数量,默认20,最大1000 */
73
+ pageSize?: number;
74
+ }
75
+ /**
76
+ * 导出直播间用户列表
77
+ */
78
+ interface ExportLiveRoomUserList {
79
+ /** 直播间ID */
80
+ liveStreamRoomId: string;
81
+ /** 门店ID列表(支持多选) */
82
+ storeIds?: string[];
83
+ /** 用户ID */
84
+ userId?: string;
85
+ /** 用户ID列表 */
86
+ userIds?: string[];
87
+ /** 用户昵称(支持模糊匹配) */
88
+ nickname?: string;
89
+ /** 会员等级 */
90
+ memberLevel?: string;
91
+ /** 页码,从0开始 */
92
+ pageIndex: number;
93
+ /** 每页数量,默认20,最大1000 */
94
+ pageSize?: number;
95
+ }
54
96
  }
55
97
  namespace Response {
56
98
  /**
@@ -76,10 +118,30 @@ export declare namespace UserDataService {
76
118
  */
77
119
  interface ExportUserList extends IBatchExport {
78
120
  }
121
+ /**
122
+ * 获取直播间用户列表响应
123
+ */
124
+ interface GetLiveRoomUserList {
125
+ /** 总条数 */
126
+ total: number;
127
+ /** 当前页 */
128
+ pageIndex: number;
129
+ /** 每页数量 */
130
+ pageSize: number;
131
+ /** 用户列表 */
132
+ list: LiveRoomUserItem[];
133
+ }
134
+ /**
135
+ * 导出直播间用户列表响应
136
+ */
137
+ interface ExportLiveRoomUserList extends IBatchExport {
138
+ }
79
139
  }
80
140
  interface BaseController {
81
141
  getUserList(request: Request.GetUserList, req?: FastifyRequest): Promise<Response.GetUserList>;
82
142
  exportUserList(request: Request.ExportUserList, req?: FastifyRequest): Promise<Response.ExportUserList>;
143
+ getLiveRoomUserList(request: Request.GetLiveRoomUserList, req?: FastifyRequest): Promise<Response.GetLiveRoomUserList>;
144
+ exportLiveRoomUserList(request: Request.ExportLiveRoomUserList, req?: FastifyRequest): Promise<Response.ExportLiveRoomUserList>;
83
145
  }
84
146
  }
85
147
  /**
@@ -163,3 +225,52 @@ export interface UserInfo {
163
225
  /** 更新时间(时间戳) */
164
226
  updatedAt: number;
165
227
  }
228
+ /**
229
+ * 直播间用户列表项
230
+ */
231
+ export interface LiveRoomUserItem {
232
+ /** 用户ID */
233
+ userId: string;
234
+ /** 用户头像 */
235
+ avatar: string;
236
+ /** 昵称 */
237
+ nickname: string;
238
+ /** 用户状态(正常 / 禁用 / 拉黑等) */
239
+ status: string;
240
+ /** 会员等级 */
241
+ memberLevel: string;
242
+ /** 所属门店ID */
243
+ storeId: string;
244
+ /** 所属门店名称 */
245
+ storeName: string;
246
+ /** 是否完播(观看时长 >= 60分钟,不含回放) */
247
+ isCompleted: boolean;
248
+ /** 本场直播观看时长(分钟) */
249
+ liveWatchDuration: string;
250
+ /** 直播中消费金额(元) */
251
+ liveConsumeAmount: number;
252
+ /** 本场回放观看时长(分钟) */
253
+ replayWatchDuration: string;
254
+ /** 回放消费金额(元) */
255
+ replayConsumeAmount: number;
256
+ /** 累计消费金额(支付总额 - 退款总额,元) */
257
+ totalConsumeAmount: number;
258
+ /** 首次进入直播间时间(毫秒时间戳) */
259
+ firstEnterTime: number;
260
+ /** 最后进入直播间时间(毫秒时间戳) */
261
+ lastEnterTime: number;
262
+ /** 授权手机号(用户详情授权) */
263
+ bindPhone: string;
264
+ /** 提货手机号(用户详情手机号) */
265
+ phone: string;
266
+ /** 最近一笔未退款订单支付时间(毫秒时间戳) */
267
+ latestValidPayTime: number;
268
+ /** 市场经理 */
269
+ marketManager: string;
270
+ /** 市场经理ID */
271
+ marketManagerId: string;
272
+ /** 直播间名称 */
273
+ liveStreamRoomName: string;
274
+ /** 直播间ID */
275
+ liveStreamRoomId: string;
276
+ }
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.70",
3
+ "version": "0.1.72",
4
4
  "description": "EcommerceClientBackendService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@be-link/ecommerce-volcengine-open-api-sdk": "1.0.11",
14
- "@be-link/ecommerce-user-service-node-sdk": "0.1.80",
14
+ "@be-link/ecommerce-user-service-node-sdk": "0.1.81",
15
15
  "@fastify/request-context": "6.2.1",
16
16
  "axios": "1.13.2",
17
17
  "axios-retry": "4.0.0",