UNPKG

@memori.ai/memori-api-client

Version:

React library to integrate a Memori in your app or website

46 lines 2.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const apiFetcher_1 = require("../apiFetcher"); exports.default = (apiUrl) => ({ getChatLogs: async (sessionId, dateFrom, dateTo) => (0, apiFetcher_1.apiFetcher)(`/ChatLogs/${sessionId}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, { method: 'GET', apiUrl, }), getChatLogsPaged: async (sessionId, filters) => (0, apiFetcher_1.apiFetcher)(`/ChatLogsPaged/${sessionId}`, { method: 'POST', apiUrl, body: filters, }), getChatLogsByUser: async (sessionId, dateFrom, dateTo) => (0, apiFetcher_1.apiFetcher)(`/CurrentUserChatLogs/${sessionId}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, { method: 'GET', apiUrl, }), getSessionChatLogs: async (sessionId, chatLogSessionID) => (0, apiFetcher_1.apiFetcher)(`/SessionChatLogs/${sessionId}/${chatLogSessionID}`, { method: 'GET', apiUrl, }), getUserChatLogs: async (sessionId, userID, dateFrom, dateTo) => (0, apiFetcher_1.apiFetcher)(`/UserChatLogs/${sessionId}/${userID}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, { method: 'GET', apiUrl, }), deleteChatLogs: async (sessionId, dateFrom, dateTo) => (0, apiFetcher_1.apiFetcher)(`/ChatLogs/${sessionId}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, { method: 'DELETE', apiUrl, }), deleteChatLog: async (sessionId, chatLogId) => (0, apiFetcher_1.apiFetcher)(`/ChatLog/${sessionId}/${chatLogId}`, { method: 'DELETE', apiUrl, }), getUserChatLogsByToken: async (loginToken, memoriID, dateFrom, dateTo) => (0, apiFetcher_1.apiFetcher)(`/UserChatLogsByToken/${loginToken}/${memoriID}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, { method: 'GET', apiUrl, }), getUserChatLogsByTokenPaged: async (filters) => (0, apiFetcher_1.apiFetcher)(`/UserChatLogsByTokenPaged`, { method: 'POST', apiUrl, body: { ...filters, }, }), }); //# sourceMappingURL=chatLogs.js.map