@tbox.cn/app-module-parking 0.2.0 → 0.9.4

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 (68) hide show
  1. package/AGENTS.md +16 -0
  2. package/README.md +58 -11
  3. package/dist/chunk-O4W4A6TQ.js +2696 -0
  4. package/dist/chunk-QSHINO4B.js +1073 -0
  5. package/dist/client/index.d.ts +17 -3
  6. package/dist/client/index.js +4 -2
  7. package/dist/index.d.ts +4 -3
  8. package/dist/index.js +14 -4
  9. package/dist/parking-BC2TJ5GU.css +1306 -0
  10. package/dist/server/index.d.ts +1216 -72
  11. package/dist/server/index.js +11 -3
  12. package/package.json +24 -16
  13. package/skills/parking/SKILL.md +165 -0
  14. package/skills/parking/references/payment-safety.md +25 -0
  15. package/src/client/cards/index.ts +8 -0
  16. package/src/client/cards/parking-info/index.tsx +41 -0
  17. package/src/client/cards/parking-payment/benefit-selection.ts +79 -0
  18. package/src/client/cards/parking-payment/index.tsx +435 -0
  19. package/src/client/cards/parking-payment-records/index.tsx +259 -0
  20. package/src/client/cards/parking-payment-result/index.tsx +83 -0
  21. package/src/client/cards/parking-vehicle-management/PlateKeyboard.tsx +106 -0
  22. package/src/client/cards/parking-vehicle-management/index.tsx +344 -0
  23. package/src/client/cards/parking-vehicle-management/plate-keyboard.ts +113 -0
  24. package/src/client/cards/view.ts +83 -0
  25. package/src/client/index.ts +19 -4
  26. package/src/client/styles/parking.css +1306 -0
  27. package/src/client/types/css.d.ts +2 -0
  28. package/src/server/actions.ts +975 -0
  29. package/src/server/cards/index.ts +14 -0
  30. package/src/server/cards/parking-info/meta.ts +19 -0
  31. package/src/server/cards/parking-info/samples.ts +50 -0
  32. package/src/server/cards/parking-payment/meta.ts +29 -0
  33. package/src/server/cards/parking-payment/samples.ts +311 -0
  34. package/src/server/cards/parking-payment-records/meta.ts +32 -0
  35. package/src/server/cards/parking-payment-records/samples.ts +86 -0
  36. package/src/server/cards/parking-payment-result/meta.ts +21 -0
  37. package/src/server/cards/parking-payment-result/samples.ts +84 -0
  38. package/src/server/cards/parking-vehicle-management/meta.ts +20 -0
  39. package/src/server/cards/parking-vehicle-management/samples.ts +73 -0
  40. package/src/server/domain.ts +279 -0
  41. package/src/server/handler.ts +65 -16
  42. package/src/server/index.ts +120 -18
  43. package/src/server/intent-context.ts +14 -0
  44. package/src/server/ports.ts +59 -0
  45. package/src/server/service.ts +474 -45
  46. package/src/server/tools.ts +846 -0
  47. package/tbox.module.json +107 -0
  48. package/tests/benefit-selection.test.ts +70 -0
  49. package/tests/cards-render.test.tsx +645 -0
  50. package/tests/dispatcher-flow.test.ts +256 -0
  51. package/tests/payment-flow.test.ts +420 -0
  52. package/tests/plate-keyboard.test.ts +158 -0
  53. package/tests/ports-resolve.test.ts +113 -0
  54. package/tests/pretool-parking-fee.test.ts +104 -0
  55. package/tests/samples.test.ts +44 -0
  56. package/tests/skills.test.ts +37 -0
  57. package/tests/snapshot-service.test.ts +87 -0
  58. package/tests/tools-gate.test.ts +237 -0
  59. package/tests/tools-membership.test.ts +91 -0
  60. package/tests/view.test.ts +61 -0
  61. package/tsup.config.ts +9 -1
  62. package/dist/chunk-BYD3C6NE.js +0 -140
  63. package/dist/chunk-QQLBZY6D.js +0 -55
  64. package/src/client/cards/parking-fee/index.tsx +0 -59
  65. package/src/server/cards/parking-fee/meta.ts +0 -26
  66. package/src/server/tool.ts +0 -36
  67. package/tbox.component.json +0 -20
  68. package/tests/service.test.ts +0 -49
@@ -1,88 +1,1232 @@
1
+ import * as _mastra_core_tools from '@mastra/core/tools';
2
+ import * as _tbox_cn_app_sdk_server from '@tbox.cn/app-sdk/server';
3
+ import { ServerContext, PreToolDef } from '@tbox.cn/app-sdk/server';
1
4
  import * as _tbox_cn_app_contracts from '@tbox.cn/app-contracts';
2
- import { CardMeta } from '@tbox.cn/app-contracts';
5
+ import { RequestContext } from '@tbox.cn/app-contracts';
3
6
  import * as zod from 'zod';
4
- import { z } from 'zod';
5
- import { ServerContext } from '@tbox.cn/app-sdk/server';
6
- import { ParkingQueryPort, ParkingSettlementPort, ParkingFee } from '@tbox.cn/app-contracts-mall';
7
+ import { ParkingQueryPort, ParkingPaymentPort, ParkingVehiclePort, ParkingQueryContext, QuoteSnapshot, ParkingVehicle, ParkingRecordPage, ParkingPaymentRecord, ParkingInfo, ParkingBenefit, ParkingLocation } from '@tbox.cn/app-contracts-mall';
7
8
 
8
- /** ParkingService:停车完整实现(计费 / 券核销 / 结算) */
9
- interface ParkingService extends ParkingQueryPort, ParkingSettlementPort {
10
- orders: Map<string, ParkingFee>;
9
+ interface ParkingService extends ParkingQueryPort, ParkingPaymentPort, ParkingVehiclePort {
10
+ /** 测试观测用(InMemory 恒有;provider 请求级壳无此语义) */
11
+ readonly quoteCount?: number;
11
12
  }
12
- /** 内存实现(PoC):按 plate 生成固定费率订单 */
13
13
  declare class InMemoryParkingService implements ParkingService {
14
- orders: Map<string, ParkingFee>;
15
- private couponsUsed;
16
- constructor(initial?: Record<string, ParkingFee>);
17
- /** 发券事件回调(由 serverModule.register 注入,保持 service 与 bus 解耦) */
18
- onCouponUsed?: (e: {
19
- userId: string;
20
- couponId: string;
21
- amount: number;
22
- }) => void;
23
- queryParkingFee(userId: string, orderId?: string): Promise<ParkingFee | undefined>;
24
- calcFee(userId: string, orderId: string): Promise<ParkingFee>;
25
- useCoupon(_userId: string, orderId: string, couponId: string): Promise<boolean>;
26
- settlePayment(_userId: string, orderId: string, amount: number): Promise<boolean>;
14
+ private quotes;
15
+ private quoteOwners;
16
+ private paymentToQuote;
17
+ private records;
18
+ private recordOwners;
19
+ private boundVehicles;
20
+ private vehicleOwners;
21
+ private paymentResults;
22
+ private paymentRefSeq;
23
+ constructor(mallId?: string);
24
+ private mallId;
25
+ get quoteCount(): number;
26
+ queryFee(q: ParkingQueryContext, input: {
27
+ plateNo?: string;
28
+ vehicleRef?: string;
29
+ barcode?: string;
30
+ }): Promise<readonly QuoteSnapshot[]>;
31
+ listVehicles(q: ParkingQueryContext): Promise<{
32
+ bound: readonly ParkingVehicle[];
33
+ }>;
34
+ listPaymentRecords(q: ParkingQueryContext, page: number, pageSize: number): Promise<ParkingRecordPage>;
35
+ getPaymentRecordDetail(q: ParkingQueryContext, recordRef: string): Promise<ParkingPaymentRecord>;
36
+ getInvoiceSettings(_q: ParkingQueryContext): Promise<{
37
+ parkingInvoiceEnabled: boolean;
38
+ }>;
39
+ listInvoiceableOrders(q: ParkingQueryContext, page: number, pageSize: number): Promise<ParkingRecordPage>;
40
+ queryParkingInfo(_q: ParkingQueryContext, kind: 'chargeRules' | 'benefitPolicy' | 'vehicleLocation'): Promise<ParkingInfo>;
41
+ queryApplicableBenefits(_q: ParkingQueryContext, _plateNo: string): Promise<readonly ParkingBenefit[]>;
42
+ locateVehicle(_q: ParkingQueryContext, _plateNo: string): Promise<ParkingLocation | null>;
43
+ createOrder(q: ParkingQueryContext, quoteRef: string, _detail?: Parameters<ParkingPaymentPort['createOrder']>[2]): Promise<{
44
+ payOrderId?: string;
45
+ paymentRef: string;
46
+ }>;
47
+ getOrderInfo(q: ParkingQueryContext, paymentRef: string): Promise<{
48
+ orderInfo?: string;
49
+ channel: string;
50
+ payableFeeCents: number | undefined;
51
+ }>;
52
+ getPaymentSign(q: ParkingQueryContext, paymentRef: string): Promise<{
53
+ orderInfo: string;
54
+ }>;
55
+ uploadResult(q: ParkingQueryContext, paymentRef: string, status: 'success' | 'cancel' | 'failure' | 'unavailable'): Promise<void>;
56
+ reconcile(q: ParkingQueryContext, paymentRef: string): Promise<'PAID' | 'PAYING' | 'CANCELLED' | 'UNKNOWN'>;
57
+ reprice(q: ParkingQueryContext, quoteRef: string, benefitRefs: readonly string[]): Promise<QuoteSnapshot>;
58
+ applyInvoice(q: ParkingQueryContext, recordRef: string): Promise<void>;
59
+ bindVehicle(q: ParkingQueryContext, plateNo: string): Promise<ParkingVehicle>;
60
+ unbindVehicle(q: ParkingQueryContext, input: {
61
+ plateNo?: string;
62
+ vehicleRef?: string;
63
+ }): Promise<void>;
64
+ private plateOfVehicleRef;
65
+ private quoteOfPayment;
66
+ private markPaid;
67
+ private ownerKey;
68
+ private ownedRecords;
69
+ private paginate;
27
70
  }
28
71
 
29
- declare const dataSchema: z.ZodObject<{
30
- orderId: z.ZodString;
31
- userId: z.ZodString;
32
- plate: z.ZodString;
33
- fee: z.ZodNumber;
34
- paidAmount: z.ZodOptional<z.ZodNumber>;
35
- pointsUsed: z.ZodOptional<z.ZodNumber>;
36
- status: z.ZodEnum<["PENDING", "PAID", "CANCELLED"]>;
37
- }, "strip", z.ZodTypeAny, {
38
- status: "PAID" | "PENDING" | "CANCELLED";
39
- userId: string;
40
- orderId: string;
41
- plate: string;
42
- fee: number;
43
- paidAmount?: number | undefined;
44
- pointsUsed?: number | undefined;
45
- }, {
46
- status: "PAID" | "PENDING" | "CANCELLED";
47
- userId: string;
48
- orderId: string;
49
- plate: string;
50
- fee: number;
51
- paidAmount?: number | undefined;
52
- pointsUsed?: number | undefined;
53
- }>;
54
- declare const meta: CardMeta<typeof dataSchema>;
72
+ /**
73
+ * parking Port 分槽解析(017 槽位原子化):三槽独立解析(query/payment/vehicle),
74
+ * 唯一供给轴 = integrations registry 槽位。adapter 工厂由各 provider 包 register 期注册
75
+ * (同域三槽共享 implementation id,catalog 聚合后同 impl 供给);transport 缓存与失效
76
+ * 统一由平台 registry 负责(键含 service——槽级隔离)。
77
+ *
78
+ * 预期缺席(未配置/实例缺键/禁用)→ InMemoryParkingService 单例兜底(演示数据 + mock
79
+ * 支付闭环,保开箱体验);其余错误原样上抛(配置即声明)。
80
+ * 部分绑定形态(query 厂商 + payment InMemory)为显式行为:InMemory createOrder 对外来
81
+ * quoteRef 直接 throw(V2),跨槽引用失败可见。
82
+ */
83
+
84
+ /** 缺省 InMemory 单例(模块包顶层;跨模块消费方链路兼容;实现三 Port) */
85
+ declare const inMemoryParking: InMemoryParkingService;
86
+ declare const resolveParkingQueryPort: (reqCtx: RequestContext, ctx?: ServerContext) => Promise<ParkingQueryPort>;
87
+ declare const resolveParkingPaymentPort: (reqCtx: RequestContext, ctx?: ServerContext) => Promise<ParkingPaymentPort>;
88
+ declare const resolveParkingVehiclePort: (reqCtx: RequestContext, ctx?: ServerContext) => Promise<ParkingVehiclePort>;
89
+
90
+ declare const parkingCards: {
91
+ readonly 'parking-payment': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
92
+ quoteRef: zod.ZodString;
93
+ plateNo: zod.ZodString;
94
+ entryAtText: zod.ZodOptional<zod.ZodString>;
95
+ durationText: zod.ZodOptional<zod.ZodString>;
96
+ feeItems: zod.ZodArray<zod.ZodObject<{
97
+ name: zod.ZodString;
98
+ amountText: zod.ZodString;
99
+ }, "strip", zod.ZodTypeAny, {
100
+ name: string;
101
+ amountText: string;
102
+ }, {
103
+ name: string;
104
+ amountText: string;
105
+ }>, "many">;
106
+ totalText: zod.ZodString;
107
+ discountText: zod.ZodOptional<zod.ZodString>;
108
+ payableText: zod.ZodString;
109
+ membership: zod.ZodOptional<zod.ZodObject<{
110
+ state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
111
+ availablePoints: zod.ZodOptional<zod.ZodNumber>;
112
+ }, "strip", zod.ZodTypeAny, {
113
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
114
+ availablePoints?: number | undefined;
115
+ }, {
116
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
117
+ availablePoints?: number | undefined;
118
+ }>>;
119
+ paymentOptions: zod.ZodOptional<zod.ZodObject<{
120
+ direct: zod.ZodObject<{
121
+ payableText: zod.ZodOptional<zod.ZodString>;
122
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
123
+ }, "strip", zod.ZodTypeAny, {
124
+ benefitRefs: string[];
125
+ payableText?: string | undefined;
126
+ }, {
127
+ benefitRefs: string[];
128
+ payableText?: string | undefined;
129
+ }>;
130
+ points: zod.ZodOptional<zod.ZodDiscriminatedUnion<"kind", [zod.ZodObject<{
131
+ kind: zod.ZodLiteral<"exact">;
132
+ pointsToUse: zod.ZodNumber;
133
+ payableText: zod.ZodString;
134
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
135
+ }, "strip", zod.ZodTypeAny, {
136
+ kind: "exact";
137
+ payableText: string;
138
+ benefitRefs: string[];
139
+ pointsToUse: number;
140
+ }, {
141
+ kind: "exact";
142
+ payableText: string;
143
+ benefitRefs: string[];
144
+ pointsToUse: number;
145
+ }>, zod.ZodObject<{
146
+ kind: zod.ZodLiteral<"requires_reprice">;
147
+ title: zod.ZodString;
148
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
149
+ }, "strip", zod.ZodTypeAny, {
150
+ kind: "requires_reprice";
151
+ title: string;
152
+ benefitRefs: string[];
153
+ }, {
154
+ kind: "requires_reprice";
155
+ title: string;
156
+ benefitRefs: string[];
157
+ }>]>>;
158
+ }, "strip", zod.ZodTypeAny, {
159
+ direct: {
160
+ benefitRefs: string[];
161
+ payableText?: string | undefined;
162
+ };
163
+ points?: {
164
+ kind: "exact";
165
+ payableText: string;
166
+ benefitRefs: string[];
167
+ pointsToUse: number;
168
+ } | {
169
+ kind: "requires_reprice";
170
+ title: string;
171
+ benefitRefs: string[];
172
+ } | undefined;
173
+ }, {
174
+ direct: {
175
+ benefitRefs: string[];
176
+ payableText?: string | undefined;
177
+ };
178
+ points?: {
179
+ kind: "exact";
180
+ payableText: string;
181
+ benefitRefs: string[];
182
+ pointsToUse: number;
183
+ } | {
184
+ kind: "requires_reprice";
185
+ title: string;
186
+ benefitRefs: string[];
187
+ } | undefined;
188
+ }>>;
189
+ appliedBenefits: zod.ZodArray<zod.ZodObject<{
190
+ benefitRef: zod.ZodString;
191
+ title: zod.ZodString;
192
+ discountText: zod.ZodOptional<zod.ZodString>;
193
+ }, "strip", zod.ZodTypeAny, {
194
+ title: string;
195
+ benefitRef: string;
196
+ discountText?: string | undefined;
197
+ }, {
198
+ title: string;
199
+ benefitRef: string;
200
+ discountText?: string | undefined;
201
+ }>, "many">;
202
+ selectableBenefits: zod.ZodArray<zod.ZodObject<{
203
+ benefitRef: zod.ZodString;
204
+ title: zod.ZodString;
205
+ autoSelected: zod.ZodBoolean;
206
+ description: zod.ZodOptional<zod.ZodString>;
207
+ kind: zod.ZodOptional<zod.ZodEnum<["points", "discount", "coupon", "other"]>>;
208
+ discountText: zod.ZodOptional<zod.ZodString>;
209
+ exclusiveWithKinds: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["points", "discount", "coupon"]>, "many">>;
210
+ }, "strip", zod.ZodTypeAny, {
211
+ title: string;
212
+ benefitRef: string;
213
+ autoSelected: boolean;
214
+ description?: string | undefined;
215
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
216
+ discountText?: string | undefined;
217
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
218
+ }, {
219
+ title: string;
220
+ benefitRef: string;
221
+ autoSelected: boolean;
222
+ description?: string | undefined;
223
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
224
+ discountText?: string | undefined;
225
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
226
+ }>, "many">;
227
+ revision: zod.ZodNumber;
228
+ caveats: zod.ZodArray<zod.ZodString, "many">;
229
+ payHandoff: zod.ZodOptional<zod.ZodObject<{
230
+ kind: zod.ZodEnum<["pay", "unpaid"]>;
231
+ parkingStoreId: zod.ZodOptional<zod.ZodString>;
232
+ orderInfo: zod.ZodOptional<zod.ZodObject<{
233
+ staySecond: zod.ZodOptional<zod.ZodNumber>;
234
+ parkingFee: zod.ZodOptional<zod.ZodNumber>;
235
+ bindingStatus: zod.ZodOptional<zod.ZodNumber>;
236
+ plateNumber: zod.ZodOptional<zod.ZodString>;
237
+ orderType: zod.ZodNumber;
238
+ spParkingOrderId: zod.ZodOptional<zod.ZodString>;
239
+ parkingId: zod.ZodString;
240
+ entranceTime: zod.ZodOptional<zod.ZodString>;
241
+ supportDiscount: zod.ZodOptional<zod.ZodString>;
242
+ }, "strip", zod.ZodTypeAny, {
243
+ orderType: number;
244
+ parkingId: string;
245
+ staySecond?: number | undefined;
246
+ parkingFee?: number | undefined;
247
+ bindingStatus?: number | undefined;
248
+ plateNumber?: string | undefined;
249
+ spParkingOrderId?: string | undefined;
250
+ entranceTime?: string | undefined;
251
+ supportDiscount?: string | undefined;
252
+ }, {
253
+ orderType: number;
254
+ parkingId: string;
255
+ staySecond?: number | undefined;
256
+ parkingFee?: number | undefined;
257
+ bindingStatus?: number | undefined;
258
+ plateNumber?: string | undefined;
259
+ spParkingOrderId?: string | undefined;
260
+ entranceTime?: string | undefined;
261
+ supportDiscount?: string | undefined;
262
+ }>>;
263
+ orderNo: zod.ZodOptional<zod.ZodString>;
264
+ }, "strip", zod.ZodTypeAny, {
265
+ kind: "pay" | "unpaid";
266
+ orderInfo?: {
267
+ orderType: number;
268
+ parkingId: string;
269
+ staySecond?: number | undefined;
270
+ parkingFee?: number | undefined;
271
+ bindingStatus?: number | undefined;
272
+ plateNumber?: string | undefined;
273
+ spParkingOrderId?: string | undefined;
274
+ entranceTime?: string | undefined;
275
+ supportDiscount?: string | undefined;
276
+ } | undefined;
277
+ parkingStoreId?: string | undefined;
278
+ orderNo?: string | undefined;
279
+ }, {
280
+ kind: "pay" | "unpaid";
281
+ orderInfo?: {
282
+ orderType: number;
283
+ parkingId: string;
284
+ staySecond?: number | undefined;
285
+ parkingFee?: number | undefined;
286
+ bindingStatus?: number | undefined;
287
+ plateNumber?: string | undefined;
288
+ spParkingOrderId?: string | undefined;
289
+ entranceTime?: string | undefined;
290
+ supportDiscount?: string | undefined;
291
+ } | undefined;
292
+ parkingStoreId?: string | undefined;
293
+ orderNo?: string | undefined;
294
+ }>>;
295
+ settlement: zod.ZodOptional<zod.ZodObject<{
296
+ state: zod.ZodEnum<["paying", "paid", "failed"]>;
297
+ text: zod.ZodString;
298
+ }, "strip", zod.ZodTypeAny, {
299
+ text: string;
300
+ state: "failed" | "paying" | "paid";
301
+ }, {
302
+ text: string;
303
+ state: "failed" | "paying" | "paid";
304
+ }>>;
305
+ }, "strip", zod.ZodTypeAny, {
306
+ revision: number;
307
+ caveats: string[];
308
+ quoteRef: string;
309
+ plateNo: string;
310
+ feeItems: {
311
+ name: string;
312
+ amountText: string;
313
+ }[];
314
+ totalText: string;
315
+ payableText: string;
316
+ appliedBenefits: {
317
+ title: string;
318
+ benefitRef: string;
319
+ discountText?: string | undefined;
320
+ }[];
321
+ selectableBenefits: {
322
+ title: string;
323
+ benefitRef: string;
324
+ autoSelected: boolean;
325
+ description?: string | undefined;
326
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
327
+ discountText?: string | undefined;
328
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
329
+ }[];
330
+ entryAtText?: string | undefined;
331
+ durationText?: string | undefined;
332
+ discountText?: string | undefined;
333
+ membership?: {
334
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
335
+ availablePoints?: number | undefined;
336
+ } | undefined;
337
+ paymentOptions?: {
338
+ direct: {
339
+ benefitRefs: string[];
340
+ payableText?: string | undefined;
341
+ };
342
+ points?: {
343
+ kind: "exact";
344
+ payableText: string;
345
+ benefitRefs: string[];
346
+ pointsToUse: number;
347
+ } | {
348
+ kind: "requires_reprice";
349
+ title: string;
350
+ benefitRefs: string[];
351
+ } | undefined;
352
+ } | undefined;
353
+ payHandoff?: {
354
+ kind: "pay" | "unpaid";
355
+ orderInfo?: {
356
+ orderType: number;
357
+ parkingId: string;
358
+ staySecond?: number | undefined;
359
+ parkingFee?: number | undefined;
360
+ bindingStatus?: number | undefined;
361
+ plateNumber?: string | undefined;
362
+ spParkingOrderId?: string | undefined;
363
+ entranceTime?: string | undefined;
364
+ supportDiscount?: string | undefined;
365
+ } | undefined;
366
+ parkingStoreId?: string | undefined;
367
+ orderNo?: string | undefined;
368
+ } | undefined;
369
+ settlement?: {
370
+ text: string;
371
+ state: "failed" | "paying" | "paid";
372
+ } | undefined;
373
+ }, {
374
+ revision: number;
375
+ caveats: string[];
376
+ quoteRef: string;
377
+ plateNo: string;
378
+ feeItems: {
379
+ name: string;
380
+ amountText: string;
381
+ }[];
382
+ totalText: string;
383
+ payableText: string;
384
+ appliedBenefits: {
385
+ title: string;
386
+ benefitRef: string;
387
+ discountText?: string | undefined;
388
+ }[];
389
+ selectableBenefits: {
390
+ title: string;
391
+ benefitRef: string;
392
+ autoSelected: boolean;
393
+ description?: string | undefined;
394
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
395
+ discountText?: string | undefined;
396
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
397
+ }[];
398
+ entryAtText?: string | undefined;
399
+ durationText?: string | undefined;
400
+ discountText?: string | undefined;
401
+ membership?: {
402
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
403
+ availablePoints?: number | undefined;
404
+ } | undefined;
405
+ paymentOptions?: {
406
+ direct: {
407
+ benefitRefs: string[];
408
+ payableText?: string | undefined;
409
+ };
410
+ points?: {
411
+ kind: "exact";
412
+ payableText: string;
413
+ benefitRefs: string[];
414
+ pointsToUse: number;
415
+ } | {
416
+ kind: "requires_reprice";
417
+ title: string;
418
+ benefitRefs: string[];
419
+ } | undefined;
420
+ } | undefined;
421
+ payHandoff?: {
422
+ kind: "pay" | "unpaid";
423
+ orderInfo?: {
424
+ orderType: number;
425
+ parkingId: string;
426
+ staySecond?: number | undefined;
427
+ parkingFee?: number | undefined;
428
+ bindingStatus?: number | undefined;
429
+ plateNumber?: string | undefined;
430
+ spParkingOrderId?: string | undefined;
431
+ entranceTime?: string | undefined;
432
+ supportDiscount?: string | undefined;
433
+ } | undefined;
434
+ parkingStoreId?: string | undefined;
435
+ orderNo?: string | undefined;
436
+ } | undefined;
437
+ settlement?: {
438
+ text: string;
439
+ state: "failed" | "paying" | "paid";
440
+ } | undefined;
441
+ }>>;
442
+ readonly 'parking-payment-result': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
443
+ paymentRef: zod.ZodString;
444
+ plateNo: zod.ZodString;
445
+ status: zod.ZodEnum<["PAID", "CANCELLED", "UNKNOWN"]>;
446
+ amountText: zod.ZodOptional<zod.ZodString>;
447
+ message: zod.ZodString;
448
+ retryable: zod.ZodOptional<zod.ZodBoolean>;
449
+ leaveNotice: zod.ZodOptional<zod.ZodString>;
450
+ details: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
451
+ label: zod.ZodString;
452
+ value: zod.ZodString;
453
+ }, "strip", zod.ZodTypeAny, {
454
+ value: string;
455
+ label: string;
456
+ }, {
457
+ value: string;
458
+ label: string;
459
+ }>, "many">>;
460
+ }, "strip", zod.ZodTypeAny, {
461
+ message: string;
462
+ status: "PAID" | "UNKNOWN" | "CANCELLED";
463
+ paymentRef: string;
464
+ plateNo: string;
465
+ amountText?: string | undefined;
466
+ retryable?: boolean | undefined;
467
+ leaveNotice?: string | undefined;
468
+ details?: {
469
+ value: string;
470
+ label: string;
471
+ }[] | undefined;
472
+ }, {
473
+ message: string;
474
+ status: "PAID" | "UNKNOWN" | "CANCELLED";
475
+ paymentRef: string;
476
+ plateNo: string;
477
+ amountText?: string | undefined;
478
+ retryable?: boolean | undefined;
479
+ leaveNotice?: string | undefined;
480
+ details?: {
481
+ value: string;
482
+ label: string;
483
+ }[] | undefined;
484
+ }>>;
485
+ readonly 'parking-payment-records': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
486
+ items: zod.ZodArray<zod.ZodObject<{
487
+ recordRef: zod.ZodString;
488
+ plateNo: zod.ZodString;
489
+ amountText: zod.ZodString;
490
+ paidAtText: zod.ZodString;
491
+ status: zod.ZodEnum<["PAID", "REFUNDED", "CLOSED", "UNKNOWN"]>;
492
+ statusText: zod.ZodOptional<zod.ZodString>;
493
+ parkName: zod.ZodOptional<zod.ZodString>;
494
+ plazaName: zod.ZodOptional<zod.ZodString>;
495
+ entryAtText: zod.ZodOptional<zod.ZodString>;
496
+ exitAtText: zod.ZodOptional<zod.ZodString>;
497
+ payOrderNoMasked: zod.ZodOptional<zod.ZodString>;
498
+ orderCompleted: zod.ZodOptional<zod.ZodBoolean>;
499
+ invoiceEligible: zod.ZodOptional<zod.ZodBoolean>;
500
+ invoiceIssued: zod.ZodOptional<zod.ZodBoolean>;
501
+ }, "strip", zod.ZodTypeAny, {
502
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
503
+ plateNo: string;
504
+ amountText: string;
505
+ recordRef: string;
506
+ paidAtText: string;
507
+ statusText?: string | undefined;
508
+ entryAtText?: string | undefined;
509
+ parkName?: string | undefined;
510
+ plazaName?: string | undefined;
511
+ exitAtText?: string | undefined;
512
+ payOrderNoMasked?: string | undefined;
513
+ orderCompleted?: boolean | undefined;
514
+ invoiceEligible?: boolean | undefined;
515
+ invoiceIssued?: boolean | undefined;
516
+ }, {
517
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
518
+ plateNo: string;
519
+ amountText: string;
520
+ recordRef: string;
521
+ paidAtText: string;
522
+ statusText?: string | undefined;
523
+ entryAtText?: string | undefined;
524
+ parkName?: string | undefined;
525
+ plazaName?: string | undefined;
526
+ exitAtText?: string | undefined;
527
+ payOrderNoMasked?: string | undefined;
528
+ orderCompleted?: boolean | undefined;
529
+ invoiceEligible?: boolean | undefined;
530
+ invoiceIssued?: boolean | undefined;
531
+ }>, "many">;
532
+ total: zod.ZodNumber;
533
+ hasMore: zod.ZodBoolean;
534
+ caveats: zod.ZodArray<zod.ZodString, "many">;
535
+ message: zod.ZodOptional<zod.ZodString>;
536
+ }, "strip", zod.ZodTypeAny, {
537
+ total: number;
538
+ hasMore: boolean;
539
+ items: {
540
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
541
+ plateNo: string;
542
+ amountText: string;
543
+ recordRef: string;
544
+ paidAtText: string;
545
+ statusText?: string | undefined;
546
+ entryAtText?: string | undefined;
547
+ parkName?: string | undefined;
548
+ plazaName?: string | undefined;
549
+ exitAtText?: string | undefined;
550
+ payOrderNoMasked?: string | undefined;
551
+ orderCompleted?: boolean | undefined;
552
+ invoiceEligible?: boolean | undefined;
553
+ invoiceIssued?: boolean | undefined;
554
+ }[];
555
+ caveats: string[];
556
+ message?: string | undefined;
557
+ }, {
558
+ total: number;
559
+ hasMore: boolean;
560
+ items: {
561
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
562
+ plateNo: string;
563
+ amountText: string;
564
+ recordRef: string;
565
+ paidAtText: string;
566
+ statusText?: string | undefined;
567
+ entryAtText?: string | undefined;
568
+ parkName?: string | undefined;
569
+ plazaName?: string | undefined;
570
+ exitAtText?: string | undefined;
571
+ payOrderNoMasked?: string | undefined;
572
+ orderCompleted?: boolean | undefined;
573
+ invoiceEligible?: boolean | undefined;
574
+ invoiceIssued?: boolean | undefined;
575
+ }[];
576
+ caveats: string[];
577
+ message?: string | undefined;
578
+ }>>;
579
+ readonly 'parking-vehicle-management': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
580
+ bound: zod.ZodArray<zod.ZodObject<{
581
+ vehicleRef: zod.ZodString;
582
+ plateNo: zod.ZodString;
583
+ parked: zod.ZodOptional<zod.ZodBoolean>;
584
+ }, "strip", zod.ZodTypeAny, {
585
+ plateNo: string;
586
+ vehicleRef: string;
587
+ parked?: boolean | undefined;
588
+ }, {
589
+ plateNo: string;
590
+ vehicleRef: string;
591
+ parked?: boolean | undefined;
592
+ }>, "many">;
593
+ message: zod.ZodOptional<zod.ZodString>;
594
+ membership: zod.ZodOptional<zod.ZodObject<{
595
+ state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
596
+ }, "strip", zod.ZodTypeAny, {
597
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
598
+ }, {
599
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
600
+ }>>;
601
+ }, "strip", zod.ZodTypeAny, {
602
+ bound: {
603
+ plateNo: string;
604
+ vehicleRef: string;
605
+ parked?: boolean | undefined;
606
+ }[];
607
+ message?: string | undefined;
608
+ membership?: {
609
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
610
+ } | undefined;
611
+ }, {
612
+ bound: {
613
+ plateNo: string;
614
+ vehicleRef: string;
615
+ parked?: boolean | undefined;
616
+ }[];
617
+ message?: string | undefined;
618
+ membership?: {
619
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
620
+ } | undefined;
621
+ }>>;
622
+ readonly 'parking-info': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
623
+ kind: zod.ZodEnum<["chargeRules", "benefitPolicy", "vehicleLocation"]>;
624
+ title: zod.ZodString;
625
+ entries: zod.ZodArray<zod.ZodObject<{
626
+ label: zod.ZodString;
627
+ value: zod.ZodString;
628
+ }, "strip", zod.ZodTypeAny, {
629
+ value: string;
630
+ label: string;
631
+ }, {
632
+ value: string;
633
+ label: string;
634
+ }>, "many">;
635
+ }, "strip", zod.ZodTypeAny, {
636
+ entries: {
637
+ value: string;
638
+ label: string;
639
+ }[];
640
+ kind: "chargeRules" | "benefitPolicy" | "vehicleLocation";
641
+ title: string;
642
+ }, {
643
+ entries: {
644
+ value: string;
645
+ label: string;
646
+ }[];
647
+ kind: "chargeRules" | "benefitPolicy" | "vehicleLocation";
648
+ title: string;
649
+ }>>;
650
+ };
55
651
 
56
652
  /** 模块注册入口:自注册闭环(与客户端 clientModule 对称) */
57
653
  declare const serverModule: {
654
+ declaration: {
655
+ moduleId: string;
656
+ };
58
657
  cards: {
59
- readonly 'parking-fee': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
60
- orderId: zod.ZodString;
61
- userId: zod.ZodString;
62
- plate: zod.ZodString;
63
- fee: zod.ZodNumber;
64
- paidAmount: zod.ZodOptional<zod.ZodNumber>;
65
- pointsUsed: zod.ZodOptional<zod.ZodNumber>;
66
- status: zod.ZodEnum<["PENDING", "PAID", "CANCELLED"]>;
67
- }, "strip", zod.ZodTypeAny, {
68
- status: "PAID" | "PENDING" | "CANCELLED";
69
- userId: string;
70
- orderId: string;
71
- plate: string;
72
- fee: number;
73
- paidAmount?: number | undefined;
74
- pointsUsed?: number | undefined;
75
- }, {
76
- status: "PAID" | "PENDING" | "CANCELLED";
77
- userId: string;
78
- orderId: string;
79
- plate: string;
80
- fee: number;
81
- paidAmount?: number | undefined;
82
- pointsUsed?: number | undefined;
658
+ readonly 'parking-payment': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
659
+ quoteRef: zod.ZodString;
660
+ plateNo: zod.ZodString;
661
+ entryAtText: zod.ZodOptional<zod.ZodString>;
662
+ durationText: zod.ZodOptional<zod.ZodString>;
663
+ feeItems: zod.ZodArray<zod.ZodObject<{
664
+ name: zod.ZodString;
665
+ amountText: zod.ZodString;
666
+ }, "strip", zod.ZodTypeAny, {
667
+ name: string;
668
+ amountText: string;
669
+ }, {
670
+ name: string;
671
+ amountText: string;
672
+ }>, "many">;
673
+ totalText: zod.ZodString;
674
+ discountText: zod.ZodOptional<zod.ZodString>;
675
+ payableText: zod.ZodString;
676
+ membership: zod.ZodOptional<zod.ZodObject<{
677
+ state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
678
+ availablePoints: zod.ZodOptional<zod.ZodNumber>;
679
+ }, "strip", zod.ZodTypeAny, {
680
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
681
+ availablePoints?: number | undefined;
682
+ }, {
683
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
684
+ availablePoints?: number | undefined;
685
+ }>>;
686
+ paymentOptions: zod.ZodOptional<zod.ZodObject<{
687
+ direct: zod.ZodObject<{
688
+ payableText: zod.ZodOptional<zod.ZodString>;
689
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
690
+ }, "strip", zod.ZodTypeAny, {
691
+ benefitRefs: string[];
692
+ payableText?: string | undefined;
693
+ }, {
694
+ benefitRefs: string[];
695
+ payableText?: string | undefined;
696
+ }>;
697
+ points: zod.ZodOptional<zod.ZodDiscriminatedUnion<"kind", [zod.ZodObject<{
698
+ kind: zod.ZodLiteral<"exact">;
699
+ pointsToUse: zod.ZodNumber;
700
+ payableText: zod.ZodString;
701
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
702
+ }, "strip", zod.ZodTypeAny, {
703
+ kind: "exact";
704
+ payableText: string;
705
+ benefitRefs: string[];
706
+ pointsToUse: number;
707
+ }, {
708
+ kind: "exact";
709
+ payableText: string;
710
+ benefitRefs: string[];
711
+ pointsToUse: number;
712
+ }>, zod.ZodObject<{
713
+ kind: zod.ZodLiteral<"requires_reprice">;
714
+ title: zod.ZodString;
715
+ benefitRefs: zod.ZodArray<zod.ZodString, "many">;
716
+ }, "strip", zod.ZodTypeAny, {
717
+ kind: "requires_reprice";
718
+ title: string;
719
+ benefitRefs: string[];
720
+ }, {
721
+ kind: "requires_reprice";
722
+ title: string;
723
+ benefitRefs: string[];
724
+ }>]>>;
725
+ }, "strip", zod.ZodTypeAny, {
726
+ direct: {
727
+ benefitRefs: string[];
728
+ payableText?: string | undefined;
729
+ };
730
+ points?: {
731
+ kind: "exact";
732
+ payableText: string;
733
+ benefitRefs: string[];
734
+ pointsToUse: number;
735
+ } | {
736
+ kind: "requires_reprice";
737
+ title: string;
738
+ benefitRefs: string[];
739
+ } | undefined;
740
+ }, {
741
+ direct: {
742
+ benefitRefs: string[];
743
+ payableText?: string | undefined;
744
+ };
745
+ points?: {
746
+ kind: "exact";
747
+ payableText: string;
748
+ benefitRefs: string[];
749
+ pointsToUse: number;
750
+ } | {
751
+ kind: "requires_reprice";
752
+ title: string;
753
+ benefitRefs: string[];
754
+ } | undefined;
755
+ }>>;
756
+ appliedBenefits: zod.ZodArray<zod.ZodObject<{
757
+ benefitRef: zod.ZodString;
758
+ title: zod.ZodString;
759
+ discountText: zod.ZodOptional<zod.ZodString>;
760
+ }, "strip", zod.ZodTypeAny, {
761
+ title: string;
762
+ benefitRef: string;
763
+ discountText?: string | undefined;
764
+ }, {
765
+ title: string;
766
+ benefitRef: string;
767
+ discountText?: string | undefined;
768
+ }>, "many">;
769
+ selectableBenefits: zod.ZodArray<zod.ZodObject<{
770
+ benefitRef: zod.ZodString;
771
+ title: zod.ZodString;
772
+ autoSelected: zod.ZodBoolean;
773
+ description: zod.ZodOptional<zod.ZodString>;
774
+ kind: zod.ZodOptional<zod.ZodEnum<["points", "discount", "coupon", "other"]>>;
775
+ discountText: zod.ZodOptional<zod.ZodString>;
776
+ exclusiveWithKinds: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["points", "discount", "coupon"]>, "many">>;
777
+ }, "strip", zod.ZodTypeAny, {
778
+ title: string;
779
+ benefitRef: string;
780
+ autoSelected: boolean;
781
+ description?: string | undefined;
782
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
783
+ discountText?: string | undefined;
784
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
785
+ }, {
786
+ title: string;
787
+ benefitRef: string;
788
+ autoSelected: boolean;
789
+ description?: string | undefined;
790
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
791
+ discountText?: string | undefined;
792
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
793
+ }>, "many">;
794
+ revision: zod.ZodNumber;
795
+ caveats: zod.ZodArray<zod.ZodString, "many">;
796
+ payHandoff: zod.ZodOptional<zod.ZodObject<{
797
+ kind: zod.ZodEnum<["pay", "unpaid"]>;
798
+ parkingStoreId: zod.ZodOptional<zod.ZodString>;
799
+ orderInfo: zod.ZodOptional<zod.ZodObject<{
800
+ staySecond: zod.ZodOptional<zod.ZodNumber>;
801
+ parkingFee: zod.ZodOptional<zod.ZodNumber>;
802
+ bindingStatus: zod.ZodOptional<zod.ZodNumber>;
803
+ plateNumber: zod.ZodOptional<zod.ZodString>;
804
+ orderType: zod.ZodNumber;
805
+ spParkingOrderId: zod.ZodOptional<zod.ZodString>;
806
+ parkingId: zod.ZodString;
807
+ entranceTime: zod.ZodOptional<zod.ZodString>;
808
+ supportDiscount: zod.ZodOptional<zod.ZodString>;
809
+ }, "strip", zod.ZodTypeAny, {
810
+ orderType: number;
811
+ parkingId: string;
812
+ staySecond?: number | undefined;
813
+ parkingFee?: number | undefined;
814
+ bindingStatus?: number | undefined;
815
+ plateNumber?: string | undefined;
816
+ spParkingOrderId?: string | undefined;
817
+ entranceTime?: string | undefined;
818
+ supportDiscount?: string | undefined;
819
+ }, {
820
+ orderType: number;
821
+ parkingId: string;
822
+ staySecond?: number | undefined;
823
+ parkingFee?: number | undefined;
824
+ bindingStatus?: number | undefined;
825
+ plateNumber?: string | undefined;
826
+ spParkingOrderId?: string | undefined;
827
+ entranceTime?: string | undefined;
828
+ supportDiscount?: string | undefined;
829
+ }>>;
830
+ orderNo: zod.ZodOptional<zod.ZodString>;
831
+ }, "strip", zod.ZodTypeAny, {
832
+ kind: "pay" | "unpaid";
833
+ orderInfo?: {
834
+ orderType: number;
835
+ parkingId: string;
836
+ staySecond?: number | undefined;
837
+ parkingFee?: number | undefined;
838
+ bindingStatus?: number | undefined;
839
+ plateNumber?: string | undefined;
840
+ spParkingOrderId?: string | undefined;
841
+ entranceTime?: string | undefined;
842
+ supportDiscount?: string | undefined;
843
+ } | undefined;
844
+ parkingStoreId?: string | undefined;
845
+ orderNo?: string | undefined;
846
+ }, {
847
+ kind: "pay" | "unpaid";
848
+ orderInfo?: {
849
+ orderType: number;
850
+ parkingId: string;
851
+ staySecond?: number | undefined;
852
+ parkingFee?: number | undefined;
853
+ bindingStatus?: number | undefined;
854
+ plateNumber?: string | undefined;
855
+ spParkingOrderId?: string | undefined;
856
+ entranceTime?: string | undefined;
857
+ supportDiscount?: string | undefined;
858
+ } | undefined;
859
+ parkingStoreId?: string | undefined;
860
+ orderNo?: string | undefined;
861
+ }>>;
862
+ settlement: zod.ZodOptional<zod.ZodObject<{
863
+ state: zod.ZodEnum<["paying", "paid", "failed"]>;
864
+ text: zod.ZodString;
865
+ }, "strip", zod.ZodTypeAny, {
866
+ text: string;
867
+ state: "failed" | "paying" | "paid";
868
+ }, {
869
+ text: string;
870
+ state: "failed" | "paying" | "paid";
871
+ }>>;
872
+ }, "strip", zod.ZodTypeAny, {
873
+ revision: number;
874
+ caveats: string[];
875
+ quoteRef: string;
876
+ plateNo: string;
877
+ feeItems: {
878
+ name: string;
879
+ amountText: string;
880
+ }[];
881
+ totalText: string;
882
+ payableText: string;
883
+ appliedBenefits: {
884
+ title: string;
885
+ benefitRef: string;
886
+ discountText?: string | undefined;
887
+ }[];
888
+ selectableBenefits: {
889
+ title: string;
890
+ benefitRef: string;
891
+ autoSelected: boolean;
892
+ description?: string | undefined;
893
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
894
+ discountText?: string | undefined;
895
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
896
+ }[];
897
+ entryAtText?: string | undefined;
898
+ durationText?: string | undefined;
899
+ discountText?: string | undefined;
900
+ membership?: {
901
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
902
+ availablePoints?: number | undefined;
903
+ } | undefined;
904
+ paymentOptions?: {
905
+ direct: {
906
+ benefitRefs: string[];
907
+ payableText?: string | undefined;
908
+ };
909
+ points?: {
910
+ kind: "exact";
911
+ payableText: string;
912
+ benefitRefs: string[];
913
+ pointsToUse: number;
914
+ } | {
915
+ kind: "requires_reprice";
916
+ title: string;
917
+ benefitRefs: string[];
918
+ } | undefined;
919
+ } | undefined;
920
+ payHandoff?: {
921
+ kind: "pay" | "unpaid";
922
+ orderInfo?: {
923
+ orderType: number;
924
+ parkingId: string;
925
+ staySecond?: number | undefined;
926
+ parkingFee?: number | undefined;
927
+ bindingStatus?: number | undefined;
928
+ plateNumber?: string | undefined;
929
+ spParkingOrderId?: string | undefined;
930
+ entranceTime?: string | undefined;
931
+ supportDiscount?: string | undefined;
932
+ } | undefined;
933
+ parkingStoreId?: string | undefined;
934
+ orderNo?: string | undefined;
935
+ } | undefined;
936
+ settlement?: {
937
+ text: string;
938
+ state: "failed" | "paying" | "paid";
939
+ } | undefined;
940
+ }, {
941
+ revision: number;
942
+ caveats: string[];
943
+ quoteRef: string;
944
+ plateNo: string;
945
+ feeItems: {
946
+ name: string;
947
+ amountText: string;
948
+ }[];
949
+ totalText: string;
950
+ payableText: string;
951
+ appliedBenefits: {
952
+ title: string;
953
+ benefitRef: string;
954
+ discountText?: string | undefined;
955
+ }[];
956
+ selectableBenefits: {
957
+ title: string;
958
+ benefitRef: string;
959
+ autoSelected: boolean;
960
+ description?: string | undefined;
961
+ kind?: "other" | "points" | "discount" | "coupon" | undefined;
962
+ discountText?: string | undefined;
963
+ exclusiveWithKinds?: ("points" | "discount" | "coupon")[] | undefined;
964
+ }[];
965
+ entryAtText?: string | undefined;
966
+ durationText?: string | undefined;
967
+ discountText?: string | undefined;
968
+ membership?: {
969
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
970
+ availablePoints?: number | undefined;
971
+ } | undefined;
972
+ paymentOptions?: {
973
+ direct: {
974
+ benefitRefs: string[];
975
+ payableText?: string | undefined;
976
+ };
977
+ points?: {
978
+ kind: "exact";
979
+ payableText: string;
980
+ benefitRefs: string[];
981
+ pointsToUse: number;
982
+ } | {
983
+ kind: "requires_reprice";
984
+ title: string;
985
+ benefitRefs: string[];
986
+ } | undefined;
987
+ } | undefined;
988
+ payHandoff?: {
989
+ kind: "pay" | "unpaid";
990
+ orderInfo?: {
991
+ orderType: number;
992
+ parkingId: string;
993
+ staySecond?: number | undefined;
994
+ parkingFee?: number | undefined;
995
+ bindingStatus?: number | undefined;
996
+ plateNumber?: string | undefined;
997
+ spParkingOrderId?: string | undefined;
998
+ entranceTime?: string | undefined;
999
+ supportDiscount?: string | undefined;
1000
+ } | undefined;
1001
+ parkingStoreId?: string | undefined;
1002
+ orderNo?: string | undefined;
1003
+ } | undefined;
1004
+ settlement?: {
1005
+ text: string;
1006
+ state: "failed" | "paying" | "paid";
1007
+ } | undefined;
1008
+ }>>;
1009
+ readonly 'parking-payment-result': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
1010
+ paymentRef: zod.ZodString;
1011
+ plateNo: zod.ZodString;
1012
+ status: zod.ZodEnum<["PAID", "CANCELLED", "UNKNOWN"]>;
1013
+ amountText: zod.ZodOptional<zod.ZodString>;
1014
+ message: zod.ZodString;
1015
+ retryable: zod.ZodOptional<zod.ZodBoolean>;
1016
+ leaveNotice: zod.ZodOptional<zod.ZodString>;
1017
+ details: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1018
+ label: zod.ZodString;
1019
+ value: zod.ZodString;
1020
+ }, "strip", zod.ZodTypeAny, {
1021
+ value: string;
1022
+ label: string;
1023
+ }, {
1024
+ value: string;
1025
+ label: string;
1026
+ }>, "many">>;
1027
+ }, "strip", zod.ZodTypeAny, {
1028
+ message: string;
1029
+ status: "PAID" | "UNKNOWN" | "CANCELLED";
1030
+ paymentRef: string;
1031
+ plateNo: string;
1032
+ amountText?: string | undefined;
1033
+ retryable?: boolean | undefined;
1034
+ leaveNotice?: string | undefined;
1035
+ details?: {
1036
+ value: string;
1037
+ label: string;
1038
+ }[] | undefined;
1039
+ }, {
1040
+ message: string;
1041
+ status: "PAID" | "UNKNOWN" | "CANCELLED";
1042
+ paymentRef: string;
1043
+ plateNo: string;
1044
+ amountText?: string | undefined;
1045
+ retryable?: boolean | undefined;
1046
+ leaveNotice?: string | undefined;
1047
+ details?: {
1048
+ value: string;
1049
+ label: string;
1050
+ }[] | undefined;
1051
+ }>>;
1052
+ readonly 'parking-payment-records': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
1053
+ items: zod.ZodArray<zod.ZodObject<{
1054
+ recordRef: zod.ZodString;
1055
+ plateNo: zod.ZodString;
1056
+ amountText: zod.ZodString;
1057
+ paidAtText: zod.ZodString;
1058
+ status: zod.ZodEnum<["PAID", "REFUNDED", "CLOSED", "UNKNOWN"]>;
1059
+ statusText: zod.ZodOptional<zod.ZodString>;
1060
+ parkName: zod.ZodOptional<zod.ZodString>;
1061
+ plazaName: zod.ZodOptional<zod.ZodString>;
1062
+ entryAtText: zod.ZodOptional<zod.ZodString>;
1063
+ exitAtText: zod.ZodOptional<zod.ZodString>;
1064
+ payOrderNoMasked: zod.ZodOptional<zod.ZodString>;
1065
+ orderCompleted: zod.ZodOptional<zod.ZodBoolean>;
1066
+ invoiceEligible: zod.ZodOptional<zod.ZodBoolean>;
1067
+ invoiceIssued: zod.ZodOptional<zod.ZodBoolean>;
1068
+ }, "strip", zod.ZodTypeAny, {
1069
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
1070
+ plateNo: string;
1071
+ amountText: string;
1072
+ recordRef: string;
1073
+ paidAtText: string;
1074
+ statusText?: string | undefined;
1075
+ entryAtText?: string | undefined;
1076
+ parkName?: string | undefined;
1077
+ plazaName?: string | undefined;
1078
+ exitAtText?: string | undefined;
1079
+ payOrderNoMasked?: string | undefined;
1080
+ orderCompleted?: boolean | undefined;
1081
+ invoiceEligible?: boolean | undefined;
1082
+ invoiceIssued?: boolean | undefined;
1083
+ }, {
1084
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
1085
+ plateNo: string;
1086
+ amountText: string;
1087
+ recordRef: string;
1088
+ paidAtText: string;
1089
+ statusText?: string | undefined;
1090
+ entryAtText?: string | undefined;
1091
+ parkName?: string | undefined;
1092
+ plazaName?: string | undefined;
1093
+ exitAtText?: string | undefined;
1094
+ payOrderNoMasked?: string | undefined;
1095
+ orderCompleted?: boolean | undefined;
1096
+ invoiceEligible?: boolean | undefined;
1097
+ invoiceIssued?: boolean | undefined;
1098
+ }>, "many">;
1099
+ total: zod.ZodNumber;
1100
+ hasMore: zod.ZodBoolean;
1101
+ caveats: zod.ZodArray<zod.ZodString, "many">;
1102
+ message: zod.ZodOptional<zod.ZodString>;
1103
+ }, "strip", zod.ZodTypeAny, {
1104
+ total: number;
1105
+ hasMore: boolean;
1106
+ items: {
1107
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
1108
+ plateNo: string;
1109
+ amountText: string;
1110
+ recordRef: string;
1111
+ paidAtText: string;
1112
+ statusText?: string | undefined;
1113
+ entryAtText?: string | undefined;
1114
+ parkName?: string | undefined;
1115
+ plazaName?: string | undefined;
1116
+ exitAtText?: string | undefined;
1117
+ payOrderNoMasked?: string | undefined;
1118
+ orderCompleted?: boolean | undefined;
1119
+ invoiceEligible?: boolean | undefined;
1120
+ invoiceIssued?: boolean | undefined;
1121
+ }[];
1122
+ caveats: string[];
1123
+ message?: string | undefined;
1124
+ }, {
1125
+ total: number;
1126
+ hasMore: boolean;
1127
+ items: {
1128
+ status: "PAID" | "UNKNOWN" | "REFUNDED" | "CLOSED";
1129
+ plateNo: string;
1130
+ amountText: string;
1131
+ recordRef: string;
1132
+ paidAtText: string;
1133
+ statusText?: string | undefined;
1134
+ entryAtText?: string | undefined;
1135
+ parkName?: string | undefined;
1136
+ plazaName?: string | undefined;
1137
+ exitAtText?: string | undefined;
1138
+ payOrderNoMasked?: string | undefined;
1139
+ orderCompleted?: boolean | undefined;
1140
+ invoiceEligible?: boolean | undefined;
1141
+ invoiceIssued?: boolean | undefined;
1142
+ }[];
1143
+ caveats: string[];
1144
+ message?: string | undefined;
1145
+ }>>;
1146
+ readonly 'parking-vehicle-management': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
1147
+ bound: zod.ZodArray<zod.ZodObject<{
1148
+ vehicleRef: zod.ZodString;
1149
+ plateNo: zod.ZodString;
1150
+ parked: zod.ZodOptional<zod.ZodBoolean>;
1151
+ }, "strip", zod.ZodTypeAny, {
1152
+ plateNo: string;
1153
+ vehicleRef: string;
1154
+ parked?: boolean | undefined;
1155
+ }, {
1156
+ plateNo: string;
1157
+ vehicleRef: string;
1158
+ parked?: boolean | undefined;
1159
+ }>, "many">;
1160
+ message: zod.ZodOptional<zod.ZodString>;
1161
+ membership: zod.ZodOptional<zod.ZodObject<{
1162
+ state: zod.ZodEnum<["unauthenticated", "unknown", "active", "not_enrolled", "closed", "unavailable"]>;
1163
+ }, "strip", zod.ZodTypeAny, {
1164
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1165
+ }, {
1166
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1167
+ }>>;
1168
+ }, "strip", zod.ZodTypeAny, {
1169
+ bound: {
1170
+ plateNo: string;
1171
+ vehicleRef: string;
1172
+ parked?: boolean | undefined;
1173
+ }[];
1174
+ message?: string | undefined;
1175
+ membership?: {
1176
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1177
+ } | undefined;
1178
+ }, {
1179
+ bound: {
1180
+ plateNo: string;
1181
+ vehicleRef: string;
1182
+ parked?: boolean | undefined;
1183
+ }[];
1184
+ message?: string | undefined;
1185
+ membership?: {
1186
+ state: "unknown" | "unavailable" | "unauthenticated" | "active" | "not_enrolled" | "closed";
1187
+ } | undefined;
1188
+ }>>;
1189
+ readonly 'parking-info': _tbox_cn_app_contracts.CardMeta<zod.ZodObject<{
1190
+ kind: zod.ZodEnum<["chargeRules", "benefitPolicy", "vehicleLocation"]>;
1191
+ title: zod.ZodString;
1192
+ entries: zod.ZodArray<zod.ZodObject<{
1193
+ label: zod.ZodString;
1194
+ value: zod.ZodString;
1195
+ }, "strip", zod.ZodTypeAny, {
1196
+ value: string;
1197
+ label: string;
1198
+ }, {
1199
+ value: string;
1200
+ label: string;
1201
+ }>, "many">;
1202
+ }, "strip", zod.ZodTypeAny, {
1203
+ entries: {
1204
+ value: string;
1205
+ label: string;
1206
+ }[];
1207
+ kind: "chargeRules" | "benefitPolicy" | "vehicleLocation";
1208
+ title: string;
1209
+ }, {
1210
+ entries: {
1211
+ value: string;
1212
+ label: string;
1213
+ }[];
1214
+ kind: "chargeRules" | "benefitPolicy" | "vehicleLocation";
1215
+ title: string;
83
1216
  }>>;
84
1217
  };
1218
+ skills: {
1219
+ [k: string]: _tbox_cn_app_sdk_server.LocalSkill;
1220
+ };
1221
+ preTools: {
1222
+ queryParkingFee: PreToolDef<_mastra_core_tools.Tool<{
1223
+ plateNo?: string | undefined;
1224
+ vehicleRef?: string | undefined;
1225
+ barcode?: string | undefined;
1226
+ }, unknown, unknown, unknown, _mastra_core_tools.ToolExecutionContext<unknown, unknown, unknown>, "queryParkingFee", unknown>>;
1227
+ listVehicles: PreToolDef<_mastra_core_tools.Tool<{}, unknown, unknown, unknown, _mastra_core_tools.ToolExecutionContext<unknown, unknown, unknown>, "listVehicles", unknown>>;
1228
+ };
85
1229
  register(ctx: ServerContext): void;
86
1230
  };
87
1231
 
88
- export { InMemoryParkingService, meta as parkingFeeMeta, serverModule };
1232
+ export { InMemoryParkingService, inMemoryParking, parkingCards, resolveParkingPaymentPort, resolveParkingQueryPort, resolveParkingVehiclePort, serverModule };