@memori.ai/memori-api-client
Advanced tools
Comparing version 4.0.3 to 4.1.0
## [4.1.0](https://github.com/memori-ai/memori-api-client/compare/v4.0.3...v4.1.0) (2024-04-16) | ||
### Features | ||
* add new typings, implement date changed api call ([51ee854](https://github.com/memori-ai/memori-api-client/commit/51ee8546ee9b971cadb53a3d5caed71a9792a9d0)) | ||
## [4.0.3](https://github.com/memori-ai/memori-api-client/compare/v4.0.2...v4.0.3) (2024-03-29) | ||
@@ -4,0 +11,0 @@ |
@@ -539,3 +539,5 @@ declare const _default: (apiUrl: string) => { | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -569,3 +571,5 @@ currentState: import("./types").DialogState; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -572,0 +576,0 @@ currentState: import("./types").DialogState; |
@@ -18,3 +18,5 @@ import { DialogState, Medium, ResponseSpec } from '../types'; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<ResponseSpec & { | ||
currentState: DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<ResponseSpec & { | ||
@@ -21,0 +23,0 @@ currentState: DialogState; |
@@ -22,5 +22,6 @@ "use strict"; | ||
}), | ||
postDateChangedEvent: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/DateChangedEvent/${sessionId}`, { | ||
postDateChangedEvent: async (sessionId, date) => (0, apiFetcher_1.apiFetcher)(`/DateChangedEvent/${sessionId}`, { | ||
method: 'POST', | ||
apiUrl, | ||
body: { date }, | ||
}), | ||
@@ -27,0 +28,0 @@ postTagChangedEvent: async (sessionId, tag) => (0, apiFetcher_1.apiFetcher)(`/TagChangedEvent/${sessionId}`, { |
@@ -549,3 +549,5 @@ declare const api: (hostname?: string) => { | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -579,3 +581,5 @@ currentState: import("./types").DialogState; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -582,0 +586,0 @@ currentState: import("./types").DialogState; |
@@ -47,2 +47,3 @@ export declare type Error = { | ||
needsPosition?: boolean; | ||
needsDateTime?: boolean; | ||
voiceType: string; | ||
@@ -422,4 +423,4 @@ culture?: string; | ||
}; | ||
export declare type SearchQuery = { | ||
text: string; | ||
export type SearchQuery = { | ||
text?: string; | ||
searchType?: 'Literal' | 'Semantic'; | ||
@@ -436,4 +437,11 @@ date?: string; | ||
numberOfResults?: number; | ||
contextVars?: { | ||
[variable: string]: string; | ||
}; | ||
contextVarsToSet?: { | ||
[variable: string]: string; | ||
}; | ||
memoryTags?: string[]; | ||
}; | ||
export declare type SearchMatches = { | ||
export type SearchMatches = { | ||
confidence: number; | ||
@@ -440,0 +448,0 @@ confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH'; |
@@ -539,3 +539,5 @@ declare const _default: (apiUrl: string) => { | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -569,3 +571,5 @@ currentState: import("./types").DialogState; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -572,0 +576,0 @@ currentState: import("./types").DialogState; |
@@ -18,3 +18,5 @@ import { DialogState, Medium, ResponseSpec } from '../types'; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<ResponseSpec & { | ||
currentState: DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<ResponseSpec & { | ||
@@ -21,0 +23,0 @@ currentState: DialogState; |
@@ -20,5 +20,6 @@ import { apiFetcher } from '../apiFetcher'; | ||
}), | ||
postDateChangedEvent: async (sessionId) => apiFetcher(`/DateChangedEvent/${sessionId}`, { | ||
postDateChangedEvent: async (sessionId, date) => apiFetcher(`/DateChangedEvent/${sessionId}`, { | ||
method: 'POST', | ||
apiUrl, | ||
body: { date }, | ||
}), | ||
@@ -25,0 +26,0 @@ postTagChangedEvent: async (sessionId, tag) => apiFetcher(`/TagChangedEvent/${sessionId}`, { |
@@ -549,3 +549,5 @@ declare const api: (hostname?: string) => { | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -579,3 +581,5 @@ currentState: import("./types").DialogState; | ||
}>; | ||
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>; | ||
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & { | ||
currentState: import("./types").DialogState; | ||
}>; | ||
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -582,0 +586,0 @@ currentState: import("./types").DialogState; |
@@ -47,2 +47,3 @@ export declare type Error = { | ||
needsPosition?: boolean; | ||
needsDateTime?: boolean; | ||
voiceType: string; | ||
@@ -422,4 +423,4 @@ culture?: string; | ||
}; | ||
export declare type SearchQuery = { | ||
text: string; | ||
export type SearchQuery = { | ||
text?: string; | ||
searchType?: 'Literal' | 'Semantic'; | ||
@@ -436,4 +437,11 @@ date?: string; | ||
numberOfResults?: number; | ||
contextVars?: { | ||
[variable: string]: string; | ||
}; | ||
contextVarsToSet?: { | ||
[variable: string]: string; | ||
}; | ||
memoryTags?: string[]; | ||
}; | ||
export declare type SearchMatches = { | ||
export type SearchMatches = { | ||
confidence: number; | ||
@@ -440,0 +448,0 @@ confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH'; |
{ | ||
"version": "4.0.3", | ||
"version": "4.1.0", | ||
"name": "@memori.ai/memori-api-client", | ||
@@ -4,0 +4,0 @@ "description": "React library to integrate a Memori in your app or website", |
@@ -76,8 +76,15 @@ import { DialogState, Medium, ResponseSpec } from '../types'; | ||
* @param {string} sessionId The session ID | ||
* @param {string} date Specifications for a Date Changed event. A Date Changed event changes the Current Date: the State Machine will use the new date for subsequent question resolution. | ||
* New date, in the format yyyy/MM/dd HH:mm:ss zzz, e.g. 2020/01/01 09:30:00 +02. | ||
*/ | ||
postDateChangedEvent: async (sessionId: string) => | ||
postDateChangedEvent: async (sessionId: string, date: string) => | ||
apiFetcher(`/DateChangedEvent/${sessionId}`, { | ||
method: 'POST', | ||
apiUrl, | ||
}) as Promise<ResponseSpec>, | ||
body: { date }, | ||
}) as Promise< | ||
ResponseSpec & { | ||
currentState: DialogState; | ||
} | ||
>, | ||
@@ -84,0 +91,0 @@ /** |
@@ -58,2 +58,3 @@ export declare type Error = { | ||
needsPosition?: boolean; | ||
needsDateTime?: boolean; | ||
voiceType: string; | ||
@@ -532,20 +533,111 @@ culture?: string; | ||
export declare type SearchQuery = { | ||
text: string; | ||
export type SearchQuery = { | ||
/** | ||
* @type {string} | ||
* Search query. If omitted, either a Date or a Place must be set. Used only for Search, ignored for Random picking and Memory Hints. | ||
*/ | ||
text?: string; | ||
/** | ||
* @type {?string=Literal} | ||
* How to interpret the search query in the Text property: | ||
* - If "Semantic", the query is interpreted as a full question in natural language, and the search is performed in the same way a question would be posed to the Dialog State Machine. | ||
* - If "Literal", the query is intented as keyword, or part of keyword, and the search is perfomed by looking for it as a substring in the text and titles of Memories. | ||
* - If omitted the search is Semantic by default. Used only for Search, ignored for Random picking and Memory Hints. | ||
*/ | ||
searchType?: 'Literal' | 'Semantic'; | ||
/** | ||
* @type {?string} | ||
* Approximate date of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
date?: string; | ||
/** | ||
* @type {?number} | ||
* Uncertainty of the date, in days. Required if Date is specified. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
dateUncertaintyDays?: number; | ||
/** | ||
* @type {?string} | ||
* Name of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
placeName?: string; | ||
/** | ||
* @type {?number} | ||
* Latitude of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
placeLatitude?: number; | ||
/** | ||
* @type {?number} | ||
* Longitude of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
placeLongitude?: number; | ||
/** | ||
* @type {?number} | ||
* Uncertainty of place, in kilometers. Required if PlaceName or PlaceLatitude and PlaceLongitude are specified. Used for Search and Random picking, ignored for Memory Hints. | ||
*/ | ||
placeUncertaintyKm?: number; | ||
/** | ||
* @type {?string} | ||
* If specified, the search is extended to Memories associated with a Receiver with this tag. If omitted the search is limited to public Memories. As a special case, if the Giver tag is specified then the search is extended to all Memories, whoever they are associated to. | ||
*/ | ||
tag?: string; | ||
/** | ||
* @type {?boolean} | ||
* If set to True, recently picked Memories will not be deprioritized. This means that a Memory never picked and a Memory picked just a moment ago will have the same probability to be picked again. If omitted or set to False, recently picked Memories will be much less probable to be picked again. Used only for Random picking, ignored for Search and Memory Hints. | ||
*/ | ||
ignoreLastRead?: boolean; | ||
/** | ||
* @type {?string[]} | ||
* Optional list of Memory IDs that must be excluded from the search result. | ||
*/ | ||
excludedMemoryIDs?: string[]; | ||
/** | ||
* @type {?number=5} | ||
* Optional number of results. If omitted defaults to 5. | ||
*/ | ||
numberOfResults?: number; | ||
/** | ||
* Optional context to be matched with ContextVarsToMatch of Memories. Used for Search, Random picking and Memory Hints. | ||
*/ | ||
contextVars?: { [variable: string]: string }; | ||
/** | ||
* Optional context to be matched with ContextVarsToSet of Memories. Used only for Search, ignored for Random picking and Memory Hints. | ||
*/ | ||
contextVarsToSet?: { [variable: string]: string }; | ||
/** | ||
* @type {?string[]} | ||
* Optional list of memory tags. If specified, the search is limited to Memories including ALL the specified tags. | ||
*/ | ||
memoryTags?: string[]; | ||
}; | ||
export declare type SearchMatches = { | ||
export type SearchMatches = { | ||
/** | ||
* @type {number} | ||
* Match confidence, between 0.0 (no confidence) and 1.0 (full confidence). | ||
*/ | ||
confidence: number; | ||
/** | ||
* @type {?string} | ||
* Confidence level, e.g. LOW, MEDIUM or HIGH. | ||
*/ | ||
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH'; | ||
/** | ||
* @type {Memory} | ||
*/ | ||
memory: Memory; | ||
@@ -552,0 +644,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
772738
494
15102