@tbox.cn/app-contracts-mall 0.2.0 → 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.
Files changed (81) hide show
  1. package/README.md +16 -2
  2. package/dist/alipay-activity/cards.d.ts +305 -0
  3. package/dist/assembly.d.ts +31 -6
  4. package/dist/chunk-KIZD6FZ2.js +43 -0
  5. package/dist/deployment.d.ts +32 -33
  6. package/dist/domain/activity.d.ts +64 -0
  7. package/dist/domain/coupon.d.ts +2 -0
  8. package/dist/domain/entitlement.d.ts +53 -0
  9. package/dist/domain/offer.d.ts +111 -0
  10. package/dist/domain/operation.d.ts +22 -0
  11. package/dist/domain/parking.d.ts +195 -12
  12. package/dist/domain/points.d.ts +3 -2
  13. package/dist/domain/shopping-guide.d.ts +201 -0
  14. package/dist/index.d.ts +14 -2
  15. package/dist/member/cards.d.ts +636 -213
  16. package/dist/parking/cards.d.ts +1271 -0
  17. package/dist/promotion/cards.d.ts +2529 -0
  18. package/dist/query-context.d.ts +47 -0
  19. package/dist/runtime.d.ts +11 -2
  20. package/dist/runtime.js +910 -86
  21. package/dist/scope.d.ts +42 -15
  22. package/dist/server/index.d.ts +11 -0
  23. package/dist/server/index.js +80 -0
  24. package/dist/server/mall-context.d.ts +24 -0
  25. package/dist/server/mall-control-plane.d.ts +8 -0
  26. package/dist/server/request-credentials.d.ts +22 -0
  27. package/dist/services/customer-service.d.ts +11 -0
  28. package/dist/services/mall-info.d.ts +26 -0
  29. package/dist/services/member.d.ts +173 -31
  30. package/dist/services/parking.d.ts +105 -12
  31. package/dist/services/promotion.d.ts +100 -4
  32. package/dist/services/shopping-guide.d.ts +97 -0
  33. package/dist/shared/cards.d.ts +42 -0
  34. package/dist/shopping-guide/cards.d.ts +3399 -561
  35. package/package.json +18 -7
  36. package/src/alipay-activity/cards.ts +66 -0
  37. package/src/assembly.ts +103 -0
  38. package/src/deployment.ts +44 -0
  39. package/src/domain/activity.ts +66 -0
  40. package/src/domain/coupon.ts +11 -0
  41. package/src/domain/discount.ts +6 -0
  42. package/src/domain/entitlement.ts +56 -0
  43. package/src/domain/offer.ts +120 -0
  44. package/src/domain/operation.ts +40 -0
  45. package/src/domain/parking.ts +207 -0
  46. package/src/domain/points.ts +15 -0
  47. package/src/domain/shopping-guide.ts +242 -0
  48. package/src/events/index.ts +10 -0
  49. package/src/guard.ts +48 -0
  50. package/src/index.ts +33 -0
  51. package/src/member/cards.ts +209 -0
  52. package/src/parking/cards.ts +233 -0
  53. package/src/promotion/cards.ts +290 -0
  54. package/src/query-context.ts +81 -0
  55. package/src/runtime.ts +41 -0
  56. package/src/scope.ts +92 -0
  57. package/src/server/index.ts +11 -0
  58. package/src/server/mall-context.ts +39 -0
  59. package/src/server/mall-control-plane.ts +56 -0
  60. package/src/server/request-credentials.ts +43 -0
  61. package/src/service-slots.json +23 -0
  62. package/src/services/customer-service.ts +12 -0
  63. package/src/services/mall-info.ts +31 -0
  64. package/src/services/member.ts +366 -0
  65. package/src/services/parking.ts +166 -0
  66. package/src/services/promotion.ts +126 -0
  67. package/src/services/shopping-guide.ts +138 -0
  68. package/src/shared/cards.ts +25 -0
  69. package/src/shopping-guide/cards.ts +438 -0
  70. package/tests/assembly-validate-scope.test.ts +132 -0
  71. package/tests/cards.test.ts +586 -0
  72. package/tests/context-unification.test.ts +73 -0
  73. package/tests/mall-control-plane.test.ts +86 -0
  74. package/tests/member-status.test.ts +197 -0
  75. package/tests/query-context.test.ts +111 -0
  76. package/tests/request-credentials.test.ts +38 -0
  77. package/tests/resolve-primitives.test.ts +55 -0
  78. package/tests/service-slots.test.ts +78 -0
  79. package/tsconfig.build.json +15 -0
  80. package/tsconfig.json +5 -0
  81. package/dist/shopping-guide/ports.d.ts +0 -216
@@ -1,12 +1,24 @@
1
1
  /**
2
- * 会员域卡片数据契约(011 K2:member 7 卡 zod schema,TIER1)。
2
+ * 会员域卡片数据契约(011 K2:member 卡 zod schema,TIER1;券面 0.4.0 净删——promotion 承接)。
3
3
  */
4
4
  import { z } from 'zod';
5
- export declare const memberStateSchema: z.ZodEnum<["active", "not_enrolled", "closed"]>;
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>>;
6
17
  /** member-info:账户 + 资料摘要 */
7
18
  export declare const memberInfoCardDataSchema: z.ZodObject<{
8
19
  userId: z.ZodString;
9
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
20
+ authState: z.ZodEnum<["authenticated", "unauthenticated"]>;
21
+ state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
10
22
  displayName: z.ZodOptional<z.ZodString>;
11
23
  avatarUrl: z.ZodOptional<z.ZodString>;
12
24
  contactDisplay: z.ZodOptional<z.ZodString>;
@@ -24,31 +36,33 @@ export declare const memberInfoCardDataSchema: z.ZodObject<{
24
36
  }>, "many">;
25
37
  }, "strip", z.ZodTypeAny, {
26
38
  userId: string;
27
- state: "active" | "not_enrolled" | "closed";
39
+ authState: "authenticated" | "unauthenticated";
40
+ state: "unknown" | "active" | "not_enrolled" | "closed";
28
41
  labels: {
29
42
  name: string;
30
43
  labelRef: string;
31
44
  }[];
32
- avatarUrl?: string | undefined;
33
45
  displayName?: string | undefined;
46
+ avatarUrl?: string | undefined;
34
47
  contactDisplay?: string | undefined;
35
48
  memberRef?: string | undefined;
36
49
  registeredAt?: string | undefined;
37
50
  }, {
38
51
  userId: string;
39
- state: "active" | "not_enrolled" | "closed";
52
+ authState: "authenticated" | "unauthenticated";
53
+ state: "unknown" | "active" | "not_enrolled" | "closed";
40
54
  labels: {
41
55
  name: string;
42
56
  labelRef: string;
43
57
  }[];
44
- avatarUrl?: string | undefined;
45
58
  displayName?: string | undefined;
59
+ avatarUrl?: string | undefined;
46
60
  contactDisplay?: string | undefined;
47
61
  memberRef?: string | undefined;
48
62
  registeredAt?: string | undefined;
49
63
  }>;
50
64
  export type MemberInfoCardData = z.infer<typeof memberInfoCardDataSchema>;
51
- /** member-card-summary:会员卡面(等级 + 积分摘要) */
65
+ /** member-card-summary:会员卡面(真实卡名、卡图与积分摘要) */
52
66
  export declare const memberCardSummaryCardDataSchema: z.ZodObject<{
53
67
  userId: z.ZodString;
54
68
  cardRef: z.ZodString;
@@ -57,108 +71,173 @@ export declare const memberCardSummaryCardDataSchema: z.ZodObject<{
57
71
  levelName: z.ZodOptional<z.ZodString>;
58
72
  availablePoints: z.ZodNumber;
59
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">>;
60
158
  }, "strip", z.ZodTypeAny, {
61
- status: "active" | "unknown" | "inactive" | "frozen" | "expired";
159
+ status: "unknown" | "active" | "inactive" | "frozen" | "expired";
62
160
  userId: string;
63
161
  cardRef: string;
64
162
  cardDisplay: string;
65
163
  availablePoints: number;
66
164
  levelName?: string | undefined;
67
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;
68
195
  }, {
69
- status: "active" | "unknown" | "inactive" | "frozen" | "expired";
196
+ status: "unknown" | "active" | "inactive" | "frozen" | "expired";
70
197
  userId: string;
71
198
  cardRef: string;
72
199
  cardDisplay: string;
73
200
  availablePoints: number;
74
201
  levelName?: string | undefined;
75
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;
76
232
  }>;
77
233
  export type MemberCardSummaryCardData = z.infer<typeof memberCardSummaryCardDataSchema>;
78
- /** member-coupon-list */
79
- export declare const memberCouponListCardDataSchema: z.ZodObject<{
80
- userId: z.ZodString;
81
- items: z.ZodArray<z.ZodObject<{
82
- couponRef: z.ZodString;
83
- title: z.ZodString;
84
- type: z.ZodEnum<["amount", "discount", "gift", "parking", "unknown"]>;
85
- status: z.ZodEnum<["effective", "used", "expired", "invalid", "unknown"]>;
86
- benefitText: z.ZodOptional<z.ZodString>;
87
- thresholdText: z.ZodOptional<z.ZodString>;
88
- }, "strip", z.ZodTypeAny, {
89
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
90
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
91
- title: string;
92
- couponRef: string;
93
- benefitText?: string | undefined;
94
- thresholdText?: string | undefined;
95
- }, {
96
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
97
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
98
- title: string;
99
- couponRef: string;
100
- benefitText?: string | undefined;
101
- thresholdText?: string | undefined;
102
- }>, "many">;
103
- total: z.ZodNumber;
104
- }, "strip", z.ZodTypeAny, {
105
- userId: string;
106
- total: number;
107
- items: {
108
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
109
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
110
- title: string;
111
- couponRef: string;
112
- benefitText?: string | undefined;
113
- thresholdText?: string | undefined;
114
- }[];
115
- }, {
116
- userId: string;
117
- total: number;
118
- items: {
119
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
120
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
121
- title: string;
122
- couponRef: string;
123
- benefitText?: string | undefined;
124
- thresholdText?: string | undefined;
125
- }[];
126
- }>;
127
- export type MemberCouponListCardData = z.infer<typeof memberCouponListCardDataSchema>;
128
- /** member-coupon-detail */
129
- export declare const memberCouponDetailCardDataSchema: z.ZodObject<{
130
- couponRef: z.ZodString;
131
- title: z.ZodString;
132
- type: z.ZodEnum<["amount", "discount", "gift", "parking", "unknown"]>;
133
- status: z.ZodEnum<["effective", "used", "expired", "invalid", "unknown"]>;
134
- description: z.ZodOptional<z.ZodString>;
135
- benefitText: z.ZodOptional<z.ZodString>;
136
- thresholdText: z.ZodOptional<z.ZodString>;
137
- }, "strip", z.ZodTypeAny, {
138
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
139
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
140
- title: string;
141
- couponRef: string;
142
- description?: string | undefined;
143
- benefitText?: string | undefined;
144
- thresholdText?: string | undefined;
145
- }, {
146
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
147
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
148
- title: string;
149
- couponRef: string;
150
- description?: string | undefined;
151
- benefitText?: string | undefined;
152
- thresholdText?: string | undefined;
153
- }>;
154
- export type MemberCouponDetailCardData = z.infer<typeof memberCouponDetailCardDataSchema>;
155
234
  /**
156
- * member-point-usage-list(011 K3:吸收教学 points 卡——userId/balance/level 字段对齐)。
235
+ * member-point-usage-list(011 K3:余额、厂商会员标签与积分流水)。
157
236
  */
158
237
  export declare const memberPointUsageListCardDataSchema: z.ZodObject<{
159
238
  userId: z.ZodString;
160
239
  balance: z.ZodNumber;
161
- level: z.ZodEnum<["silver", "gold", "platinum"]>;
240
+ membershipLabel: z.ZodOptional<z.ZodString>;
162
241
  items: z.ZodArray<z.ZodObject<{
163
242
  usageRecordRef: z.ZodString;
164
243
  title: z.ZodString;
@@ -166,15 +245,15 @@ export declare const memberPointUsageListCardDataSchema: z.ZodObject<{
166
245
  usedAt: z.ZodOptional<z.ZodString>;
167
246
  description: z.ZodOptional<z.ZodString>;
168
247
  }, "strip", z.ZodTypeAny, {
169
- amount: string;
170
248
  title: string;
171
249
  usageRecordRef: string;
250
+ amount: string;
172
251
  description?: string | undefined;
173
252
  usedAt?: string | undefined;
174
253
  }, {
175
- amount: string;
176
254
  title: string;
177
255
  usageRecordRef: string;
256
+ amount: string;
178
257
  description?: string | undefined;
179
258
  usedAt?: string | undefined;
180
259
  }>, "many">;
@@ -183,93 +262,236 @@ export declare const memberPointUsageListCardDataSchema: z.ZodObject<{
183
262
  userId: string;
184
263
  total: number;
185
264
  items: {
186
- amount: string;
187
265
  title: string;
188
266
  usageRecordRef: string;
267
+ amount: string;
189
268
  description?: string | undefined;
190
269
  usedAt?: string | undefined;
191
270
  }[];
192
271
  balance: number;
193
- level: "silver" | "gold" | "platinum";
272
+ membershipLabel?: string | undefined;
194
273
  }, {
195
274
  userId: string;
196
275
  total: number;
197
276
  items: {
198
- amount: string;
199
277
  title: string;
200
278
  usageRecordRef: string;
279
+ amount: string;
201
280
  description?: string | undefined;
202
281
  usedAt?: string | undefined;
203
282
  }[];
204
283
  balance: number;
205
- level: "silver" | "gold" | "platinum";
284
+ membershipLabel?: string | undefined;
206
285
  }>;
207
286
  export type MemberPointUsageListCardData = z.infer<typeof memberPointUsageListCardDataSchema>;
208
- /** member-enrollment-form(入会表单;写动作 = member.enroll grant) */
287
+ /** member-enrollment-form(入会表单;015 升级:授权预填 + consent + formVersion) */
209
288
  export declare const memberEnrollmentFormCardDataSchema: z.ZodObject<{
210
289
  userId: z.ZodString;
211
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
212
- /** 表单必填项(渲染端收集后经 componentAction member.enroll 提交) */
290
+ state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
291
+ /** 表单版本(幂等键组成部分) */
292
+ formVersion: z.ZodString;
293
+ /** 表单字段(readOnly = 授权预填锁定;prefill = 预填值) */
213
294
  fields: z.ZodArray<z.ZodObject<{
214
295
  fieldId: z.ZodString;
215
296
  label: z.ZodString;
297
+ type: z.ZodEnum<["text", "tel", "select", "date"]>;
216
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">>;
217
303
  }, "strip", z.ZodTypeAny, {
304
+ type: "date" | "text" | "tel" | "select";
305
+ required: boolean;
218
306
  label: string;
219
307
  fieldId: string;
220
- required: boolean;
308
+ options?: string[] | undefined;
309
+ readOnly?: boolean | undefined;
310
+ prefill?: string | undefined;
311
+ placeholder?: string | undefined;
221
312
  }, {
313
+ type: "date" | "text" | "tel" | "select";
314
+ required: boolean;
222
315
  label: string;
223
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
+ }, {
224
336
  required: boolean;
337
+ title: string;
338
+ consentId: string;
339
+ version: string;
340
+ url?: string | undefined;
225
341
  }>, "many">;
226
- actionId: z.ZodString;
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>;
227
355
  }, "strip", z.ZodTypeAny, {
228
356
  userId: string;
229
- actionId: string;
230
- state: "active" | "not_enrolled" | "closed";
357
+ state: "unknown" | "active" | "not_enrolled" | "closed";
358
+ formVersion: string;
231
359
  fields: {
360
+ type: "date" | "text" | "tel" | "select";
361
+ required: boolean;
232
362
  label: string;
233
363
  fieldId: string;
364
+ options?: string[] | undefined;
365
+ readOnly?: boolean | undefined;
366
+ prefill?: string | undefined;
367
+ placeholder?: string | undefined;
368
+ }[];
369
+ consents: {
234
370
  required: boolean;
371
+ title: string;
372
+ consentId: string;
373
+ version: string;
374
+ url?: string | undefined;
235
375
  }[];
376
+ authorization: {
377
+ status: "required" | "unavailable" | "authorized";
378
+ mobileMasked?: string | undefined;
379
+ };
380
+ manualNotice?: string | undefined;
236
381
  }, {
237
382
  userId: string;
238
- actionId: string;
239
- state: "active" | "not_enrolled" | "closed";
383
+ state: "unknown" | "active" | "not_enrolled" | "closed";
384
+ formVersion: string;
240
385
  fields: {
386
+ type: "date" | "text" | "tel" | "select";
387
+ required: boolean;
241
388
  label: string;
242
389
  fieldId: string;
390
+ options?: string[] | undefined;
391
+ readOnly?: boolean | undefined;
392
+ prefill?: string | undefined;
393
+ placeholder?: string | undefined;
394
+ }[];
395
+ consents: {
243
396
  required: boolean;
397
+ title: string;
398
+ consentId: string;
399
+ version: string;
400
+ url?: string | undefined;
244
401
  }[];
402
+ authorization: {
403
+ status: "required" | "unavailable" | "authorized";
404
+ mobileMasked?: string | undefined;
405
+ };
406
+ manualNotice?: string | undefined;
245
407
  }>;
246
408
  export type MemberEnrollmentFormCardData = z.infer<typeof memberEnrollmentFormCardDataSchema>;
247
- /** member-enrollment-status(入会结果状态卡) */
409
+ /** member-enrollment-status(入会结果状态卡;pending 态附显式刷新按钮,R4) */
248
410
  export declare const memberEnrollmentStatusCardDataSchema: z.ZodObject<{
249
411
  userId: z.ZodString;
250
- success: z.ZodBoolean;
412
+ attemptRef: z.ZodOptional<z.ZodString>;
413
+ state: z.ZodEnum<["pending_confirmation", "confirmation_timeout", "active", "failed"]>;
251
414
  memberRef: z.ZodOptional<z.ZodString>;
252
415
  message: z.ZodOptional<z.ZodString>;
253
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
254
416
  }, "strip", z.ZodTypeAny, {
255
- success: boolean;
256
417
  userId: string;
257
- state: "active" | "not_enrolled" | "closed";
418
+ state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
258
419
  message?: string | undefined;
259
420
  memberRef?: string | undefined;
421
+ attemptRef?: string | undefined;
260
422
  }, {
261
- success: boolean;
262
423
  userId: string;
263
- state: "active" | "not_enrolled" | "closed";
424
+ state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
264
425
  message?: string | undefined;
265
426
  memberRef?: string | undefined;
427
+ attemptRef?: string | undefined;
266
428
  }>;
267
429
  export type MemberEnrollmentStatusCardData = z.infer<typeof memberEnrollmentStatusCardDataSchema>;
268
- /** 7 schema map(cardType → dataSchema) */
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 承接) */
269
490
  export declare const memberCardDataSchemas: {
270
491
  readonly 'member-info': z.ZodObject<{
271
492
  userId: z.ZodString;
272
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
493
+ authState: z.ZodEnum<["authenticated", "unauthenticated"]>;
494
+ state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
273
495
  displayName: z.ZodOptional<z.ZodString>;
274
496
  avatarUrl: z.ZodOptional<z.ZodString>;
275
497
  contactDisplay: z.ZodOptional<z.ZodString>;
@@ -287,25 +509,27 @@ export declare const memberCardDataSchemas: {
287
509
  }>, "many">;
288
510
  }, "strip", z.ZodTypeAny, {
289
511
  userId: string;
290
- state: "active" | "not_enrolled" | "closed";
512
+ authState: "authenticated" | "unauthenticated";
513
+ state: "unknown" | "active" | "not_enrolled" | "closed";
291
514
  labels: {
292
515
  name: string;
293
516
  labelRef: string;
294
517
  }[];
295
- avatarUrl?: string | undefined;
296
518
  displayName?: string | undefined;
519
+ avatarUrl?: string | undefined;
297
520
  contactDisplay?: string | undefined;
298
521
  memberRef?: string | undefined;
299
522
  registeredAt?: string | undefined;
300
523
  }, {
301
524
  userId: string;
302
- state: "active" | "not_enrolled" | "closed";
525
+ authState: "authenticated" | "unauthenticated";
526
+ state: "unknown" | "active" | "not_enrolled" | "closed";
303
527
  labels: {
304
528
  name: string;
305
529
  labelRef: string;
306
530
  }[];
307
- avatarUrl?: string | undefined;
308
531
  displayName?: string | undefined;
532
+ avatarUrl?: string | undefined;
309
533
  contactDisplay?: string | undefined;
310
534
  memberRef?: string | undefined;
311
535
  registeredAt?: string | undefined;
@@ -318,100 +542,169 @@ export declare const memberCardDataSchemas: {
318
542
  levelName: z.ZodOptional<z.ZodString>;
319
543
  availablePoints: z.ZodNumber;
320
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">>;
321
629
  }, "strip", z.ZodTypeAny, {
322
- status: "active" | "unknown" | "inactive" | "frozen" | "expired";
630
+ status: "unknown" | "active" | "inactive" | "frozen" | "expired";
323
631
  userId: string;
324
632
  cardRef: string;
325
633
  cardDisplay: string;
326
634
  availablePoints: number;
327
635
  levelName?: string | undefined;
328
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;
329
666
  }, {
330
- status: "active" | "unknown" | "inactive" | "frozen" | "expired";
667
+ status: "unknown" | "active" | "inactive" | "frozen" | "expired";
331
668
  userId: string;
332
669
  cardRef: string;
333
670
  cardDisplay: string;
334
671
  availablePoints: number;
335
672
  levelName?: string | undefined;
336
673
  cardImageUrl?: string | undefined;
337
- }>;
338
- readonly 'member-coupon-list': z.ZodObject<{
339
- userId: z.ZodString;
340
- items: z.ZodArray<z.ZodObject<{
341
- couponRef: z.ZodString;
342
- title: z.ZodString;
343
- type: z.ZodEnum<["amount", "discount", "gift", "parking", "unknown"]>;
344
- status: z.ZodEnum<["effective", "used", "expired", "invalid", "unknown"]>;
345
- benefitText: z.ZodOptional<z.ZodString>;
346
- thresholdText: z.ZodOptional<z.ZodString>;
347
- }, "strip", z.ZodTypeAny, {
348
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
349
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
350
- title: string;
351
- couponRef: string;
352
- benefitText?: string | undefined;
353
- thresholdText?: string | undefined;
354
- }, {
355
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
356
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
357
- title: string;
358
- couponRef: string;
359
- benefitText?: string | undefined;
360
- thresholdText?: string | undefined;
361
- }>, "many">;
362
- total: z.ZodNumber;
363
- }, "strip", z.ZodTypeAny, {
364
- userId: string;
365
- total: number;
366
- items: {
367
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
368
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
369
- title: string;
370
- couponRef: string;
371
- benefitText?: string | undefined;
372
- thresholdText?: string | undefined;
373
- }[];
374
- }, {
375
- userId: string;
376
- total: number;
377
- items: {
378
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
379
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
380
- title: string;
381
- couponRef: string;
382
- benefitText?: string | undefined;
383
- thresholdText?: string | undefined;
384
- }[];
385
- }>;
386
- readonly 'member-coupon-detail': z.ZodObject<{
387
- couponRef: z.ZodString;
388
- title: z.ZodString;
389
- type: z.ZodEnum<["amount", "discount", "gift", "parking", "unknown"]>;
390
- status: z.ZodEnum<["effective", "used", "expired", "invalid", "unknown"]>;
391
- description: z.ZodOptional<z.ZodString>;
392
- benefitText: z.ZodOptional<z.ZodString>;
393
- thresholdText: z.ZodOptional<z.ZodString>;
394
- }, "strip", z.ZodTypeAny, {
395
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
396
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
397
- title: string;
398
- couponRef: string;
399
- description?: string | undefined;
400
- benefitText?: string | undefined;
401
- thresholdText?: string | undefined;
402
- }, {
403
- type: "unknown" | "amount" | "discount" | "gift" | "parking";
404
- status: "unknown" | "expired" | "effective" | "used" | "invalid";
405
- title: string;
406
- couponRef: string;
407
- description?: string | undefined;
408
- benefitText?: string | undefined;
409
- thresholdText?: 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;
410
703
  }>;
411
704
  readonly 'member-point-usage-list': z.ZodObject<{
412
705
  userId: z.ZodString;
413
706
  balance: z.ZodNumber;
414
- level: z.ZodEnum<["silver", "gold", "platinum"]>;
707
+ membershipLabel: z.ZodOptional<z.ZodString>;
415
708
  items: z.ZodArray<z.ZodObject<{
416
709
  usageRecordRef: z.ZodString;
417
710
  title: z.ZodString;
@@ -419,15 +712,15 @@ export declare const memberCardDataSchemas: {
419
712
  usedAt: z.ZodOptional<z.ZodString>;
420
713
  description: z.ZodOptional<z.ZodString>;
421
714
  }, "strip", z.ZodTypeAny, {
422
- amount: string;
423
715
  title: string;
424
716
  usageRecordRef: string;
717
+ amount: string;
425
718
  description?: string | undefined;
426
719
  usedAt?: string | undefined;
427
720
  }, {
428
- amount: string;
429
721
  title: string;
430
722
  usageRecordRef: string;
723
+ amount: string;
431
724
  description?: string | undefined;
432
725
  usedAt?: string | undefined;
433
726
  }>, "many">;
@@ -436,82 +729,212 @@ export declare const memberCardDataSchemas: {
436
729
  userId: string;
437
730
  total: number;
438
731
  items: {
439
- amount: string;
440
732
  title: string;
441
733
  usageRecordRef: string;
734
+ amount: string;
442
735
  description?: string | undefined;
443
736
  usedAt?: string | undefined;
444
737
  }[];
445
738
  balance: number;
446
- level: "silver" | "gold" | "platinum";
739
+ membershipLabel?: string | undefined;
447
740
  }, {
448
741
  userId: string;
449
742
  total: number;
450
743
  items: {
451
- amount: string;
452
744
  title: string;
453
745
  usageRecordRef: string;
746
+ amount: string;
454
747
  description?: string | undefined;
455
748
  usedAt?: string | undefined;
456
749
  }[];
457
750
  balance: number;
458
- level: "silver" | "gold" | "platinum";
751
+ membershipLabel?: string | undefined;
459
752
  }>;
460
753
  readonly 'member-enrollment-form': z.ZodObject<{
461
754
  userId: z.ZodString;
462
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
463
- /** 表单必填项(渲染端收集后经 componentAction member.enroll 提交) */
755
+ state: z.ZodEnum<["unknown", "active", "not_enrolled", "closed"]>;
756
+ /** 表单版本(幂等键组成部分) */
757
+ formVersion: z.ZodString;
758
+ /** 表单字段(readOnly = 授权预填锁定;prefill = 预填值) */
464
759
  fields: z.ZodArray<z.ZodObject<{
465
760
  fieldId: z.ZodString;
466
761
  label: z.ZodString;
762
+ type: z.ZodEnum<["text", "tel", "select", "date"]>;
467
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">>;
468
768
  }, "strip", z.ZodTypeAny, {
769
+ type: "date" | "text" | "tel" | "select";
770
+ required: boolean;
469
771
  label: string;
470
772
  fieldId: string;
471
- required: boolean;
773
+ options?: string[] | undefined;
774
+ readOnly?: boolean | undefined;
775
+ prefill?: string | undefined;
776
+ placeholder?: string | undefined;
472
777
  }, {
778
+ type: "date" | "text" | "tel" | "select";
779
+ required: boolean;
473
780
  label: string;
474
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
+ }, {
475
801
  required: boolean;
802
+ title: string;
803
+ consentId: string;
804
+ version: string;
805
+ url?: string | undefined;
476
806
  }>, "many">;
477
- actionId: z.ZodString;
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>;
478
820
  }, "strip", z.ZodTypeAny, {
479
821
  userId: string;
480
- actionId: string;
481
- state: "active" | "not_enrolled" | "closed";
822
+ state: "unknown" | "active" | "not_enrolled" | "closed";
823
+ formVersion: string;
482
824
  fields: {
825
+ type: "date" | "text" | "tel" | "select";
826
+ required: boolean;
483
827
  label: string;
484
828
  fieldId: string;
829
+ options?: string[] | undefined;
830
+ readOnly?: boolean | undefined;
831
+ prefill?: string | undefined;
832
+ placeholder?: string | undefined;
833
+ }[];
834
+ consents: {
485
835
  required: boolean;
836
+ title: string;
837
+ consentId: string;
838
+ version: string;
839
+ url?: string | undefined;
486
840
  }[];
841
+ authorization: {
842
+ status: "required" | "unavailable" | "authorized";
843
+ mobileMasked?: string | undefined;
844
+ };
845
+ manualNotice?: string | undefined;
487
846
  }, {
488
847
  userId: string;
489
- actionId: string;
490
- state: "active" | "not_enrolled" | "closed";
848
+ state: "unknown" | "active" | "not_enrolled" | "closed";
849
+ formVersion: string;
491
850
  fields: {
851
+ type: "date" | "text" | "tel" | "select";
852
+ required: boolean;
492
853
  label: string;
493
854
  fieldId: string;
855
+ options?: string[] | undefined;
856
+ readOnly?: boolean | undefined;
857
+ prefill?: string | undefined;
858
+ placeholder?: string | undefined;
859
+ }[];
860
+ consents: {
494
861
  required: boolean;
862
+ title: string;
863
+ consentId: string;
864
+ version: string;
865
+ url?: string | undefined;
495
866
  }[];
867
+ authorization: {
868
+ status: "required" | "unavailable" | "authorized";
869
+ mobileMasked?: string | undefined;
870
+ };
871
+ manualNotice?: string | undefined;
496
872
  }>;
497
873
  readonly 'member-enrollment-status': z.ZodObject<{
498
874
  userId: z.ZodString;
499
- success: z.ZodBoolean;
875
+ attemptRef: z.ZodOptional<z.ZodString>;
876
+ state: z.ZodEnum<["pending_confirmation", "confirmation_timeout", "active", "failed"]>;
500
877
  memberRef: z.ZodOptional<z.ZodString>;
501
878
  message: z.ZodOptional<z.ZodString>;
502
- state: z.ZodEnum<["active", "not_enrolled", "closed"]>;
503
879
  }, "strip", z.ZodTypeAny, {
504
- success: boolean;
505
880
  userId: string;
506
- state: "active" | "not_enrolled" | "closed";
881
+ state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
507
882
  message?: string | undefined;
508
883
  memberRef?: string | undefined;
884
+ attemptRef?: string | undefined;
509
885
  }, {
510
- success: boolean;
511
886
  userId: string;
512
- state: "active" | "not_enrolled" | "closed";
887
+ state: "active" | "pending_confirmation" | "confirmation_timeout" | "failed";
513
888
  message?: string | undefined;
514
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;
515
938
  }>;
516
939
  };
517
940
  export type MemberCardType = keyof typeof memberCardDataSchemas;