import type { CallApiOptions, EasyApiFunc } from "@rockyf/easy-api" export declare namespace easynovel { interface auth_postForgotPassword_req { body: { /**邮箱地址*/ email: string } } interface auth_postLogin_req { body: { /**密码*/ password: string, /**用户名*/ username: string } } interface auth_postLogin_resp { /**认证令牌*/ token?: string /**用户信息*/ user?: { /**头像地址*/ avatar: string, /**创建时间*/ createdAt: string, /**邮箱地址*/ email: string, /**粉丝数量*/ followersCount: number, /**关注数量*/ followingCount: number, /**性别*/ gender: string, /**用户ID*/ id: number, /**邮箱是否已验证*/ isEmailVerified: boolean, /**是否为高级用户*/ isPremium: boolean, /**手机号码*/ phoneNumber: string, /**用户角色*/ role: string, /**更新时间*/ updatedAt: string, /**用户等级*/ userLevel: number, /**用户名*/ username: string } } interface auth_postRegister_req { body: { /**邮箱地址*/ email?: string, /**密码*/ password: string, /**用户名*/ username: string } } interface auth_postResetPassword_req { body: { /**确认密码*/ confirmPassword: string, /**新密码*/ newPassword: string, /**验证令牌*/ token: string } } interface captcha_getGenerate_resp { /**验证码图片Base64*/ base64?: string /**验证码ID*/ captchaId?: string /**是否成功*/ success?: boolean } interface captcha_postVerify_req { body: { /**验证码内容*/ captchaCode: string, /**验证码ID*/ captchaId: string } } interface captcha_postVerify_resp { /**结果消息*/ message?: string /**是否成功*/ success?: boolean } interface const_getUserLevels_item_resp { /**等级描述*/ description: string /**等级特性*/ features: string /**等级*/ level: number /**等级名称*/ name: string /**等级价格*/ price: number /**每日字数限制*/ wordLimitPerDay: number } interface email_postResend_req { body: { /**邮箱地址*/ email: string } } interface email_postVerify_req { body: { /**验证令牌*/ token: string } } interface files_postAvatar_resp { /**文件信息*/ file?: { /**文件名*/ filename: string, /**文件大小(字节)*/ size: number, /**文件类型*/ type: string, /**文件URL*/ url: string } /**上传结果消息*/ message?: string /**上传是否成功*/ success?: boolean } interface files_postUpload_resp { /**文件信息*/ file?: { /**文件名*/ filename: string, /**文件大小(字节)*/ size: number, /**文件类型*/ type: string, /**文件URL*/ url: string } /**上传结果消息*/ message?: string /**上传是否成功*/ success?: boolean } interface novels_postNovels_req { body: { /**小说内容*/ content: string, /**封面图片*/ cover?: string, /**是否公开*/ isPublic?: boolean, /**小说简介*/ summary: string, /**小说标题*/ title: string } } interface novels_postNovels_resp { /**小说内容*/ content?: string /**封面图片*/ cover?: string /**创建时间*/ createdAt?: string /**小说ID*/ id?: number /**是否公开*/ isPublic?: boolean /**小说简介*/ summary?: string /**小说标题*/ title?: string /**更新时间*/ updatedAt?: string /**作者ID*/ userId?: number } interface novels_getNovelsMy_req { /**页码*/ page?: number /**每页数量*/ pageSize?: number } interface novels_getNovelsMy_resp { /**小说列表*/ list?: { /**作者名字*/ author: string, /**封面图片*/ cover: string, /**创建时间*/ createdAt: string, /**小说ID*/ id: number, /**是否公开*/ isPublic: boolean, /**小说简介*/ summary: string, /**小说标题*/ title: string, /**更新时间*/ updatedAt: string, /**作者ID*/ userId: number }[] /**总数*/ total?: number } interface novels_getNovelsById_resp { /**小说内容*/ content?: string /**封面图片*/ cover?: string /**创建时间*/ createdAt?: string /**小说ID*/ id?: number /**是否公开*/ isPublic?: boolean /**小说简介*/ summary?: string /**小说标题*/ title?: string /**更新时间*/ updatedAt?: string /**作者ID*/ userId?: number } interface novels_putNovelsById_req { body: { /**小说内容*/ content?: string, /**封面图片*/ cover?: string, /**是否公开*/ isPublic?: boolean, /**小说简介*/ summary?: string, /**小说标题*/ title?: string } } interface novels_putNovelsById_resp { /**小说内容*/ content?: string /**封面图片*/ cover?: string /**创建时间*/ createdAt?: string /**小说ID*/ id?: number /**是否公开*/ isPublic?: boolean /**小说简介*/ summary?: string /**小说标题*/ title?: string /**更新时间*/ updatedAt?: string /**作者ID*/ userId?: number } interface novels_getPublic_req { /**页码*/ page?: number /**每页数量*/ pageSize?: number } interface novels_getPublic_resp { /**小说列表*/ list?: { /**作者名字*/ author: string, /**封面图片*/ cover: string, /**创建时间*/ createdAt: string, /**小说ID*/ id: number, /**是否公开*/ isPublic: boolean, /**小说简介*/ summary: string, /**小说标题*/ title: string, /**更新时间*/ updatedAt: string, /**作者ID*/ userId: number }[] /**总数*/ total?: number } interface payments_postCreate_req { body: { /**支付金额*/ amount: number, /**元数据*/ metadata?: string, /**支付类型: "level_upgrade" | "word_limit_upgrade"*/ type: string } } interface payments_postCreate_resp { /**支付金额*/ amount?: number /**创建时间*/ createdAt?: string /**支付ID*/ id?: string /**元数据*/ metadata?: string /**支付状态: "pending" | "success" | "failed"*/ status?: string /**交易ID*/ transactionId?: string /**支付类型: "level_upgrade" | "word_limit_upgrade"*/ type?: string /**更新时间*/ updatedAt?: string /**用户ID*/ userId?: number } interface payments_getHistory_item_resp { /**支付金额*/ amount: number /**创建时间*/ createdAt: string /**支付ID*/ id: string /**元数据*/ metadata: string /**支付状态: "pending" | "success" | "failed"*/ status: string /**交易ID*/ transactionId: string /**支付类型: "level_upgrade" | "word_limit_upgrade"*/ type: string /**更新时间*/ updatedAt: string /**用户ID*/ userId: number } interface payments_postByIdProcess_req { body: { /**交易ID*/ transactionId: string } } interface payments_postByIdProcess_resp { /**支付金额*/ amount?: number /**创建时间*/ createdAt?: string /**支付ID*/ id?: string /**元数据*/ metadata?: string /**支付状态: "pending" | "success" | "failed"*/ status?: string /**交易ID*/ transactionId?: string /**支付类型: "level_upgrade" | "word_limit_upgrade"*/ type?: string /**更新时间*/ updatedAt?: string /**用户ID*/ userId?: number } interface users_getProfile_resp { /**头像地址*/ avatar?: string /**创建时间*/ createdAt?: string /**邮箱地址*/ email?: string /**粉丝数量*/ followersCount?: number /**关注数量*/ followingCount?: number /**性别*/ gender?: string /**用户ID*/ id?: number /**邮箱是否已验证*/ isEmailVerified?: boolean /**是否为高级用户*/ isPremium?: boolean /**手机号码*/ phoneNumber?: string /**用户角色*/ role?: string /**更新时间*/ updatedAt?: string /**用户等级*/ userLevel?: number /**用户名*/ username?: string } interface users_patchProfile_req { body: { /**头像地址*/ avatar?: string, /**性别*/ gender?: "male" | "female" | "other", /**用户名*/ username?: string } } interface users_patchProfile_resp { /**头像地址*/ avatar?: string /**创建时间*/ createdAt?: string /**邮箱地址*/ email?: string /**粉丝数量*/ followersCount?: number /**关注数量*/ followingCount?: number /**性别*/ gender?: string /**用户ID*/ id?: number /**邮箱是否已验证*/ isEmailVerified?: boolean /**是否为高级用户*/ isPremium?: boolean /**手机号码*/ phoneNumber?: string /**用户角色*/ role?: string /**更新时间*/ updatedAt?: string /**用户等级*/ userLevel?: number /**用户名*/ username?: string } interface users_getByUserId_resp { /**头像地址*/ avatar?: string /**粉丝数量*/ followersCount?: number /**关注数量*/ followingCount?: number /**用户ID*/ id?: number /**当前用户是否已关注该用户*/ isFollowing?: boolean /**用户等级*/ userLevel?: number /**用户名*/ username?: string } interface users_getByUserIdFollowers_req { /**页码*/ page?: number /**每页数量*/ pageSize?: number } interface users_getByUserIdFollowers_resp { /**用户列表*/ list?: { /**头像地址*/ avatar: string, /**粉丝数量*/ followersCount: number, /**关注数量*/ followingCount: number, /**用户ID*/ id: number, /**当前用户是否已关注该用户*/ isFollowing: boolean, /**用户等级*/ userLevel: number, /**用户名*/ username: string }[] /**总数*/ total?: number } interface users_getByUserIdFollowing_req { /**页码*/ page?: number /**每页数量*/ pageSize?: number } interface users_getByUserIdFollowing_resp { /**用户列表*/ list?: { /**头像地址*/ avatar: string, /**粉丝数量*/ followersCount: number, /**关注数量*/ followingCount: number, /**用户ID*/ id: number, /**当前用户是否已关注该用户*/ isFollowing: boolean, /**用户等级*/ userLevel: number, /**用户名*/ username: string }[] /**总数*/ total?: number } type IApis = { auth: { /** * 忘记密码 * @desc POST /auth/forgot-password */ postForgotPassword: ((params: auth_postForgotPassword_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 用户登录 * @desc POST /auth/login */ postLogin: ((params: auth_postLogin_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 登出 * @desc POST /auth/logout */ postLogout: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 用户注册 * @desc POST /auth/register */ postRegister: ((params: auth_postRegister_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 通过令牌重设密码 * @desc POST /auth/reset-password */ postResetPassword: ((params: auth_postResetPassword_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 验证Token * @desc GET /auth/verify */ getVerify: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc } captcha: { /** * 生成验证码 * @desc GET /captcha/generate */ getGenerate: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 验证验证码 * @desc POST /captcha/verify */ postVerify: ((params: captcha_postVerify_req, options?: CallApiOptions) => Promise) & EasyApiFunc } const: { /** * 获取用户等级信息 * @desc GET /const/user-levels */ getUserLevels: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc } email: { /** * 重新发送验证邮件 * @desc POST /email/resend */ postResend: ((params: email_postResend_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 验证邮箱 * @desc POST /email/verify */ postVerify: ((params: email_postVerify_req, options?: CallApiOptions) => Promise) & EasyApiFunc } files: { /** * 上传头像 * @desc POST /files/avatar */ postAvatar: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 需要授权的文件上传接口 * @desc POST /files/upload */ postUpload: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc } health: { /** * 健康检查 * @desc GET /health */ get: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc } novels: { /** * 创建小说 * @desc POST /novels/novels */ postNovels: ((params: novels_postNovels_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取我的小说列表 * @desc GET /novels/novels/my */ getNovelsMy: ((params?: novels_getNovelsMy_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取小说详情 * @desc GET /novels/novels/{id} */ getNovelsById: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 更新小说 * @desc PUT /novels/novels/{id} */ putNovelsById: ((params: novels_putNovelsById_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 删除小说 * @desc DELETE /novels/novels/{id} */ deleteNovelsById: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取公开小说列表 * @desc GET /novels/public */ getPublic: ((params?: novels_getPublic_req, options?: CallApiOptions) => Promise) & EasyApiFunc } payments: { /** * 创建支付订单 * @desc POST /payments/create */ postCreate: ((params: payments_postCreate_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取支付历史 * @desc GET /payments/history */ getHistory: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 处理支付结果 * @desc POST /payments/{id}/process */ postByIdProcess: ((params: payments_postByIdProcess_req, options?: CallApiOptions) => Promise) & EasyApiFunc } users: { /** * 获取当前用户信息 * @desc GET /users/profile */ getProfile: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 更新用户信息 * @desc PATCH /users/profile */ patchProfile: ((params: users_patchProfile_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 根据用户ID获取用户信息 * @desc GET /users/{userId} */ getByUserId: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 关注用户 * @desc POST /users/{userId}/follow */ postByUserIdFollow: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 取消关注用户 * @desc DELETE /users/{userId}/follow */ deleteByUserIdFollow: ((params?: any, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取用户的粉丝列表 * @desc GET /users/{userId}/followers */ getByUserIdFollowers: ((params?: users_getByUserIdFollowers_req, options?: CallApiOptions) => Promise) & EasyApiFunc /** * 获取用户的关注列表 * @desc GET /users/{userId}/following */ getByUserIdFollowing: ((params?: users_getByUserIdFollowing_req, options?: CallApiOptions) => Promise) & EasyApiFunc } } }