import { invoke } from "@tauri-apps/api/core"; export interface AccountInfo { email: string; name: string | null; picture: string | null; subscription_status: string | null; } export async function startOAuth(): Promise { return invoke("start_oauth"); } export async function refreshAuthToken(): Promise { return invoke("refresh_auth_token"); } export async function getAccountInfo(): Promise { return invoke("get_account_info"); } export async function checkSubscriptionStatus(): Promise { return invoke("check_subscription_status"); } export async function logoutAccount(): Promise { return invoke("logout"); } export type TokenStoreMode = "keychain" | "file"; export async function getTokenStoreMode(): Promise { return invoke("get_token_store_mode"); }