@tbox.cn/app-contracts-mall 0.12.1 → 0.12.3

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.
@@ -193,4 +193,18 @@ export interface PaymentOperation {
193
193
  readonly paidAt?: string;
194
194
  /** 入场时间(建单时自报价带入):回执要算停车时长,而报价此时已不可达 */
195
195
  readonly entryAt?: string;
196
+ /**
197
+ * 报价投影(建单时自报价快照,对齐 entryAt 同模式——PAID 原卡翻转要重灌终态卡数据,
198
+ * 而 W4 报价缓存仅 UNPAID 态可见、届时不可达)。optional:存量 PAYING 单与旧版本
199
+ * 发起的支付无此投影,PAID 收口降级为出回执新卡(零回归语义)。
200
+ */
201
+ readonly quoteProjection?: {
202
+ readonly totalCents: number;
203
+ readonly discountCents: number;
204
+ readonly revision: number;
205
+ readonly feeItems: readonly {
206
+ name: string;
207
+ amountCents: number;
208
+ }[];
209
+ };
196
210
  }
package/dist/runtime.d.ts CHANGED
@@ -12,7 +12,7 @@ export { MEMBER_ACCOUNT_SERVICE, MEMBER_PROFILE_SERVICE, MEMBER_CARD_SERVICE, ME
12
12
  export { PARKING_QUERY_SERVICE, PARKING_PAYMENT_SERVICE, PARKING_VEHICLE_SERVICE, PARKING_SNAPSHOT_SERVICE } from './services/parking';
13
13
  export { PROMOTION_OFFERS_SERVICE, PROMOTION_ENTITLEMENTS_SERVICE, PROMOTION_ACTIVITIES_SERVICE, PROMOTION_ACQUISITION_SERVICE, PROMOTION_ACTIVITY_ROUTING_POLICY, } from './services/promotion';
14
14
  export { SHOPPING_CATALOG_SERVICE, SHOPPING_SHOPS_SERVICE, SHOPPING_CATEGORIES_SERVICE, SHOPPING_DIRECTORY_SERVICE, } from './services/shopping-guide';
15
- export { MALL_INFO_SERVICE, MALL_INFO_CACHE_SERVICE } from './services/mall-info';
15
+ export { MALL_INFO_SERVICE } from './services/mall-info';
16
16
  export { mallLocationSchema, parseMallLocation, mallUserRefSchema, parseMallUserRef } from './guard';
17
17
  export * from './shopping-guide/cards';
18
18
  export * from './member/cards';
package/dist/runtime.js CHANGED
@@ -184,7 +184,6 @@ var SHOPPING_DIRECTORY_SERVICE = "shopping-guide.directory";
184
184
 
185
185
  // src/services/mall-info.ts
186
186
  var MALL_INFO_SERVICE = "mall.info";
187
- var MALL_INFO_CACHE_SERVICE = "mall.info-cache";
188
187
 
189
188
  // src/guard.ts
190
189
  import { z } from "zod";
@@ -1204,7 +1203,6 @@ var parkingCardDataSchemas = {
1204
1203
  };
1205
1204
  export {
1206
1205
  AUTH_LOGIN_SERVICE,
1207
- MALL_INFO_CACHE_SERVICE,
1208
1206
  MALL_INFO_SERVICE,
1209
1207
  MALL_SCOPE_KEY,
1210
1208
  MEMBER_ACCOUNT_SERVICE,
@@ -24,16 +24,3 @@ export interface MallInfoPort {
24
24
  */
25
25
  getMallInfo(mallId: string): Promise<MallInfo | undefined>;
26
26
  }
27
- /** 跨模块 'mall.info-cache' 词汇(与 service-slots.json 同锁)。 */
28
- export declare const MALL_INFO_CACHE_SERVICE = "mall.info-cache";
29
- /**
30
- * mall.info 缓存 Port(缓存 → single-flight → mall.info 槽的读面)。
31
- * module-mall-core register 期注册(闭包 integrations);消费方 resolveService 直读。
32
- * 缓存纪律(TTL/负缓存/LRU/single-flight/形状守卫)由实现方收口。
33
- */
34
- export interface MallInfoCachePort {
35
- /** 缓存名读取(同步回退通道;过期/负缓存 → undefined) */
36
- cachedMallName(mallId: string): string | undefined;
37
- /** 缓存 → single-flight → mall.info 槽拉取;失败/未知 → undefined(fail-soft) */
38
- resolveMallInfo(mallId: string): Promise<MallInfo | undefined>;
39
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-contracts-mall",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
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.12.0",
32
+ "@tbox.cn/app-contracts": "0.12.3",
33
33
  "zod": "3.25.76"
34
34
  },
35
35
  "devDependencies": {
@@ -204,4 +204,15 @@ export interface PaymentOperation {
204
204
  readonly paidAt?: string;
205
205
  /** 入场时间(建单时自报价带入):回执要算停车时长,而报价此时已不可达 */
206
206
  readonly entryAt?: string;
207
+ /**
208
+ * 报价投影(建单时自报价快照,对齐 entryAt 同模式——PAID 原卡翻转要重灌终态卡数据,
209
+ * 而 W4 报价缓存仅 UNPAID 态可见、届时不可达)。optional:存量 PAYING 单与旧版本
210
+ * 发起的支付无此投影,PAID 收口降级为出回执新卡(零回归语义)。
211
+ */
212
+ readonly quoteProjection?: {
213
+ readonly totalCents: number;
214
+ readonly discountCents: number;
215
+ readonly revision: number;
216
+ readonly feeItems: readonly { name: string; amountCents: number }[];
217
+ };
207
218
  }
package/src/runtime.ts CHANGED
@@ -34,7 +34,7 @@ export {
34
34
  SHOPPING_CATEGORIES_SERVICE,
35
35
  SHOPPING_DIRECTORY_SERVICE,
36
36
  } from './services/shopping-guide';
37
- export { MALL_INFO_SERVICE, MALL_INFO_CACHE_SERVICE } from './services/mall-info';
37
+ export { MALL_INFO_SERVICE } from './services/mall-info';
38
38
  export { mallLocationSchema, parseMallLocation, mallUserRefSchema, parseMallUserRef } from './guard';
39
39
  export * from './shopping-guide/cards';
40
40
  export * from './member/cards';
@@ -20,8 +20,7 @@
20
20
  "shopping-guide.categories",
21
21
  "shopping-guide.directory",
22
22
  "auth.alipay-login",
23
- "mall.info",
24
- "mall.info-cache"
23
+ "mall.info"
25
24
  ],
26
25
  "meta": {
27
26
  "member.account": { "name": "会员账户", "description": "登录与入会状态、会员外部引用" },
@@ -43,7 +42,6 @@
43
42
  "shopping-guide.categories": { "name": "类目浏览", "description": "楼层与类目目录" },
44
43
  "shopping-guide.directory": { "name": "商场目录", "description": "商场、门店、楼层目录服务" },
45
44
  "auth.alipay-login": { "name": "支付宝登录", "description": "登录换码(code2Session)" },
46
- "mall.info": { "name": "商场信息", "description": "商场名称地址坐标,动态商场信息源" },
47
- "mall.info-cache": { "name": "商场信息缓存", "description": "商场信息缓存读面(缓存→合并请求→槽)" }
45
+ "mall.info": { "name": "商场信息", "description": "商场名称地址坐标,动态商场信息源" }
48
46
  }
49
47
  }
@@ -29,20 +29,3 @@ export interface MallInfoPort {
29
29
  */
30
30
  getMallInfo(mallId: string): Promise<MallInfo | undefined>;
31
31
  }
32
-
33
- // ===== mall.info 缓存面(W3-3:缓存装饰跨模块暴露) =====
34
-
35
- /** 跨模块 'mall.info-cache' 词汇(与 service-slots.json 同锁)。 */
36
- export const MALL_INFO_CACHE_SERVICE = 'mall.info-cache';
37
-
38
- /**
39
- * mall.info 缓存 Port(缓存 → single-flight → mall.info 槽的读面)。
40
- * module-mall-core register 期注册(闭包 integrations);消费方 resolveService 直读。
41
- * 缓存纪律(TTL/负缓存/LRU/single-flight/形状守卫)由实现方收口。
42
- */
43
- export interface MallInfoCachePort {
44
- /** 缓存名读取(同步回退通道;过期/负缓存 → undefined) */
45
- cachedMallName(mallId: string): string | undefined;
46
- /** 缓存 → single-flight → mall.info 槽拉取;失败/未知 → undefined(fail-soft) */
47
- resolveMallInfo(mallId: string): Promise<MallInfo | undefined>;
48
- }
@@ -31,7 +31,7 @@ import {
31
31
  SHOPPING_CATEGORIES_SERVICE,
32
32
  SHOPPING_DIRECTORY_SERVICE,
33
33
  } from '../src/services/shopping-guide';
34
- import { MALL_INFO_SERVICE, MALL_INFO_CACHE_SERVICE } from '../src/services/mall-info';
34
+ import { MALL_INFO_SERVICE } from '../src/services/mall-info';
35
35
  import { AUTH_LOGIN_SERVICE } from '../src/assembly';
36
36
 
37
37
  const constants = [
@@ -55,20 +55,19 @@ const constants = [
55
55
  MALL_INFO_SERVICE,
56
56
  MEMBER_SNAPSHOT_SERVICE,
57
57
  PARKING_SNAPSHOT_SERVICE,
58
- MALL_INFO_CACHE_SERVICE,
59
58
  ];
60
59
 
61
60
  describe('service slot 词汇交叉锁(JSON 真源 ↔ TS 共址常量)', () => {
62
- it('计数 = 21(auth.alipay-login 与 mall.info 族含在内)', () => {
63
- expect(slotsJson.slots).toHaveLength(21);
64
- expect(constants).toHaveLength(21);
61
+ it('计数 = 20(auth.alipay-login 与 mall.info 族含在内)', () => {
62
+ expect(slotsJson.slots).toHaveLength(20);
63
+ expect(constants).toHaveLength(20);
65
64
  });
66
65
 
67
66
  it('常量并集 ≡ JSON slots(互为子集;无重复无缺漏)', () => {
68
67
  const jsonSet = new Set(slotsJson.slots);
69
68
  const constSet = new Set(constants);
70
- expect(jsonSet.size).toBe(21);
71
- expect(constSet.size).toBe(21);
69
+ expect(jsonSet.size).toBe(20);
70
+ expect(constSet.size).toBe(20);
72
71
  for (const id of jsonSet) expect(constSet.has(id), `常量缺 ${id}`).toBe(true);
73
72
  for (const id of constSet) expect(jsonSet.has(id), `JSON 缺 ${id}`).toBe(true);
74
73
  });