@be-link/pos-cli-nodejs 1.0.218 → 1.0.219

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
@@ -19,9 +19,10 @@ import { SkuInfoProxy } from './utils/posProxy/skuInfoProxy';
19
19
  import { VenueInfoProxy } from './utils/posProxy/venueInfoProxy';
20
20
  import orderTouristMaterialService from './pos/modules/orderTourMaterial/service';
21
21
  import orderAbnormalFollowService from './pos/modules/orderAbnormalFollow/service';
22
+ import tongchengService from './pos/modules/tongcheng/service';
22
23
  export {
23
24
  /** 业务模块 */
24
- orderCoreService, orderFulfillService, queryByCommodityService, queryByStoreService, queryByUserService, queryByWebService, queryBySupplierService, queryByPandoraService, orderNoteService, orderJobService, dataMigrateService, orderTouristMaterialService, orderAbnormalFollowService,
25
+ orderCoreService, orderFulfillService, queryByCommodityService, queryByStoreService, queryByUserService, queryByWebService, queryBySupplierService, queryByPandoraService, orderNoteService, orderJobService, dataMigrateService, orderTouristMaterialService, orderAbnormalFollowService, tongchengService,
25
26
  /** 枚举类 */
26
27
  PosConstants, PosDto,
27
28
  /** 错误类 */
package/index.js CHANGED
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.VenueInfoProxy = exports.ComboInfoProxy = exports.SkuInfoProxy = exports.ItemInfoProxy = exports.PosProxyFactory = exports.BizError = exports.PosDto = exports.PosConstants = exports.orderAbnormalFollowService = exports.orderTouristMaterialService = exports.dataMigrateService = exports.orderJobService = exports.orderNoteService = exports.queryByPandoraService = exports.queryBySupplierService = exports.queryByWebService = exports.queryByUserService = exports.queryByStoreService = exports.queryByCommodityService = exports.orderFulfillService = exports.orderCoreService = void 0;
29
+ exports.VenueInfoProxy = exports.ComboInfoProxy = exports.SkuInfoProxy = exports.ItemInfoProxy = exports.PosProxyFactory = exports.BizError = exports.PosDto = exports.PosConstants = exports.tongchengService = exports.orderAbnormalFollowService = exports.orderTouristMaterialService = exports.dataMigrateService = exports.orderJobService = exports.orderNoteService = exports.queryByPandoraService = exports.queryBySupplierService = exports.queryByWebService = exports.queryByUserService = exports.queryByStoreService = exports.queryByCommodityService = exports.orderFulfillService = exports.orderCoreService = void 0;
30
30
  const PosConstants = __importStar(require("vitality-meta/enums/pos"));
31
31
  exports.PosConstants = PosConstants;
32
32
  const PosDto = __importStar(require("./types"));
@@ -69,3 +69,5 @@ const service_6 = __importDefault(require("./pos/modules/orderTourMaterial/servi
69
69
  exports.orderTouristMaterialService = service_6.default;
70
70
  const service_7 = __importDefault(require("./pos/modules/orderAbnormalFollow/service"));
71
71
  exports.orderAbnormalFollowService = service_7.default;
72
+ const service_8 = __importDefault(require("./pos/modules/tongcheng/service"));
73
+ exports.tongchengService = service_8.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "1.0.218",
3
+ "version": "1.0.219",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -0,0 +1,11 @@
1
+ import BaseService from '../service';
2
+ import { Service } from './types';
3
+ declare class TongchengService extends BaseService implements Service.TongchengController {
4
+ protected prefixUrl: string;
5
+ searchBindingOrders(request: Service.Request.SearchBindingOrders): Promise<Service.Response.SearchBindingOrders>;
6
+ getBindingOrderDetail(request: Service.Request.GetBindingOrderDetail): Promise<Service.Response.GetBindingOrderDetail>;
7
+ getPositiveOrderRelation(request: Service.Request.GetPositiveOrderRelation): Promise<Service.Response.GetPositiveOrderRelation>;
8
+ confirmBindOrder(request: Service.Request.ConfirmBindOrder): Promise<Service.Response.ConfirmBindOrder>;
9
+ }
10
+ declare const tongchengService: TongchengService;
11
+ export default tongchengService;
@@ -0,0 +1,27 @@
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 service_1 = __importDefault(require("../service"));
8
+ class TongchengService extends service_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.prefixUrl = '/tongcheng';
12
+ }
13
+ searchBindingOrders(request) {
14
+ return (0, http_1.callApi)(this.getApiUrl(this.searchBindingOrders), request);
15
+ }
16
+ getBindingOrderDetail(request) {
17
+ return (0, http_1.callApi)(this.getApiUrl(this.getBindingOrderDetail), request);
18
+ }
19
+ getPositiveOrderRelation(request) {
20
+ return (0, http_1.callApi)(this.getApiUrl(this.getPositiveOrderRelation), request);
21
+ }
22
+ confirmBindOrder(request) {
23
+ return (0, http_1.callApi)(this.getApiUrl(this.confirmBindOrder), request);
24
+ }
25
+ }
26
+ const tongchengService = new TongchengService();
27
+ exports.default = tongchengService;
@@ -0,0 +1,138 @@
1
+ export declare namespace Service {
2
+ type ContactInfo = {
3
+ name: string;
4
+ mobile: string;
5
+ idCard?: string;
6
+ };
7
+ type BindingOrderSummary = {
8
+ tongchengOrderId: string;
9
+ positiveOrderId: string;
10
+ bindStatus: 'BOUND' | 'UNBOUND';
11
+ status: string;
12
+ unionId: string;
13
+ contactInfo: ContactInfo;
14
+ itemId: string;
15
+ fulfillAt: number;
16
+ createdAt: number;
17
+ };
18
+ type BindingOrderDetail = BindingOrderSummary & {
19
+ canBind: boolean;
20
+ cannotBindReason: string | null;
21
+ };
22
+ type ConfirmBindOrderResult = {
23
+ positiveOrderId: string;
24
+ boundAt: number;
25
+ };
26
+ namespace Request {
27
+ type SearchBindingOrders = {
28
+ guestName: string;
29
+ guestMobile: string;
30
+ };
31
+ type GetBindingOrderDetail = {
32
+ tongchengOrderId: string;
33
+ positiveOrderId: string;
34
+ };
35
+ type GetPositiveOrderRelation = {
36
+ positiveOrderId: string;
37
+ tongchengOrderId?: string;
38
+ } | {
39
+ positiveOrderId?: string;
40
+ tongchengOrderId: string;
41
+ };
42
+ type ConfirmBindOrder = {
43
+ tongchengOrderId: string;
44
+ positiveOrderId: string;
45
+ unionId: string;
46
+ openId: string;
47
+ token: string;
48
+ };
49
+ type searchBindingOrders = SearchBindingOrders;
50
+ type getBindingOrderDetail = GetBindingOrderDetail;
51
+ type getPositiveOrderRelation = GetPositiveOrderRelation;
52
+ type confirmBindOrder = ConfirmBindOrder;
53
+ }
54
+ namespace Response {
55
+ interface TongchengRelationExtraInfo {
56
+ request: {
57
+ clientId: string;
58
+ bizType: number;
59
+ exHotelCode: string;
60
+ exRoomTypeCode: string;
61
+ exProductCode: string;
62
+ exRatePlanCode: string;
63
+ checkin: string;
64
+ checkout: string;
65
+ roomCount: number;
66
+ totalAmount: number;
67
+ paidAmount?: number;
68
+ arrivePayAmount?: number;
69
+ paymentType: number;
70
+ roomPriceList: Array<{
71
+ date: string;
72
+ price: number;
73
+ roomCount: number;
74
+ }>;
75
+ preSaleOrderList?: Array<{
76
+ orderId: string;
77
+ couponCount: number;
78
+ couponCode: string;
79
+ amount: number;
80
+ }>;
81
+ };
82
+ quantitySnapshot: {
83
+ tcBookQuantity: number;
84
+ quantityFactor: number;
85
+ localOrderQuantity: number;
86
+ roomQuantity: number;
87
+ };
88
+ amountSnapshot: {
89
+ tongchengAmount: number;
90
+ localAmount: number;
91
+ mealDiscountPerQuantity: number;
92
+ stayDiscountCount: number;
93
+ stayDiscountPerQuantity: number;
94
+ totalAdjustmentPerQuantity: number;
95
+ averageAdjustmentPerNight: number;
96
+ adjustedNightPrices: number[];
97
+ };
98
+ resourceSnapshot: {
99
+ itemId: string;
100
+ comboId: string;
101
+ shortcutId?: string;
102
+ venueId: string;
103
+ roomId: string;
104
+ roomCapacity: number;
105
+ };
106
+ }
107
+ interface TongchengPositiveOrderRelation {
108
+ id: string;
109
+ positiveOrderId: string;
110
+ boundAt: number | null;
111
+ extraInfo: TongchengRelationExtraInfo;
112
+ createdAt: number;
113
+ updatedAt: number;
114
+ }
115
+ type SearchBindingOrders = BindingOrderSummary[];
116
+ type GetBindingOrderDetail = BindingOrderDetail;
117
+ type GetPositiveOrderRelation = TongchengPositiveOrderRelation | null;
118
+ type ConfirmBindOrder = ConfirmBindOrderResult;
119
+ type searchBindingOrders = SearchBindingOrders;
120
+ type getBindingOrderDetail = GetBindingOrderDetail;
121
+ type getPositiveOrderRelation = GetPositiveOrderRelation;
122
+ type confirmBindOrder = ConfirmBindOrder;
123
+ }
124
+ interface TongchengController {
125
+ /** @path /tongcheng/search-binding-orders */
126
+ searchBindingOrders(request: Request.SearchBindingOrders): Promise<Response.SearchBindingOrders>;
127
+ /** @path /tongcheng/get-binding-order-detail */
128
+ getBindingOrderDetail(request: Request.GetBindingOrderDetail): Promise<Response.GetBindingOrderDetail>;
129
+ /**
130
+ * 根据 POS 订单 ID、同程订单 ID 或二者查询关联。
131
+ * 两个 ID 同时提供时,仅在二者属于同一关联时返回结果;未命中返回 null。
132
+ * @path /tongcheng/get-positive-order-relation
133
+ */
134
+ getPositiveOrderRelation(request: Request.GetPositiveOrderRelation): Promise<Response.GetPositiveOrderRelation>;
135
+ /** @path /tongcheng/confirm-bind-order */
136
+ confirmBindOrder(request: Request.ConfirmBindOrder): Promise<Response.ConfirmBindOrder>;
137
+ }
138
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/types.d.ts CHANGED
@@ -130,6 +130,8 @@ export interface IPositiveAttributes {
130
130
  isShuttleBusNeedCheck: boolean;
131
131
  /** 是否是迁移商品订单 */
132
132
  isMigratedItemOrder: boolean;
133
+ /** 是否为同程视频号订单 */
134
+ isTongchengVideoAccountOrder: boolean;
133
135
  /** 跟团游不成团状态 GroupFormationStatusEnum:null 非不成团 / PENDING / RESCHEDULING / RESOLVED */
134
136
  isGroupFormationFailed: string | null;
135
137
  /** 不成团操作时间(毫秒时间戳,仅存于 attributes JSON) */