@memori.ai/memori-api-client 5.4.1 → 5.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 +19 -0
- package/dist/backend/importExport.d.ts +6 -0
- package/dist/backend/importExport.js +16 -0
- package/dist/backend/importExport.js.map +1 -1
- package/dist/backend.d.ts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/types.d.ts +14 -3
- package/esm/backend/importExport.d.ts +6 -0
- package/esm/backend/importExport.js +16 -0
- package/esm/backend/importExport.js.map +1 -1
- package/esm/backend.d.ts +12 -0
- package/esm/index.d.ts +12 -0
- package/esm/types.d.ts +14 -3
- package/package.json +1 -1
- package/src/backend/importExport.ts +52 -0
- package/src/types.ts +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [5.5.0](https://github.com/memori-ai/memori-api-client/compare/v5.4.2...v5.5.0) (2025-01-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add import methods for dictionaries and functions/intents ([c65f477](https://github.com/memori-ai/memori-api-client/commit/c65f477d1d9ae466d6b5ef5a8086d560a10831c0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Maintenance
|
|
12
|
+
|
|
13
|
+
* add missing types ([ede48bd](https://github.com/memori-ai/memori-api-client/commit/ede48bd4e6936e94b6552e6bf22bd16f588b8157))
|
|
14
|
+
|
|
15
|
+
## [5.4.2](https://github.com/memori-ai/memori-api-client/compare/v5.4.1...v5.4.2) (2025-01-09)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Maintenance
|
|
19
|
+
|
|
20
|
+
* add missing types ([4dbabef](https://github.com/memori-ai/memori-api-client/commit/4dbabefcbec0450666abc41962411647433e8d8f))
|
|
21
|
+
|
|
3
22
|
## [5.4.1](https://github.com/memori-ai/memori-api-client/compare/v5.4.0...v5.4.1) (2025-01-08)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -6,6 +6,12 @@ declare const _default: (apiUrl: string) => {
|
|
|
6
6
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
7
7
|
status: ImportStatus;
|
|
8
8
|
}>;
|
|
9
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
10
|
+
status: ImportStatus;
|
|
11
|
+
}>;
|
|
12
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
13
|
+
status: ImportStatus;
|
|
14
|
+
}>;
|
|
9
15
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>;
|
|
10
16
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: JSONLSpecs, password?: string) => Promise<string>;
|
|
11
17
|
};
|
|
@@ -18,6 +18,22 @@ exports.default = (apiUrl) => ({
|
|
|
18
18
|
...params,
|
|
19
19
|
},
|
|
20
20
|
}),
|
|
21
|
+
importDictionary: async (authToken, memoriID, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportDictionary/${authToken}/${memoriID}`, {
|
|
22
|
+
apiUrl,
|
|
23
|
+
method: 'POST',
|
|
24
|
+
body: {
|
|
25
|
+
rows,
|
|
26
|
+
...params,
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
importFunctionsIntents: async (authToken, memoriID, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportFunctionsIntents/${authToken}/${memoriID}`, {
|
|
30
|
+
apiUrl,
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: {
|
|
33
|
+
rows,
|
|
34
|
+
...params,
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
21
37
|
exportCSV: async (authToken, memoriID, csvSpecs, password) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ExportCSV/${authToken}/${memoriID}`, {
|
|
22
38
|
apiUrl,
|
|
23
39
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":";;AAOA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,IAAA,uBAAU,EAAC,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,IAAA,uBAAU,EAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IAUH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,QAAkB,EAClB,QAAiB,EACjB,EAAE,CACF,IAAA,uBAAU,EAAC,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,IAAA,uBAAU,EAAC,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"}
|
|
1
|
+
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":";;AAOA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,IAAA,uBAAU,EAAC,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,IAAA,uBAAU,EAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASD,gBAAgB,EAAE,KAAK,EACrB,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACJ,IAAA,uBAAU,EAAC,kCAAkC,SAAS,IAAI,QAAQ,EAAE,EAAE;QACpE,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASD,sBAAsB,EAAE,KAAK,EAC3B,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACJ,IAAA,uBAAU,EAAC,wCAAwC,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC1E,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IAUH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,QAAkB,EAClB,QAAiB,EACjB,EAAE,CACF,IAAA,uBAAU,EAAC,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,IAAA,uBAAU,EAAC,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/dist/backend.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
65
65
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
66
66
|
status: import("./types").ImportStatus;
|
|
67
67
|
}>;
|
|
68
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
69
|
+
status: import("./types").ImportStatus;
|
|
70
|
+
}>;
|
|
71
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
72
|
+
status: import("./types").ImportStatus;
|
|
73
|
+
}>;
|
|
68
74
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
69
75
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
70
76
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -428,6 +434,12 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
428
434
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
429
435
|
status: import("./types").ImportStatus;
|
|
430
436
|
}>;
|
|
437
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
438
|
+
status: import("./types").ImportStatus;
|
|
439
|
+
}>;
|
|
440
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
441
|
+
status: import("./types").ImportStatus;
|
|
442
|
+
}>;
|
|
431
443
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
432
444
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
433
445
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -779,6 +779,12 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
779
779
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
780
780
|
status: import("./types").ImportStatus;
|
|
781
781
|
}>;
|
|
782
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
783
|
+
status: import("./types").ImportStatus;
|
|
784
|
+
}>;
|
|
785
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
786
|
+
status: import("./types").ImportStatus;
|
|
787
|
+
}>;
|
|
782
788
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
783
789
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
784
790
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -1142,6 +1148,12 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1142
1148
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1143
1149
|
status: import("./types").ImportStatus;
|
|
1144
1150
|
}>;
|
|
1151
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1152
|
+
status: import("./types").ImportStatus;
|
|
1153
|
+
}>;
|
|
1154
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1155
|
+
status: import("./types").ImportStatus;
|
|
1156
|
+
}>;
|
|
1145
1157
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
1146
1158
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
1147
1159
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -531,7 +531,7 @@ export declare type Medium = {
|
|
|
531
531
|
mimeType: string;
|
|
532
532
|
title?: string;
|
|
533
533
|
properties?: {
|
|
534
|
-
[key: string]:
|
|
534
|
+
[key: string]: any;
|
|
535
535
|
};
|
|
536
536
|
creationTimestamp?: string;
|
|
537
537
|
creationName?: string;
|
|
@@ -549,6 +549,7 @@ export declare type DialogState = {
|
|
|
549
549
|
confidence?: number;
|
|
550
550
|
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
551
551
|
emission?: string;
|
|
552
|
+
translatedEmission?: string;
|
|
552
553
|
continuationEmitted?: boolean;
|
|
553
554
|
emitter?: string;
|
|
554
555
|
completion?: boolean;
|
|
@@ -579,21 +580,31 @@ export declare type DialogState = {
|
|
|
579
580
|
contextVars?: {
|
|
580
581
|
[key: string]: string;
|
|
581
582
|
};
|
|
583
|
+
memoryTags?: string[];
|
|
582
584
|
};
|
|
583
585
|
export declare type Message = {
|
|
584
586
|
memoryID?: string;
|
|
585
587
|
text: string;
|
|
586
588
|
translatedText?: string;
|
|
589
|
+
questionAnswered?: string;
|
|
587
590
|
acceptsFeedback?: boolean;
|
|
588
591
|
generatedByAI?: boolean;
|
|
589
592
|
fromUser?: boolean;
|
|
590
593
|
media?: Medium[];
|
|
591
|
-
emitter?: string;
|
|
592
594
|
initial?: boolean;
|
|
595
|
+
emitter?: string;
|
|
593
596
|
timestamp?: string;
|
|
594
597
|
contextVars?: {
|
|
595
598
|
[key: string]: string;
|
|
596
599
|
};
|
|
600
|
+
date?: string;
|
|
601
|
+
dateUncertaintyDays?: number;
|
|
602
|
+
placeName?: string;
|
|
603
|
+
placeLatitude?: number;
|
|
604
|
+
placeLongitude?: number;
|
|
605
|
+
placeUncertaintyKm?: number;
|
|
606
|
+
tag?: string;
|
|
607
|
+
memoryTags?: string[];
|
|
597
608
|
};
|
|
598
609
|
export declare type ChatMedium = {
|
|
599
610
|
url?: string;
|
|
@@ -601,7 +612,7 @@ export declare type ChatMedium = {
|
|
|
601
612
|
mimeType: string;
|
|
602
613
|
title?: string;
|
|
603
614
|
properties?: {
|
|
604
|
-
[key: string]:
|
|
615
|
+
[key: string]: any;
|
|
605
616
|
};
|
|
606
617
|
};
|
|
607
618
|
export declare type ChatLogLine = {
|
|
@@ -6,6 +6,12 @@ declare const _default: (apiUrl: string) => {
|
|
|
6
6
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
7
7
|
status: ImportStatus;
|
|
8
8
|
}>;
|
|
9
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
10
|
+
status: ImportStatus;
|
|
11
|
+
}>;
|
|
12
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
13
|
+
status: ImportStatus;
|
|
14
|
+
}>;
|
|
9
15
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>;
|
|
10
16
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: JSONLSpecs, password?: string) => Promise<string>;
|
|
11
17
|
};
|
|
@@ -16,6 +16,22 @@ export default (apiUrl) => ({
|
|
|
16
16
|
...params,
|
|
17
17
|
},
|
|
18
18
|
}),
|
|
19
|
+
importDictionary: async (authToken, memoriID, rows, params) => apiFetcher(`/ImportExport/ImportDictionary/${authToken}/${memoriID}`, {
|
|
20
|
+
apiUrl,
|
|
21
|
+
method: 'POST',
|
|
22
|
+
body: {
|
|
23
|
+
rows,
|
|
24
|
+
...params,
|
|
25
|
+
},
|
|
26
|
+
}),
|
|
27
|
+
importFunctionsIntents: async (authToken, memoriID, rows, params) => apiFetcher(`/ImportExport/ImportFunctionsIntents/${authToken}/${memoriID}`, {
|
|
28
|
+
apiUrl,
|
|
29
|
+
method: 'POST',
|
|
30
|
+
body: {
|
|
31
|
+
rows,
|
|
32
|
+
...params,
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
19
35
|
exportCSV: async (authToken, memoriID, csvSpecs, password) => apiFetcher(`/ImportExport/ExportCSV/${authToken}/${memoriID}`, {
|
|
20
36
|
apiUrl,
|
|
21
37
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
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;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"}
|
|
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;IASD,gBAAgB,EAAE,KAAK,EACrB,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACJ,UAAU,CAAC,kCAAkC,SAAS,IAAI,QAAQ,EAAE,EAAE;QACpE,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASD,sBAAsB,EAAE,KAAK,EAC3B,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACJ,UAAU,CAAC,wCAAwC,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC1E,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;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.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
65
65
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
66
66
|
status: import("./types").ImportStatus;
|
|
67
67
|
}>;
|
|
68
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
69
|
+
status: import("./types").ImportStatus;
|
|
70
|
+
}>;
|
|
71
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
72
|
+
status: import("./types").ImportStatus;
|
|
73
|
+
}>;
|
|
68
74
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
69
75
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
70
76
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -428,6 +434,12 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
428
434
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
429
435
|
status: import("./types").ImportStatus;
|
|
430
436
|
}>;
|
|
437
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
438
|
+
status: import("./types").ImportStatus;
|
|
439
|
+
}>;
|
|
440
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
441
|
+
status: import("./types").ImportStatus;
|
|
442
|
+
}>;
|
|
431
443
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
432
444
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
433
445
|
};
|
package/esm/index.d.ts
CHANGED
|
@@ -779,6 +779,12 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
779
779
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
780
780
|
status: import("./types").ImportStatus;
|
|
781
781
|
}>;
|
|
782
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
783
|
+
status: import("./types").ImportStatus;
|
|
784
|
+
}>;
|
|
785
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
786
|
+
status: import("./types").ImportStatus;
|
|
787
|
+
}>;
|
|
782
788
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
783
789
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
784
790
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
@@ -1142,6 +1148,12 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
|
|
|
1142
1148
|
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1143
1149
|
status: import("./types").ImportStatus;
|
|
1144
1150
|
}>;
|
|
1151
|
+
importDictionary: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1152
|
+
status: import("./types").ImportStatus;
|
|
1153
|
+
}>;
|
|
1154
|
+
importFunctionsIntents: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
1155
|
+
status: import("./types").ImportStatus;
|
|
1156
|
+
}>;
|
|
1145
1157
|
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
1146
1158
|
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>;
|
|
1147
1159
|
};
|
package/esm/types.d.ts
CHANGED
|
@@ -531,7 +531,7 @@ export declare type Medium = {
|
|
|
531
531
|
mimeType: string;
|
|
532
532
|
title?: string;
|
|
533
533
|
properties?: {
|
|
534
|
-
[key: string]:
|
|
534
|
+
[key: string]: any;
|
|
535
535
|
};
|
|
536
536
|
creationTimestamp?: string;
|
|
537
537
|
creationName?: string;
|
|
@@ -549,6 +549,7 @@ export declare type DialogState = {
|
|
|
549
549
|
confidence?: number;
|
|
550
550
|
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
551
551
|
emission?: string;
|
|
552
|
+
translatedEmission?: string;
|
|
552
553
|
continuationEmitted?: boolean;
|
|
553
554
|
emitter?: string;
|
|
554
555
|
completion?: boolean;
|
|
@@ -579,21 +580,31 @@ export declare type DialogState = {
|
|
|
579
580
|
contextVars?: {
|
|
580
581
|
[key: string]: string;
|
|
581
582
|
};
|
|
583
|
+
memoryTags?: string[];
|
|
582
584
|
};
|
|
583
585
|
export declare type Message = {
|
|
584
586
|
memoryID?: string;
|
|
585
587
|
text: string;
|
|
586
588
|
translatedText?: string;
|
|
589
|
+
questionAnswered?: string;
|
|
587
590
|
acceptsFeedback?: boolean;
|
|
588
591
|
generatedByAI?: boolean;
|
|
589
592
|
fromUser?: boolean;
|
|
590
593
|
media?: Medium[];
|
|
591
|
-
emitter?: string;
|
|
592
594
|
initial?: boolean;
|
|
595
|
+
emitter?: string;
|
|
593
596
|
timestamp?: string;
|
|
594
597
|
contextVars?: {
|
|
595
598
|
[key: string]: string;
|
|
596
599
|
};
|
|
600
|
+
date?: string;
|
|
601
|
+
dateUncertaintyDays?: number;
|
|
602
|
+
placeName?: string;
|
|
603
|
+
placeLatitude?: number;
|
|
604
|
+
placeLongitude?: number;
|
|
605
|
+
placeUncertaintyKm?: number;
|
|
606
|
+
tag?: string;
|
|
607
|
+
memoryTags?: string[];
|
|
597
608
|
};
|
|
598
609
|
export declare type ChatMedium = {
|
|
599
610
|
url?: string;
|
|
@@ -601,7 +612,7 @@ export declare type ChatMedium = {
|
|
|
601
612
|
mimeType: string;
|
|
602
613
|
title?: string;
|
|
603
614
|
properties?: {
|
|
604
|
-
[key: string]:
|
|
615
|
+
[key: string]: any;
|
|
605
616
|
};
|
|
606
617
|
};
|
|
607
618
|
export declare type ChatLogLine = {
|
package/package.json
CHANGED
|
@@ -66,6 +66,58 @@ export default (apiUrl: string) => ({
|
|
|
66
66
|
}
|
|
67
67
|
>,
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Imports a dictionary to a Memori object.
|
|
71
|
+
* @param {string} authToken - The login token.
|
|
72
|
+
* @param {string} memoriID - The ID of the Memori object.
|
|
73
|
+
* @param {string[]} rows Rows of the CSV file.
|
|
74
|
+
* @param {ImportParams} params The specifications and content of the CSV file
|
|
75
|
+
*/
|
|
76
|
+
importDictionary: async (
|
|
77
|
+
authToken: string,
|
|
78
|
+
memoriID: string,
|
|
79
|
+
rows: string[],
|
|
80
|
+
params: Omit<ImportParams, 'txtSpecs'>
|
|
81
|
+
) =>
|
|
82
|
+
apiFetcher(`/ImportExport/ImportDictionary/${authToken}/${memoriID}`, {
|
|
83
|
+
apiUrl,
|
|
84
|
+
method: 'POST',
|
|
85
|
+
body: {
|
|
86
|
+
rows,
|
|
87
|
+
...params,
|
|
88
|
+
},
|
|
89
|
+
}) as Promise<
|
|
90
|
+
ResponseSpec & {
|
|
91
|
+
status: ImportStatus;
|
|
92
|
+
}
|
|
93
|
+
>,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Starts an Import process for functions and intents from a jsonl file.
|
|
97
|
+
* @param {string} authToken - The login token.
|
|
98
|
+
* @param {string} memoriID - The ID of the Memori object.
|
|
99
|
+
* @param {string[]} rows Rows of the jsonl file.
|
|
100
|
+
* @param {ImportParams} params The specifications and content of the jsonl file
|
|
101
|
+
*/
|
|
102
|
+
importFunctionsIntents: async (
|
|
103
|
+
authToken: string,
|
|
104
|
+
memoriID: string,
|
|
105
|
+
rows: string[],
|
|
106
|
+
params: Omit<ImportParams, 'txtSpecs'>
|
|
107
|
+
) =>
|
|
108
|
+
apiFetcher(`/ImportExport/ImportFunctionsIntents/${authToken}/${memoriID}`, {
|
|
109
|
+
apiUrl,
|
|
110
|
+
method: 'POST',
|
|
111
|
+
body: {
|
|
112
|
+
rows,
|
|
113
|
+
...params,
|
|
114
|
+
},
|
|
115
|
+
}) as Promise<
|
|
116
|
+
ResponseSpec & {
|
|
117
|
+
status: ImportStatus;
|
|
118
|
+
}
|
|
119
|
+
>,
|
|
120
|
+
|
|
69
121
|
/**
|
|
70
122
|
* Exports contents of a Memori object to a CSV file.
|
|
71
123
|
* @param {string} authToken - The login token.
|
package/src/types.ts
CHANGED
|
@@ -892,7 +892,7 @@ export declare type Medium = {
|
|
|
892
892
|
content?: string;
|
|
893
893
|
mimeType: string;
|
|
894
894
|
title?: string;
|
|
895
|
-
properties?: { [key: string]:
|
|
895
|
+
properties?: { [key: string]: any };
|
|
896
896
|
creationTimestamp?: string;
|
|
897
897
|
creationName?: string;
|
|
898
898
|
lastChangeTimestamp?: string;
|
|
@@ -911,6 +911,7 @@ export declare type DialogState = {
|
|
|
911
911
|
confidence?: number;
|
|
912
912
|
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
913
913
|
emission?: string;
|
|
914
|
+
translatedEmission?: string;
|
|
914
915
|
continuationEmitted?: boolean;
|
|
915
916
|
emitter?: string;
|
|
916
917
|
completion?: boolean;
|
|
@@ -937,20 +938,30 @@ export declare type DialogState = {
|
|
|
937
938
|
media?: Medium[];
|
|
938
939
|
knownTags?: { [key: string]: string };
|
|
939
940
|
contextVars?: { [key: string]: string };
|
|
941
|
+
memoryTags?: string[];
|
|
940
942
|
};
|
|
941
943
|
|
|
942
944
|
export declare type Message = {
|
|
943
945
|
memoryID?: string;
|
|
944
946
|
text: string;
|
|
945
947
|
translatedText?: string;
|
|
948
|
+
questionAnswered?: string;
|
|
946
949
|
acceptsFeedback?: boolean;
|
|
947
950
|
generatedByAI?: boolean;
|
|
948
951
|
fromUser?: boolean;
|
|
949
952
|
media?: Medium[];
|
|
950
|
-
emitter?: string;
|
|
951
953
|
initial?: boolean;
|
|
954
|
+
emitter?: string;
|
|
952
955
|
timestamp?: string;
|
|
953
956
|
contextVars?: { [key: string]: string };
|
|
957
|
+
date?: string;
|
|
958
|
+
dateUncertaintyDays?: number;
|
|
959
|
+
placeName?: string;
|
|
960
|
+
placeLatitude?: number;
|
|
961
|
+
placeLongitude?: number;
|
|
962
|
+
placeUncertaintyKm?: number;
|
|
963
|
+
tag?: string;
|
|
964
|
+
memoryTags?: string[];
|
|
954
965
|
};
|
|
955
966
|
|
|
956
967
|
export declare type ChatMedium = {
|
|
@@ -973,7 +984,7 @@ export declare type ChatMedium = {
|
|
|
973
984
|
/**
|
|
974
985
|
* Key-value pairs for additional structured content storage.
|
|
975
986
|
*/
|
|
976
|
-
properties?: { [key: string]:
|
|
987
|
+
properties?: { [key: string]: any };
|
|
977
988
|
};
|
|
978
989
|
|
|
979
990
|
export declare type ChatLogLine = {
|