@be-link/cs-cli-nodejs 0.0.171 → 0.0.173

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.
@@ -0,0 +1,12 @@
1
+ import BaseService from '../baseService';
2
+ import { Facility } from './types';
3
+ declare class FacilityService extends BaseService implements Facility.Controller {
4
+ prefixUrl: string;
5
+ querySubCategoryList(): Promise<Facility.Response.QuerySubCategoryList>;
6
+ queryFacility(request: Facility.Request.QueryFacility): Promise<Facility.Response.QueryFacility>;
7
+ upsertFacility(request: Facility.Request.UpsertFacility): Promise<Facility.Response.UpsertFacility>;
8
+ queryRelatedFacilities(request: Facility.Request.QueryRelatedFacilities): Promise<Facility.Response.QueryRelatedFacilities>;
9
+ bindFacility(request: Facility.Request.BindFacility): Promise<void>;
10
+ }
11
+ declare const facilityService: FacilityService;
12
+ export default facilityService;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const http_1 = require("../../http");
7
+ const baseService_1 = __importDefault(require("../baseService"));
8
+ class FacilityService extends baseService_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.prefixUrl = '/facility';
12
+ }
13
+ querySubCategoryList() {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.querySubCategoryList));
15
+ }
16
+ queryFacility(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.queryFacility), request);
18
+ }
19
+ upsertFacility(request) {
20
+ return (0, http_1.callApi)(this.getApiUrl(this.upsertFacility), request);
21
+ }
22
+ queryRelatedFacilities(request) {
23
+ return (0, http_1.callApi)(this.getApiUrl(this.queryRelatedFacilities), request);
24
+ }
25
+ bindFacility(request) {
26
+ return (0, http_1.callApi)(this.getApiUrl(this.bindFacility), request);
27
+ }
28
+ }
29
+ const facilityService = new FacilityService();
30
+ exports.default = facilityService;
31
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/cs/modules/facility/service.ts"],"names":[],"mappings":";;;;;AAAA,qCAAoC;AACpC,iEAAwC;AAGxC,MAAM,eAAgB,SAAQ,qBAAW;IAAzC;;QACE,cAAS,GAAG,WAAW,CAAA;IAiCzB,CAAC;IAhCC,oBAAoB;QAClB,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAC1C,CAAA;IACH,CAAC;IAED,aAAa,CAAC,OAAuC;QACnD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAClC,OAAO,CACR,CAAA;IACH,CAAC;IAED,cAAc,CAAC,OAAwC;QACrD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,EACnC,OAAO,CACR,CAAA;IACH,CAAC;IAED,sBAAsB,CACpB,OAAgD;QAEhD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAC3C,OAAO,CACR,CAAA;IACH,CAAC;IAED,YAAY,CAAC,OAAsC;QACjD,OAAO,IAAA,cAAO,EAAsC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAA;IACjG,CAAC;CACF;AAED,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;AAE7C,kBAAe,eAAe,CAAA"}
@@ -0,0 +1,100 @@
1
+ import { CommonStatus, CommonSaleStatus } from 'vitality-meta/enums/commodity';
2
+ export declare enum FacilityCategory {
3
+ SERVICE_VENUE = "SERVICE_VENUE",
4
+ ROOM = "ROOM"
5
+ }
6
+ export declare namespace Facility {
7
+ namespace DTO {
8
+ interface FacilitySubCategory {
9
+ id: string;
10
+ name: string;
11
+ }
12
+ interface Facility {
13
+ id: string;
14
+ name: string;
15
+ status: CommonSaleStatus;
16
+ category: FacilityCategory;
17
+ subCategoryId: string;
18
+ icon: string;
19
+ enums: string[];
20
+ }
21
+ interface FacilityRelation {
22
+ id: string;
23
+ relateType: FacilityCategory;
24
+ relateId: string;
25
+ facilityId: string;
26
+ value: string;
27
+ pics: string[];
28
+ desc: string;
29
+ status: CommonStatus;
30
+ }
31
+ }
32
+ namespace Request {
33
+ interface QueryFacility {
34
+ name?: string;
35
+ category?: string;
36
+ pageIndex: number;
37
+ pageSize: number;
38
+ }
39
+ type UpsertFacility = Partial<DTO.Facility>;
40
+ interface QueryRelatedFacilities {
41
+ relateType?: FacilityCategory;
42
+ relateId: string;
43
+ }
44
+ interface BindFacility {
45
+ relateType: FacilityCategory;
46
+ relateId: string;
47
+ bindList: {
48
+ id: string;
49
+ value: string;
50
+ pics: string[];
51
+ desc: string;
52
+ }[];
53
+ unbindList: string[];
54
+ }
55
+ }
56
+ namespace Response {
57
+ interface QuerySubCategoryList {
58
+ data: DTO.FacilitySubCategory[];
59
+ total: number;
60
+ }
61
+ interface QueryFacility {
62
+ data: DTO.Facility & {
63
+ subCategoryName: string;
64
+ }[];
65
+ total: number;
66
+ }
67
+ interface UpsertFacility {
68
+ id: string;
69
+ }
70
+ interface QueryRelatedFacilities {
71
+ data: {
72
+ subCategoryId: string;
73
+ subCategoryName: string;
74
+ facilityList: {
75
+ id: string;
76
+ name: string;
77
+ category: FacilityCategory;
78
+ icon: string;
79
+ isRelated: boolean;
80
+ enums: string[];
81
+ chosenEnum?: string;
82
+ pics?: string[];
83
+ desc?: string;
84
+ }[];
85
+ }[];
86
+ }
87
+ }
88
+ interface Controller {
89
+ /** 查询子类目列表 */
90
+ querySubCategoryList(): Promise<Response.QuerySubCategoryList>;
91
+ /** 查询设施列表 */
92
+ queryFacility(request: Request.QueryFacility): Promise<Response.QueryFacility>;
93
+ /** 创建或更新设施 */
94
+ upsertFacility(request: Request.UpsertFacility): Promise<Response.UpsertFacility>;
95
+ /** 查询设施(返回已关联数据) */
96
+ queryRelatedFacilities(request: Request.QueryRelatedFacilities): Promise<Response.QueryRelatedFacilities>;
97
+ /** 绑定设施 */
98
+ bindFacility(request: Request.BindFacility): Promise<void>;
99
+ }
100
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FacilityCategory = void 0;
4
+ var FacilityCategory;
5
+ (function (FacilityCategory) {
6
+ FacilityCategory["SERVICE_VENUE"] = "SERVICE_VENUE";
7
+ FacilityCategory["ROOM"] = "ROOM";
8
+ })(FacilityCategory || (exports.FacilityCategory = FacilityCategory = {}));
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cs/modules/facility/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mDAA+B,CAAA;IAC/B,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/cs-cli-nodejs",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "description": "商品服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {