Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@memori.ai/memori-api-client

Package Overview
Dependencies
Maintainers
0
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memori.ai/memori-api-client - npm Package Compare versions

Comparing version 5.1.1 to 5.2.0

12

CHANGELOG.md
## [5.2.0](https://github.com/memori-ai/memori-api-client/compare/v5.1.1...v5.2.0) (2024-09-25)
### Features
* added pagination search and filter apis ([419397e](https://github.com/memori-ai/memori-api-client/commit/419397e3bf4a096c6a3fcfc9e70d26e15ab9563f))
### Maintenance
* fix typo + format code ([95bcf01](https://github.com/memori-ai/memori-api-client/commit/95bcf011079c0f9cb97dda5595c5086f43f2e27a))
## [5.1.1](https://github.com/memori-ai/memori-api-client/compare/v5.1.0...v5.1.1) (2024-09-10)

@@ -4,0 +16,0 @@

@@ -329,2 +329,14 @@ declare const _default: (apiUrl: string) => {

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {

@@ -343,2 +355,14 @@ memories: import("./types").Memory[];

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {

@@ -345,0 +369,0 @@ memories: import("./types").Memory[];

@@ -6,2 +6,14 @@ import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {

@@ -8,0 +20,0 @@ memories: Memory[];

@@ -10,2 +10,17 @@ "use strict";

}),
searchMemoryPaginated: async (sessionId, pageIndex, pageSize, query) => (0, apiFetcher_1.apiFetcher)(`/Search/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}),
filterMemories: async (sessionId, query) => (0, apiFetcher_1.apiFetcher)(`/FilterMemories/${sessionId}`, {
method: 'POST',
body: query,
apiUrl,
}),
filterMemoriesPaginated: async (sessionId, pageIndex, pageSize, query) => (0, apiFetcher_1.apiFetcher)(`/FilterMemories/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}),
getRandomMemory: async (sessionId, query) => (0, apiFetcher_1.apiFetcher)(`/Random/${sessionId}`, {

@@ -12,0 +27,0 @@ method: 'POST',

1

dist/types.d.ts

@@ -456,2 +456,3 @@ export declare type Error = {

excludedMemoryIDs?: string[];
startFrom?: number;
numberOfResults?: number;

@@ -458,0 +459,0 @@ contextVars?: {

@@ -329,2 +329,14 @@ declare const _default: (apiUrl: string) => {

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {

@@ -343,2 +355,14 @@ memories: import("./types").Memory[];

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
count: number;
matches: import("./types").SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {

@@ -345,0 +369,0 @@ memories: import("./types").Memory[];

@@ -6,2 +6,14 @@ import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';

}>;
searchMemoryPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
filterMemories: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
filterMemoriesPaginated: (sessionId: string, pageIndex: number, pageSize: number, query?: SearchQuery) => Promise<ResponseSpec & {
count: number;
matches: SearchMatches[];
}>;
getRandomMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {

@@ -8,0 +20,0 @@ memories: Memory[];

@@ -8,2 +8,17 @@ import { apiFetcher } from '../apiFetcher';

}),
searchMemoryPaginated: async (sessionId, pageIndex, pageSize, query) => apiFetcher(`/Search/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}),
filterMemories: async (sessionId, query) => apiFetcher(`/FilterMemories/${sessionId}`, {
method: 'POST',
body: query,
apiUrl,
}),
filterMemoriesPaginated: async (sessionId, pageIndex, pageSize, query) => apiFetcher(`/FilterMemories/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}),
getRandomMemory: async (sessionId, query) => apiFetcher(`/Random/${sessionId}`, {

@@ -10,0 +25,0 @@ method: 'POST',

@@ -456,2 +456,3 @@ export declare type Error = {

excludedMemoryIDs?: string[];
startFrom?: number;
numberOfResults?: number;

@@ -458,0 +459,0 @@ contextVars?: {

2

package.json
{
"version": "5.1.1",
"version": "5.2.0",
"name": "@memori.ai/memori-api-client",

@@ -4,0 +4,0 @@ "description": "React library to integrate a Memori in your app or website",

@@ -28,2 +28,67 @@ import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';

/**
* Searches for matching Memory objects using the same algorithm employed in the Text Entered event of the R1 state of the Dialog State Machine.
* @param {string} sessionId The session ID
* @param {number} pageIndex The page index
* @param {number} pageSize The page size
* @param {SearchQuery} query Search query params
*/
searchMemoryPaginated: async (
sessionId: string,
pageIndex: number,
pageSize: number,
query?: SearchQuery
) =>
apiFetcher(`/Search/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}) as Promise<
ResponseSpec & {
count: number;
matches: SearchMatches[];
}
>,
/**
* Filters Memory objects
* @param {string} sessionId The session ID
* @param {SearchQuery} query Search query params
*/
filterMemories: async (sessionId: string, query?: SearchQuery) =>
apiFetcher(`/FilterMemories/${sessionId}`, {
method: 'POST',
body: query,
apiUrl,
}) as Promise<
ResponseSpec & {
count: number;
matches: SearchMatches[];
}
>,
/**
* Filters Memory objects, with pagination
* @param {string} sessionId The session ID
* @param {number} pageIndex The page index
* @param {number} pageSize The page size
* @param {SearchQuery} query Search query params
*/
filterMemoriesPaginated: async (
sessionId: string,
pageIndex: number,
pageSize: number,
query?: SearchQuery
) =>
apiFetcher(`/FilterMemories/${sessionId}/${pageIndex}/${pageSize}`, {
method: 'POST',
body: query,
apiUrl,
}) as Promise<
ResponseSpec & {
count: number;
matches: SearchMatches[];
}
>,
/**
* Picks up to 5 random Memory objects using the same algorithm employed in the

@@ -30,0 +95,0 @@ * Timeout event of the R1 state of the Dialog State Machine.

@@ -598,2 +598,5 @@ export declare type Error = {

export type SearchQuery = {
/**

@@ -669,2 +672,8 @@ * @type {string}

/**
* @type {number=0}
* Index of the first Memory to return. Used for pagination.
*/
startFrom?: number;
/**
* @type {?number=5}

@@ -671,0 +680,0 @@ * Optional number of results. If omitted defaults to 5.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc