@be-link/ecommerce-client-backend-service-node-sdk 0.1.85 → 0.1.87
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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { RoomService } from './modules/room/types';
|
|
2
|
-
export type { RoomDataService } from './modules/roomData/types';
|
|
2
|
+
export type { RoomDataService, StoreAnalysisService } from './modules/roomData/types';
|
|
3
3
|
export type { DataService } from './modules/data/types';
|
|
4
4
|
export type { DomainService } from './modules/domain/types';
|
|
5
5
|
export type { RuleService } from './modules/rule/types';
|
|
@@ -61,6 +61,11 @@ declare class DataServiceClass extends BaseService implements DataService.BaseCo
|
|
|
61
61
|
weeklyCleanupNewCustomers(request?: DataService.Request.ExecuteGrowthStageTask): Promise<void>;
|
|
62
62
|
/** 新老客分流存量数据清洗(一次性补偿入口) */
|
|
63
63
|
migrateExistingGrowthStageData(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* 预热新老客发育阶段缓存(昨日看播用户)
|
|
66
|
+
* 用于提高用户首次拉取阶段接口的命中率
|
|
67
|
+
*/
|
|
68
|
+
warmupGrowthStageCacheForYesterdayWatchers(request?: DataService.Request.ExecuteGrowthStageTask): Promise<void>;
|
|
64
69
|
}
|
|
65
70
|
export declare const dataService: DataServiceClass;
|
|
66
71
|
export default dataService;
|
package/modules/data/service.js
CHANGED
|
@@ -146,6 +146,13 @@ let DataServiceClass = class DataServiceClass extends BaseService_1.default {
|
|
|
146
146
|
migrateExistingGrowthStageData() {
|
|
147
147
|
return (0, http_1.callApi)(this.getApiUrl(this.migrateExistingGrowthStageData), undefined);
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* 预热新老客发育阶段缓存(昨日看播用户)
|
|
151
|
+
* 用于提高用户首次拉取阶段接口的命中率
|
|
152
|
+
*/
|
|
153
|
+
warmupGrowthStageCacheForYesterdayWatchers(request) {
|
|
154
|
+
return (0, http_1.callApi)(this.getApiUrl(this.warmupGrowthStageCacheForYesterdayWatchers), request);
|
|
155
|
+
}
|
|
149
156
|
};
|
|
150
157
|
__decorate([
|
|
151
158
|
(0, tsoa_1.OperationId)('获取用户观看时长'),
|
|
@@ -301,6 +308,11 @@ __decorate([
|
|
|
301
308
|
(0, tsoa_1.OperationId)('migrateExistingGrowthStageData'),
|
|
302
309
|
(0, tsoa_1.Post)('migrate-existing-growth-stage-data')
|
|
303
310
|
], DataServiceClass.prototype, "migrateExistingGrowthStageData", null);
|
|
311
|
+
__decorate([
|
|
312
|
+
(0, tsoa_1.OperationId)('warmupGrowthStageCacheForYesterdayWatchers'),
|
|
313
|
+
(0, tsoa_1.Post)('warmup-growth-stage-cache-for-yesterday-watchers'),
|
|
314
|
+
__param(0, (0, tsoa_1.Body)())
|
|
315
|
+
], DataServiceClass.prototype, "warmupGrowthStageCacheForYesterdayWatchers", null);
|
|
304
316
|
DataServiceClass = __decorate([
|
|
305
317
|
(0, tsoa_1.Route)('data'),
|
|
306
318
|
(0, tsoa_1.Tags)('Data')
|
package/modules/data/types.d.ts
CHANGED
|
@@ -335,6 +335,7 @@ export declare namespace DataService {
|
|
|
335
335
|
weeklySettleFirstCycle(request?: Request.ExecuteGrowthStageTask, req?: FastifyRequest): Promise<void>;
|
|
336
336
|
dailyDetermineSecondCycle(request?: Request.ExecuteGrowthStageTask, req?: FastifyRequest): Promise<void>;
|
|
337
337
|
weeklyCleanupNewCustomers(request?: Request.ExecuteGrowthStageTask, req?: FastifyRequest): Promise<void>;
|
|
338
|
+
warmupGrowthStageCacheForYesterdayWatchers(request?: Request.ExecuteGrowthStageTask, req?: FastifyRequest): Promise<void>;
|
|
338
339
|
migrateExistingGrowthStageData(req?: FastifyRequest): Promise<void>;
|
|
339
340
|
}
|
|
340
341
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RoomDataService } from './types';
|
|
1
|
+
import { RoomDataService, StoreAnalysisService } from './types';
|
|
2
2
|
import BaseService from '../BaseService';
|
|
3
3
|
declare class RoomDataServiceClass extends BaseService implements RoomDataService.BaseController {
|
|
4
4
|
protected prefixUrl: string;
|
|
@@ -9,6 +9,10 @@ declare class RoomDataServiceClass extends BaseService implements RoomDataServic
|
|
|
9
9
|
productSalesRanking(request: RoomDataService.Request.ProductSalesRanking): Promise<RoomDataService.Response.ProductSalesRanking>;
|
|
10
10
|
getViewerCountForSales(request: RoomDataService.Request.GetViewerCountForSales): Promise<RoomDataService.Response.GetViewerCountForSales>;
|
|
11
11
|
getDailyViewerCountForSales(request: RoomDataService.Request.GetDailyViewerCountForSales): Promise<RoomDataService.Response.GetDailyViewerCountForSales>;
|
|
12
|
+
getStoreAnalysisSummary(request: StoreAnalysisService.Request.Summary): Promise<StoreAnalysisService.Response.Summary>;
|
|
13
|
+
getStoreAnalysisList(request: StoreAnalysisService.Request.List): Promise<StoreAnalysisService.Response.List>;
|
|
14
|
+
getStoreAnalysisExportData(request: StoreAnalysisService.Request.Export): Promise<StoreAnalysisService.Response.Export>;
|
|
15
|
+
getStoreAnalysisProductList(request: StoreAnalysisService.Request.ProductList): Promise<StoreAnalysisService.Response.ProductList>;
|
|
12
16
|
}
|
|
13
17
|
export declare const roomDataService: RoomDataServiceClass;
|
|
14
18
|
export default roomDataService;
|
|
@@ -42,6 +42,19 @@ let RoomDataServiceClass = class RoomDataServiceClass extends BaseService_1.defa
|
|
|
42
42
|
getDailyViewerCountForSales(request) {
|
|
43
43
|
return (0, http_1.callApi)(this.getApiUrl(this.getDailyViewerCountForSales), request);
|
|
44
44
|
}
|
|
45
|
+
// ---------- 门店分析(同 RoomDataController,路径 /room-data/get-store-analysis-*) ----------
|
|
46
|
+
getStoreAnalysisSummary(request) {
|
|
47
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreAnalysisSummary), request);
|
|
48
|
+
}
|
|
49
|
+
getStoreAnalysisList(request) {
|
|
50
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreAnalysisList), request);
|
|
51
|
+
}
|
|
52
|
+
getStoreAnalysisExportData(request) {
|
|
53
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreAnalysisExportData), request);
|
|
54
|
+
}
|
|
55
|
+
getStoreAnalysisProductList(request) {
|
|
56
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreAnalysisProductList), request);
|
|
57
|
+
}
|
|
45
58
|
};
|
|
46
59
|
__decorate([
|
|
47
60
|
(0, tsoa_1.OperationId)('直播间列表接口(门店维度)'),
|
|
@@ -78,6 +91,26 @@ __decorate([
|
|
|
78
91
|
(0, tsoa_1.Post)('get-daily-viewer-count-for-sales'),
|
|
79
92
|
__param(0, (0, tsoa_1.Body)())
|
|
80
93
|
], RoomDataServiceClass.prototype, "getDailyViewerCountForSales", null);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, tsoa_1.OperationId)('门店分析汇总'),
|
|
96
|
+
(0, tsoa_1.Post)('get-store-analysis-summary'),
|
|
97
|
+
__param(0, (0, tsoa_1.Body)())
|
|
98
|
+
], RoomDataServiceClass.prototype, "getStoreAnalysisSummary", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, tsoa_1.OperationId)('门店分析列表'),
|
|
101
|
+
(0, tsoa_1.Post)('get-store-analysis-list'),
|
|
102
|
+
__param(0, (0, tsoa_1.Body)())
|
|
103
|
+
], RoomDataServiceClass.prototype, "getStoreAnalysisList", null);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, tsoa_1.OperationId)('门店分析导出'),
|
|
106
|
+
(0, tsoa_1.Post)('get-store-analysis-export-data'),
|
|
107
|
+
__param(0, (0, tsoa_1.Body)())
|
|
108
|
+
], RoomDataServiceClass.prototype, "getStoreAnalysisExportData", null);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, tsoa_1.OperationId)('门店商品数据'),
|
|
111
|
+
(0, tsoa_1.Post)('get-store-analysis-product-list'),
|
|
112
|
+
__param(0, (0, tsoa_1.Body)())
|
|
113
|
+
], RoomDataServiceClass.prototype, "getStoreAnalysisProductList", null);
|
|
81
114
|
RoomDataServiceClass = __decorate([
|
|
82
115
|
(0, tsoa_1.Route)('room-data'),
|
|
83
116
|
(0, tsoa_1.Tags)('RoomData')
|
|
@@ -161,3 +161,103 @@ export declare namespace RoomDataService {
|
|
|
161
161
|
getDailyViewerCountForSales(request: Request.GetDailyViewerCountForSales, req?: FastifyRequest): Promise<Response.GetDailyViewerCountForSales>;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
/** 门店分析(接口挂在 room-data 下,与 RoomDataService 同模块) */
|
|
165
|
+
export declare namespace StoreAnalysisService {
|
|
166
|
+
namespace Request {
|
|
167
|
+
interface Summary {
|
|
168
|
+
liveStreamRoomId: string;
|
|
169
|
+
}
|
|
170
|
+
interface List {
|
|
171
|
+
liveStreamRoomId: string;
|
|
172
|
+
storeIds?: string[];
|
|
173
|
+
province?: string;
|
|
174
|
+
city?: string;
|
|
175
|
+
area?: string;
|
|
176
|
+
pageIndex?: number;
|
|
177
|
+
pageSize?: number;
|
|
178
|
+
sortField?: 'viewerCount' | 'gmv' | 'actualAmount';
|
|
179
|
+
sortOrder?: 'asc' | 'desc';
|
|
180
|
+
}
|
|
181
|
+
interface Export {
|
|
182
|
+
liveStreamRoomId: string;
|
|
183
|
+
storeIds?: string[];
|
|
184
|
+
province?: string;
|
|
185
|
+
city?: string;
|
|
186
|
+
area?: string;
|
|
187
|
+
pageIndex?: number;
|
|
188
|
+
pageSize?: number;
|
|
189
|
+
sortField?: 'viewerCount' | 'gmv' | 'actualAmount';
|
|
190
|
+
sortOrder?: 'asc' | 'desc';
|
|
191
|
+
}
|
|
192
|
+
interface ProductList {
|
|
193
|
+
liveStreamRoomId: string;
|
|
194
|
+
storeId: string;
|
|
195
|
+
sortField?: 'actualAmount' | 'soldQuantity';
|
|
196
|
+
sortOrder?: 'asc' | 'desc';
|
|
197
|
+
pageIndex?: number;
|
|
198
|
+
pageSize?: number;
|
|
199
|
+
}
|
|
200
|
+
interface ProductExport {
|
|
201
|
+
liveStreamRoomId: string;
|
|
202
|
+
storeId: string;
|
|
203
|
+
sortField?: 'actualAmount' | 'soldQuantity';
|
|
204
|
+
sortOrder?: 'asc' | 'desc';
|
|
205
|
+
pageIndex?: number;
|
|
206
|
+
pageSize?: number;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
namespace Response {
|
|
210
|
+
interface Summary {
|
|
211
|
+
totalViewerCount: number;
|
|
212
|
+
totalGmv: number;
|
|
213
|
+
}
|
|
214
|
+
interface StoreAnalysisItem {
|
|
215
|
+
storeId: string;
|
|
216
|
+
storeName: string;
|
|
217
|
+
storeAddress: string;
|
|
218
|
+
viewerCount: number;
|
|
219
|
+
orderUserCount: number;
|
|
220
|
+
gmv: number;
|
|
221
|
+
actualAmount: number;
|
|
222
|
+
uvValue: number;
|
|
223
|
+
orderCount: number;
|
|
224
|
+
avgOrderAmount: number;
|
|
225
|
+
refundGmv: number;
|
|
226
|
+
refundOrderCount: number;
|
|
227
|
+
conversionRate: number;
|
|
228
|
+
}
|
|
229
|
+
interface List {
|
|
230
|
+
list: StoreAnalysisItem[];
|
|
231
|
+
total: number;
|
|
232
|
+
pageIndex: number;
|
|
233
|
+
pageSize: number;
|
|
234
|
+
}
|
|
235
|
+
interface Export {
|
|
236
|
+
headers: string[];
|
|
237
|
+
data: (string | number)[][];
|
|
238
|
+
}
|
|
239
|
+
interface ProductItem {
|
|
240
|
+
productId: string;
|
|
241
|
+
productName: string;
|
|
242
|
+
actualAmount: number;
|
|
243
|
+
orderQuantity: number;
|
|
244
|
+
soldQuantity: number;
|
|
245
|
+
refundQuantity: number;
|
|
246
|
+
refundRate: number;
|
|
247
|
+
paySuccessRate: number;
|
|
248
|
+
}
|
|
249
|
+
interface ProductList {
|
|
250
|
+
list: ProductItem[];
|
|
251
|
+
total: number;
|
|
252
|
+
pageIndex: number;
|
|
253
|
+
pageSize: number;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
interface BaseController {
|
|
257
|
+
getStoreAnalysisSummary(request: Request.Summary, req?: FastifyRequest): Promise<Response.Summary>;
|
|
258
|
+
getStoreAnalysisList(request: Request.List, req?: FastifyRequest): Promise<Response.List>;
|
|
259
|
+
getStoreAnalysisExportData(request: Request.Export, req?: FastifyRequest): Promise<Response.Export>;
|
|
260
|
+
getStoreAnalysisProductList(request: Request.ProductList, req?: FastifyRequest): Promise<Response.ProductList>;
|
|
261
|
+
getStoreAnalysisProductExportData(request: Request.ProductExport, req?: FastifyRequest): Promise<Response.Export>;
|
|
262
|
+
}
|
|
263
|
+
}
|