@be-link/vitality-cli-nodejs 0.0.46 → 0.0.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/vitality-cli-nodejs",
3
- "version": "0.0.46",
3
+ "version": "0.0.52",
4
4
  "description": "VitalityService Node.js 客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1304,6 +1304,7 @@ declare const bizService: {
1304
1304
  main: {
1305
1305
  prefixUrl: string;
1306
1306
  calculateLowestPriceForDirectPay(request: import("./promotion").Promotion.Main.Request.CalculateLowestPriceForDirectPay): Promise<import("./promotion").Promotion.Main.Response.CalculateLowestPriceForDirectPay>;
1307
+ calculateAgeQuoteForDirectPay(request: import("./promotion").Promotion.Main.Request.CalculateAgeQuoteForDirectPay): Promise<import("./promotion").Promotion.Main.Response.CalculateAgeQuoteForDirectPay>;
1307
1308
  writeOffCoupon(request: import("./promotion").Promotion.Main.Request.WriteOffCoupon): Promise<void>;
1308
1309
  rollbackCoupon(request: import("./promotion").Promotion.Main.Request.RollbackCoupon): Promise<void>;
1309
1310
  grantCoupon(request: import("./promotion").Promotion.Main.Request.GrantCoupon): Promise<string>;
@@ -5,6 +5,7 @@ declare const promotionService: {
5
5
  main: {
6
6
  prefixUrl: string;
7
7
  calculateLowestPriceForDirectPay(request: import("./type").Promotion.Main.Request.CalculateLowestPriceForDirectPay): Promise<import("./type").Promotion.Main.Response.CalculateLowestPriceForDirectPay>;
8
+ calculateAgeQuoteForDirectPay(request: import("./type").Promotion.Main.Request.CalculateAgeQuoteForDirectPay): Promise<import("./type").Promotion.Main.Response.CalculateAgeQuoteForDirectPay>;
8
9
  writeOffCoupon(request: import("./type").Promotion.Main.Request.WriteOffCoupon): Promise<void>;
9
10
  rollbackCoupon(request: import("./type").Promotion.Main.Request.RollbackCoupon): Promise<void>;
10
11
  grantCoupon(request: import("./type").Promotion.Main.Request.GrantCoupon): Promise<string>;
@@ -3,6 +3,8 @@ import { Promotion } from '../type';
3
3
  declare class PromotionMainService extends BaseService implements Promotion.Main.Controller {
4
4
  prefixUrl: string;
5
5
  calculateLowestPriceForDirectPay(request: Promotion.Main.Request.CalculateLowestPriceForDirectPay): Promise<Promotion.Main.Response.CalculateLowestPriceForDirectPay>;
6
+ /** 仅用于 POS;部署前网关必须限制该专用路由的调用方。 */
7
+ calculateAgeQuoteForDirectPay(request: Promotion.Main.Request.CalculateAgeQuoteForDirectPay): Promise<Promotion.Main.Response.CalculateAgeQuoteForDirectPay>;
6
8
  writeOffCoupon(request: Promotion.Main.Request.WriteOffCoupon): Promise<void>;
7
9
  rollbackCoupon(request: Promotion.Main.Request.RollbackCoupon): Promise<void>;
8
10
  grantCoupon(request: Promotion.Main.Request.GrantCoupon): Promise<string>;
@@ -13,6 +13,10 @@ class PromotionMainService extends baseService_1.default {
13
13
  calculateLowestPriceForDirectPay(request) {
14
14
  return (0, http_1.callScfApi)(this.getApiUrl(this.calculateLowestPriceForDirectPay), request);
15
15
  }
16
+ /** 仅用于 POS;部署前网关必须限制该专用路由的调用方。 */
17
+ calculateAgeQuoteForDirectPay(request) {
18
+ return (0, http_1.callScfApi)(this.getApiUrl(this.calculateAgeQuoteForDirectPay), request);
19
+ }
16
20
  writeOffCoupon(request) {
17
21
  return (0, http_1.callScfApi)(this.getApiUrl(this.writeOffCoupon), request);
18
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/vs/modules/biz/promotion/main/service.ts"],"names":[],"mappings":";;;;;AAAA,2CAA6C;AAC7C,uEAA8C;AAG9C,MAAM,oBAAqB,SAAQ,qBAAW;IAA9C;;QACE,cAAS,GAAG,qBAAqB,CAAA;IAwEnC,CAAC;IAtEC,gCAAgC,CAC9B,OAAgE;QAEhE,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gCAAgC,CAAC,EACrD,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AA"}
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/vs/modules/biz/promotion/main/service.ts"],"names":[],"mappings":";;;;;AAAA,2CAA6C;AAC7C,uEAA8C;AAG9C,MAAM,oBAAqB,SAAQ,qBAAW;IAA9C;;QACE,cAAS,GAAG,qBAAqB,CAAA;IAkFnC,CAAC;IAhFC,gCAAgC,CAC9B,OAAgE;QAEhE,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gCAAgC,CAAC,EACrD,OAAO,CACR,CAAA;IACH,CAAC;IAED,kCAAkC;IAClC,6BAA6B,CAC3B,OAA6D;QAE7D,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAAC,EAClD,OAAO,CACR,CAAA;IACH,CAAC;IAED,cAAc,CAAC,OAA8C;QAC3D,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,EACnC,OAAO,CACR,CAAA;IACH,CAAC;IAED,cAAc,CAAC,OAA8C;QAC3D,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,EACnC,OAAO,CACR,CAAA;IACH,CAAC;IAED,WAAW,CAAC,OAA2C;QACrD,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAChC,OAAO,CACR,CAAA;IACH,CAAC;IAED,aAAa,CAAC,QAAgB;QAC5B,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAClC,QAAQ,CACT,CAAA;IACH,CAAC;IAED,4BAA4B,CAC1B,OAA4D;QAE5D,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,4BAA4B,CAAC,EACjD,OAAO,CACR,CAAA;IACH,CAAC;IAED,gCAAgC,CAC9B,OAAgE;QAEhE,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,gCAAgC,CAAC,EACrD,OAAO,CACR,CAAA;IACH,CAAC;IAED,mBAAmB,CACjB,OAAmD;QAEnD,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,EACxC,OAAO,CACR,CAAA;IACH,CAAC;IAED,0BAA0B,CAAC,gBAAwB;QACjD,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,0BAA0B,CAAC,EAC/C,gBAAgB,CACjB,CAAA;IACH,CAAC;CACF;AAED,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,EAAE,CAAA;AACvD,kBAAe,oBAAoB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  /** 后端调用方复核后冻结的 Promotion 具名 SDK 清单。 */
2
2
  export declare const promotionSdkManifest: {
3
3
  readonly targets: {
4
- readonly main: readonly ["calculateLowestPriceForDirectPay", "writeOffCoupon", "rollbackCoupon", "grantCoupon", "getCouponById", "queryCouponByUserAndTemplate", "countCouponByTemplateIdAndStatus", "getItemActivityInfo", "getItemListInDynamicCoupon"];
4
+ readonly main: readonly ["calculateLowestPriceForDirectPay", "calculateAgeQuoteForDirectPay", "writeOffCoupon", "rollbackCoupon", "grantCoupon", "getCouponById", "queryCouponByUserAndTemplate", "countCouponByTemplateIdAndStatus", "getItemActivityInfo", "getItemListInDynamicCoupon"];
5
5
  readonly job: readonly ["jobPushCouponNotification", "jobMaskUserForTourismConvert", "jobUpdateExpireCouponStatus"];
6
6
  readonly 'restructure/calculation': readonly ["calculatePreOrderForPos", "validateOrder"];
7
7
  };
@@ -6,6 +6,7 @@ exports.promotionSdkManifest = {
6
6
  targets: {
7
7
  main: [
8
8
  'calculateLowestPriceForDirectPay',
9
+ 'calculateAgeQuoteForDirectPay',
9
10
  'writeOffCoupon',
10
11
  'rollbackCoupon',
11
12
  'grantCoupon',
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../../src/vs/modules/biz/promotion/manifest.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAC1B,QAAA,oBAAoB,GAAG;IAClC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,kCAAkC;YAClC,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,eAAe;YACf,8BAA8B;YAC9B,kCAAkC;YAClC,qBAAqB;YACrB,4BAA4B;SAC7B;QACD,GAAG,EAAE;YACH,2BAA2B;YAC3B,8BAA8B;YAC9B,6BAA6B;SAC9B;QACD,yBAAyB,EAAE,CAAC,yBAAyB,EAAE,eAAe,CAAC;KACxE;IACD,mBAAmB,EAAE;QACnB,+BAA+B,EAAE,sCAAsC;QACvE,4CAA4C,EAC1C,sCAAsC;QACxC,qDAAqD,EAAE,oBAAoB;KAC5E;CACO,CAAA"}
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../../src/vs/modules/biz/promotion/manifest.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAC1B,QAAA,oBAAoB,GAAG;IAClC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,kCAAkC;YAClC,+BAA+B;YAC/B,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,eAAe;YACf,8BAA8B;YAC9B,kCAAkC;YAClC,qBAAqB;YACrB,4BAA4B;SAC7B;QACD,GAAG,EAAE;YACH,2BAA2B;YAC3B,8BAA8B;YAC9B,6BAA6B;SAC9B;QACD,yBAAyB,EAAE,CAAC,yBAAyB,EAAE,eAAe,CAAC;KACxE;IACD,mBAAmB,EAAE;QACnB,+BAA+B,EAAE,sCAAsC;QACvE,4CAA4C,EAC1C,sCAAsC;QACxC,qDAAqD,EAAE,oBAAoB;KAC5E;CACO,CAAA"}
@@ -64,6 +64,29 @@ export declare namespace Promotion {
64
64
  isMemberPriceCanBeUse: boolean;
65
65
  isPayingDeposit?: boolean;
66
66
  }
67
+ /** POS 专用;目标路由须由网关仅放行 POS。 */
68
+ interface CalculateAgeQuoteForDirectPay extends CalculateLowestPriceForDirectPay {
69
+ item: Record<string, unknown> & {
70
+ _id: string;
71
+ basicInfo: Record<string, unknown> & {
72
+ category: Array<{
73
+ categoryName: string;
74
+ level?: number;
75
+ }>;
76
+ };
77
+ sku: Record<string, unknown> & {
78
+ skuId: string;
79
+ salePrice: number;
80
+ } & ({
81
+ memberPrice?: null;
82
+ memberPriceLimitTimes?: number | null;
83
+ } | {
84
+ memberPrice: number;
85
+ memberPriceLimitTimes: number | null;
86
+ });
87
+ };
88
+ beforeDiscountCent: number;
89
+ }
67
90
  interface PromotionRecord {
68
91
  _id?: string;
69
92
  tradeOrderId?: string;
@@ -136,6 +159,12 @@ export declare namespace Promotion {
136
159
  depositFee: number;
137
160
  finalPaymentFee: number;
138
161
  }
162
+ interface CalculateAgeQuoteForDirectPay extends Omit<CalculateLowestPriceForDirectPay, 'hasOrderCoupon' | 'hasItemCoupon' | 'depositFee' | 'finalPaymentFee'> {
163
+ hasOrderCoupon?: boolean;
164
+ hasItemCoupon?: boolean;
165
+ depositFee?: number;
166
+ finalPaymentFee?: number;
167
+ }
139
168
  interface CouponGroup {
140
169
  items: CouponItem[];
141
170
  reduce: number;
@@ -144,6 +173,7 @@ export declare namespace Promotion {
144
173
  }
145
174
  interface Controller {
146
175
  calculateLowestPriceForDirectPay(request: Request.CalculateLowestPriceForDirectPay): Promise<Response.CalculateLowestPriceForDirectPay>;
176
+ calculateAgeQuoteForDirectPay(request: Request.CalculateAgeQuoteForDirectPay): Promise<Response.CalculateAgeQuoteForDirectPay>;
147
177
  writeOffCoupon(request: Request.WriteOffCoupon): Promise<void>;
148
178
  rollbackCoupon(request: Request.RollbackCoupon): Promise<void>;
149
179
  grantCoupon(request: Request.GrantCoupon): Promise<string>;