@be-link/pos-cli-nodejs 1.0.51-beta.1 → 1.0.51-beta.2
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/package.json +6 -4
- package/pos/modules/orderQuery/types.d.ts +1 -1
- package/pos/modules/orderQuery/user.d.ts +1 -1
- package/pos/modules/orderQuery/user.js +4 -2
- package/types.d.ts +36 -5
- package/utils/posProxy/comboInfoProxy.d.ts +19 -0
- package/utils/posProxy/comboInfoProxy.js +30 -0
- package/utils/posProxy/index.d.ts +5 -0
- package/utils/posProxy/index.js +40 -0
- package/utils/posProxy/itemInfoProxy.d.ts +129 -0
- package/utils/posProxy/itemInfoProxy.js +105 -0
- package/utils/posProxy/skuInfoProxy.d.ts +70 -0
- package/utils/posProxy/skuInfoProxy.js +83 -0
- package/utils/posProxy/venueInfoProxy.d.ts +22 -0
- package/utils/posProxy/venueInfoProxy.js +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/pos-cli-nodejs",
|
|
3
|
-
"version": "1.0.51-beta.
|
|
3
|
+
"version": "1.0.51-beta.2",
|
|
4
4
|
"description": "正向订单服务Nodejs客户端",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,13 +42,15 @@
|
|
|
42
42
|
"ts-node": "^10.9.2",
|
|
43
43
|
"typedoc": "0.25.2",
|
|
44
44
|
"typedoc-plugin-missing-exports": "2.1.0",
|
|
45
|
-
"typescript": "5.2.2"
|
|
45
|
+
"typescript": "5.2.2",
|
|
46
|
+
"@types/lodash": "4.14.202"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"axios": "0.27.2",
|
|
49
50
|
"axios-retry": "^4.0.0",
|
|
50
51
|
"uuid": "^9.0.1",
|
|
51
|
-
"vitality-meta": "1.0.
|
|
52
|
-
"@be-link/cs-cli-nodejs": "0.1.1"
|
|
52
|
+
"vitality-meta": "1.0.178",
|
|
53
|
+
"@be-link/cs-cli-nodejs": "0.1.1",
|
|
54
|
+
"lodash": "4.17.21"
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -911,7 +911,7 @@ export declare namespace Service {
|
|
|
911
911
|
* 根据订单id查询订单
|
|
912
912
|
* @path /query/user/get-order-by-id
|
|
913
913
|
*/
|
|
914
|
-
getOrderById<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Request.getOrderById<K>): Promise<DTO.
|
|
914
|
+
getOrderById<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Request.getOrderById<K>): Promise<DTO.QueryDataResProxy<K>>;
|
|
915
915
|
/**
|
|
916
916
|
* 根据订单id列表查询订单
|
|
917
917
|
* @path /query/user/query-order-by-id-list
|
|
@@ -7,7 +7,7 @@ declare class QueryByUserService extends BaseService implements Service.QueryByU
|
|
|
7
7
|
listOrderInvoice(request: Service.Request.getOrderInvoiceRequest): Promise<DTO.IPositiveOrderInvoice[]>;
|
|
8
8
|
getOrderInvoiceByOrderId(request: any): Promise<DTO.IPositiveOrderInvoice>;
|
|
9
9
|
getOrderInvoiceByInvoiceId(request: any): Promise<DTO.IPositiveOrderInvoice>;
|
|
10
|
-
getOrderById<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.getOrderById<K>): Promise<DTO.
|
|
10
|
+
getOrderById<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.getOrderById<K>): Promise<DTO.QueryDataResProxy<K>>;
|
|
11
11
|
queryOrderByIdList<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryOrderByIdList<K>): Promise<DTO.QueryDataRes<K>[]>;
|
|
12
12
|
queryUserOrder<K extends (keyof DTO.QueryDataBlockTypeMap)[]>(request: Service.Request.queryUserOrder<K>): Promise<DTO.QueryDataRes<K>[]>;
|
|
13
13
|
getUserOrderCount(request: Service.Request.getUserOrderCount): Promise<number>;
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const service_1 = __importDefault(require("../service"));
|
|
7
7
|
const http_1 = require("../../http");
|
|
8
|
+
const posProxy_1 = __importDefault(require("../../../utils/posProxy"));
|
|
8
9
|
class QueryByUserService extends service_1.default {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -22,8 +23,9 @@ class QueryByUserService extends service_1.default {
|
|
|
22
23
|
getOrderInvoiceByInvoiceId(request) {
|
|
23
24
|
return (0, http_1.callApi)(this.getApiUrl(this.getOrderInvoiceByInvoiceId), request);
|
|
24
25
|
}
|
|
25
|
-
getOrderById(request) {
|
|
26
|
-
|
|
26
|
+
async getOrderById(request) {
|
|
27
|
+
const result = await (0, http_1.callApi)(this.getApiUrl(this.getOrderById), request);
|
|
28
|
+
return posProxy_1.default.createProxy(result);
|
|
27
29
|
}
|
|
28
30
|
queryOrderByIdList(request) {
|
|
29
31
|
return (0, http_1.callApi)(this.getApiUrl(this.queryOrderByIdList), request);
|
package/types.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import * as commodityConstants from 'vitality-meta/enums/commodity';
|
|
|
3
3
|
import * as CSDto from '@be-link/cs-cli-nodejs/types';
|
|
4
4
|
import * as ServiceVenueDto from '@be-link/cs-cli-nodejs/cs/modules/serviceVenue/types';
|
|
5
5
|
import { CommonSaleStatus } from 'vitality-meta/enums/commodity';
|
|
6
|
+
import { ItemInfoProxy } from './utils/posProxy/itemInfoProxy';
|
|
7
|
+
import { SkuInfoProxy } from './utils/posProxy/skuInfoProxy';
|
|
8
|
+
import { VenueInfoProxy } from './utils/posProxy/venueInfoProxy';
|
|
9
|
+
import { ComboInfoProxy } from './utils/posProxy/comboInfoProxy';
|
|
6
10
|
/**
|
|
7
11
|
* 订单正向结构
|
|
8
12
|
*/
|
|
@@ -951,7 +955,7 @@ export interface IRawOrderStructure {
|
|
|
951
955
|
skuInfoList?: (IPositiveSkuInfoV2 | IPositiveShuttleBusSkuInfo)[];
|
|
952
956
|
comboInfoList?: IPositiveOrderComboInfo[];
|
|
953
957
|
roomInfoList?: IPositiveRoomInfo[];
|
|
954
|
-
venueInfo?: IPositiveVenueInfo;
|
|
958
|
+
venueInfo?: IPositiveVenueInfo[];
|
|
955
959
|
feeDetailInfoList?: IPositiveFeeDetailInfo[];
|
|
956
960
|
paymentInfo?: IPositivePaymentInfo[];
|
|
957
961
|
promotionInfo?: IPositivePromotionInfo[];
|
|
@@ -1093,9 +1097,9 @@ export interface QueryDataBlockTypeMap {
|
|
|
1093
1097
|
/** 标记信息 */
|
|
1094
1098
|
attributes: IPositiveAttributes;
|
|
1095
1099
|
/** 商品快照信息 */
|
|
1096
|
-
itemInfo: (IPositiveItemInfo & {
|
|
1100
|
+
itemInfo: ((IPositiveItemInfo & {
|
|
1097
1101
|
storeInfo: IStore;
|
|
1098
|
-
})[];
|
|
1102
|
+
}) | IPositiveItemInfoV2)[];
|
|
1099
1103
|
/** sku快照信息 */
|
|
1100
1104
|
skuInfo: (IPositiveSkuInfo | IPositiveShuttleBusSkuInfo | IPositiveSkuInfoV2)[];
|
|
1101
1105
|
/** 套餐快照信息 */
|
|
@@ -1103,9 +1107,33 @@ export interface QueryDataBlockTypeMap {
|
|
|
1103
1107
|
/** 房型快照信息 */
|
|
1104
1108
|
roomInfo: IPositiveRoomInfo[];
|
|
1105
1109
|
/** 场所快照信息 */
|
|
1106
|
-
venueInfo: IPositiveVenueInfo;
|
|
1110
|
+
venueInfo: IPositiveVenueInfo[];
|
|
1111
|
+
/** 费用明细信息 */
|
|
1112
|
+
feeDetailInfo: IPositiveFeeDetailInfo[];
|
|
1113
|
+
/** 支付信息 */
|
|
1114
|
+
paymentInfo: IPositivePaymentInfo[];
|
|
1115
|
+
/** 营销信息 */
|
|
1116
|
+
promotionInfo: IPositivePromotionInfo[];
|
|
1117
|
+
}
|
|
1118
|
+
export interface QueryDataBlockTypeProxyMap {
|
|
1119
|
+
/** 订单Id */
|
|
1120
|
+
_id: string;
|
|
1121
|
+
/** 主要信息 */
|
|
1122
|
+
basicInfo: IPositiveOrder;
|
|
1123
|
+
/** 标记信息 */
|
|
1124
|
+
attributes: IPositiveAttributes;
|
|
1125
|
+
/** 商品快照信息 */
|
|
1126
|
+
itemInfo: ItemInfoProxy[];
|
|
1127
|
+
/** sku快照信息 */
|
|
1128
|
+
skuInfo: SkuInfoProxy[];
|
|
1129
|
+
/** 套餐快照信息 */
|
|
1130
|
+
comboInfo: ComboInfoProxy[];
|
|
1131
|
+
/** 房型快照信息 */
|
|
1132
|
+
roomInfo: IPositiveRoomInfo[];
|
|
1133
|
+
/** 场所快照信息 */
|
|
1134
|
+
venueInfo: VenueInfoProxy[];
|
|
1107
1135
|
/** 费用明细信息 */
|
|
1108
|
-
|
|
1136
|
+
feeDetailInfo: IPositiveFeeDetailInfo[];
|
|
1109
1137
|
/** 支付信息 */
|
|
1110
1138
|
paymentInfo: IPositivePaymentInfo[];
|
|
1111
1139
|
/** 营销信息 */
|
|
@@ -1168,3 +1196,6 @@ export interface IPositiveOrderInvoice {
|
|
|
1168
1196
|
export type QueryDataRes<K extends (keyof QueryDataBlockTypeMap)[]> = {
|
|
1169
1197
|
[key in K[number]]: QueryDataBlockTypeMap[key];
|
|
1170
1198
|
};
|
|
1199
|
+
export type QueryDataResProxy<K extends (keyof QueryDataBlockTypeProxyMap)[]> = {
|
|
1200
|
+
[key in K[number]]?: QueryDataBlockTypeProxyMap[key];
|
|
1201
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PosDto } from '../..';
|
|
2
|
+
export declare abstract class ComboInfoProxy {
|
|
3
|
+
abstract get raw(): PosDto.IPositiveOrderComboInfo | PosDto.IPositiveSkuInfo;
|
|
4
|
+
abstract get name(): string | undefined;
|
|
5
|
+
}
|
|
6
|
+
declare class ComboInfoProxyV1 extends ComboInfoProxy {
|
|
7
|
+
private readonly orderComboInfo;
|
|
8
|
+
constructor(orderComboInfo: PosDto.IPositiveSkuInfo);
|
|
9
|
+
get raw(): PosDto.IPositiveSkuInfo;
|
|
10
|
+
get name(): string | undefined;
|
|
11
|
+
}
|
|
12
|
+
declare class ComboInfoProxyV2 extends ComboInfoProxy {
|
|
13
|
+
private readonly orderComboInfo;
|
|
14
|
+
constructor(orderComboInfo: PosDto.IPositiveOrderComboInfo);
|
|
15
|
+
get raw(): PosDto.IPositiveOrderComboInfo;
|
|
16
|
+
get name(): string;
|
|
17
|
+
}
|
|
18
|
+
export declare function createComboInfoProxy(orderComboInfo: PosDto.IPositiveOrderComboInfo | PosDto.IPositiveSkuInfo, version: 'V1' | 'V2'): ComboInfoProxyV1 | ComboInfoProxyV2;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createComboInfoProxy = exports.ComboInfoProxy = void 0;
|
|
4
|
+
class ComboInfoProxy {
|
|
5
|
+
}
|
|
6
|
+
exports.ComboInfoProxy = ComboInfoProxy;
|
|
7
|
+
class ComboInfoProxyV1 extends ComboInfoProxy {
|
|
8
|
+
constructor(orderComboInfo) {
|
|
9
|
+
super();
|
|
10
|
+
this.orderComboInfo = orderComboInfo;
|
|
11
|
+
}
|
|
12
|
+
// share
|
|
13
|
+
get raw() { return this.orderComboInfo; }
|
|
14
|
+
get name() { return this.orderComboInfo.combo; }
|
|
15
|
+
}
|
|
16
|
+
class ComboInfoProxyV2 extends ComboInfoProxy {
|
|
17
|
+
constructor(orderComboInfo) {
|
|
18
|
+
super();
|
|
19
|
+
this.orderComboInfo = orderComboInfo;
|
|
20
|
+
}
|
|
21
|
+
// share
|
|
22
|
+
get raw() { return this.orderComboInfo; }
|
|
23
|
+
get name() { return this.orderComboInfo.comboInfo.name; }
|
|
24
|
+
}
|
|
25
|
+
function createComboInfoProxy(orderComboInfo, version) {
|
|
26
|
+
if (version === 'V2')
|
|
27
|
+
return new ComboInfoProxyV2(orderComboInfo);
|
|
28
|
+
return new ComboInfoProxyV1(orderComboInfo);
|
|
29
|
+
}
|
|
30
|
+
exports.createComboInfoProxy = createComboInfoProxy;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pos_1 = require("vitality-meta/enums/pos");
|
|
4
|
+
const comboInfoProxy_1 = require("./comboInfoProxy");
|
|
5
|
+
const itemInfoProxy_1 = require("./itemInfoProxy");
|
|
6
|
+
const skuInfoProxy_1 = require("./skuInfoProxy");
|
|
7
|
+
const venueInfoProxy_1 = require("./venueInfoProxy");
|
|
8
|
+
class PosProxyFactory {
|
|
9
|
+
static createProxy(order) {
|
|
10
|
+
const version = order.attributes.isMigratedItemOrder ? 'V2' : 'V1';
|
|
11
|
+
let itemInfoProxy = undefined;
|
|
12
|
+
let skuInfoProxy = undefined;
|
|
13
|
+
let comboInfoProxy = undefined;
|
|
14
|
+
let venueInfoProxy = undefined;
|
|
15
|
+
if (order.itemInfo) {
|
|
16
|
+
itemInfoProxy = order.itemInfo.map(item => (0, itemInfoProxy_1.createItemInfoProxy)(item, version));
|
|
17
|
+
if (version === 'V1')
|
|
18
|
+
venueInfoProxy = order.itemInfo.map(item => (0, venueInfoProxy_1.createVenueInfoProxy)(item.storeInfo, version));
|
|
19
|
+
}
|
|
20
|
+
if (order.skuInfo) {
|
|
21
|
+
skuInfoProxy = order.skuInfo.map(sku => (0, skuInfoProxy_1.createSkuInfoProxy)(sku, version, sku.type));
|
|
22
|
+
if (version === 'V1')
|
|
23
|
+
comboInfoProxy = order.skuInfo.filter(sku => sku.type === pos_1.SkuTypeEnum.ITEM).map(sku => (0, comboInfoProxy_1.createComboInfoProxy)(sku, version));
|
|
24
|
+
}
|
|
25
|
+
if (order.comboInfo) {
|
|
26
|
+
comboInfoProxy = order.comboInfo.map(combo => (0, comboInfoProxy_1.createComboInfoProxy)(combo, version));
|
|
27
|
+
}
|
|
28
|
+
if (order.venueInfo) {
|
|
29
|
+
venueInfoProxy = order.venueInfo.map(venue => (0, venueInfoProxy_1.createVenueInfoProxy)(venue, version));
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...order,
|
|
33
|
+
itemInfo: itemInfoProxy,
|
|
34
|
+
skuInfo: skuInfoProxy,
|
|
35
|
+
comboInfo: comboInfoProxy,
|
|
36
|
+
venueInfo: venueInfoProxy,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = PosProxyFactory;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { PosDto } from '../..';
|
|
2
|
+
export declare abstract class ItemInfoProxy {
|
|
3
|
+
abstract get raw(): PosDto.IPositiveItemInfo | PosDto.IPositiveItemInfoV2;
|
|
4
|
+
abstract get id(): string;
|
|
5
|
+
abstract get name(): string;
|
|
6
|
+
abstract get headPic(): string;
|
|
7
|
+
abstract get headPics(): string[];
|
|
8
|
+
abstract get invoiceBase(): string | undefined;
|
|
9
|
+
abstract get categoryOne(): string;
|
|
10
|
+
abstract get categoryTwo(): string;
|
|
11
|
+
abstract get isSelfLead(): number;
|
|
12
|
+
abstract get canUpdateMealInfo(): number | boolean;
|
|
13
|
+
abstract get storeId(): string | undefined;
|
|
14
|
+
abstract get venueId(): string | undefined;
|
|
15
|
+
abstract get contractType(): string | undefined;
|
|
16
|
+
abstract get cooperator(): string | undefined;
|
|
17
|
+
abstract get tourWholesaler(): string | undefined;
|
|
18
|
+
abstract get domesticTourOperator(): string | undefined;
|
|
19
|
+
abstract get tourPrincipal(): string | undefined | null;
|
|
20
|
+
abstract get periodStartTime(): number | undefined;
|
|
21
|
+
abstract get periodEndTime(): number | undefined;
|
|
22
|
+
abstract get voucherInfo(): Record<string, any> | undefined;
|
|
23
|
+
abstract get hotelSupplier(): string | undefined;
|
|
24
|
+
abstract get farmHouseSupplier(): string | undefined;
|
|
25
|
+
abstract get bookingDays(): number | undefined;
|
|
26
|
+
abstract get shuttleBusAdjustmentInfo(): PosDto.IPositiveItemInfo['shuttleBusAdjustmentInfo'];
|
|
27
|
+
abstract get shuttleBusSupplierIds(): string[] | undefined;
|
|
28
|
+
abstract get belinkOwner(): string | undefined;
|
|
29
|
+
abstract get shuttleBusSettlementPrice(): number | undefined;
|
|
30
|
+
abstract get minMarketPrice(): number | undefined;
|
|
31
|
+
abstract get minPrice(): number | undefined;
|
|
32
|
+
abstract get basicInfo(): PosDto.IPositiveItemInfoV2['basicInfo'] | undefined;
|
|
33
|
+
abstract get attributes(): PosDto.IPositiveItemInfoV2['attributes'] | undefined;
|
|
34
|
+
abstract get hotelItemInfo(): PosDto.IPositiveItemInfoV2['hotelItemInfo'] | undefined;
|
|
35
|
+
abstract get creditInfo(): PosDto.IPositiveItemInfoV2['creditInfo'] | undefined;
|
|
36
|
+
}
|
|
37
|
+
declare class ItemInfoProxyV1 extends ItemInfoProxy {
|
|
38
|
+
private readonly itemInfo;
|
|
39
|
+
constructor(itemInfo: PosDto.IPositiveItemInfo);
|
|
40
|
+
get raw(): PosDto.IPositiveItemInfo;
|
|
41
|
+
get id(): string;
|
|
42
|
+
get name(): string;
|
|
43
|
+
get headPic(): string;
|
|
44
|
+
get headPics(): string[];
|
|
45
|
+
get invoiceBase(): any;
|
|
46
|
+
get categoryOne(): string;
|
|
47
|
+
get categoryTwo(): string;
|
|
48
|
+
get isSelfLead(): number;
|
|
49
|
+
get canUpdateMealInfo(): number | boolean;
|
|
50
|
+
get storeId(): string | undefined;
|
|
51
|
+
get venueId(): string | undefined;
|
|
52
|
+
get contractType(): import("vitality-meta/enums/commodity").TourContractTypeEnum;
|
|
53
|
+
get cooperator(): string;
|
|
54
|
+
get tourWholesaler(): any;
|
|
55
|
+
get domesticTourOperator(): string;
|
|
56
|
+
get tourPrincipal(): string | null;
|
|
57
|
+
get tourBeginPlace(): string;
|
|
58
|
+
get tourDays(): number;
|
|
59
|
+
get periodStartTime(): number | undefined;
|
|
60
|
+
get periodEndTime(): number | undefined;
|
|
61
|
+
get voucherInfo(): {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
} | undefined;
|
|
64
|
+
get hotelSupplier(): string | undefined;
|
|
65
|
+
get farmHouseSupplier(): string | undefined;
|
|
66
|
+
get bookingDays(): number | undefined;
|
|
67
|
+
get shuttleBusAdjustmentInfo(): {
|
|
68
|
+
master: {
|
|
69
|
+
_id: string;
|
|
70
|
+
salePrice: number;
|
|
71
|
+
settlementPrice: number;
|
|
72
|
+
};
|
|
73
|
+
slave: {
|
|
74
|
+
_id: string;
|
|
75
|
+
salePrice: number;
|
|
76
|
+
settlementPrice: number;
|
|
77
|
+
};
|
|
78
|
+
} | undefined;
|
|
79
|
+
get shuttleBusSupplierIds(): string[];
|
|
80
|
+
get belinkOwner(): string | undefined;
|
|
81
|
+
get shuttleBusSettlementPrice(): number;
|
|
82
|
+
get minMarketPrice(): number;
|
|
83
|
+
get minPrice(): number;
|
|
84
|
+
get basicInfo(): undefined;
|
|
85
|
+
get attributes(): undefined;
|
|
86
|
+
get hotelItemInfo(): undefined;
|
|
87
|
+
get creditInfo(): undefined;
|
|
88
|
+
}
|
|
89
|
+
declare class ItemInfoProxyV2 extends ItemInfoProxy {
|
|
90
|
+
private readonly itemInfo;
|
|
91
|
+
constructor(itemInfo: PosDto.IPositiveItemInfoV2);
|
|
92
|
+
get raw(): PosDto.IPositiveItemInfoV2;
|
|
93
|
+
get id(): string;
|
|
94
|
+
get name(): string;
|
|
95
|
+
get headPic(): string;
|
|
96
|
+
get headPics(): string[];
|
|
97
|
+
get invoiceBase(): string;
|
|
98
|
+
get categoryOne(): string;
|
|
99
|
+
get categoryTwo(): string;
|
|
100
|
+
get isSelfLead(): number;
|
|
101
|
+
get canUpdateMealInfo(): number;
|
|
102
|
+
get storeId(): string;
|
|
103
|
+
get venueId(): string;
|
|
104
|
+
get contractType(): undefined;
|
|
105
|
+
get cooperator(): undefined;
|
|
106
|
+
get tourWholesaler(): undefined;
|
|
107
|
+
get domesticTourOperator(): undefined;
|
|
108
|
+
get tourPrincipal(): undefined;
|
|
109
|
+
get tourBeginPlace(): undefined;
|
|
110
|
+
get tourDays(): undefined;
|
|
111
|
+
get periodStartTime(): undefined;
|
|
112
|
+
get periodEndTime(): undefined;
|
|
113
|
+
get voucherInfo(): undefined;
|
|
114
|
+
get hotelSupplier(): undefined;
|
|
115
|
+
get farmHouseSupplier(): undefined;
|
|
116
|
+
get bookingDays(): undefined;
|
|
117
|
+
get shuttleBusAdjustmentInfo(): undefined;
|
|
118
|
+
get shuttleBusSupplierIds(): undefined;
|
|
119
|
+
get belinkOwner(): undefined;
|
|
120
|
+
get shuttleBusSettlementPrice(): undefined;
|
|
121
|
+
get minMarketPrice(): undefined;
|
|
122
|
+
get minPrice(): undefined;
|
|
123
|
+
get basicInfo(): import("@be-link/cs-cli-nodejs/types").IItemBasicInfo;
|
|
124
|
+
get attributes(): import("@be-link/cs-cli-nodejs/types").IItemAttributes;
|
|
125
|
+
get hotelItemInfo(): import("@be-link/cs-cli-nodejs/types").IHotelItemInfo | undefined;
|
|
126
|
+
get creditInfo(): PosDto.CreditInfo;
|
|
127
|
+
}
|
|
128
|
+
export declare function createItemInfoProxy<T extends 'V1' | 'V2'>(itemInfo: T extends 'V1' ? PosDto.IPositiveItemInfo : PosDto.IPositiveItemInfoV2, version: T): ItemInfoProxyV1 | ItemInfoProxyV2;
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createItemInfoProxy = exports.ItemInfoProxy = void 0;
|
|
4
|
+
class ItemInfoProxy {
|
|
5
|
+
}
|
|
6
|
+
exports.ItemInfoProxy = ItemInfoProxy;
|
|
7
|
+
class ItemInfoProxyV1 extends ItemInfoProxy {
|
|
8
|
+
constructor(itemInfo) {
|
|
9
|
+
super();
|
|
10
|
+
this.itemInfo = itemInfo;
|
|
11
|
+
}
|
|
12
|
+
// share
|
|
13
|
+
get raw() { return this.itemInfo; }
|
|
14
|
+
get id() { return this.itemInfo._id; }
|
|
15
|
+
get name() { return this.itemInfo.name; }
|
|
16
|
+
get headPic() { return this.itemInfo.headPics[0]; }
|
|
17
|
+
get headPics() { return this.itemInfo.headPics; }
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
get invoiceBase() { return this.itemInfo.invoiceBase; }
|
|
20
|
+
get categoryOne() { return this.itemInfo.categoryOne; }
|
|
21
|
+
get categoryTwo() { return this.itemInfo.categoryTwo; }
|
|
22
|
+
get isSelfLead() { return this.itemInfo.isSelfLead; }
|
|
23
|
+
get canUpdateMealInfo() { return this.itemInfo.canUpdateMealInfo; }
|
|
24
|
+
get storeId() { return this.itemInfo.storeId; }
|
|
25
|
+
get venueId() { return this.itemInfo.storeId; }
|
|
26
|
+
// 旅游,待定
|
|
27
|
+
get contractType() { return this.itemInfo.contractType; }
|
|
28
|
+
get cooperator() { return this.itemInfo.cooperator; }
|
|
29
|
+
get tourWholesaler() { return this.itemInfo.tourWholesaler; }
|
|
30
|
+
get domesticTourOperator() { return this.itemInfo.domesticTourOperator; }
|
|
31
|
+
get tourPrincipal() { return this.itemInfo.tourPrincipal; }
|
|
32
|
+
get tourBeginPlace() { return this.itemInfo.tourBeginPlace; }
|
|
33
|
+
get tourDays() { return this.itemInfo.tourDays; }
|
|
34
|
+
// 虚拟商品,待定
|
|
35
|
+
get periodStartTime() { return this.itemInfo.periodStartTime; }
|
|
36
|
+
get periodEndTime() { return this.itemInfo.periodEndTime; }
|
|
37
|
+
get voucherInfo() { return this.itemInfo.voucherInfo; }
|
|
38
|
+
// uniq V1
|
|
39
|
+
get hotelSupplier() { return this.itemInfo.hotelSupplier; }
|
|
40
|
+
get farmHouseSupplier() { return this.itemInfo.farmHouseSupplier; }
|
|
41
|
+
get bookingDays() { return this.itemInfo.bookingDays; }
|
|
42
|
+
get shuttleBusAdjustmentInfo() { return this.itemInfo.shuttleBusAdjustmentInfo; }
|
|
43
|
+
get shuttleBusSupplierIds() { return this.itemInfo.shuttleBusSupplierIds; }
|
|
44
|
+
get belinkOwner() { return this.itemInfo.belinkOwner; }
|
|
45
|
+
get shuttleBusSettlementPrice() { return this.itemInfo.shuttleBusSettlementPrice; }
|
|
46
|
+
get minMarketPrice() { return this.itemInfo.minMarketPrice; }
|
|
47
|
+
get minPrice() { return this.itemInfo.minPrice; }
|
|
48
|
+
// uniq V2
|
|
49
|
+
get basicInfo() { return undefined; }
|
|
50
|
+
get attributes() { return undefined; }
|
|
51
|
+
get hotelItemInfo() { return undefined; }
|
|
52
|
+
get creditInfo() { return undefined; }
|
|
53
|
+
}
|
|
54
|
+
class ItemInfoProxyV2 extends ItemInfoProxy {
|
|
55
|
+
constructor(itemInfo) {
|
|
56
|
+
super();
|
|
57
|
+
this.itemInfo = itemInfo;
|
|
58
|
+
}
|
|
59
|
+
// share
|
|
60
|
+
get raw() { return this.itemInfo; }
|
|
61
|
+
get id() { return this.itemInfo._id; }
|
|
62
|
+
get name() { return this.itemInfo.name; }
|
|
63
|
+
get headPic() { return this.itemInfo.basicInfo.headPics[0]; }
|
|
64
|
+
get headPics() { return this.itemInfo.basicInfo.headPics; }
|
|
65
|
+
get invoiceBase() { return this.itemInfo.basicInfo.invoiceInfo.party; }
|
|
66
|
+
get categoryOne() { return this.itemInfo.basicInfo.categoryOne; }
|
|
67
|
+
get categoryTwo() { return this.itemInfo.basicInfo.categoryTwo; }
|
|
68
|
+
get isSelfLead() { return this.itemInfo.attributes.isSelfLead; }
|
|
69
|
+
get canUpdateMealInfo() { return this.itemInfo.attributes.canModifyMeal; }
|
|
70
|
+
get storeId() { return this.itemInfo.basicInfo.venueId; }
|
|
71
|
+
get venueId() { return this.itemInfo.basicInfo.venueId; }
|
|
72
|
+
// 旅游,待定
|
|
73
|
+
get contractType() { return undefined; }
|
|
74
|
+
get cooperator() { return undefined; }
|
|
75
|
+
get tourWholesaler() { return undefined; }
|
|
76
|
+
get domesticTourOperator() { return undefined; }
|
|
77
|
+
get tourPrincipal() { return undefined; }
|
|
78
|
+
get tourBeginPlace() { return undefined; }
|
|
79
|
+
get tourDays() { return undefined; }
|
|
80
|
+
// 虚拟商品,待定
|
|
81
|
+
get periodStartTime() { return undefined; }
|
|
82
|
+
get periodEndTime() { return undefined; }
|
|
83
|
+
get voucherInfo() { return undefined; }
|
|
84
|
+
// uniq V1
|
|
85
|
+
get hotelSupplier() { return undefined; }
|
|
86
|
+
get farmHouseSupplier() { return undefined; }
|
|
87
|
+
get bookingDays() { return undefined; }
|
|
88
|
+
get shuttleBusAdjustmentInfo() { return undefined; }
|
|
89
|
+
get shuttleBusSupplierIds() { return undefined; }
|
|
90
|
+
get belinkOwner() { return undefined; }
|
|
91
|
+
get shuttleBusSettlementPrice() { return undefined; }
|
|
92
|
+
get minMarketPrice() { return undefined; }
|
|
93
|
+
get minPrice() { return undefined; }
|
|
94
|
+
// uniq V2
|
|
95
|
+
get basicInfo() { return this.itemInfo.basicInfo; }
|
|
96
|
+
get attributes() { return this.itemInfo.attributes; }
|
|
97
|
+
get hotelItemInfo() { return this.itemInfo.hotelItemInfo; }
|
|
98
|
+
get creditInfo() { return this.itemInfo.creditInfo; }
|
|
99
|
+
}
|
|
100
|
+
function createItemInfoProxy(itemInfo, version) {
|
|
101
|
+
if (version === 'V2')
|
|
102
|
+
return new ItemInfoProxyV2(itemInfo);
|
|
103
|
+
return new ItemInfoProxyV1(itemInfo);
|
|
104
|
+
}
|
|
105
|
+
exports.createItemInfoProxy = createItemInfoProxy;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { SkuTypeEnum } from 'vitality-meta/enums/pos';
|
|
2
|
+
import { PosDto } from '../..';
|
|
3
|
+
export declare abstract class SkuInfoProxy {
|
|
4
|
+
abstract get raw(): PosDto.IPositiveSkuInfoV2 | PosDto.IPositiveShuttleBusSkuInfo | PosDto.IPositiveSkuInfo;
|
|
5
|
+
abstract get id(): string | undefined;
|
|
6
|
+
abstract get salePrice(): number;
|
|
7
|
+
abstract get memberPrice(): number | undefined;
|
|
8
|
+
abstract get memberPriceLimitTimes(): number | undefined;
|
|
9
|
+
abstract get settlementPrice(): number;
|
|
10
|
+
abstract get quantity(): number;
|
|
11
|
+
abstract get remainingQuantity(): number;
|
|
12
|
+
abstract get applicablePeople(): string | undefined;
|
|
13
|
+
abstract get singleRoomPrice(): number | undefined;
|
|
14
|
+
abstract get singleRoomSettlementPrice(): number | undefined;
|
|
15
|
+
}
|
|
16
|
+
declare class SkuInfoProxyV1 extends SkuInfoProxy {
|
|
17
|
+
private readonly orderSkuInfo;
|
|
18
|
+
constructor(orderSkuInfo: PosDto.IPositiveSkuInfo);
|
|
19
|
+
get raw(): PosDto.IPositiveSkuInfo;
|
|
20
|
+
get id(): string;
|
|
21
|
+
get categoryOne(): string;
|
|
22
|
+
get categoryTwo(): string;
|
|
23
|
+
get salePrice(): number;
|
|
24
|
+
get memberPrice(): number | undefined;
|
|
25
|
+
get memberPriceLimitTimes(): number | undefined;
|
|
26
|
+
get settlementPrice(): number;
|
|
27
|
+
get quantity(): number;
|
|
28
|
+
get remainingQuantity(): number;
|
|
29
|
+
get departureDate(): number;
|
|
30
|
+
get costDays(): number | undefined;
|
|
31
|
+
get applicablePeople(): import("vitality-meta/enums/pos").ApplicablePeopleEnum;
|
|
32
|
+
get singleRoomPrice(): undefined;
|
|
33
|
+
get singleRoomSettlementPrice(): undefined;
|
|
34
|
+
}
|
|
35
|
+
declare class SkuInfoProxyV2 extends SkuInfoProxy {
|
|
36
|
+
private readonly orderSkuInfo;
|
|
37
|
+
constructor(orderSkuInfo: PosDto.IPositiveSkuInfoV2);
|
|
38
|
+
get raw(): PosDto.IPositiveSkuInfoV2;
|
|
39
|
+
get id(): string;
|
|
40
|
+
get categoryOne(): string;
|
|
41
|
+
get categoryTwo(): string;
|
|
42
|
+
get salePrice(): number;
|
|
43
|
+
get memberPrice(): number;
|
|
44
|
+
get memberPriceLimitTimes(): number;
|
|
45
|
+
get settlementPrice(): number;
|
|
46
|
+
get quantity(): number;
|
|
47
|
+
get remainingQuantity(): number;
|
|
48
|
+
get applicablePeople(): undefined;
|
|
49
|
+
get singleRoomPrice(): number;
|
|
50
|
+
get singleRoomSettlementPrice(): number;
|
|
51
|
+
}
|
|
52
|
+
declare class ShuttleBusSkuInfoProxyV2 extends SkuInfoProxy {
|
|
53
|
+
private readonly orderSkuInfo;
|
|
54
|
+
constructor(orderSkuInfo: PosDto.IPositiveShuttleBusSkuInfo);
|
|
55
|
+
get raw(): PosDto.IPositiveShuttleBusSkuInfo;
|
|
56
|
+
get id(): undefined;
|
|
57
|
+
get categoryOne(): undefined;
|
|
58
|
+
get categoryTwo(): undefined;
|
|
59
|
+
get salePrice(): number;
|
|
60
|
+
get memberPrice(): undefined;
|
|
61
|
+
get memberPriceLimitTimes(): undefined;
|
|
62
|
+
get settlementPrice(): number;
|
|
63
|
+
get quantity(): number;
|
|
64
|
+
get remainingQuantity(): number;
|
|
65
|
+
get applicablePeople(): undefined;
|
|
66
|
+
get singleRoomPrice(): undefined;
|
|
67
|
+
get singleRoomSettlementPrice(): undefined;
|
|
68
|
+
}
|
|
69
|
+
export declare function createSkuInfoProxy(orderSkuInfo: PosDto.IPositiveSkuInfo | PosDto.IPositiveSkuInfoV2 | PosDto.IPositiveShuttleBusSkuInfo, version: 'V1' | 'V2', type: SkuTypeEnum): SkuInfoProxyV1 | SkuInfoProxyV2 | ShuttleBusSkuInfoProxyV2;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSkuInfoProxy = exports.SkuInfoProxy = void 0;
|
|
4
|
+
const pos_1 = require("vitality-meta/enums/pos");
|
|
5
|
+
class SkuInfoProxy {
|
|
6
|
+
}
|
|
7
|
+
exports.SkuInfoProxy = SkuInfoProxy;
|
|
8
|
+
class SkuInfoProxyV1 extends SkuInfoProxy {
|
|
9
|
+
constructor(orderSkuInfo) {
|
|
10
|
+
super();
|
|
11
|
+
this.orderSkuInfo = orderSkuInfo;
|
|
12
|
+
}
|
|
13
|
+
// share
|
|
14
|
+
get raw() { return this.orderSkuInfo; }
|
|
15
|
+
get id() { return this.orderSkuInfo._id; }
|
|
16
|
+
get categoryOne() { return this.orderSkuInfo.categoryOne; }
|
|
17
|
+
get categoryTwo() { return this.orderSkuInfo.categoryTwo; }
|
|
18
|
+
get salePrice() { return this.orderSkuInfo.salePrice; }
|
|
19
|
+
get memberPrice() { return this.orderSkuInfo.memberPrice; }
|
|
20
|
+
get memberPriceLimitTimes() { return this.orderSkuInfo.memberPriceLimitTimes; }
|
|
21
|
+
get settlementPrice() { return this.orderSkuInfo.settlementPrice; }
|
|
22
|
+
get quantity() { return this.orderSkuInfo.quantity; }
|
|
23
|
+
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
24
|
+
get departureDate() { return this.orderSkuInfo.departureDate; }
|
|
25
|
+
get costDays() { return this.orderSkuInfo.costDays; }
|
|
26
|
+
// uniq V1
|
|
27
|
+
get applicablePeople() { return this.orderSkuInfo.applicablePeople; }
|
|
28
|
+
// uniq V2
|
|
29
|
+
get singleRoomPrice() { return undefined; }
|
|
30
|
+
get singleRoomSettlementPrice() { return undefined; }
|
|
31
|
+
}
|
|
32
|
+
class SkuInfoProxyV2 extends SkuInfoProxy {
|
|
33
|
+
constructor(orderSkuInfo) {
|
|
34
|
+
super();
|
|
35
|
+
this.orderSkuInfo = orderSkuInfo;
|
|
36
|
+
}
|
|
37
|
+
// share
|
|
38
|
+
get raw() { return this.orderSkuInfo; }
|
|
39
|
+
get id() { return this.orderSkuInfo._id; }
|
|
40
|
+
get categoryOne() { return this.orderSkuInfo.categoryOne; }
|
|
41
|
+
get categoryTwo() { return this.orderSkuInfo.categoryTwo; }
|
|
42
|
+
get salePrice() { return this.orderSkuInfo.salePrice; }
|
|
43
|
+
get memberPrice() { return this.orderSkuInfo.memberPrice; }
|
|
44
|
+
get memberPriceLimitTimes() { return this.orderSkuInfo.memberPriceLimitCnt; }
|
|
45
|
+
get settlementPrice() { return this.orderSkuInfo.settlementPrice; }
|
|
46
|
+
get quantity() { return this.orderSkuInfo.quantity; }
|
|
47
|
+
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
48
|
+
// uniq V1
|
|
49
|
+
get applicablePeople() { return undefined; }
|
|
50
|
+
// uniq item V2
|
|
51
|
+
get singleRoomPrice() { return this.orderSkuInfo.singleRoomPrice; }
|
|
52
|
+
get singleRoomSettlementPrice() { return this.orderSkuInfo.singleRoomSettlementPrice; }
|
|
53
|
+
}
|
|
54
|
+
class ShuttleBusSkuInfoProxyV2 extends SkuInfoProxy {
|
|
55
|
+
constructor(orderSkuInfo) {
|
|
56
|
+
super();
|
|
57
|
+
this.orderSkuInfo = orderSkuInfo;
|
|
58
|
+
}
|
|
59
|
+
// share
|
|
60
|
+
get raw() { return this.orderSkuInfo; }
|
|
61
|
+
get id() { return undefined; }
|
|
62
|
+
get categoryOne() { return undefined; }
|
|
63
|
+
get categoryTwo() { return undefined; }
|
|
64
|
+
get salePrice() { return this.orderSkuInfo.relationInfo.salePrice; }
|
|
65
|
+
get memberPrice() { return undefined; }
|
|
66
|
+
get memberPriceLimitTimes() { return undefined; }
|
|
67
|
+
get settlementPrice() { return this.orderSkuInfo.relationInfo.settlementPrice; }
|
|
68
|
+
get quantity() { return this.orderSkuInfo.quantity; }
|
|
69
|
+
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
70
|
+
// uniq V1
|
|
71
|
+
get applicablePeople() { return undefined; }
|
|
72
|
+
// uniq V2
|
|
73
|
+
get singleRoomPrice() { return undefined; }
|
|
74
|
+
get singleRoomSettlementPrice() { return undefined; }
|
|
75
|
+
}
|
|
76
|
+
function createSkuInfoProxy(orderSkuInfo, version, type) {
|
|
77
|
+
if (version === 'V1')
|
|
78
|
+
return new SkuInfoProxyV1(orderSkuInfo);
|
|
79
|
+
if (type === pos_1.SkuTypeEnum.ITEM)
|
|
80
|
+
return new SkuInfoProxyV2(orderSkuInfo);
|
|
81
|
+
return new ShuttleBusSkuInfoProxyV2(orderSkuInfo);
|
|
82
|
+
}
|
|
83
|
+
exports.createSkuInfoProxy = createSkuInfoProxy;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PosDto } from '../..';
|
|
2
|
+
export declare abstract class VenueInfoProxy {
|
|
3
|
+
abstract get raw(): PosDto.IStore | PosDto.IPositiveVenueInfo;
|
|
4
|
+
abstract get id(): string;
|
|
5
|
+
abstract get name(): string;
|
|
6
|
+
}
|
|
7
|
+
declare class VenueInfoProxyV1 extends VenueInfoProxy {
|
|
8
|
+
private readonly orderVenueInfo;
|
|
9
|
+
constructor(orderVenueInfo: PosDto.IStore);
|
|
10
|
+
get raw(): PosDto.IStore;
|
|
11
|
+
get id(): string;
|
|
12
|
+
get name(): string;
|
|
13
|
+
}
|
|
14
|
+
declare class VenueInfoProxyV2 extends VenueInfoProxy {
|
|
15
|
+
private readonly orderVenueInfo;
|
|
16
|
+
constructor(orderVenueInfo: PosDto.IPositiveVenueInfo);
|
|
17
|
+
get raw(): PosDto.IPositiveVenueInfo;
|
|
18
|
+
get id(): string;
|
|
19
|
+
get name(): string;
|
|
20
|
+
}
|
|
21
|
+
export declare function createVenueInfoProxy(orderVenueInfo: PosDto.IStore | PosDto.IPositiveVenueInfo, version: 'V1' | 'V2'): VenueInfoProxyV1 | VenueInfoProxyV2;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createVenueInfoProxy = exports.VenueInfoProxy = void 0;
|
|
4
|
+
class VenueInfoProxy {
|
|
5
|
+
}
|
|
6
|
+
exports.VenueInfoProxy = VenueInfoProxy;
|
|
7
|
+
class VenueInfoProxyV1 extends VenueInfoProxy {
|
|
8
|
+
constructor(orderVenueInfo) {
|
|
9
|
+
super();
|
|
10
|
+
this.orderVenueInfo = orderVenueInfo;
|
|
11
|
+
}
|
|
12
|
+
get raw() { return this.orderVenueInfo; }
|
|
13
|
+
get id() { return this.orderVenueInfo._id; }
|
|
14
|
+
get name() { return this.orderVenueInfo.name; }
|
|
15
|
+
}
|
|
16
|
+
class VenueInfoProxyV2 extends VenueInfoProxy {
|
|
17
|
+
constructor(orderVenueInfo) {
|
|
18
|
+
super();
|
|
19
|
+
this.orderVenueInfo = orderVenueInfo;
|
|
20
|
+
}
|
|
21
|
+
get raw() { return this.orderVenueInfo; }
|
|
22
|
+
get id() { return this.orderVenueInfo.id; }
|
|
23
|
+
get name() { return this.orderVenueInfo.venueInfo.name; }
|
|
24
|
+
}
|
|
25
|
+
function createVenueInfoProxy(orderVenueInfo, version) {
|
|
26
|
+
if (version === 'V2')
|
|
27
|
+
return new VenueInfoProxyV2(orderVenueInfo);
|
|
28
|
+
return new VenueInfoProxyV1(orderVenueInfo);
|
|
29
|
+
}
|
|
30
|
+
exports.createVenueInfoProxy = createVenueInfoProxy;
|