@memori.ai/memori-api-client
Version:
React library to integrate a Memori in your app or website
33 lines • 1.28 kB
JavaScript
import { apiFetcher } from '../apiFetcher';
export default (apiUrl) => ({
getTenantNotifications: (tenantID) => apiFetcher(`/TenantNotifications/${tenantID}`, {
apiUrl,
}),
getUserNotifications: (authToken) => apiFetcher(`/UserNotifications/${authToken}`, {
apiUrl,
}),
getChangelogNotifications: (tenant) => apiFetcher(`/ChangelogNotifications/${tenant}`, {
apiUrl,
}),
createNotification: (token, notificationData) => apiFetcher(`/Notifications/${token}`, {
apiUrl,
method: 'POST',
body: notificationData,
}),
getNotification: (token, notificationId) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
apiUrl,
}),
deleteNotification: (token, notificationId) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
apiUrl,
method: 'DELETE',
}),
listAllNotifications: (token, filter = 'ACTIVE_AND_FUTURE') => apiFetcher(`/ListAllNotifications/${token}/${filter}`, {
apiUrl,
}),
updateNotification: (token, notificationId, notificationData) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
apiUrl,
method: 'PATCH',
body: notificationData,
}),
});
//# sourceMappingURL=notifications.js.map