@be-link/ecommerce-client-backend-service-node-sdk 0.1.5 → 0.1.7
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/data/service.d.ts +4 -0
- package/modules/data/service.js +18 -0
- package/modules/data/types.d.ts +54 -1
- package/package.json +1 -1
|
@@ -8,6 +8,10 @@ declare class DataServiceClass extends BaseService implements DataService.BaseCo
|
|
|
8
8
|
getUserLiveStreamInfo(request: DataService.Request.UserLiveStreamInfo): Promise<DataService.Response.UserLiveStreamInfo>;
|
|
9
9
|
/** 直播间观众列表查询 */
|
|
10
10
|
getAudienceList(request: DataService.Request.AudienceList): Promise<DataService.Response.AudienceList>;
|
|
11
|
+
/** 直播间统计查询 */
|
|
12
|
+
getLiveStreamStatistics(request: DataService.Request.LiveStreamStatistics): Promise<DataService.Response.LiveStreamStatistics>;
|
|
13
|
+
/** 直播间商品销量排行查询 */
|
|
14
|
+
getLiveStreamProductTop(request: DataService.Request.LiveStreamProductTop): Promise<DataService.Response.LiveStreamProductTop>;
|
|
11
15
|
}
|
|
12
16
|
export declare const dataService: DataServiceClass;
|
|
13
17
|
export default dataService;
|
package/modules/data/service.js
CHANGED
|
@@ -37,6 +37,14 @@ let DataServiceClass = class DataServiceClass extends BaseService_1.default {
|
|
|
37
37
|
getAudienceList(request) {
|
|
38
38
|
return (0, http_1.callApi)(this.getApiUrl(this.getAudienceList), request);
|
|
39
39
|
}
|
|
40
|
+
/** 直播间统计查询 */
|
|
41
|
+
getLiveStreamStatistics(request) {
|
|
42
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getLiveStreamStatistics), request);
|
|
43
|
+
}
|
|
44
|
+
/** 直播间商品销量排行查询 */
|
|
45
|
+
getLiveStreamProductTop(request) {
|
|
46
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getLiveStreamProductTop), request);
|
|
47
|
+
}
|
|
40
48
|
};
|
|
41
49
|
__decorate([
|
|
42
50
|
(0, tsoa_1.OperationId)('获取用户观看时长'),
|
|
@@ -63,6 +71,16 @@ __decorate([
|
|
|
63
71
|
(0, tsoa_1.Post)('get-audience-list'),
|
|
64
72
|
__param(0, (0, tsoa_1.Body)())
|
|
65
73
|
], DataServiceClass.prototype, "getAudienceList", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, tsoa_1.OperationId)('直播间统计查询'),
|
|
76
|
+
(0, tsoa_1.Post)('get-live-stream-statistics'),
|
|
77
|
+
__param(0, (0, tsoa_1.Body)())
|
|
78
|
+
], DataServiceClass.prototype, "getLiveStreamStatistics", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, tsoa_1.OperationId)('直播间商品销量排行查询'),
|
|
81
|
+
(0, tsoa_1.Post)('get-live-stream-product-top'),
|
|
82
|
+
__param(0, (0, tsoa_1.Body)())
|
|
83
|
+
], DataServiceClass.prototype, "getLiveStreamProductTop", null);
|
|
66
84
|
DataServiceClass = __decorate([
|
|
67
85
|
(0, tsoa_1.Route)('data'),
|
|
68
86
|
(0, tsoa_1.Tags)('Data')
|
package/modules/data/types.d.ts
CHANGED
|
@@ -67,6 +67,13 @@ export declare namespace DataService {
|
|
|
67
67
|
/** 直播间id */
|
|
68
68
|
liveStreamRoomId: string;
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* 直播间商品销量排行查询
|
|
72
|
+
*/
|
|
73
|
+
interface LiveStreamProductTop {
|
|
74
|
+
/** 直播间id */
|
|
75
|
+
liveStreamRoomId: string;
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
namespace Response {
|
|
72
79
|
/**
|
|
@@ -97,9 +104,18 @@ export declare namespace DataService {
|
|
|
97
104
|
list: Audience[];
|
|
98
105
|
total: number;
|
|
99
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* 直播间统计响应
|
|
109
|
+
*/
|
|
100
110
|
interface LiveStreamStatistics {
|
|
101
111
|
roomStatistics: RoomStatistics;
|
|
102
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* 直播间商品销量排行响应
|
|
115
|
+
*/
|
|
116
|
+
interface LiveStreamProductTop {
|
|
117
|
+
list: Product[];
|
|
118
|
+
}
|
|
103
119
|
}
|
|
104
120
|
interface BaseController {
|
|
105
121
|
userLiveStreamRelation(request: Request.UserLiveStreamRelation, req?: FastifyRequest): Promise<void>;
|
|
@@ -107,6 +123,8 @@ export declare namespace DataService {
|
|
|
107
123
|
userReport(request: Request.UserReport, req?: FastifyRequest): Promise<void>;
|
|
108
124
|
getUserLiveStreamInfo(request: Request.UserLiveStreamInfo, req?: FastifyRequest): Promise<Response.UserLiveStreamInfo>;
|
|
109
125
|
getAudienceList(request: Request.AudienceList, req?: FastifyRequest): Promise<Response.AudienceList>;
|
|
126
|
+
getLiveStreamStatistics(request: Request.LiveStreamStatistics, req?: FastifyRequest): Promise<Response.LiveStreamStatistics>;
|
|
127
|
+
getLiveStreamProductTop(request: Request.LiveStreamProductTop, req?: FastifyRequest): Promise<Response.LiveStreamProductTop>;
|
|
110
128
|
}
|
|
111
129
|
}
|
|
112
130
|
/**
|
|
@@ -144,17 +162,52 @@ export interface Audience {
|
|
|
144
162
|
* 直播间统计
|
|
145
163
|
*/
|
|
146
164
|
export interface RoomStatistics {
|
|
165
|
+
/** 直播间数据id */
|
|
147
166
|
id: number;
|
|
167
|
+
/** 直播间id */
|
|
148
168
|
liveStreamRoomId: string;
|
|
169
|
+
/** 交易总金额(待支付金额+实收金额、含退款金额) */
|
|
149
170
|
gmv: number;
|
|
171
|
+
/** 实收金额: 支付成功且未退款金额 */
|
|
150
172
|
actualReceivedAmount: number;
|
|
173
|
+
/** 客单价:交易总金额/下单人数 */
|
|
151
174
|
averageOrderAmount: string;
|
|
175
|
+
/** 成交订单数:支付成功订单数 */
|
|
152
176
|
transactOrderCount: number;
|
|
177
|
+
/** 下单人数去重 */
|
|
153
178
|
orderUserCount: number;
|
|
179
|
+
/** 成交转化率:支付成功人数/累计观看人数 */
|
|
154
180
|
orderConversionRate: string;
|
|
181
|
+
/** 退款金额 */
|
|
155
182
|
refundAmount: number;
|
|
183
|
+
/** 退款人数去重 */
|
|
156
184
|
refundUserCount: number;
|
|
185
|
+
/** 待支付金额 */
|
|
157
186
|
pendingPaymentAmount: number;
|
|
187
|
+
/** 商品销售量 */
|
|
158
188
|
salesVolume: number;
|
|
159
|
-
|
|
189
|
+
}
|
|
190
|
+
export interface Product {
|
|
191
|
+
/** 直播间id */
|
|
192
|
+
liveStreamRoomId: string;
|
|
193
|
+
/** 直播间id */
|
|
194
|
+
productId: string;
|
|
195
|
+
/** 商品名称 */
|
|
196
|
+
productName: string;
|
|
197
|
+
/** 商品图片 */
|
|
198
|
+
productImage: string;
|
|
199
|
+
/** 商品SKU ID */
|
|
200
|
+
skuId: string;
|
|
201
|
+
/** 商品SKU名称 */
|
|
202
|
+
attrs: Attr[];
|
|
203
|
+
/** 销售量 */
|
|
204
|
+
salesVolume: number;
|
|
205
|
+
/** 成交金额 */
|
|
206
|
+
paymentAmount: number;
|
|
207
|
+
}
|
|
208
|
+
export interface Attr {
|
|
209
|
+
/** 属性名称 */
|
|
210
|
+
attrName: string;
|
|
211
|
+
/** 属性值 */
|
|
212
|
+
attrValue: string;
|
|
160
213
|
}
|