@tbox.cn/app-contracts-mall 0.12.4 → 0.13.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/assembly.d.ts +7 -7
- package/dist/{chunk-KIZD6FZ2.js → chunk-CV5ICZCZ.js} +6 -1
- package/dist/domain/parking.d.ts +2 -2
- package/dist/domain/shopping-guide.d.ts +1 -1
- package/dist/guard.d.ts +2 -2
- package/dist/mall-scope-url.d.ts +1 -1
- package/dist/member/cards.d.ts +3 -3
- package/dist/parking/cards.d.ts +1 -1
- package/dist/promotion/cards.d.ts +6 -6
- package/dist/query-context.d.ts +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +11 -9
- package/dist/scope.d.ts +16 -7
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/request-credentials.d.ts +2 -2
- package/dist/services/customer-service.d.ts +4 -3
- package/dist/services/member.d.ts +15 -15
- package/dist/services/parking.d.ts +5 -5
- package/dist/services/promotion.d.ts +4 -3
- package/dist/services/shopping-guide.d.ts +3 -1
- package/dist/shared/cards.d.ts +2 -2
- package/dist/shopping-guide/cards.d.ts +11 -11
- package/package.json +2 -2
- package/src/assembly.ts +7 -7
- package/src/domain/parking.ts +2 -2
- package/src/domain/shopping-guide.ts +1 -1
- package/src/guard.ts +2 -2
- package/src/mall-scope-url.ts +1 -1
- package/src/member/cards.ts +3 -3
- package/src/parking/cards.ts +1 -1
- package/src/promotion/cards.ts +2 -2
- package/src/query-context.ts +1 -1
- package/src/runtime.ts +3 -3
- package/src/scope.ts +20 -7
- package/src/server/index.ts +1 -1
- package/src/server/mall-control-plane.ts +2 -2
- package/src/server/request-credentials.ts +2 -2
- package/src/services/customer-service.ts +4 -3
- package/src/services/mall-info.ts +1 -1
- package/src/services/member.ts +22 -22
- package/src/services/parking.ts +7 -7
- package/src/services/promotion.ts +4 -3
- package/src/services/shopping-guide.ts +3 -1
- package/src/shared/cards.ts +2 -2
- package/src/shopping-guide/cards.ts +7 -7
package/src/shared/cards.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 商圈通用卡片片段(0.3.2
|
|
2
|
+
* 商圈通用卡片片段(0.3.2 actionDraftSchema 单源——从 shopping-guide/cards.ts 抽出,
|
|
3
3
|
* 四域条目动作共用;index.ts 与 runtime.ts 均 re-export 本文件,M2 导出面)。
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 卡内条目动作草稿(判别联合——仅客户端本地语义,write 变体无 token 机制支撑不进)。
|
|
10
10
|
* - send:发消息(value 缺省用 label);link:打开 URL(tel:/https:)。
|
|
11
11
|
* 渲染端经 card-action-handler 既有通道分发(零新机制);zod 判别联合天然拒未知 kind。
|
|
12
12
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 导购域卡片数据契约(
|
|
3
|
-
* 源:POC @tbox/shopping-guide contracts(TypeBox)→ zod 重写(coerce 语义按
|
|
2
|
+
* 导购域卡片数据契约(shopping-guide 11 卡 zod schema,TIER1)。
|
|
3
|
+
* 源:POC @tbox/shopping-guide contracts(TypeBox)→ zod 重写(coerce 语义按 字符串化收窄)。
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
@@ -76,7 +76,7 @@ const shopCouponSchema = z.object({
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* 卡内条目动作草稿(0.3.2
|
|
79
|
+
* 卡内条目动作草稿(0.3.2 单源移至 shared/cards.ts,本处 import + re-export 保既有消费方)。
|
|
80
80
|
*/
|
|
81
81
|
import { actionDraftSchema } from '../shared/cards';
|
|
82
82
|
export { actionDraftSchema };
|
|
@@ -233,7 +233,7 @@ export const categoryListCardDataSchema = z.object({
|
|
|
233
233
|
subCategories: z
|
|
234
234
|
.array(z.object({ code: z.string(), name: z.string(), merchantCount: z.number().int().min(0) }))
|
|
235
235
|
.optional(),
|
|
236
|
-
/** 0.3.2
|
|
236
|
+
/** 0.3.2 类别条目动作(send 合成话术/外链) */
|
|
237
237
|
itemActions: z.array(actionDraftSchema).optional(),
|
|
238
238
|
}),
|
|
239
239
|
),
|
|
@@ -280,7 +280,7 @@ export const productComparisonCardDataSchema = z.object({
|
|
|
280
280
|
caveats: z.array(z.string()),
|
|
281
281
|
}),
|
|
282
282
|
),
|
|
283
|
-
/** 0.3.2
|
|
283
|
+
/** 0.3.2 刷新截止时间(ISO);到期后渲染端禁用全部条目交互 */
|
|
284
284
|
refreshRequiredAt: isoDateTimeSchema.optional(),
|
|
285
285
|
observedAt: isoDateTimeSchema,
|
|
286
286
|
});
|
|
@@ -300,7 +300,7 @@ export const mallDirectoryCardDataSchema = z.object({
|
|
|
300
300
|
floorName: z.string(),
|
|
301
301
|
businessCategories: z.array(z.string()),
|
|
302
302
|
merchantCount: z.number().int().min(0),
|
|
303
|
-
/** 0.3.2
|
|
303
|
+
/** 0.3.2 楼层条目动作(send:查看楼层门店) */
|
|
304
304
|
itemActions: z.array(actionDraftSchema).optional(),
|
|
305
305
|
}),
|
|
306
306
|
),
|
|
@@ -335,7 +335,7 @@ export const customerServiceFaqCardDataSchema = z.object({
|
|
|
335
335
|
answer: z.string().min(1),
|
|
336
336
|
category: z.string().optional(),
|
|
337
337
|
relevanceScore: z.number().min(0).max(1),
|
|
338
|
-
/** 0.3.2
|
|
338
|
+
/** 0.3.2 答案参考外链(openLink) */
|
|
339
339
|
referenceUrl: httpsUrlSchema.optional(),
|
|
340
340
|
}),
|
|
341
341
|
),
|