@be-link/ecommerce-client-backend-service-node-sdk 0.0.9 → 0.0.11

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 = {}));
@@ -12,6 +12,10 @@ declare class RoomServiceClass extends BaseService implements RoomService.BaseCo
12
12
  roomStatus(request: RoomService.Request.RoomStatus): Promise<RoomService.Response.RoomStatus>;
13
13
  getBindStore(request: RoomService.Request.GetBindStore): Promise<RoomService.Response.GetBindStore>;
14
14
  bindStore(request: RoomService.Request.BindStore): Promise<void>;
15
+ /** 根据门店绑定关系查询直播间列表 */
16
+ listByStoreBind(request: RoomService.Request.ListByStoreBind): Promise<RoomService.Response.ListByStoreBind>;
17
+ /** 观看记录查询 */
18
+ viewRecord(request: RoomService.Request.ViewRecord): Promise<RoomService.Response.ViewRecord>;
15
19
  }
16
20
  export declare const roomService: RoomServiceClass;
17
21
  export default roomService;
@@ -48,6 +48,14 @@ let RoomServiceClass = class RoomServiceClass extends BaseService_1.default {
48
48
  bindStore(request) {
49
49
  return (0, http_1.callApi)(this.getApiUrl(this.bindStore), request);
50
50
  }
51
+ /** 根据门店绑定关系查询直播间列表 */
52
+ listByStoreBind(request) {
53
+ return (0, http_1.callApi)(this.getApiUrl(this.listByStoreBind), request);
54
+ }
55
+ /** 观看记录查询 */
56
+ viewRecord(request) {
57
+ return (0, http_1.callApi)(this.getApiUrl(this.viewRecord), request);
58
+ }
51
59
  };
52
60
  __decorate([
53
61
  (0, tsoa_1.OperationId)('同步活动'),
@@ -94,6 +102,16 @@ __decorate([
94
102
  (0, tsoa_1.Post)('bind-store'),
95
103
  __param(0, (0, tsoa_1.Body)())
96
104
  ], RoomServiceClass.prototype, "bindStore", null);
105
+ __decorate([
106
+ (0, tsoa_1.OperationId)('根据门店绑定关系查询直播间列表'),
107
+ (0, tsoa_1.Post)('list-by-store-bind'),
108
+ __param(0, (0, tsoa_1.Body)())
109
+ ], RoomServiceClass.prototype, "listByStoreBind", null);
110
+ __decorate([
111
+ (0, tsoa_1.OperationId)('观看记录查询'),
112
+ (0, tsoa_1.Post)('view-record'),
113
+ __param(0, (0, tsoa_1.Body)())
114
+ ], RoomServiceClass.prototype, "viewRecord", null);
97
115
  RoomServiceClass = __decorate([
98
116
  (0, tsoa_1.Route)('room'),
99
117
  (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
  /**
@@ -63,6 +63,26 @@ export declare namespace RoomService {
63
63
  /** 门店ID列表 */
64
64
  bind: string[];
65
65
  }
66
+ /**
67
+ * 根据门店绑定关系查询直播间列表
68
+ */
69
+ interface ListByStoreBind {
70
+ /** 门店ID */
71
+ storeId: string;
72
+ /** 页码,从0开始 */
73
+ pageIndex: number;
74
+ /** 每页数量,默认20,最大100 */
75
+ pageSize?: number;
76
+ }
77
+ interface ViewRecord {
78
+ id: string;
79
+ userId: string;
80
+ status?: ENUM.ROOM.STATUS;
81
+ startTime?: number;
82
+ endTime?: number;
83
+ pageIndex: number;
84
+ pageSize?: number;
85
+ }
66
86
  }
67
87
  namespace Response {
68
88
  /**
@@ -113,6 +133,20 @@ export declare namespace RoomService {
113
133
  /** 已绑定门店ID列表 */
114
134
  bind: string[];
115
135
  }
136
+ /**
137
+ * 根据门店绑定关系查询直播间列表响应
138
+ */
139
+ interface ListByStoreBind {
140
+ list: Room[];
141
+ total: number;
142
+ }
143
+ /**
144
+ * 观看记录响应
145
+ */
146
+ interface ViewRecord {
147
+ list: ViewRecordType[];
148
+ total: number;
149
+ }
116
150
  }
117
151
  interface BaseController {
118
152
  sync(request: ListActivityAPIRequest): Promise<ListActivityAPIResponse>;
@@ -124,5 +158,10 @@ export declare namespace RoomService {
124
158
  roomStatus(request: Request.RoomStatus, req?: FastifyRequest): Promise<Response.RoomStatus>;
125
159
  getBindStore(request: Request.GetBindStore, req?: FastifyRequest): Promise<Response.GetBindStore>;
126
160
  bindStore(request: Request.BindStore, req?: FastifyRequest): Promise<void>;
161
+ /**
162
+ * 根据门店绑定关系查询直播间列表
163
+ */
164
+ listByStoreBind(request: Request.ListByStoreBind, req?: FastifyRequest): Promise<Response.ListByStoreBind>;
165
+ viewRecord(request: Request.ViewRecord, req?: FastifyRequest): Promise<Response.ViewRecord>;
127
166
  }
128
167
  }
@@ -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.9",
3
+ "version": "0.0.11",
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
+ }