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

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" };