@tbox.cn/app-contracts-mall 0.1.1 → 0.9.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/README.md +16 -2
- package/dist/alipay-activity/cards.d.ts +305 -0
- package/dist/assembly.d.ts +54 -0
- package/dist/chunk-KIZD6FZ2.js +43 -0
- package/dist/deployment.d.ts +42 -0
- package/dist/domain/activity.d.ts +64 -0
- package/dist/domain/coupon.d.ts +2 -0
- package/dist/domain/entitlement.d.ts +53 -0
- package/dist/domain/offer.d.ts +111 -0
- package/dist/domain/operation.d.ts +22 -0
- package/dist/domain/parking.d.ts +195 -12
- package/dist/domain/points.d.ts +3 -2
- package/dist/domain/shopping-guide.d.ts +201 -0
- package/dist/guard.d.ts +50 -0
- package/dist/index.d.ts +22 -2
- package/dist/member/cards.d.ts +940 -0
- package/dist/parking/cards.d.ts +1271 -0
- package/dist/promotion/cards.d.ts +2529 -0
- package/dist/query-context.d.ts +47 -0
- package/dist/runtime.d.ts +20 -0
- package/dist/runtime.js +1281 -0
- package/dist/scope.d.ts +76 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.js +80 -0
- package/dist/server/mall-context.d.ts +24 -0
- package/dist/server/mall-control-plane.d.ts +8 -0
- package/dist/server/request-credentials.d.ts +22 -0
- package/dist/services/customer-service.d.ts +11 -0
- package/dist/services/mall-info.d.ts +26 -0
- package/dist/services/member.d.ts +243 -9
- package/dist/services/parking.d.ts +105 -12
- package/dist/services/promotion.d.ts +100 -4
- package/dist/services/shopping-guide.d.ts +97 -0
- package/dist/shared/cards.d.ts +42 -0
- package/dist/shopping-guide/cards.d.ts +7039 -0
- package/package.json +19 -8
- package/src/alipay-activity/cards.ts +66 -0
- package/src/assembly.ts +103 -0
- package/src/deployment.ts +44 -0
- package/src/domain/activity.ts +66 -0
- package/src/domain/coupon.ts +3 -0
- package/src/domain/entitlement.ts +56 -0
- package/src/domain/offer.ts +120 -0
- package/src/domain/operation.ts +40 -0
- package/src/domain/parking.ts +206 -12
- package/src/domain/points.ts +3 -2
- package/src/domain/shopping-guide.ts +242 -0
- package/src/guard.ts +48 -0
- package/src/index.ts +22 -2
- package/src/member/cards.ts +209 -0
- package/src/parking/cards.ts +233 -0
- package/src/promotion/cards.ts +290 -0
- package/src/query-context.ts +81 -0
- package/src/runtime.ts +41 -0
- package/src/scope.ts +92 -0
- package/src/server/index.ts +11 -0
- package/src/server/mall-context.ts +39 -0
- package/src/server/mall-control-plane.ts +56 -0
- package/src/server/request-credentials.ts +43 -0
- package/src/service-slots.json +23 -0
- package/src/services/customer-service.ts +12 -0
- package/src/services/mall-info.ts +31 -0
- package/src/services/member.ts +354 -9
- package/src/services/parking.ts +161 -11
- package/src/services/promotion.ts +124 -4
- package/src/services/shopping-guide.ts +138 -0
- package/src/shared/cards.ts +25 -0
- package/src/shopping-guide/cards.ts +438 -0
- package/tests/assembly-validate-scope.test.ts +132 -0
- package/tests/cards.test.ts +586 -0
- package/tests/context-unification.test.ts +73 -0
- package/tests/mall-control-plane.test.ts +86 -0
- package/tests/member-status.test.ts +197 -0
- package/tests/query-context.test.ts +111 -0
- package/tests/request-credentials.test.ts +38 -0
- package/tests/resolve-primitives.test.ts +55 -0
- package/tests/service-slots.test.ts +78 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,940 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 会员域卡片数据契约(011 K2:member 卡 zod schema,TIER1;券面 0.4.0 净删——promotion 承接)。
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const memberAuthStateSchema: z.ZodEnum<["authenticated", "unauthenticated"]>;
|
|
6
|
+
export declare const memberStateSchema: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
|
|
7
|
+
/** PRD 6.6 首批会员偏好问题;卡片展示、意图路由与记忆写入共用同一真源。 */
|
|
8
|
+
export declare const MEMBER_PREFERENCE_VALUES: readonly ["我常来买衣服", "我常带娃来玩", "我常来吃美食"];
|
|
9
|
+
export declare const memberPreferenceValueSchema: z.ZodEnum<["我常来买衣服", "我常带娃来玩", "我常来吃美食"]>;
|
|
10
|
+
export type MemberPreferenceValue = z.infer<typeof memberPreferenceValueSchema>;
|
|
11
|
+
export declare const MEMBER_PREFERENCE_PROMPTS: ReadonlyArray<{
|
|
12
|
+
value: MemberPreferenceValue;
|
|
13
|
+
query: string;
|
|
14
|
+
}>;
|
|
15
|
+
/** 按偏好触发导购能力时使用的检索语句;与用户可见按钮文案解耦。 */
|
|
16
|
+
export declare const MEMBER_PREFERENCE_RECOMMENDATION_QUERIES: Readonly<Record<MemberPreferenceValue, string>>;
|
|
17
|
+
/** member-info:账户 + 资料摘要 */
|
|
18
|
+
export declare const memberInfoCardDataSchema: z.ZodObject<{
|
|
19
|
+
userId: z.ZodString;
|
|
20
|
+
authState: z.ZodEnum<["authenticated", "unauthenticated"]>;
|
|
21
|
+
state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
|
|
22
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
23
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
24
|
+
contactDisplay: z.ZodOptional<z.ZodString>;
|
|
25
|
+
memberRef: z.ZodOptional<z.ZodString>;
|
|
26
|
+
registeredAt: z.ZodOptional<z.ZodString>;
|
|
27
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
28
|
+
labelRef: z.ZodString;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
name: string;
|
|
32
|
+
labelRef: string;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
labelRef: string;
|
|
36
|
+
}>, "many">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
userId: string;
|
|
39
|
+
authState: "authenticated" | "unauthenticated";
|
|
40
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
41
|
+
labels: {
|
|
42
|
+
name: string;
|
|
43
|
+
labelRef: string;
|
|
44
|
+
}[];
|
|
45
|
+
displayName?: string | undefined;
|
|
46
|
+
avatarUrl?: string | undefined;
|
|
47
|
+
contactDisplay?: string | undefined;
|
|
48
|
+
memberRef?: string | undefined;
|
|
49
|
+
registeredAt?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
userId: string;
|
|
52
|
+
authState: "authenticated" | "unauthenticated";
|
|
53
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
54
|
+
labels: {
|
|
55
|
+
name: string;
|
|
56
|
+
labelRef: string;
|
|
57
|
+
}[];
|
|
58
|
+
displayName?: string | undefined;
|
|
59
|
+
avatarUrl?: string | undefined;
|
|
60
|
+
contactDisplay?: string | undefined;
|
|
61
|
+
memberRef?: string | undefined;
|
|
62
|
+
registeredAt?: string | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
export type MemberInfoCardData = z.infer<typeof memberInfoCardDataSchema>;
|
|
65
|
+
/** member-card-summary:会员卡面(真实卡名、卡图与积分摘要) */
|
|
66
|
+
export declare const memberCardSummaryCardDataSchema: z.ZodObject<{
|
|
67
|
+
userId: z.ZodString;
|
|
68
|
+
cardRef: z.ZodString;
|
|
69
|
+
cardDisplay: z.ZodString;
|
|
70
|
+
status: z.ZodEnum<["active", "inactive", "frozen", "expired", "unknown"]>;
|
|
71
|
+
levelName: z.ZodOptional<z.ZodString>;
|
|
72
|
+
availablePoints: z.ZodNumber;
|
|
73
|
+
cardImageUrl: z.ZodOptional<z.ZodString>;
|
|
74
|
+
pointsRuleImageUrl: z.ZodOptional<z.ZodString>;
|
|
75
|
+
pointsRuleContent: z.ZodOptional<z.ZodString>;
|
|
76
|
+
pointsUrl: z.ZodOptional<z.ZodString>;
|
|
77
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
variant: z.ZodEnum<["blue", "silver", "gold", "black"]>;
|
|
79
|
+
labelsEmbedded: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
82
|
+
labelsEmbedded?: boolean | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
85
|
+
labelsEmbedded?: boolean | undefined;
|
|
86
|
+
}>>;
|
|
87
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
daySpentCents: z.ZodNumber;
|
|
89
|
+
yearSpentCents: z.ZodNumber;
|
|
90
|
+
percent: z.ZodNumber;
|
|
91
|
+
message: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
message: string;
|
|
94
|
+
daySpentCents: number;
|
|
95
|
+
yearSpentCents: number;
|
|
96
|
+
percent: number;
|
|
97
|
+
}, {
|
|
98
|
+
message: string;
|
|
99
|
+
daySpentCents: number;
|
|
100
|
+
yearSpentCents: number;
|
|
101
|
+
percent: number;
|
|
102
|
+
}>>;
|
|
103
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
|
+
benefitRef: z.ZodString;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
iconUrl: z.ZodOptional<z.ZodString>;
|
|
107
|
+
description: z.ZodOptional<z.ZodString>;
|
|
108
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
kind: z.ZodEnum<["miniapp", "dialog", "toast"]>;
|
|
110
|
+
url: z.ZodOptional<z.ZodString>;
|
|
111
|
+
title: z.ZodOptional<z.ZodString>;
|
|
112
|
+
text: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
115
|
+
url?: string | undefined;
|
|
116
|
+
text?: string | undefined;
|
|
117
|
+
title?: string | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
120
|
+
url?: string | undefined;
|
|
121
|
+
text?: string | undefined;
|
|
122
|
+
title?: string | undefined;
|
|
123
|
+
}>>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
name: string;
|
|
126
|
+
benefitRef: string;
|
|
127
|
+
description?: string | undefined;
|
|
128
|
+
iconUrl?: string | undefined;
|
|
129
|
+
action?: {
|
|
130
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
131
|
+
url?: string | undefined;
|
|
132
|
+
text?: string | undefined;
|
|
133
|
+
title?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
name: string;
|
|
137
|
+
benefitRef: string;
|
|
138
|
+
description?: string | undefined;
|
|
139
|
+
iconUrl?: string | undefined;
|
|
140
|
+
action?: {
|
|
141
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
142
|
+
url?: string | undefined;
|
|
143
|
+
text?: string | undefined;
|
|
144
|
+
title?: string | undefined;
|
|
145
|
+
} | undefined;
|
|
146
|
+
}>, "many">>;
|
|
147
|
+
/** 入会后偏好引导;首批固定三项,保留数组形态便于后续扩展。 */
|
|
148
|
+
preferencePrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
value: z.ZodEnum<["我常来买衣服", "我常带娃来玩", "我常来吃美食"]>;
|
|
150
|
+
query: z.ZodString;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
153
|
+
query: string;
|
|
154
|
+
}, {
|
|
155
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
156
|
+
query: string;
|
|
157
|
+
}>, "many">>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
status: "unknown" | "active" | "inactive" | "frozen" | "expired";
|
|
160
|
+
userId: string;
|
|
161
|
+
cardRef: string;
|
|
162
|
+
cardDisplay: string;
|
|
163
|
+
availablePoints: number;
|
|
164
|
+
levelName?: string | undefined;
|
|
165
|
+
cardImageUrl?: string | undefined;
|
|
166
|
+
pointsRuleImageUrl?: string | undefined;
|
|
167
|
+
pointsRuleContent?: string | undefined;
|
|
168
|
+
pointsUrl?: string | undefined;
|
|
169
|
+
presentation?: {
|
|
170
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
171
|
+
labelsEmbedded?: boolean | undefined;
|
|
172
|
+
} | undefined;
|
|
173
|
+
progress?: {
|
|
174
|
+
message: string;
|
|
175
|
+
daySpentCents: number;
|
|
176
|
+
yearSpentCents: number;
|
|
177
|
+
percent: number;
|
|
178
|
+
} | undefined;
|
|
179
|
+
benefits?: {
|
|
180
|
+
name: string;
|
|
181
|
+
benefitRef: string;
|
|
182
|
+
description?: string | undefined;
|
|
183
|
+
iconUrl?: string | undefined;
|
|
184
|
+
action?: {
|
|
185
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
186
|
+
url?: string | undefined;
|
|
187
|
+
text?: string | undefined;
|
|
188
|
+
title?: string | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
}[] | undefined;
|
|
191
|
+
preferencePrompts?: {
|
|
192
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
193
|
+
query: string;
|
|
194
|
+
}[] | undefined;
|
|
195
|
+
}, {
|
|
196
|
+
status: "unknown" | "active" | "inactive" | "frozen" | "expired";
|
|
197
|
+
userId: string;
|
|
198
|
+
cardRef: string;
|
|
199
|
+
cardDisplay: string;
|
|
200
|
+
availablePoints: number;
|
|
201
|
+
levelName?: string | undefined;
|
|
202
|
+
cardImageUrl?: string | undefined;
|
|
203
|
+
pointsRuleImageUrl?: string | undefined;
|
|
204
|
+
pointsRuleContent?: string | undefined;
|
|
205
|
+
pointsUrl?: string | undefined;
|
|
206
|
+
presentation?: {
|
|
207
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
208
|
+
labelsEmbedded?: boolean | undefined;
|
|
209
|
+
} | undefined;
|
|
210
|
+
progress?: {
|
|
211
|
+
message: string;
|
|
212
|
+
daySpentCents: number;
|
|
213
|
+
yearSpentCents: number;
|
|
214
|
+
percent: number;
|
|
215
|
+
} | undefined;
|
|
216
|
+
benefits?: {
|
|
217
|
+
name: string;
|
|
218
|
+
benefitRef: string;
|
|
219
|
+
description?: string | undefined;
|
|
220
|
+
iconUrl?: string | undefined;
|
|
221
|
+
action?: {
|
|
222
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
223
|
+
url?: string | undefined;
|
|
224
|
+
text?: string | undefined;
|
|
225
|
+
title?: string | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
preferencePrompts?: {
|
|
229
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
230
|
+
query: string;
|
|
231
|
+
}[] | undefined;
|
|
232
|
+
}>;
|
|
233
|
+
export type MemberCardSummaryCardData = z.infer<typeof memberCardSummaryCardDataSchema>;
|
|
234
|
+
/**
|
|
235
|
+
* member-point-usage-list(011 K3:余额、厂商会员标签与积分流水)。
|
|
236
|
+
*/
|
|
237
|
+
export declare const memberPointUsageListCardDataSchema: z.ZodObject<{
|
|
238
|
+
userId: z.ZodString;
|
|
239
|
+
balance: z.ZodNumber;
|
|
240
|
+
membershipLabel: z.ZodOptional<z.ZodString>;
|
|
241
|
+
items: z.ZodArray<z.ZodObject<{
|
|
242
|
+
usageRecordRef: z.ZodString;
|
|
243
|
+
title: z.ZodString;
|
|
244
|
+
amount: z.ZodString;
|
|
245
|
+
usedAt: z.ZodOptional<z.ZodString>;
|
|
246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, "strip", z.ZodTypeAny, {
|
|
248
|
+
title: string;
|
|
249
|
+
usageRecordRef: string;
|
|
250
|
+
amount: string;
|
|
251
|
+
description?: string | undefined;
|
|
252
|
+
usedAt?: string | undefined;
|
|
253
|
+
}, {
|
|
254
|
+
title: string;
|
|
255
|
+
usageRecordRef: string;
|
|
256
|
+
amount: string;
|
|
257
|
+
description?: string | undefined;
|
|
258
|
+
usedAt?: string | undefined;
|
|
259
|
+
}>, "many">;
|
|
260
|
+
total: z.ZodNumber;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
userId: string;
|
|
263
|
+
total: number;
|
|
264
|
+
items: {
|
|
265
|
+
title: string;
|
|
266
|
+
usageRecordRef: string;
|
|
267
|
+
amount: string;
|
|
268
|
+
description?: string | undefined;
|
|
269
|
+
usedAt?: string | undefined;
|
|
270
|
+
}[];
|
|
271
|
+
balance: number;
|
|
272
|
+
membershipLabel?: string | undefined;
|
|
273
|
+
}, {
|
|
274
|
+
userId: string;
|
|
275
|
+
total: number;
|
|
276
|
+
items: {
|
|
277
|
+
title: string;
|
|
278
|
+
usageRecordRef: string;
|
|
279
|
+
amount: string;
|
|
280
|
+
description?: string | undefined;
|
|
281
|
+
usedAt?: string | undefined;
|
|
282
|
+
}[];
|
|
283
|
+
balance: number;
|
|
284
|
+
membershipLabel?: string | undefined;
|
|
285
|
+
}>;
|
|
286
|
+
export type MemberPointUsageListCardData = z.infer<typeof memberPointUsageListCardDataSchema>;
|
|
287
|
+
/** member-enrollment-form(入会表单;015 升级:授权预填 + consent + formVersion) */
|
|
288
|
+
export declare const memberEnrollmentFormCardDataSchema: z.ZodObject<{
|
|
289
|
+
userId: z.ZodString;
|
|
290
|
+
state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
|
|
291
|
+
/** 表单版本(幂等键组成部分) */
|
|
292
|
+
formVersion: z.ZodString;
|
|
293
|
+
/** 表单字段(readOnly = 授权预填锁定;prefill = 预填值) */
|
|
294
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
295
|
+
fieldId: z.ZodString;
|
|
296
|
+
label: z.ZodString;
|
|
297
|
+
type: z.ZodEnum<["text", "tel", "select", "date"]>;
|
|
298
|
+
required: z.ZodBoolean;
|
|
299
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
300
|
+
prefill: z.ZodOptional<z.ZodString>;
|
|
301
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
302
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
type: "date" | "text" | "tel" | "select";
|
|
305
|
+
required: boolean;
|
|
306
|
+
label: string;
|
|
307
|
+
fieldId: string;
|
|
308
|
+
options?: string[] | undefined;
|
|
309
|
+
readOnly?: boolean | undefined;
|
|
310
|
+
prefill?: string | undefined;
|
|
311
|
+
placeholder?: string | undefined;
|
|
312
|
+
}, {
|
|
313
|
+
type: "date" | "text" | "tel" | "select";
|
|
314
|
+
required: boolean;
|
|
315
|
+
label: string;
|
|
316
|
+
fieldId: string;
|
|
317
|
+
options?: string[] | undefined;
|
|
318
|
+
readOnly?: boolean | undefined;
|
|
319
|
+
prefill?: string | undefined;
|
|
320
|
+
placeholder?: string | undefined;
|
|
321
|
+
}>, "many">;
|
|
322
|
+
/** 隐私/条款同意项(required 必勾) */
|
|
323
|
+
consents: z.ZodArray<z.ZodObject<{
|
|
324
|
+
consentId: z.ZodString;
|
|
325
|
+
version: z.ZodString;
|
|
326
|
+
title: z.ZodString;
|
|
327
|
+
required: z.ZodBoolean;
|
|
328
|
+
url: z.ZodOptional<z.ZodString>;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
required: boolean;
|
|
331
|
+
title: string;
|
|
332
|
+
consentId: string;
|
|
333
|
+
version: string;
|
|
334
|
+
url?: string | undefined;
|
|
335
|
+
}, {
|
|
336
|
+
required: boolean;
|
|
337
|
+
title: string;
|
|
338
|
+
consentId: string;
|
|
339
|
+
version: string;
|
|
340
|
+
url?: string | undefined;
|
|
341
|
+
}>, "many">;
|
|
342
|
+
/** 支付宝授权状态(required → 渲染授权按钮;authorized → mobile 预填 readOnly) */
|
|
343
|
+
authorization: z.ZodObject<{
|
|
344
|
+
status: z.ZodEnum<["required", "authorized", "unavailable"]>;
|
|
345
|
+
mobileMasked: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
status: "required" | "unavailable" | "authorized";
|
|
348
|
+
mobileMasked?: string | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
status: "required" | "unavailable" | "authorized";
|
|
351
|
+
mobileMasked?: string | undefined;
|
|
352
|
+
}>;
|
|
353
|
+
/** 手动填写模式提示(授权不可用降级) */
|
|
354
|
+
manualNotice: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
userId: string;
|
|
357
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
358
|
+
formVersion: string;
|
|
359
|
+
fields: {
|
|
360
|
+
type: "date" | "text" | "tel" | "select";
|
|
361
|
+
required: boolean;
|
|
362
|
+
label: string;
|
|
363
|
+
fieldId: string;
|
|
364
|
+
options?: string[] | undefined;
|
|
365
|
+
readOnly?: boolean | undefined;
|
|
366
|
+
prefill?: string | undefined;
|
|
367
|
+
placeholder?: string | undefined;
|
|
368
|
+
}[];
|
|
369
|
+
consents: {
|
|
370
|
+
required: boolean;
|
|
371
|
+
title: string;
|
|
372
|
+
consentId: string;
|
|
373
|
+
version: string;
|
|
374
|
+
url?: string | undefined;
|
|
375
|
+
}[];
|
|
376
|
+
authorization: {
|
|
377
|
+
status: "required" | "unavailable" | "authorized";
|
|
378
|
+
mobileMasked?: string | undefined;
|
|
379
|
+
};
|
|
380
|
+
manualNotice?: string | undefined;
|
|
381
|
+
}, {
|
|
382
|
+
userId: string;
|
|
383
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
384
|
+
formVersion: string;
|
|
385
|
+
fields: {
|
|
386
|
+
type: "date" | "text" | "tel" | "select";
|
|
387
|
+
required: boolean;
|
|
388
|
+
label: string;
|
|
389
|
+
fieldId: string;
|
|
390
|
+
options?: string[] | undefined;
|
|
391
|
+
readOnly?: boolean | undefined;
|
|
392
|
+
prefill?: string | undefined;
|
|
393
|
+
placeholder?: string | undefined;
|
|
394
|
+
}[];
|
|
395
|
+
consents: {
|
|
396
|
+
required: boolean;
|
|
397
|
+
title: string;
|
|
398
|
+
consentId: string;
|
|
399
|
+
version: string;
|
|
400
|
+
url?: string | undefined;
|
|
401
|
+
}[];
|
|
402
|
+
authorization: {
|
|
403
|
+
status: "required" | "unavailable" | "authorized";
|
|
404
|
+
mobileMasked?: string | undefined;
|
|
405
|
+
};
|
|
406
|
+
manualNotice?: string | undefined;
|
|
407
|
+
}>;
|
|
408
|
+
export type MemberEnrollmentFormCardData = z.infer<typeof memberEnrollmentFormCardDataSchema>;
|
|
409
|
+
/** member-enrollment-status(入会结果状态卡;pending 态附显式刷新按钮,R4) */
|
|
410
|
+
export declare const memberEnrollmentStatusCardDataSchema: z.ZodObject<{
|
|
411
|
+
userId: z.ZodString;
|
|
412
|
+
attemptRef: z.ZodOptional<z.ZodString>;
|
|
413
|
+
state: z.ZodEnum<["pending_confirmation", "confirmation_timeout", "active", "failed"]>;
|
|
414
|
+
memberRef: z.ZodOptional<z.ZodString>;
|
|
415
|
+
message: z.ZodOptional<z.ZodString>;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
userId: string;
|
|
418
|
+
state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
|
|
419
|
+
message?: string | undefined;
|
|
420
|
+
memberRef?: string | undefined;
|
|
421
|
+
attemptRef?: string | undefined;
|
|
422
|
+
}, {
|
|
423
|
+
userId: string;
|
|
424
|
+
state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
|
|
425
|
+
message?: string | undefined;
|
|
426
|
+
memberRef?: string | undefined;
|
|
427
|
+
attemptRef?: string | undefined;
|
|
428
|
+
}>;
|
|
429
|
+
export type MemberEnrollmentStatusCardData = z.infer<typeof memberEnrollmentStatusCardDataSchema>;
|
|
430
|
+
/** member-enrollment-cta:开卡入会引导卡(点击跳转 alipays 链接) */
|
|
431
|
+
export declare const memberEnrollmentCtaCardDataSchema: z.ZodObject<{
|
|
432
|
+
userId: z.ZodString;
|
|
433
|
+
authState: z.ZodLiteral<"authenticated">;
|
|
434
|
+
state: z.ZodEnum<["not_enrolled", "closed"]>;
|
|
435
|
+
/**
|
|
436
|
+
* alipays:// 深链,由部署配置注入;**可选透传素材**——出卡不依赖它,
|
|
437
|
+
* 壳能力(getLoginState/openGate)缺席时兜底 openLink 用,未配置恒出卡(无此字段)
|
|
438
|
+
*/
|
|
439
|
+
enrollUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
440
|
+
title: z.ZodOptional<z.ZodString>;
|
|
441
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
442
|
+
/**
|
|
443
|
+
* 入会权益提示列表(工具层注入通用文案;不得包含折扣/免费停车等未经系统确认的承诺)。
|
|
444
|
+
* 缺省不展示,由渲染层按有无决定是否渲染区块。
|
|
445
|
+
*/
|
|
446
|
+
perks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
447
|
+
}, "strip", z.ZodTypeAny, {
|
|
448
|
+
userId: string;
|
|
449
|
+
authState: "authenticated";
|
|
450
|
+
state: "not_enrolled" | "closed";
|
|
451
|
+
enrollUrl?: string | undefined;
|
|
452
|
+
title?: string | undefined;
|
|
453
|
+
subtitle?: string | undefined;
|
|
454
|
+
perks?: string[] | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
userId: string;
|
|
457
|
+
authState: "authenticated";
|
|
458
|
+
state: "not_enrolled" | "closed";
|
|
459
|
+
enrollUrl?: string | undefined;
|
|
460
|
+
title?: string | undefined;
|
|
461
|
+
subtitle?: string | undefined;
|
|
462
|
+
perks?: string[] | undefined;
|
|
463
|
+
}>;
|
|
464
|
+
export type MemberEnrollmentCtaCardData = z.infer<typeof memberEnrollmentCtaCardDataSchema>;
|
|
465
|
+
/**
|
|
466
|
+
* member-login-cta:未登录引导卡(点击跳转商场小程序登录页,登录后回到智能体)。
|
|
467
|
+
*
|
|
468
|
+
* 与 member-enrollment-cta 的分界:**登录 ≠ 入会**。这张卡的前提是「还没有身份」,
|
|
469
|
+
* 故不带 userId / authState——那两个字段此刻根本拿不到。开卡入会是登录之后的下一步。
|
|
470
|
+
*
|
|
471
|
+
* 说明文案由组件写死(「登录后可解锁全部功能」):曾按触发场景分别注入,实测各处理由
|
|
472
|
+
* 大同小异,留一个 optional 字段只会变成没人写的死字段。真要分场景再加回来。
|
|
473
|
+
*/
|
|
474
|
+
export declare const memberLoginCtaCardDataSchema: z.ZodObject<{
|
|
475
|
+
/**
|
|
476
|
+
* 商场小程序登录页深链,由部署配置注入;**可选透传素材**——出卡不依赖它,
|
|
477
|
+
* 壳能力(getLoginState)缺席时兜底 openLink 用,未配置恒出卡(无此字段)
|
|
478
|
+
*/
|
|
479
|
+
loginUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
480
|
+
title: z.ZodOptional<z.ZodString>;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
loginUrl?: string | undefined;
|
|
483
|
+
title?: string | undefined;
|
|
484
|
+
}, {
|
|
485
|
+
loginUrl?: string | undefined;
|
|
486
|
+
title?: string | undefined;
|
|
487
|
+
}>;
|
|
488
|
+
export type MemberLoginCtaCardData = z.infer<typeof memberLoginCtaCardDataSchema>;
|
|
489
|
+
/** 7 卡 schema map(cardType → dataSchema;券面 0.4.0 净删——promotion 承接) */
|
|
490
|
+
export declare const memberCardDataSchemas: {
|
|
491
|
+
readonly 'member-info': z.ZodObject<{
|
|
492
|
+
userId: z.ZodString;
|
|
493
|
+
authState: z.ZodEnum<["authenticated", "unauthenticated"]>;
|
|
494
|
+
state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
|
|
495
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
496
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
497
|
+
contactDisplay: z.ZodOptional<z.ZodString>;
|
|
498
|
+
memberRef: z.ZodOptional<z.ZodString>;
|
|
499
|
+
registeredAt: z.ZodOptional<z.ZodString>;
|
|
500
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
501
|
+
labelRef: z.ZodString;
|
|
502
|
+
name: z.ZodString;
|
|
503
|
+
}, "strip", z.ZodTypeAny, {
|
|
504
|
+
name: string;
|
|
505
|
+
labelRef: string;
|
|
506
|
+
}, {
|
|
507
|
+
name: string;
|
|
508
|
+
labelRef: string;
|
|
509
|
+
}>, "many">;
|
|
510
|
+
}, "strip", z.ZodTypeAny, {
|
|
511
|
+
userId: string;
|
|
512
|
+
authState: "authenticated" | "unauthenticated";
|
|
513
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
514
|
+
labels: {
|
|
515
|
+
name: string;
|
|
516
|
+
labelRef: string;
|
|
517
|
+
}[];
|
|
518
|
+
displayName?: string | undefined;
|
|
519
|
+
avatarUrl?: string | undefined;
|
|
520
|
+
contactDisplay?: string | undefined;
|
|
521
|
+
memberRef?: string | undefined;
|
|
522
|
+
registeredAt?: string | undefined;
|
|
523
|
+
}, {
|
|
524
|
+
userId: string;
|
|
525
|
+
authState: "authenticated" | "unauthenticated";
|
|
526
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
527
|
+
labels: {
|
|
528
|
+
name: string;
|
|
529
|
+
labelRef: string;
|
|
530
|
+
}[];
|
|
531
|
+
displayName?: string | undefined;
|
|
532
|
+
avatarUrl?: string | undefined;
|
|
533
|
+
contactDisplay?: string | undefined;
|
|
534
|
+
memberRef?: string | undefined;
|
|
535
|
+
registeredAt?: string | undefined;
|
|
536
|
+
}>;
|
|
537
|
+
readonly 'member-card-summary': z.ZodObject<{
|
|
538
|
+
userId: z.ZodString;
|
|
539
|
+
cardRef: z.ZodString;
|
|
540
|
+
cardDisplay: z.ZodString;
|
|
541
|
+
status: z.ZodEnum<["active", "inactive", "frozen", "expired", "unknown"]>;
|
|
542
|
+
levelName: z.ZodOptional<z.ZodString>;
|
|
543
|
+
availablePoints: z.ZodNumber;
|
|
544
|
+
cardImageUrl: z.ZodOptional<z.ZodString>;
|
|
545
|
+
pointsRuleImageUrl: z.ZodOptional<z.ZodString>;
|
|
546
|
+
pointsRuleContent: z.ZodOptional<z.ZodString>;
|
|
547
|
+
pointsUrl: z.ZodOptional<z.ZodString>;
|
|
548
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
549
|
+
variant: z.ZodEnum<["blue", "silver", "gold", "black"]>;
|
|
550
|
+
labelsEmbedded: z.ZodOptional<z.ZodBoolean>;
|
|
551
|
+
}, "strip", z.ZodTypeAny, {
|
|
552
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
553
|
+
labelsEmbedded?: boolean | undefined;
|
|
554
|
+
}, {
|
|
555
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
556
|
+
labelsEmbedded?: boolean | undefined;
|
|
557
|
+
}>>;
|
|
558
|
+
progress: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
daySpentCents: z.ZodNumber;
|
|
560
|
+
yearSpentCents: z.ZodNumber;
|
|
561
|
+
percent: z.ZodNumber;
|
|
562
|
+
message: z.ZodString;
|
|
563
|
+
}, "strip", z.ZodTypeAny, {
|
|
564
|
+
message: string;
|
|
565
|
+
daySpentCents: number;
|
|
566
|
+
yearSpentCents: number;
|
|
567
|
+
percent: number;
|
|
568
|
+
}, {
|
|
569
|
+
message: string;
|
|
570
|
+
daySpentCents: number;
|
|
571
|
+
yearSpentCents: number;
|
|
572
|
+
percent: number;
|
|
573
|
+
}>>;
|
|
574
|
+
benefits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
575
|
+
benefitRef: z.ZodString;
|
|
576
|
+
name: z.ZodString;
|
|
577
|
+
iconUrl: z.ZodOptional<z.ZodString>;
|
|
578
|
+
description: z.ZodOptional<z.ZodString>;
|
|
579
|
+
action: z.ZodOptional<z.ZodObject<{
|
|
580
|
+
kind: z.ZodEnum<["miniapp", "dialog", "toast"]>;
|
|
581
|
+
url: z.ZodOptional<z.ZodString>;
|
|
582
|
+
title: z.ZodOptional<z.ZodString>;
|
|
583
|
+
text: z.ZodOptional<z.ZodString>;
|
|
584
|
+
}, "strip", z.ZodTypeAny, {
|
|
585
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
586
|
+
url?: string | undefined;
|
|
587
|
+
text?: string | undefined;
|
|
588
|
+
title?: string | undefined;
|
|
589
|
+
}, {
|
|
590
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
591
|
+
url?: string | undefined;
|
|
592
|
+
text?: string | undefined;
|
|
593
|
+
title?: string | undefined;
|
|
594
|
+
}>>;
|
|
595
|
+
}, "strip", z.ZodTypeAny, {
|
|
596
|
+
name: string;
|
|
597
|
+
benefitRef: string;
|
|
598
|
+
description?: string | undefined;
|
|
599
|
+
iconUrl?: string | undefined;
|
|
600
|
+
action?: {
|
|
601
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
602
|
+
url?: string | undefined;
|
|
603
|
+
text?: string | undefined;
|
|
604
|
+
title?: string | undefined;
|
|
605
|
+
} | undefined;
|
|
606
|
+
}, {
|
|
607
|
+
name: string;
|
|
608
|
+
benefitRef: string;
|
|
609
|
+
description?: string | undefined;
|
|
610
|
+
iconUrl?: string | undefined;
|
|
611
|
+
action?: {
|
|
612
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
613
|
+
url?: string | undefined;
|
|
614
|
+
text?: string | undefined;
|
|
615
|
+
title?: string | undefined;
|
|
616
|
+
} | undefined;
|
|
617
|
+
}>, "many">>;
|
|
618
|
+
/** 入会后偏好引导;首批固定三项,保留数组形态便于后续扩展。 */
|
|
619
|
+
preferencePrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
620
|
+
value: z.ZodEnum<["我常来买衣服", "我常带娃来玩", "我常来吃美食"]>;
|
|
621
|
+
query: z.ZodString;
|
|
622
|
+
}, "strip", z.ZodTypeAny, {
|
|
623
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
624
|
+
query: string;
|
|
625
|
+
}, {
|
|
626
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
627
|
+
query: string;
|
|
628
|
+
}>, "many">>;
|
|
629
|
+
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
status: "unknown" | "active" | "inactive" | "frozen" | "expired";
|
|
631
|
+
userId: string;
|
|
632
|
+
cardRef: string;
|
|
633
|
+
cardDisplay: string;
|
|
634
|
+
availablePoints: number;
|
|
635
|
+
levelName?: string | undefined;
|
|
636
|
+
cardImageUrl?: string | undefined;
|
|
637
|
+
pointsRuleImageUrl?: string | undefined;
|
|
638
|
+
pointsRuleContent?: string | undefined;
|
|
639
|
+
pointsUrl?: string | undefined;
|
|
640
|
+
presentation?: {
|
|
641
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
642
|
+
labelsEmbedded?: boolean | undefined;
|
|
643
|
+
} | undefined;
|
|
644
|
+
progress?: {
|
|
645
|
+
message: string;
|
|
646
|
+
daySpentCents: number;
|
|
647
|
+
yearSpentCents: number;
|
|
648
|
+
percent: number;
|
|
649
|
+
} | undefined;
|
|
650
|
+
benefits?: {
|
|
651
|
+
name: string;
|
|
652
|
+
benefitRef: string;
|
|
653
|
+
description?: string | undefined;
|
|
654
|
+
iconUrl?: string | undefined;
|
|
655
|
+
action?: {
|
|
656
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
657
|
+
url?: string | undefined;
|
|
658
|
+
text?: string | undefined;
|
|
659
|
+
title?: string | undefined;
|
|
660
|
+
} | undefined;
|
|
661
|
+
}[] | undefined;
|
|
662
|
+
preferencePrompts?: {
|
|
663
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
664
|
+
query: string;
|
|
665
|
+
}[] | undefined;
|
|
666
|
+
}, {
|
|
667
|
+
status: "unknown" | "active" | "inactive" | "frozen" | "expired";
|
|
668
|
+
userId: string;
|
|
669
|
+
cardRef: string;
|
|
670
|
+
cardDisplay: string;
|
|
671
|
+
availablePoints: number;
|
|
672
|
+
levelName?: string | undefined;
|
|
673
|
+
cardImageUrl?: string | undefined;
|
|
674
|
+
pointsRuleImageUrl?: string | undefined;
|
|
675
|
+
pointsRuleContent?: string | undefined;
|
|
676
|
+
pointsUrl?: string | undefined;
|
|
677
|
+
presentation?: {
|
|
678
|
+
variant: "silver" | "gold" | "blue" | "black";
|
|
679
|
+
labelsEmbedded?: boolean | undefined;
|
|
680
|
+
} | undefined;
|
|
681
|
+
progress?: {
|
|
682
|
+
message: string;
|
|
683
|
+
daySpentCents: number;
|
|
684
|
+
yearSpentCents: number;
|
|
685
|
+
percent: number;
|
|
686
|
+
} | undefined;
|
|
687
|
+
benefits?: {
|
|
688
|
+
name: string;
|
|
689
|
+
benefitRef: string;
|
|
690
|
+
description?: string | undefined;
|
|
691
|
+
iconUrl?: string | undefined;
|
|
692
|
+
action?: {
|
|
693
|
+
kind: "toast" | "miniapp" | "dialog";
|
|
694
|
+
url?: string | undefined;
|
|
695
|
+
text?: string | undefined;
|
|
696
|
+
title?: string | undefined;
|
|
697
|
+
} | undefined;
|
|
698
|
+
}[] | undefined;
|
|
699
|
+
preferencePrompts?: {
|
|
700
|
+
value: "我常来买衣服" | "我常带娃来玩" | "我常来吃美食";
|
|
701
|
+
query: string;
|
|
702
|
+
}[] | undefined;
|
|
703
|
+
}>;
|
|
704
|
+
readonly 'member-point-usage-list': z.ZodObject<{
|
|
705
|
+
userId: z.ZodString;
|
|
706
|
+
balance: z.ZodNumber;
|
|
707
|
+
membershipLabel: z.ZodOptional<z.ZodString>;
|
|
708
|
+
items: z.ZodArray<z.ZodObject<{
|
|
709
|
+
usageRecordRef: z.ZodString;
|
|
710
|
+
title: z.ZodString;
|
|
711
|
+
amount: z.ZodString;
|
|
712
|
+
usedAt: z.ZodOptional<z.ZodString>;
|
|
713
|
+
description: z.ZodOptional<z.ZodString>;
|
|
714
|
+
}, "strip", z.ZodTypeAny, {
|
|
715
|
+
title: string;
|
|
716
|
+
usageRecordRef: string;
|
|
717
|
+
amount: string;
|
|
718
|
+
description?: string | undefined;
|
|
719
|
+
usedAt?: string | undefined;
|
|
720
|
+
}, {
|
|
721
|
+
title: string;
|
|
722
|
+
usageRecordRef: string;
|
|
723
|
+
amount: string;
|
|
724
|
+
description?: string | undefined;
|
|
725
|
+
usedAt?: string | undefined;
|
|
726
|
+
}>, "many">;
|
|
727
|
+
total: z.ZodNumber;
|
|
728
|
+
}, "strip", z.ZodTypeAny, {
|
|
729
|
+
userId: string;
|
|
730
|
+
total: number;
|
|
731
|
+
items: {
|
|
732
|
+
title: string;
|
|
733
|
+
usageRecordRef: string;
|
|
734
|
+
amount: string;
|
|
735
|
+
description?: string | undefined;
|
|
736
|
+
usedAt?: string | undefined;
|
|
737
|
+
}[];
|
|
738
|
+
balance: number;
|
|
739
|
+
membershipLabel?: string | undefined;
|
|
740
|
+
}, {
|
|
741
|
+
userId: string;
|
|
742
|
+
total: number;
|
|
743
|
+
items: {
|
|
744
|
+
title: string;
|
|
745
|
+
usageRecordRef: string;
|
|
746
|
+
amount: string;
|
|
747
|
+
description?: string | undefined;
|
|
748
|
+
usedAt?: string | undefined;
|
|
749
|
+
}[];
|
|
750
|
+
balance: number;
|
|
751
|
+
membershipLabel?: string | undefined;
|
|
752
|
+
}>;
|
|
753
|
+
readonly 'member-enrollment-form': z.ZodObject<{
|
|
754
|
+
userId: z.ZodString;
|
|
755
|
+
state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
|
|
756
|
+
/** 表单版本(幂等键组成部分) */
|
|
757
|
+
formVersion: z.ZodString;
|
|
758
|
+
/** 表单字段(readOnly = 授权预填锁定;prefill = 预填值) */
|
|
759
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
760
|
+
fieldId: z.ZodString;
|
|
761
|
+
label: z.ZodString;
|
|
762
|
+
type: z.ZodEnum<["text", "tel", "select", "date"]>;
|
|
763
|
+
required: z.ZodBoolean;
|
|
764
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
+
prefill: z.ZodOptional<z.ZodString>;
|
|
766
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
767
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
768
|
+
}, "strip", z.ZodTypeAny, {
|
|
769
|
+
type: "date" | "text" | "tel" | "select";
|
|
770
|
+
required: boolean;
|
|
771
|
+
label: string;
|
|
772
|
+
fieldId: string;
|
|
773
|
+
options?: string[] | undefined;
|
|
774
|
+
readOnly?: boolean | undefined;
|
|
775
|
+
prefill?: string | undefined;
|
|
776
|
+
placeholder?: string | undefined;
|
|
777
|
+
}, {
|
|
778
|
+
type: "date" | "text" | "tel" | "select";
|
|
779
|
+
required: boolean;
|
|
780
|
+
label: string;
|
|
781
|
+
fieldId: string;
|
|
782
|
+
options?: string[] | undefined;
|
|
783
|
+
readOnly?: boolean | undefined;
|
|
784
|
+
prefill?: string | undefined;
|
|
785
|
+
placeholder?: string | undefined;
|
|
786
|
+
}>, "many">;
|
|
787
|
+
/** 隐私/条款同意项(required 必勾) */
|
|
788
|
+
consents: z.ZodArray<z.ZodObject<{
|
|
789
|
+
consentId: z.ZodString;
|
|
790
|
+
version: z.ZodString;
|
|
791
|
+
title: z.ZodString;
|
|
792
|
+
required: z.ZodBoolean;
|
|
793
|
+
url: z.ZodOptional<z.ZodString>;
|
|
794
|
+
}, "strip", z.ZodTypeAny, {
|
|
795
|
+
required: boolean;
|
|
796
|
+
title: string;
|
|
797
|
+
consentId: string;
|
|
798
|
+
version: string;
|
|
799
|
+
url?: string | undefined;
|
|
800
|
+
}, {
|
|
801
|
+
required: boolean;
|
|
802
|
+
title: string;
|
|
803
|
+
consentId: string;
|
|
804
|
+
version: string;
|
|
805
|
+
url?: string | undefined;
|
|
806
|
+
}>, "many">;
|
|
807
|
+
/** 支付宝授权状态(required → 渲染授权按钮;authorized → mobile 预填 readOnly) */
|
|
808
|
+
authorization: z.ZodObject<{
|
|
809
|
+
status: z.ZodEnum<["required", "authorized", "unavailable"]>;
|
|
810
|
+
mobileMasked: z.ZodOptional<z.ZodString>;
|
|
811
|
+
}, "strip", z.ZodTypeAny, {
|
|
812
|
+
status: "required" | "unavailable" | "authorized";
|
|
813
|
+
mobileMasked?: string | undefined;
|
|
814
|
+
}, {
|
|
815
|
+
status: "required" | "unavailable" | "authorized";
|
|
816
|
+
mobileMasked?: string | undefined;
|
|
817
|
+
}>;
|
|
818
|
+
/** 手动填写模式提示(授权不可用降级) */
|
|
819
|
+
manualNotice: z.ZodOptional<z.ZodString>;
|
|
820
|
+
}, "strip", z.ZodTypeAny, {
|
|
821
|
+
userId: string;
|
|
822
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
823
|
+
formVersion: string;
|
|
824
|
+
fields: {
|
|
825
|
+
type: "date" | "text" | "tel" | "select";
|
|
826
|
+
required: boolean;
|
|
827
|
+
label: string;
|
|
828
|
+
fieldId: string;
|
|
829
|
+
options?: string[] | undefined;
|
|
830
|
+
readOnly?: boolean | undefined;
|
|
831
|
+
prefill?: string | undefined;
|
|
832
|
+
placeholder?: string | undefined;
|
|
833
|
+
}[];
|
|
834
|
+
consents: {
|
|
835
|
+
required: boolean;
|
|
836
|
+
title: string;
|
|
837
|
+
consentId: string;
|
|
838
|
+
version: string;
|
|
839
|
+
url?: string | undefined;
|
|
840
|
+
}[];
|
|
841
|
+
authorization: {
|
|
842
|
+
status: "required" | "unavailable" | "authorized";
|
|
843
|
+
mobileMasked?: string | undefined;
|
|
844
|
+
};
|
|
845
|
+
manualNotice?: string | undefined;
|
|
846
|
+
}, {
|
|
847
|
+
userId: string;
|
|
848
|
+
state: "unknown" | "active" | "not_enrolled" | "closed";
|
|
849
|
+
formVersion: string;
|
|
850
|
+
fields: {
|
|
851
|
+
type: "date" | "text" | "tel" | "select";
|
|
852
|
+
required: boolean;
|
|
853
|
+
label: string;
|
|
854
|
+
fieldId: string;
|
|
855
|
+
options?: string[] | undefined;
|
|
856
|
+
readOnly?: boolean | undefined;
|
|
857
|
+
prefill?: string | undefined;
|
|
858
|
+
placeholder?: string | undefined;
|
|
859
|
+
}[];
|
|
860
|
+
consents: {
|
|
861
|
+
required: boolean;
|
|
862
|
+
title: string;
|
|
863
|
+
consentId: string;
|
|
864
|
+
version: string;
|
|
865
|
+
url?: string | undefined;
|
|
866
|
+
}[];
|
|
867
|
+
authorization: {
|
|
868
|
+
status: "required" | "unavailable" | "authorized";
|
|
869
|
+
mobileMasked?: string | undefined;
|
|
870
|
+
};
|
|
871
|
+
manualNotice?: string | undefined;
|
|
872
|
+
}>;
|
|
873
|
+
readonly 'member-enrollment-status': z.ZodObject<{
|
|
874
|
+
userId: z.ZodString;
|
|
875
|
+
attemptRef: z.ZodOptional<z.ZodString>;
|
|
876
|
+
state: z.ZodEnum<["pending_confirmation", "confirmation_timeout", "active", "failed"]>;
|
|
877
|
+
memberRef: z.ZodOptional<z.ZodString>;
|
|
878
|
+
message: z.ZodOptional<z.ZodString>;
|
|
879
|
+
}, "strip", z.ZodTypeAny, {
|
|
880
|
+
userId: string;
|
|
881
|
+
state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
|
|
882
|
+
message?: string | undefined;
|
|
883
|
+
memberRef?: string | undefined;
|
|
884
|
+
attemptRef?: string | undefined;
|
|
885
|
+
}, {
|
|
886
|
+
userId: string;
|
|
887
|
+
state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
|
|
888
|
+
message?: string | undefined;
|
|
889
|
+
memberRef?: string | undefined;
|
|
890
|
+
attemptRef?: string | undefined;
|
|
891
|
+
}>;
|
|
892
|
+
readonly 'member-enrollment-cta': z.ZodObject<{
|
|
893
|
+
userId: z.ZodString;
|
|
894
|
+
authState: z.ZodLiteral<"authenticated">;
|
|
895
|
+
state: z.ZodEnum<["not_enrolled", "closed"]>;
|
|
896
|
+
/**
|
|
897
|
+
* alipays:// 深链,由部署配置注入;**可选透传素材**——出卡不依赖它,
|
|
898
|
+
* 壳能力(getLoginState/openGate)缺席时兜底 openLink 用,未配置恒出卡(无此字段)
|
|
899
|
+
*/
|
|
900
|
+
enrollUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
901
|
+
title: z.ZodOptional<z.ZodString>;
|
|
902
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
903
|
+
/**
|
|
904
|
+
* 入会权益提示列表(工具层注入通用文案;不得包含折扣/免费停车等未经系统确认的承诺)。
|
|
905
|
+
* 缺省不展示,由渲染层按有无决定是否渲染区块。
|
|
906
|
+
*/
|
|
907
|
+
perks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
908
|
+
}, "strip", z.ZodTypeAny, {
|
|
909
|
+
userId: string;
|
|
910
|
+
authState: "authenticated";
|
|
911
|
+
state: "not_enrolled" | "closed";
|
|
912
|
+
enrollUrl?: string | undefined;
|
|
913
|
+
title?: string | undefined;
|
|
914
|
+
subtitle?: string | undefined;
|
|
915
|
+
perks?: string[] | undefined;
|
|
916
|
+
}, {
|
|
917
|
+
userId: string;
|
|
918
|
+
authState: "authenticated";
|
|
919
|
+
state: "not_enrolled" | "closed";
|
|
920
|
+
enrollUrl?: string | undefined;
|
|
921
|
+
title?: string | undefined;
|
|
922
|
+
subtitle?: string | undefined;
|
|
923
|
+
perks?: string[] | undefined;
|
|
924
|
+
}>;
|
|
925
|
+
readonly 'member-login-cta': z.ZodObject<{
|
|
926
|
+
/**
|
|
927
|
+
* 商场小程序登录页深链,由部署配置注入;**可选透传素材**——出卡不依赖它,
|
|
928
|
+
* 壳能力(getLoginState)缺席时兜底 openLink 用,未配置恒出卡(无此字段)
|
|
929
|
+
*/
|
|
930
|
+
loginUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
931
|
+
title: z.ZodOptional<z.ZodString>;
|
|
932
|
+
}, "strip", z.ZodTypeAny, {
|
|
933
|
+
loginUrl?: string | undefined;
|
|
934
|
+
title?: string | undefined;
|
|
935
|
+
}, {
|
|
936
|
+
loginUrl?: string | undefined;
|
|
937
|
+
title?: string | undefined;
|
|
938
|
+
}>;
|
|
939
|
+
};
|
|
940
|
+
export type MemberCardType = keyof typeof memberCardDataSchemas;
|