@memori.ai/memori-api-client 0.4.1 → 0.4.3
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 +4 -1
- package/dist/engine/unansweredQuestions.d.ts +1 -1
- package/dist/memori-api-client.cjs.development.js +11 -8
- 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 +11 -8
- package/dist/memori-api-client.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/memories.ts +12 -5
- package/src/engine/unansweredQuestions.ts +1 -1
package/package.json
CHANGED
package/src/engine/memories.ts
CHANGED
|
@@ -25,16 +25,23 @@ export default (apiUrl: string) => ({
|
|
|
25
25
|
/**
|
|
26
26
|
* Lists paginated Memory objects.
|
|
27
27
|
* @param {string} sessionId The session ID
|
|
28
|
+
* @param {number} from The starting index
|
|
29
|
+
* @param {number} howMany The number of items to return
|
|
30
|
+
* @param {string=} type Optional type of the Memory objects to list: ALL, CONTENTS, DEFAULTS
|
|
28
31
|
*/
|
|
29
32
|
getMemoriesPaginated: async (
|
|
30
33
|
sessionId: string,
|
|
31
34
|
from: number,
|
|
32
|
-
howMany: number
|
|
35
|
+
howMany: number,
|
|
36
|
+
type?: 'ALL' | 'CONTENTS' | 'DEFAULTS'
|
|
33
37
|
) =>
|
|
34
|
-
apiFetcher(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
apiFetcher(
|
|
39
|
+
`/Memories/${sessionId}/${from}/${howMany}${type ? `/${type}` : ''}`,
|
|
40
|
+
{
|
|
41
|
+
method: 'GET',
|
|
42
|
+
apiUrl,
|
|
43
|
+
}
|
|
44
|
+
) as Promise<
|
|
38
45
|
ResponseSpec & {
|
|
39
46
|
count: number;
|
|
40
47
|
memories: Memory[];
|