@memori.ai/memori-api-client
Version:
React library to integrate a Memori in your app or website
64 lines (63 loc) • 2.51 kB
TypeScript
import { DialogState, Medium, PlaceSpecs, ResponseSpec, TextEnteredAsyncResponse } from '../types';
declare const _default: (apiUrl: string) => {
postTextEnteredEvent: ({ sessionId, text, dateUTC, place, }: {
sessionId: string;
text: string;
dateUTC?: string | null | undefined;
place?: PlaceSpecs | null | undefined;
}) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postEnterTextAsync: ({ sessionId, text, dateUTC, place, }: {
sessionId: string;
text: string;
dateUTC?: string | null | undefined;
place?: PlaceSpecs | null | undefined;
}) => Promise<TextEnteredAsyncResponse>;
postTextEnteredEventExtended: ({ sessionId, text, questionsAndAnswersHistory, }: {
sessionId: string;
text: string;
questionsAndAnswersHistory: {
question: string;
answer: string;
}[];
}) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postExtendedEnterTextAsync: ({ sessionId, text, questionsAndAnswersHistory, }: {
sessionId: string;
text: string;
questionsAndAnswersHistory: {
question: string;
answer: string;
}[];
}) => Promise<TextEnteredAsyncResponse>;
postPlaceChangedEvent: ({ sessionId, placeName, latitude, longitude, uncertaintyKm, }: {
sessionId: string;
placeName: string;
latitude: number;
longitude: number;
uncertaintyKm?: number | undefined;
}) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postDateChangedEvent: (sessionId: string, date: string) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postTagChangedEvent: (sessionId: string, tag: string) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postTimeoutEvent: (sessionId: string) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postMediumSelectedEvent: (sessionId: string, medium: Medium) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postMediumDeselectedEvent: (sessionID: string, mediumID: string) => Promise<ResponseSpec & {
currentState: DialogState;
}>;
postDateSelectedEvent: (sessionId: string) => Promise<ResponseSpec>;
postPlaceSelectedEvent: (sessionId: string) => Promise<ResponseSpec>;
postTagSelectedEvent: (sessionId: string) => Promise<ResponseSpec>;
};
export default _default;