@memori.ai/memori-api-client 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.3",
2
+ "version": "0.4.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -22,6 +22,25 @@ export default (apiUrl: string) => ({
22
22
  }
23
23
  >,
24
24
 
25
+ /**
26
+ * Lists paginated Memory objects.
27
+ * @param {string} sessionId The session ID
28
+ */
29
+ getMemoriesPaginated: async (
30
+ sessionId: string,
31
+ from: number,
32
+ howMany: number
33
+ ) =>
34
+ apiFetcher(`/Memories/${sessionId}/${from}/${howMany}`, {
35
+ method: 'GET',
36
+ apiUrl,
37
+ }) as Promise<
38
+ ResponseSpec & {
39
+ count: number;
40
+ memories: Memory[];
41
+ }
42
+ >,
43
+
25
44
  /**
26
45
  * Gets the details of a Memory object.
27
46
  * @param {string} sessionId The session ID
@@ -22,6 +22,25 @@ export default (apiUrl: string) => ({
22
22
  }
23
23
  >,
24
24
 
25
+ /**
26
+ * Lists paginated Unanswered Question objects.
27
+ * @param {string} sessionId The session ID
28
+ */
29
+ getUnansweredQuestionsPaginated: async (
30
+ sessionId: string,
31
+ from: number,
32
+ howMany: string
33
+ ) =>
34
+ apiFetcher(`/UnansweredQuestions/${sessionId}/${from}/${howMany}`, {
35
+ method: 'GET',
36
+ apiUrl,
37
+ }) as Promise<
38
+ ResponseSpec & {
39
+ count: number;
40
+ unansweredQuestions: UnansweredQuestion[];
41
+ }
42
+ >,
43
+
25
44
  /**
26
45
  * Removes an existing Unanswered Question object.
27
46
  * @param {string} sessionId The session ID