@memori.ai/memori-api-client 0.11.0 → 1.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/CHANGELOG.md +30 -0
- package/README.md +0 -46
- package/dist/backend/memori.d.ts +21 -1
- package/dist/backend/user.d.ts +2 -2
- package/dist/backend.d.ts +14 -0
- package/dist/engine.d.ts +48 -10
- package/dist/index.d.ts +62 -18
- package/dist/memori-api-client.cjs.development.js +30 -239
- 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 +30 -239
- package/dist/memori-api-client.esm.js.map +1 -1
- package/dist/types.d.ts +6 -2
- package/package.json +2 -3
- package/src/backend/memori.ts +51 -1
- package/src/backend/user.ts +2 -2
- package/src/helpers/getApiUrl.ts +2 -3
- package/src/index.ts +0 -2
- package/src/types.ts +6 -2
- package/dist/speech.d.ts +0 -13
- package/src/speech.ts +0 -243
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/memori-ai/memori-api-client/compare/v1.0.0...v1.1.0) (2023-02-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* rename signin in signup, typo
|
|
9
|
+
* update memori lists api, rename user memori list
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add new user attributes ([5b10720](https://github.com/memori-ai/memori-api-client/commit/5b107206331a0ac6a579f983c5eb0fe04b4d9fc4))
|
|
14
|
+
* update memori lists api, rename user memori list ([6349149](https://github.com/memori-ai/memori-api-client/commit/63491496731ae65978c4ad81404881811ab6b13b))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* api url parsing allowing http for localhost ([6b6d881](https://github.com/memori-ai/memori-api-client/commit/6b6d8812385002e40cbbfc7fe87cd72daed3f5aa))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
* rename signin in signup, typo ([6fc8dc4](https://github.com/memori-ai/memori-api-client/commit/6fc8dc4ecced9b379d7ace49f2c25e83985755c1))
|
|
25
|
+
|
|
26
|
+
## [1.0.0](https://github.com/memori-ai/memori-api-client/compare/v0.11.0...v1.0.0) (2023-02-01)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Maintenance
|
|
30
|
+
|
|
31
|
+
* remove legacy experimental code ([69fc7c6](https://github.com/memori-ai/memori-api-client/commit/69fc7c6c56e1e55d77e95821a40d39d522b20abd))
|
|
32
|
+
|
|
3
33
|
## [0.11.0](https://github.com/memori-ai/memori-api-client/compare/v0.10.3...v0.11.0) (2023-02-01)
|
|
4
34
|
|
|
5
35
|
|
package/README.md
CHANGED
|
@@ -67,52 +67,6 @@ memori.asset.getResourceUrl({
|
|
|
67
67
|
});
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
### TTS
|
|
71
|
-
|
|
72
|
-
> Experimental
|
|
73
|
-
|
|
74
|
-
Bundled with this client there is a TTS utility that can be used to synthesize text to speech.
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
|
-
const memori = memoriApiClient('https://backend.memori.ai');
|
|
78
|
-
|
|
79
|
-
// Needs Azure Speech API key
|
|
80
|
-
// See https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?pivots=programming-language-javascript
|
|
81
|
-
// Second parameter is for debug mode
|
|
82
|
-
const speechSdk = memori.speech(AZURE_COGNITIVE_SERVICES_TTS_KEY, true);
|
|
83
|
-
|
|
84
|
-
// Requires the language code of the text to be spoken
|
|
85
|
-
// And the voice type (female or male)
|
|
86
|
-
const speech = speechSdk('it', 'FEMALE');
|
|
87
|
-
|
|
88
|
-
speech.speak('Ciao, Memori!', () => {
|
|
89
|
-
console.log('spoken');
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
speech.isSpeaking();
|
|
93
|
-
|
|
94
|
-
speech.stopSpeaking();
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### STT
|
|
98
|
-
|
|
99
|
-
> Experimental
|
|
100
|
-
|
|
101
|
-
There is also a speech recognition utility.
|
|
102
|
-
|
|
103
|
-
```ts
|
|
104
|
-
// Same as for the TTS
|
|
105
|
-
const speech = speechSdk('it', 'FEMALE');
|
|
106
|
-
|
|
107
|
-
speech.recognize(transcript => {
|
|
108
|
-
console.log('Recognized ', transcript);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
speech.isRecognizing();
|
|
112
|
-
|
|
113
|
-
speech.stopRecognizing();
|
|
114
|
-
```
|
|
115
|
-
|
|
116
70
|
## Development
|
|
117
71
|
|
|
118
72
|
To run TSDX, use:
|
package/dist/backend/memori.d.ts
CHANGED
|
@@ -32,12 +32,32 @@ declare const _default: (apiUrl: string) => {
|
|
|
32
32
|
getAllMemori: (authToken: string) => Promise<ResponseSpec & {
|
|
33
33
|
memori: Memori[];
|
|
34
34
|
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets a list of Memori objects owned by the specified user.
|
|
37
|
+
* @param {string} tenantName - The name of the tenant
|
|
38
|
+
* @param {string} userID - The user name
|
|
39
|
+
* @param {string=} authToken - The login token
|
|
40
|
+
* @returns A list of Memori objects
|
|
41
|
+
*/
|
|
42
|
+
getUserByIDMemoriList: (tenantName: string, userID: string, authToken?: string | undefined) => Promise<ResponseSpec & {
|
|
43
|
+
memori: Memori[];
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Gets a list of Memori objects owned by the specified user.
|
|
47
|
+
* @param {string} tenantName - The name of the tenant
|
|
48
|
+
* @param {string} userName - The user name
|
|
49
|
+
* @param {string=} authToken - The login token
|
|
50
|
+
* @returns A list of Memori objects
|
|
51
|
+
*/
|
|
52
|
+
getUserMemoriList: (tenantName: string, userName: string, authToken?: string | undefined) => Promise<ResponseSpec & {
|
|
53
|
+
memori: Memori[];
|
|
54
|
+
}>;
|
|
35
55
|
/**
|
|
36
56
|
* Gets a list of Memori objects for the currently logged in User.
|
|
37
57
|
* @param authToken - The login token
|
|
38
58
|
* @returns A list of Memori objects
|
|
39
59
|
*/
|
|
40
|
-
|
|
60
|
+
getMemoriList: (authToken: string) => Promise<ResponseSpec & {
|
|
41
61
|
memori: Memori[];
|
|
42
62
|
}>;
|
|
43
63
|
/**
|
package/dist/backend/user.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
5
5
|
* @param user - The user object
|
|
6
6
|
* @returns The created user object
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
userSignUp: (user: User) => Promise<ResponseSpec & {
|
|
9
9
|
user: User;
|
|
10
10
|
}>;
|
|
11
11
|
/**
|
|
@@ -13,7 +13,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
13
13
|
* @param user - The user object
|
|
14
14
|
* @returns The created user object
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
userConfirmSignUp: (user: User) => Promise<ResponseSpec & {
|
|
17
17
|
user: User;
|
|
18
18
|
token?: string | undefined;
|
|
19
19
|
}>;
|
package/dist/backend.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
17
17
|
getSentInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
18
18
|
invitations: import("./types").Invitation[];
|
|
19
19
|
}>;
|
|
20
|
+
getMemoriInvitations: (authToken: string, memoriId: string) => Promise<import("./types").ResponseSpec & {
|
|
21
|
+
invitations: import("./types").Invitation[];
|
|
22
|
+
}>;
|
|
20
23
|
getReceivedInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
21
24
|
invitations: import("./types").Invitation[];
|
|
22
25
|
}>;
|
|
@@ -97,6 +100,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
97
100
|
getTenantPublicMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
98
101
|
memori: import("./types").Memori[];
|
|
99
102
|
}>;
|
|
103
|
+
getTenantMetaverseMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
104
|
+
memori: import("./types").Memori[];
|
|
105
|
+
}>;
|
|
100
106
|
getPublicMemoriList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
101
107
|
memori: import("./types").Memori[];
|
|
102
108
|
}>;
|
|
@@ -141,6 +147,7 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
141
147
|
ownerTenantName: string;
|
|
142
148
|
ownerUserName: string;
|
|
143
149
|
}) => Promise<import("./types").ResponseSpec>;
|
|
150
|
+
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
144
151
|
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string;
|
|
145
152
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
146
153
|
asset: import("./types").Asset;
|
|
@@ -165,6 +172,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
165
172
|
getTenantPublicMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
166
173
|
memori: import("./types").Memori[];
|
|
167
174
|
}>;
|
|
175
|
+
getTenantMetaverseMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
176
|
+
memori: import("./types").Memori[];
|
|
177
|
+
}>;
|
|
168
178
|
getPublicMemoriList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
169
179
|
memori: import("./types").Memori[];
|
|
170
180
|
}>;
|
|
@@ -209,6 +219,7 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
209
219
|
ownerTenantName: string;
|
|
210
220
|
ownerUserName: string;
|
|
211
221
|
}) => Promise<import("./types").ResponseSpec>;
|
|
222
|
+
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
212
223
|
};
|
|
213
224
|
user: {
|
|
214
225
|
userSignIn: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
@@ -271,6 +282,9 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
271
282
|
getSentInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
272
283
|
invitations: import("./types").Invitation[];
|
|
273
284
|
}>;
|
|
285
|
+
getMemoriInvitations: (authToken: string, memoriId: string) => Promise<import("./types").ResponseSpec & {
|
|
286
|
+
invitations: import("./types").Invitation[];
|
|
287
|
+
}>;
|
|
274
288
|
getReceivedInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
275
289
|
invitations: import("./types").Invitation[];
|
|
276
290
|
}>;
|
package/dist/engine.d.ts
CHANGED
|
@@ -2,12 +2,18 @@ declare const _default: (apiUrl: string) => {
|
|
|
2
2
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
3
3
|
chatLogs: import("./types").ChatLog[];
|
|
4
4
|
}>;
|
|
5
|
+
getSessionChatLogs: (sessionId: string, chatLogSessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
6
|
+
chatLogs: import("./types").ChatLog[];
|
|
7
|
+
}>;
|
|
5
8
|
deleteChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec>;
|
|
6
9
|
deleteChatLog: (sessionId: string, chatLogId: string) => Promise<import("./types").ResponseSpec>;
|
|
7
10
|
chatLogs: {
|
|
8
11
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
9
12
|
chatLogs: import("./types").ChatLog[];
|
|
10
13
|
}>;
|
|
14
|
+
getSessionChatLogs: (sessionId: string, chatLogSessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
15
|
+
chatLogs: import("./types").ChatLog[];
|
|
16
|
+
}>;
|
|
11
17
|
deleteChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec>;
|
|
12
18
|
deleteChatLog: (sessionId: string, chatLogId: string) => Promise<import("./types").ResponseSpec>;
|
|
13
19
|
};
|
|
@@ -64,11 +70,25 @@ declare const _default: (apiUrl: string) => {
|
|
|
64
70
|
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
65
71
|
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
66
72
|
}>;
|
|
73
|
+
getUnansweredQuestionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
74
|
+
count: number;
|
|
75
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
76
|
+
}>;
|
|
77
|
+
postUnansweredQuestion: (sessionId: string, unansweredQuestion: import("./types").UnansweredQuestion) => Promise<import("./types").ResponseSpec & {
|
|
78
|
+
unansweredQuestion: import("./types").UnansweredQuestion;
|
|
79
|
+
}>;
|
|
67
80
|
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
68
81
|
unansweredQuestions: {
|
|
69
82
|
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
70
83
|
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
71
84
|
}>;
|
|
85
|
+
getUnansweredQuestionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
86
|
+
count: number;
|
|
87
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
88
|
+
}>;
|
|
89
|
+
postUnansweredQuestion: (sessionId: string, unansweredQuestion: import("./types").UnansweredQuestion) => Promise<import("./types").ResponseSpec & {
|
|
90
|
+
unansweredQuestion: import("./types").UnansweredQuestion;
|
|
91
|
+
}>;
|
|
72
92
|
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
73
93
|
};
|
|
74
94
|
getStatistics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -227,7 +247,11 @@ declare const _default: (apiUrl: string) => {
|
|
|
227
247
|
undefinedWords: string[];
|
|
228
248
|
}>;
|
|
229
249
|
};
|
|
230
|
-
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
250
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
251
|
+
memories: import("./types").Memory[];
|
|
252
|
+
}>;
|
|
253
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
254
|
+
count: number;
|
|
231
255
|
memories: import("./types").Memory[];
|
|
232
256
|
}>;
|
|
233
257
|
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -235,12 +259,16 @@ declare const _default: (apiUrl: string) => {
|
|
|
235
259
|
}>;
|
|
236
260
|
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
237
261
|
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
238
|
-
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
262
|
+
postMemory: (sessionId: string, memory: Pick<import("./types").Memory, "text" | "placeName" | "memoryType" | "lastRead" | "readOccurrencies" | "receiverID" | "receiverTag" | "receiverName" | "media" | "textVariants" | "answers" | "title" | "titleVariants" | "date" | "dateUncertaintyDays" | "placeLatitude" | "placeLongitude" | "placeUncertaintyKm" | "preformatted" | "conclusive" | "help" | "notPickable" | "hints" | "minTimeout" | "maxTimeout" | "contextVarsToSet" | "contextVarsToMatch" | "contextVars" | "creationTimestamp" | "creationName" | "creationSessionID" | "lastChangeTimestamp" | "lastChangeName" | "lastChangeSessionID">) => Promise<import("./types").ResponseSpec & {
|
|
239
263
|
memoryID: string;
|
|
240
264
|
}>;
|
|
241
265
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
242
266
|
memories: {
|
|
243
|
-
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
267
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
268
|
+
memories: import("./types").Memory[];
|
|
269
|
+
}>;
|
|
270
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
271
|
+
count: number;
|
|
244
272
|
memories: import("./types").Memory[];
|
|
245
273
|
}>;
|
|
246
274
|
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -248,7 +276,7 @@ declare const _default: (apiUrl: string) => {
|
|
|
248
276
|
}>;
|
|
249
277
|
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
250
278
|
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
251
|
-
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
279
|
+
postMemory: (sessionId: string, memory: Pick<import("./types").Memory, "text" | "placeName" | "memoryType" | "lastRead" | "readOccurrencies" | "receiverID" | "receiverTag" | "receiverName" | "media" | "textVariants" | "answers" | "title" | "titleVariants" | "date" | "dateUncertaintyDays" | "placeLatitude" | "placeLongitude" | "placeUncertaintyKm" | "preformatted" | "conclusive" | "help" | "notPickable" | "hints" | "minTimeout" | "maxTimeout" | "contextVarsToSet" | "contextVarsToMatch" | "contextVars" | "creationTimestamp" | "creationName" | "creationSessionID" | "lastChangeTimestamp" | "lastChangeName" | "lastChangeSessionID">) => Promise<import("./types").ResponseSpec & {
|
|
252
280
|
memoryID: string;
|
|
253
281
|
}>;
|
|
254
282
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
@@ -361,11 +389,11 @@ declare const _default: (apiUrl: string) => {
|
|
|
361
389
|
intentSlotID: string;
|
|
362
390
|
}>;
|
|
363
391
|
};
|
|
364
|
-
importCSV: (sessionId: string, csvRows: string[], params: import("./
|
|
365
|
-
exportCSV: (sessionID: string, params: import("./
|
|
392
|
+
importCSV: (sessionId: string, csvRows: string[], params: import("./types").ImportCSVParams) => Promise<import("./types").ResponseSpec & import("./types").ImportReponse>;
|
|
393
|
+
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
366
394
|
importExport: {
|
|
367
|
-
importCSV: (sessionId: string, csvRows: string[], params: import("./
|
|
368
|
-
exportCSV: (sessionID: string, params: import("./
|
|
395
|
+
importCSV: (sessionId: string, csvRows: string[], params: import("./types").ImportCSVParams) => Promise<import("./types").ResponseSpec & import("./types").ImportReponse>;
|
|
396
|
+
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
369
397
|
};
|
|
370
398
|
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
371
399
|
sessionId: string;
|
|
@@ -425,10 +453,20 @@ declare const _default: (apiUrl: string) => {
|
|
|
425
453
|
postPlaceSelectedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
426
454
|
postTagSelectedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
427
455
|
};
|
|
428
|
-
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
456
|
+
getCorrelationPairs: (sessionId: string, from?: number | undefined, howMany?: number | undefined) => Promise<import("./types").ResponseSpec & {
|
|
457
|
+
correlationPairs: import("./types").CorrelationPair[];
|
|
458
|
+
}>;
|
|
459
|
+
postCorrelationPair: (sessionId: string, correlationPair: import("./types").CorrelationPair) => Promise<import("./types").ResponseSpec & {
|
|
460
|
+
correlationPair: import("./types").CorrelationPair;
|
|
461
|
+
}>;
|
|
429
462
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
430
463
|
correlationPairs: {
|
|
431
|
-
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
464
|
+
getCorrelationPairs: (sessionId: string, from?: number | undefined, howMany?: number | undefined) => Promise<import("./types").ResponseSpec & {
|
|
465
|
+
correlationPairs: import("./types").CorrelationPair[];
|
|
466
|
+
}>;
|
|
467
|
+
postCorrelationPair: (sessionId: string, correlationPair: import("./types").CorrelationPair) => Promise<import("./types").ResponseSpec & {
|
|
468
|
+
correlationPair: import("./types").CorrelationPair;
|
|
469
|
+
}>;
|
|
432
470
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
433
471
|
};
|
|
434
472
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import * as constants from './constants';
|
|
2
2
|
declare const api: (hostname?: string | undefined) => {
|
|
3
|
-
speech: (AZURE_COGNITIVE_SERVICES_TTS_KEY: string, DEBUG?: boolean) => (lang: string, voiceType: "FEMALE" | "MALE") => {
|
|
4
|
-
speak: (text: string, onAudioEnd?: ((sender: import("microsoft-cognitiveservices-speech-sdk").IPlayer) => void) | undefined) => void;
|
|
5
|
-
isSpeaking: () => boolean;
|
|
6
|
-
stopSpeaking: () => void;
|
|
7
|
-
recognize: (onRecognized: (transcript: string) => void) => void;
|
|
8
|
-
isRecognizing: () => boolean;
|
|
9
|
-
stopRecognizing: (onStop?: (() => void) | undefined) => void;
|
|
10
|
-
};
|
|
11
3
|
constants: typeof constants;
|
|
12
4
|
asset: {
|
|
13
5
|
getResourceUrl: ({ type, resourceURI, sessionID, baseURL, }: import("./helpers/asset").ResourceURLParams) => string;
|
|
@@ -15,12 +7,18 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
15
7
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
16
8
|
chatLogs: import("./types").ChatLog[];
|
|
17
9
|
}>;
|
|
10
|
+
getSessionChatLogs: (sessionId: string, chatLogSessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
11
|
+
chatLogs: import("./types").ChatLog[];
|
|
12
|
+
}>;
|
|
18
13
|
deleteChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec>;
|
|
19
14
|
deleteChatLog: (sessionId: string, chatLogId: string) => Promise<import("./types").ResponseSpec>;
|
|
20
15
|
chatLogs: {
|
|
21
16
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
22
17
|
chatLogs: import("./types").ChatLog[];
|
|
23
18
|
}>;
|
|
19
|
+
getSessionChatLogs: (sessionId: string, chatLogSessionID: string) => Promise<import("./types").ResponseSpec & {
|
|
20
|
+
chatLogs: import("./types").ChatLog[];
|
|
21
|
+
}>;
|
|
24
22
|
deleteChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec>;
|
|
25
23
|
deleteChatLog: (sessionId: string, chatLogId: string) => Promise<import("./types").ResponseSpec>;
|
|
26
24
|
};
|
|
@@ -77,11 +75,25 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
77
75
|
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
78
76
|
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
79
77
|
}>;
|
|
78
|
+
getUnansweredQuestionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
79
|
+
count: number;
|
|
80
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
81
|
+
}>;
|
|
82
|
+
postUnansweredQuestion: (sessionId: string, unansweredQuestion: import("./types").UnansweredQuestion) => Promise<import("./types").ResponseSpec & {
|
|
83
|
+
unansweredQuestion: import("./types").UnansweredQuestion;
|
|
84
|
+
}>;
|
|
80
85
|
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
81
86
|
unansweredQuestions: {
|
|
82
87
|
getUnansweredQuestions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
83
88
|
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
84
89
|
}>;
|
|
90
|
+
getUnansweredQuestionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
91
|
+
count: number;
|
|
92
|
+
unansweredQuestions: import("./types").UnansweredQuestion[];
|
|
93
|
+
}>;
|
|
94
|
+
postUnansweredQuestion: (sessionId: string, unansweredQuestion: import("./types").UnansweredQuestion) => Promise<import("./types").ResponseSpec & {
|
|
95
|
+
unansweredQuestion: import("./types").UnansweredQuestion;
|
|
96
|
+
}>;
|
|
85
97
|
deleteUnansweredQuestion: (sessionId: string, unansweredQuestionId: string) => Promise<import("./types").ResponseSpec>;
|
|
86
98
|
};
|
|
87
99
|
getStatistics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -240,7 +252,11 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
240
252
|
undefinedWords: string[];
|
|
241
253
|
}>;
|
|
242
254
|
};
|
|
243
|
-
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
255
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
256
|
+
memories: import("./types").Memory[];
|
|
257
|
+
}>;
|
|
258
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
259
|
+
count: number;
|
|
244
260
|
memories: import("./types").Memory[];
|
|
245
261
|
}>;
|
|
246
262
|
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -248,12 +264,16 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
248
264
|
}>;
|
|
249
265
|
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
250
266
|
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
251
|
-
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
267
|
+
postMemory: (sessionId: string, memory: Pick<import("./types").Memory, "text" | "creationTimestamp" | "lastChangeTimestamp" | "placeName" | "memoryType" | "lastRead" | "readOccurrencies" | "receiverID" | "receiverTag" | "receiverName" | "media" | "textVariants" | "answers" | "title" | "titleVariants" | "date" | "dateUncertaintyDays" | "placeLatitude" | "placeLongitude" | "placeUncertaintyKm" | "preformatted" | "conclusive" | "help" | "notPickable" | "hints" | "minTimeout" | "maxTimeout" | "contextVarsToSet" | "contextVarsToMatch" | "contextVars" | "creationName" | "creationSessionID" | "lastChangeName" | "lastChangeSessionID">) => Promise<import("./types").ResponseSpec & {
|
|
252
268
|
memoryID: string;
|
|
253
269
|
}>;
|
|
254
270
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
255
271
|
memories: {
|
|
256
|
-
getMemories: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
272
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
273
|
+
memories: import("./types").Memory[];
|
|
274
|
+
}>;
|
|
275
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
276
|
+
count: number;
|
|
257
277
|
memories: import("./types").Memory[];
|
|
258
278
|
}>;
|
|
259
279
|
getMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -261,7 +281,7 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
261
281
|
}>;
|
|
262
282
|
patchMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec>;
|
|
263
283
|
deleteMemory: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
264
|
-
postMemory: (sessionId: string, memory: import("./types").Memory) => Promise<import("./types").ResponseSpec & {
|
|
284
|
+
postMemory: (sessionId: string, memory: Pick<import("./types").Memory, "text" | "creationTimestamp" | "lastChangeTimestamp" | "placeName" | "memoryType" | "lastRead" | "readOccurrencies" | "receiverID" | "receiverTag" | "receiverName" | "media" | "textVariants" | "answers" | "title" | "titleVariants" | "date" | "dateUncertaintyDays" | "placeLatitude" | "placeLongitude" | "placeUncertaintyKm" | "preformatted" | "conclusive" | "help" | "notPickable" | "hints" | "minTimeout" | "maxTimeout" | "contextVarsToSet" | "contextVarsToMatch" | "contextVars" | "creationName" | "creationSessionID" | "lastChangeName" | "lastChangeSessionID">) => Promise<import("./types").ResponseSpec & {
|
|
265
285
|
memoryID: string;
|
|
266
286
|
}>;
|
|
267
287
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
@@ -374,11 +394,11 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
374
394
|
intentSlotID: string;
|
|
375
395
|
}>;
|
|
376
396
|
};
|
|
377
|
-
importCSV: (sessionId: string, csvRows: string[], params: import("./
|
|
378
|
-
exportCSV: (sessionID: string, params: import("./
|
|
397
|
+
importCSV: (sessionId: string, csvRows: string[], params: import("./types").ImportCSVParams) => Promise<import("./types").ResponseSpec & import("./types").ImportReponse>;
|
|
398
|
+
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
379
399
|
importExport: {
|
|
380
|
-
importCSV: (sessionId: string, csvRows: string[], params: import("./
|
|
381
|
-
exportCSV: (sessionID: string, params: import("./
|
|
400
|
+
importCSV: (sessionId: string, csvRows: string[], params: import("./types").ImportCSVParams) => Promise<import("./types").ResponseSpec & import("./types").ImportReponse>;
|
|
401
|
+
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
382
402
|
};
|
|
383
403
|
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
384
404
|
sessionId: string;
|
|
@@ -438,10 +458,20 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
438
458
|
postPlaceSelectedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
439
459
|
postTagSelectedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec>;
|
|
440
460
|
};
|
|
441
|
-
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
461
|
+
getCorrelationPairs: (sessionId: string, from?: number | undefined, howMany?: number | undefined) => Promise<import("./types").ResponseSpec & {
|
|
462
|
+
correlationPairs: import("./types").CorrelationPair[];
|
|
463
|
+
}>;
|
|
464
|
+
postCorrelationPair: (sessionId: string, correlationPair: import("./types").CorrelationPair) => Promise<import("./types").ResponseSpec & {
|
|
465
|
+
correlationPair: import("./types").CorrelationPair;
|
|
466
|
+
}>;
|
|
442
467
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
443
468
|
correlationPairs: {
|
|
444
|
-
getCorrelationPairs: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
469
|
+
getCorrelationPairs: (sessionId: string, from?: number | undefined, howMany?: number | undefined) => Promise<import("./types").ResponseSpec & {
|
|
470
|
+
correlationPairs: import("./types").CorrelationPair[];
|
|
471
|
+
}>;
|
|
472
|
+
postCorrelationPair: (sessionId: string, correlationPair: import("./types").CorrelationPair) => Promise<import("./types").ResponseSpec & {
|
|
473
|
+
correlationPair: import("./types").CorrelationPair;
|
|
474
|
+
}>;
|
|
445
475
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
446
476
|
};
|
|
447
477
|
backend: {
|
|
@@ -463,6 +493,9 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
463
493
|
getSentInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
464
494
|
invitations: import("./types").Invitation[];
|
|
465
495
|
}>;
|
|
496
|
+
getMemoriInvitations: (authToken: string, memoriId: string) => Promise<import("./types").ResponseSpec & {
|
|
497
|
+
invitations: import("./types").Invitation[];
|
|
498
|
+
}>;
|
|
466
499
|
getReceivedInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
467
500
|
invitations: import("./types").Invitation[];
|
|
468
501
|
}>;
|
|
@@ -543,6 +576,9 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
543
576
|
getTenantPublicMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
544
577
|
memori: import("./types").Memori[];
|
|
545
578
|
}>;
|
|
579
|
+
getTenantMetaverseMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
580
|
+
memori: import("./types").Memori[];
|
|
581
|
+
}>;
|
|
546
582
|
getPublicMemoriList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
547
583
|
memori: import("./types").Memori[];
|
|
548
584
|
}>;
|
|
@@ -587,6 +623,7 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
587
623
|
ownerTenantName: string;
|
|
588
624
|
ownerUserName: string;
|
|
589
625
|
}) => Promise<import("./types").ResponseSpec>;
|
|
626
|
+
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
590
627
|
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string;
|
|
591
628
|
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
592
629
|
asset: import("./types").Asset;
|
|
@@ -611,6 +648,9 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
611
648
|
getTenantPublicMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
612
649
|
memori: import("./types").Memori[];
|
|
613
650
|
}>;
|
|
651
|
+
getTenantMetaverseMemoriList: (tenant: string) => Promise<import("./types").ResponseSpec & {
|
|
652
|
+
memori: import("./types").Memori[];
|
|
653
|
+
}>;
|
|
614
654
|
getPublicMemoriList: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
615
655
|
memori: import("./types").Memori[];
|
|
616
656
|
}>;
|
|
@@ -655,6 +695,7 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
655
695
|
ownerTenantName: string;
|
|
656
696
|
ownerUserName: string;
|
|
657
697
|
}) => Promise<import("./types").ResponseSpec>;
|
|
698
|
+
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
658
699
|
};
|
|
659
700
|
user: {
|
|
660
701
|
userSignIn: (user: import("./types").User) => Promise<import("./types").ResponseSpec & {
|
|
@@ -717,6 +758,9 @@ declare const api: (hostname?: string | undefined) => {
|
|
|
717
758
|
getSentInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
718
759
|
invitations: import("./types").Invitation[];
|
|
719
760
|
}>;
|
|
761
|
+
getMemoriInvitations: (authToken: string, memoriId: string) => Promise<import("./types").ResponseSpec & {
|
|
762
|
+
invitations: import("./types").Invitation[];
|
|
763
|
+
}>;
|
|
720
764
|
getReceivedInvitations: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
721
765
|
invitations: import("./types").Invitation[];
|
|
722
766
|
}>;
|