@memori.ai/memori-api-client 5.2.1 → 5.3.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 +7 -0
- package/dist/backend/user.d.ts +5 -1
- package/dist/backend/user.js +5 -0
- package/dist/backend/user.js.map +1 -1
- package/dist/backend.d.ts +8 -0
- package/dist/client.test.js +19 -0
- package/dist/client.test.js.map +1 -1
- package/dist/engine/chatLogs.d.ts +3 -0
- package/dist/engine/chatLogs.js +4 -0
- package/dist/engine/chatLogs.js.map +1 -1
- package/dist/engine/functions.d.ts +4 -0
- package/dist/engine/functions.js +4 -0
- package/dist/engine/functions.js.map +1 -1
- package/dist/engine/search.d.ts +1 -0
- package/dist/engine/search.js.map +1 -1
- package/dist/engine.d.ts +18 -2
- package/dist/index.d.ts +26 -2
- package/dist/types.d.ts +382 -271
- package/esm/backend/user.d.ts +5 -1
- package/esm/backend/user.js +5 -0
- package/esm/backend/user.js.map +1 -1
- package/esm/backend.d.ts +8 -0
- package/esm/client.test.js +19 -0
- package/esm/client.test.js.map +1 -1
- package/esm/engine/chatLogs.d.ts +3 -0
- package/esm/engine/chatLogs.js +4 -0
- package/esm/engine/chatLogs.js.map +1 -1
- package/esm/engine/functions.d.ts +4 -0
- package/esm/engine/functions.js +4 -0
- package/esm/engine/functions.js.map +1 -1
- package/esm/engine/search.d.ts +1 -0
- package/esm/engine/search.js.map +1 -1
- package/esm/engine.d.ts +18 -2
- package/esm/index.d.ts +26 -2
- package/esm/types.d.ts +382 -271
- package/package.json +1 -1
- package/src/backend/user.ts +20 -1
- package/src/client.test.ts +42 -0
- package/src/engine/chatLogs.ts +27 -0
- package/src/engine/functions.ts +21 -0
- package/src/engine/search.ts +1 -0
- package/src/types.ts +547 -337
package/esm/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare type Error = {
|
|
|
3
3
|
message: string;
|
|
4
4
|
};
|
|
5
5
|
export declare type ResponseSpec = {
|
|
6
|
+
count?: number;
|
|
6
7
|
requestID: string;
|
|
7
8
|
requestDateTime: string;
|
|
8
9
|
resultCode: number;
|
|
@@ -54,9 +55,13 @@ export declare type Memori = {
|
|
|
54
55
|
disableR4Loop?: boolean;
|
|
55
56
|
disableR5Loop?: boolean;
|
|
56
57
|
ageRestriction?: number;
|
|
58
|
+
confidenceOffset?: number;
|
|
57
59
|
nsfw?: boolean;
|
|
58
60
|
enableCompletions?: boolean;
|
|
59
61
|
completionDescription?: string;
|
|
62
|
+
enableDeepThought?: boolean;
|
|
63
|
+
enableBoardOfExperts?: boolean;
|
|
64
|
+
disableCompletionMediaExtraction?: boolean;
|
|
60
65
|
completionConfigNameForQuestionAnswering?: string;
|
|
61
66
|
completionConfigForQuestionAnswering?: CompletionConfig;
|
|
62
67
|
completionConfigNameForImportExport?: string;
|
|
@@ -65,9 +70,6 @@ export declare type Memori = {
|
|
|
65
70
|
completionConfigForDeepThought?: CompletionConfig;
|
|
66
71
|
completionTemperature?: number;
|
|
67
72
|
completionMaxTokens?: number;
|
|
68
|
-
enableDeepThought?: boolean;
|
|
69
|
-
enableBoardOfExperts?: boolean;
|
|
70
|
-
disableCompletionMediaExtraction?: boolean;
|
|
71
73
|
chainingMemoriID?: string;
|
|
72
74
|
chainingBaseURL?: string;
|
|
73
75
|
chainingPassword?: string;
|
|
@@ -84,16 +86,21 @@ export declare type Memori = {
|
|
|
84
86
|
sentInvitations?: Invitation[];
|
|
85
87
|
receivedInvitations?: Invitation[];
|
|
86
88
|
categories?: string[];
|
|
89
|
+
enableMacroFunctions?: string[];
|
|
90
|
+
macroParameters?: {
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
};
|
|
87
93
|
ownerUserName?: string;
|
|
88
94
|
gamificationLevel?: GamificationLevel;
|
|
89
95
|
contentQualityIndex?: number;
|
|
90
96
|
contentQualityIndexTimestamp?: string;
|
|
97
|
+
alwaysAnswerWithCompletion?: boolean;
|
|
91
98
|
};
|
|
92
|
-
export type CompletionConfig = {
|
|
99
|
+
export declare type CompletionConfig = {
|
|
93
100
|
completionConfigID: string;
|
|
94
101
|
configName: string;
|
|
95
102
|
description?: string;
|
|
96
|
-
provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI';
|
|
103
|
+
provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI' | 'AWS_Anthropic';
|
|
97
104
|
endPoint?: string;
|
|
98
105
|
apiKey?: string;
|
|
99
106
|
model: string;
|
|
@@ -105,13 +112,45 @@ export type CompletionConfig = {
|
|
|
105
112
|
ownerTenantName?: string;
|
|
106
113
|
visibleToTenantUsers?: boolean;
|
|
107
114
|
visibleToOtherUsers?: boolean;
|
|
108
|
-
|
|
115
|
+
useAsDefault?: boolean;
|
|
116
|
+
chargeable?: boolean;
|
|
117
|
+
region?: string;
|
|
118
|
+
modelId?: string;
|
|
119
|
+
accessKeyId?: string;
|
|
120
|
+
secretAccessKey?: string;
|
|
121
|
+
applyTo?: ApplyToOption;
|
|
122
|
+
};
|
|
123
|
+
export declare type ApplyToOption = 'ALL_TENANT_MEMORI_ONLY_QA_PURPOSE' | 'ALL_TENANT_MEMORI_ONLY_IE_PURPOSE' | 'ALL_TENANT_MEMORI_ONLY_DT_PURPOSE' | 'ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES';
|
|
109
124
|
export declare type Venue = {
|
|
110
125
|
placeName: string;
|
|
111
126
|
latitude: number;
|
|
112
127
|
longitude: number;
|
|
113
128
|
uncertainty?: number;
|
|
114
129
|
};
|
|
130
|
+
export declare type NominatimItem = {
|
|
131
|
+
place_id: number;
|
|
132
|
+
lat: number;
|
|
133
|
+
lon: number;
|
|
134
|
+
display_name: string;
|
|
135
|
+
type: string;
|
|
136
|
+
category: string;
|
|
137
|
+
importance: number;
|
|
138
|
+
place_rank: number;
|
|
139
|
+
address?: {
|
|
140
|
+
house_number?: string;
|
|
141
|
+
road?: string;
|
|
142
|
+
hamlet?: string;
|
|
143
|
+
village?: string;
|
|
144
|
+
suburb?: string;
|
|
145
|
+
town?: string;
|
|
146
|
+
city?: string;
|
|
147
|
+
municipality?: string;
|
|
148
|
+
county?: string;
|
|
149
|
+
state?: string;
|
|
150
|
+
country: string;
|
|
151
|
+
};
|
|
152
|
+
boundingbox: [number, number, number, number];
|
|
153
|
+
};
|
|
115
154
|
export declare type NotificationPrefs = {
|
|
116
155
|
chatLogExtractionPeriod?: 'None' | 'Hourly' | 'Daily' | 'Weekly';
|
|
117
156
|
chatLogExtractionMinLines?: number;
|
|
@@ -162,6 +201,36 @@ export declare type User = {
|
|
|
162
201
|
avatar3DURL?: string;
|
|
163
202
|
avatar3DURLType?: string;
|
|
164
203
|
};
|
|
204
|
+
export declare type UserFilters = {
|
|
205
|
+
periodFrom?: string | undefined;
|
|
206
|
+
periodTo?: string | undefined;
|
|
207
|
+
tenantName?: string | undefined;
|
|
208
|
+
text?: string | undefined;
|
|
209
|
+
numberOfResults: number;
|
|
210
|
+
startFrom: number;
|
|
211
|
+
orderBy?: OrderBy | undefined;
|
|
212
|
+
};
|
|
213
|
+
export declare type OrderBy = 'CreationDateAscending' | 'CreationDateDescending' | 'MemoriCountAscending' | 'MemoriCountDescending' | 'MonthCompletionsAscending' | 'MonthCompletionsDescending' | 'MonthImportSizeAscending' | 'MonthImportSizeDescending';
|
|
214
|
+
export declare type MemoriUser = {
|
|
215
|
+
userID: string;
|
|
216
|
+
email: string;
|
|
217
|
+
userName: string;
|
|
218
|
+
tenantName: string;
|
|
219
|
+
disableDeepThought: boolean;
|
|
220
|
+
creationTimestamp: string;
|
|
221
|
+
creationSessionID: string;
|
|
222
|
+
lastChangeTimestamp: string;
|
|
223
|
+
lastChangeSessionID: string;
|
|
224
|
+
};
|
|
225
|
+
export declare type Topic = {
|
|
226
|
+
topicID: string;
|
|
227
|
+
name: string;
|
|
228
|
+
weight: number;
|
|
229
|
+
creationTimestamp: string;
|
|
230
|
+
creationSessionID: string;
|
|
231
|
+
lastChangeTimestamp: string;
|
|
232
|
+
lastChangeSessionID: string;
|
|
233
|
+
};
|
|
165
234
|
export declare type IntegrationResource = {
|
|
166
235
|
name: string;
|
|
167
236
|
url: string;
|
|
@@ -214,12 +283,13 @@ export interface UploadFile<T = any> {
|
|
|
214
283
|
xhr?: T;
|
|
215
284
|
preview?: string;
|
|
216
285
|
}
|
|
217
|
-
export type TenantConfig = {
|
|
286
|
+
export declare type TenantConfig = {
|
|
218
287
|
name: string;
|
|
219
288
|
showNewUser: boolean;
|
|
220
289
|
requirePosition: boolean;
|
|
290
|
+
showVirtualSpaces?: boolean;
|
|
221
291
|
};
|
|
222
|
-
export type TenantBase = {
|
|
292
|
+
export declare type TenantBase = {
|
|
223
293
|
tenantID?: string;
|
|
224
294
|
name?: string;
|
|
225
295
|
description?: string;
|
|
@@ -253,174 +323,11 @@ export type TenantBase = {
|
|
|
253
323
|
creationTimestamp?: string;
|
|
254
324
|
lastChangeTimestamp?: string;
|
|
255
325
|
};
|
|
256
|
-
export type Tenant = TenantBase & {
|
|
326
|
+
export declare type Tenant = TenantBase & {
|
|
257
327
|
id: string;
|
|
258
328
|
theme: string;
|
|
259
329
|
config: TenantConfig;
|
|
260
330
|
};
|
|
261
|
-
export declare type OpenSession = {
|
|
262
|
-
memoriID: string;
|
|
263
|
-
password?: string;
|
|
264
|
-
recoveryTokens?: string[];
|
|
265
|
-
tag?: string;
|
|
266
|
-
pin?: string;
|
|
267
|
-
initialContextVars?: {
|
|
268
|
-
[key: string]: string;
|
|
269
|
-
};
|
|
270
|
-
initialQuestion?: string;
|
|
271
|
-
forceCloseSessions?: boolean;
|
|
272
|
-
birthDate?: string;
|
|
273
|
-
additionalInfo?: {
|
|
274
|
-
loginToken?: string;
|
|
275
|
-
language?: string;
|
|
276
|
-
referral?: string;
|
|
277
|
-
timeZoneOffset?: string;
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
export declare type MemoriSession = {
|
|
281
|
-
sessionID: string;
|
|
282
|
-
currentState: DialogState;
|
|
283
|
-
stats?: Stats;
|
|
284
|
-
};
|
|
285
|
-
export declare type Medium = {
|
|
286
|
-
mediumID: string;
|
|
287
|
-
url?: string;
|
|
288
|
-
content?: string;
|
|
289
|
-
mimeType: string;
|
|
290
|
-
title?: string;
|
|
291
|
-
properties?: {
|
|
292
|
-
[key: string]: any;
|
|
293
|
-
};
|
|
294
|
-
creationTimestamp?: string;
|
|
295
|
-
creationName?: string;
|
|
296
|
-
lastChangeTimestamp?: string;
|
|
297
|
-
lastChangeName?: string;
|
|
298
|
-
};
|
|
299
|
-
export declare type Stats = {
|
|
300
|
-
totalReceivers: number;
|
|
301
|
-
receiversWithMemories: number;
|
|
302
|
-
totalMemories: number;
|
|
303
|
-
publicMemories: number;
|
|
304
|
-
memoriesWithMedia: number;
|
|
305
|
-
totalQuestions: number;
|
|
306
|
-
publicQuestions: number;
|
|
307
|
-
questionsWithMoreThanOneAnswer: number;
|
|
308
|
-
totalStories: number;
|
|
309
|
-
publicStories: number;
|
|
310
|
-
storiesWithDate: number;
|
|
311
|
-
storiesWithPlace: number;
|
|
312
|
-
storiesWithDateAndPlace: number;
|
|
313
|
-
unansweredQuestions: number;
|
|
314
|
-
successfulCorrelations: number;
|
|
315
|
-
failedCorrelations: number;
|
|
316
|
-
};
|
|
317
|
-
export declare type GamificationLevel = {
|
|
318
|
-
points: number;
|
|
319
|
-
badge: string;
|
|
320
|
-
pointsForCurrentBadge: number;
|
|
321
|
-
nextBadge?: {
|
|
322
|
-
points: number;
|
|
323
|
-
badge: string;
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
export declare type EventLog = {
|
|
327
|
-
eventLogID: string;
|
|
328
|
-
timestamp: string;
|
|
329
|
-
eventType: string;
|
|
330
|
-
memoriID: string;
|
|
331
|
-
userAgent?: string;
|
|
332
|
-
ipAddress?: string;
|
|
333
|
-
memoryID?: string;
|
|
334
|
-
intentID?: string;
|
|
335
|
-
enteredText?: string;
|
|
336
|
-
receiverTag?: string;
|
|
337
|
-
};
|
|
338
|
-
export declare type UserLog = {
|
|
339
|
-
timestamp: string;
|
|
340
|
-
count: number;
|
|
341
|
-
};
|
|
342
|
-
export declare type UsersLog = {
|
|
343
|
-
timestamp: string;
|
|
344
|
-
countUsers: number;
|
|
345
|
-
countRecurrentUsers: number;
|
|
346
|
-
};
|
|
347
|
-
export declare type TranslatedHint = {
|
|
348
|
-
text: string;
|
|
349
|
-
originalText: string;
|
|
350
|
-
};
|
|
351
|
-
export declare type DialogState = {
|
|
352
|
-
state: string;
|
|
353
|
-
stateName: string;
|
|
354
|
-
previousState: string;
|
|
355
|
-
confidence?: number;
|
|
356
|
-
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
357
|
-
emission?: string;
|
|
358
|
-
translatedEmission?: string;
|
|
359
|
-
emitter?: string;
|
|
360
|
-
completion?: boolean;
|
|
361
|
-
continuationEmitted?: boolean;
|
|
362
|
-
lastMatchedMemoryID?: string;
|
|
363
|
-
acceptsTimeout?: boolean;
|
|
364
|
-
acceptsAbort?: boolean;
|
|
365
|
-
acceptsMedia?: boolean;
|
|
366
|
-
acceptsDate?: boolean;
|
|
367
|
-
acceptsPlace?: boolean;
|
|
368
|
-
acceptsTag?: boolean;
|
|
369
|
-
acceptsFeedback?: boolean;
|
|
370
|
-
hints?: string[];
|
|
371
|
-
timeout?: number;
|
|
372
|
-
translatedHints?: TranslatedHint[];
|
|
373
|
-
currentTag?: string;
|
|
374
|
-
currentDate?: string;
|
|
375
|
-
currentPlaceName?: string;
|
|
376
|
-
currentLatitude?: number;
|
|
377
|
-
currentLongitude?: number;
|
|
378
|
-
currentUncertaintyKm?: number;
|
|
379
|
-
giverID?: string;
|
|
380
|
-
currentReceiverID?: string;
|
|
381
|
-
currentMemoryID?: string;
|
|
382
|
-
media?: Medium[];
|
|
383
|
-
knownTags?: {
|
|
384
|
-
[key: string]: string;
|
|
385
|
-
};
|
|
386
|
-
contextVars?: {
|
|
387
|
-
[key: string]: string;
|
|
388
|
-
};
|
|
389
|
-
memoryTags?: string[];
|
|
390
|
-
};
|
|
391
|
-
export declare type Person = {
|
|
392
|
-
personID?: string;
|
|
393
|
-
personType: 'Giver' | 'Receiver';
|
|
394
|
-
name?: string;
|
|
395
|
-
information?: string;
|
|
396
|
-
pin: string;
|
|
397
|
-
tag: string;
|
|
398
|
-
creationTimestamp?: string;
|
|
399
|
-
creationName?: string;
|
|
400
|
-
lastChangeTimestamp?: string;
|
|
401
|
-
lastChangeName?: string;
|
|
402
|
-
};
|
|
403
|
-
export declare type PersonificationProfile = {
|
|
404
|
-
tag?: string;
|
|
405
|
-
pin?: string;
|
|
406
|
-
name?: string;
|
|
407
|
-
sessionID: string;
|
|
408
|
-
};
|
|
409
|
-
export declare type Invitation = {
|
|
410
|
-
invitationID?: string;
|
|
411
|
-
memoriID: string;
|
|
412
|
-
isInviter?: boolean;
|
|
413
|
-
isInvitee?: boolean;
|
|
414
|
-
text?: string;
|
|
415
|
-
destinationEMail: string;
|
|
416
|
-
destinationName: string;
|
|
417
|
-
tag: string;
|
|
418
|
-
pin: string;
|
|
419
|
-
type: string;
|
|
420
|
-
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
421
|
-
creationTimestamp?: string;
|
|
422
|
-
lastChangeTimestamp?: string;
|
|
423
|
-
};
|
|
424
331
|
export declare type LocalizationKeyContent = {
|
|
425
332
|
key: string;
|
|
426
333
|
value: string;
|
|
@@ -442,7 +349,55 @@ export declare type Asset = {
|
|
|
442
349
|
creationTimestamp: string;
|
|
443
350
|
lastChangeTimestamp: string;
|
|
444
351
|
};
|
|
445
|
-
export type
|
|
352
|
+
export declare type CustomWord = {
|
|
353
|
+
customWordID: string;
|
|
354
|
+
word: string;
|
|
355
|
+
definition: string;
|
|
356
|
+
creationTimestamp: string;
|
|
357
|
+
creationSessionID: string;
|
|
358
|
+
lastChangeTimestamp: string;
|
|
359
|
+
lastChangeSessionID: string;
|
|
360
|
+
};
|
|
361
|
+
export declare type ConsumptionLog = {
|
|
362
|
+
consumptionLogID: string;
|
|
363
|
+
from: string;
|
|
364
|
+
to: string;
|
|
365
|
+
type: 'Daily' | 'Monthly';
|
|
366
|
+
userID?: string;
|
|
367
|
+
userName?: string;
|
|
368
|
+
tenantName?: string;
|
|
369
|
+
memoriID?: string;
|
|
370
|
+
memoriName?: string;
|
|
371
|
+
totalSessions: number;
|
|
372
|
+
validSessions: number;
|
|
373
|
+
completions: number;
|
|
374
|
+
deepThoughtValidSessions: number;
|
|
375
|
+
deepThoughtCompletions: number;
|
|
376
|
+
importedSize: number;
|
|
377
|
+
nonChargeableCompletions?: number;
|
|
378
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
379
|
+
nonChargeableImportedSize?: number;
|
|
380
|
+
promptTokens: {
|
|
381
|
+
[key: string]: number;
|
|
382
|
+
};
|
|
383
|
+
completionTokens: {
|
|
384
|
+
[key: string]: number;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
export declare type Notification = {
|
|
388
|
+
notificationID: string;
|
|
389
|
+
timestamp: string;
|
|
390
|
+
severity: 'INFO' | 'WARN' | 'ALERT' | 'AWARD';
|
|
391
|
+
texts: {
|
|
392
|
+
'it-IT': string;
|
|
393
|
+
'en-US': string;
|
|
394
|
+
[lang: string]: string;
|
|
395
|
+
};
|
|
396
|
+
additionalInfo?: {
|
|
397
|
+
[key: string]: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
export declare type SearchQuery = {
|
|
446
401
|
text?: string;
|
|
447
402
|
searchType?: 'Literal' | 'Semantic';
|
|
448
403
|
date?: string;
|
|
@@ -454,7 +409,6 @@ export type SearchQuery = {
|
|
|
454
409
|
tag?: string;
|
|
455
410
|
ignoreLastRead?: boolean;
|
|
456
411
|
excludedMemoryIDs?: string[];
|
|
457
|
-
startFrom?: number;
|
|
458
412
|
numberOfResults?: number;
|
|
459
413
|
contextVars?: {
|
|
460
414
|
[variable: string]: string;
|
|
@@ -463,8 +417,10 @@ export type SearchQuery = {
|
|
|
463
417
|
[variable: string]: string;
|
|
464
418
|
};
|
|
465
419
|
memoryTags?: string[];
|
|
420
|
+
withMediaOnly?: boolean;
|
|
421
|
+
memoryType?: 'Question' | 'Story' | 'Default' | 'CompletionDraft' | 'CompletionPlaceholder' | 'ExpertReference';
|
|
466
422
|
};
|
|
467
|
-
export type SearchMatches = {
|
|
423
|
+
export declare type SearchMatches = {
|
|
468
424
|
confidence: number;
|
|
469
425
|
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
470
426
|
memory: Memory;
|
|
@@ -505,13 +461,13 @@ export declare type Memory = {
|
|
|
505
461
|
tags?: string[];
|
|
506
462
|
minTimeout?: number;
|
|
507
463
|
maxTimeout?: number;
|
|
508
|
-
|
|
464
|
+
contextVars?: {
|
|
509
465
|
[variable: string]: string;
|
|
510
466
|
};
|
|
511
|
-
|
|
467
|
+
contextVarsToSet?: {
|
|
512
468
|
[variable: string]: string;
|
|
513
469
|
};
|
|
514
|
-
|
|
470
|
+
contextVarsToMatch?: {
|
|
515
471
|
[variable: string]: string;
|
|
516
472
|
};
|
|
517
473
|
dcmOutcomeType?: string;
|
|
@@ -537,68 +493,118 @@ export declare type UnansweredQuestion = {
|
|
|
537
493
|
lastChangeName?: string;
|
|
538
494
|
lastChangeSessionID?: string;
|
|
539
495
|
suggestions?: SearchMatches[];
|
|
496
|
+
contextVars?: {
|
|
497
|
+
[variable: string]: string;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
export declare type OpenSession = {
|
|
501
|
+
memoriID: string;
|
|
502
|
+
password?: string;
|
|
503
|
+
recoveryTokens?: string[];
|
|
504
|
+
tag?: string;
|
|
505
|
+
pin?: string;
|
|
506
|
+
initialContextVars?: {
|
|
507
|
+
[key: string]: string;
|
|
508
|
+
};
|
|
509
|
+
initialQuestion?: string;
|
|
510
|
+
forceCloseSessions?: boolean;
|
|
511
|
+
birthDate?: string;
|
|
512
|
+
additionalInfo?: {
|
|
513
|
+
loginToken?: string;
|
|
514
|
+
language?: string;
|
|
515
|
+
referral?: string;
|
|
516
|
+
timeZoneOffset?: string;
|
|
517
|
+
[key: string]: string | undefined;
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
export declare type MemoriSession = {
|
|
521
|
+
sessionID: string;
|
|
522
|
+
currentState: DialogState;
|
|
523
|
+
gamificationPoints?: number;
|
|
524
|
+
undefinedWords?: string[];
|
|
525
|
+
lastUpdateTimestamp?: string;
|
|
526
|
+
};
|
|
527
|
+
export declare type Medium = {
|
|
528
|
+
mediumID: string;
|
|
529
|
+
url?: string;
|
|
530
|
+
content?: string;
|
|
531
|
+
mimeType: string;
|
|
532
|
+
title?: string;
|
|
533
|
+
properties?: {
|
|
534
|
+
[key: string]: string;
|
|
535
|
+
};
|
|
536
|
+
creationTimestamp?: string;
|
|
537
|
+
creationName?: string;
|
|
538
|
+
lastChangeTimestamp?: string;
|
|
539
|
+
lastChangeName?: string;
|
|
540
|
+
};
|
|
541
|
+
export declare type TranslatedHint = {
|
|
542
|
+
text: string;
|
|
543
|
+
originalText: string;
|
|
544
|
+
};
|
|
545
|
+
export declare type DialogState = {
|
|
546
|
+
state: string;
|
|
547
|
+
stateName: string;
|
|
548
|
+
previousState: string;
|
|
549
|
+
confidence?: number;
|
|
550
|
+
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
551
|
+
emission?: string;
|
|
552
|
+
continuationEmitted?: boolean;
|
|
553
|
+
emitter?: string;
|
|
554
|
+
completion?: boolean;
|
|
555
|
+
lastMatchedMemoryID?: string;
|
|
556
|
+
acceptsTimeout?: boolean;
|
|
557
|
+
acceptsAbort?: boolean;
|
|
558
|
+
acceptsMedia?: boolean;
|
|
559
|
+
acceptsDate?: boolean;
|
|
560
|
+
acceptsPlace?: boolean;
|
|
561
|
+
acceptsTag?: boolean;
|
|
562
|
+
acceptsFeedback?: boolean;
|
|
563
|
+
hints?: string[];
|
|
564
|
+
timeout?: number;
|
|
565
|
+
translatedHints?: TranslatedHint[];
|
|
566
|
+
currentTag?: string;
|
|
567
|
+
currentDate?: string;
|
|
568
|
+
currentPlaceName?: string;
|
|
569
|
+
currentLatitude?: number;
|
|
570
|
+
currentLongitude?: number;
|
|
571
|
+
currentUncertaintyKm?: number;
|
|
572
|
+
giverID?: string;
|
|
573
|
+
currentReceiverID?: string;
|
|
574
|
+
currentMemoryID?: string;
|
|
575
|
+
media?: Medium[];
|
|
576
|
+
knownTags?: {
|
|
577
|
+
[key: string]: string;
|
|
578
|
+
};
|
|
579
|
+
contextVars?: {
|
|
580
|
+
[key: string]: string;
|
|
581
|
+
};
|
|
540
582
|
};
|
|
541
583
|
export declare type Message = {
|
|
542
584
|
memoryID?: string;
|
|
543
585
|
text: string;
|
|
544
586
|
translatedText?: string;
|
|
545
|
-
questionAnswered?: string;
|
|
546
587
|
acceptsFeedback?: boolean;
|
|
547
588
|
generatedByAI?: boolean;
|
|
548
589
|
fromUser?: boolean;
|
|
549
590
|
media?: Medium[];
|
|
550
|
-
initial?: boolean;
|
|
551
591
|
emitter?: string;
|
|
592
|
+
initial?: boolean;
|
|
552
593
|
timestamp?: string;
|
|
553
594
|
contextVars?: {
|
|
554
595
|
[key: string]: string;
|
|
555
596
|
};
|
|
556
|
-
date?: string;
|
|
557
|
-
dateUncertaintyDays?: number;
|
|
558
|
-
placeName?: string;
|
|
559
|
-
placeLatitude?: number;
|
|
560
|
-
placeLongitude?: number;
|
|
561
|
-
placeUncertaintyKm?: number;
|
|
562
|
-
tag?: string;
|
|
563
|
-
memoryTags?: string[];
|
|
564
|
-
};
|
|
565
|
-
export type ConsumptionLog = {
|
|
566
|
-
consumptionLogID: string;
|
|
567
|
-
from: string;
|
|
568
|
-
to: string;
|
|
569
|
-
type: 'Daily' | 'Monthly';
|
|
570
|
-
userID?: string;
|
|
571
|
-
memoriID?: string;
|
|
572
|
-
totalSessions: number;
|
|
573
|
-
validSessions: number;
|
|
574
|
-
completions: number;
|
|
575
|
-
promptTokens: {
|
|
576
|
-
[key: string]: number;
|
|
577
|
-
};
|
|
578
|
-
completionTokens: {
|
|
579
|
-
[key: string]: number;
|
|
580
|
-
};
|
|
581
597
|
};
|
|
582
|
-
export type
|
|
583
|
-
notificationID: string;
|
|
584
|
-
timestamp: string;
|
|
585
|
-
severity: 'INFO' | 'WARN' | 'ALERT';
|
|
586
|
-
texts: {
|
|
587
|
-
'it-IT': string;
|
|
588
|
-
'en-US': string;
|
|
589
|
-
[lang: string]: string;
|
|
590
|
-
};
|
|
591
|
-
};
|
|
592
|
-
export type ChatMedium = {
|
|
598
|
+
export declare type ChatMedium = {
|
|
593
599
|
url?: string;
|
|
594
600
|
content?: string;
|
|
595
601
|
mimeType: string;
|
|
596
602
|
title?: string;
|
|
597
603
|
properties?: {
|
|
598
|
-
[key: string]:
|
|
604
|
+
[key: string]: string;
|
|
599
605
|
};
|
|
600
606
|
};
|
|
601
|
-
export type ChatLogLine = {
|
|
607
|
+
export declare type ChatLogLine = {
|
|
602
608
|
timestamp: string;
|
|
603
609
|
inbound: boolean;
|
|
604
610
|
text: string;
|
|
@@ -611,7 +617,7 @@ export type ChatLogLine = {
|
|
|
611
617
|
completion?: boolean;
|
|
612
618
|
acceptsFeedback?: boolean;
|
|
613
619
|
};
|
|
614
|
-
export type ChatLog = {
|
|
620
|
+
export declare type ChatLog = {
|
|
615
621
|
chatLogID: string;
|
|
616
622
|
timestamp: string;
|
|
617
623
|
memoriID: string;
|
|
@@ -620,14 +626,7 @@ export type ChatLog = {
|
|
|
620
626
|
boardOfExperts?: boolean;
|
|
621
627
|
lines: ChatLogLine[];
|
|
622
628
|
};
|
|
623
|
-
export type
|
|
624
|
-
pairID?: string;
|
|
625
|
-
text1: string;
|
|
626
|
-
text2: string;
|
|
627
|
-
correlated: boolean;
|
|
628
|
-
occurrences?: number;
|
|
629
|
-
};
|
|
630
|
-
export type Utterance = {
|
|
629
|
+
export declare type Utterance = {
|
|
631
630
|
utteranceID?: string;
|
|
632
631
|
text: string;
|
|
633
632
|
creationTimestamp?: string;
|
|
@@ -635,7 +634,7 @@ export type Utterance = {
|
|
|
635
634
|
lastChangeTimestamp?: string;
|
|
636
635
|
lastChangeSessionID?: string;
|
|
637
636
|
};
|
|
638
|
-
export type Intent = {
|
|
637
|
+
export declare type Intent = {
|
|
639
638
|
intentID?: string;
|
|
640
639
|
intentType?: 'Internal' | 'WebHook';
|
|
641
640
|
name: string;
|
|
@@ -648,7 +647,7 @@ export type Intent = {
|
|
|
648
647
|
lastChangeTimestamp?: string;
|
|
649
648
|
lastChangeSessionID?: string;
|
|
650
649
|
};
|
|
651
|
-
export type IntentSlot = {
|
|
650
|
+
export declare type IntentSlot = {
|
|
652
651
|
intentSlotID?: string;
|
|
653
652
|
name: string;
|
|
654
653
|
values?: string[];
|
|
@@ -659,7 +658,7 @@ export type IntentSlot = {
|
|
|
659
658
|
lastChangeTimestamp?: string;
|
|
660
659
|
lastChangeSessionID?: string;
|
|
661
660
|
};
|
|
662
|
-
export type FunctionParameter = {
|
|
661
|
+
export declare type FunctionParameter = {
|
|
663
662
|
parameterID?: string;
|
|
664
663
|
name: string;
|
|
665
664
|
description: string;
|
|
@@ -667,7 +666,7 @@ export type FunctionParameter = {
|
|
|
667
666
|
possibleValues?: string[];
|
|
668
667
|
required?: boolean;
|
|
669
668
|
};
|
|
670
|
-
export type Function = {
|
|
669
|
+
export declare type Function = {
|
|
671
670
|
functionID?: string;
|
|
672
671
|
functionType: 'Internal' | 'WebHook';
|
|
673
672
|
name: string;
|
|
@@ -680,15 +679,99 @@ export type Function = {
|
|
|
680
679
|
};
|
|
681
680
|
httpQueryStringTemplate?: string;
|
|
682
681
|
httpBodyTemplate?: string;
|
|
682
|
+
httpBodyContentType?: string;
|
|
683
|
+
sendExtensionHeaders?: string[];
|
|
683
684
|
};
|
|
684
|
-
export type
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
685
|
+
export declare type CorrelationPair = {
|
|
686
|
+
pairID?: string;
|
|
687
|
+
text1: string;
|
|
688
|
+
text2: string;
|
|
689
|
+
correlated: boolean;
|
|
690
|
+
occurrences?: number;
|
|
691
|
+
};
|
|
692
|
+
export declare type Person = {
|
|
693
|
+
personID?: string;
|
|
694
|
+
personType: 'Giver' | 'Receiver';
|
|
695
|
+
name?: string;
|
|
696
|
+
information?: string;
|
|
697
|
+
pin: string;
|
|
698
|
+
tag: string;
|
|
699
|
+
creationTimestamp?: string;
|
|
700
|
+
creationName?: string;
|
|
701
|
+
lastChangeTimestamp?: string;
|
|
702
|
+
lastChangeName?: string;
|
|
703
|
+
};
|
|
704
|
+
export declare type PersonificationProfile = {
|
|
705
|
+
tag?: string;
|
|
706
|
+
pin?: string;
|
|
707
|
+
name?: string;
|
|
708
|
+
sessionID?: string;
|
|
709
|
+
};
|
|
710
|
+
export interface Invitation {
|
|
711
|
+
invitationID?: string;
|
|
712
|
+
memoriID: string;
|
|
713
|
+
isInviter?: boolean;
|
|
714
|
+
isInvitee?: boolean;
|
|
715
|
+
text?: string;
|
|
716
|
+
destinationEMail: string;
|
|
717
|
+
destinationName: string;
|
|
718
|
+
tag: string;
|
|
719
|
+
pin: string;
|
|
720
|
+
type: string;
|
|
721
|
+
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
722
|
+
creationTimestamp?: string;
|
|
723
|
+
lastChangeTimestamp?: string;
|
|
724
|
+
}
|
|
725
|
+
export declare type Stats = {
|
|
726
|
+
totalReceivers: number;
|
|
727
|
+
receiversWithMemories: number;
|
|
728
|
+
totalMemories: number;
|
|
729
|
+
publicMemories: number;
|
|
730
|
+
memoriesWithMedia: number;
|
|
731
|
+
totalQuestions: number;
|
|
732
|
+
publicQuestions: number;
|
|
733
|
+
questionsWithMoreThanOneAnswer: number;
|
|
734
|
+
totalStories: number;
|
|
735
|
+
publicStories: number;
|
|
736
|
+
storiesWithDate: number;
|
|
737
|
+
storiesWithPlace: number;
|
|
738
|
+
storiesWithDateAndPlace: number;
|
|
739
|
+
unansweredQuestions: number;
|
|
740
|
+
successfulCorrelations: number;
|
|
741
|
+
failedCorrelations: number;
|
|
742
|
+
};
|
|
743
|
+
export declare type GamificationLevel = {
|
|
744
|
+
points: number;
|
|
745
|
+
badge: string;
|
|
746
|
+
pointsForCurrentBadge: number;
|
|
747
|
+
nextBadge?: {
|
|
748
|
+
points: number;
|
|
749
|
+
badge: string;
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
export declare type EventLog = {
|
|
753
|
+
eventLogID: string;
|
|
754
|
+
timestamp: string;
|
|
755
|
+
eventType: 'MemoriOpened' | 'MemoriClosed' | 'QuestionAnsweredCorrectly' | 'QuestionAnsweredIncorrectly' | 'QuestionNotAnswered' | 'IntentMatched';
|
|
756
|
+
memoriID: string;
|
|
757
|
+
sessionID: string;
|
|
758
|
+
maintenanceType?: 'None' | 'ConsumptionJob' | 'ChatLogExtractionJob' | 'ContentQualityJob';
|
|
759
|
+
userAgent?: string;
|
|
760
|
+
ipAddress?: string;
|
|
761
|
+
additionalInfo?: OpenSession['additionalInfo'];
|
|
762
|
+
memoryID?: string;
|
|
763
|
+
intentID?: string;
|
|
764
|
+
enteredText?: string;
|
|
765
|
+
receiverTag?: string;
|
|
766
|
+
};
|
|
767
|
+
export declare type UserLog = {
|
|
768
|
+
timestamp: string;
|
|
769
|
+
count: number;
|
|
770
|
+
};
|
|
771
|
+
export declare type UsersLog = {
|
|
772
|
+
timestamp: string;
|
|
773
|
+
countUsers: number;
|
|
774
|
+
countRecurrentUsers: number;
|
|
692
775
|
};
|
|
693
776
|
export interface CsvSpecs {
|
|
694
777
|
newLine: '\n' | '\r\n';
|
|
@@ -700,6 +783,12 @@ export interface CsvSpecs {
|
|
|
700
783
|
contextVarsToSetColumnName?: string;
|
|
701
784
|
csvSeparator?: string;
|
|
702
785
|
questionTitleVariantsSeparator?: string;
|
|
786
|
+
memoryTagsColumnName?: string;
|
|
787
|
+
}
|
|
788
|
+
export interface JSONLSpecs {
|
|
789
|
+
platform?: string;
|
|
790
|
+
includeInstructions?: boolean;
|
|
791
|
+
createdOrChangedAfter?: string;
|
|
703
792
|
}
|
|
704
793
|
export interface TxtSpecs {
|
|
705
794
|
granularity?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
@@ -707,10 +796,6 @@ export interface TxtSpecs {
|
|
|
707
796
|
sourceAttachmentTitle?: string;
|
|
708
797
|
questionsGenerationInstructions?: string;
|
|
709
798
|
}
|
|
710
|
-
export interface JSONLSpecs {
|
|
711
|
-
platform?: string;
|
|
712
|
-
includeInstructions?: boolean;
|
|
713
|
-
}
|
|
714
799
|
export interface ImportParams {
|
|
715
800
|
forceImport?: boolean;
|
|
716
801
|
csvSpecs?: CsvSpecs;
|
|
@@ -718,9 +803,22 @@ export interface ImportParams {
|
|
|
718
803
|
conclusive?: boolean;
|
|
719
804
|
notPickable?: boolean;
|
|
720
805
|
importName?: string;
|
|
806
|
+
notes?: string;
|
|
721
807
|
contextVarsToSet?: {
|
|
722
|
-
[
|
|
808
|
+
[variable: string]: string;
|
|
723
809
|
};
|
|
810
|
+
contextVarsToMatch?: {
|
|
811
|
+
[variable: string]: string;
|
|
812
|
+
};
|
|
813
|
+
receiverID?: string;
|
|
814
|
+
addMediaLink?: string;
|
|
815
|
+
linkTitleHandling?: 'FixedTitle' | 'HostName' | 'FetchFromUrl';
|
|
816
|
+
linkTitle?: string;
|
|
817
|
+
memoryTags?: string[];
|
|
818
|
+
}
|
|
819
|
+
export interface AnalysisParams {
|
|
820
|
+
query: string;
|
|
821
|
+
threshold?: number;
|
|
724
822
|
}
|
|
725
823
|
export interface ImportWarning {
|
|
726
824
|
warningType: 'Existing Similar Memory' | 'Internal Error';
|
|
@@ -731,14 +829,6 @@ export interface ImportWarning {
|
|
|
731
829
|
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
732
830
|
}[];
|
|
733
831
|
}
|
|
734
|
-
export interface AnalysisParams {
|
|
735
|
-
query: string;
|
|
736
|
-
threshold?: number;
|
|
737
|
-
}
|
|
738
|
-
export interface AnalysisWarning {
|
|
739
|
-
warningType: 'Error' | string;
|
|
740
|
-
text?: string;
|
|
741
|
-
}
|
|
742
832
|
export interface AnalysisWarning {
|
|
743
833
|
warningType: 'Error' | string;
|
|
744
834
|
text?: string;
|
|
@@ -796,6 +886,23 @@ export interface Badge {
|
|
|
796
886
|
issuerEmail?: string;
|
|
797
887
|
issuerURL?: string;
|
|
798
888
|
}
|
|
889
|
+
export interface ConsumptionItem {
|
|
890
|
+
key: string;
|
|
891
|
+
id: string;
|
|
892
|
+
promptTokens: number;
|
|
893
|
+
completionTokens: number;
|
|
894
|
+
totalTokens: number;
|
|
895
|
+
validSessions: number;
|
|
896
|
+
completions: number;
|
|
897
|
+
deepThoughtValidSessions: number;
|
|
898
|
+
deepThoughtCompletions: number;
|
|
899
|
+
importedSize: number;
|
|
900
|
+
nonChargeableCompletions?: number;
|
|
901
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
902
|
+
nonChargeableImportedSize?: number;
|
|
903
|
+
cost?: number;
|
|
904
|
+
children?: ConsumptionItem[];
|
|
905
|
+
}
|
|
799
906
|
export interface ExpertReference {
|
|
800
907
|
expertID: string;
|
|
801
908
|
name: string;
|
|
@@ -818,23 +925,27 @@ export interface KnownFact {
|
|
|
818
925
|
lastChangeTimestamp?: string;
|
|
819
926
|
lastChangeSessionID?: string;
|
|
820
927
|
}
|
|
821
|
-
export
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
928
|
+
export declare type ConsumptionData = {
|
|
929
|
+
id: string;
|
|
930
|
+
key: string;
|
|
931
|
+
promptTokens: number;
|
|
932
|
+
completionTokens: number;
|
|
933
|
+
totalTokens: number;
|
|
934
|
+
validSessions: number;
|
|
935
|
+
completions: number;
|
|
936
|
+
deepThoughtValidSessions: number;
|
|
937
|
+
deepThoughtCompletions: number;
|
|
938
|
+
importedSize: number;
|
|
939
|
+
nonChargeableCompletions: number;
|
|
940
|
+
nonChargeableDeepThoughtCompletions: number;
|
|
941
|
+
nonChargeableImportedSize: number;
|
|
942
|
+
children?: ConsumptionData[];
|
|
943
|
+
};
|
|
944
|
+
export declare type MacroFunction = {
|
|
834
945
|
name: string;
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
946
|
+
description: string;
|
|
947
|
+
macroParameters?: {
|
|
948
|
+
name: string;
|
|
949
|
+
description: string;
|
|
950
|
+
}[];
|
|
951
|
+
};
|