@memori.ai/memori-api-client 4.2.0 → 4.2.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 +13 -0
- package/dist/engine/search.d.ts +10 -3
- package/dist/engine/search.js +8 -2
- package/dist/engine/search.js.map +1 -1
- package/dist/engine.d.ts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/types.d.ts +4 -0
- package/esm/engine/search.d.ts +10 -3
- package/esm/engine/search.js +8 -2
- package/esm/engine/search.js.map +1 -1
- package/esm/engine.d.ts +18 -4
- package/esm/index.d.ts +18 -4
- package/esm/types.d.ts +4 -0
- package/package.json +1 -1
- package/src/engine/search.ts +31 -5
- package/src/types.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [4.2.1](https://github.com/memori-ai/memori-api-client/compare/v4.2.0...v4.2.1) (2024-05-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Maintenance
|
|
7
|
+
|
|
8
|
+
* add memoryTags in DialogState ([081628d](https://github.com/memori-ai/memori-api-client/commit/081628dd4b8e7c37ba7f0fdde493defe11e4ddd9))
|
|
9
|
+
* add new Memory attributes ([b5081a6](https://github.com/memori-ai/memori-api-client/commit/b5081a6fd6a3e8d8a81b8046fc7d594553e42761))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
* update search apis ([becc45f](https://github.com/memori-ai/memori-api-client/commit/becc45fa54cd52238e6aa44714bf2541476969f5))
|
|
15
|
+
|
|
3
16
|
## [4.2.0](https://github.com/memori-ai/memori-api-client/compare/v4.1.3...v4.2.0) (2024-05-03)
|
|
4
17
|
|
|
5
18
|
|
package/dist/engine/search.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { ResponseSpec, SearchQuery, SearchMatches } from '../types';
|
|
1
|
+
import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
3
|
searchMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
4
4
|
matches: SearchMatches[];
|
|
5
5
|
}>;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
getRandomMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
7
|
+
memories: Memory[];
|
|
8
|
+
}>;
|
|
9
|
+
getHints: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
10
|
+
memoryHints: string[];
|
|
11
|
+
}>;
|
|
12
|
+
getMemoryTags: (sessionId: string) => Promise<ResponseSpec & {
|
|
13
|
+
memoryTags: string[];
|
|
14
|
+
}>;
|
|
8
15
|
};
|
|
9
16
|
export default _default;
|
package/dist/engine/search.js
CHANGED
|
@@ -7,11 +7,17 @@ exports.default = (apiUrl) => ({
|
|
|
7
7
|
body: query,
|
|
8
8
|
apiUrl,
|
|
9
9
|
}),
|
|
10
|
-
|
|
10
|
+
getRandomMemory: async (sessionId, query) => (0, apiFetcher_1.apiFetcher)(`/Random/${sessionId}`, {
|
|
11
11
|
method: 'POST',
|
|
12
|
+
body: query,
|
|
13
|
+
apiUrl,
|
|
14
|
+
}),
|
|
15
|
+
getHints: async (sessionId, query) => (0, apiFetcher_1.apiFetcher)(`/Hints/${sessionId}`, {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: query,
|
|
12
18
|
apiUrl,
|
|
13
19
|
}),
|
|
14
|
-
|
|
20
|
+
getMemoryTags: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/MemoryTags/${sessionId}`, {
|
|
15
21
|
method: 'GET',
|
|
16
22
|
apiUrl,
|
|
17
23
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/engine/search.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAC7D,IAAA,uBAAU,EAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/engine/search.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAC7D,IAAA,uBAAU,EAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IAQH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAChE,IAAA,uBAAU,EAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IASH,QAAQ,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CACzD,IAAA,uBAAU,EAAC,UAAU,SAAS,EAAE,EAAE;QAChC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IAMH,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACzC,IAAA,uBAAU,EAAC,eAAe,SAAS,EAAE,EAAE;QACrC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;CACJ,CAAC,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -342,14 +342,28 @@ declare const _default: (apiUrl: string) => {
|
|
|
342
342
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
343
343
|
matches: import("./types").SearchMatches[];
|
|
344
344
|
}>;
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
346
|
+
memories: import("./types").Memory[];
|
|
347
|
+
}>;
|
|
348
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
349
|
+
memoryHints: string[];
|
|
350
|
+
}>;
|
|
351
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
352
|
+
memoryTags: string[];
|
|
353
|
+
}>;
|
|
347
354
|
search: {
|
|
348
355
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
349
356
|
matches: import("./types").SearchMatches[];
|
|
350
357
|
}>;
|
|
351
|
-
|
|
352
|
-
|
|
358
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
|
+
memories: import("./types").Memory[];
|
|
360
|
+
}>;
|
|
361
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
memoryHints: string[];
|
|
363
|
+
}>;
|
|
364
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
365
|
+
memoryTags: string[];
|
|
366
|
+
}>;
|
|
353
367
|
};
|
|
354
368
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
355
369
|
people: import("./types").Person[];
|
package/dist/index.d.ts
CHANGED
|
@@ -352,14 +352,28 @@ declare const api: (hostname?: string) => {
|
|
|
352
352
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
353
353
|
matches: import("./types").SearchMatches[];
|
|
354
354
|
}>;
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
356
|
+
memories: import("./types").Memory[];
|
|
357
|
+
}>;
|
|
358
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
|
+
memoryHints: string[];
|
|
360
|
+
}>;
|
|
361
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
memoryTags: string[];
|
|
363
|
+
}>;
|
|
357
364
|
search: {
|
|
358
365
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
366
|
matches: import("./types").SearchMatches[];
|
|
360
367
|
}>;
|
|
361
|
-
|
|
362
|
-
|
|
368
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
369
|
+
memories: import("./types").Memory[];
|
|
370
|
+
}>;
|
|
371
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
372
|
+
memoryHints: string[];
|
|
373
|
+
}>;
|
|
374
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
375
|
+
memoryTags: string[];
|
|
376
|
+
}>;
|
|
363
377
|
};
|
|
364
378
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
365
379
|
people: import("./types").Person[];
|
package/dist/types.d.ts
CHANGED
|
@@ -364,6 +364,7 @@ export declare type DialogState = {
|
|
|
364
364
|
contextVars?: {
|
|
365
365
|
[key: string]: string;
|
|
366
366
|
};
|
|
367
|
+
memoryTags?: string[];
|
|
367
368
|
};
|
|
368
369
|
export declare type Person = {
|
|
369
370
|
personID?: string;
|
|
@@ -478,6 +479,7 @@ export declare type Memory = {
|
|
|
478
479
|
help?: boolean;
|
|
479
480
|
notPickable?: boolean;
|
|
480
481
|
hints?: string[];
|
|
482
|
+
tags?: string[];
|
|
481
483
|
minTimeout?: number;
|
|
482
484
|
maxTimeout?: number;
|
|
483
485
|
contextVarsToSet?: {
|
|
@@ -489,6 +491,8 @@ export declare type Memory = {
|
|
|
489
491
|
contextVars?: {
|
|
490
492
|
[variable: string]: string;
|
|
491
493
|
};
|
|
494
|
+
dcmOutcomeType?: string;
|
|
495
|
+
dcmOutcomeCode?: string;
|
|
492
496
|
creationTimestamp?: string;
|
|
493
497
|
creationName?: string;
|
|
494
498
|
creationSessionID?: string;
|
package/esm/engine/search.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { ResponseSpec, SearchQuery, SearchMatches } from '../types';
|
|
1
|
+
import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';
|
|
2
2
|
declare const _default: (apiUrl: string) => {
|
|
3
3
|
searchMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
4
4
|
matches: SearchMatches[];
|
|
5
5
|
}>;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
getRandomMemory: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
7
|
+
memories: Memory[];
|
|
8
|
+
}>;
|
|
9
|
+
getHints: (sessionId: string, query?: SearchQuery) => Promise<ResponseSpec & {
|
|
10
|
+
memoryHints: string[];
|
|
11
|
+
}>;
|
|
12
|
+
getMemoryTags: (sessionId: string) => Promise<ResponseSpec & {
|
|
13
|
+
memoryTags: string[];
|
|
14
|
+
}>;
|
|
8
15
|
};
|
|
9
16
|
export default _default;
|
package/esm/engine/search.js
CHANGED
|
@@ -5,11 +5,17 @@ export default (apiUrl) => ({
|
|
|
5
5
|
body: query,
|
|
6
6
|
apiUrl,
|
|
7
7
|
}),
|
|
8
|
-
|
|
8
|
+
getRandomMemory: async (sessionId, query) => apiFetcher(`/Random/${sessionId}`, {
|
|
9
9
|
method: 'POST',
|
|
10
|
+
body: query,
|
|
11
|
+
apiUrl,
|
|
12
|
+
}),
|
|
13
|
+
getHints: async (sessionId, query) => apiFetcher(`/Hints/${sessionId}`, {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
body: query,
|
|
10
16
|
apiUrl,
|
|
11
17
|
}),
|
|
12
|
-
|
|
18
|
+
getMemoryTags: async (sessionId) => apiFetcher(`/MemoryTags/${sessionId}`, {
|
|
13
19
|
method: 'GET',
|
|
14
20
|
apiUrl,
|
|
15
21
|
}),
|
package/esm/engine/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/engine/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAC7D,UAAU,CAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/engine/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAC7D,UAAU,CAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IAQH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CAChE,UAAU,CAAC,WAAW,SAAS,EAAE,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IASH,QAAQ,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAmB,EAAE,EAAE,CACzD,UAAU,CAAC,UAAU,SAAS,EAAE,EAAE;QAChC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;QACX,MAAM;KACP,CAIA;IAMH,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CACzC,UAAU,CAAC,eAAe,SAAS,EAAE,EAAE;QACrC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;CACJ,CAAC,CAAC"}
|
package/esm/engine.d.ts
CHANGED
|
@@ -342,14 +342,28 @@ declare const _default: (apiUrl: string) => {
|
|
|
342
342
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
343
343
|
matches: import("./types").SearchMatches[];
|
|
344
344
|
}>;
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
346
|
+
memories: import("./types").Memory[];
|
|
347
|
+
}>;
|
|
348
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
349
|
+
memoryHints: string[];
|
|
350
|
+
}>;
|
|
351
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
352
|
+
memoryTags: string[];
|
|
353
|
+
}>;
|
|
347
354
|
search: {
|
|
348
355
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
349
356
|
matches: import("./types").SearchMatches[];
|
|
350
357
|
}>;
|
|
351
|
-
|
|
352
|
-
|
|
358
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
|
+
memories: import("./types").Memory[];
|
|
360
|
+
}>;
|
|
361
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
memoryHints: string[];
|
|
363
|
+
}>;
|
|
364
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
365
|
+
memoryTags: string[];
|
|
366
|
+
}>;
|
|
353
367
|
};
|
|
354
368
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
355
369
|
people: import("./types").Person[];
|
package/esm/index.d.ts
CHANGED
|
@@ -352,14 +352,28 @@ declare const api: (hostname?: string) => {
|
|
|
352
352
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
353
353
|
matches: import("./types").SearchMatches[];
|
|
354
354
|
}>;
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
356
|
+
memories: import("./types").Memory[];
|
|
357
|
+
}>;
|
|
358
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
|
+
memoryHints: string[];
|
|
360
|
+
}>;
|
|
361
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
memoryTags: string[];
|
|
363
|
+
}>;
|
|
357
364
|
search: {
|
|
358
365
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
359
366
|
matches: import("./types").SearchMatches[];
|
|
360
367
|
}>;
|
|
361
|
-
|
|
362
|
-
|
|
368
|
+
getRandomMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
369
|
+
memories: import("./types").Memory[];
|
|
370
|
+
}>;
|
|
371
|
+
getHints: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
372
|
+
memoryHints: string[];
|
|
373
|
+
}>;
|
|
374
|
+
getMemoryTags: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
375
|
+
memoryTags: string[];
|
|
376
|
+
}>;
|
|
363
377
|
};
|
|
364
378
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
365
379
|
people: import("./types").Person[];
|
package/esm/types.d.ts
CHANGED
|
@@ -364,6 +364,7 @@ export declare type DialogState = {
|
|
|
364
364
|
contextVars?: {
|
|
365
365
|
[key: string]: string;
|
|
366
366
|
};
|
|
367
|
+
memoryTags?: string[];
|
|
367
368
|
};
|
|
368
369
|
export declare type Person = {
|
|
369
370
|
personID?: string;
|
|
@@ -478,6 +479,7 @@ export declare type Memory = {
|
|
|
478
479
|
help?: boolean;
|
|
479
480
|
notPickable?: boolean;
|
|
480
481
|
hints?: string[];
|
|
482
|
+
tags?: string[];
|
|
481
483
|
minTimeout?: number;
|
|
482
484
|
maxTimeout?: number;
|
|
483
485
|
contextVarsToSet?: {
|
|
@@ -489,6 +491,8 @@ export declare type Memory = {
|
|
|
489
491
|
contextVars?: {
|
|
490
492
|
[variable: string]: string;
|
|
491
493
|
};
|
|
494
|
+
dcmOutcomeType?: string;
|
|
495
|
+
dcmOutcomeCode?: string;
|
|
492
496
|
creationTimestamp?: string;
|
|
493
497
|
creationName?: string;
|
|
494
498
|
creationSessionID?: string;
|
package/package.json
CHANGED
package/src/engine/search.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseSpec, SearchQuery, SearchMatches } from '../types';
|
|
1
|
+
import { ResponseSpec, SearchQuery, SearchMatches, Memory } from '../types';
|
|
2
2
|
import { apiFetcher } from '../apiFetcher';
|
|
3
3
|
|
|
4
4
|
/******************
|
|
@@ -28,22 +28,48 @@ export default (apiUrl: string) => ({
|
|
|
28
28
|
* Picks up to 5 random Memory objects using the same algorithm employed in the
|
|
29
29
|
* Timeout event of the R1 state of the Dialog State Machine.
|
|
30
30
|
* @param {string} sessionId The session ID
|
|
31
|
+
* @param {SearchQuery} query Search query params
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
getRandomMemory: async (sessionId: string, query?: SearchQuery) =>
|
|
33
34
|
apiFetcher(`/Random/${sessionId}`, {
|
|
34
35
|
method: 'POST',
|
|
36
|
+
body: query,
|
|
35
37
|
apiUrl,
|
|
36
|
-
}) as Promise<
|
|
38
|
+
}) as Promise<
|
|
39
|
+
ResponseSpec & {
|
|
40
|
+
memories: Memory[];
|
|
41
|
+
}
|
|
42
|
+
>,
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* Picks up to 20 Memory Hint objects, obtained by searching for Story objects with a date or place set,
|
|
40
46
|
* and clustering dates and places within an uncertainty of at least 1 year or at least 100 km.
|
|
41
47
|
* Each Memory Hint may either suggest a date or a place, but not both.
|
|
42
48
|
* @param {string} sessionId The session ID
|
|
49
|
+
* @param {SearchQuery} query Search query params
|
|
43
50
|
*/
|
|
44
|
-
|
|
51
|
+
getHints: async (sessionId: string, query?: SearchQuery) =>
|
|
45
52
|
apiFetcher(`/Hints/${sessionId}`, {
|
|
53
|
+
method: 'POST',
|
|
54
|
+
body: query,
|
|
55
|
+
apiUrl,
|
|
56
|
+
}) as Promise<
|
|
57
|
+
ResponseSpec & {
|
|
58
|
+
memoryHints: string[];
|
|
59
|
+
}
|
|
60
|
+
>,
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets a list of all available memory tags.
|
|
64
|
+
* @param {string} sessionId The session ID
|
|
65
|
+
*/
|
|
66
|
+
getMemoryTags: async (sessionId: string) =>
|
|
67
|
+
apiFetcher(`/MemoryTags/${sessionId}`, {
|
|
46
68
|
method: 'GET',
|
|
47
69
|
apiUrl,
|
|
48
|
-
}) as Promise<
|
|
70
|
+
}) as Promise<
|
|
71
|
+
ResponseSpec & {
|
|
72
|
+
memoryTags: string[];
|
|
73
|
+
}
|
|
74
|
+
>,
|
|
49
75
|
});
|
package/src/types.ts
CHANGED
|
@@ -467,6 +467,7 @@ export declare type DialogState = {
|
|
|
467
467
|
media?: Medium[];
|
|
468
468
|
knownTags?: { [key: string]: string };
|
|
469
469
|
contextVars?: { [key: string]: string };
|
|
470
|
+
memoryTags?: string[];
|
|
470
471
|
};
|
|
471
472
|
|
|
472
473
|
export declare type Person = {
|
|
@@ -680,6 +681,7 @@ export declare type Memory = {
|
|
|
680
681
|
help?: boolean;
|
|
681
682
|
notPickable?: boolean;
|
|
682
683
|
hints?: string[];
|
|
684
|
+
tags?: string[];
|
|
683
685
|
minTimeout?: number;
|
|
684
686
|
maxTimeout?: number;
|
|
685
687
|
contextVarsToSet?: { [variable: string]: string };
|
|
@@ -688,6 +690,15 @@ export declare type Memory = {
|
|
|
688
690
|
* Used for Unanswered Questions
|
|
689
691
|
*/
|
|
690
692
|
contextVars?: { [variable: string]: string };
|
|
693
|
+
/**
|
|
694
|
+
* Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.
|
|
695
|
+
* @default "COMMON"
|
|
696
|
+
*/
|
|
697
|
+
dcmOutcomeType?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Optional code of the outcome to be sent to the DCM platform when this Memory is emitted.
|
|
700
|
+
*/
|
|
701
|
+
dcmOutcomeCode?: string;
|
|
691
702
|
creationTimestamp?: string;
|
|
692
703
|
creationName?: string;
|
|
693
704
|
creationSessionID?: string;
|