@tbox.cn/app-contracts-mall 0.17.2 → 0.18.0

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/dist/runtime.d.ts CHANGED
@@ -13,9 +13,9 @@ export { PARKING_QUERY_SERVICE, PARKING_PAYMENT_SERVICE, PARKING_VEHICLE_SERVICE
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
15
  export { MALL_INFO_SERVICE } from './services/mall-info';
16
- export { ACTIVITY_PLAY_QUERY_SERVICE, ACTIVITY_PLAY_ENTRY_SERVICE } from './services/activity-play';
16
+ export { ACTIVITY_PLAY_QUERY_SERVICE } from './services/activity-play';
17
17
  export { ACTIVITY_PLAY_PRIZES_SERVICE } from './services/activity-play-prize';
18
- export { ACTIVITY_PLAY_ENTRY_PROTOCOL_VERSION, ACTIVITY_PLAY_TARGET_KIND, activityPlayActivitySchema, activityPlayEntrySchema, activityPlayTargetSchema, activityPlayPluginAliasSchema, activityPlayTargetPageSchema, activityPlayDirectoryEntrySchema, activityPlayRefSchema, activityPlayTitleSchema, activityPlayDescriptionSchema, activityPlayTimeSchema, activityPlayImageUrlSchema, activityPlayStatusOf, } from './domain/activity-play';
18
+ export { activityPlayActivitySchema, activityPlayIdSchema, activityPlayTitleSchema, activityPlayDescriptionSchema, activityPlayTimeSchema, activityPlayImageUrlSchema, } from './domain/activity-play';
19
19
  export { ACTIVITY_PLAY_PRIZE_STATUS_UNKNOWN, activityPlayPrizeRecordRefSchema, activityPlayPrizeTitleSchema, activityPlayPrizeActivityIdSchema, activityPlayPrizeActivityTitleSchema, activityPlayPrizeStatusTagSchema, activityPlayPrizeUsageRuleTextSchema, activityPlayPrizeRedemptionMethodSchema, activityPlayPrizeRedemptionInstructionSchema, activityPlayPrizeUrlSchema, activityPlayPrizeRecordSchema, activityPlayPrizeDetailSchema, activityPlayPrizeListResultSchema, toActivityPlayPrizeStatusTag, } from './domain/activity-play-prize';
20
20
  export { mallLocationSchema, parseMallLocation, mallUserRefSchema, parseMallUserRef } from './guard';
21
21
  export * from './shopping-guide/cards';
package/dist/runtime.js CHANGED
@@ -188,104 +188,30 @@ var MALL_INFO_SERVICE = "mall.info";
188
188
 
189
189
  // src/services/activity-play.ts
190
190
  var ACTIVITY_PLAY_QUERY_SERVICE = "activity-play.query";
191
- var ACTIVITY_PLAY_ENTRY_SERVICE = "activity-play.entry";
192
191
 
193
192
  // src/services/activity-play-prize.ts
194
193
  var ACTIVITY_PLAY_PRIZES_SERVICE = "activity-play.prizes";
195
194
 
196
195
  // src/domain/activity-play.ts
197
196
  import { z } from "zod";
198
- var activityPlayRefSchema = z.string().min(1).max(128).regex(/^[A-Za-z0-9_.:-]+$/);
197
+ var activityPlayIdSchema = z.string().min(1).max(128).refine((id) => !CONTROL_OR_SEGMENT_RE.test(id) && id !== "." && id !== "..", {
198
+ // '.'/'..' 整值拒绝:URL 路径段协议将其解析为目录漂移(/api/.. → /api/——
199
+ // 实测经真实 transport 请求后路径改变),无法正确定位——属「路径段破坏符」族
200
+ message: "\u6D3B\u52A8\u6807\u8BC6\u975E\u6CD5\uFF08\u7A7A/\u8D85\u957F/\u63A7\u5236\u5B57\u7B26/\u8DEF\u5F84\u6BB5\u7834\u574F\u7B26[\u542B . .. \u6574\u503C]\uFF09"
201
+ });
202
+ var CONTROL_OR_SEGMENT_RE = /[\u0000-\u001f\u007f/?#%]/;
199
203
  var activityPlayTitleSchema = z.string().min(1).max(64);
200
204
  var activityPlayDescriptionSchema = z.string().min(1).max(500);
201
205
  var activityPlayTimeSchema = z.string().datetime({ offset: true });
202
206
  var activityPlayImageUrlSchema = z.string().url().startsWith("https://");
203
- var activityPlayDirectoryEntrySchema = z.object({
204
- activityRef: activityPlayRefSchema,
205
- title: activityPlayTitleSchema,
206
- description: activityPlayDescriptionSchema.optional(),
207
- imageUrl: activityPlayImageUrlSchema.optional(),
208
- startsAt: activityPlayTimeSchema.optional(),
209
- endsAt: activityPlayTimeSchema.optional(),
210
- enabled: z.boolean().default(true),
211
- loginRequired: z.boolean().default(false)
212
- }).strict();
213
207
  var activityPlayActivitySchema = z.object({
214
- activityRef: activityPlayRefSchema,
208
+ activityId: activityPlayIdSchema,
215
209
  title: activityPlayTitleSchema,
216
210
  description: activityPlayDescriptionSchema.optional(),
217
211
  imageUrl: activityPlayImageUrlSchema.optional(),
218
212
  startsAt: activityPlayTimeSchema.optional(),
219
213
  endsAt: activityPlayTimeSchema.optional(),
220
- status: z.enum(["not_started", "active", "ended", "disabled"]),
221
- loginRequired: z.boolean()
222
- }).strict();
223
- function activityPlayStatusOf(input) {
224
- if (!input.enabled) return "disabled";
225
- const now = (input.now ?? /* @__PURE__ */ new Date()).getTime();
226
- const start = input.startsAt != null ? Date.parse(input.startsAt) : void 0;
227
- const end = input.endsAt != null ? Date.parse(input.endsAt) : void 0;
228
- if (start != null && Number.isNaN(start)) throw new Error(`\u6D3B\u52A8 startsAt \u4E0D\u53EF\u89E3\u6790: ${input.startsAt}`);
229
- if (end != null && Number.isNaN(end)) throw new Error(`\u6D3B\u52A8 endsAt \u4E0D\u53EF\u89E3\u6790: ${input.endsAt}`);
230
- if (start == null || start <= now) {
231
- if (end != null && now >= end) return "ended";
232
- return "active";
233
- }
234
- return "not_started";
235
- }
236
- var ACTIVITY_PLAY_TARGET_KIND = "miniapp-plugin";
237
- var ACTIVITY_PLAY_ALIAS_MAX = 64;
238
- var ACTIVITY_PLAY_SEGMENT_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
239
- var ACTIVITY_PLAY_PARAMS_MAX_ENTRIES = 32;
240
- var ACTIVITY_PLAY_PARAMS_KEY_MAX = 64;
241
- var ACTIVITY_PLAY_PARAMS_VALUE_MAX = 256;
242
- var ACTIVITY_PLAY_PARAMS_SERIALIZE_MAX = 4096;
243
- var ACTIVITY_PLAY_PARAMS_RESERVED_KEYS = [
244
- "userid",
245
- "openid",
246
- "memberid",
247
- "token",
248
- "authcode",
249
- "accesstoken",
250
- "refreshtoken",
251
- "jwt",
252
- "ticket",
253
- "sessionid"
254
- ];
255
- function paramsKeyNormalized(key) {
256
- return key.toLowerCase().replace(/[-_]/g, "");
257
- }
258
- var activityPlayPluginAliasSchema = z.string().min(1).max(ACTIVITY_PLAY_ALIAS_MAX).regex(ACTIVITY_PLAY_SEGMENT_RE, {
259
- message: `\u63D2\u4EF6\u522B\u540D\u987B\u4E3A\u5355\u6BB5\u6807\u8BC6\uFF08\u5B57\u6BCD\u6570\u5B57\u4E0E . _ -\uFF0C\u9996\u5B57\u7B26\u5B57\u6BCD\u6570\u5B57\uFF0C\u2264${ACTIVITY_PLAY_ALIAS_MAX}\uFF09`
260
- });
261
- var activityPlayTargetPageSchema = z.string().min(1).max(ACTIVITY_PLAY_ALIAS_MAX).regex(ACTIVITY_PLAY_SEGMENT_RE, {
262
- message: `\u9875\u9762\u522B\u540D\u987B\u4E3A\u5355\u6BB5\u6807\u8BC6\uFF08\u5B57\u6BCD\u6570\u5B57\u4E0E . _ -\uFF0C\u9996\u5B57\u7B26\u5B57\u6BCD\u6570\u5B57\uFF0C\u2264${ACTIVITY_PLAY_ALIAS_MAX}\uFF09`
263
- });
264
- var activityPlayTargetSchema = z.object({
265
- kind: z.literal(ACTIVITY_PLAY_TARGET_KIND),
266
- pluginAlias: activityPlayPluginAliasSchema,
267
- page: activityPlayTargetPageSchema,
268
- params: z.record(z.string().min(1).max(ACTIVITY_PLAY_PARAMS_KEY_MAX), z.string().max(ACTIVITY_PLAY_PARAMS_VALUE_MAX)).default({}).refine(
269
- (params) => Object.keys(params).length <= ACTIVITY_PLAY_PARAMS_MAX_ENTRIES,
270
- { message: `params \u81F3\u591A ${ACTIVITY_PLAY_PARAMS_MAX_ENTRIES} \u9879` }
271
- ).refine(
272
- (params) => JSON.stringify(params).length <= ACTIVITY_PLAY_PARAMS_SERIALIZE_MAX,
273
- { message: `params \u5E8F\u5217\u5316\u603B\u957F \u2264 ${ACTIVITY_PLAY_PARAMS_SERIALIZE_MAX}` }
274
- ).refine(
275
- (params) => Object.keys(params).every(
276
- (key) => (
277
- // 控制字符拒收
278
- !/[\u0000-\u001f\u007f]/.test(key) && !/[\u0000-\u001f\u007f]/.test(params[key]) && !ACTIVITY_PLAY_PARAMS_RESERVED_KEYS.includes(paramsKeyNormalized(key))
279
- )
280
- ),
281
- { message: "params \u542B\u4FDD\u7559\u952E\uFF08\u8EAB\u4EFD/\u51ED\u8BC1\u7C7B\uFF09\u6216\u63A7\u5236\u5B57\u7B26" }
282
- )
283
- }).strict();
284
- var ACTIVITY_PLAY_ENTRY_PROTOCOL_VERSION = "1";
285
- var activityPlayEntrySchema = z.object({
286
- protocolVersion: z.literal(ACTIVITY_PLAY_ENTRY_PROTOCOL_VERSION),
287
- activityRef: activityPlayRefSchema,
288
- target: activityPlayTargetSchema
214
+ status: z.enum(["not_started", "active", "ended", "disabled", "unknown"])
289
215
  }).strict();
290
216
 
291
217
  // src/domain/activity-play-prize.ts
@@ -1353,7 +1279,7 @@ var activityPlayCardDataSchema = z10.object({
1353
1279
  mallId: z10.string().min(1),
1354
1280
  /** 传输形态:list(列表,可空,≤50 项)/ detail(详情,恰好 1 项,可携 disabled) */
1355
1281
  mode: z10.enum(["list", "detail"]),
1356
- /** 活动条目(契约单源 ActivityPlayActivity;不带 enabled 配置字段)——list 可空 ≤50 项 */
1282
+ /** 活动条目(供应商活动对象:activityId/title/status 等——list 可空 ≤50 项) */
1357
1283
  items: z10.array(activityPlayActivitySchema).max(50)
1358
1284
  }).superRefine((data, ctx) => {
1359
1285
  if (data.mode === "detail" && data.items.length !== 1) {
@@ -1387,15 +1313,12 @@ var activityPlayPrizeDetailCardDataSchema = activityPlayPrizeDetailSchema.extend
1387
1313
  mallId: z11.string().min(1)
1388
1314
  }).strict();
1389
1315
  export {
1390
- ACTIVITY_PLAY_ENTRY_PROTOCOL_VERSION,
1391
- ACTIVITY_PLAY_ENTRY_SERVICE,
1392
1316
  ACTIVITY_PLAY_PRIZES_SERVICE,
1393
1317
  ACTIVITY_PLAY_PRIZE_CARD_MAX_ITEMS,
1394
1318
  ACTIVITY_PLAY_PRIZE_DETAIL_CARD_TYPE,
1395
1319
  ACTIVITY_PLAY_PRIZE_LIST_CARD_TYPE,
1396
1320
  ACTIVITY_PLAY_PRIZE_STATUS_UNKNOWN,
1397
1321
  ACTIVITY_PLAY_QUERY_SERVICE,
1398
- ACTIVITY_PLAY_TARGET_KIND,
1399
1322
  AUTH_LOGIN_SERVICE,
1400
1323
  MALL_INFO_SERVICE,
1401
1324
  MALL_SCOPE_KEY,
@@ -1426,10 +1349,8 @@ export {
1426
1349
  activityPlayActivitySchema,
1427
1350
  activityPlayCardDataSchema,
1428
1351
  activityPlayDescriptionSchema,
1429
- activityPlayDirectoryEntrySchema,
1430
- activityPlayEntrySchema,
1352
+ activityPlayIdSchema,
1431
1353
  activityPlayImageUrlSchema,
1432
- activityPlayPluginAliasSchema,
1433
1354
  activityPlayPrizeActivityIdSchema,
1434
1355
  activityPlayPrizeActivityTitleSchema,
1435
1356
  activityPlayPrizeCardItemSchema,
@@ -1445,10 +1366,6 @@ export {
1445
1366
  activityPlayPrizeTitleSchema,
1446
1367
  activityPlayPrizeUrlSchema,
1447
1368
  activityPlayPrizeUsageRuleTextSchema,
1448
- activityPlayRefSchema,
1449
- activityPlayStatusOf,
1450
- activityPlayTargetPageSchema,
1451
- activityPlayTargetSchema,
1452
1369
  activityPlayTimeSchema,
1453
1370
  activityPlayTitleSchema,
1454
1371
  categoryListCardDataSchema,
@@ -1,63 +1,39 @@
1
1
  /**
2
- * 活动玩法 Port(activity-play.query 查询契约 + activity-play.entry 入口准备契约——task-03)。
3
- * 语义独立于营销域(promotion.*):本包只描述「本系统登记的活动目录」的查询与参与入口
4
- * 登记,不承诺报名/场次/发奖/票券/远端同步。厂商 wire 词汇不进本层。
2
+ * 活动玩法 Port(activity-play.query 查询契约——远端活动查询,2026-11-17 改造)。
3
+ * 语义独立于营销域(promotion.*):本包只描述「供应商 API 查询到的外部活动」,
4
+ * 不承诺本地目录、参与入口、报名/场次/发奖。厂商 wire 词汇(路径、信封、状态枚举)
5
+ * 不进本层——归 provider 包 adapter。
5
6
  * 结构类型子集接口——provider 包 adapter 实现,消费方(业务模块)仅依赖契约包。
6
7
  *
7
- * 两槽一致性联检(评审判据「活动 DTO 相同不足以证明供给一致」):Port 实例**可选**
8
- * 携带 `supplyBinding`(registry 绑定键 + 供给归一目录指纹)——消费方(入口准备)比对
9
- * 两槽签名,不相等或任一侧缺席 = 不可证同源 → fail-closed ENTRY_UNAVAILABLE;
10
- * provider 名/impl 为 registry 绑定键词汇(非厂商字面量)。
8
+ * 远端语义(远端活动改造):
9
+ * - 每次业务查询取得外部事实(不在构造时缓存活动、无本地活动数据库/同步);
10
+ * - 活动范围由当前商家连接限定;已知其他商家的 activityId 也不可读
11
+ * (越权/不可见 → null,消费方映射 404);
12
+ * - 状态由供应商转换(枚举见 domain;未知值 → 'unknown',不按 active 推断);
13
+ * - 上游失败是失败(不得转成成功空列表——区分缺连接/上游故障/合法空集)。
11
14
  */
12
15
  import type { MallQueryContext } from '../query-context';
13
- import type { ActivityPlayActivity, ActivityPlayEntryRecord, ActivityPlayPage } from '../domain/activity-play';
16
+ import type { ActivityPlayActivity, ActivityPlayPage } from '../domain/activity-play';
14
17
  export declare const ACTIVITY_PLAY_QUERY_SERVICE = "activity-play.query";
15
- export declare const ACTIVITY_PLAY_ENTRY_SERVICE = "activity-play.entry";
16
18
  /** 查询上下文(三域同形——module 直接复用 toMallQueryContext 组合子即可组装) */
17
19
  export type ActivityPlayQueryContext = MallQueryContext & {
18
20
  /** 主体由登录态归一(source !== 'anonymous' 本包才写入;此处仅供类型消费方读取) */
19
21
  readonly subjectId?: string;
20
22
  };
21
- /** 列表查询输入(本期为有限本地目录,无远端分页协议) */
23
+ /** 列表查询输入(覆盖范围/排序/分页按供应商实调能力记录,不承诺全部历史) */
22
24
  export interface ActivityPlayListInput {
23
- /** 名称/说明关键词匹配(实现方负责大小写与空白归一) */
25
+ /** 名称/说明关键词匹配(上游查询或后端适配实现——覆盖范围在核验中记录) */
24
26
  readonly keyword?: string;
25
- /** 数量上限:缺省 20、范围 1—50(越界由实现方按契约钳制或拒绝) */
27
+ /** 数量上限:缺省 20、范围 1—50;越界拒绝(不可静默钳制) */
26
28
  readonly limit?: number;
27
29
  }
28
30
  /**
29
31
  * activity-play.query 槽供给端口(provider 包 adapter 实现)。
30
- * - listActivities:按登记顺序返回;隐藏停用(disabled)活动是列表语义的一部分;
31
- * 空目录(配置完整、零活动)返回空 items 而非错误;
32
- * - getActivity:活动引用精确查;不存在返回 null;停用活动照常返回(状态 = disabled)。
33
- * status 由实现方按服务端时间计算(单源助手 activityPlayStatusOf)。
32
+ * - listActivities:当前商家连接下的活动列表;合法空集返回空 items(非错误);
33
+ * - getActivity:供应商活动标识精确查;不存在/不可见/其他商家范围 → null;
34
+ * 未知状态照常返回(status = 'unknown'——不推断)。
34
35
  */
35
- /**
36
- * 供给一致性联检签名(可选成员——两 Port 同构):
37
- * - `provider`/`implementation`:registry 绑定双键(供给方自持常量——非厂商字面量词汇);
38
- * - `directoryHash`:供给归一目录的稳定指纹(含 entry 目标——目录键序无关化):
39
- * 同一供给的两槽求值(同 binding、同合并目录)恒相等;槽级/实例级覆盖造成目录分叉
40
- * (同活动字段不同 entry 目标)或绑定分叉(不同 provider/implementation)即不相等。
41
- */
42
- export interface ActivityPlaySupplyBinding {
43
- readonly provider: string;
44
- readonly implementation: string;
45
- readonly directoryHash: string;
46
- }
47
36
  export interface ActivityPlayQueryPort {
48
37
  listActivities(q: ActivityPlayQueryContext, input: ActivityPlayListInput): Promise<ActivityPlayPage>;
49
- getActivity(q: ActivityPlayQueryContext, activityRef: string): Promise<ActivityPlayActivity | null>;
50
- /** 可选:两槽一致性联检签名(entry 消费方比对;缺席 = 不可证一致→fail-closed) */
51
- readonly supplyBinding?: ActivityPlaySupplyBinding;
52
- }
53
- export interface ActivityPlayEntryPort {
54
- /**
55
- * 按可信上下文与 activityRef 读取入口登记:返回 entry 侧目录条目视图
56
- * (该供给同 ref 的活动属性 + 结构化目标),消费方做两槽一致性比对后出站;
57
- * 该 ref 无 entry 登记 → null(缺失与未配置由消费方以 ENTRY_UNAVAILABLE /
58
- * NOT_CONFIGURED 区分——槽未配置在 resolveService 阶段即显性失败)。
59
- */
60
- getEntry(q: ActivityPlayQueryContext, activityRef: string): Promise<ActivityPlayEntryRecord | null>;
61
- /** 可选:两槽一致性联检签名(消费方与 query 侧实例比对;缺席 = 不可证一致→fail-closed) */
62
- readonly supplyBinding?: ActivityPlaySupplyBinding;
38
+ getActivity(q: ActivityPlayQueryContext, activityId: string): Promise<ActivityPlayActivity | null>;
63
39
  }
@@ -195,13 +195,13 @@ export declare const pageInfoSchema: z.ZodObject<{
195
195
  total: z.ZodNumber;
196
196
  hasMore: z.ZodBoolean;
197
197
  }, "strip", z.ZodTypeAny, {
198
- page: number;
199
198
  total: number;
199
+ page: number;
200
200
  pageSize: number;
201
201
  hasMore: boolean;
202
202
  }, {
203
- page: number;
204
203
  total: number;
204
+ page: number;
205
205
  pageSize: number;
206
206
  hasMore: boolean;
207
207
  }>;
@@ -561,13 +561,13 @@ export declare const productListCardDataSchema: z.ZodObject<{
561
561
  total: z.ZodNumber;
562
562
  hasMore: z.ZodBoolean;
563
563
  }, "strip", z.ZodTypeAny, {
564
- page: number;
565
564
  total: number;
565
+ page: number;
566
566
  pageSize: number;
567
567
  hasMore: boolean;
568
568
  }, {
569
- page: number;
570
569
  total: number;
570
+ page: number;
571
571
  pageSize: number;
572
572
  hasMore: boolean;
573
573
  }>>;
@@ -655,8 +655,8 @@ export declare const productListCardDataSchema: z.ZodObject<{
655
655
  summary?: string | undefined;
656
656
  noResultsReason?: string | undefined;
657
657
  pageInfo?: {
658
- page: number;
659
658
  total: number;
659
+ page: number;
660
660
  pageSize: number;
661
661
  hasMore: boolean;
662
662
  } | undefined;
@@ -734,8 +734,8 @@ export declare const productListCardDataSchema: z.ZodObject<{
734
734
  summary?: string | undefined;
735
735
  noResultsReason?: string | undefined;
736
736
  pageInfo?: {
737
- page: number;
738
737
  total: number;
738
+ page: number;
739
739
  pageSize: number;
740
740
  hasMore: boolean;
741
741
  } | undefined;
@@ -1036,13 +1036,13 @@ export declare const shopListCardDataSchema: z.ZodObject<{
1036
1036
  total: z.ZodNumber;
1037
1037
  hasMore: z.ZodBoolean;
1038
1038
  }, "strip", z.ZodTypeAny, {
1039
- page: number;
1040
1039
  total: number;
1040
+ page: number;
1041
1041
  pageSize: number;
1042
1042
  hasMore: boolean;
1043
1043
  }, {
1044
- page: number;
1045
1044
  total: number;
1045
+ page: number;
1046
1046
  pageSize: number;
1047
1047
  hasMore: boolean;
1048
1048
  }>>;
@@ -1128,8 +1128,8 @@ export declare const shopListCardDataSchema: z.ZodObject<{
1128
1128
  summary?: string | undefined;
1129
1129
  noResultsReason?: string | undefined;
1130
1130
  pageInfo?: {
1131
- page: number;
1132
1131
  total: number;
1132
+ page: number;
1133
1133
  pageSize: number;
1134
1134
  hasMore: boolean;
1135
1135
  } | undefined;
@@ -1209,8 +1209,8 @@ export declare const shopListCardDataSchema: z.ZodObject<{
1209
1209
  summary?: string | undefined;
1210
1210
  noResultsReason?: string | undefined;
1211
1211
  pageInfo?: {
1212
- page: number;
1213
1212
  total: number;
1213
+ page: number;
1214
1214
  pageSize: number;
1215
1215
  hasMore: boolean;
1216
1216
  } | undefined;
@@ -1517,13 +1517,13 @@ export declare const merchantListCardDataSchema: z.ZodObject<{
1517
1517
  total: z.ZodNumber;
1518
1518
  hasMore: z.ZodBoolean;
1519
1519
  }, "strip", z.ZodTypeAny, {
1520
- page: number;
1521
1520
  total: number;
1521
+ page: number;
1522
1522
  pageSize: number;
1523
1523
  hasMore: boolean;
1524
1524
  }, {
1525
- page: number;
1526
1525
  total: number;
1526
+ page: number;
1527
1527
  pageSize: number;
1528
1528
  hasMore: boolean;
1529
1529
  }>>;
@@ -1609,8 +1609,8 @@ export declare const merchantListCardDataSchema: z.ZodObject<{
1609
1609
  summary?: string | undefined;
1610
1610
  noResultsReason?: string | undefined;
1611
1611
  pageInfo?: {
1612
- page: number;
1613
1612
  total: number;
1613
+ page: number;
1614
1614
  pageSize: number;
1615
1615
  hasMore: boolean;
1616
1616
  } | undefined;
@@ -1690,8 +1690,8 @@ export declare const merchantListCardDataSchema: z.ZodObject<{
1690
1690
  summary?: string | undefined;
1691
1691
  noResultsReason?: string | undefined;
1692
1692
  pageInfo?: {
1693
- page: number;
1694
1693
  total: number;
1694
+ page: number;
1695
1695
  pageSize: number;
1696
1696
  hasMore: boolean;
1697
1697
  } | undefined;
@@ -4353,13 +4353,13 @@ export declare const shoppingGuideCardDataSchemas: {
4353
4353
  total: z.ZodNumber;
4354
4354
  hasMore: z.ZodBoolean;
4355
4355
  }, "strip", z.ZodTypeAny, {
4356
- page: number;
4357
4356
  total: number;
4357
+ page: number;
4358
4358
  pageSize: number;
4359
4359
  hasMore: boolean;
4360
4360
  }, {
4361
- page: number;
4362
4361
  total: number;
4362
+ page: number;
4363
4363
  pageSize: number;
4364
4364
  hasMore: boolean;
4365
4365
  }>>;
@@ -4447,8 +4447,8 @@ export declare const shoppingGuideCardDataSchemas: {
4447
4447
  summary?: string | undefined;
4448
4448
  noResultsReason?: string | undefined;
4449
4449
  pageInfo?: {
4450
- page: number;
4451
4450
  total: number;
4451
+ page: number;
4452
4452
  pageSize: number;
4453
4453
  hasMore: boolean;
4454
4454
  } | undefined;
@@ -4526,8 +4526,8 @@ export declare const shoppingGuideCardDataSchemas: {
4526
4526
  summary?: string | undefined;
4527
4527
  noResultsReason?: string | undefined;
4528
4528
  pageInfo?: {
4529
- page: number;
4530
4529
  total: number;
4530
+ page: number;
4531
4531
  pageSize: number;
4532
4532
  hasMore: boolean;
4533
4533
  } | undefined;
@@ -5158,13 +5158,13 @@ export declare const shoppingGuideCardDataSchemas: {
5158
5158
  total: z.ZodNumber;
5159
5159
  hasMore: z.ZodBoolean;
5160
5160
  }, "strip", z.ZodTypeAny, {
5161
- page: number;
5162
5161
  total: number;
5162
+ page: number;
5163
5163
  pageSize: number;
5164
5164
  hasMore: boolean;
5165
5165
  }, {
5166
- page: number;
5167
5166
  total: number;
5167
+ page: number;
5168
5168
  pageSize: number;
5169
5169
  hasMore: boolean;
5170
5170
  }>>;
@@ -5250,8 +5250,8 @@ export declare const shoppingGuideCardDataSchemas: {
5250
5250
  summary?: string | undefined;
5251
5251
  noResultsReason?: string | undefined;
5252
5252
  pageInfo?: {
5253
- page: number;
5254
5253
  total: number;
5254
+ page: number;
5255
5255
  pageSize: number;
5256
5256
  hasMore: boolean;
5257
5257
  } | undefined;
@@ -5331,8 +5331,8 @@ export declare const shoppingGuideCardDataSchemas: {
5331
5331
  summary?: string | undefined;
5332
5332
  noResultsReason?: string | undefined;
5333
5333
  pageInfo?: {
5334
- page: number;
5335
5334
  total: number;
5335
+ page: number;
5336
5336
  pageSize: number;
5337
5337
  hasMore: boolean;
5338
5338
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-contracts-mall",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
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": "0.13.4",
33
33
  "zod": "3.25.76"
34
34
  },
35
35
  "devDependencies": {
@@ -1,8 +1,9 @@
1
1
  /**
2
- * 活动玩法域卡片数据契约(task-02 服务端出卡)。
2
+ * 活动玩法域卡片数据契约(远端活动改造 2026-11-17)。
3
3
  * 单一稳定 CardType `activity-play`,mode 区分列表/详情传输形态——视觉由前端渲染器
4
4
  * 按 mode 组织,传输层不拆分多卡型(与 promotion 域 9 卡型形态区分)。
5
- * 条目复用 activityPlayActivitySchema(含 B 端 enabled 剥离——卡data 不带配置字段)。
5
+ * 条目复用 activityPlayActivitySchema(供应商活动对象——卡 data 不带本地目录/入口配置字段)。
6
+ * 本人奖品两张卡型归任务 07,不在本契约预置空实现。
6
7
  * 信封字段(卡片 ID/时间戳/历史标记/版本)由 SDK 生成,不在本契约。
7
8
  */
8
9
  import { z } from 'zod';
@@ -15,7 +16,7 @@ export const activityPlayCardDataSchema = z
15
16
  mallId: z.string().min(1),
16
17
  /** 传输形态:list(列表,可空,≤50 项)/ detail(详情,恰好 1 项,可携 disabled) */
17
18
  mode: z.enum(['list', 'detail']),
18
- /** 活动条目(契约单源 ActivityPlayActivity;不带 enabled 配置字段)——list 可空 ≤50 项 */
19
+ /** 活动条目(供应商活动对象:activityId/title/status 等——list 可空 ≤50 项) */
19
20
  items: z.array(activityPlayActivitySchema).max(50),
20
21
  })
21
22
  .superRefine((data, ctx) => {