Files
cozsweet-frontend-nextjs/src/stores/payment/payment-events.ts
T

17 lines
605 B
TypeScript

/**
* Payment 状态机:事件联合
*/
import type { PayChannel } from "@/data/dto/payment";
export type PaymentEvent =
| { type: "PaymentInit" }
| { type: "PaymentPlanSelected"; planId: string }
| { type: "PaymentPayChannelChanged"; payChannel: PayChannel }
| { type: "PaymentAutoRenewChanged"; autoRenew: boolean }
| { type: "PaymentAgreementChanged"; agreed: boolean }
| { type: "PaymentCreateOrderSubmitted" }
| { type: "PaymentReturned"; orderId: string }
| { type: "PaymentLaunchFailed"; errorMessage: string }
| { type: "PaymentErrorCleared" }
| { type: "PaymentReset" };