@tbox.cn/app-contracts-mall 0.13.2 → 1.0.0-alpha.1

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.
@@ -251,7 +251,7 @@ export interface MemberGateBlock {
251
251
  * 实现方(member.status 工厂)应自收口异常;本函数对抛错实现兜底为软放行(横切面鲁棒性)。
252
252
  */
253
253
  export declare function resolveMemberGate(factory: MemberStatusFactory | undefined, reqCtx: RequestContext): Promise<MemberGateBlock | undefined>;
254
- /** 跨模块 'member.snapshot' 词汇(与 service-slots.json 同锁)。 */
254
+ /** 跨模块 'member.snapshot' 词汇(运行时 ctx.services 注册键——聚合快照槽已退词汇真源 service-slots.json,非 provider 槽)。 */
255
255
  export declare const MEMBER_SNAPSHOT_SERVICE = "member.snapshot";
256
256
  /**
257
257
  * 会员快览 Port(linked-panel 消费面:账户/授权三态 + 积分 + 入会引导)。
@@ -105,7 +105,7 @@ export interface ParkingVehiclePort {
105
105
  vehicleRef?: string;
106
106
  }): Promise<void>;
107
107
  }
108
- /** 跨模块 'parking.snapshot' 词汇(与 service-slots.json 同锁)。 */
108
+ /** 跨模块 'parking.snapshot' 词汇(运行时 ctx.services 注册键——聚合快照槽已退词汇真源 service-slots.json,非 provider 槽)。 */
109
109
  export declare const PARKING_SNAPSHOT_SERVICE = "parking.snapshot";
110
110
  /**
111
111
  * 停车快览 Port(linked-panel 消费面:绑定车辆列表 + 在场探测)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-contracts-mall",
3
- "version": "0.13.2",
3
+ "version": "1.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "商圈领域契约(TIER1,types + runtime):Port 接口 + MallEventMap + 领域 DTO + scope/装配器运行时。",
6
6
  "exports": {
@@ -29,7 +29,7 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@tbox.cn/app-contracts": "0.13.3",
32
+ "@tbox.cn/app-contracts": "1.0.0-alpha.1",
33
33
  "zod": "3.25.76"
34
34
  },
35
35
  "devDependencies": {
@@ -6,11 +6,9 @@
6
6
  "member.card",
7
7
  "member.benefits",
8
8
  "member.enrollment",
9
- "member.snapshot",
10
9
  "parking.query",
11
10
  "parking.payment",
12
11
  "parking.vehicle",
13
- "parking.snapshot",
14
12
  "promotion.offers",
15
13
  "promotion.entitlements",
16
14
  "promotion.activities",
@@ -28,11 +26,9 @@
28
26
  "member.card": { "name": "会员卡与等级", "description": "获取会员卡、会员等级、成长进度和权益摘要" },
29
27
  "member.benefits": { "name": "会员权益", "description": "查询会员可享权益、使用状态和剩余次数" },
30
28
  "member.enrollment": { "name": "在线入会", "description": "获取入会所需信息,并支持用户在线注册成为会员" },
31
- "member.snapshot": { "name": "会员首页概览", "description": "汇总会员身份、积分和入会状态,供首页快速展示" },
32
29
  "parking.query": { "name": "停车费用查询", "description": "查询停车场信息、当前停车费用和可用优惠" },
33
30
  "parking.payment": { "name": "停车缴费与开票", "description": "创建停车缴费订单,查询支付状态和记录,并支持申请发票" },
34
31
  "parking.vehicle": { "name": "车辆管理与寻车", "description": "绑定或解绑常用车牌,并查询车辆所在位置" },
35
- "parking.snapshot": { "name": "停车首页概览", "description": "汇总车辆和当前停车状态,供首页快速展示" },
36
32
  "promotion.offers": { "name": "营销优惠", "description": "券、团购等优惠查询" },
37
33
  "promotion.entitlements": { "name": "营销权益", "description": "我的券与领取资格" },
38
34
  "promotion.activities": { "name": "营销活动", "description": "活动列表详情与参与指引" },
@@ -367,7 +367,7 @@ export async function resolveMemberGate(
367
367
 
368
368
  // ===== 11. 跨模块会员快览(首页联单面板消费面) =====
369
369
 
370
- /** 跨模块 'member.snapshot' 词汇(与 service-slots.json 同锁)。 */
370
+ /** 跨模块 'member.snapshot' 词汇(运行时 ctx.services 注册键——聚合快照槽已退词汇真源 service-slots.json,非 provider 槽)。 */
371
371
  export const MEMBER_SNAPSHOT_SERVICE = 'member.snapshot';
372
372
 
373
373
  /**
@@ -167,7 +167,7 @@ export interface ParkingVehiclePort {
167
167
 
168
168
  // ===== 4. 跨模块停车快览(首页联单面板消费面) =====
169
169
 
170
- /** 跨模块 'parking.snapshot' 词汇(与 service-slots.json 同锁)。 */
170
+ /** 跨模块 'parking.snapshot' 词汇(运行时 ctx.services 注册键——聚合快照槽已退词汇真源 service-slots.json,非 provider 槽)。 */
171
171
  export const PARKING_SNAPSHOT_SERVICE = 'parking.snapshot';
172
172
 
173
173
  /**
@@ -11,13 +11,11 @@ import {
11
11
  MEMBER_CARD_SERVICE,
12
12
  MEMBER_BENEFITS_SERVICE,
13
13
  MEMBER_ENROLLMENT_SERVICE,
14
- MEMBER_SNAPSHOT_SERVICE,
15
14
  } from '../src/services/member';
16
15
  import {
17
16
  PARKING_QUERY_SERVICE,
18
17
  PARKING_PAYMENT_SERVICE,
19
18
  PARKING_VEHICLE_SERVICE,
20
- PARKING_SNAPSHOT_SERVICE,
21
19
  } from '../src/services/parking';
22
20
  import {
23
21
  PROMOTION_OFFERS_SERVICE,
@@ -53,21 +51,19 @@ const constants = [
53
51
  SHOPPING_DIRECTORY_SERVICE,
54
52
  AUTH_LOGIN_SERVICE,
55
53
  MALL_INFO_SERVICE,
56
- MEMBER_SNAPSHOT_SERVICE,
57
- PARKING_SNAPSHOT_SERVICE,
58
54
  ];
59
55
 
60
56
  describe('service slot 词汇交叉锁(JSON 真源 ↔ TS 共址常量)', () => {
61
- it('计数 = 20(auth.alipay-login 与 mall.info 族含在内)', () => {
62
- expect(slotsJson.slots).toHaveLength(20);
63
- expect(constants).toHaveLength(20);
57
+ it('计数 = 18(auth.alipay-login 与 mall.info 族含在内;聚合快照槽已退词汇——运行时 ctx.services 键不受影响)', () => {
58
+ expect(slotsJson.slots).toHaveLength(18);
59
+ expect(constants).toHaveLength(18);
64
60
  });
65
61
 
66
62
  it('常量并集 ≡ JSON slots(互为子集;无重复无缺漏)', () => {
67
63
  const jsonSet = new Set(slotsJson.slots);
68
64
  const constSet = new Set(constants);
69
- expect(jsonSet.size).toBe(20);
70
- expect(constSet.size).toBe(20);
65
+ expect(jsonSet.size).toBe(18);
66
+ expect(constSet.size).toBe(18);
71
67
  for (const id of jsonSet) expect(constSet.has(id), `常量缺 ${id}`).toBe(true);
72
68
  for (const id of constSet) expect(jsonSet.has(id), `JSON 缺 ${id}`).toBe(true);
73
69
  });