This commit is contained in:
2026-06-14 09:25:59 +08:00
parent a0f441d8ae
commit 6fbf610277
39 changed files with 2492 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
import api from './client'
export const climatesApi = {
get: (conversationId: string) => api.get(`/climates/${conversationId}`),
getCalendar: (conversationId: string) => api.get(`/climates/${conversationId}/calendar`),
}
+8
View File
@@ -0,0 +1,8 @@
import api from './client'
export const echoesApi = {
send: (toUserId: string, message?: string) =>
api.post('/echoes/', { to_user_id: toUserId, message }),
getAll: () => api.get('/echoes/'),
}
+11
View File
@@ -0,0 +1,11 @@
import api from './client'
export const flashApi = {
getActive: () => api.get('/flash/active'),
click: (eventId: string) => api.post(`/flash/${eventId}/click`),
claim: (eventId: string) => api.post(`/flash/${eventId}/claim`),
getAlbum: () => api.get('/flash/album'),
}
+2
View File
@@ -7,4 +7,6 @@ export const leavesApi = {
api.put(`/leaves/${leafId}`, data),
getCollection: () => api.get('/leaves/collection'),
getGrove: () => api.get('/leaves/grove'),
}
+10
View File
@@ -0,0 +1,10 @@
import api from './client'
export const syncApi = {
getQuestion: () => api.get('/sync/question'),
submitAnswer: (questionId: string, friendId: string, answer: string) =>
api.post('/sync/answer', { question_id: questionId, friend_id: friendId, answer }),
getSeed: (seedId: string) => api.get(`/sync/${seedId}`),
}
+2
View File
@@ -6,4 +6,6 @@ export const treesApi = {
getTree: (friendId: string) => api.get(`/trees/${friendId}`),
water: (friendId: string) => api.post(`/trees/${friendId}/water`),
heartbeat: (friendId: string) => api.get(`/trees/${friendId}/heartbeat`),
}