@memori.ai/memori-api-client 4.0.3 → 4.1.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/engine/dialog.d.ts +3 -1
- package/dist/engine/dialog.js +2 -1
- package/dist/engine/dialog.js.map +1 -1
- package/dist/engine.d.ts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/types.d.ts +17 -3
- package/esm/engine/dialog.d.ts +3 -1
- package/esm/engine/dialog.js +2 -1
- package/esm/engine/dialog.js.map +1 -1
- package/esm/engine.d.ts +6 -2
- package/esm/index.d.ts +6 -2
- package/esm/types.d.ts +17 -3
- package/package.json +1 -1
- package/src/engine/dialog.ts +9 -2
- package/src/types.ts +101 -3
- package/dist/engine/importExport.d.ts +0 -20
- package/dist/engine/importExport.js +0 -40
- package/dist/engine/importExport.js.map +0 -1
- package/dist/engine/importExport.test.d.ts +0 -1
- package/dist/engine/importExport.test.js +0 -25
- package/dist/engine/importExport.test.js.map +0 -1
- package/dist/engine/promptedQuestions.d.ts +0 -9
- package/dist/engine/promptedQuestions.js +0 -26
- package/dist/engine/promptedQuestions.js.map +0 -1
- package/dist/engine/promptedQuestions.test.d.ts +0 -1
- package/dist/engine/promptedQuestions.test.js +0 -14
- package/dist/engine/promptedQuestions.test.js.map +0 -1
- package/esm/engine/importExport.d.ts +0 -20
- package/esm/engine/importExport.js +0 -38
- package/esm/engine/importExport.js.map +0 -1
- package/esm/engine/importExport.test.d.ts +0 -1
- package/esm/engine/importExport.test.js +0 -22
- package/esm/engine/importExport.test.js.map +0 -1
- package/esm/engine/promptedQuestions.d.ts +0 -9
- package/esm/engine/promptedQuestions.js +0 -24
- package/esm/engine/promptedQuestions.js.map +0 -1
- package/esm/engine/promptedQuestions.test.d.ts +0 -1
- package/esm/engine/promptedQuestions.test.js +0 -11
- package/esm/engine/promptedQuestions.test.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [4.1.1](https://github.com/memori-ai/memori-api-client/compare/v4.1.0...v4.1.1) (2024-04-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Maintenance
|
|
7
|
+
|
|
8
|
+
* add new attributes to history message ([477420d](https://github.com/memori-ai/memori-api-client/commit/477420dd6fceba55189ff18b44ad4ee8c03c71e0))
|
|
9
|
+
|
|
10
|
+
## [4.1.0](https://github.com/memori-ai/memori-api-client/compare/v4.0.3...v4.1.0) (2024-04-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add new typings, implement date changed api call ([51ee854](https://github.com/memori-ai/memori-api-client/commit/51ee8546ee9b971cadb53a3d5caed71a9792a9d0))
|
|
16
|
+
|
|
3
17
|
## [4.0.3](https://github.com/memori-ai/memori-api-client/compare/v4.0.2...v4.0.3) (2024-03-29)
|
|
4
18
|
|
|
5
19
|
|
package/dist/engine/dialog.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
15
15
|
}) => Promise<ResponseSpec & {
|
|
16
16
|
currentState: DialogState;
|
|
17
17
|
}>;
|
|
18
|
-
postDateChangedEvent: (sessionId: string) => Promise<ResponseSpec
|
|
18
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<ResponseSpec & {
|
|
19
|
+
currentState: DialogState;
|
|
20
|
+
}>;
|
|
19
21
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<ResponseSpec & {
|
|
20
22
|
currentState: DialogState;
|
|
21
23
|
}>;
|
package/dist/engine/dialog.js
CHANGED
|
@@ -19,9 +19,10 @@ exports.default = (apiUrl) => ({
|
|
|
19
19
|
uncertaintyKm,
|
|
20
20
|
},
|
|
21
21
|
}),
|
|
22
|
-
postDateChangedEvent: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/DateChangedEvent/${sessionId}`, {
|
|
22
|
+
postDateChangedEvent: async (sessionId, date) => (0, apiFetcher_1.apiFetcher)(`/DateChangedEvent/${sessionId}`, {
|
|
23
23
|
method: 'POST',
|
|
24
24
|
apiUrl,
|
|
25
|
+
body: { date },
|
|
25
26
|
}),
|
|
26
27
|
postTagChangedEvent: async (sessionId, tag) => (0, apiFetcher_1.apiFetcher)(`/TagChangedEvent/${sessionId}`, {
|
|
27
28
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/engine/dialog.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAOlC,oBAAoB,EAAE,KAAK,EAAE,EAC3B,SAAS,EACT,IAAI,GAIL,EAAE,EAAE,CACH,IAAA,uBAAU,EAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE;YACJ,IAAI;SACL;KACF,CAIA;IAWH,qBAAqB,EAAE,KAAK,EAAE,EAC5B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAOd,EAAE,EAAE,CACH,IAAA,uBAAU,EAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE;YACJ,SAAS;YACT,QAAQ;YACR,SAAS;YACT,aAAa;SACd;KACF,CAIA;
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/engine/dialog.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAOlC,oBAAoB,EAAE,KAAK,EAAE,EAC3B,SAAS,EACT,IAAI,GAIL,EAAE,EAAE,CACH,IAAA,uBAAU,EAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE;YACJ,IAAI;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,EAAE,CAClD,IAAA,uBAAU,EAAC,uBAAuB,SAAS,EAAE,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAM7B,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,IAAA,uBAAU,EAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -536,7 +536,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
536
536
|
}) => Promise<import("./types").ResponseSpec & {
|
|
537
537
|
currentState: import("./types").DialogState;
|
|
538
538
|
}>;
|
|
539
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
539
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
540
|
+
currentState: import("./types").DialogState;
|
|
541
|
+
}>;
|
|
540
542
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
541
543
|
currentState: import("./types").DialogState;
|
|
542
544
|
}>;
|
|
@@ -565,7 +567,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
565
567
|
}) => Promise<import("./types").ResponseSpec & {
|
|
566
568
|
currentState: import("./types").DialogState;
|
|
567
569
|
}>;
|
|
568
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
570
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
571
|
+
currentState: import("./types").DialogState;
|
|
572
|
+
}>;
|
|
569
573
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
570
574
|
currentState: import("./types").DialogState;
|
|
571
575
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -546,7 +546,9 @@ declare const api: (hostname?: string) => {
|
|
|
546
546
|
}) => Promise<import("./types").ResponseSpec & {
|
|
547
547
|
currentState: import("./types").DialogState;
|
|
548
548
|
}>;
|
|
549
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
549
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
550
|
+
currentState: import("./types").DialogState;
|
|
551
|
+
}>;
|
|
550
552
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
551
553
|
currentState: import("./types").DialogState;
|
|
552
554
|
}>;
|
|
@@ -575,7 +577,9 @@ declare const api: (hostname?: string) => {
|
|
|
575
577
|
}) => Promise<import("./types").ResponseSpec & {
|
|
576
578
|
currentState: import("./types").DialogState;
|
|
577
579
|
}>;
|
|
578
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
580
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
581
|
+
currentState: import("./types").DialogState;
|
|
582
|
+
}>;
|
|
579
583
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
580
584
|
currentState: import("./types").DialogState;
|
|
581
585
|
}>;
|
package/dist/types.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare type Memori = {
|
|
|
44
44
|
avatar3DURL?: string;
|
|
45
45
|
avatarOriginal3DURL?: string;
|
|
46
46
|
needsPosition?: boolean;
|
|
47
|
+
needsDateTime?: boolean;
|
|
47
48
|
voiceType: string;
|
|
48
49
|
culture?: string;
|
|
49
50
|
publishedInTheMetaverse?: boolean;
|
|
@@ -418,8 +419,8 @@ export declare type Asset = {
|
|
|
418
419
|
creationTimestamp: string;
|
|
419
420
|
lastChangeTimestamp: string;
|
|
420
421
|
};
|
|
421
|
-
export
|
|
422
|
-
text
|
|
422
|
+
export type SearchQuery = {
|
|
423
|
+
text?: string;
|
|
423
424
|
searchType?: 'Literal' | 'Semantic';
|
|
424
425
|
date?: string;
|
|
425
426
|
dateUncertaintyDays?: number;
|
|
@@ -431,8 +432,15 @@ export declare type SearchQuery = {
|
|
|
431
432
|
ignoreLastRead?: boolean;
|
|
432
433
|
excludedMemoryIDs?: string[];
|
|
433
434
|
numberOfResults?: number;
|
|
435
|
+
contextVars?: {
|
|
436
|
+
[variable: string]: string;
|
|
437
|
+
};
|
|
438
|
+
contextVarsToSet?: {
|
|
439
|
+
[variable: string]: string;
|
|
440
|
+
};
|
|
441
|
+
memoryTags?: string[];
|
|
434
442
|
};
|
|
435
|
-
export
|
|
443
|
+
export type SearchMatches = {
|
|
436
444
|
confidence: number;
|
|
437
445
|
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
438
446
|
memory: Memory;
|
|
@@ -517,6 +525,12 @@ export declare type Message = {
|
|
|
517
525
|
contextVars?: {
|
|
518
526
|
[key: string]: string;
|
|
519
527
|
};
|
|
528
|
+
date?: string;
|
|
529
|
+
dateUncertaintyDays?: number;
|
|
530
|
+
placeName?: string;
|
|
531
|
+
placeLatitude?: number;
|
|
532
|
+
placeLongitude?: number;
|
|
533
|
+
placeUncertaintyKm?: number;
|
|
520
534
|
};
|
|
521
535
|
export type ConsumptionLog = {
|
|
522
536
|
consumptionLogID: string;
|
package/esm/engine/dialog.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
15
15
|
}) => Promise<ResponseSpec & {
|
|
16
16
|
currentState: DialogState;
|
|
17
17
|
}>;
|
|
18
|
-
postDateChangedEvent: (sessionId: string) => Promise<ResponseSpec
|
|
18
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<ResponseSpec & {
|
|
19
|
+
currentState: DialogState;
|
|
20
|
+
}>;
|
|
19
21
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<ResponseSpec & {
|
|
20
22
|
currentState: DialogState;
|
|
21
23
|
}>;
|
package/esm/engine/dialog.js
CHANGED
|
@@ -17,9 +17,10 @@ export default (apiUrl) => ({
|
|
|
17
17
|
uncertaintyKm,
|
|
18
18
|
},
|
|
19
19
|
}),
|
|
20
|
-
postDateChangedEvent: async (sessionId) => apiFetcher(`/DateChangedEvent/${sessionId}`, {
|
|
20
|
+
postDateChangedEvent: async (sessionId, date) => apiFetcher(`/DateChangedEvent/${sessionId}`, {
|
|
21
21
|
method: 'POST',
|
|
22
22
|
apiUrl,
|
|
23
|
+
body: { date },
|
|
23
24
|
}),
|
|
24
25
|
postTagChangedEvent: async (sessionId, tag) => apiFetcher(`/TagChangedEvent/${sessionId}`, {
|
|
25
26
|
method: 'POST',
|
package/esm/engine/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/engine/dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAOlC,oBAAoB,EAAE,KAAK,EAAE,EAC3B,SAAS,EACT,IAAI,GAIL,EAAE,EAAE,CACH,UAAU,CAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE;YACJ,IAAI;SACL;KACF,CAIA;IAWH,qBAAqB,EAAE,KAAK,EAAE,EAC5B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAOd,EAAE,EAAE,CACH,UAAU,CAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE;YACJ,SAAS;YACT,QAAQ;YACR,SAAS;YACT,aAAa;SACd;KACF,CAIA;
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/engine/dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAOlC,oBAAoB,EAAE,KAA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sB,SAAS,EAAE,EAAE;QAC5C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAM7B,sBAAsB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAClD,UAAU,CAAC,uBAAuB,SAAS,EAAE,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAM7B,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,UAAU,CAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
package/esm/engine.d.ts
CHANGED
|
@@ -536,7 +536,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
536
536
|
}) => Promise<import("./types").ResponseSpec & {
|
|
537
537
|
currentState: import("./types").DialogState;
|
|
538
538
|
}>;
|
|
539
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
539
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
540
|
+
currentState: import("./types").DialogState;
|
|
541
|
+
}>;
|
|
540
542
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
541
543
|
currentState: import("./types").DialogState;
|
|
542
544
|
}>;
|
|
@@ -565,7 +567,9 @@ declare const _default: (apiUrl: string) => {
|
|
|
565
567
|
}) => Promise<import("./types").ResponseSpec & {
|
|
566
568
|
currentState: import("./types").DialogState;
|
|
567
569
|
}>;
|
|
568
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
570
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
571
|
+
currentState: import("./types").DialogState;
|
|
572
|
+
}>;
|
|
569
573
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
570
574
|
currentState: import("./types").DialogState;
|
|
571
575
|
}>;
|
package/esm/index.d.ts
CHANGED
|
@@ -546,7 +546,9 @@ declare const api: (hostname?: string) => {
|
|
|
546
546
|
}) => Promise<import("./types").ResponseSpec & {
|
|
547
547
|
currentState: import("./types").DialogState;
|
|
548
548
|
}>;
|
|
549
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
549
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
550
|
+
currentState: import("./types").DialogState;
|
|
551
|
+
}>;
|
|
550
552
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
551
553
|
currentState: import("./types").DialogState;
|
|
552
554
|
}>;
|
|
@@ -575,7 +577,9 @@ declare const api: (hostname?: string) => {
|
|
|
575
577
|
}) => Promise<import("./types").ResponseSpec & {
|
|
576
578
|
currentState: import("./types").DialogState;
|
|
577
579
|
}>;
|
|
578
|
-
postDateChangedEvent: (sessionId: string) => Promise<import("./types").ResponseSpec
|
|
580
|
+
postDateChangedEvent: (sessionId: string, date: string) => Promise<import("./types").ResponseSpec & {
|
|
581
|
+
currentState: import("./types").DialogState;
|
|
582
|
+
}>;
|
|
579
583
|
postTagChangedEvent: (sessionId: string, tag: string) => Promise<import("./types").ResponseSpec & {
|
|
580
584
|
currentState: import("./types").DialogState;
|
|
581
585
|
}>;
|
package/esm/types.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare type Memori = {
|
|
|
44
44
|
avatar3DURL?: string;
|
|
45
45
|
avatarOriginal3DURL?: string;
|
|
46
46
|
needsPosition?: boolean;
|
|
47
|
+
needsDateTime?: boolean;
|
|
47
48
|
voiceType: string;
|
|
48
49
|
culture?: string;
|
|
49
50
|
publishedInTheMetaverse?: boolean;
|
|
@@ -418,8 +419,8 @@ export declare type Asset = {
|
|
|
418
419
|
creationTimestamp: string;
|
|
419
420
|
lastChangeTimestamp: string;
|
|
420
421
|
};
|
|
421
|
-
export
|
|
422
|
-
text
|
|
422
|
+
export type SearchQuery = {
|
|
423
|
+
text?: string;
|
|
423
424
|
searchType?: 'Literal' | 'Semantic';
|
|
424
425
|
date?: string;
|
|
425
426
|
dateUncertaintyDays?: number;
|
|
@@ -431,8 +432,15 @@ export declare type SearchQuery = {
|
|
|
431
432
|
ignoreLastRead?: boolean;
|
|
432
433
|
excludedMemoryIDs?: string[];
|
|
433
434
|
numberOfResults?: number;
|
|
435
|
+
contextVars?: {
|
|
436
|
+
[variable: string]: string;
|
|
437
|
+
};
|
|
438
|
+
contextVarsToSet?: {
|
|
439
|
+
[variable: string]: string;
|
|
440
|
+
};
|
|
441
|
+
memoryTags?: string[];
|
|
434
442
|
};
|
|
435
|
-
export
|
|
443
|
+
export type SearchMatches = {
|
|
436
444
|
confidence: number;
|
|
437
445
|
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
438
446
|
memory: Memory;
|
|
@@ -517,6 +525,12 @@ export declare type Message = {
|
|
|
517
525
|
contextVars?: {
|
|
518
526
|
[key: string]: string;
|
|
519
527
|
};
|
|
528
|
+
date?: string;
|
|
529
|
+
dateUncertaintyDays?: number;
|
|
530
|
+
placeName?: string;
|
|
531
|
+
placeLatitude?: number;
|
|
532
|
+
placeLongitude?: number;
|
|
533
|
+
placeUncertaintyKm?: number;
|
|
520
534
|
};
|
|
521
535
|
export type ConsumptionLog = {
|
|
522
536
|
consumptionLogID: string;
|
package/package.json
CHANGED
package/src/engine/dialog.ts
CHANGED
|
@@ -73,12 +73,19 @@ export default (apiUrl: string) => ({
|
|
|
73
73
|
/**
|
|
74
74
|
* Submits a Date Changed event to the session's Dialog State Machine.
|
|
75
75
|
* @param {string} sessionId The session ID
|
|
76
|
+
* @param {string} date Specifications for a Date Changed event. A Date Changed event changes the Current Date: the State Machine will use the new date for subsequent question resolution.
|
|
77
|
+
* New date, in the format yyyy/MM/dd HH:mm:ss zzz, e.g. 2020/01/01 09:30:00 +02.
|
|
76
78
|
*/
|
|
77
|
-
postDateChangedEvent: async (sessionId: string) =>
|
|
79
|
+
postDateChangedEvent: async (sessionId: string, date: string) =>
|
|
78
80
|
apiFetcher(`/DateChangedEvent/${sessionId}`, {
|
|
79
81
|
method: 'POST',
|
|
80
82
|
apiUrl,
|
|
81
|
-
|
|
83
|
+
body: { date },
|
|
84
|
+
}) as Promise<
|
|
85
|
+
ResponseSpec & {
|
|
86
|
+
currentState: DialogState;
|
|
87
|
+
}
|
|
88
|
+
>,
|
|
82
89
|
|
|
83
90
|
/**
|
|
84
91
|
* Submits a Tag Changed event to the session's Dialog State Machine.
|
package/src/types.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare type Memori = {
|
|
|
55
55
|
*/
|
|
56
56
|
avatarOriginal3DURL?: string;
|
|
57
57
|
needsPosition?: boolean;
|
|
58
|
+
needsDateTime?: boolean;
|
|
58
59
|
voiceType: string;
|
|
59
60
|
culture?: string;
|
|
60
61
|
publishedInTheMetaverse?: boolean;
|
|
@@ -528,24 +529,115 @@ export declare type Asset = {
|
|
|
528
529
|
lastChangeTimestamp: string;
|
|
529
530
|
};
|
|
530
531
|
|
|
531
|
-
export
|
|
532
|
-
|
|
532
|
+
export type SearchQuery = {
|
|
533
|
+
/**
|
|
534
|
+
* @type {string}
|
|
535
|
+
* Search query. If omitted, either a Date or a Place must be set. Used only for Search, ignored for Random picking and Memory Hints.
|
|
536
|
+
*/
|
|
537
|
+
text?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @type {?string=Literal}
|
|
541
|
+
* How to interpret the search query in the Text property:
|
|
542
|
+
* - If "Semantic", the query is interpreted as a full question in natural language, and the search is performed in the same way a question would be posed to the Dialog State Machine.
|
|
543
|
+
* - If "Literal", the query is intented as keyword, or part of keyword, and the search is perfomed by looking for it as a substring in the text and titles of Memories.
|
|
544
|
+
* - If omitted the search is Semantic by default. Used only for Search, ignored for Random picking and Memory Hints.
|
|
545
|
+
*/
|
|
533
546
|
searchType?: 'Literal' | 'Semantic';
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* @type {?string}
|
|
550
|
+
* Approximate date of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints.
|
|
551
|
+
*/
|
|
534
552
|
date?: string;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* @type {?number}
|
|
556
|
+
* Uncertainty of the date, in days. Required if Date is specified. Used for Search and Random picking, ignored for Memory Hints.
|
|
557
|
+
*/
|
|
535
558
|
dateUncertaintyDays?: number;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* @type {?string}
|
|
562
|
+
* Name of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints.
|
|
563
|
+
*/
|
|
536
564
|
placeName?: string;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* @type {?number}
|
|
568
|
+
* Latitude of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints.
|
|
569
|
+
*/
|
|
537
570
|
placeLatitude?: number;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* @type {?number}
|
|
574
|
+
* Longitude of the approximate place of Memories to limit the search to. Applies only to Stories. Used for Search and Random picking, ignored for Memory Hints.
|
|
575
|
+
*/
|
|
538
576
|
placeLongitude?: number;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* @type {?number}
|
|
580
|
+
* Uncertainty of place, in kilometers. Required if PlaceName or PlaceLatitude and PlaceLongitude are specified. Used for Search and Random picking, ignored for Memory Hints.
|
|
581
|
+
*/
|
|
539
582
|
placeUncertaintyKm?: number;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* @type {?string}
|
|
586
|
+
* If specified, the search is extended to Memories associated with a Receiver with this tag. If omitted the search is limited to public Memories. As a special case, if the Giver tag is specified then the search is extended to all Memories, whoever they are associated to.
|
|
587
|
+
*/
|
|
540
588
|
tag?: string;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* @type {?boolean}
|
|
592
|
+
* If set to True, recently picked Memories will not be deprioritized. This means that a Memory never picked and a Memory picked just a moment ago will have the same probability to be picked again. If omitted or set to False, recently picked Memories will be much less probable to be picked again. Used only for Random picking, ignored for Search and Memory Hints.
|
|
593
|
+
*/
|
|
541
594
|
ignoreLastRead?: boolean;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* @type {?string[]}
|
|
598
|
+
* Optional list of Memory IDs that must be excluded from the search result.
|
|
599
|
+
*/
|
|
542
600
|
excludedMemoryIDs?: string[];
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* @type {?number=5}
|
|
604
|
+
* Optional number of results. If omitted defaults to 5.
|
|
605
|
+
*/
|
|
543
606
|
numberOfResults?: number;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Optional context to be matched with ContextVarsToMatch of Memories. Used for Search, Random picking and Memory Hints.
|
|
610
|
+
*/
|
|
611
|
+
contextVars?: { [variable: string]: string };
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Optional context to be matched with ContextVarsToSet of Memories. Used only for Search, ignored for Random picking and Memory Hints.
|
|
615
|
+
*/
|
|
616
|
+
contextVarsToSet?: { [variable: string]: string };
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* @type {?string[]}
|
|
620
|
+
* Optional list of memory tags. If specified, the search is limited to Memories including ALL the specified tags.
|
|
621
|
+
*/
|
|
622
|
+
memoryTags?: string[];
|
|
544
623
|
};
|
|
545
624
|
|
|
546
|
-
export
|
|
625
|
+
export type SearchMatches = {
|
|
626
|
+
/**
|
|
627
|
+
* @type {number}
|
|
628
|
+
* Match confidence, between 0.0 (no confidence) and 1.0 (full confidence).
|
|
629
|
+
*/
|
|
547
630
|
confidence: number;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* @type {?string}
|
|
634
|
+
* Confidence level, e.g. LOW, MEDIUM or HIGH.
|
|
635
|
+
*/
|
|
548
636
|
confidenceLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* @type {Memory}
|
|
640
|
+
*/
|
|
549
641
|
memory: Memory;
|
|
550
642
|
};
|
|
551
643
|
|
|
@@ -632,6 +724,12 @@ export declare type Message = {
|
|
|
632
724
|
emitter?: string;
|
|
633
725
|
timestamp?: string;
|
|
634
726
|
contextVars?: { [key: string]: string };
|
|
727
|
+
date?: string;
|
|
728
|
+
dateUncertaintyDays?: number;
|
|
729
|
+
placeName?: string;
|
|
730
|
+
placeLatitude?: number;
|
|
731
|
+
placeLongitude?: number;
|
|
732
|
+
placeUncertaintyKm?: number;
|
|
635
733
|
};
|
|
636
734
|
|
|
637
735
|
export type ConsumptionLog = {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec, ImportParams, ImportResponse, ExportCSVParams } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
importCSV: (sessionId: string, rows: string[], params: ImportParams) => Promise<ResponseSpec & {
|
|
4
|
-
status: ImportResponse;
|
|
5
|
-
}>;
|
|
6
|
-
importProcesses: (sessionId: string) => Promise<ResponseSpec & {
|
|
7
|
-
importProcesses: ImportResponse[];
|
|
8
|
-
}>;
|
|
9
|
-
importStatus: (importID: string) => Promise<ResponseSpec & {
|
|
10
|
-
status: ImportResponse;
|
|
11
|
-
}>;
|
|
12
|
-
stopImport: (importID: string) => Promise<ResponseSpec & {
|
|
13
|
-
status: ImportResponse;
|
|
14
|
-
}>;
|
|
15
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
16
|
-
status: ImportResponse;
|
|
17
|
-
}>;
|
|
18
|
-
exportCSV: (sessionID: string, params: ExportCSVParams) => Promise<string>;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const apiFetcher_1 = require("../apiFetcher");
|
|
4
|
-
exports.default = (apiUrl) => ({
|
|
5
|
-
importCSV: async (sessionId, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportCSV/${sessionId}`, {
|
|
6
|
-
method: 'POST',
|
|
7
|
-
apiUrl,
|
|
8
|
-
body: {
|
|
9
|
-
rows,
|
|
10
|
-
...params,
|
|
11
|
-
},
|
|
12
|
-
}),
|
|
13
|
-
importProcesses: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportProcesses/${sessionId}`, {
|
|
14
|
-
method: 'GET',
|
|
15
|
-
apiUrl,
|
|
16
|
-
}),
|
|
17
|
-
importStatus: async (importID) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportStatus/${importID}`, {
|
|
18
|
-
method: 'GET',
|
|
19
|
-
apiUrl,
|
|
20
|
-
}),
|
|
21
|
-
stopImport: async (importID) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/StopImport/${importID}`, {
|
|
22
|
-
method: 'POST',
|
|
23
|
-
apiUrl,
|
|
24
|
-
}),
|
|
25
|
-
importTXT: async (sessionId, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportTXT/${sessionId}`, {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
apiUrl,
|
|
28
|
-
body: {
|
|
29
|
-
rows,
|
|
30
|
-
...params,
|
|
31
|
-
},
|
|
32
|
-
}),
|
|
33
|
-
exportCSV: async (sessionID, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ExportCSV/${sessionID}`, {
|
|
34
|
-
method: 'POST',
|
|
35
|
-
apiUrl,
|
|
36
|
-
body: params,
|
|
37
|
-
text: true,
|
|
38
|
-
}),
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=importExport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/engine/importExport.ts"],"names":[],"mappings":";;AAMA,8CAA2C;AAQ3C,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
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const index_1 = tslib_1.__importDefault(require("../index"));
|
|
5
|
-
const client = (0, index_1.default)('https://backend.memori.ai');
|
|
6
|
-
describe('engine/importExport api', () => {
|
|
7
|
-
const importCsvParams = {
|
|
8
|
-
includedRows: [0, 1],
|
|
9
|
-
forceImport: false,
|
|
10
|
-
csvSpecs: {
|
|
11
|
-
hasHeaders: false,
|
|
12
|
-
questionColumnName: 'Title',
|
|
13
|
-
answerColumnName: 'Answers',
|
|
14
|
-
csvSeparator: ',',
|
|
15
|
-
questionTitleVariantsSeparator: '|',
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
it('works on import apis', async () => {
|
|
19
|
-
expect(await client.importExport.importCSV('768b9654-e781-4c3c-81fa-ae1529d1bfbe', ['Title,Answers', 'Chi sei?,Sono un Memori'], importCsvParams)).not.toBeNull();
|
|
20
|
-
});
|
|
21
|
-
it('works on import apis with shorthand version', async () => {
|
|
22
|
-
expect(await client.importCSV('768b9654-e781-4c3c-81fa-ae1529d1bfbe', ['Title,Answers', 'Chi sei?,Sono un Memori'], importCsvParams)).not.toBeNull();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=importExport.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.test.js","sourceRoot":"","sources":["../../src/engine/importExport.test.ts"],"names":[],"mappings":";;;AACA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,eAAe,GAAiB;QACpC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,UAAU,EAAE,KAAK;YACjB,kBAAkB,EAAE,OAAO;YAC3B,gBAAgB,EAAE,SAAS;YAC3B,YAAY,EAAE,GAAG;YACjB,8BAA8B,EAAE,GAAG;SACpC;KACF,CAAC;IAEF,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,CACJ,MAAM,MAAM,CAAC,YAAY,CAAC,SAAS,CACjC,sCAAsC,EACtC,CAAC,eAAe,EAAE,yBAAyB,CAAC,EAC5C,eAAe,CAChB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,CACJ,MAAM,MAAM,CAAC,SAAS,CACpB,sCAAsC,EACtC,CAAC,eAAe,EAAE,yBAAyB,CAAC,EAC5C,eAAe,CAChB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
getPromptedQuestions: (sessionId: string) => Promise<ResponseSpec>;
|
|
4
|
-
getPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
5
|
-
patchPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
6
|
-
deletePromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
7
|
-
postPromptedQuestion: (sessionId: string) => Promise<ResponseSpec>;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const apiFetcher_1 = require("../apiFetcher");
|
|
4
|
-
exports.default = (apiUrl) => ({
|
|
5
|
-
getPromptedQuestions: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/PromptedQuestions/${sessionId}`, {
|
|
6
|
-
method: 'GET',
|
|
7
|
-
apiUrl,
|
|
8
|
-
}),
|
|
9
|
-
getPromptedQuestion: async (sessionId, promptId) => (0, apiFetcher_1.apiFetcher)(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
10
|
-
method: 'GET',
|
|
11
|
-
apiUrl,
|
|
12
|
-
}),
|
|
13
|
-
patchPromptedQuestion: async (sessionId, promptId) => (0, apiFetcher_1.apiFetcher)(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
14
|
-
method: 'GET',
|
|
15
|
-
apiUrl,
|
|
16
|
-
}),
|
|
17
|
-
deletePromptedQuestion: async (sessionId, promptId) => (0, apiFetcher_1.apiFetcher)(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
18
|
-
method: 'GET',
|
|
19
|
-
apiUrl,
|
|
20
|
-
}),
|
|
21
|
-
postPromptedQuestion: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/PromptedQuestion/${sessionId}`, {
|
|
22
|
-
method: 'GET',
|
|
23
|
-
apiUrl,
|
|
24
|
-
}),
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=promptedQuestions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptedQuestions.js","sourceRoot":"","sources":["../../src/engine/promptedQuestions.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAKlC,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,IAAA,uBAAU,EAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,mBAAmB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACjE,IAAA,uBAAU,EAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,qBAAqB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACnE,IAAA,uBAAU,EAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,sBAAsB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACpE,IAAA,uBAAU,EAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAM7B,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,IAAA,uBAAU,EAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const index_1 = tslib_1.__importDefault(require("../index"));
|
|
5
|
-
const client = (0, index_1.default)('https://backend.memori.ai');
|
|
6
|
-
describe('engine/promptedQuestions api', () => {
|
|
7
|
-
it('works on promptedQuestions apis', async () => {
|
|
8
|
-
expect(await client.promptedQuestions.getPromptedQuestion('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
9
|
-
});
|
|
10
|
-
it('works on promptedQuestions apis with shorthand version', async () => {
|
|
11
|
-
expect(await client.getPromptedQuestion('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=promptedQuestions.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptedQuestions.test.js","sourceRoot":"","sources":["../../src/engine/promptedQuestions.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,MAAM,CACJ,MAAM,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAChD,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,MAAM,CACJ,MAAM,MAAM,CAAC,mBAAmB,CAC9B,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec, ImportParams, ImportResponse, ExportCSVParams } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
importCSV: (sessionId: string, rows: string[], params: ImportParams) => Promise<ResponseSpec & {
|
|
4
|
-
status: ImportResponse;
|
|
5
|
-
}>;
|
|
6
|
-
importProcesses: (sessionId: string) => Promise<ResponseSpec & {
|
|
7
|
-
importProcesses: ImportResponse[];
|
|
8
|
-
}>;
|
|
9
|
-
importStatus: (importID: string) => Promise<ResponseSpec & {
|
|
10
|
-
status: ImportResponse;
|
|
11
|
-
}>;
|
|
12
|
-
stopImport: (importID: string) => Promise<ResponseSpec & {
|
|
13
|
-
status: ImportResponse;
|
|
14
|
-
}>;
|
|
15
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
16
|
-
status: ImportResponse;
|
|
17
|
-
}>;
|
|
18
|
-
exportCSV: (sessionID: string, params: ExportCSVParams) => Promise<string>;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { apiFetcher } from '../apiFetcher';
|
|
2
|
-
export default (apiUrl) => ({
|
|
3
|
-
importCSV: async (sessionId, rows, params) => apiFetcher(`/ImportExport/ImportCSV/${sessionId}`, {
|
|
4
|
-
method: 'POST',
|
|
5
|
-
apiUrl,
|
|
6
|
-
body: {
|
|
7
|
-
rows,
|
|
8
|
-
...params,
|
|
9
|
-
},
|
|
10
|
-
}),
|
|
11
|
-
importProcesses: async (sessionId) => apiFetcher(`/ImportExport/ImportProcesses/${sessionId}`, {
|
|
12
|
-
method: 'GET',
|
|
13
|
-
apiUrl,
|
|
14
|
-
}),
|
|
15
|
-
importStatus: async (importID) => apiFetcher(`/ImportExport/ImportStatus/${importID}`, {
|
|
16
|
-
method: 'GET',
|
|
17
|
-
apiUrl,
|
|
18
|
-
}),
|
|
19
|
-
stopImport: async (importID) => apiFetcher(`/ImportExport/StopImport/${importID}`, {
|
|
20
|
-
method: 'POST',
|
|
21
|
-
apiUrl,
|
|
22
|
-
}),
|
|
23
|
-
importTXT: async (sessionId, rows, params) => apiFetcher(`/ImportExport/ImportTXT/${sessionId}`, {
|
|
24
|
-
method: 'POST',
|
|
25
|
-
apiUrl,
|
|
26
|
-
body: {
|
|
27
|
-
rows,
|
|
28
|
-
...params,
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
exportCSV: async (sessionID, params) => apiFetcher(`/ImportExport/ExportCSV/${sessionID}`, {
|
|
32
|
-
method: 'POST',
|
|
33
|
-
apiUrl,
|
|
34
|
-
body: params,
|
|
35
|
-
text: true,
|
|
36
|
-
}),
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=importExport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.js","sour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+0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import memori from '../index';
|
|
2
|
-
const client = memori('https://backend.memori.ai');
|
|
3
|
-
describe('engine/importExport api', () => {
|
|
4
|
-
const importCsvParams = {
|
|
5
|
-
includedRows: [0, 1],
|
|
6
|
-
forceImport: false,
|
|
7
|
-
csvSpecs: {
|
|
8
|
-
hasHeaders: false,
|
|
9
|
-
questionColumnName: 'Title',
|
|
10
|
-
answerColumnName: 'Answers',
|
|
11
|
-
csvSeparator: ',',
|
|
12
|
-
questionTitleVariantsSeparator: '|',
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
it('works on import apis', async () => {
|
|
16
|
-
expect(await client.importExport.importCSV('768b9654-e781-4c3c-81fa-ae1529d1bfbe', ['Title,Answers', 'Chi sei?,Sono un Memori'], importCsvParams)).not.toBeNull();
|
|
17
|
-
});
|
|
18
|
-
it('works on import apis with shorthand version', async () => {
|
|
19
|
-
expect(await client.importCSV('768b9654-e781-4c3c-81fa-ae1529d1bfbe', ['Title,Answers', 'Chi sei?,Sono un Memori'], importCsvParams)).not.toBeNull();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=importExport.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importExport.test.js","sourceRoot":"","sources":["../../src/engine/importExport.test.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,MAAM,eAAe,GAAiB;QACpC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,UAAU,EAAE,KAAK;YACjB,kBAAkB,EAAE,OAAO;YAC3B,gBAAgB,EAAE,SAAS;YAC3B,YAAY,EAAE,GAAG;YACjB,8BAA8B,EAAE,GAAG;SACpC;KACF,CAAC;IAEF,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,CACJ,MAAM,MAAM,CAAC,YAAY,CAAC,SAAS,CACjC,sCAAsC,EACtC,CAAC,eAAe,EAAE,yBAAyB,CAAC,EAC5C,eAAe,CAChB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,CACJ,MAAM,MAAM,CAAC,SAAS,CACpB,sCAAsC,EACtC,CAAC,eAAe,EAAE,yBAAyB,CAAC,EAC5C,eAAe,CAChB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec } from '../types';
|
|
2
|
-
declare const _default: (apiUrl: string) => {
|
|
3
|
-
getPromptedQuestions: (sessionId: string) => Promise<ResponseSpec>;
|
|
4
|
-
getPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
5
|
-
patchPromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
6
|
-
deletePromptedQuestion: (sessionId: string, promptId: string) => Promise<ResponseSpec>;
|
|
7
|
-
postPromptedQuestion: (sessionId: string) => Promise<ResponseSpec>;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { apiFetcher } from '../apiFetcher';
|
|
2
|
-
export default (apiUrl) => ({
|
|
3
|
-
getPromptedQuestions: async (sessionId) => apiFetcher(`/PromptedQuestions/${sessionId}`, {
|
|
4
|
-
method: 'GET',
|
|
5
|
-
apiUrl,
|
|
6
|
-
}),
|
|
7
|
-
getPromptedQuestion: async (sessionId, promptId) => apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
8
|
-
method: 'GET',
|
|
9
|
-
apiUrl,
|
|
10
|
-
}),
|
|
11
|
-
patchPromptedQuestion: async (sessionId, promptId) => apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
12
|
-
method: 'GET',
|
|
13
|
-
apiUrl,
|
|
14
|
-
}),
|
|
15
|
-
deletePromptedQuestion: async (sessionId, promptId) => apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
16
|
-
method: 'GET',
|
|
17
|
-
apiUrl,
|
|
18
|
-
}),
|
|
19
|
-
postPromptedQuestion: async (sessionId) => apiFetcher(`/PromptedQuestion/${sessionId}`, {
|
|
20
|
-
method: 'GET',
|
|
21
|
-
apiUrl,
|
|
22
|
-
}),
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=promptedQuestions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptedQuestions.js","sourceRoot":"","sources":["../../src/engine/promptedQuestions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAKlC,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,UAAU,CAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,mBAAmB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACjE,UAAU,CAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,qBAAqB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACnE,UAAU,CAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAO7B,sBAAsB,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACpE,UAAU,CAAC,qBAAqB,SAAS,IAAI,QAAQ,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;IAM7B,oBAAoB,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAChD,UAAU,CAAC,qBAAqB,SAAS,EAAE,EAAE;QAC3C,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAA0B;CAC9B,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import memori from '../index';
|
|
2
|
-
const client = memori('https://backend.memori.ai');
|
|
3
|
-
describe('engine/promptedQuestions api', () => {
|
|
4
|
-
it('works on promptedQuestions apis', async () => {
|
|
5
|
-
expect(await client.promptedQuestions.getPromptedQuestion('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
6
|
-
});
|
|
7
|
-
it('works on promptedQuestions apis with shorthand version', async () => {
|
|
8
|
-
expect(await client.getPromptedQuestion('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=promptedQuestions.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptedQuestions.test.js","sourceRoot":"","sources":["../../src/engine/promptedQuestions.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,MAAM,CACJ,MAAM,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAChD,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;QACtE,MAAM,CACJ,MAAM,MAAM,CAAC,mBAAmB,CAC9B,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|