@be-link/ecommerce-client-backend-service-node-sdk 0.0.10 → 0.0.12

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 CHANGED
@@ -172,4 +172,13 @@ export declare namespace ENUM {
172
172
  TEXT = 2
173
173
  }
174
174
  }
175
+ namespace LIVE_STREAM_TYPE {
176
+ /**
177
+ * 操作类型
178
+ */
179
+ enum ACTION {
180
+ CREATE = 1,
181
+ DELETE = 2
182
+ }
183
+ }
175
184
  }
package/enum.js CHANGED
@@ -193,4 +193,15 @@ var ENUM;
193
193
  TYPE[TYPE["TEXT"] = 2] = "TEXT";
194
194
  })(TYPE = ROOM_TAG.TYPE || (ROOM_TAG.TYPE = {}));
195
195
  })(ROOM_TAG = ENUM.ROOM_TAG || (ENUM.ROOM_TAG = {}));
196
+ let LIVE_STREAM_TYPE;
197
+ (function (LIVE_STREAM_TYPE) {
198
+ /**
199
+ * 操作类型
200
+ */
201
+ let ACTION;
202
+ (function (ACTION) {
203
+ ACTION[ACTION["CREATE"] = 1] = "CREATE";
204
+ ACTION[ACTION["DELETE"] = 2] = "DELETE";
205
+ })(ACTION = LIVE_STREAM_TYPE.ACTION || (LIVE_STREAM_TYPE.ACTION = {}));
206
+ })(LIVE_STREAM_TYPE = ENUM.LIVE_STREAM_TYPE || (ENUM.LIVE_STREAM_TYPE = {}));
196
207
  })(ENUM || (exports.ENUM = ENUM = {}));
@@ -8,12 +8,15 @@ 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.getShareCover): Promise<RoomService.Response.getShareCover>;
11
12
  settle(request: RoomService.Request.settle): Promise<RoomService.Response.settle>;
12
13
  roomStatus(request: RoomService.Request.RoomStatus): Promise<RoomService.Response.RoomStatus>;
13
14
  getBindStore(request: RoomService.Request.GetBindStore): Promise<RoomService.Response.GetBindStore>;
14
15
  bindStore(request: RoomService.Request.BindStore): Promise<void>;
15
16
  /** 根据门店绑定关系查询直播间列表 */
16
17
  listByStoreBind(request: RoomService.Request.ListByStoreBind): Promise<RoomService.Response.ListByStoreBind>;
18
+ /** 观看记录查询 */
19
+ viewRecord(request: RoomService.Request.ViewRecord): Promise<RoomService.Response.ViewRecord>;
17
20
  }
18
21
  export declare const roomService: RoomServiceClass;
19
22
  export default roomService;
@@ -36,6 +36,9 @@ let RoomServiceClass = class RoomServiceClass extends BaseService_1.default {
36
36
  uploadShareCover(request) {
37
37
  return (0, http_1.callApi)(this.getApiUrl(this.uploadShareCover), request);
38
38
  }
39
+ getShareCover(request) {
40
+ return (0, http_1.callApi)(this.getApiUrl(this.getShareCover), request);
41
+ }
39
42
  settle(request) {
40
43
  return (0, http_1.callApi)(this.getApiUrl(this.settle), request);
41
44
  }
@@ -52,6 +55,10 @@ let RoomServiceClass = class RoomServiceClass extends BaseService_1.default {
52
55
  listByStoreBind(request) {
53
56
  return (0, http_1.callApi)(this.getApiUrl(this.listByStoreBind), request);
54
57
  }
58
+ /** 观看记录查询 */
59
+ viewRecord(request) {
60
+ return (0, http_1.callApi)(this.getApiUrl(this.viewRecord), request);
61
+ }
55
62
  };
56
63
  __decorate([
57
64
  (0, tsoa_1.OperationId)('同步活动'),
@@ -78,6 +85,11 @@ __decorate([
78
85
  (0, tsoa_1.Post)('upload-share-cover'),
79
86
  __param(0, (0, tsoa_1.Body)())
80
87
  ], RoomServiceClass.prototype, "uploadShareCover", null);
88
+ __decorate([
89
+ (0, tsoa_1.OperationId)('获取封面'),
90
+ (0, tsoa_1.Post)('get-share-cover'),
91
+ __param(0, (0, tsoa_1.Body)())
92
+ ], RoomServiceClass.prototype, "getShareCover", null);
81
93
  __decorate([
82
94
  (0, tsoa_1.OperationId)('结算状态查询'),
83
95
  (0, tsoa_1.Post)('settle'),
@@ -103,6 +115,11 @@ __decorate([
103
115
  (0, tsoa_1.Post)('list-by-store-bind'),
104
116
  __param(0, (0, tsoa_1.Body)())
105
117
  ], RoomServiceClass.prototype, "listByStoreBind", null);
118
+ __decorate([
119
+ (0, tsoa_1.OperationId)('观看记录查询'),
120
+ (0, tsoa_1.Post)('view-record'),
121
+ __param(0, (0, tsoa_1.Body)())
122
+ ], RoomServiceClass.prototype, "viewRecord", null);
106
123
  RoomServiceClass = __decorate([
107
124
  (0, tsoa_1.Route)('room'),
108
125
  (0, tsoa_1.Tags)('Room')
@@ -1,7 +1,7 @@
1
1
  import { ListActivityAPIRequest, ListActivityAPIResponse } from '@be-link/ecommerce-volcengine-open-api-sdk';
2
2
  import { FastifyRequest } from 'fastify';
3
3
  import { ENUM } from '../../enum';
4
- import { Room } from '../../types';
4
+ import { Room, ViewRecord as ViewRecordType } from '../../types';
5
5
  export declare namespace RoomService {
6
6
  namespace Request {
7
7
  /**
@@ -28,6 +28,13 @@ export declare namespace RoomService {
28
28
  interface Share {
29
29
  id: string;
30
30
  }
31
+ /**
32
+ * 获取封面
33
+ */
34
+ interface getShareCover {
35
+ /** 直播间id */
36
+ id: string;
37
+ }
31
38
  /**
32
39
  * 上传分分享封面
33
40
  */
@@ -74,6 +81,15 @@ export declare namespace RoomService {
74
81
  /** 每页数量,默认20,最大100 */
75
82
  pageSize?: number;
76
83
  }
84
+ interface ViewRecord {
85
+ id: string;
86
+ userId: string;
87
+ status?: ENUM.ROOM.STATUS;
88
+ startTime?: number;
89
+ endTime?: number;
90
+ pageIndex: number;
91
+ pageSize?: number;
92
+ }
77
93
  }
78
94
  namespace Response {
79
95
  /**
@@ -103,6 +119,19 @@ export declare namespace RoomService {
103
119
  id: string;
104
120
  shareCover: string;
105
121
  }
122
+ /**
123
+ * 获取封面
124
+ */
125
+ interface getShareCover {
126
+ /** 直播间id */
127
+ id: string;
128
+ /** 名称 */
129
+ name: string;
130
+ /** 分享封面url */
131
+ shareCover: string;
132
+ /** 开始时间 */
133
+ liveTime: number;
134
+ }
106
135
  /**
107
136
  * 结算状态响应
108
137
  */
@@ -131,12 +160,20 @@ export declare namespace RoomService {
131
160
  list: Room[];
132
161
  total: number;
133
162
  }
163
+ /**
164
+ * 观看记录响应
165
+ */
166
+ interface ViewRecord {
167
+ list: ViewRecordType[];
168
+ total: number;
169
+ }
134
170
  }
135
171
  interface BaseController {
136
172
  sync(request: ListActivityAPIRequest): Promise<ListActivityAPIResponse>;
137
173
  list(request: Request.List, req?: FastifyRequest): Promise<Response.List>;
138
174
  detail(request: Request.Detail, req?: FastifyRequest): Promise<Response.Detail>;
139
175
  share(request: Request.Share, req?: FastifyRequest): Promise<Response.Share>;
176
+ getShareCover(request: Request.getShareCover, req?: FastifyRequest): Promise<Response.getShareCover>;
140
177
  uploadShareCover(request: Request.UploadShareCover, req?: FastifyRequest): Promise<Response.UploadShareCover>;
141
178
  settle(request: Request.settle, req?: FastifyRequest): Promise<Response.settle>;
142
179
  roomStatus(request: Request.RoomStatus, req?: FastifyRequest): Promise<Response.RoomStatus>;
@@ -146,5 +183,6 @@ export declare namespace RoomService {
146
183
  * 根据门店绑定关系查询直播间列表
147
184
  */
148
185
  listByStoreBind(request: Request.ListByStoreBind, req?: FastifyRequest): Promise<Response.ListByStoreBind>;
186
+ viewRecord(request: Request.ViewRecord, req?: FastifyRequest): Promise<Response.ViewRecord>;
149
187
  }
150
188
  }
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // const roomService = new RoomService()
4
- // export default roomService
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-client-backend-service-node-sdk",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "EcommerceClientBackendService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/types.d.ts CHANGED
@@ -34,6 +34,8 @@ export interface Room {
34
34
  liveMode: number;
35
35
  /** 观看地址中的 path 字段,不填则由系统自动生成。例如观看地址为 https://live.byteoc.com/5528/3085317,则 ViewUrlPath 取值为 3085317。长度为 1 到 20 个字符。支持以下字符:大写字母 A - Z、小写字母 a - z、数字 */
36
36
  viewUrlPath: string;
37
+ /** 观看 URL。 */
38
+ viewUrl: string;
37
39
  /** 横屏直播的封面图 URL。若通过控制台配置横屏直播封面图且配置成功,则封面图的 URL 无协议头。若通过调用 API 接口配置横屏直播封面图,则封面图的 URL 有协议头。 */
38
40
  coverImage: string;
39
41
  /** 分享封面,用于门店分享 */
@@ -141,3 +143,21 @@ export interface RoomBindStore {
141
143
  /** 直播间id,根据id是否为空字符串表示是否绑定了本店 */
142
144
  liveStreamRoomId: string;
143
145
  }
146
+ export interface ViewRecord {
147
+ id: string;
148
+ userId: string;
149
+ /** 直播间名称。长度为 1 到 150 个字符 */
150
+ name: string;
151
+ /** 直播开始时间,默认为当前时间。Unix 时间戳,单位为秒。支持精确到分钟级。开始时间取值需小于 EndTime 的取值,且与 EndTime 的差值最大为 259,200,即 72 小时 */
152
+ liveTime: number;
153
+ /** 直播结束时间。Unix 时间戳,单位为秒。支持精确到分钟级。结束时间取值需大于当前时间和 LiveTime 的取值,且与 LiveTime 的差值最大为 259,200,即 72 小时 */
154
+ endTime: number;
155
+ /** 1:直播中;2:预告;3:回放;4:已结束 */
156
+ status: number;
157
+ /** 横屏直播的封面图 URL。若通过控制台配置横屏直播封面图且配置成功,则封面图的 URL 无协议头。若通过调用 API 接口配置横屏直播封面图,则封面图的 URL 有协议头。 */
158
+ coverImage: string;
159
+ /** 竖屏直播的封面图 URL。若未设置该参数值,则默认读取 CoverImage 的值。若通过控制台配置竖屏直播封面图且配置成功,则封面图的 URL 无协议头。若通过调用 API 接口配置竖屏直播封面图,则封面图的 URL 有协议头。 */
160
+ verticalCoverImage: string;
161
+ /** 观看 URL。 */
162
+ viewUrl: string;
163
+ }