@tbox.cn/app-contracts-mall 0.18.0 → 1.0.0-alpha.10
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/README.md +1 -1
- package/dist/activity-play/cards.d.ts +111 -10
- package/dist/activity-play-prize/cards.d.ts +35 -100
- package/dist/alipay-activity/cards.d.ts +30 -30
- package/dist/domain/activity-play-prize.d.ts +2 -2
- package/dist/domain/activity-play.d.ts +71 -2
- package/dist/member/cards.d.ts +56 -56
- package/dist/parking/cards.d.ts +4 -4
- package/dist/promotion/cards.d.ts +216 -216
- package/dist/runtime.js +9 -6
- package/dist/services/member.d.ts +1 -1
- package/dist/services/parking.d.ts +1 -1
- package/dist/services/promotion.d.ts +1 -1
- package/dist/shared/cards.d.ts +6 -6
- package/dist/shopping-guide/cards.d.ts +716 -716
- package/package.json +3 -3
- package/src/activity-play-prize/cards.ts +1 -25
- package/src/domain/activity-play.ts +15 -0
- package/src/services/member.ts +1 -1
- package/src/services/parking.ts +1 -1
- package/src/services/promotion.ts +1 -1
- package/tests/activity-play-prize.test.ts +0 -20
- package/tests/activity-play.test.ts +16 -0
package/dist/runtime.js
CHANGED
|
@@ -209,6 +209,15 @@ var activityPlayActivitySchema = z.object({
|
|
|
209
209
|
title: activityPlayTitleSchema,
|
|
210
210
|
description: activityPlayDescriptionSchema.optional(),
|
|
211
211
|
imageUrl: activityPlayImageUrlSchema.optional(),
|
|
212
|
+
detailCoverUrl: activityPlayImageUrlSchema.optional(),
|
|
213
|
+
participationRules: z.object({ ruleTexts: z.array(z.string().min(1)) }).strict().optional(),
|
|
214
|
+
rewardSummary: z.object({
|
|
215
|
+
items: z.array(z.object({
|
|
216
|
+
title: z.string().min(1),
|
|
217
|
+
tierName: z.string().min(1),
|
|
218
|
+
imageUrl: activityPlayImageUrlSchema.optional()
|
|
219
|
+
}).strict())
|
|
220
|
+
}).strict().optional(),
|
|
212
221
|
startsAt: activityPlayTimeSchema.optional(),
|
|
213
222
|
endsAt: activityPlayTimeSchema.optional(),
|
|
214
223
|
status: z.enum(["not_started", "active", "ended", "disabled", "unknown"])
|
|
@@ -1294,7 +1303,6 @@ var activityPlayCardDataSchema = z10.object({
|
|
|
1294
1303
|
// src/activity-play-prize/cards.ts
|
|
1295
1304
|
import { z as z11 } from "zod";
|
|
1296
1305
|
var ACTIVITY_PLAY_PRIZE_LIST_CARD_TYPE = "activity-play-prize-list";
|
|
1297
|
-
var ACTIVITY_PLAY_PRIZE_DETAIL_CARD_TYPE = "activity-play-prize-detail";
|
|
1298
1306
|
var ACTIVITY_PLAY_PRIZE_CARD_MAX_ITEMS = 50;
|
|
1299
1307
|
var activityPlayPrizeCardItemSchema = activityPlayPrizeRecordSchema.extend({
|
|
1300
1308
|
itemActions: z11.array(actionDraftSchema).max(4).optional()
|
|
@@ -1309,13 +1317,9 @@ var activityPlayPrizeListCardDataSchema = z11.object({
|
|
|
1309
1317
|
/** 展示截断标记:items 超出 50 条展示上限被截断时为 true(total 仍为真实值——展示范围 ≠ 记录范围) */
|
|
1310
1318
|
truncated: z11.boolean().optional()
|
|
1311
1319
|
}).strict();
|
|
1312
|
-
var activityPlayPrizeDetailCardDataSchema = activityPlayPrizeDetailSchema.extend({
|
|
1313
|
-
mallId: z11.string().min(1)
|
|
1314
|
-
}).strict();
|
|
1315
1320
|
export {
|
|
1316
1321
|
ACTIVITY_PLAY_PRIZES_SERVICE,
|
|
1317
1322
|
ACTIVITY_PLAY_PRIZE_CARD_MAX_ITEMS,
|
|
1318
|
-
ACTIVITY_PLAY_PRIZE_DETAIL_CARD_TYPE,
|
|
1319
1323
|
ACTIVITY_PLAY_PRIZE_LIST_CARD_TYPE,
|
|
1320
1324
|
ACTIVITY_PLAY_PRIZE_STATUS_UNKNOWN,
|
|
1321
1325
|
ACTIVITY_PLAY_QUERY_SERVICE,
|
|
@@ -1354,7 +1358,6 @@ export {
|
|
|
1354
1358
|
activityPlayPrizeActivityIdSchema,
|
|
1355
1359
|
activityPlayPrizeActivityTitleSchema,
|
|
1356
1360
|
activityPlayPrizeCardItemSchema,
|
|
1357
|
-
activityPlayPrizeDetailCardDataSchema,
|
|
1358
1361
|
activityPlayPrizeDetailSchema,
|
|
1359
1362
|
activityPlayPrizeListCardDataSchema,
|
|
1360
1363
|
activityPlayPrizeListResultSchema,
|
|
@@ -5,7 +5,7 @@ import type { Identity, RequestContext } from '@tbox.cn/app-contracts';
|
|
|
5
5
|
* 会员域 Port(每服务槽一接口):账户 / 资料 / 卡面 / 权益(含积分) / 入会 五业务 Port +
|
|
6
6
|
* 跨模块工厂契约。结构类型子集接口——模块完整实现 extends 本接口,消费方仅依赖契约包。
|
|
7
7
|
* 自定义 API 接入:每个 Port = 你的后端需提供的一组能力(经 provider-custom 落地,指引:
|
|
8
|
-
*
|
|
8
|
+
* pnpm exec tbox-app skills get provider-custom)。
|
|
9
9
|
*/
|
|
10
10
|
export declare const MEMBER_ACCOUNT_SERVICE = "member.account";
|
|
11
11
|
export declare const MEMBER_PROFILE_SERVICE = "member.profile";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 停车域 Port(查询 / 缴费 / 车辆 三槽各一 Port):结算写全部收口进 ParkingPaymentPort
|
|
3
3
|
* (厂商真实支付链)。自定义 API 接入:每个 Port = 你的后端需提供的一组能力
|
|
4
|
-
* (经 provider-custom 落地,指引:
|
|
4
|
+
* (经 provider-custom 落地,指引:pnpm exec tbox-app skills get provider-custom)。
|
|
5
5
|
*/
|
|
6
6
|
import type { MallScope } from '../scope';
|
|
7
7
|
import type { RequestContext } from '@tbox.cn/app-contracts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 营销域 Port(查询三 Port + 领取写一 Port,按读写边界拆分)——自定义 API 接入:每个
|
|
3
3
|
* Port = 你的后端需提供的一组能力(经 provider-custom 落地,指引:
|
|
4
|
-
*
|
|
4
|
+
* pnpm exec tbox-app skills get provider-custom)。
|
|
5
5
|
* 结构类型子集接口——模块完整实现 extends 本接口,消费方仅依赖契约包。
|
|
6
6
|
* C 端主体经 ctx.requestContext.credentials;externalMemberRef 由消费方经 member 域
|
|
7
7
|
* 状态服务解析('member.status' 判定 + externalMemberRefOf 取值)。
|
package/dist/shared/cards.d.ts
CHANGED
|
@@ -17,13 +17,13 @@ export declare const actionDraftSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodOb
|
|
|
17
17
|
* 缺省则 visible=true,直接展示 value/label */
|
|
18
18
|
visibleValue: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
kind: "send";
|
|
21
20
|
label: string;
|
|
21
|
+
kind: "send";
|
|
22
22
|
value?: string | undefined;
|
|
23
23
|
visibleValue?: string | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
kind: "send";
|
|
26
25
|
label: string;
|
|
26
|
+
kind: "send";
|
|
27
27
|
value?: string | undefined;
|
|
28
28
|
visibleValue?: string | undefined;
|
|
29
29
|
}>, z.ZodObject<{
|
|
@@ -31,12 +31,12 @@ export declare const actionDraftSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodOb
|
|
|
31
31
|
label: z.ZodString;
|
|
32
32
|
url: z.ZodString;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
url: string;
|
|
35
|
-
kind: "link";
|
|
36
34
|
label: string;
|
|
37
|
-
}, {
|
|
38
|
-
url: string;
|
|
39
35
|
kind: "link";
|
|
36
|
+
url: string;
|
|
37
|
+
}, {
|
|
40
38
|
label: string;
|
|
39
|
+
kind: "link";
|
|
40
|
+
url: string;
|
|
41
41
|
}>]>;
|
|
42
42
|
export type ActionDraft = z.infer<typeof actionDraftSchema>;
|