@be-link/cs-cli-nodejs 0.0.29 → 0.0.31
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/cs/modules/itemDiscountActivity/service.d.ts +11 -0
- package/cs/modules/itemDiscountActivity/service.js +28 -0
- package/cs/modules/itemDiscountActivity/service.js.map +1 -0
- package/cs/modules/itemDiscountActivity/types.d.ts +45 -0
- package/cs/modules/itemDiscountActivity/types.js +3 -0
- package/cs/modules/itemDiscountActivity/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BaseService from '../baseService';
|
|
2
|
+
import { ItemDiscountActivityNamespace } from './types';
|
|
3
|
+
declare class ItemDiscountActivityService extends BaseService implements ItemDiscountActivityNamespace.Controller {
|
|
4
|
+
prefixUrl: string;
|
|
5
|
+
get(request: ItemDiscountActivityNamespace.Request.IGet): Promise<ItemDiscountActivityNamespace.Response.IGet>;
|
|
6
|
+
create(request: ItemDiscountActivityNamespace.Request.ICreate): Promise<void>;
|
|
7
|
+
update(request: ItemDiscountActivityNamespace.Request.IUpdate): Promise<void>;
|
|
8
|
+
delete(request: ItemDiscountActivityNamespace.Request.IDelete): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
declare const itemDiscountActivityService: ItemDiscountActivityService;
|
|
11
|
+
export default itemDiscountActivityService;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 ItemDiscountActivityService extends baseService_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.prefixUrl = '/item-discount-activity';
|
|
12
|
+
}
|
|
13
|
+
get(request) {
|
|
14
|
+
return (0, http_1.callApi)(this.getApiUrl(this.get), request);
|
|
15
|
+
}
|
|
16
|
+
create(request) {
|
|
17
|
+
return (0, http_1.callApi)(this.getApiUrl(this.create), request);
|
|
18
|
+
}
|
|
19
|
+
update(request) {
|
|
20
|
+
return (0, http_1.callApi)(this.getApiUrl(this.update), request);
|
|
21
|
+
}
|
|
22
|
+
delete(request) {
|
|
23
|
+
return (0, http_1.callApi)(this.getApiUrl(this.delete), request);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const itemDiscountActivityService = new ItemDiscountActivityService();
|
|
27
|
+
exports.default = itemDiscountActivityService;
|
|
28
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/cs/modules/itemDiscountActivity/service.ts"],"names":[],"mappings":";;;;;AAAA,qCAAoC;AACpC,iEAAwC;AAGxC,MAAM,2BACJ,SAAQ,qBAAW;IADrB;;QAIE,cAAS,GAAG,yBAAyB,CAAA;IA+BvC,CAAC;IA7BC,GAAG,CACD,OAAmD;QAEnD,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EACxB,OAAO,CACR,CAAA;IACH,CAAC;IAED,MAAM,CAAC,OAAsD;QAC3D,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAC3B,OAAO,CACR,CAAA;IACH,CAAC;IAED,MAAM,CAAC,OAAsD;QAC3D,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAC3B,OAAO,CACR,CAAA;IACH,CAAC;IAED,MAAM,CAAC,OAAsD;QAC3D,OAAO,IAAA,cAAO,EACZ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAC3B,OAAO,CACR,CAAA;IACH,CAAC;CACF;AAED,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,EAAE,CAAA;AAErE,kBAAe,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CommonStatus, ItemDiscountActivityDiscountType } from 'vitality-meta/enums/commodity';
|
|
2
|
+
export declare namespace ItemDiscountActivityNamespace {
|
|
3
|
+
namespace Request {
|
|
4
|
+
interface IGet {
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
interface ICreate {
|
|
8
|
+
itemId: string;
|
|
9
|
+
comboId: string;
|
|
10
|
+
type: ItemDiscountActivityDiscountType;
|
|
11
|
+
nightNum: number;
|
|
12
|
+
discountType: string;
|
|
13
|
+
discountSalePrice: number;
|
|
14
|
+
discountSettlementPrice: number;
|
|
15
|
+
}
|
|
16
|
+
type IUpdate = {
|
|
17
|
+
id: string;
|
|
18
|
+
nightNum?: number;
|
|
19
|
+
discountSalePrice?: number;
|
|
20
|
+
discountSettlementPrice?: number;
|
|
21
|
+
};
|
|
22
|
+
interface IDelete {
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
namespace Response {
|
|
27
|
+
interface IGet {
|
|
28
|
+
id: string;
|
|
29
|
+
status: CommonStatus;
|
|
30
|
+
itemId: string;
|
|
31
|
+
comboId: string;
|
|
32
|
+
type: ItemDiscountActivityDiscountType;
|
|
33
|
+
nightNum: number;
|
|
34
|
+
discountType: string;
|
|
35
|
+
discountSalePrice: number;
|
|
36
|
+
discountSettlementPrice: number;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
interface Controller {
|
|
40
|
+
get(request: Request.IGet): Promise<Response.IGet>;
|
|
41
|
+
create(request: Request.ICreate): Promise<void>;
|
|
42
|
+
update(request: Request.IUpdate): Promise<void>;
|
|
43
|
+
delete(request: Request.IDelete): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cs/modules/itemDiscountActivity/types.ts"],"names":[],"mappings":""}
|