2026-05-09 16:00:29 +08:00
|
|
|
export const API_ROUTES = {
|
|
|
|
|
auth: {
|
|
|
|
|
sendOtp: '/api/v1/auth/otp/send',
|
|
|
|
|
emailSession: '/api/v1/auth/email-session',
|
|
|
|
|
refreshSession: '/api/v1/auth/sessions/refresh',
|
|
|
|
|
deleteSession: '/api/v1/auth/sessions',
|
|
|
|
|
},
|
|
|
|
|
users: {
|
|
|
|
|
profile: '/api/v1/users/me/profile',
|
2026-05-09 18:23:21 +08:00
|
|
|
updateProfile: '/api/v1/users/me/profile',
|
|
|
|
|
updateSettings: '/api/v1/users/me/settings',
|
|
|
|
|
avatarUploadUrl: '/api/v1/users/me/avatar/upload-url',
|
|
|
|
|
uploadAvatar: '/api/v1/users/me/avatar',
|
2026-05-09 16:00:29 +08:00
|
|
|
},
|
|
|
|
|
points: {
|
|
|
|
|
balance: '/api/v1/points/balance',
|
2026-05-09 18:23:21 +08:00
|
|
|
packages: '/api/v1/points/packages',
|
2026-05-09 16:00:29 +08:00
|
|
|
},
|
|
|
|
|
notifications: {
|
2026-05-09 18:23:21 +08:00
|
|
|
list: '/api/v1/notifications',
|
2026-05-09 16:00:29 +08:00
|
|
|
unreadCount: '/api/v1/notifications/unread-count',
|
2026-05-09 18:23:21 +08:00
|
|
|
markRead: (id: string) => `/api/v1/notifications/${id}/read`,
|
|
|
|
|
markAllRead: '/api/v1/notifications/mark-all-read',
|
2026-05-09 16:00:29 +08:00
|
|
|
},
|
|
|
|
|
agent: {
|
|
|
|
|
history: '/api/v1/agent/history',
|
2026-05-10 13:59:04 +08:00
|
|
|
historyByThread: (threadId: string) => `/api/v1/agent/history?threadId=${threadId}`,
|
|
|
|
|
runs: '/api/v1/agent/runs',
|
|
|
|
|
runEvents: (threadId: string) => `/api/v1/agent/runs/${threadId}/events`,
|
2026-05-09 16:00:29 +08:00
|
|
|
},
|
2026-05-09 18:23:21 +08:00
|
|
|
feedback: {
|
|
|
|
|
submit: '/api/v1/feedback',
|
|
|
|
|
},
|
2026-05-09 16:00:29 +08:00
|
|
|
} as const;
|