@memori.ai/memori-api-client 5.2.0 → 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 +14 -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 -270
- 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 -270
- 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 +545 -320
package/dist/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,173 +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
|
-
};
|
|
278
|
-
};
|
|
279
|
-
export declare type MemoriSession = {
|
|
280
|
-
sessionID: string;
|
|
281
|
-
currentState: DialogState;
|
|
282
|
-
stats?: Stats;
|
|
283
|
-
};
|
|
284
|
-
export declare type Medium = {
|
|
285
|
-
mediumID: string;
|
|
286
|
-
url?: string;
|
|
287
|
-
content?: string;
|
|
288
|
-
mimeType: string;
|
|
289
|
-
title?: string;
|
|
290
|
-
properties?: {
|
|
291
|
-
[key: string]: any;
|
|
292
|
-
};
|
|
293
|
-
creationTimestamp?: string;
|
|
294
|
-
creationName?: string;
|
|
295
|
-
lastChangeTimestamp?: string;
|
|
296
|
-
lastChangeName?: string;
|
|
297
|
-
};
|
|
298
|
-
export declare type Stats = {
|
|
299
|
-
totalReceivers: number;
|
|
300
|
-
receiversWithMemories: number;
|
|
301
|
-
totalMemories: number;
|
|
302
|
-
publicMemories: number;
|
|
303
|
-
memoriesWithMedia: number;
|
|
304
|
-
totalQuestions: number;
|
|
305
|
-
publicQuestions: number;
|
|
306
|
-
questionsWithMoreThanOneAnswer: number;
|
|
307
|
-
totalStories: number;
|
|
308
|
-
publicStories: number;
|
|
309
|
-
storiesWithDate: number;
|
|
310
|
-
storiesWithPlace: number;
|
|
311
|
-
storiesWithDateAndPlace: number;
|
|
312
|
-
unansweredQuestions: number;
|
|
313
|
-
successfulCorrelations: number;
|
|
314
|
-
failedCorrelations: number;
|
|
315
|
-
};
|
|
316
|
-
export declare type GamificationLevel = {
|
|
317
|
-
points: number;
|
|
318
|
-
badge: string;
|
|
319
|
-
pointsForCurrentBadge: number;
|
|
320
|
-
nextBadge?: {
|
|
321
|
-
points: number;
|
|
322
|
-
badge: string;
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
export declare type EventLog = {
|
|
326
|
-
eventLogID: string;
|
|
327
|
-
timestamp: string;
|
|
328
|
-
eventType: string;
|
|
329
|
-
memoriID: string;
|
|
330
|
-
userAgent?: string;
|
|
331
|
-
ipAddress?: string;
|
|
332
|
-
memoryID?: string;
|
|
333
|
-
intentID?: string;
|
|
334
|
-
enteredText?: string;
|
|
335
|
-
receiverTag?: string;
|
|
336
|
-
};
|
|
337
|
-
export declare type UserLog = {
|
|
338
|
-
timestamp: string;
|
|
339
|
-
count: number;
|
|
340
|
-
};
|
|
341
|
-
export declare type UsersLog = {
|
|
342
|
-
timestamp: string;
|
|
343
|
-
countUsers: number;
|
|
344
|
-
countRecurrentUsers: number;
|
|
345
|
-
};
|
|
346
|
-
export declare type TranslatedHint = {
|
|
347
|
-
text: string;
|
|
348
|
-
originalText: string;
|
|
349
|
-
};
|
|
350
|
-
export declare type DialogState = {
|
|
351
|
-
state: string;
|
|
352
|
-
stateName: string;
|
|
353
|
-
previousState: string;
|
|
354
|
-
confidence?: number;
|
|
355
|
-
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
356
|
-
emission?: string;
|
|
357
|
-
translatedEmission?: string;
|
|
358
|
-
emitter?: string;
|
|
359
|
-
completion?: boolean;
|
|
360
|
-
continuationEmitted?: boolean;
|
|
361
|
-
lastMatchedMemoryID?: string;
|
|
362
|
-
acceptsTimeout?: boolean;
|
|
363
|
-
acceptsAbort?: boolean;
|
|
364
|
-
acceptsMedia?: boolean;
|
|
365
|
-
acceptsDate?: boolean;
|
|
366
|
-
acceptsPlace?: boolean;
|
|
367
|
-
acceptsTag?: boolean;
|
|
368
|
-
acceptsFeedback?: boolean;
|
|
369
|
-
hints?: string[];
|
|
370
|
-
timeout?: number;
|
|
371
|
-
translatedHints?: TranslatedHint[];
|
|
372
|
-
currentTag?: string;
|
|
373
|
-
currentDate?: string;
|
|
374
|
-
currentPlaceName?: string;
|
|
375
|
-
currentLatitude?: number;
|
|
376
|
-
currentLongitude?: number;
|
|
377
|
-
currentUncertaintyKm?: number;
|
|
378
|
-
giverID?: string;
|
|
379
|
-
currentReceiverID?: string;
|
|
380
|
-
currentMemoryID?: string;
|
|
381
|
-
media?: Medium[];
|
|
382
|
-
knownTags?: {
|
|
383
|
-
[key: string]: string;
|
|
384
|
-
};
|
|
385
|
-
contextVars?: {
|
|
386
|
-
[key: string]: string;
|
|
387
|
-
};
|
|
388
|
-
memoryTags?: string[];
|
|
389
|
-
};
|
|
390
|
-
export declare type Person = {
|
|
391
|
-
personID?: string;
|
|
392
|
-
personType: 'Giver' | 'Receiver';
|
|
393
|
-
name?: string;
|
|
394
|
-
information?: string;
|
|
395
|
-
pin: string;
|
|
396
|
-
tag: string;
|
|
397
|
-
creationTimestamp?: string;
|
|
398
|
-
creationName?: string;
|
|
399
|
-
lastChangeTimestamp?: string;
|
|
400
|
-
lastChangeName?: string;
|
|
401
|
-
};
|
|
402
|
-
export declare type PersonificationProfile = {
|
|
403
|
-
tag?: string;
|
|
404
|
-
pin?: string;
|
|
405
|
-
name?: string;
|
|
406
|
-
sessionID: string;
|
|
407
|
-
};
|
|
408
|
-
export declare type Invitation = {
|
|
409
|
-
invitationID?: string;
|
|
410
|
-
memoriID: string;
|
|
411
|
-
isInviter?: boolean;
|
|
412
|
-
isInvitee?: boolean;
|
|
413
|
-
text?: string;
|
|
414
|
-
destinationEMail: string;
|
|
415
|
-
destinationName: string;
|
|
416
|
-
tag: string;
|
|
417
|
-
pin: string;
|
|
418
|
-
type: string;
|
|
419
|
-
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
420
|
-
creationTimestamp?: string;
|
|
421
|
-
lastChangeTimestamp?: string;
|
|
422
|
-
};
|
|
423
331
|
export declare type LocalizationKeyContent = {
|
|
424
332
|
key: string;
|
|
425
333
|
value: string;
|
|
@@ -441,7 +349,55 @@ export declare type Asset = {
|
|
|
441
349
|
creationTimestamp: string;
|
|
442
350
|
lastChangeTimestamp: string;
|
|
443
351
|
};
|
|
444
|
-
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 = {
|
|
445
401
|
text?: string;
|
|
446
402
|
searchType?: 'Literal' | 'Semantic';
|
|
447
403
|
date?: string;
|
|
@@ -453,7 +409,6 @@ export type SearchQuery = {
|
|
|
453
409
|
tag?: string;
|
|
454
410
|
ignoreLastRead?: boolean;
|
|
455
411
|
excludedMemoryIDs?: string[];
|
|
456
|
-
startFrom?: number;
|
|
457
412
|
numberOfResults?: number;
|
|
458
413
|
contextVars?: {
|
|
459
414
|
[variable: string]: string;
|
|
@@ -462,8 +417,10 @@ export type SearchQuery = {
|
|
|
462
417
|
[variable: string]: string;
|
|
463
418
|
};
|
|
464
419
|
memoryTags?: string[];
|
|
420
|
+
withMediaOnly?: boolean;
|
|
421
|
+
memoryType?: 'Question' | 'Story' | 'Default' | 'CompletionDraft' | 'CompletionPlaceholder' | 'ExpertReference';
|
|
465
422
|
};
|
|
466
|
-
export type SearchMatches = {
|
|
423
|
+
export declare type SearchMatches = {
|
|
467
424
|
confidence: number;
|
|
468
425
|
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
469
426
|
memory: Memory;
|
|
@@ -504,13 +461,13 @@ export declare type Memory = {
|
|
|
504
461
|
tags?: string[];
|
|
505
462
|
minTimeout?: number;
|
|
506
463
|
maxTimeout?: number;
|
|
507
|
-
|
|
464
|
+
contextVars?: {
|
|
508
465
|
[variable: string]: string;
|
|
509
466
|
};
|
|
510
|
-
|
|
467
|
+
contextVarsToSet?: {
|
|
511
468
|
[variable: string]: string;
|
|
512
469
|
};
|
|
513
|
-
|
|
470
|
+
contextVarsToMatch?: {
|
|
514
471
|
[variable: string]: string;
|
|
515
472
|
};
|
|
516
473
|
dcmOutcomeType?: string;
|
|
@@ -536,68 +493,118 @@ export declare type UnansweredQuestion = {
|
|
|
536
493
|
lastChangeName?: string;
|
|
537
494
|
lastChangeSessionID?: string;
|
|
538
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
|
+
};
|
|
539
582
|
};
|
|
540
583
|
export declare type Message = {
|
|
541
584
|
memoryID?: string;
|
|
542
585
|
text: string;
|
|
543
586
|
translatedText?: string;
|
|
544
|
-
questionAnswered?: string;
|
|
545
587
|
acceptsFeedback?: boolean;
|
|
546
588
|
generatedByAI?: boolean;
|
|
547
589
|
fromUser?: boolean;
|
|
548
590
|
media?: Medium[];
|
|
549
|
-
initial?: boolean;
|
|
550
591
|
emitter?: string;
|
|
592
|
+
initial?: boolean;
|
|
551
593
|
timestamp?: string;
|
|
552
594
|
contextVars?: {
|
|
553
595
|
[key: string]: string;
|
|
554
596
|
};
|
|
555
|
-
date?: string;
|
|
556
|
-
dateUncertaintyDays?: number;
|
|
557
|
-
placeName?: string;
|
|
558
|
-
placeLatitude?: number;
|
|
559
|
-
placeLongitude?: number;
|
|
560
|
-
placeUncertaintyKm?: number;
|
|
561
|
-
tag?: string;
|
|
562
|
-
memoryTags?: string[];
|
|
563
|
-
};
|
|
564
|
-
export type ConsumptionLog = {
|
|
565
|
-
consumptionLogID: string;
|
|
566
|
-
from: string;
|
|
567
|
-
to: string;
|
|
568
|
-
type: 'Daily' | 'Monthly';
|
|
569
|
-
userID?: string;
|
|
570
|
-
memoriID?: string;
|
|
571
|
-
totalSessions: number;
|
|
572
|
-
validSessions: number;
|
|
573
|
-
completions: number;
|
|
574
|
-
promptTokens: {
|
|
575
|
-
[key: string]: number;
|
|
576
|
-
};
|
|
577
|
-
completionTokens: {
|
|
578
|
-
[key: string]: number;
|
|
579
|
-
};
|
|
580
|
-
};
|
|
581
|
-
export type Notification = {
|
|
582
|
-
notificationID: string;
|
|
583
|
-
timestamp: string;
|
|
584
|
-
severity: 'INFO' | 'WARN' | 'ALERT';
|
|
585
|
-
texts: {
|
|
586
|
-
'it-IT': string;
|
|
587
|
-
'en-US': string;
|
|
588
|
-
[lang: string]: string;
|
|
589
|
-
};
|
|
590
597
|
};
|
|
591
|
-
export type ChatMedium = {
|
|
598
|
+
export declare type ChatMedium = {
|
|
592
599
|
url?: string;
|
|
593
600
|
content?: string;
|
|
594
601
|
mimeType: string;
|
|
595
602
|
title?: string;
|
|
596
603
|
properties?: {
|
|
597
|
-
[key: string]:
|
|
604
|
+
[key: string]: string;
|
|
598
605
|
};
|
|
599
606
|
};
|
|
600
|
-
export type ChatLogLine = {
|
|
607
|
+
export declare type ChatLogLine = {
|
|
601
608
|
timestamp: string;
|
|
602
609
|
inbound: boolean;
|
|
603
610
|
text: string;
|
|
@@ -610,7 +617,7 @@ export type ChatLogLine = {
|
|
|
610
617
|
completion?: boolean;
|
|
611
618
|
acceptsFeedback?: boolean;
|
|
612
619
|
};
|
|
613
|
-
export type ChatLog = {
|
|
620
|
+
export declare type ChatLog = {
|
|
614
621
|
chatLogID: string;
|
|
615
622
|
timestamp: string;
|
|
616
623
|
memoriID: string;
|
|
@@ -619,14 +626,7 @@ export type ChatLog = {
|
|
|
619
626
|
boardOfExperts?: boolean;
|
|
620
627
|
lines: ChatLogLine[];
|
|
621
628
|
};
|
|
622
|
-
export type
|
|
623
|
-
pairID?: string;
|
|
624
|
-
text1: string;
|
|
625
|
-
text2: string;
|
|
626
|
-
correlated: boolean;
|
|
627
|
-
occurrences?: number;
|
|
628
|
-
};
|
|
629
|
-
export type Utterance = {
|
|
629
|
+
export declare type Utterance = {
|
|
630
630
|
utteranceID?: string;
|
|
631
631
|
text: string;
|
|
632
632
|
creationTimestamp?: string;
|
|
@@ -634,7 +634,7 @@ export type Utterance = {
|
|
|
634
634
|
lastChangeTimestamp?: string;
|
|
635
635
|
lastChangeSessionID?: string;
|
|
636
636
|
};
|
|
637
|
-
export type Intent = {
|
|
637
|
+
export declare type Intent = {
|
|
638
638
|
intentID?: string;
|
|
639
639
|
intentType?: 'Internal' | 'WebHook';
|
|
640
640
|
name: string;
|
|
@@ -647,7 +647,7 @@ export type Intent = {
|
|
|
647
647
|
lastChangeTimestamp?: string;
|
|
648
648
|
lastChangeSessionID?: string;
|
|
649
649
|
};
|
|
650
|
-
export type IntentSlot = {
|
|
650
|
+
export declare type IntentSlot = {
|
|
651
651
|
intentSlotID?: string;
|
|
652
652
|
name: string;
|
|
653
653
|
values?: string[];
|
|
@@ -658,7 +658,7 @@ export type IntentSlot = {
|
|
|
658
658
|
lastChangeTimestamp?: string;
|
|
659
659
|
lastChangeSessionID?: string;
|
|
660
660
|
};
|
|
661
|
-
export type FunctionParameter = {
|
|
661
|
+
export declare type FunctionParameter = {
|
|
662
662
|
parameterID?: string;
|
|
663
663
|
name: string;
|
|
664
664
|
description: string;
|
|
@@ -666,7 +666,7 @@ export type FunctionParameter = {
|
|
|
666
666
|
possibleValues?: string[];
|
|
667
667
|
required?: boolean;
|
|
668
668
|
};
|
|
669
|
-
export type Function = {
|
|
669
|
+
export declare type Function = {
|
|
670
670
|
functionID?: string;
|
|
671
671
|
functionType: 'Internal' | 'WebHook';
|
|
672
672
|
name: string;
|
|
@@ -679,15 +679,99 @@ export type Function = {
|
|
|
679
679
|
};
|
|
680
680
|
httpQueryStringTemplate?: string;
|
|
681
681
|
httpBodyTemplate?: string;
|
|
682
|
+
httpBodyContentType?: string;
|
|
683
|
+
sendExtensionHeaders?: string[];
|
|
682
684
|
};
|
|
683
|
-
export type
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
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;
|
|
691
775
|
};
|
|
692
776
|
export interface CsvSpecs {
|
|
693
777
|
newLine: '\n' | '\r\n';
|
|
@@ -699,6 +783,12 @@ export interface CsvSpecs {
|
|
|
699
783
|
contextVarsToSetColumnName?: string;
|
|
700
784
|
csvSeparator?: string;
|
|
701
785
|
questionTitleVariantsSeparator?: string;
|
|
786
|
+
memoryTagsColumnName?: string;
|
|
787
|
+
}
|
|
788
|
+
export interface JSONLSpecs {
|
|
789
|
+
platform?: string;
|
|
790
|
+
includeInstructions?: boolean;
|
|
791
|
+
createdOrChangedAfter?: string;
|
|
702
792
|
}
|
|
703
793
|
export interface TxtSpecs {
|
|
704
794
|
granularity?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
@@ -706,10 +796,6 @@ export interface TxtSpecs {
|
|
|
706
796
|
sourceAttachmentTitle?: string;
|
|
707
797
|
questionsGenerationInstructions?: string;
|
|
708
798
|
}
|
|
709
|
-
export interface JSONLSpecs {
|
|
710
|
-
platform?: string;
|
|
711
|
-
includeInstructions?: boolean;
|
|
712
|
-
}
|
|
713
799
|
export interface ImportParams {
|
|
714
800
|
forceImport?: boolean;
|
|
715
801
|
csvSpecs?: CsvSpecs;
|
|
@@ -717,9 +803,22 @@ export interface ImportParams {
|
|
|
717
803
|
conclusive?: boolean;
|
|
718
804
|
notPickable?: boolean;
|
|
719
805
|
importName?: string;
|
|
806
|
+
notes?: string;
|
|
720
807
|
contextVarsToSet?: {
|
|
721
|
-
[
|
|
808
|
+
[variable: string]: string;
|
|
722
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;
|
|
723
822
|
}
|
|
724
823
|
export interface ImportWarning {
|
|
725
824
|
warningType: 'Existing Similar Memory' | 'Internal Error';
|
|
@@ -730,14 +829,6 @@ export interface ImportWarning {
|
|
|
730
829
|
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
731
830
|
}[];
|
|
732
831
|
}
|
|
733
|
-
export interface AnalysisParams {
|
|
734
|
-
query: string;
|
|
735
|
-
threshold?: number;
|
|
736
|
-
}
|
|
737
|
-
export interface AnalysisWarning {
|
|
738
|
-
warningType: 'Error' | string;
|
|
739
|
-
text?: string;
|
|
740
|
-
}
|
|
741
832
|
export interface AnalysisWarning {
|
|
742
833
|
warningType: 'Error' | string;
|
|
743
834
|
text?: string;
|
|
@@ -795,6 +886,23 @@ export interface Badge {
|
|
|
795
886
|
issuerEmail?: string;
|
|
796
887
|
issuerURL?: string;
|
|
797
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
|
+
}
|
|
798
906
|
export interface ExpertReference {
|
|
799
907
|
expertID: string;
|
|
800
908
|
name: string;
|
|
@@ -817,23 +925,27 @@ export interface KnownFact {
|
|
|
817
925
|
lastChangeTimestamp?: string;
|
|
818
926
|
lastChangeSessionID?: string;
|
|
819
927
|
}
|
|
820
|
-
export
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
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 = {
|
|
833
945
|
name: string;
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}
|
|
946
|
+
description: string;
|
|
947
|
+
macroParameters?: {
|
|
948
|
+
name: string;
|
|
949
|
+
description: string;
|
|
950
|
+
}[];
|
|
951
|
+
};
|