@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/engine/memories.d.ts +8 -0
- package/dist/engine/unansweredQuestions.d.ts +8 -0
- package/dist/memori-api-client.cjs.development.js +101 -41
- package/dist/memori-api-client.cjs.development.js.map +1 -1
- package/dist/memori-api-client.cjs.production.min.js +1 -1
- package/dist/memori-api-client.cjs.production.min.js.map +1 -1
- package/dist/memori-api-client.esm.js +101 -41
- package/dist/memori-api-client.esm.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/engine/memories.ts +19 -0
- package/src/engine/unansweredQuestions.ts +19 -0
- package/src/types.ts +1 -0
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/engine/memories.ts
CHANGED
|
@@ -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
|