/// 接口名称
abstract class Api {
  /// 游客登录查看是否已经注册
  static const String kr_isRegister = "/v1/auth/check";

  /// 判断邮箱和当前设备是否已存在订阅
  static const String kr_checkSubscription = "/v1/public/user/subscribe_status";

  /// 注册
  // static const String kr_register = "/v1/auth/register";
  static const String kr_register =
      "/v1/public/user/bind_email_with_verification";

  /// 验证验证码
  static const String kr_checkVerificationCode = "/v1/auth/check-code";

  /// 发送验证码（统一接口，支持邮箱和手机）
  static const String kr_sendCode = "/v1/common/send_code";

  /// 登录接口
  static const String kr_login = "/v1/public/user/bind_email_with_password";

  /// 设备登录（游客登录）
  /// 参考 OmnOem 项目 ppanel.json 配置
  static const String kr_deviceLogin = "/v1/auth/login/device";

  /// 删除账号
  static const String kr_deleteAccount = "/v1/public/user/delete_account";

  /// 忘记密码-设置新密码
  static const String kr_setNewPsdByForgetPsd = "/v1/app/auth/reset_password";

  /// 忘记密码-邮箱重置密码
  static const String kr_resetPassword = "/v1/auth/reset";

  /// 忘记密码-手机号重置密码
  static const String kr_resetPasswordByTelephone = "/v1/auth/reset/telephone";

  /// 节点信息（包含试用/付费标志）
  static const String kr_nodeList = "/v1/public/subscribe/node/list";

  /// 获取用户订阅流量日志
  static const String kr_nodeGroupList = "/v1/app/node/rule_group_list";

  /// 预下单
  static const String kr_preOrder = "/v1/app/order/pre";

  /// 获取下单zf方式
  static const String kr_getPaymentMethods = "/v1/app/payment/methods";

  /// 进行下单
  static const String kr_purchase = "/v1/public/order/purchase";

  /// 获取支付地址,跳转到付款地址（参考 Tauri 项目）
  static const String kr_checkout = "/v1/public/portal/order/checkout";

  /// 获取可购买套餐
  static const String kr_getPackageList = "/v1/public/subscribe/list";

  /// 获取用户已订阅套餐（用于判断是否购买过）
  static const String kr_getAlreadySubscribe = "/v1/public/user/subscribe";

  /// 获取用户可用订阅（与已订阅接口相同，OmnOem 项目中没有区分）
  static const String kr_userAvailableSubscribe = "/v1/public/user/subscribe";

  /// 续费
  static const String kr_renewal = "/v1/public/order/renewal";

  /// 获取用户订阅流量日志
  /// 通过该接口判断订单状态
  static const String kr_orderDetail = "/v1/app/order/detail";

  /// 查询订单状态（公开接口，参考 Tauri 项目）
  static const String kr_queryOrderStatus = "/v1/public/order/detail";

  /// 获取消息列表
  static const String kr_getMessageList = "/v1/public/announcement/list";

  /// 获取邀请数据
  // static const String kr_getInviteData = "/v1/public/invite/code";

  /// 配置信息
  static const String kr_config = "/v1/common/site/config";

  /// 获取用户在线时长统计
  static const String kr_getUserOnlineTimeStatistics =
      "/v1/app/user/online_time/statistics";

  /// 获取用户邀请人数
  static const String kr_getAffiliateCount = "/v1/public/user/affiliate/count";

  /// 获取站点协议
  static const String kr_getSiteTos = "/v1/common/site/tos";

  /// 隐私政策
  static const String kr_getSitePrivacy = "/v1/common/site/privacy";

  /// 获取网页文本内容
  static const String kr_getWebText = "/v1/common/site/text";

  /// 重置订阅周期
  static const String kr_resetSubscribePeriod =
      "/v1/app/subscribe/reset/period";

  /// 获取用户设备列表
  static const String kr_getUserDevices = "/v1/public/user/devices";

  /// 解绑用户设备
  static const String kr_unbindUserDevice = "/v1/public/user/unbind_device";

  /// 获取可用支付方式（公开接口）
  static const String kr_getPublicPaymentMethods = "/v1/public/payment/methods";

  static const String kr_attachAppleIapTransaction =
      "/v1/public/iap/apple/transactions/attach";
  static const String kr_restoreAppleIap = "/v1/public/iap/apple/restore";

  /// 获取用户信息（用于获取邀请码等）
  static const String kr_getUserInfo = "/v1/public/user/info";

  /// 保存邀请码
  static const String hi_invite_code = "/v1/public/user/bind_invite_code";
}
