export const usersApiMethods = { /* ================================================================ * 用户&互动 (User & Interaction) * ================================================================ */ getAuthSettings() { return this.request('/settings/auth') }, saveAuthSettings(data) { return this.request('/settings/auth', { method: 'POST', body: JSON.stringify(data) }) }, testSms(phone) { return this.request('/sms/test', { method: 'POST', body: JSON.stringify({ phone }) }) }, getNotificationSettings() { return this.request('/settings/notifications') }, saveNotificationSettings(data) { return this.request('/settings/notifications', { method: 'POST', body: JSON.stringify(data) }) }, getNotificationOverview(params = {}) { const qs = new URLSearchParams(params).toString() return this.request('/notifications/overview' + (qs ? `?${qs}` : '')) }, markNotificationRead(id) { return this.request('/notifications/mark-read', { method: 'POST', body: JSON.stringify({ id }) }) }, markAllNotificationsRead() { return this.request('/notifications/mark-read', { method: 'POST', body: JSON.stringify({ mark_all: true }) }) }, deleteNotification(id) { return this.request(`/notifications/${id}`, { method: 'DELETE' }) }, runNotificationCleanup() { return this.request('/notifications/cleanup', { method: 'POST', body: JSON.stringify({}) }) }, getCreditSettings() { return this.request('/assets/settings') }, saveCreditSettings(data) { return this.request('/assets/settings', { method: 'POST', body: JSON.stringify(data) }) }, listCreditUsers(params = {}) { const qs = new URLSearchParams(params).toString() return this.request('/assets/accounts' + (qs ? `?${qs}` : '')) }, adjustUserCredits(id, asset, delta, remark) { return this.request(`/assets/accounts/${id}/adjust`, { method: 'POST', body: JSON.stringify({ asset, delta, remark }) }) }, getCreditLog(params = {}) { const qs = new URLSearchParams(params).toString() return this.request('/assets/transactions' + (qs ? `?${qs}` : '')) }, }