16 lines
446 B
TypeScript
16 lines
446 B
TypeScript
/**
|
|
* User 状态机:事件联合
|
|
*/
|
|
import type { UserView } from "@/data/dto/user";
|
|
|
|
export type UserEvent =
|
|
| { type: "UserInit" }
|
|
| { type: "UserFetch" }
|
|
| { type: "UserUpdate"; user: UserView }
|
|
| { type: "UserUpdateUsername"; username: string }
|
|
| { type: "UserUpdatePronouns"; pronouns: string }
|
|
| { type: "UserClearLocal" }
|
|
| { type: "UserLogout" }
|
|
| { type: "UserDeleteChatHistory" }
|
|
| { type: "UserDeleteAccount" };
|