webapp/src/stores/inbox.ts

11 lines
359 B
TypeScript
Raw Normal View History

2022-11-23 04:12:11 +00:00
import { apiClient } from '../utils/apiClient'
2022-11-30 15:25:02 +00:00
import type { MessagesBy } from '../graphql/types.gen'
2022-10-05 08:55:26 +00:00
2022-11-24 09:06:48 +00:00
export const loadRecipients = async (by = {}): Promise<void> => {
return await apiClient.getRecipients(by)
2022-11-23 04:12:11 +00:00
}
2022-11-30 15:25:02 +00:00
export const loadMessages = async (by: MessagesBy): Promise<void> => {
return await apiClient.getChatMessages({ by, limit: 50, offset: 0 })
2022-11-23 04:12:11 +00:00
}