@memori.ai/memori-api-client 0.3.2 → 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/dist/types.d.ts CHANGED
@@ -205,6 +205,7 @@ export declare type OpenSession = {
205
205
  initialContextVars?: {
206
206
  [key: string]: string;
207
207
  };
208
+ initialQuestion?: string;
208
209
  };
209
210
  export declare type MemoriSession = {
210
211
  sessionID: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.2",
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
package/src/types.ts CHANGED
@@ -227,6 +227,7 @@ export declare type OpenSession = {
227
227
  tag?: string;
228
228
  pin?: string;
229
229
  initialContextVars?: { [key: string]: string };
230
+ initialQuestion?: string;
230
231
  };
231
232
 
232
233
  export declare type MemoriSession = {