UNPKG

@memori.ai/memori-api-client

Version:

React library to integrate a Memori in your app or website

32 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const apiFetcher_1 = require("../apiFetcher"); exports.default = (apiUrl) => ({ getTenantNotifications: (tenantID) => (0, apiFetcher_1.apiFetcher)(`/TenantNotifications/${tenantID}`, { apiUrl, }), getUserNotifications: (authToken) => (0, apiFetcher_1.apiFetcher)(`/UserNotifications/${authToken}`, { apiUrl, }), createNotification: (token, notificationData) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}`, { apiUrl, method: 'POST', body: notificationData, }), getNotification: (token, notificationId) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, { apiUrl, }), deleteNotification: (token, notificationId) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, { apiUrl, method: 'DELETE', }), listAllNotifications: (token, filter = 'ACTIVE_AND_FUTURE') => (0, apiFetcher_1.apiFetcher)(`/ListAllNotifications/${token}/${filter}`, { apiUrl, }), updateNotification: (token, notificationId, notificationData) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, { apiUrl, method: 'PATCH', body: notificationData, }), }); //# sourceMappingURL=notifications.js.map