diff --git a/src/engine/stats.test.ts b/src/engine/stats.test.ts index d777843..d545041 100644 --- a/src/engine/stats.test.ts +++ b/src/engine/stats.test.ts @@ -5,13 +5,15 @@ const client = memori('https://backend.memori.ai'); describe('engine/stats api', () => { it('works on statistics apis', async () => { expect( - await client.stats.getStatistics('768b9654-e781-4c3c-81fa-ae1529d1bfbe') + await client.stats.getTextQualityIndexes( + '768b9654-e781-4c3c-81fa-ae1529d1bfbe' + ) ).not.toBeNull(); }); it('works on statistics apis with shorthand version', async () => { expect( - await client.getStatistics('768b9654-e781-4c3c-81fa-ae1529d1bfbe') + await client.getTextQualityIndexes('768b9654-e781-4c3c-81fa-ae1529d1bfbe') ).not.toBeNull(); }); }); diff --git a/src/engine/stats.ts b/src/engine/stats.ts index b42a99b..9141684 100644 --- a/src/engine/stats.ts +++ b/src/engine/stats.ts @@ -8,50 +8,6 @@ import { apiFetcher } from '../apiFetcher'; *****************/ export default (apiUrl: string) => ({ - /** - * Computes usage statistics for the Memori of the current session. - * @param {string} sessionId The session ID - */ - getStatistics: async (sessionId: string) => - apiFetcher(`/Statistics/${sessionId}`, { - method: 'GET', - apiUrl, - }) as Promise< - ResponseSpec & { - statistics: Stats; - } - >, - - /** - * Computes content quality indexes for a Memori. - * @param {string} memoriID - The Memori object ID - */ - getContentQualityIndexes: async (memoriID: string) => - apiFetcher(`/ContentQualityIndexes/${memoriID}`, { - method: 'GET', - apiUrl, - }) as Promise< - ResponseSpec & { - /** - * @type {number} - * An index of content quality of this Memori. The more content is added (and especially content with media, or stories with dates and places) the more the index grows. - */ - contentQualityIndex: number; - - /** - * @type {number} - * An index of answer quality of this Memori. It is the ratio of the number of successful answer vs. the total of answers (successful, wrongful or missing). - */ - answerQualityIndex: number; - - /** - * @type {number} - * The current number of unanswered questions. - */ - unansweredQuestions: number; - } - >, - /** * Computes text quality indexes for a Memori. * @param {string} sessionId - The session ID