@be-link/ecommerce-trade-service-node-sdk 0.1.77 → 0.1.78
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 +1 -0
- package/index.js +2 -1
- package/modules/statistics/index.d.ts +2 -0
- package/modules/statistics/index.js +5 -0
- package/modules/statistics/service.d.ts +10 -0
- package/modules/statistics/service.js +48 -0
- package/modules/statistics/types.d.ts +128 -0
- package/modules/statistics/types.js +2 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.verificationService = exports.DTO = exports.CONSTS = exports.EXCHANGE_ENUM = exports.ENUM_CN = exports.ENUM = exports.ROS = exports.POS = void 0;
|
|
36
|
+
exports.verificationService = exports.DTO = exports.CONSTS = exports.EXCHANGE_ENUM = exports.ENUM_CN = exports.ENUM = exports.STATISTICS = exports.ROS = exports.POS = void 0;
|
|
37
37
|
exports.POS = __importStar(require("./modules/pos"));
|
|
38
38
|
exports.ROS = __importStar(require("./modules/ros"));
|
|
39
|
+
exports.STATISTICS = __importStar(require("./modules/statistics"));
|
|
39
40
|
var enums_1 = require("./enums");
|
|
40
41
|
Object.defineProperty(exports, "ENUM", { enumerable: true, get: function () { return enums_1.ENUM; } });
|
|
41
42
|
Object.defineProperty(exports, "ENUM_CN", { enumerable: true, get: function () { return enums_1.ENUM_CN; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statisticsService = void 0;
|
|
4
|
+
var service_1 = require("./service");
|
|
5
|
+
Object.defineProperty(exports, "statisticsService", { enumerable: true, get: function () { return service_1.statisticsService; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StatisticsService } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class StatisticsServiceImpl extends BaseService implements StatisticsService.ByPos.QueryController, StatisticsService.ByRos.QueryController, StatisticsService.ByUs.QueryController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
forwardStatistics(request: StatisticsService.ByPos.Request.IForwardStatistics, req?: any): Promise<StatisticsService.ByPos.Response.IForwardStatistics>;
|
|
6
|
+
reverseStatistics(request: StatisticsService.ByRos.Request.IReverseStatistics, req?: any): Promise<StatisticsService.ByRos.Response.IReverseStatistics>;
|
|
7
|
+
orderUserStatistics(request: StatisticsService.ByUs.Request.IOrderUserStatistics, req?: any): Promise<StatisticsService.ByUs.Response.IOrderUserStatistics>;
|
|
8
|
+
}
|
|
9
|
+
export declare const statisticsService: StatisticsServiceImpl;
|
|
10
|
+
export default statisticsService;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.statisticsService = void 0;
|
|
13
|
+
const tsoa_1 = require("tsoa");
|
|
14
|
+
const http_1 = require("../../utils/http");
|
|
15
|
+
const BaseService_1 = __importDefault(require("../BaseService"));
|
|
16
|
+
let StatisticsServiceImpl = class StatisticsServiceImpl extends BaseService_1.default {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.prefixUrl = '/statistics';
|
|
20
|
+
}
|
|
21
|
+
forwardStatistics(request, req) {
|
|
22
|
+
return (0, http_1.callApi)(this.getApiUrl(this.forwardStatistics), request);
|
|
23
|
+
}
|
|
24
|
+
reverseStatistics(request, req) {
|
|
25
|
+
return (0, http_1.callApi)(this.getApiUrl(this.reverseStatistics), request);
|
|
26
|
+
}
|
|
27
|
+
orderUserStatistics(request, req) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.orderUserStatistics), request);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, tsoa_1.OperationId)('正向统计接口'),
|
|
33
|
+
(0, tsoa_1.Post)('forward-statistics')
|
|
34
|
+
], StatisticsServiceImpl.prototype, "forwardStatistics", null);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, tsoa_1.OperationId)('逆向统计接口'),
|
|
37
|
+
(0, tsoa_1.Post)('reverse-statistics')
|
|
38
|
+
], StatisticsServiceImpl.prototype, "reverseStatistics", null);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, tsoa_1.OperationId)('下单人统计接口'),
|
|
41
|
+
(0, tsoa_1.Post)('order-user-statistics')
|
|
42
|
+
], StatisticsServiceImpl.prototype, "orderUserStatistics", null);
|
|
43
|
+
StatisticsServiceImpl = __decorate([
|
|
44
|
+
(0, tsoa_1.Route)('statistics'),
|
|
45
|
+
(0, tsoa_1.Tags)('Statistics')
|
|
46
|
+
], StatisticsServiceImpl);
|
|
47
|
+
exports.statisticsService = new StatisticsServiceImpl();
|
|
48
|
+
exports.default = exports.statisticsService;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare namespace StatisticsService {
|
|
2
|
+
namespace Dto {
|
|
3
|
+
interface IPagination {
|
|
4
|
+
/** 页码(从0开始) */
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
/** 每页数量 */
|
|
7
|
+
pageSize: number;
|
|
8
|
+
}
|
|
9
|
+
interface IStore {
|
|
10
|
+
/** 门店ID */
|
|
11
|
+
storeId?: string;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
namespace ByPos {
|
|
15
|
+
namespace Request {
|
|
16
|
+
interface IForwardStatistics {
|
|
17
|
+
/** 开始时间 */
|
|
18
|
+
startTime?: number;
|
|
19
|
+
/** 结束时间 */
|
|
20
|
+
endTime?: number;
|
|
21
|
+
/** 分页 */
|
|
22
|
+
pagination: Dto.IPagination;
|
|
23
|
+
/** 门店条件 */
|
|
24
|
+
store?: Dto.IStore;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
namespace Response {
|
|
28
|
+
interface IForwardStatisticsItem {
|
|
29
|
+
/** 门店ID */
|
|
30
|
+
storeId: string;
|
|
31
|
+
/** 总GMV - 销售日期内,门店客户支付成功的订单金额之和(包括退款订单) */
|
|
32
|
+
totalGMV: number;
|
|
33
|
+
/** 总订单量 - 销售日期内,门店客户支付成功的订单数(包括退款订单) */
|
|
34
|
+
totalOrderCount: number;
|
|
35
|
+
/** 下单人数 - 销售日期内,门店客户支付成功的人数(已做订单去重) */
|
|
36
|
+
orderUserCount: number;
|
|
37
|
+
/** 直播GMV - 销售日期内,门店客户支付成功且带直播间Id的订单金额之和(包括退款订单) */
|
|
38
|
+
liveGMV: number;
|
|
39
|
+
/** 私域GMV - 销售日期内,门店客户支付成功且无直播间Id的订单金额之和(包括退款订单) */
|
|
40
|
+
privateGMV: number;
|
|
41
|
+
/** 快递到家GMV - 销售日期内,门店客户支付成功且取货方式=快递到家的订单金额之和(包括退款订单) */
|
|
42
|
+
deliveryHomeGMV: number;
|
|
43
|
+
/** 门店自提GMV - 销售日期内,门店客户支付成功且取货方式=门店自提的订单金额之和(包括虚拟订单及退款订单) */
|
|
44
|
+
selfPickupGMV: number;
|
|
45
|
+
/** 快递到家订单数 - 销售日期内,门店客户支付成功且取货方式=快递到家的订单数(包括退款订单) */
|
|
46
|
+
deliveryHomeOrderCount: number;
|
|
47
|
+
/** 门店自提订单数 - 销售日期内,门店客户支付成功且取货方式=门店自提的订单数(包括虚拟订单及退款订单) */
|
|
48
|
+
selfPickupOrderCount: number;
|
|
49
|
+
/** 客单价 - 总GMV / 总订单量 */
|
|
50
|
+
customerPrice: number;
|
|
51
|
+
/** ARPU(人均支付金额) - 总GMV / 下单人数 */
|
|
52
|
+
arpu: number;
|
|
53
|
+
/** 会员用户数 - 销售日期内,门店客户支付成功且是会员的订单人数(已做订单去重) */
|
|
54
|
+
memberUserCount: number;
|
|
55
|
+
}
|
|
56
|
+
interface IForwardStatistics {
|
|
57
|
+
list: IForwardStatisticsItem[];
|
|
58
|
+
total: number;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
interface QueryController {
|
|
62
|
+
/** 正向统计接口 */
|
|
63
|
+
forwardStatistics(request: Request.IForwardStatistics, req: any): Promise<Response.IForwardStatistics>;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
namespace ByRos {
|
|
67
|
+
namespace Request {
|
|
68
|
+
interface IReverseStatistics {
|
|
69
|
+
/** 开始时间 */
|
|
70
|
+
startTime?: number;
|
|
71
|
+
/** 结束时间 */
|
|
72
|
+
endTime?: number;
|
|
73
|
+
/** 分页 */
|
|
74
|
+
pagination: Dto.IPagination;
|
|
75
|
+
/** 门店条件 */
|
|
76
|
+
store?: Dto.IStore;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
namespace Response {
|
|
80
|
+
interface IReverseStatisticsItem {
|
|
81
|
+
/** 门店ID */
|
|
82
|
+
storeId: string;
|
|
83
|
+
/** 退款GMV - 选定时间段内,门店客户退款成功的订单金额之和 */
|
|
84
|
+
refundGMV: number;
|
|
85
|
+
/** 退款订单数 - 选定时间段内,门店客户退款成功的订单数 */
|
|
86
|
+
refundOrderCount: number;
|
|
87
|
+
}
|
|
88
|
+
interface IReverseStatistics {
|
|
89
|
+
list: IReverseStatisticsItem[];
|
|
90
|
+
total: number;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
interface QueryController {
|
|
94
|
+
/** 逆向统计接口 */
|
|
95
|
+
reverseStatistics(request: Request.IReverseStatistics, req: any): Promise<Response.IReverseStatistics>;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
namespace ByUs {
|
|
99
|
+
namespace Request {
|
|
100
|
+
interface IOrderUserStatistics {
|
|
101
|
+
/** 开始时间 */
|
|
102
|
+
startTime?: number;
|
|
103
|
+
/** 结束时间 */
|
|
104
|
+
endTime?: number;
|
|
105
|
+
/** 分页 */
|
|
106
|
+
pagination: Dto.IPagination;
|
|
107
|
+
/** 门店条件 */
|
|
108
|
+
store?: Dto.IStore;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
namespace Response {
|
|
112
|
+
interface IOrderUserStatisticsItem {
|
|
113
|
+
/** 门店ID */
|
|
114
|
+
storeId: string;
|
|
115
|
+
/** 用户ID列表 */
|
|
116
|
+
userIds: string[];
|
|
117
|
+
}
|
|
118
|
+
interface IOrderUserStatistics {
|
|
119
|
+
list: IOrderUserStatisticsItem[];
|
|
120
|
+
total: number;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
interface QueryController {
|
|
124
|
+
/** 下单人统计接口 */
|
|
125
|
+
orderUserStatistics(request: Request.IOrderUserStatistics, req: any): Promise<Response.IOrderUserStatistics>;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|