@be-link/ecommerce-client-backend-service-node-sdk 0.0.12 → 0.0.14
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/enum.d.ts +11 -0
- package/enum.js +13 -0
- package/index.d.ts +1 -0
- package/modules/data/types.d.ts +42 -0
- package/modules/data/types.js +2 -0
- package/modules/room/service.d.ts +1 -1
- package/modules/room/types.d.ts +3 -3
- package/package.json +1 -1
package/enum.d.ts
CHANGED
package/enum.js
CHANGED
|
@@ -204,4 +204,17 @@ var ENUM;
|
|
|
204
204
|
ACTION[ACTION["DELETE"] = 2] = "DELETE";
|
|
205
205
|
})(ACTION = LIVE_STREAM_TYPE.ACTION || (LIVE_STREAM_TYPE.ACTION = {}));
|
|
206
206
|
})(LIVE_STREAM_TYPE = ENUM.LIVE_STREAM_TYPE || (ENUM.LIVE_STREAM_TYPE = {}));
|
|
207
|
+
let LIVE_STREAM_AUDIENCE;
|
|
208
|
+
(function (LIVE_STREAM_AUDIENCE) {
|
|
209
|
+
/**
|
|
210
|
+
* 观看类型
|
|
211
|
+
*/
|
|
212
|
+
let VIEW_TYPE;
|
|
213
|
+
(function (VIEW_TYPE) {
|
|
214
|
+
/** 观看直播 */
|
|
215
|
+
VIEW_TYPE[VIEW_TYPE["WatchLive"] = 0] = "WatchLive";
|
|
216
|
+
/** 观看回放 */
|
|
217
|
+
VIEW_TYPE[VIEW_TYPE["WatchReplay"] = 1] = "WatchReplay";
|
|
218
|
+
})(VIEW_TYPE = LIVE_STREAM_AUDIENCE.VIEW_TYPE || (LIVE_STREAM_AUDIENCE.VIEW_TYPE = {}));
|
|
219
|
+
})(LIVE_STREAM_AUDIENCE = ENUM.LIVE_STREAM_AUDIENCE || (ENUM.LIVE_STREAM_AUDIENCE = {}));
|
|
207
220
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { RoomService } from './modules/room/types';
|
|
2
|
+
export type { DataService } from './modules/data/types';
|
|
2
3
|
export { roomService } from './modules/room/service';
|
|
3
4
|
export { ENUM as CLIENT_BACKEND_ENUM } from './enum';
|
|
4
5
|
export type { Room, RoomAutoStartConfig, RoomLoopVideo, RoomTag, RoomBindStore } from './types';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ENUM } from '../../enum';
|
|
2
|
+
import { FastifyRequest } from 'fastify';
|
|
3
|
+
export declare namespace DataService {
|
|
4
|
+
namespace Request {
|
|
5
|
+
/**
|
|
6
|
+
* 从缓存中查询用户观看时长
|
|
7
|
+
*/
|
|
8
|
+
interface UserViewDuration {
|
|
9
|
+
/** 直播间id */
|
|
10
|
+
liveStreamRoomId: string;
|
|
11
|
+
/** 用户id */
|
|
12
|
+
userId: string;
|
|
13
|
+
/** 任务id */
|
|
14
|
+
taskId: string;
|
|
15
|
+
/** 查询类型 */
|
|
16
|
+
viewType: ENUM.LIVE_STREAM_AUDIENCE.VIEW_TYPE;
|
|
17
|
+
/** 是否需要总时长 */
|
|
18
|
+
needTotalDuration?: boolean;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
namespace Response {
|
|
22
|
+
/**
|
|
23
|
+
* 从缓存中查询用户观看时长响应
|
|
24
|
+
*/
|
|
25
|
+
interface UserViewDuration {
|
|
26
|
+
/** 直播间id */
|
|
27
|
+
liveStreamRoomId: string;
|
|
28
|
+
/** 用户id */
|
|
29
|
+
userId: string;
|
|
30
|
+
/** 查询类型 */
|
|
31
|
+
viewType: ENUM.LIVE_STREAM_AUDIENCE.VIEW_TYPE;
|
|
32
|
+
/** 观看时长,单位秒 */
|
|
33
|
+
duration: number;
|
|
34
|
+
/** 观看总时长,单位秒 */
|
|
35
|
+
totalDuration?: number;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
interface BaseController {
|
|
39
|
+
/** 从缓存中获取 */
|
|
40
|
+
getUserViewDuration(request: Request.UserViewDuration, req?: FastifyRequest): Promise<Response.UserViewDuration>;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -8,7 +8,7 @@ declare class RoomServiceClass extends BaseService implements RoomService.BaseCo
|
|
|
8
8
|
detail(request: RoomService.Request.Detail): Promise<RoomService.Response.Detail>;
|
|
9
9
|
share(request: RoomService.Request.Share): Promise<RoomService.Response.Share>;
|
|
10
10
|
uploadShareCover(request: RoomService.Request.UploadShareCover): Promise<RoomService.Response.UploadShareCover>;
|
|
11
|
-
getShareCover(request: RoomService.Request.
|
|
11
|
+
getShareCover(request: RoomService.Request.GetShareCover): Promise<RoomService.Response.GetShareCover>;
|
|
12
12
|
settle(request: RoomService.Request.settle): Promise<RoomService.Response.settle>;
|
|
13
13
|
roomStatus(request: RoomService.Request.RoomStatus): Promise<RoomService.Response.RoomStatus>;
|
|
14
14
|
getBindStore(request: RoomService.Request.GetBindStore): Promise<RoomService.Response.GetBindStore>;
|
package/modules/room/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare namespace RoomService {
|
|
|
31
31
|
/**
|
|
32
32
|
* 获取封面
|
|
33
33
|
*/
|
|
34
|
-
interface
|
|
34
|
+
interface GetShareCover {
|
|
35
35
|
/** 直播间id */
|
|
36
36
|
id: string;
|
|
37
37
|
}
|
|
@@ -122,7 +122,7 @@ export declare namespace RoomService {
|
|
|
122
122
|
/**
|
|
123
123
|
* 获取封面
|
|
124
124
|
*/
|
|
125
|
-
interface
|
|
125
|
+
interface GetShareCover {
|
|
126
126
|
/** 直播间id */
|
|
127
127
|
id: string;
|
|
128
128
|
/** 名称 */
|
|
@@ -173,7 +173,7 @@ export declare namespace RoomService {
|
|
|
173
173
|
list(request: Request.List, req?: FastifyRequest): Promise<Response.List>;
|
|
174
174
|
detail(request: Request.Detail, req?: FastifyRequest): Promise<Response.Detail>;
|
|
175
175
|
share(request: Request.Share, req?: FastifyRequest): Promise<Response.Share>;
|
|
176
|
-
getShareCover(request: Request.
|
|
176
|
+
getShareCover(request: Request.GetShareCover, req?: FastifyRequest): Promise<Response.GetShareCover>;
|
|
177
177
|
uploadShareCover(request: Request.UploadShareCover, req?: FastifyRequest): Promise<Response.UploadShareCover>;
|
|
178
178
|
settle(request: Request.settle, req?: FastifyRequest): Promise<Response.settle>;
|
|
179
179
|
roomStatus(request: Request.RoomStatus, req?: FastifyRequest): Promise<Response.RoomStatus>;
|