@memori.ai/memori-api-client 2.3.0 → 2.5.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/asset.d.ts +2 -2
- package/dist/backend/asset.js +2 -2
- package/dist/backend/asset.js.map +1 -1
- package/dist/backend/importExport.d.ts +2 -1
- package/dist/backend/importExport.js +9 -0
- package/dist/backend/importExport.js.map +1 -1
- package/dist/backend/memori.js +4 -4
- package/dist/backend/memori.js.map +1 -1
- package/dist/backend.d.ts +6 -4
- package/dist/engine/expertReferences.d.ts +22 -0
- package/dist/engine/expertReferences.js +32 -0
- package/dist/engine/expertReferences.js.map +1 -0
- package/dist/engine/expertReferences.test.d.ts +1 -0
- package/dist/engine/expertReferences.test.js +14 -0
- package/dist/engine/expertReferences.test.js.map +1 -0
- package/dist/engine/memories.d.ts +2 -2
- package/dist/engine/memories.js.map +1 -1
- package/dist/engine.d.ts +42 -4
- package/dist/engine.js +3 -0
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +48 -8
- package/dist/types.d.ts +44 -6
- package/esm/backend/asset.d.ts +2 -2
- package/esm/backend/asset.js +2 -2
- package/esm/backend/asset.js.map +1 -1
- package/esm/backend/importExport.d.ts +2 -1
- package/esm/backend/importExport.js +9 -0
- package/esm/backend/importExport.js.map +1 -1
- package/esm/backend/memori.js +4 -4
- package/esm/backend/memori.js.map +1 -1
- package/esm/backend.d.ts +6 -4
- package/esm/engine/expertReferences.d.ts +22 -0
- package/esm/engine/expertReferences.js +30 -0
- package/esm/engine/expertReferences.js.map +1 -0
- package/esm/engine/expertReferences.test.d.ts +1 -0
- package/esm/engine/expertReferences.test.js +11 -0
- package/esm/engine/expertReferences.test.js.map +1 -0
- package/esm/engine/memories.d.ts +2 -2
- package/esm/engine/memories.js.map +1 -1
- package/esm/engine.d.ts +42 -4
- package/esm/engine.js +3 -0
- package/esm/engine.js.map +1 -1
- package/esm/index.d.ts +48 -8
- package/esm/types.d.ts +44 -6
- package/package.json +1 -1
- package/src/backend/asset.ts +12 -6
- package/src/backend/importExport.ts +25 -0
- package/src/backend/memori.ts +6 -6
- package/src/engine/expertReferences.test.ts +19 -0
- package/src/engine/expertReferences.ts +120 -0
- package/src/engine/memories.ts +4 -4
- package/src/engine.ts +3 -0
- package/src/types.ts +105 -4
package/dist/types.d.ts
CHANGED
|
@@ -49,19 +49,23 @@ export declare type Memori = {
|
|
|
49
49
|
publishedInTheMetaverse?: boolean;
|
|
50
50
|
metaverseEnvironment?: string;
|
|
51
51
|
exposed?: boolean;
|
|
52
|
-
ageRestriction?: number;
|
|
53
|
-
nsfw?: boolean;
|
|
54
52
|
disableR2R3Loop?: boolean;
|
|
55
53
|
disableR4Loop?: boolean;
|
|
56
54
|
disableR5Loop?: boolean;
|
|
55
|
+
ageRestriction?: number;
|
|
56
|
+
nsfw?: boolean;
|
|
57
57
|
enableCompletions?: boolean;
|
|
58
58
|
completionDescription?: string;
|
|
59
|
+
completionProvider?: '-' | 'OpenAI';
|
|
60
|
+
completionProviderConfig?: string;
|
|
61
|
+
enableDeepThought?: boolean;
|
|
62
|
+
disableCompletionMediaExtraction?: boolean;
|
|
59
63
|
chainingMemoriID?: string;
|
|
60
64
|
chainingBaseURL?: string;
|
|
61
65
|
chainingPassword?: string;
|
|
62
|
-
properties?: {
|
|
63
|
-
[key: string]:
|
|
64
|
-
};
|
|
66
|
+
properties?: [{
|
|
67
|
+
[key: string]: string;
|
|
68
|
+
}];
|
|
65
69
|
creationTimestamp?: string;
|
|
66
70
|
lastChangeTimestamp?: string;
|
|
67
71
|
blockedUntil?: string;
|
|
@@ -106,22 +110,30 @@ export declare type User = {
|
|
|
106
110
|
canEditIntegrations?: boolean;
|
|
107
111
|
canEditDynamicIntents?: boolean;
|
|
108
112
|
canEditMemoriChaining?: boolean;
|
|
113
|
+
enableBadges?: boolean;
|
|
109
114
|
monthSessions?: number;
|
|
110
115
|
monthValidSessions?: number;
|
|
111
116
|
maxFreeSessions?: number;
|
|
112
117
|
nonFreeSessionCost?: number;
|
|
113
118
|
monthCompletions?: number;
|
|
114
119
|
maxCompletions?: number;
|
|
120
|
+
monthImportedSize?: number;
|
|
121
|
+
maxImportSize?: number;
|
|
115
122
|
creationTimestamp?: string;
|
|
116
123
|
lastChangeTimestamp?: string;
|
|
117
124
|
referral?: string;
|
|
118
125
|
couponCode?: string;
|
|
126
|
+
defaultCompletionProvider?: '-' | 'OpenAI';
|
|
127
|
+
defaultCompletionProviderConfig?: string;
|
|
119
128
|
paying?: boolean;
|
|
120
129
|
notificationPrefs?: NotificationPrefs[];
|
|
121
130
|
birthDate?: string;
|
|
122
131
|
age?: number;
|
|
123
132
|
tnCAndPPAccepted?: boolean;
|
|
124
133
|
tnCAndPPAcceptanceDate?: string;
|
|
134
|
+
avatarURL?: string;
|
|
135
|
+
avatar3DURL?: string;
|
|
136
|
+
avatar3DURLType?: string;
|
|
125
137
|
};
|
|
126
138
|
export declare type IntegrationResource = {
|
|
127
139
|
name: string;
|
|
@@ -311,6 +323,7 @@ export declare type DialogState = {
|
|
|
311
323
|
confidence?: number;
|
|
312
324
|
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
313
325
|
emission?: string;
|
|
326
|
+
emitter?: string;
|
|
314
327
|
completion?: boolean;
|
|
315
328
|
continuationEmitted?: boolean;
|
|
316
329
|
lastMatchedMemoryID?: string;
|
|
@@ -424,7 +437,7 @@ export declare type Answer = {
|
|
|
424
437
|
};
|
|
425
438
|
export declare type Memory = {
|
|
426
439
|
memoryID: string;
|
|
427
|
-
memoryType:
|
|
440
|
+
memoryType: 'Question' | 'Story' | 'Default' | 'CompletionDraft' | 'ExpertReference';
|
|
428
441
|
lastRead?: string;
|
|
429
442
|
readOccurrences?: number;
|
|
430
443
|
receiverID?: string;
|
|
@@ -489,6 +502,7 @@ export declare type Message = {
|
|
|
489
502
|
fromUser?: boolean;
|
|
490
503
|
media?: Medium[];
|
|
491
504
|
initial?: boolean;
|
|
505
|
+
emitter?: string;
|
|
492
506
|
timestamp?: string;
|
|
493
507
|
contextVars?: {
|
|
494
508
|
[key: string]: string;
|
|
@@ -504,6 +518,12 @@ export type ConsumptionLog = {
|
|
|
504
518
|
totalSessions: number;
|
|
505
519
|
validSessions: number;
|
|
506
520
|
completions: number;
|
|
521
|
+
promptTokens: {
|
|
522
|
+
[key: string]: number;
|
|
523
|
+
};
|
|
524
|
+
completionTokens: {
|
|
525
|
+
[key: string]: number;
|
|
526
|
+
};
|
|
507
527
|
};
|
|
508
528
|
export type Notification = {
|
|
509
529
|
notificationID: string;
|
|
@@ -609,6 +629,10 @@ export interface TxtSpecs {
|
|
|
609
629
|
sourceAttachmentTitle?: string;
|
|
610
630
|
questionsGenerationInstructions?: string;
|
|
611
631
|
}
|
|
632
|
+
export interface JSONLSpecs {
|
|
633
|
+
platform?: string;
|
|
634
|
+
includeInstructions?: boolean;
|
|
635
|
+
}
|
|
612
636
|
export interface ImportParams {
|
|
613
637
|
forceImport?: boolean;
|
|
614
638
|
csvSpecs?: CsvSpecs;
|
|
@@ -642,6 +666,7 @@ export interface ImportResponse {
|
|
|
642
666
|
end?: string;
|
|
643
667
|
eta?: number;
|
|
644
668
|
importedMemories?: number;
|
|
669
|
+
importWarningsCount?: number;
|
|
645
670
|
importWarnings?: ImportWarning[];
|
|
646
671
|
}
|
|
647
672
|
export interface Badge {
|
|
@@ -656,3 +681,16 @@ export interface Badge {
|
|
|
656
681
|
issuerEmail?: string;
|
|
657
682
|
issuerURL?: string;
|
|
658
683
|
}
|
|
684
|
+
export interface ExpertReference {
|
|
685
|
+
expertID: string;
|
|
686
|
+
name: string;
|
|
687
|
+
description: string;
|
|
688
|
+
default?: boolean;
|
|
689
|
+
expertMemoriID: string;
|
|
690
|
+
expertPassword?: string;
|
|
691
|
+
expertBaseURL: string;
|
|
692
|
+
creationTimestamp?: string;
|
|
693
|
+
creationSessionID?: string;
|
|
694
|
+
lastChangeTimestamp?: string;
|
|
695
|
+
lastChangeSessionID?: string;
|
|
696
|
+
}
|
package/esm/backend/asset.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResponseSpec, Asset } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
|
-
getUploadAssetURL: (authToken: string, memoriID
|
|
4
|
-
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID
|
|
3
|
+
getUploadAssetURL: (authToken: string, memoriID?: string, memoryID?: string) => string;
|
|
4
|
+
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string, memoryID?: string) => Promise<ResponseSpec & {
|
|
5
5
|
asset: Asset;
|
|
6
6
|
}>;
|
|
7
7
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
package/esm/backend/asset.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { apiFetcher } from '../apiFetcher';
|
|
2
2
|
export default (apiUrl) => ({
|
|
3
|
-
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}
|
|
3
|
+
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`,
|
|
4
4
|
uploadAsset: async (fileName, fileUrl, authToken, memoriID, memoryID) => {
|
|
5
5
|
const data = new FormData();
|
|
6
6
|
const file = await fetch(fileUrl);
|
|
7
7
|
const fileBlob = await file.blob();
|
|
8
8
|
data.append(fileName, fileBlob, fileName);
|
|
9
|
-
const upload = await fetch(`${apiUrl}/Asset/${authToken}
|
|
9
|
+
const upload = await fetch(`${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`, {
|
|
10
10
|
method: 'POST',
|
|
11
11
|
body: data,
|
|
12
12
|
});
|
package/esm/backend/asset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../src/backend/asset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../src/backend/asset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,iBAAiB,EAAE,CACjB,SAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,EAAE,CACF,GAAG,MAAM,UAAU,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAC3D,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAC9B,EAAE;IASJ,WAAW,EAAE,KAAK,EAChB,QAAgB,EAChB,OAAe,EACf,SAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,EAAE;QACF,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAEnC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE1C,MAAM,MAAM,GAAG,MAAM,KAAK,CACxB,GAAG,MAAM,UAAU,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAC3D,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAC9B,EAAE,EACF;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CACF,CAAC;QACF,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAI1B,CAAC;IACJ,CAAC;IAQD,QAAQ,EAAE,CAAC,QAAgB,EAAE,SAAiB,EAAE,EAAE,CAChD,UAAU,CAAC,UAAU,QAAQ,IAAI,SAAS,EAAE,EAAE;QAC5C,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAAC;IAQJ,WAAW,EAAE,CAAC,SAAiB,EAAE,QAAgB,EAAE,KAAY,EAAE,EAAE,CACjE,UAAU,CAAC,UAAU,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QACpE,MAAM;QACN,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,KAAK;KACZ,CAA6C;IAOhD,WAAW,EAAE,CAAC,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACnD,UAAU,CAAC,UAAU,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QACpE,MAAM;QACN,MAAM,EAAE,QAAQ;KACjB,CAA0B;CAC9B,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs } from '../types';
|
|
1
|
+
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs, JSONLSpecs } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
3
|
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
4
4
|
status: ImportResponse;
|
|
@@ -16,5 +16,6 @@ declare const _default: (apiUrl: string) => {
|
|
|
16
16
|
status: ImportResponse;
|
|
17
17
|
}>;
|
|
18
18
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>;
|
|
19
|
+
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: JSONLSpecs, password?: string) => Promise<string>;
|
|
19
20
|
};
|
|
20
21
|
export default _default;
|
|
@@ -37,5 +37,14 @@ export default (apiUrl) => ({
|
|
|
37
37
|
},
|
|
38
38
|
text: true,
|
|
39
39
|
}),
|
|
40
|
+
exportJSONL: async (authToken, memoriID, jsonlSpecs, password) => apiFetcher(`/ImportExport/ExportJSONL/${authToken}/${memoriID}`, {
|
|
41
|
+
apiUrl,
|
|
42
|
+
method: 'POST',
|
|
43
|
+
body: {
|
|
44
|
+
jsonlSpecs,
|
|
45
|
+
password,
|
|
46
|
+
},
|
|
47
|
+
text: true,
|
|
48
|
+
}),
|
|
40
49
|
});
|
|
41
50
|
//# sourceMappingURL=importExport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IAMH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAC3C,UAAU,CAAC,iCAAiC,SAAS,EAAE,EAAE;QACvD,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CAC1D,UAAU,CAAC,8BAA8B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAChE,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACxD,UAAU,CAAC,4BAA4B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC9D,MAAM;QACN,MAAM,EAAE,MAAM;KACf,CAIA;IAUH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,QAAkB,EAClB,QAAiB,EACjB,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,QAAQ;YACR,QAAQ;SACT;QACD,IAAI,EAAE,IAAI;KACX,CAAoB;IAUvB,WAAW,EAAE,KAAK,EAChB,SAAiB,EACjB,QAAgB,EAChB,UAAsB,EACtB,QAAiB,EACjB,EAAE,CACF,UAAU,CAAC,6BAA6B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC/D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,UAAU;YACV,QAAQ;SACT;QACD,IAAI,EAAE,IAAI;KACX,CAAoB;CACxB,CAAC,CAAC"}
|
package/esm/backend/memori.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { apiFetcher } from '../apiFetcher';
|
|
2
2
|
export default (apiUrl) => ({
|
|
3
|
-
getTenantPublicMemoriList: (tenant) => apiFetcher(`/TenantPublicMemori/${
|
|
3
|
+
getTenantPublicMemoriList: (tenant) => apiFetcher(`/TenantPublicMemori/${encodeURIComponent(tenant)}`, {
|
|
4
4
|
apiUrl,
|
|
5
5
|
}),
|
|
6
|
-
getTenantMetaverseMemoriList: (tenant) => apiFetcher(`/TenantMetaverseMemori/${
|
|
6
|
+
getTenantMetaverseMemoriList: (tenant) => apiFetcher(`/TenantMetaverseMemori/${encodeURIComponent(tenant)}`, {
|
|
7
7
|
apiUrl,
|
|
8
8
|
}),
|
|
9
9
|
getPublicMemoriList: (authToken) => apiFetcher(`/PublicMemori/${authToken}`, {
|
|
@@ -24,7 +24,7 @@ export default (apiUrl) => ({
|
|
|
24
24
|
getSharedMemoriList: (authToken) => apiFetcher(`/SharedMemori/${authToken}`, {
|
|
25
25
|
apiUrl,
|
|
26
26
|
}),
|
|
27
|
-
getTenantCategories: (tenant) => apiFetcher(`/TenantMemoriCategories/${
|
|
27
|
+
getTenantCategories: (tenant) => apiFetcher(`/TenantMemoriCategories/${encodeURIComponent(tenant)}`, {
|
|
28
28
|
apiUrl,
|
|
29
29
|
}),
|
|
30
30
|
getMemoriConfigs: (authToken) => apiFetcher(`/MemoriConfigs/${authToken}`, {
|
|
@@ -51,7 +51,7 @@ export default (apiUrl) => ({
|
|
|
51
51
|
getMemoriByUserAndId: (tenantName, userID, memoriID, authToken) => apiFetcher(`/MemoriById/${tenantName}/${userID}/${memoriID}${authToken ? `/${authToken}` : ''}`, {
|
|
52
52
|
apiUrl,
|
|
53
53
|
}),
|
|
54
|
-
getMemori: (tenant, userName, memoriName, authToken) => apiFetcher(`/Memori/${
|
|
54
|
+
getMemori: (tenant, userName, memoriName, authToken) => apiFetcher(`/Memori/${encodeURIComponent(tenant)}/${encodeURIComponent(userName)}/${encodeURIComponent(memoriName)}/${authToken !== null && authToken !== void 0 ? authToken : ''}`, {
|
|
55
55
|
apiUrl,
|
|
56
56
|
}),
|
|
57
57
|
getMemoriSessions: (authToken, memoriID, dateFrom, dateTo) => apiFetcher(`/MemoriSessions/${authToken}/${memoriID}${dateFrom ? `/${dateFrom}` : ''}${dateFrom && dateTo ? `/${dateTo}` : ''}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memori.js","sourceRoot":"","sources":["../../src/backend/memori.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,yBAAyB,EAAE,CAAC,MAAc,EAAE,EAAE,CAC5C,UAAU,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"memori.js","sourceRoot":"","sources":["../../src/backend/memori.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,yBAAyB,EAAE,CAAC,MAAc,EAAE,EAAE,CAC5C,UAAU,CAAC,uBAAuB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE;QAC9D,MAAM;KACP,CAIA;IAOH,4BAA4B,EAAE,CAAC,MAAc,EAAE,EAAE,CAC/C,UAAU,CAAC,0BAA0B,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE;QACjE,MAAM;KACP,CAIA;IAOH,mBAAmB,EAAE,CAAC,SAAiB,EAAE,EAAE,CACzC,UAAU,CAAC,iBAAiB,SAAS,EAAE,EAAE;QACvC,MAAM;KACP,CAIA;IAOH,YAAY,EAAE,CAAC,SAAiB,EAAE,EAAE,CAClC,UAAU,CAAC,cAAc,SAAS,EAAE,EAAE;QACpC,MAAM;KACP,CAIA;IASH,qBAAqB,EAAE,CACrB,UAAkB,EAClB,MAAc,EACd,SAAkB,EAClB,EAAE,CACF,UAAU,CACR,mBAAmB,UAAU,IAAI,MAAM,GACrC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAChC,EAAE,EACF;QACE,MAAM;KACP,CAKF;IASH,iBAAiB,EAAE,CACjB,UAAkB,EAClB,QAAgB,EACh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EAAE,MAAM;KACf,CAA0B;CAC9B,CAAC,CAAC"}
|
package/esm/backend.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
15
15
|
status: import("./types").ImportResponse;
|
|
16
16
|
}>;
|
|
17
17
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
18
|
+
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
18
19
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
19
20
|
notifications: import("./types").Notification[];
|
|
20
21
|
}>;
|
|
@@ -170,8 +171,8 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
170
171
|
ownerUserName: string;
|
|
171
172
|
}) => Promise<import("./types").ResponseSpec>;
|
|
172
173
|
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
173
|
-
getUploadAssetURL: (authToken: string, memoriID
|
|
174
|
-
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID
|
|
174
|
+
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string;
|
|
175
|
+
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
175
176
|
asset: import("./types").Asset;
|
|
176
177
|
}>;
|
|
177
178
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
@@ -180,8 +181,8 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
180
181
|
}>;
|
|
181
182
|
deleteAsset: (authToken: string, assetURL: string) => Promise<import("./types").ResponseSpec>;
|
|
182
183
|
asset: {
|
|
183
|
-
getUploadAssetURL: (authToken: string, memoriID
|
|
184
|
-
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID
|
|
184
|
+
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string;
|
|
185
|
+
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
185
186
|
asset: import("./types").Asset;
|
|
186
187
|
}>;
|
|
187
188
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
@@ -374,6 +375,7 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
374
375
|
status: import("./types").ImportResponse;
|
|
375
376
|
}>;
|
|
376
377
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
378
|
+
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
377
379
|
};
|
|
378
380
|
};
|
|
379
381
|
export default backendAPI;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ResponseSpec, ExpertReference } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
getExpertReferences: (sessionId: string) => Promise<ResponseSpec & {
|
|
4
|
+
count: number;
|
|
5
|
+
experts: ExpertReference[];
|
|
6
|
+
}>;
|
|
7
|
+
getExpertReferencesPaginated: (sessionId: string, from: number, howMany: number) => Promise<ResponseSpec & {
|
|
8
|
+
count: number;
|
|
9
|
+
experts: ExpertReference[];
|
|
10
|
+
}>;
|
|
11
|
+
getExpertReference: (sessionId: string, expertID: string) => Promise<ResponseSpec & {
|
|
12
|
+
expert: ExpertReference;
|
|
13
|
+
}>;
|
|
14
|
+
updateExpertReference: (sessionId: string, expertReference: Partial<ExpertReference> & {
|
|
15
|
+
expertID: ExpertReference['expertID'];
|
|
16
|
+
}) => Promise<ResponseSpec>;
|
|
17
|
+
createExpertReference: (sessionId: string, expertReference: Omit<Partial<ExpertReference>, 'expertID'>) => Promise<ResponseSpec & {
|
|
18
|
+
expertID: ExpertReference['expertID'];
|
|
19
|
+
}>;
|
|
20
|
+
deleteExpertReference: (sessionId: string, expertID: string) => Promise<ResponseSpec>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { apiFetcher } from '../apiFetcher';
|
|
2
|
+
export default (apiUrl) => ({
|
|
3
|
+
getExpertReferences: async (sessionId) => apiFetcher(`/ExpertReferences/${sessionId}`, {
|
|
4
|
+
method: 'GET',
|
|
5
|
+
apiUrl,
|
|
6
|
+
}),
|
|
7
|
+
getExpertReferencesPaginated: async (sessionId, from, howMany) => apiFetcher(`/ExpertReferences/${sessionId}/${from}/${howMany}`, {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
apiUrl,
|
|
10
|
+
}),
|
|
11
|
+
getExpertReference: async (sessionId, expertID) => apiFetcher(`/ExpertReference/${sessionId}/${expertID}`, {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
apiUrl,
|
|
14
|
+
}),
|
|
15
|
+
updateExpertReference: async (sessionId, expertReference) => apiFetcher(`/ExpertReference/${sessionId}/${expertReference.expertID}`, {
|
|
16
|
+
method: 'PATCH',
|
|
17
|
+
apiUrl,
|
|
18
|
+
body: expertReference,
|
|
19
|
+
}),
|
|
20
|
+
createExpertReference: async (sessionId, expertReference) => apiFetcher(`/ExpertReference/${sessionId}`, {
|
|
21
|
+
method: 'POST',
|
|
22
|
+
apiUrl,
|
|
23
|
+
body: expertReference,
|
|
24
|
+
}),
|
|
25
|
+
deleteExpertReference: async (sessionId, expertID) => apiFetcher(`/ExpertReference/${sessionId}/${expertID}`, {
|
|
26
|
+
method: 'DELETE',
|
|
27
|
+
apiUrl,
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=expertReferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expertReferences.js","sourceRoot":"","sources":["../../src/engine/expertReferences.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAA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
|
+
const client = memori('https://backend.memori.ai');
|
|
3
|
+
describe('engine/expertReferences api', () => {
|
|
4
|
+
it('works on expertReferences apis', async () => {
|
|
5
|
+
expect(await client.expertReferences.getExpertReferences('768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
6
|
+
});
|
|
7
|
+
it('works on chatLogs apis with shorthand version', async () => {
|
|
8
|
+
expect(await client.getExpertReferences('768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=expertReferences.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expertReferences.test.js","sourceRoot":"","sources":["../../src/engine/expertReferences.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,CACJ,MAAM,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,CAC/C,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,CACJ,MAAM,MAAM,CAAC,mBAAmB,CAAC,sCAAsC,CAAC,CACzE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/esm/engine/memories.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Memory, ResponseSpec } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
|
-
getMemories: (sessionId: string, type?: 'ALL' | 'CONTENTS' | 'DEFAULTS' | 'DRAFTS') => Promise<ResponseSpec & {
|
|
3
|
+
getMemories: (sessionId: string, type?: 'ALL' | 'CONTENTS' | 'DEFAULTS' | 'DRAFTS' | 'EXPERT_REFERENCES') => Promise<ResponseSpec & {
|
|
4
4
|
memories: Memory[];
|
|
5
5
|
}>;
|
|
6
|
-
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: 'ALL' | 'CONTENTS' | 'DEFAULTS' | 'DRAFTS') => Promise<ResponseSpec & {
|
|
6
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: 'ALL' | 'CONTENTS' | 'DEFAULTS' | 'DRAFTS' | 'EXPERT_REFERENCES') => Promise<ResponseSpec & {
|
|
7
7
|
count: number;
|
|
8
8
|
memories: Memory[];
|
|
9
9
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memories.js","sourceRoot":"","sources":["../../src/engine/memories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,WAAW,EAAE,KAAK,EAChB,SAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"memories.js","sourceRoot":"","sources":["../../src/engine/memories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,WAAW,EAAE,KAAK,EAChB,SAAiB,EACjB,IAAuE,EACvE,EAAE,CACF,UAAU,CAAC,aAAa,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;QAC5D,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IASH,oBAAoB,EAAE,KAAK,EACzB,SAAiB,EACjB,IAAY,EACZ,OAAe,EACf,IAAuE,EACvE,EAAE,CACF,UAAU,CACR,aAAa,SAAS,IAAI,IAAI,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EACpE;QACE,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAMF;IAOH,SAAS,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACvD,UAAU,CAAC,WAAW,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IAOH,WAAW,EAAE,KAAK,EAAE,SAAiB,EAAE,MAAc,EAAE,EAAE,CACvD,UAAU,CAAC,WAAW,SAAS,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE;QACpD,MAAM,EAAE,OAAO;QACf,MAAM;QACN,IAAI,EAAE,MAAM;KACb,CAA0B;IAO7B,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CAC1D,UAAU,CAAC,WAAW,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7C,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;IAO7B,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,MAAgC,EAAE,EAAE,CACxE,UAAU,CAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE,MAAM;KACb,CAIA;IAOH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CAC7D,UAAU,CAAC,iBAAiB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACnD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/esm/engine.d.ts
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
declare const _default: (apiUrl: string) => {
|
|
2
|
+
getExpertReferences: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
count: number;
|
|
4
|
+
experts: import("./types").ExpertReference[];
|
|
5
|
+
}>;
|
|
6
|
+
getExpertReferencesPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
7
|
+
count: number;
|
|
8
|
+
experts: import("./types").ExpertReference[];
|
|
9
|
+
}>;
|
|
10
|
+
getExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec & {
|
|
11
|
+
expert: import("./types").ExpertReference;
|
|
12
|
+
}>;
|
|
13
|
+
updateExpertReference: (sessionId: string, expertReference: Partial<import("./types").ExpertReference> & {
|
|
14
|
+
expertID: string;
|
|
15
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
16
|
+
createExpertReference: (sessionId: string, expertReference: Omit<Partial<import("./types").ExpertReference>, "expertID">) => Promise<import("./types").ResponseSpec & {
|
|
17
|
+
expertID: string;
|
|
18
|
+
}>;
|
|
19
|
+
deleteExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec>;
|
|
20
|
+
expertReferences: {
|
|
21
|
+
getExpertReferences: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
22
|
+
count: number;
|
|
23
|
+
experts: import("./types").ExpertReference[];
|
|
24
|
+
}>;
|
|
25
|
+
getExpertReferencesPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
26
|
+
count: number;
|
|
27
|
+
experts: import("./types").ExpertReference[];
|
|
28
|
+
}>;
|
|
29
|
+
getExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec & {
|
|
30
|
+
expert: import("./types").ExpertReference;
|
|
31
|
+
}>;
|
|
32
|
+
updateExpertReference: (sessionId: string, expertReference: Partial<import("./types").ExpertReference> & {
|
|
33
|
+
expertID: string;
|
|
34
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
35
|
+
createExpertReference: (sessionId: string, expertReference: Omit<Partial<import("./types").ExpertReference>, "expertID">) => Promise<import("./types").ResponseSpec & {
|
|
36
|
+
expertID: string;
|
|
37
|
+
}>;
|
|
38
|
+
deleteExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec>;
|
|
39
|
+
};
|
|
2
40
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
3
41
|
chatLogs: import("./types").ChatLog[];
|
|
4
42
|
}>;
|
|
@@ -247,10 +285,10 @@ declare const _default: (apiUrl: string) => {
|
|
|
247
285
|
undefinedWords: string[];
|
|
248
286
|
}>;
|
|
249
287
|
};
|
|
250
|
-
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
288
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
251
289
|
memories: import("./types").Memory[];
|
|
252
290
|
}>;
|
|
253
|
-
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
291
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
254
292
|
count: number;
|
|
255
293
|
memories: import("./types").Memory[];
|
|
256
294
|
}>;
|
|
@@ -264,10 +302,10 @@ declare const _default: (apiUrl: string) => {
|
|
|
264
302
|
}>;
|
|
265
303
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
266
304
|
memories: {
|
|
267
|
-
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
305
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
268
306
|
memories: import("./types").Memory[];
|
|
269
307
|
}>;
|
|
270
|
-
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
308
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
271
309
|
count: number;
|
|
272
310
|
memories: import("./types").Memory[];
|
|
273
311
|
}>;
|
package/esm/engine.js
CHANGED
|
@@ -14,6 +14,7 @@ import unansweredQuestions from './engine/unansweredQuestions';
|
|
|
14
14
|
import contextVars from './engine/contextVars';
|
|
15
15
|
import customDictionary from './engine/customDictionary';
|
|
16
16
|
import chatLogs from './engine/chatLogs';
|
|
17
|
+
import expertReferences from './engine/expertReferences';
|
|
17
18
|
export default (apiUrl) => ({
|
|
18
19
|
correlationPairs: correlationPairs(apiUrl),
|
|
19
20
|
...correlationPairs(apiUrl),
|
|
@@ -47,5 +48,7 @@ export default (apiUrl) => ({
|
|
|
47
48
|
...customDictionary(apiUrl),
|
|
48
49
|
chatLogs: chatLogs(apiUrl),
|
|
49
50
|
...chatLogs(apiUrl),
|
|
51
|
+
expertReferences: expertReferences(apiUrl),
|
|
52
|
+
...expertReferences(apiUrl),
|
|
50
53
|
});
|
|
51
54
|
//# sourceMappingURL=engine.js.map
|
package/esm/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD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AgB,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,GAAG,gBAAgB,CAAC,MAAM,CAAC;CAC5B,CAAC,CAAC"}
|
package/esm/index.d.ts
CHANGED
|
@@ -4,6 +4,44 @@ declare const api: (hostname?: string) => {
|
|
|
4
4
|
asset: {
|
|
5
5
|
getResourceUrl: ({ type, resourceURI, sessionID, baseURL, }: import("./helpers/asset").ResourceURLParams) => string;
|
|
6
6
|
};
|
|
7
|
+
getExpertReferences: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
8
|
+
count: number;
|
|
9
|
+
experts: import("./types").ExpertReference[];
|
|
10
|
+
}>;
|
|
11
|
+
getExpertReferencesPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
12
|
+
count: number;
|
|
13
|
+
experts: import("./types").ExpertReference[];
|
|
14
|
+
}>;
|
|
15
|
+
getExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec & {
|
|
16
|
+
expert: import("./types").ExpertReference;
|
|
17
|
+
}>;
|
|
18
|
+
updateExpertReference: (sessionId: string, expertReference: Partial<import("./types").ExpertReference> & {
|
|
19
|
+
expertID: string;
|
|
20
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
21
|
+
createExpertReference: (sessionId: string, expertReference: Omit<Partial<import("./types").ExpertReference>, "expertID">) => Promise<import("./types").ResponseSpec & {
|
|
22
|
+
expertID: string;
|
|
23
|
+
}>;
|
|
24
|
+
deleteExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec>;
|
|
25
|
+
expertReferences: {
|
|
26
|
+
getExpertReferences: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
27
|
+
count: number;
|
|
28
|
+
experts: import("./types").ExpertReference[];
|
|
29
|
+
}>;
|
|
30
|
+
getExpertReferencesPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
31
|
+
count: number;
|
|
32
|
+
experts: import("./types").ExpertReference[];
|
|
33
|
+
}>;
|
|
34
|
+
getExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec & {
|
|
35
|
+
expert: import("./types").ExpertReference;
|
|
36
|
+
}>;
|
|
37
|
+
updateExpertReference: (sessionId: string, expertReference: Partial<import("./types").ExpertReference> & {
|
|
38
|
+
expertID: string;
|
|
39
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
40
|
+
createExpertReference: (sessionId: string, expertReference: Omit<Partial<import("./types").ExpertReference>, "expertID">) => Promise<import("./types").ResponseSpec & {
|
|
41
|
+
expertID: string;
|
|
42
|
+
}>;
|
|
43
|
+
deleteExpertReference: (sessionId: string, expertID: string) => Promise<import("./types").ResponseSpec>;
|
|
44
|
+
};
|
|
7
45
|
getChatLogs: (sessionId: string, dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
8
46
|
chatLogs: import("./types").ChatLog[];
|
|
9
47
|
}>;
|
|
@@ -252,10 +290,10 @@ declare const api: (hostname?: string) => {
|
|
|
252
290
|
undefinedWords: string[];
|
|
253
291
|
}>;
|
|
254
292
|
};
|
|
255
|
-
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
293
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
256
294
|
memories: import("./types").Memory[];
|
|
257
295
|
}>;
|
|
258
|
-
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
296
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
259
297
|
count: number;
|
|
260
298
|
memories: import("./types").Memory[];
|
|
261
299
|
}>;
|
|
@@ -269,10 +307,10 @@ declare const api: (hostname?: string) => {
|
|
|
269
307
|
}>;
|
|
270
308
|
getMemoryAccess: (sessionId: string, memoryId: string) => Promise<import("./types").ResponseSpec>;
|
|
271
309
|
memories: {
|
|
272
|
-
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
310
|
+
getMemories: (sessionId: string, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
273
311
|
memories: import("./types").Memory[];
|
|
274
312
|
}>;
|
|
275
|
-
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
313
|
+
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | "DRAFTS" | "EXPERT_REFERENCES" | undefined) => Promise<import("./types").ResponseSpec & {
|
|
276
314
|
count: number;
|
|
277
315
|
memories: import("./types").Memory[];
|
|
278
316
|
}>;
|
|
@@ -485,6 +523,7 @@ declare const api: (hostname?: string) => {
|
|
|
485
523
|
status: import("./types").ImportResponse;
|
|
486
524
|
}>;
|
|
487
525
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
526
|
+
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
488
527
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
489
528
|
notifications: import("./types").Notification[];
|
|
490
529
|
}>;
|
|
@@ -640,8 +679,8 @@ declare const api: (hostname?: string) => {
|
|
|
640
679
|
ownerUserName: string;
|
|
641
680
|
}) => Promise<import("./types").ResponseSpec>;
|
|
642
681
|
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>;
|
|
643
|
-
getUploadAssetURL: (authToken: string, memoriID
|
|
644
|
-
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID
|
|
682
|
+
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string;
|
|
683
|
+
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
645
684
|
asset: import("./types").Asset;
|
|
646
685
|
}>;
|
|
647
686
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
@@ -650,8 +689,8 @@ declare const api: (hostname?: string) => {
|
|
|
650
689
|
}>;
|
|
651
690
|
deleteAsset: (authToken: string, assetURL: string) => Promise<import("./types").ResponseSpec>;
|
|
652
691
|
asset: {
|
|
653
|
-
getUploadAssetURL: (authToken: string, memoriID
|
|
654
|
-
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID
|
|
692
|
+
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string;
|
|
693
|
+
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & {
|
|
655
694
|
asset: import("./types").Asset;
|
|
656
695
|
}>;
|
|
657
696
|
getAsset: (fileName: string, sessionID: string) => Promise<any>;
|
|
@@ -844,6 +883,7 @@ declare const api: (hostname?: string) => {
|
|
|
844
883
|
status: import("./types").ImportResponse;
|
|
845
884
|
}>;
|
|
846
885
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
886
|
+
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
847
887
|
};
|
|
848
888
|
};
|
|
849
889
|
};
|