@memori.ai/memori-api-client 0.1.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/LICENSE +18 -0
- package/README.md +188 -0
- package/dist/apiFetcher.d.ts +13 -0
- package/dist/backend/asset.d.ts +44 -0
- package/dist/backend/integration.d.ts +55 -0
- package/dist/backend/invitation.d.ts +82 -0
- package/dist/backend/memori.d.ts +125 -0
- package/dist/backend/user.d.ts +109 -0
- package/dist/backend.d.ts +273 -0
- package/dist/constants.d.ts +2 -0
- package/dist/engine/correlationPairs.d.ts +20 -0
- package/dist/engine/dialog.d.ts +88 -0
- package/dist/engine/importExport.d.ts +34 -0
- package/dist/engine/intents.d.ts +65 -0
- package/dist/engine/localizationKeys.d.ts +50 -0
- package/dist/engine/media.d.ts +48 -0
- package/dist/engine/memori.d.ts +30 -0
- package/dist/engine/memories.d.ts +50 -0
- package/dist/engine/nlp.d.ts +25 -0
- package/dist/engine/people.d.ts +46 -0
- package/dist/engine/promptedQuestions.d.ts +37 -0
- package/dist/engine/search.d.ts +30 -0
- package/dist/engine/session.d.ts +28 -0
- package/dist/engine/stats.d.ts +25 -0
- package/dist/engine/unansweredQuestions.d.ts +22 -0
- package/dist/engine/webhooks.d.ts +21 -0
- package/dist/engine.d.ts +297 -0
- package/dist/helpers/asset.d.ts +20 -0
- package/dist/helpers/getApiUrl.d.ts +1 -0
- package/dist/index.d.ts +582 -0
- package/dist/index.js +8 -0
- package/dist/memori-api-client.cjs.development.js +3666 -0
- package/dist/memori-api-client.cjs.development.js.map +1 -0
- package/dist/memori-api-client.cjs.production.min.js +2 -0
- package/dist/memori-api-client.cjs.production.min.js.map +1 -0
- package/dist/memori-api-client.esm.js +3660 -0
- package/dist/memori-api-client.esm.js.map +1 -0
- package/dist/speech.d.ts +10 -0
- package/dist/types.d.ts +410 -0
- package/package.json +125 -0
- package/src/apiFetcher.ts +29 -0
- package/src/backend/asset.ts +86 -0
- package/src/backend/integration.ts +98 -0
- package/src/backend/invitation.ts +115 -0
- package/src/backend/memori.ts +223 -0
- package/src/backend/user.ts +186 -0
- package/src/backend.ts +20 -0
- package/src/constants.ts +21 -0
- package/src/engine/correlationPairs.ts +31 -0
- package/src/engine/dialog.ts +158 -0
- package/src/engine/importExport.ts +43 -0
- package/src/engine/intents.ts +116 -0
- package/src/engine/localizationKeys.ts +94 -0
- package/src/engine/media.ts +79 -0
- package/src/engine/memori.ts +51 -0
- package/src/engine/memories.ts +89 -0
- package/src/engine/nlp.ts +39 -0
- package/src/engine/people.ts +82 -0
- package/src/engine/promptedQuestions.ts +63 -0
- package/src/engine/search.ts +49 -0
- package/src/engine/session.ts +49 -0
- package/src/engine/stats.ts +44 -0
- package/src/engine/unansweredQuestions.ts +38 -0
- package/src/engine/webhooks.ts +32 -0
- package/src/engine.ts +51 -0
- package/src/helpers/asset.ts +52 -0
- package/src/helpers/getApiUrl.ts +6 -0
- package/src/index.ts +20 -0
- package/src/speech.ts +242 -0
- package/src/types.ts +440 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Memory, ResponseSpec } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Lists all Memory objects.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
*/
|
|
7
|
+
getMemories: (sessionId: string) => Promise<ResponseSpec & {
|
|
8
|
+
memories: Memory[];
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the details of a Memory object.
|
|
12
|
+
* @param {string} sessionId The session ID
|
|
13
|
+
* @param {string} memoryId The Memory object ID
|
|
14
|
+
*/
|
|
15
|
+
getMemory: (sessionId: string, memoryId: string) => Promise<ResponseSpec & {
|
|
16
|
+
memory: Memory;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Updates an existing Memory object.
|
|
20
|
+
* @param {string} sessionId The session ID
|
|
21
|
+
* @param {Memory} memory The Memory object
|
|
22
|
+
*/
|
|
23
|
+
patchMemory: (sessionId: string, memory: Memory) => Promise<ResponseSpec>;
|
|
24
|
+
/**
|
|
25
|
+
* Removes an existing Memory object.
|
|
26
|
+
* @param {string} sessionId The session ID
|
|
27
|
+
* @param {string} memoryId The Memory object ID
|
|
28
|
+
*/
|
|
29
|
+
deleteMemory: (sessionId: string, memoryId: string) => Promise<ResponseSpec>;
|
|
30
|
+
/**
|
|
31
|
+
* Adds a new Memory object.
|
|
32
|
+
* @param {string} sessionId The session ID
|
|
33
|
+
* @param {Memory} memory The Memory object
|
|
34
|
+
*/
|
|
35
|
+
postMemory: (sessionId: string, memory: Memory) => Promise<ResponseSpec & {
|
|
36
|
+
memoryID: string;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if a Memory object is accessible from the specified session.
|
|
40
|
+
* @param {string} sessionId The session ID
|
|
41
|
+
* @param {string} memoryId The Memory object ID
|
|
42
|
+
*/
|
|
43
|
+
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<ResponseSpec>;
|
|
44
|
+
};
|
|
45
|
+
/********************
|
|
46
|
+
* *
|
|
47
|
+
* Memories *
|
|
48
|
+
* *
|
|
49
|
+
********************/
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResponseSpec } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Looks up the vector definition for a word.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
* @param {string} word Word to be looked up
|
|
7
|
+
*/
|
|
8
|
+
getWordVector: (sessionId: string, word: string) => Promise<ResponseSpec>;
|
|
9
|
+
/**
|
|
10
|
+
* Tries to guess the language of a sentence by analyzing key word occurrences.
|
|
11
|
+
* @param {string} sessionId The session ID
|
|
12
|
+
* @param {string} text Text to be used for guessing the language.
|
|
13
|
+
*/
|
|
14
|
+
guessLanguage: (sessionId: string, text: string) => Promise<ResponseSpec & {
|
|
15
|
+
languageGuesses: {
|
|
16
|
+
[lang: string]: number;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/***************
|
|
21
|
+
* *
|
|
22
|
+
* NLP *
|
|
23
|
+
* *
|
|
24
|
+
***************/
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ResponseSpec, Person } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Lists all Person objects.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
*/
|
|
7
|
+
getPeople: (sessionId: string) => Promise<ResponseSpec & {
|
|
8
|
+
people: Person[];
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the details of a Person object.
|
|
12
|
+
* @param {string} sessionId The session ID
|
|
13
|
+
* @param {string} personId The Person object ID
|
|
14
|
+
*/
|
|
15
|
+
getPerson: (sessionId: string, personId: string) => Promise<ResponseSpec & {
|
|
16
|
+
person: Person;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Updates an existing Person object.
|
|
20
|
+
* @param {string} sessionId The session ID
|
|
21
|
+
* @param {Person} person The Person object
|
|
22
|
+
*/
|
|
23
|
+
patchPerson: (sessionId: string, person: Person) => Promise<ResponseSpec & {
|
|
24
|
+
person: Person;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Removes an existing Person object.
|
|
28
|
+
* @param {string} sessionId The session ID
|
|
29
|
+
* @param {string} personId The Person object ID
|
|
30
|
+
*/
|
|
31
|
+
deletePerson: (sessionId: string, personId: string) => Promise<ResponseSpec>;
|
|
32
|
+
/**
|
|
33
|
+
* Adds a new Person object.
|
|
34
|
+
* @param {string} sessionId - The session ID
|
|
35
|
+
* @param {Person} person - The Person object
|
|
36
|
+
*/
|
|
37
|
+
postPerson: (sessionId: string, person: Person) => Promise<ResponseSpec & {
|
|
38
|
+
person: Person;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
/******************
|
|
42
|
+
* *
|
|
43
|
+
* People *
|
|
44
|
+
* *
|
|
45
|
+
******************/
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ResponseSpec } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Lists all Prompted Question objects.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
*/
|
|
7
|
+
getPromptedQuestions: (sessionId: string) => Promise<ResponseSpec>;
|
|
8
|
+
/**
|
|
9
|
+
* Gets the details of a Prompted Question object.
|
|
10
|
+
* @param {string} sessionId The session ID
|
|
11
|
+
* @param {string} promptId The Prompted Question object ID
|
|
12
|
+
*/
|
|
13
|
+
getPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
14
|
+
/**
|
|
15
|
+
* Updates an existing Prompted Question object.
|
|
16
|
+
* @param {string} sessionId The session ID
|
|
17
|
+
* @param {string} promptId The Prompted Question object ID
|
|
18
|
+
*/
|
|
19
|
+
patchPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
20
|
+
/**
|
|
21
|
+
* Removes an existing Prompted Question object.
|
|
22
|
+
* @param {string} sessionId The session ID
|
|
23
|
+
* @param {string} promptId The Prompted Question object ID
|
|
24
|
+
*/
|
|
25
|
+
deletePromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
26
|
+
/**
|
|
27
|
+
* Adds a new Prompted Question object.
|
|
28
|
+
* @param {string} sessionId The session ID
|
|
29
|
+
*/
|
|
30
|
+
postPromptedQuestion: (sessionId: string) => Promise<ResponseSpec>;
|
|
31
|
+
};
|
|
32
|
+
/*****************************
|
|
33
|
+
* *
|
|
34
|
+
* PromptedQuestions *
|
|
35
|
+
* *
|
|
36
|
+
*****************************/
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ResponseSpec, SearchQuery, SearchMatches } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Searches for matching Memory objects using the same algorithm employed in the Text Entered event of the R1 state of the Dialog State Machine.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
* @param {SearchQuery} query Search query params
|
|
7
|
+
*/
|
|
8
|
+
searchMemory: (sessionId: string, query?: SearchQuery | undefined) => Promise<ResponseSpec & {
|
|
9
|
+
matches: SearchMatches[];
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Picks up to 5 random Memory objects using the same algorithm employed in the
|
|
13
|
+
* Timeout event of the R1 state of the Dialog State Machine.
|
|
14
|
+
* @param {string} sessionId The session ID
|
|
15
|
+
*/
|
|
16
|
+
postRandom: (sessionId: string) => Promise<ResponseSpec>;
|
|
17
|
+
/**
|
|
18
|
+
* Picks up to 20 Memory Hint objects, obtained by searching for Story objects with a date or place set,
|
|
19
|
+
* and clustering dates and places within an uncertainty of at least 1 year or at least 100 km.
|
|
20
|
+
* Each Memory Hint may either suggest a date or a place, but not both.
|
|
21
|
+
* @param {string} sessionId The session ID
|
|
22
|
+
*/
|
|
23
|
+
postHints: (sessionId: string) => Promise<ResponseSpec>;
|
|
24
|
+
};
|
|
25
|
+
/******************
|
|
26
|
+
* *
|
|
27
|
+
* Search *
|
|
28
|
+
* *
|
|
29
|
+
******************/
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ResponseSpec, OpenSession, DialogState } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Initializes a new Dialog State Machine session for an existing Memori.
|
|
5
|
+
*/
|
|
6
|
+
initSession: (params: OpenSession) => Promise<ResponseSpec & {
|
|
7
|
+
sessionID: string;
|
|
8
|
+
currentState: DialogState;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the current state of a session's Dialog State Machine.
|
|
12
|
+
* @param {string} sessionId The session ID
|
|
13
|
+
*/
|
|
14
|
+
getSession: (sessionId: string) => Promise<ResponseSpec & {
|
|
15
|
+
currentState: DialogState;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Closes the session and disposes of its Dialog State Machine.
|
|
19
|
+
* @param {string} sessionId The session ID
|
|
20
|
+
*/
|
|
21
|
+
deleteSession: (sessionId: string) => Promise<ResponseSpec>;
|
|
22
|
+
};
|
|
23
|
+
/*******************
|
|
24
|
+
* *
|
|
25
|
+
* Session *
|
|
26
|
+
* *
|
|
27
|
+
*******************/
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResponseSpec, Stats, EventLog } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Computes usage statistics for the Memori of the current session.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
*/
|
|
7
|
+
getStatistics: (sessionId: string) => Promise<ResponseSpec & {
|
|
8
|
+
statistics: Stats;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the Event Log objects for the Memori of the current session in a specific date interval
|
|
12
|
+
* @param {string} sessionId The session ID
|
|
13
|
+
* @param {string} strDateFrom The optional begin of the date interval, in UTC time, in the format yyyyMMddHHmmssfff
|
|
14
|
+
* @param {string} strDateTo The optional end of the date interval, in UTC time, in the format yyyyMMddHHmmssfff
|
|
15
|
+
*/
|
|
16
|
+
getEventLogs: (sessionId: string, strDateFrom: string, strDateTo: string) => Promise<ResponseSpec & {
|
|
17
|
+
eventLogs: EventLog[];
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/*****************
|
|
21
|
+
* *
|
|
22
|
+
* Stats *
|
|
23
|
+
* *
|
|
24
|
+
*****************/
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ResponseSpec, UnansweredQuestion } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Lists all Unanswered Question objects.
|
|
5
|
+
* @param {string} sessionId The session ID
|
|
6
|
+
*/
|
|
7
|
+
getUnansweredQuestions: (sessionId: string) => Promise<ResponseSpec & {
|
|
8
|
+
unansweredQuestions: UnansweredQuestion[];
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Removes an existing Unanswered Question object.
|
|
12
|
+
* @param {string} sessionId The session ID
|
|
13
|
+
* @param {string} unansweredQuestionId The Unanswered Question object ID
|
|
14
|
+
*/
|
|
15
|
+
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<ResponseSpec>;
|
|
16
|
+
};
|
|
17
|
+
/*******************************
|
|
18
|
+
* *
|
|
19
|
+
* UnansweredQuestions *
|
|
20
|
+
* *
|
|
21
|
+
*******************************/
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ResponseSpec } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
/**
|
|
4
|
+
* Returns test slot values. Currently available test slots are:<ul><li><code>number</code>: integer numbers between 1 and 10</li><li><code>letter</code>: uppercase letters between A and Z</li><li><code>greek_letter</code>: capitalized Greek letters between Alpha and Omega</li></ul>
|
|
5
|
+
*/
|
|
6
|
+
postTestSlot: () => Promise<ResponseSpec>;
|
|
7
|
+
/**
|
|
8
|
+
* Returns test intent results. Currently available test intents are:<ul><li><code>ECHO</code>: emits the intent utterance as-is.</li><li><code>COMBINE_LETTER_AND_NUMBER</code>: requires a letter slot and a number slot,
|
|
9
|
+
emits the content of the two slots in justaxposition, e.g. "A10".</li><li><code>DATE_RANGE</code>: requires a date slot, emits the date range indicated
|
|
10
|
+
by the date slot in the format "yyyy/MM/dd - yyyy/MM/dd".</li><li><code>AUTOINCREMENT</code>: returns a progressive number that increments by 1
|
|
11
|
+
each time the intent is called.</li><li><code>FIBONACCI</code>: returns the next element of the Fibonacci series, using
|
|
12
|
+
context variables to store the series progression.</li></ul>
|
|
13
|
+
*/
|
|
14
|
+
postTestIntent: () => Promise<ResponseSpec>;
|
|
15
|
+
};
|
|
16
|
+
/********************
|
|
17
|
+
* *
|
|
18
|
+
* WebHooks *
|
|
19
|
+
* *
|
|
20
|
+
********************/
|
|
21
|
+
export default _default;
|
package/dist/engine.d.ts
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
declare const _default: (apiUrl: string) => {
|
|
2
|
+
postTestSlot: () => Promise<import("./types").ResponseSpec>;
|
|
3
|
+
postTestIntent: () => Promise<import("./types").ResponseSpec>;
|
|
4
|
+
webhooks: {
|
|
5
|
+
postTestSlot: () => Promise<import("./types").ResponseSpec>;
|
|
6
|
+
postTestIntent: () => Promise<import("./types").ResponseSpec>;
|
|
7
|
+
};
|
|
8
|
+
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
9
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
10
|
+
}>;
|
|
11
|
+
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
12
|
+
unansweredQuestions: {
|
|
13
|
+
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
14
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
15
|
+
}>;
|
|
16
|
+
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
17
|
+
};
|
|
18
|
+
getStatistics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
19
|
+
statistics: import("./types").Stats;
|
|
20
|
+
}>;
|
|
21
|
+
getEventLogs: (sessionId: string, strDateFrom: string, strDateTo: string) => Promise<import("./types").ResponseSpec & {
|
|
22
|
+
eventLogs: import("./types").EventLog[];
|
|
23
|
+
}>;
|
|
24
|
+
stats: {
|
|
25
|
+
getStatistics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
26
|
+
statistics: import("./types").Stats;
|
|
27
|
+
}>;
|
|
28
|
+
getEventLogs: (sessionId: string, strDateFrom: string, strDateTo: string) => Promise<import("./types").ResponseSpec & {
|
|
29
|
+
eventLogs: import("./types").EventLog[];
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
33
|
+
sessionID: string;
|
|
34
|
+
currentState: import("./types").DialogState;
|
|
35
|
+
}>;
|
|
36
|
+
getSession: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
37
|
+
currentState: import("./types").DialogState;
|
|
38
|
+
}>;
|
|
39
|
+
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
40
|
+
session: {
|
|
41
|
+
initSession: (params: import("./types").OpenSession) => Promise<import("./types").ResponseSpec & {
|
|
42
|
+
sessionID: string;
|
|
43
|
+
currentState: import("./types").DialogState;
|
|
44
|
+
}>;
|
|
45
|
+
getSession: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
46
|
+
currentState: import("./types").DialogState;
|
|
47
|
+
}>;
|
|
48
|
+
deleteSession: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
49
|
+
};
|
|
50
|
+
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
51
|
+
matches: import("./types").SearchMatches[];
|
|
52
|
+
}>;
|
|
53
|
+
postRandom: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
54
|
+
postHints: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
55
|
+
search: {
|
|
56
|
+
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
57
|
+
matches: import("./types").SearchMatches[];
|
|
58
|
+
}>;
|
|
59
|
+
postRandom: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
60
|
+
postHints: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
61
|
+
};
|
|
62
|
+
getPromptedQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
63
|
+
getPromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
64
|
+
patchPromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
65
|
+
deletePromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
66
|
+
postPromptedQuestion: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
67
|
+
promptedQuestions: {
|
|
68
|
+
getPromptedQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
69
|
+
getPromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
70
|
+
patchPromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
71
|
+
deletePromptedQuestion: (sessionId: string, promptId: string) => Promise<import("./types").ResponseSpec>;
|
|
72
|
+
postPromptedQuestion: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
73
|
+
};
|
|
74
|
+
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
75
|
+
people: import("./types").Person[];
|
|
76
|
+
}>;
|
|
77
|
+
getPerson: (sessionId: string, personId: string) => Promise<import("./types").ResponseSpec & {
|
|
78
|
+
person: import("./types").Person;
|
|
79
|
+
}>;
|
|
80
|
+
patchPerson: (sessionId: string, person: import("./types").Person) => Promise<import("./types").ResponseSpec & {
|
|
81
|
+
person: import("./types").Person;
|
|
82
|
+
}>;
|
|
83
|
+
deletePerson: (sessionId: string, personId: string) => Promise<import("./types").ResponseSpec>;
|
|
84
|
+
postPerson: (sessionId: string, person: import("./types").Person) => Promise<import("./types").ResponseSpec & {
|
|
85
|
+
person: import("./types").Person;
|
|
86
|
+
}>;
|
|
87
|
+
people: {
|
|
88
|
+
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
89
|
+
people: import("./types").Person[];
|
|
90
|
+
}>;
|
|
91
|
+
getPerson: (sessionId: string, personId: string) => Promise<import("./types").ResponseSpec & {
|
|
92
|
+
person: import("./types").Person;
|
|
93
|
+
}>;
|
|
94
|
+
patchPerson: (sessionId: string, person: import("./types").Person) => Promise<import("./types").ResponseSpec & {
|
|
95
|
+
person: import("./types").Person;
|
|
96
|
+
}>;
|
|
97
|
+
deletePerson: (sessionId: string, personId: string) => Promise<import("./types").ResponseSpec>;
|
|
98
|
+
postPerson: (sessionId: string, person: import("./types").Person) => Promise<import("./types").ResponseSpec & {
|
|
99
|
+
person: import("./types").Person;
|
|
100
|
+
}>;
|
|
101
|
+
};
|
|
102
|
+
getWordVector: (sessionId: string, word: string) => Promise<import("./types").ResponseSpec>;
|
|
103
|
+
guessLanguage: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
|
|
104
|
+
languageGuesses: {
|
|
105
|
+
[lang: string]: number;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
nlp: {
|
|
109
|
+
getWordVector: (sessionId: string, word: string) => Promise<import("./types").ResponseSpec>;
|
|
110
|
+
guessLanguage: (sessionId: string, text: string) => Promise<import("./types").ResponseSpec & {
|
|
111
|
+
languageGuesses: {
|
|
112
|
+
[lang: string]: number;
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
117
|
+
memories: import("./types").Memory[];
|
|
118
|
+
}>;
|
|
119
|
+
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
120
|
+
memory: import("./types").Memory;
|
|
121
|
+
}>;
|
|
122
|
+
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
123
|
+
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
124
|
+
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
125
|
+
memoryID: string;
|
|
126
|
+
}>;
|
|
127
|
+
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
128
|
+
memories: {
|
|
129
|
+
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
130
|
+
memories: import("./types").Memory[];
|
|
131
|
+
}>;
|
|
132
|
+
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
133
|
+
memory: import("./types").Memory;
|
|
134
|
+
}>;
|
|
135
|
+
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
136
|
+
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
137
|
+
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
138
|
+
memoryID: string;
|
|
139
|
+
}>;
|
|
140
|
+
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
141
|
+
};
|
|
142
|
+
postMemori: (memori: Partial<Pick<import("./types").Memori, "name" | "password" | "recoveryTokens" | "newPassword" | "ownerUserID" | "ownerTenantName" | "memoriConfigurationID" | "description" | "engineMemoriID" | "isGiver" | "isReceiver" | "giverTag" | "giverPIN" | "privacyType" | "secretToken" | "minimumNumberOfRecoveryTokens" | "totalNumberOfRecoveryTokens" | "avatarURL" | "coverURL" | "needsPosition" | "voiceType" | "culture" | "publishedInTheMetaverse" | "metaverseEnvironment" | "properties" | "creationTimestamp" | "lastChangeTimestamp" | "integrations" | "sentInvitations" | "receivedInvitations" | "categories" | "ownerUserName">>) => Promise<import("./types").ResponseSpec>;
|
|
143
|
+
patchMemori: (memori: Partial<import("./types").Memori> & {
|
|
144
|
+
memoriID: string;
|
|
145
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
146
|
+
deleteMemori: (memoriId: string) => Promise<import("./types").ResponseSpec>;
|
|
147
|
+
postSearchMemori: () => Promise<import("./types").ResponseSpec>;
|
|
148
|
+
memori: {
|
|
149
|
+
postMemori: (memori: Partial<Pick<import("./types").Memori, "name" | "password" | "recoveryTokens" | "newPassword" | "ownerUserID" | "ownerTenantName" | "memoriConfigurationID" | "description" | "engineMemoriID" | "isGiver" | "isReceiver" | "giverTag" | "giverPIN" | "privacyType" | "secretToken" | "minimumNumberOfRecoveryTokens" | "totalNumberOfRecoveryTokens" | "avatarURL" | "coverURL" | "needsPosition" | "voiceType" | "culture" | "publishedInTheMetaverse" | "metaverseEnvironment" | "properties" | "creationTimestamp" | "lastChangeTimestamp" | "integrations" | "sentInvitations" | "receivedInvitations" | "categories" | "ownerUserName">>) => Promise<import("./types").ResponseSpec>;
|
|
150
|
+
patchMemori: (memori: Partial<import("./types").Memori> & {
|
|
151
|
+
memoriID: string;
|
|
152
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
153
|
+
deleteMemori: (memoriId: string) => Promise<import("./types").ResponseSpec>;
|
|
154
|
+
postSearchMemori: () => Promise<import("./types").ResponseSpec>;
|
|
155
|
+
};
|
|
156
|
+
getMedia: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
157
|
+
deleteMedia: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
158
|
+
getMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
159
|
+
patchMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
160
|
+
deleteMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
161
|
+
postMedium: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
162
|
+
media: {
|
|
163
|
+
getMedia: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
164
|
+
deleteMedia: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
165
|
+
getMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
166
|
+
patchMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
167
|
+
deleteMedium: (sessionId: string, memoryId: string, mediumId: string) => Promise<import("./types").ResponseSpec>;
|
|
168
|
+
postMedium: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
169
|
+
};
|
|
170
|
+
getLocalizationKeys: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
171
|
+
localizationKeys: import("./types").LocalizationKey[];
|
|
172
|
+
}>;
|
|
173
|
+
getLocalizationKey: (sessionId: string, key: string) => Promise<import("./types").ResponseSpec & {
|
|
174
|
+
localizationKey: import("./types").LocalizationKey;
|
|
175
|
+
}>;
|
|
176
|
+
deleteLocalizationKey: (sessionId: string, key: string) => Promise<import("./types").ResponseSpec>;
|
|
177
|
+
postLocalizationKey: (sessionId: string, localizationKey: import("./types").LocalizationKeyContent) => Promise<import("./types").ResponseSpec & {
|
|
178
|
+
localizationKey: import("./types").LocalizationKey;
|
|
179
|
+
}>;
|
|
180
|
+
patchLocalizationKey: (sessionId: string, localizationKey: import("./types").LocalizationKey) => Promise<import("./types").ResponseSpec>;
|
|
181
|
+
localizationKeys: {
|
|
182
|
+
getLocalizationKeys: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
183
|
+
localizationKeys: import("./types").LocalizationKey[];
|
|
184
|
+
}>;
|
|
185
|
+
getLocalizationKey: (sessionId: string, key: string) => Promise<import("./types").ResponseSpec & {
|
|
186
|
+
localizationKey: import("./types").LocalizationKey;
|
|
187
|
+
}>;
|
|
188
|
+
deleteLocalizationKey: (sessionId: string, key: string) => Promise<import("./types").ResponseSpec>;
|
|
189
|
+
postLocalizationKey: (sessionId: string, localizationKey: import("./types").LocalizationKeyContent) => Promise<import("./types").ResponseSpec & {
|
|
190
|
+
localizationKey: import("./types").LocalizationKey;
|
|
191
|
+
}>;
|
|
192
|
+
patchLocalizationKey: (sessionId: string, localizationKey: import("./types").LocalizationKey) => Promise<import("./types").ResponseSpec>;
|
|
193
|
+
};
|
|
194
|
+
getIntents: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
195
|
+
getIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
196
|
+
patchIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
197
|
+
deleteIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
198
|
+
postIntent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
199
|
+
getIntentSlots: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
200
|
+
getIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
201
|
+
patchIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
202
|
+
deleteIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
203
|
+
postIntentSlot: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
204
|
+
intents: {
|
|
205
|
+
getIntents: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
206
|
+
getIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
207
|
+
patchIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
208
|
+
deleteIntent: (sessionId: string, intentId: string) => Promise<import("./types").ResponseSpec>;
|
|
209
|
+
postIntent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
210
|
+
getIntentSlots: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
211
|
+
getIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
212
|
+
patchIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
213
|
+
deleteIntentSlot: (sessionId: string, slotId: string) => Promise<import("./types").ResponseSpec>;
|
|
214
|
+
postIntentSlot: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
215
|
+
};
|
|
216
|
+
postImportExport: (sessionId: string, csvData: import("./engine/importExport").ImportExportBody) => Promise<import("./types").ResponseSpec & import("./engine/importExport").ImportExportReponse>;
|
|
217
|
+
importExport: {
|
|
218
|
+
postImportExport: (sessionId: string, csvData: import("./engine/importExport").ImportExportBody) => Promise<import("./types").ResponseSpec & import("./engine/importExport").ImportExportReponse>;
|
|
219
|
+
};
|
|
220
|
+
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
221
|
+
sessionId: string;
|
|
222
|
+
text: string;
|
|
223
|
+
}) => Promise<import("./types").ResponseSpec & {
|
|
224
|
+
currentState: import("./types").DialogState;
|
|
225
|
+
}>;
|
|
226
|
+
postPlaceChangedEvent: ({ sessionId, placeName, latitude, longitude, uncertaintyKm, }: {
|
|
227
|
+
sessionId: string;
|
|
228
|
+
placeName: string;
|
|
229
|
+
latitude: number;
|
|
230
|
+
longitude: number;
|
|
231
|
+
uncertaintyKm?: number | undefined;
|
|
232
|
+
}) => Promise<import("./types").ResponseSpec & {
|
|
233
|
+
currentState: import("./types").DialogState;
|
|
234
|
+
}>;
|
|
235
|
+
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
236
|
+
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
237
|
+
currentState: import("./types").DialogState;
|
|
238
|
+
}>;
|
|
239
|
+
postTimeoutEvent: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
240
|
+
currentState: import("./types").DialogState;
|
|
241
|
+
}>;
|
|
242
|
+
postMediumSelectedEvent: (sessionId: string, medium: import("./types").Medium) => Promise<import("./types").ResponseSpec & {
|
|
243
|
+
currentState: import("./types").DialogState;
|
|
244
|
+
}>;
|
|
245
|
+
postDateSelectedEvent: ({ sessionId }: {
|
|
246
|
+
sessionId: string;
|
|
247
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
248
|
+
postPlaceSelectedEvent: ({ sessionId }: {
|
|
249
|
+
sessionId: string;
|
|
250
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
251
|
+
postTagSelectedEvent: ({ sessionId }: {
|
|
252
|
+
sessionId: string;
|
|
253
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
254
|
+
dialog: {
|
|
255
|
+
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
256
|
+
sessionId: string;
|
|
257
|
+
text: string;
|
|
258
|
+
}) => Promise<import("./types").ResponseSpec & {
|
|
259
|
+
currentState: import("./types").DialogState;
|
|
260
|
+
}>;
|
|
261
|
+
postPlaceChangedEvent: ({ sessionId, placeName, latitude, longitude, uncertaintyKm, }: {
|
|
262
|
+
sessionId: string;
|
|
263
|
+
placeName: string;
|
|
264
|
+
latitude: number;
|
|
265
|
+
longitude: number;
|
|
266
|
+
uncertaintyKm?: number | undefined;
|
|
267
|
+
}) => Promise<import("./types").ResponseSpec & {
|
|
268
|
+
currentState: import("./types").DialogState;
|
|
269
|
+
}>;
|
|
270
|
+
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
271
|
+
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
272
|
+
currentState: import("./types").DialogState;
|
|
273
|
+
}>;
|
|
274
|
+
postTimeoutEvent: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
275
|
+
currentState: import("./types").DialogState;
|
|
276
|
+
}>;
|
|
277
|
+
postMediumSelectedEvent: (sessionId: string, medium: import("./types").Medium) => Promise<import("./types").ResponseSpec & {
|
|
278
|
+
currentState: import("./types").DialogState;
|
|
279
|
+
}>;
|
|
280
|
+
postDateSelectedEvent: ({ sessionId }: {
|
|
281
|
+
sessionId: string;
|
|
282
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
283
|
+
postPlaceSelectedEvent: ({ sessionId }: {
|
|
284
|
+
sessionId: string;
|
|
285
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
286
|
+
postTagSelectedEvent: ({ sessionId }: {
|
|
287
|
+
sessionId: string;
|
|
288
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
289
|
+
};
|
|
290
|
+
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
291
|
+
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
292
|
+
correlationPairs: {
|
|
293
|
+
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
294
|
+
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ResourceURLParams {
|
|
2
|
+
type?: 'avatar' | 'cover' | 'default';
|
|
3
|
+
resourceURI?: string;
|
|
4
|
+
sessionID?: string;
|
|
5
|
+
baseURL?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: (apiUrl: string) => {
|
|
8
|
+
/**
|
|
9
|
+
* getResourceUrl
|
|
10
|
+
* @description Returns the correct URL of a resource from the DB.
|
|
11
|
+
* @param {obj} params
|
|
12
|
+
* @param {string=} params.type - wheather is the avatar or the cover
|
|
13
|
+
* @param {string=} params.resourceURI - the resource URI
|
|
14
|
+
* @param {string=} params.sessionID - the session ID, required for memory media attachments
|
|
15
|
+
* @param {string=} params.baseURL - the base URL for default static assets (defaults to https://app.twincreator.com)
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
getResourceUrl: ({ type, resourceURI, sessionID, baseURL, }: ResourceURLParams) => string;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getApiUrl: (hostname?: string | undefined) => string;
|