@memori.ai/memori-api-client 5.2.1 → 5.3.1
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/badge.d.ts +11 -0
- package/dist/backend/badge.js +16 -0
- package/dist/backend/badge.js.map +1 -0
- package/dist/backend/badge.test.d.ts +1 -0
- package/dist/backend/badge.test.js +14 -0
- package/dist/backend/badge.test.js.map +1 -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 +24 -0
- package/dist/backend.js +3 -0
- package/dist/backend.js.map +1 -1
- 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 +42 -2
- package/dist/types.d.ts +382 -271
- package/esm/backend/badge.d.ts +11 -0
- package/esm/backend/badge.js +14 -0
- package/esm/backend/badge.js.map +1 -0
- package/esm/backend/badge.test.d.ts +1 -0
- package/esm/backend/badge.test.js +11 -0
- package/esm/backend/badge.test.js.map +1 -0
- 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 +24 -0
- package/esm/backend.js +3 -0
- package/esm/backend.js.map +1 -1
- 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 +42 -2
- package/esm/types.d.ts +382 -271
- package/package.json +1 -1
- package/src/backend/badge.test.ts +19 -0
- package/src/backend/badge.ts +36 -0
- package/src/backend/user.ts +20 -1
- package/src/backend.ts +3 -0
- 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/src/types.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare type Error = {
|
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export declare type ResponseSpec = {
|
|
7
|
+
count?: number;
|
|
7
8
|
requestID: string;
|
|
8
9
|
requestDateTime: string;
|
|
9
10
|
resultCode: number;
|
|
@@ -65,9 +66,13 @@ export declare type Memori = {
|
|
|
65
66
|
disableR4Loop?: boolean;
|
|
66
67
|
disableR5Loop?: boolean;
|
|
67
68
|
ageRestriction?: number;
|
|
69
|
+
confidenceOffset?: number;
|
|
68
70
|
nsfw?: boolean;
|
|
69
71
|
enableCompletions?: boolean;
|
|
70
72
|
completionDescription?: string;
|
|
73
|
+
enableDeepThought?: boolean;
|
|
74
|
+
enableBoardOfExperts?: boolean;
|
|
75
|
+
disableCompletionMediaExtraction?: boolean;
|
|
71
76
|
completionConfigNameForQuestionAnswering?: string;
|
|
72
77
|
completionConfigForQuestionAnswering?: CompletionConfig;
|
|
73
78
|
completionConfigNameForImportExport?: string;
|
|
@@ -76,9 +81,6 @@ export declare type Memori = {
|
|
|
76
81
|
completionConfigForDeepThought?: CompletionConfig;
|
|
77
82
|
completionTemperature?: number;
|
|
78
83
|
completionMaxTokens?: number;
|
|
79
|
-
enableDeepThought?: boolean;
|
|
80
|
-
enableBoardOfExperts?: boolean;
|
|
81
|
-
disableCompletionMediaExtraction?: boolean;
|
|
82
84
|
chainingMemoriID?: string;
|
|
83
85
|
chainingBaseURL?: string;
|
|
84
86
|
chainingPassword?: string;
|
|
@@ -109,13 +111,16 @@ export declare type Memori = {
|
|
|
109
111
|
sentInvitations?: Invitation[];
|
|
110
112
|
receivedInvitations?: Invitation[];
|
|
111
113
|
categories?: string[];
|
|
114
|
+
enableMacroFunctions?: string[];
|
|
115
|
+
macroParameters?: { [key: string]: any };
|
|
112
116
|
ownerUserName?: string;
|
|
113
117
|
gamificationLevel?: GamificationLevel;
|
|
114
118
|
contentQualityIndex?: number;
|
|
115
119
|
contentQualityIndexTimestamp?: string;
|
|
120
|
+
alwaysAnswerWithCompletion?: boolean;
|
|
116
121
|
};
|
|
117
122
|
|
|
118
|
-
export type CompletionConfig = {
|
|
123
|
+
export declare type CompletionConfig = {
|
|
119
124
|
/**
|
|
120
125
|
* @type {string}
|
|
121
126
|
* Completion Config object ID.
|
|
@@ -139,7 +144,12 @@ export type CompletionConfig = {
|
|
|
139
144
|
* - Mistral
|
|
140
145
|
* - Azure_OpenAI
|
|
141
146
|
*/
|
|
142
|
-
provider:
|
|
147
|
+
provider:
|
|
148
|
+
| 'OpenAI'
|
|
149
|
+
| 'Anthropic'
|
|
150
|
+
| 'Mistral'
|
|
151
|
+
| 'Azure_OpenAI'
|
|
152
|
+
| 'AWS_Anthropic';
|
|
143
153
|
/**
|
|
144
154
|
* @type {string=}
|
|
145
155
|
* URL of the Completion Provider API end-point. If not specified, the default end-point for the provider is used.
|
|
@@ -200,8 +210,51 @@ export type CompletionConfig = {
|
|
|
200
210
|
* If not specified False is assumed.
|
|
201
211
|
*/
|
|
202
212
|
visibleToOtherUsers?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* @type {boolean=}
|
|
215
|
+
* If True this configuration is used as the default (for the operations it is enabled for) when a new Memori is created.
|
|
216
|
+
* The use as default requires that the configuration is visible at least to the owner's Tenant users.
|
|
217
|
+
*/
|
|
218
|
+
useAsDefault?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* @type {boolean=}
|
|
221
|
+
* If True the use of this configuration is chargeable to the customer.
|
|
222
|
+
*/
|
|
223
|
+
chargeable?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @type {string=}
|
|
226
|
+
* Region of the AWS Anthropic model.
|
|
227
|
+
*/
|
|
228
|
+
region?: string;
|
|
229
|
+
/**
|
|
230
|
+
* @type {string=}
|
|
231
|
+
* Model ID of the AWS Anthropic model.
|
|
232
|
+
*/
|
|
233
|
+
modelId?: string;
|
|
234
|
+
/**
|
|
235
|
+
* @type {string=}
|
|
236
|
+
* Access Key ID of the AWS Anthropic model.
|
|
237
|
+
*/
|
|
238
|
+
accessKeyId?: string;
|
|
239
|
+
/**
|
|
240
|
+
* @type {string=}
|
|
241
|
+
* Secret Access Key of the AWS Anthropic model.
|
|
242
|
+
*/
|
|
243
|
+
secretAccessKey?: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @type {string=}
|
|
247
|
+
* If True this configuration is applied to all Memori of the Tenant.
|
|
248
|
+
*/
|
|
249
|
+
applyTo?: ApplyToOption;
|
|
203
250
|
};
|
|
204
251
|
|
|
252
|
+
export declare type ApplyToOption =
|
|
253
|
+
| 'ALL_TENANT_MEMORI_ONLY_QA_PURPOSE'
|
|
254
|
+
| 'ALL_TENANT_MEMORI_ONLY_IE_PURPOSE'
|
|
255
|
+
| 'ALL_TENANT_MEMORI_ONLY_DT_PURPOSE'
|
|
256
|
+
| 'ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES';
|
|
257
|
+
|
|
205
258
|
export declare type Venue = {
|
|
206
259
|
placeName: string;
|
|
207
260
|
latitude: number;
|
|
@@ -209,6 +262,31 @@ export declare type Venue = {
|
|
|
209
262
|
uncertainty?: number;
|
|
210
263
|
};
|
|
211
264
|
|
|
265
|
+
export declare type NominatimItem = {
|
|
266
|
+
place_id: number;
|
|
267
|
+
lat: number;
|
|
268
|
+
lon: number;
|
|
269
|
+
display_name: string;
|
|
270
|
+
type: string;
|
|
271
|
+
category: string;
|
|
272
|
+
importance: number;
|
|
273
|
+
place_rank: number;
|
|
274
|
+
address?: {
|
|
275
|
+
house_number?: string;
|
|
276
|
+
road?: string;
|
|
277
|
+
hamlet?: string;
|
|
278
|
+
village?: string;
|
|
279
|
+
suburb?: string;
|
|
280
|
+
town?: string;
|
|
281
|
+
city?: string;
|
|
282
|
+
municipality?: string;
|
|
283
|
+
county?: string;
|
|
284
|
+
state?: string;
|
|
285
|
+
country: string;
|
|
286
|
+
};
|
|
287
|
+
boundingbox: [number, number, number, number];
|
|
288
|
+
};
|
|
289
|
+
|
|
212
290
|
export declare type NotificationPrefs = {
|
|
213
291
|
/**
|
|
214
292
|
* @type {string='None'}
|
|
@@ -281,6 +359,56 @@ export declare type User = {
|
|
|
281
359
|
avatar3DURLType?: string;
|
|
282
360
|
};
|
|
283
361
|
|
|
362
|
+
export declare type UserFilters = {
|
|
363
|
+
periodFrom?: string | undefined; //
|
|
364
|
+
periodTo?: string | undefined; //
|
|
365
|
+
tenantName?: string | undefined; //
|
|
366
|
+
text?: string | undefined; //
|
|
367
|
+
numberOfResults: number; //
|
|
368
|
+
startFrom: number; //
|
|
369
|
+
orderBy?: OrderBy | undefined; //
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
export declare type OrderBy =
|
|
373
|
+
| 'CreationDateAscending'
|
|
374
|
+
| 'CreationDateDescending'
|
|
375
|
+
| 'MemoriCountAscending'
|
|
376
|
+
| 'MemoriCountDescending'
|
|
377
|
+
| 'MonthCompletionsAscending'
|
|
378
|
+
| 'MonthCompletionsDescending'
|
|
379
|
+
| 'MonthImportSizeAscending'
|
|
380
|
+
| 'MonthImportSizeDescending';
|
|
381
|
+
|
|
382
|
+
export declare type MemoriUser = {
|
|
383
|
+
userID: string;
|
|
384
|
+
email: string;
|
|
385
|
+
userName: string;
|
|
386
|
+
tenantName: string;
|
|
387
|
+
disableDeepThought: boolean;
|
|
388
|
+
|
|
389
|
+
creationTimestamp: string;
|
|
390
|
+
creationSessionID: string;
|
|
391
|
+
lastChangeTimestamp: string;
|
|
392
|
+
lastChangeSessionID: string;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
export declare type Topic = {
|
|
396
|
+
topicID: string;
|
|
397
|
+
/**
|
|
398
|
+
* Topic name.
|
|
399
|
+
*/
|
|
400
|
+
name: string;
|
|
401
|
+
/**
|
|
402
|
+
* Topic weight, i.e. the ratio between the number of times this topic has been referenced versus to total number of references.
|
|
403
|
+
*/
|
|
404
|
+
weight: number;
|
|
405
|
+
|
|
406
|
+
creationTimestamp: string;
|
|
407
|
+
creationSessionID: string;
|
|
408
|
+
lastChangeTimestamp: string;
|
|
409
|
+
lastChangeSessionID: string;
|
|
410
|
+
};
|
|
411
|
+
|
|
284
412
|
export declare type IntegrationResource = {
|
|
285
413
|
name: string;
|
|
286
414
|
url: string;
|
|
@@ -352,13 +480,14 @@ export interface UploadFile<T = any> {
|
|
|
352
480
|
preview?: string;
|
|
353
481
|
}
|
|
354
482
|
|
|
355
|
-
export type TenantConfig = {
|
|
483
|
+
export declare type TenantConfig = {
|
|
356
484
|
name: string;
|
|
357
485
|
showNewUser: boolean;
|
|
358
486
|
requirePosition: boolean;
|
|
487
|
+
showVirtualSpaces?: boolean;
|
|
359
488
|
};
|
|
360
489
|
|
|
361
|
-
export type TenantBase = {
|
|
490
|
+
export declare type TenantBase = {
|
|
362
491
|
tenantID?: string;
|
|
363
492
|
name?: string;
|
|
364
493
|
description?: string;
|
|
@@ -397,197 +526,12 @@ export type TenantBase = {
|
|
|
397
526
|
lastChangeTimestamp?: string;
|
|
398
527
|
};
|
|
399
528
|
|
|
400
|
-
export type Tenant = TenantBase & {
|
|
529
|
+
export declare type Tenant = TenantBase & {
|
|
401
530
|
id: string;
|
|
402
531
|
theme: string;
|
|
403
532
|
config: TenantConfig;
|
|
404
533
|
};
|
|
405
534
|
|
|
406
|
-
export declare type OpenSession = {
|
|
407
|
-
memoriID: string;
|
|
408
|
-
password?: string;
|
|
409
|
-
recoveryTokens?: string[];
|
|
410
|
-
tag?: string;
|
|
411
|
-
pin?: string;
|
|
412
|
-
initialContextVars?: { [key: string]: string };
|
|
413
|
-
initialQuestion?: string;
|
|
414
|
-
forceCloseSessions?: boolean;
|
|
415
|
-
birthDate?: string;
|
|
416
|
-
additionalInfo?: {
|
|
417
|
-
/**
|
|
418
|
-
* a valid Memori.AI login token for the user, from which information like
|
|
419
|
-
* the user's unique ID, their birth date and e-mail are retrieved
|
|
420
|
-
* (for age verification and DCM integration purposes)
|
|
421
|
-
*/
|
|
422
|
-
loginToken?: string;
|
|
423
|
-
/**
|
|
424
|
-
* the language ISO code used to open the session
|
|
425
|
-
* (may be different from the Memori language if a translation layer is in place)
|
|
426
|
-
*/
|
|
427
|
-
language?: string;
|
|
428
|
-
/**
|
|
429
|
-
* the referral URL, as reported by the hosting web application
|
|
430
|
-
*/
|
|
431
|
-
referral?: string;
|
|
432
|
-
/**
|
|
433
|
-
* the offset in minutes of the UTC time zone from the user's local time zone.
|
|
434
|
-
* Note: the offset is subtracted from UTC to obtain the user's local time, not added.
|
|
435
|
-
* E.g.: it should be -120 for CEST, not +120.
|
|
436
|
-
*/
|
|
437
|
-
timeZoneOffset?: string;
|
|
438
|
-
};
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
export declare type MemoriSession = {
|
|
442
|
-
sessionID: string;
|
|
443
|
-
currentState: DialogState;
|
|
444
|
-
stats?: Stats;
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
export declare type Medium = {
|
|
448
|
-
mediumID: string;
|
|
449
|
-
url?: string;
|
|
450
|
-
content?: string;
|
|
451
|
-
mimeType: string;
|
|
452
|
-
title?: string;
|
|
453
|
-
properties?: { [key: string]: any };
|
|
454
|
-
creationTimestamp?: string;
|
|
455
|
-
creationName?: string;
|
|
456
|
-
lastChangeTimestamp?: string;
|
|
457
|
-
lastChangeName?: string;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
export declare type Stats = {
|
|
461
|
-
totalReceivers: number;
|
|
462
|
-
receiversWithMemories: number;
|
|
463
|
-
totalMemories: number;
|
|
464
|
-
publicMemories: number;
|
|
465
|
-
memoriesWithMedia: number;
|
|
466
|
-
totalQuestions: number;
|
|
467
|
-
publicQuestions: number;
|
|
468
|
-
questionsWithMoreThanOneAnswer: number;
|
|
469
|
-
totalStories: number;
|
|
470
|
-
publicStories: number;
|
|
471
|
-
storiesWithDate: number;
|
|
472
|
-
storiesWithPlace: number;
|
|
473
|
-
storiesWithDateAndPlace: number;
|
|
474
|
-
unansweredQuestions: number;
|
|
475
|
-
successfulCorrelations: number;
|
|
476
|
-
failedCorrelations: number;
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
export declare type GamificationLevel = {
|
|
480
|
-
points: number;
|
|
481
|
-
badge: string;
|
|
482
|
-
pointsForCurrentBadge: number;
|
|
483
|
-
nextBadge?: {
|
|
484
|
-
points: number;
|
|
485
|
-
badge: string;
|
|
486
|
-
};
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
export declare type EventLog = {
|
|
490
|
-
eventLogID: string;
|
|
491
|
-
timestamp: string;
|
|
492
|
-
eventType: string;
|
|
493
|
-
memoriID: string;
|
|
494
|
-
userAgent?: string;
|
|
495
|
-
ipAddress?: string;
|
|
496
|
-
memoryID?: string;
|
|
497
|
-
intentID?: string;
|
|
498
|
-
enteredText?: string;
|
|
499
|
-
receiverTag?: string;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
export declare type UserLog = {
|
|
503
|
-
timestamp: string;
|
|
504
|
-
count: number;
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
export declare type UsersLog = {
|
|
508
|
-
timestamp: string;
|
|
509
|
-
countUsers: number;
|
|
510
|
-
countRecurrentUsers: number;
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
export declare type TranslatedHint = {
|
|
514
|
-
text: string;
|
|
515
|
-
originalText: string;
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export declare type DialogState = {
|
|
519
|
-
state: string;
|
|
520
|
-
stateName: string;
|
|
521
|
-
previousState: string;
|
|
522
|
-
confidence?: number;
|
|
523
|
-
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
524
|
-
emission?: string;
|
|
525
|
-
translatedEmission?: string;
|
|
526
|
-
emitter?: string;
|
|
527
|
-
completion?: boolean;
|
|
528
|
-
continuationEmitted?: boolean;
|
|
529
|
-
lastMatchedMemoryID?: string;
|
|
530
|
-
acceptsTimeout?: boolean;
|
|
531
|
-
acceptsAbort?: boolean;
|
|
532
|
-
acceptsMedia?: boolean;
|
|
533
|
-
acceptsDate?: boolean;
|
|
534
|
-
acceptsPlace?: boolean;
|
|
535
|
-
acceptsTag?: boolean;
|
|
536
|
-
acceptsFeedback?: boolean;
|
|
537
|
-
hints?: string[];
|
|
538
|
-
timeout?: number;
|
|
539
|
-
translatedHints?: TranslatedHint[];
|
|
540
|
-
currentTag?: string;
|
|
541
|
-
currentDate?: string;
|
|
542
|
-
currentPlaceName?: string;
|
|
543
|
-
currentLatitude?: number;
|
|
544
|
-
currentLongitude?: number;
|
|
545
|
-
currentUncertaintyKm?: number;
|
|
546
|
-
giverID?: string;
|
|
547
|
-
currentReceiverID?: string;
|
|
548
|
-
currentMemoryID?: string;
|
|
549
|
-
media?: Medium[];
|
|
550
|
-
knownTags?: { [key: string]: string };
|
|
551
|
-
contextVars?: { [key: string]: string };
|
|
552
|
-
memoryTags?: string[];
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
export declare type Person = {
|
|
556
|
-
personID?: string;
|
|
557
|
-
personType: 'Giver' | 'Receiver';
|
|
558
|
-
name?: string;
|
|
559
|
-
information?: string;
|
|
560
|
-
pin: string;
|
|
561
|
-
tag: string;
|
|
562
|
-
creationTimestamp?: string;
|
|
563
|
-
creationName?: string;
|
|
564
|
-
lastChangeTimestamp?: string;
|
|
565
|
-
lastChangeName?: string;
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
export declare type PersonificationProfile = {
|
|
569
|
-
tag?: string;
|
|
570
|
-
pin?: string;
|
|
571
|
-
name?: string;
|
|
572
|
-
sessionID: string;
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
export declare type Invitation = {
|
|
576
|
-
invitationID?: string;
|
|
577
|
-
memoriID: string;
|
|
578
|
-
isInviter?: boolean;
|
|
579
|
-
isInvitee?: boolean;
|
|
580
|
-
text?: string;
|
|
581
|
-
destinationEMail: string;
|
|
582
|
-
destinationName: string;
|
|
583
|
-
tag: string;
|
|
584
|
-
pin: string;
|
|
585
|
-
type: string;
|
|
586
|
-
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
587
|
-
creationTimestamp?: string;
|
|
588
|
-
lastChangeTimestamp?: string;
|
|
589
|
-
};
|
|
590
|
-
|
|
591
535
|
export declare type LocalizationKeyContent = {
|
|
592
536
|
key: string;
|
|
593
537
|
value: string;
|
|
@@ -612,7 +556,67 @@ export declare type Asset = {
|
|
|
612
556
|
lastChangeTimestamp: string;
|
|
613
557
|
};
|
|
614
558
|
|
|
615
|
-
export type
|
|
559
|
+
export declare type CustomWord = {
|
|
560
|
+
customWordID: string;
|
|
561
|
+
word: string;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Definition of the Custom Word, in terms of sums and subtractions of existing words or custom words.
|
|
565
|
+
* The syntax for a Custom Word definition is as follows: word1 [+-] word2 [+-] word3...
|
|
566
|
+
* If the operator is omitted it is assumed to be the last specified from the left, and if no operator has been specified it is assumed to be the sum.
|
|
567
|
+
* E.g.:
|
|
568
|
+
* - alpha beta gamma is equivalent to alpha + beta + gamma
|
|
569
|
+
* - alpha beta - gamma deta is equivalent to alpha + beta - gamma - delta
|
|
570
|
+
*/
|
|
571
|
+
definition: string;
|
|
572
|
+
|
|
573
|
+
creationTimestamp: string;
|
|
574
|
+
creationSessionID: string;
|
|
575
|
+
lastChangeTimestamp: string;
|
|
576
|
+
lastChangeSessionID: string;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
export declare type ConsumptionLog = {
|
|
580
|
+
consumptionLogID: string;
|
|
581
|
+
from: string;
|
|
582
|
+
to: string;
|
|
583
|
+
type: 'Daily' | 'Monthly';
|
|
584
|
+
userID?: string;
|
|
585
|
+
userName?: string;
|
|
586
|
+
tenantName?: string;
|
|
587
|
+
memoriID?: string;
|
|
588
|
+
memoriName?: string;
|
|
589
|
+
totalSessions: number;
|
|
590
|
+
validSessions: number;
|
|
591
|
+
completions: number;
|
|
592
|
+
deepThoughtValidSessions: number;
|
|
593
|
+
deepThoughtCompletions: number;
|
|
594
|
+
importedSize: number;
|
|
595
|
+
nonChargeableCompletions?: number;
|
|
596
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
597
|
+
nonChargeableImportedSize?: number;
|
|
598
|
+
promptTokens: { [key: string]: number };
|
|
599
|
+
completionTokens: { [key: string]: number };
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
export declare type Notification = {
|
|
603
|
+
notificationID: string;
|
|
604
|
+
timestamp: string;
|
|
605
|
+
severity: 'INFO' | 'WARN' | 'ALERT' | 'AWARD';
|
|
606
|
+
texts: {
|
|
607
|
+
'it-IT': string;
|
|
608
|
+
'en-US': string;
|
|
609
|
+
[lang: string]: string;
|
|
610
|
+
};
|
|
611
|
+
additionalInfo?: {
|
|
612
|
+
[key: string]: string;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Specifications for a Memory search.
|
|
618
|
+
*/
|
|
619
|
+
export declare type SearchQuery = {
|
|
616
620
|
/**
|
|
617
621
|
* @type {string}
|
|
618
622
|
* Search query. If omitted, either a Date or a Place must be set. Used only for Search, ignored for Random picking and Memory Hints.
|
|
@@ -682,12 +686,6 @@ export type SearchQuery = {
|
|
|
682
686
|
*/
|
|
683
687
|
excludedMemoryIDs?: string[];
|
|
684
688
|
|
|
685
|
-
/**
|
|
686
|
-
* @type {number=0}
|
|
687
|
-
* Index of the first Memory to return. Used for pagination.
|
|
688
|
-
*/
|
|
689
|
-
startFrom?: number;
|
|
690
|
-
|
|
691
689
|
/**
|
|
692
690
|
* @type {?number=5}
|
|
693
691
|
* Optional number of results. If omitted defaults to 5.
|
|
@@ -709,9 +707,30 @@ export type SearchQuery = {
|
|
|
709
707
|
* Optional list of memory tags. If specified, the search is limited to Memories including ALL the specified tags.
|
|
710
708
|
*/
|
|
711
709
|
memoryTags?: string[];
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @type {?boolean}
|
|
713
|
+
* If set to True, the search is limited to Memories with media.
|
|
714
|
+
*/
|
|
715
|
+
withMediaOnly?: boolean;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @type {?string}
|
|
719
|
+
* If specified, the search is limited to Memories of this type.
|
|
720
|
+
*/
|
|
721
|
+
memoryType?:
|
|
722
|
+
| 'Question'
|
|
723
|
+
| 'Story'
|
|
724
|
+
| 'Default'
|
|
725
|
+
| 'CompletionDraft'
|
|
726
|
+
| 'CompletionPlaceholder'
|
|
727
|
+
| 'ExpertReference';
|
|
712
728
|
};
|
|
713
729
|
|
|
714
|
-
|
|
730
|
+
/**
|
|
731
|
+
* Specifications of a Match object.
|
|
732
|
+
*/
|
|
733
|
+
export declare type SearchMatches = {
|
|
715
734
|
/**
|
|
716
735
|
* @type {number}
|
|
717
736
|
* Match confidence, between 0.0 (no confidence) and 1.0 (full confidence).
|
|
@@ -730,6 +749,9 @@ export type SearchMatches = {
|
|
|
730
749
|
memory: Memory;
|
|
731
750
|
};
|
|
732
751
|
|
|
752
|
+
/**
|
|
753
|
+
* Specifications of an Answer object.
|
|
754
|
+
*/
|
|
733
755
|
export declare type Answer = {
|
|
734
756
|
text: string;
|
|
735
757
|
preformatted?: boolean;
|
|
@@ -739,6 +761,9 @@ export declare type Answer = {
|
|
|
739
761
|
lastChangeName?: string;
|
|
740
762
|
};
|
|
741
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Specifications of a Memory object.
|
|
766
|
+
*/
|
|
742
767
|
export declare type Memory = {
|
|
743
768
|
memoryID: string;
|
|
744
769
|
memoryType:
|
|
@@ -753,7 +778,13 @@ export declare type Memory = {
|
|
|
753
778
|
receiverTag?: string;
|
|
754
779
|
receiverName?: string;
|
|
755
780
|
media?: Medium[];
|
|
781
|
+
/**
|
|
782
|
+
* @deprecated
|
|
783
|
+
*/
|
|
756
784
|
text?: string;
|
|
785
|
+
/**
|
|
786
|
+
* @deprecated
|
|
787
|
+
*/
|
|
757
788
|
textVariants?: string[];
|
|
758
789
|
answers?: Answer[];
|
|
759
790
|
title?: string;
|
|
@@ -772,12 +803,12 @@ export declare type Memory = {
|
|
|
772
803
|
tags?: string[];
|
|
773
804
|
minTimeout?: number;
|
|
774
805
|
maxTimeout?: number;
|
|
775
|
-
contextVarsToSet?: { [variable: string]: string };
|
|
776
|
-
contextVarsToMatch?: { [variable: string]: string };
|
|
777
806
|
/**
|
|
778
807
|
* Used for Unanswered Questions
|
|
779
808
|
*/
|
|
780
809
|
contextVars?: { [variable: string]: string };
|
|
810
|
+
contextVarsToSet?: { [variable: string]: string };
|
|
811
|
+
contextVarsToMatch?: { [variable: string]: string };
|
|
781
812
|
/**
|
|
782
813
|
* Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.
|
|
783
814
|
* @default "COMMON"
|
|
@@ -809,57 +840,120 @@ export declare type UnansweredQuestion = {
|
|
|
809
840
|
lastChangeName?: string;
|
|
810
841
|
lastChangeSessionID?: string;
|
|
811
842
|
suggestions?: SearchMatches[];
|
|
843
|
+
contextVars?: { [variable: string]: string };
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
export declare type OpenSession = {
|
|
847
|
+
memoriID: string;
|
|
848
|
+
password?: string;
|
|
849
|
+
recoveryTokens?: string[];
|
|
850
|
+
tag?: string;
|
|
851
|
+
pin?: string;
|
|
852
|
+
initialContextVars?: { [key: string]: string };
|
|
853
|
+
initialQuestion?: string;
|
|
854
|
+
forceCloseSessions?: boolean;
|
|
855
|
+
birthDate?: string;
|
|
856
|
+
additionalInfo?: {
|
|
857
|
+
/**
|
|
858
|
+
* a valid Memori.AI login token for the user, from which information like
|
|
859
|
+
* the user's unique ID, their birth date and e-mail are retrieved
|
|
860
|
+
* (for age verification and DCM integration purposes)
|
|
861
|
+
*/
|
|
862
|
+
loginToken?: string;
|
|
863
|
+
/**
|
|
864
|
+
* the language ISO code used to open the session
|
|
865
|
+
* (may be different from the Memori language if a translation layer is in place)
|
|
866
|
+
*/
|
|
867
|
+
language?: string;
|
|
868
|
+
/**
|
|
869
|
+
* the referral URL, as reported by the hosting web application
|
|
870
|
+
*/
|
|
871
|
+
referral?: string;
|
|
872
|
+
/**
|
|
873
|
+
* the offset in minutes of the UTC time zone from the user's local time zone.
|
|
874
|
+
* Note: the offset is subtracted from UTC to obtain the user's local time, not added.
|
|
875
|
+
* E.g.: it should be -120 for CEST, not +120.
|
|
876
|
+
*/
|
|
877
|
+
timeZoneOffset?: string;
|
|
878
|
+
[key: string]: string | undefined;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
export declare type MemoriSession = {
|
|
882
|
+
sessionID: string;
|
|
883
|
+
currentState: DialogState;
|
|
884
|
+
gamificationPoints?: number;
|
|
885
|
+
undefinedWords?: string[];
|
|
886
|
+
lastUpdateTimestamp?: string;
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
export declare type Medium = {
|
|
890
|
+
mediumID: string;
|
|
891
|
+
url?: string;
|
|
892
|
+
content?: string;
|
|
893
|
+
mimeType: string;
|
|
894
|
+
title?: string;
|
|
895
|
+
properties?: { [key: string]: string };
|
|
896
|
+
creationTimestamp?: string;
|
|
897
|
+
creationName?: string;
|
|
898
|
+
lastChangeTimestamp?: string;
|
|
899
|
+
lastChangeName?: string;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
export declare type TranslatedHint = {
|
|
903
|
+
text: string;
|
|
904
|
+
originalText: string;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
export declare type DialogState = {
|
|
908
|
+
state: string;
|
|
909
|
+
stateName: string;
|
|
910
|
+
previousState: string;
|
|
911
|
+
confidence?: number;
|
|
912
|
+
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
913
|
+
emission?: string;
|
|
914
|
+
continuationEmitted?: boolean;
|
|
915
|
+
emitter?: string;
|
|
916
|
+
completion?: boolean;
|
|
917
|
+
lastMatchedMemoryID?: string;
|
|
918
|
+
acceptsTimeout?: boolean;
|
|
919
|
+
acceptsAbort?: boolean;
|
|
920
|
+
acceptsMedia?: boolean;
|
|
921
|
+
acceptsDate?: boolean;
|
|
922
|
+
acceptsPlace?: boolean;
|
|
923
|
+
acceptsTag?: boolean;
|
|
924
|
+
acceptsFeedback?: boolean;
|
|
925
|
+
hints?: string[];
|
|
926
|
+
timeout?: number;
|
|
927
|
+
translatedHints?: TranslatedHint[];
|
|
928
|
+
currentTag?: string;
|
|
929
|
+
currentDate?: string;
|
|
930
|
+
currentPlaceName?: string;
|
|
931
|
+
currentLatitude?: number;
|
|
932
|
+
currentLongitude?: number;
|
|
933
|
+
currentUncertaintyKm?: number;
|
|
934
|
+
giverID?: string;
|
|
935
|
+
currentReceiverID?: string;
|
|
936
|
+
currentMemoryID?: string;
|
|
937
|
+
media?: Medium[];
|
|
938
|
+
knownTags?: { [key: string]: string };
|
|
939
|
+
contextVars?: { [key: string]: string };
|
|
812
940
|
};
|
|
813
941
|
|
|
814
942
|
export declare type Message = {
|
|
815
943
|
memoryID?: string;
|
|
816
944
|
text: string;
|
|
817
945
|
translatedText?: string;
|
|
818
|
-
questionAnswered?: string;
|
|
819
946
|
acceptsFeedback?: boolean;
|
|
820
947
|
generatedByAI?: boolean;
|
|
821
948
|
fromUser?: boolean;
|
|
822
949
|
media?: Medium[];
|
|
823
|
-
initial?: boolean;
|
|
824
950
|
emitter?: string;
|
|
951
|
+
initial?: boolean;
|
|
825
952
|
timestamp?: string;
|
|
826
953
|
contextVars?: { [key: string]: string };
|
|
827
|
-
date?: string;
|
|
828
|
-
dateUncertaintyDays?: number;
|
|
829
|
-
placeName?: string;
|
|
830
|
-
placeLatitude?: number;
|
|
831
|
-
placeLongitude?: number;
|
|
832
|
-
placeUncertaintyKm?: number;
|
|
833
|
-
tag?: string;
|
|
834
|
-
memoryTags?: string[];
|
|
835
|
-
};
|
|
836
|
-
|
|
837
|
-
export type ConsumptionLog = {
|
|
838
|
-
consumptionLogID: string;
|
|
839
|
-
from: string;
|
|
840
|
-
to: string;
|
|
841
|
-
type: 'Daily' | 'Monthly';
|
|
842
|
-
userID?: string;
|
|
843
|
-
memoriID?: string;
|
|
844
|
-
totalSessions: number;
|
|
845
|
-
validSessions: number;
|
|
846
|
-
completions: number;
|
|
847
|
-
promptTokens: { [key: string]: number };
|
|
848
|
-
completionTokens: { [key: string]: number };
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
export type Notification = {
|
|
852
|
-
notificationID: string;
|
|
853
|
-
timestamp: string;
|
|
854
|
-
severity: 'INFO' | 'WARN' | 'ALERT';
|
|
855
|
-
texts: {
|
|
856
|
-
'it-IT': string;
|
|
857
|
-
'en-US': string;
|
|
858
|
-
[lang: string]: string;
|
|
859
|
-
};
|
|
860
954
|
};
|
|
861
955
|
|
|
862
|
-
export type ChatMedium = {
|
|
956
|
+
export declare type ChatMedium = {
|
|
863
957
|
/**
|
|
864
958
|
* URL of the Medium. If specified, the Content property is Null.
|
|
865
959
|
*/
|
|
@@ -879,10 +973,10 @@ export type ChatMedium = {
|
|
|
879
973
|
/**
|
|
880
974
|
* Key-value pairs for additional structured content storage.
|
|
881
975
|
*/
|
|
882
|
-
properties?: { [key: string]:
|
|
976
|
+
properties?: { [key: string]: string };
|
|
883
977
|
};
|
|
884
978
|
|
|
885
|
-
export type ChatLogLine = {
|
|
979
|
+
export declare type ChatLogLine = {
|
|
886
980
|
/**
|
|
887
981
|
* @type {string}
|
|
888
982
|
* Timestamp UTC of the line.
|
|
@@ -910,6 +1004,7 @@ export type ChatLogLine = {
|
|
|
910
1004
|
media?: ChatMedium[];
|
|
911
1005
|
/**
|
|
912
1006
|
* ID of the Memory object referenced in this line.
|
|
1007
|
+
* @type {string}
|
|
913
1008
|
*/
|
|
914
1009
|
memoryID?: string;
|
|
915
1010
|
/**
|
|
@@ -929,7 +1024,7 @@ export type ChatLogLine = {
|
|
|
929
1024
|
acceptsFeedback?: boolean;
|
|
930
1025
|
};
|
|
931
1026
|
|
|
932
|
-
export type ChatLog = {
|
|
1027
|
+
export declare type ChatLog = {
|
|
933
1028
|
/**
|
|
934
1029
|
* @param {string}
|
|
935
1030
|
* Chat Log object ID.
|
|
@@ -968,15 +1063,7 @@ export type ChatLog = {
|
|
|
968
1063
|
lines: ChatLogLine[];
|
|
969
1064
|
};
|
|
970
1065
|
|
|
971
|
-
export type
|
|
972
|
-
pairID?: string;
|
|
973
|
-
text1: string;
|
|
974
|
-
text2: string;
|
|
975
|
-
correlated: boolean;
|
|
976
|
-
occurrences?: number;
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
export type Utterance = {
|
|
1066
|
+
export declare type Utterance = {
|
|
980
1067
|
/**
|
|
981
1068
|
* Utterance object ID.
|
|
982
1069
|
*/
|
|
@@ -1014,7 +1101,7 @@ export type Utterance = {
|
|
|
1014
1101
|
lastChangeSessionID?: string;
|
|
1015
1102
|
};
|
|
1016
1103
|
|
|
1017
|
-
export type Intent = {
|
|
1104
|
+
export declare type Intent = {
|
|
1018
1105
|
/**
|
|
1019
1106
|
* Intent object ID.
|
|
1020
1107
|
*/
|
|
@@ -1083,7 +1170,7 @@ export type Intent = {
|
|
|
1083
1170
|
lastChangeSessionID?: string;
|
|
1084
1171
|
};
|
|
1085
1172
|
|
|
1086
|
-
export type IntentSlot = {
|
|
1173
|
+
export declare type IntentSlot = {
|
|
1087
1174
|
/**
|
|
1088
1175
|
* Intent Slot object ID.
|
|
1089
1176
|
*/
|
|
@@ -1136,7 +1223,7 @@ export type IntentSlot = {
|
|
|
1136
1223
|
lastChangeSessionID?: string;
|
|
1137
1224
|
};
|
|
1138
1225
|
|
|
1139
|
-
export type FunctionParameter = {
|
|
1226
|
+
export declare type FunctionParameter = {
|
|
1140
1227
|
/**
|
|
1141
1228
|
* Function Parameter object ID.
|
|
1142
1229
|
*/
|
|
@@ -1168,7 +1255,7 @@ export type FunctionParameter = {
|
|
|
1168
1255
|
required?: boolean;
|
|
1169
1256
|
};
|
|
1170
1257
|
|
|
1171
|
-
export type Function = {
|
|
1258
|
+
export declare type Function = {
|
|
1172
1259
|
/**
|
|
1173
1260
|
* Function object ID.
|
|
1174
1261
|
*/
|
|
@@ -1220,26 +1307,135 @@ export type Function = {
|
|
|
1220
1307
|
* or: <request><param1>{param1}</param1><param2>{param2}</param2></request>.
|
|
1221
1308
|
*/
|
|
1222
1309
|
httpBodyTemplate?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* MIME type of the HTTP request body to be passed to the web hook.
|
|
1312
|
+
* If not specified "text/plain" is assumed.
|
|
1313
|
+
*/
|
|
1314
|
+
httpBodyContentType?: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* List of extension headers to be sent to the web hook.
|
|
1317
|
+
* Extension headers let the web hook receive internal information on the current state of the conversation,
|
|
1318
|
+
* such as the session ID, current date and place, context variables etc.
|
|
1319
|
+
* If the function is of Internal type, it is ignored.
|
|
1320
|
+
* Currently supported extension headers are:
|
|
1321
|
+
* - SESSION-ID: the current session ID, sent with header X-Memori-Session-ID
|
|
1322
|
+
* - CURRENT-TAG: the current tag, sent with headers X-Memori-Current-Tag and X-Memori-Current-Tag-Authenticated
|
|
1323
|
+
* - CURRENT-DATE: the current date in UTC, sent with header X-Memori-Current-Date
|
|
1324
|
+
* - CURRENT-PLACE: the current place, sent with headers X-Memori-Current-Place-Name, X-Memori-Current-Place-Latitude, X-Memori-Current-Place-Longitude and X-Memori-Current-Place-UncertaintyKm
|
|
1325
|
+
* - CONTEXT-VARS: the current context variables, sent with header X-Memori-Context-Vars, with the format NAME1:VALUE1,NAME2:VALUE2,...,NAMEn:VALUEn
|
|
1326
|
+
* - USER-EMAIL: the current user email, sent with header X-Memori-User-Email
|
|
1327
|
+
*/
|
|
1328
|
+
sendExtensionHeaders?: string[];
|
|
1223
1329
|
};
|
|
1224
1330
|
|
|
1225
|
-
export type
|
|
1226
|
-
|
|
1227
|
-
|
|
1331
|
+
export declare type CorrelationPair = {
|
|
1332
|
+
pairID?: string;
|
|
1333
|
+
text1: string;
|
|
1334
|
+
text2: string;
|
|
1335
|
+
correlated: boolean;
|
|
1336
|
+
occurrences?: number;
|
|
1337
|
+
};
|
|
1228
1338
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1339
|
+
export declare type Person = {
|
|
1340
|
+
personID?: string;
|
|
1341
|
+
personType: 'Giver' | 'Receiver';
|
|
1342
|
+
name?: string;
|
|
1343
|
+
information?: string;
|
|
1344
|
+
pin: string;
|
|
1345
|
+
tag: string;
|
|
1346
|
+
creationTimestamp?: string;
|
|
1347
|
+
creationName?: string;
|
|
1348
|
+
lastChangeTimestamp?: string;
|
|
1349
|
+
lastChangeName?: string;
|
|
1350
|
+
};
|
|
1238
1351
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1352
|
+
export declare type PersonificationProfile = {
|
|
1353
|
+
tag?: string;
|
|
1354
|
+
pin?: string;
|
|
1355
|
+
name?: string;
|
|
1356
|
+
sessionID?: string;
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
export interface Invitation {
|
|
1360
|
+
invitationID?: string;
|
|
1361
|
+
memoriID: string;
|
|
1362
|
+
isInviter?: boolean;
|
|
1363
|
+
isInvitee?: boolean;
|
|
1364
|
+
text?: string;
|
|
1365
|
+
destinationEMail: string;
|
|
1366
|
+
destinationName: string;
|
|
1367
|
+
tag: string;
|
|
1368
|
+
pin: string;
|
|
1369
|
+
type: string;
|
|
1370
|
+
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
1371
|
+
creationTimestamp?: string;
|
|
1372
|
+
lastChangeTimestamp?: string;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
export declare type Stats = {
|
|
1376
|
+
totalReceivers: number;
|
|
1377
|
+
receiversWithMemories: number;
|
|
1378
|
+
totalMemories: number;
|
|
1379
|
+
publicMemories: number;
|
|
1380
|
+
memoriesWithMedia: number;
|
|
1381
|
+
totalQuestions: number;
|
|
1382
|
+
publicQuestions: number;
|
|
1383
|
+
questionsWithMoreThanOneAnswer: number;
|
|
1384
|
+
totalStories: number;
|
|
1385
|
+
publicStories: number;
|
|
1386
|
+
storiesWithDate: number;
|
|
1387
|
+
storiesWithPlace: number;
|
|
1388
|
+
storiesWithDateAndPlace: number;
|
|
1389
|
+
unansweredQuestions: number;
|
|
1390
|
+
successfulCorrelations: number;
|
|
1391
|
+
failedCorrelations: number;
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1394
|
+
export declare type GamificationLevel = {
|
|
1395
|
+
points: number;
|
|
1396
|
+
badge: string;
|
|
1397
|
+
pointsForCurrentBadge: number;
|
|
1398
|
+
nextBadge?: {
|
|
1399
|
+
points: number;
|
|
1400
|
+
badge: string;
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
export declare type EventLog = {
|
|
1405
|
+
eventLogID: string;
|
|
1406
|
+
timestamp: string;
|
|
1407
|
+
eventType:
|
|
1408
|
+
| 'MemoriOpened'
|
|
1409
|
+
| 'MemoriClosed'
|
|
1410
|
+
| 'QuestionAnsweredCorrectly'
|
|
1411
|
+
| 'QuestionAnsweredIncorrectly'
|
|
1412
|
+
| 'QuestionNotAnswered'
|
|
1413
|
+
| 'IntentMatched';
|
|
1414
|
+
memoriID: string;
|
|
1415
|
+
sessionID: string;
|
|
1416
|
+
maintenanceType?:
|
|
1417
|
+
| 'None'
|
|
1418
|
+
| 'ConsumptionJob'
|
|
1419
|
+
| 'ChatLogExtractionJob'
|
|
1420
|
+
| 'ContentQualityJob';
|
|
1421
|
+
userAgent?: string;
|
|
1422
|
+
ipAddress?: string;
|
|
1423
|
+
additionalInfo?: OpenSession['additionalInfo'];
|
|
1424
|
+
memoryID?: string;
|
|
1425
|
+
intentID?: string;
|
|
1426
|
+
enteredText?: string;
|
|
1427
|
+
receiverTag?: string;
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
export declare type UserLog = {
|
|
1431
|
+
timestamp: string;
|
|
1432
|
+
count: number;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
export declare type UsersLog = {
|
|
1436
|
+
timestamp: string;
|
|
1437
|
+
countUsers: number;
|
|
1438
|
+
countRecurrentUsers: number;
|
|
1243
1439
|
};
|
|
1244
1440
|
|
|
1245
1441
|
export interface CsvSpecs {
|
|
@@ -1252,6 +1448,27 @@ export interface CsvSpecs {
|
|
|
1252
1448
|
contextVarsToSetColumnName?: string;
|
|
1253
1449
|
csvSeparator?: string;
|
|
1254
1450
|
questionTitleVariantsSeparator?: string;
|
|
1451
|
+
memoryTagsColumnName?: string;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
export interface JSONLSpecs {
|
|
1455
|
+
/**
|
|
1456
|
+
* @type {string=}
|
|
1457
|
+
* Name of the platform for which the JSONL is intended.
|
|
1458
|
+
* Currently supported values are:
|
|
1459
|
+
* - OpenAI: the OpenAI platform
|
|
1460
|
+
*/
|
|
1461
|
+
platform?: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* @type {boolean=}
|
|
1464
|
+
* If True the JSONL includes the instructions for the generative AI, i.e. the "System" role of each message. Used only in Export operations.
|
|
1465
|
+
*/
|
|
1466
|
+
includeInstructions?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* @type {string=}
|
|
1469
|
+
* If specified, only contents created or changed after this date will be included in the export.
|
|
1470
|
+
*/
|
|
1471
|
+
createdOrChangedAfter?: string;
|
|
1255
1472
|
}
|
|
1256
1473
|
|
|
1257
1474
|
export interface TxtSpecs {
|
|
@@ -1282,21 +1499,6 @@ export interface TxtSpecs {
|
|
|
1282
1499
|
questionsGenerationInstructions?: string;
|
|
1283
1500
|
}
|
|
1284
1501
|
|
|
1285
|
-
export interface JSONLSpecs {
|
|
1286
|
-
/**
|
|
1287
|
-
* @type {string=}
|
|
1288
|
-
* Name of the platform for which the JSONL is intended.
|
|
1289
|
-
* Currently supported values are:
|
|
1290
|
-
* - OpenAI: the OpenAI platform
|
|
1291
|
-
*/
|
|
1292
|
-
platform?: string;
|
|
1293
|
-
/**
|
|
1294
|
-
* @type {boolean=}
|
|
1295
|
-
* If True the JSONL includes the instructions for the generative AI, i.e. the "System" role of each message. Used only in Export operations.
|
|
1296
|
-
*/
|
|
1297
|
-
includeInstructions?: boolean;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
1502
|
export interface ImportParams {
|
|
1301
1503
|
forceImport?: boolean;
|
|
1302
1504
|
csvSpecs?: CsvSpecs;
|
|
@@ -1304,19 +1506,18 @@ export interface ImportParams {
|
|
|
1304
1506
|
conclusive?: boolean;
|
|
1305
1507
|
notPickable?: boolean;
|
|
1306
1508
|
importName?: string;
|
|
1509
|
+
notes?: string;
|
|
1307
1510
|
contextVarsToSet?: {
|
|
1308
|
-
[
|
|
1511
|
+
[variable: string]: string;
|
|
1309
1512
|
};
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1319
|
-
}[];
|
|
1513
|
+
contextVarsToMatch?: {
|
|
1514
|
+
[variable: string]: string;
|
|
1515
|
+
};
|
|
1516
|
+
receiverID?: string;
|
|
1517
|
+
addMediaLink?: string;
|
|
1518
|
+
linkTitleHandling?: 'FixedTitle' | 'HostName' | 'FetchFromUrl';
|
|
1519
|
+
linkTitle?: string;
|
|
1520
|
+
memoryTags?: string[];
|
|
1320
1521
|
}
|
|
1321
1522
|
|
|
1322
1523
|
export interface AnalysisParams {
|
|
@@ -1333,19 +1534,14 @@ export interface AnalysisParams {
|
|
|
1333
1534
|
threshold?: number;
|
|
1334
1535
|
}
|
|
1335
1536
|
|
|
1336
|
-
export interface
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
* Type of warning.
|
|
1340
|
-
* Currently supported types are:
|
|
1341
|
-
* - Error: an error occurred while performing analysis
|
|
1342
|
-
*/
|
|
1343
|
-
warningType: 'Error' | string;
|
|
1344
|
-
/**
|
|
1345
|
-
* @type {string=}
|
|
1346
|
-
* When WarningType is Error reports the text of the error.
|
|
1347
|
-
*/
|
|
1537
|
+
export interface ImportWarning {
|
|
1538
|
+
warningType: 'Existing Similar Memory' | 'Internal Error';
|
|
1539
|
+
rowNumber?: number;
|
|
1348
1540
|
text?: string;
|
|
1541
|
+
similarTexts?: {
|
|
1542
|
+
text: string;
|
|
1543
|
+
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1544
|
+
}[];
|
|
1349
1545
|
}
|
|
1350
1546
|
|
|
1351
1547
|
export interface AnalysisWarning {
|
|
@@ -1549,6 +1745,7 @@ export interface UserQueryMatch {
|
|
|
1549
1745
|
*/
|
|
1550
1746
|
match: number;
|
|
1551
1747
|
}
|
|
1748
|
+
|
|
1552
1749
|
export interface Badge {
|
|
1553
1750
|
badgeID?: string;
|
|
1554
1751
|
date?: string;
|
|
@@ -1562,6 +1759,24 @@ export interface Badge {
|
|
|
1562
1759
|
issuerURL?: string;
|
|
1563
1760
|
}
|
|
1564
1761
|
|
|
1762
|
+
export interface ConsumptionItem {
|
|
1763
|
+
key: string;
|
|
1764
|
+
id: string;
|
|
1765
|
+
promptTokens: number;
|
|
1766
|
+
completionTokens: number;
|
|
1767
|
+
totalTokens: number;
|
|
1768
|
+
validSessions: number;
|
|
1769
|
+
completions: number;
|
|
1770
|
+
deepThoughtValidSessions: number;
|
|
1771
|
+
deepThoughtCompletions: number;
|
|
1772
|
+
importedSize: number;
|
|
1773
|
+
nonChargeableCompletions?: number;
|
|
1774
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
1775
|
+
nonChargeableImportedSize?: number;
|
|
1776
|
+
cost?: number;
|
|
1777
|
+
children?: ConsumptionItem[];
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1565
1780
|
export interface ExpertReference {
|
|
1566
1781
|
/**
|
|
1567
1782
|
* @type {string}
|
|
@@ -1628,33 +1843,28 @@ export interface KnownFact {
|
|
|
1628
1843
|
lastChangeSessionID?: string;
|
|
1629
1844
|
}
|
|
1630
1845
|
|
|
1631
|
-
export
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1846
|
+
export declare type ConsumptionData = {
|
|
1847
|
+
id: string;
|
|
1848
|
+
key: string;
|
|
1849
|
+
promptTokens: number;
|
|
1850
|
+
completionTokens: number;
|
|
1851
|
+
totalTokens: number;
|
|
1852
|
+
validSessions: number;
|
|
1853
|
+
completions: number;
|
|
1854
|
+
deepThoughtValidSessions: number;
|
|
1855
|
+
deepThoughtCompletions: number;
|
|
1856
|
+
importedSize: number;
|
|
1857
|
+
nonChargeableCompletions: number;
|
|
1858
|
+
nonChargeableDeepThoughtCompletions: number;
|
|
1859
|
+
nonChargeableImportedSize: number;
|
|
1860
|
+
children?: ConsumptionData[];
|
|
1861
|
+
};
|
|
1643
1862
|
|
|
1644
|
-
export
|
|
1645
|
-
topicID: string;
|
|
1646
|
-
/**
|
|
1647
|
-
* Topic name.
|
|
1648
|
-
*/
|
|
1863
|
+
export declare type MacroFunction = {
|
|
1649
1864
|
name: string;
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
creationTimestamp: string;
|
|
1657
|
-
creationSessionID: string;
|
|
1658
|
-
lastChangeTimestamp: string;
|
|
1659
|
-
lastChangeSessionID: string;
|
|
1660
|
-
}
|
|
1865
|
+
description: string;
|
|
1866
|
+
macroParameters?: {
|
|
1867
|
+
name: string;
|
|
1868
|
+
description: string;
|
|
1869
|
+
}[];
|
|
1870
|
+
};
|