@be-link/ecommerce-client-backend-service-node-sdk 0.0.14 → 0.0.16

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,6 @@
1
1
  export type { RoomService } from './modules/room/types';
2
2
  export type { DataService } from './modules/data/types';
3
3
  export { roomService } from './modules/room/service';
4
+ export { dataService } from './modules/data/service';
4
5
  export { ENUM as CLIENT_BACKEND_ENUM } from './enum';
5
6
  export type { Room, RoomAutoStartConfig, RoomLoopVideo, RoomTag, RoomBindStore } from './types';
package/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CLIENT_BACKEND_ENUM = exports.roomService = void 0;
3
+ exports.CLIENT_BACKEND_ENUM = exports.dataService = exports.roomService = void 0;
4
4
  var service_1 = require("./modules/room/service");
5
5
  Object.defineProperty(exports, "roomService", { enumerable: true, get: function () { return service_1.roomService; } });
6
+ var service_2 = require("./modules/data/service");
7
+ Object.defineProperty(exports, "dataService", { enumerable: true, get: function () { return service_2.dataService; } });
6
8
  var enum_1 = require("./enum");
7
9
  Object.defineProperty(exports, "CLIENT_BACKEND_ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
8
10
  // 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
@@ -0,0 +1,8 @@
1
+ import { DataService } from './types';
2
+ import BaseService from '../BaseService';
3
+ declare class DataServiceClass extends BaseService implements DataService.BaseController {
4
+ protected prefixUrl: string;
5
+ getUserViewDuration(request: DataService.Request.UserViewDuration): Promise<DataService.Response.UserViewDuration>;
6
+ }
7
+ export declare const dataService: DataServiceClass;
8
+ export default dataService;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.dataService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../BaseService"));
19
+ let DataServiceClass = class DataServiceClass extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/data';
23
+ }
24
+ getUserViewDuration(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.getUserViewDuration), request);
26
+ }
27
+ };
28
+ __decorate([
29
+ (0, tsoa_1.OperationId)('获取用户观看时长'),
30
+ (0, tsoa_1.Post)('get-user-view-duration'),
31
+ __param(0, (0, tsoa_1.Body)())
32
+ ], DataServiceClass.prototype, "getUserViewDuration", null);
33
+ DataServiceClass = __decorate([
34
+ (0, tsoa_1.Route)('data'),
35
+ (0, tsoa_1.Tags)('Data')
36
+ ], DataServiceClass);
37
+ exports.dataService = new DataServiceClass();
38
+ exports.default = exports.dataService;
@@ -3,7 +3,7 @@ import { FastifyRequest } from 'fastify';
3
3
  export declare namespace DataService {
4
4
  namespace Request {
5
5
  /**
6
- * 从缓存中查询用户观看时长
6
+ * 查询用户观看时长
7
7
  */
8
8
  interface UserViewDuration {
9
9
  /** 直播间id */
@@ -20,7 +20,7 @@ export declare namespace DataService {
20
20
  }
21
21
  namespace Response {
22
22
  /**
23
- * 从缓存中查询用户观看时长响应
23
+ * 查询用户观看时长响应
24
24
  */
25
25
  interface UserViewDuration {
26
26
  /** 直播间id */
@@ -36,7 +36,6 @@ export declare namespace DataService {
36
36
  }
37
37
  }
38
38
  interface BaseController {
39
- /** 从缓存中获取 */
40
39
  getUserViewDuration(request: Request.UserViewDuration, req?: FastifyRequest): Promise<Response.UserViewDuration>;
41
40
  }
42
41
  }
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.14",
3
+ "version": "0.0.16",
4
4
  "description": "EcommerceClientBackendService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",