@memori.ai/memori-api-client 4.1.3 → 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 +20 -0
- package/dist/backend/analysis.test.js +1 -1
- package/dist/backend/analysis.test.js.map +1 -1
- package/dist/backend/process.test.js +1 -1
- package/dist/backend/process.test.js.map +1 -1
- package/dist/engine/functions.d.ts +22 -0
- package/dist/engine/functions.js +32 -0
- package/dist/engine/functions.js.map +1 -0
- package/dist/engine/functions.test.d.ts +1 -0
- package/dist/engine/functions.test.js +14 -0
- package/dist/engine/functions.test.js.map +1 -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 +56 -4
- package/dist/engine.js +3 -0
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +56 -4
- package/dist/types.d.ts +26 -0
- package/esm/backend/analysis.test.js +1 -1
- package/esm/backend/analysis.test.js.map +1 -1
- package/esm/backend/process.test.js +1 -1
- package/esm/backend/process.test.js.map +1 -1
- package/esm/engine/functions.d.ts +22 -0
- package/esm/engine/functions.js +30 -0
- package/esm/engine/functions.js.map +1 -0
- package/esm/engine/functions.test.d.ts +1 -0
- package/esm/engine/functions.test.js +11 -0
- package/esm/engine/functions.test.js.map +1 -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 +56 -4
- package/esm/engine.js +3 -0
- package/esm/engine.js.map +1 -1
- package/esm/index.d.ts +56 -4
- package/esm/types.d.ts +26 -0
- package/package.json +1 -1
- package/src/backend/analysis.test.ts +1 -1
- package/src/backend/process.test.ts +1 -1
- package/src/engine/functions.test.ts +23 -0
- package/src/engine/functions.ts +116 -0
- package/src/engine/search.ts +31 -5
- package/src/engine.ts +3 -0
- package/src/types.ts +97 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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
|
+
|
|
16
|
+
## [4.2.0](https://github.com/memori-ai/memori-api-client/compare/v4.1.3...v4.2.0) (2024-05-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add functions apis ([9a9a8ba](https://github.com/memori-ai/memori-api-client/commit/9a9a8bafbf8d75c2421e27ff539482204f43f265))
|
|
22
|
+
|
|
3
23
|
## [4.1.3](https://github.com/memori-ai/memori-api-client/compare/v4.1.2...v4.1.3) (2024-04-30)
|
|
4
24
|
|
|
5
25
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const index_1 = tslib_1.__importDefault(require("../index"));
|
|
5
|
-
const client = (0, index_1.default)('https://backend
|
|
5
|
+
const client = (0, index_1.default)('https://backend.memori.ai');
|
|
6
6
|
describe('backend/analysis api', () => {
|
|
7
7
|
it('works on analysis apis', async () => {
|
|
8
8
|
expect(await client.backend.analysis.analyzeUserQuery('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b', { query: 'test' })).not.toBeNull();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.test.js","sourceRoot":"","sources":["../../src/backend/analysis.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,
|
|
1
|
+
{"version":3,"file":"analysis.test.js","sourceRoot":"","sources":["../../src/backend/analysis.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAC5C,sCAAsC,EACtC,sCAAsC,EACtC,EAAE,KAAK,EAAE,MAAM,EAAE,CAClB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,gBAAgB,CACnC,sCAAsC,EACtC,sCAAsC,EACtC,EAAE,KAAK,EAAE,MAAM,EAAE,CAClB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const index_1 = tslib_1.__importDefault(require("../index"));
|
|
5
|
-
const client = (0, index_1.default)('https://backend
|
|
5
|
+
const client = (0, index_1.default)('https://backend.memori.ai');
|
|
6
6
|
describe('backend/process api', () => {
|
|
7
7
|
it('works on process apis', async () => {
|
|
8
8
|
expect(await client.backend.process.getProcessStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.test.js","sourceRoot":"","sources":["../../src/backend/process.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,
|
|
1
|
+
{"version":3,"file":"process.test.js","sourceRoot":"","sources":["../../src/backend/process.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAC3C,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,gBAAgB,CACnC,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ResponseSpec, Function } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
getAllFunctions: (sessionId: string) => Promise<ResponseSpec & {
|
|
4
|
+
count: number;
|
|
5
|
+
functions: Function[];
|
|
6
|
+
}>;
|
|
7
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<ResponseSpec & {
|
|
8
|
+
count: number;
|
|
9
|
+
functions: Function[];
|
|
10
|
+
}>;
|
|
11
|
+
getFunction: (sessionId: string, functionID: string) => Promise<ResponseSpec & {
|
|
12
|
+
function: Function;
|
|
13
|
+
}>;
|
|
14
|
+
patchFunction: (sessionId: string, func: Partial<Function> & {
|
|
15
|
+
functionID: string;
|
|
16
|
+
}) => Promise<ResponseSpec>;
|
|
17
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<ResponseSpec>;
|
|
18
|
+
createFunction: (sessionId: string, func: Function) => Promise<ResponseSpec & {
|
|
19
|
+
functionID: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const apiFetcher_1 = require("../apiFetcher");
|
|
4
|
+
exports.default = (apiUrl) => ({
|
|
5
|
+
getAllFunctions: async (sessionId) => (0, apiFetcher_1.apiFetcher)(`/Functions/${sessionId}`, {
|
|
6
|
+
method: 'GET',
|
|
7
|
+
apiUrl,
|
|
8
|
+
}),
|
|
9
|
+
getFunctionsPaginated: async (sessionId, from, howMany) => (0, apiFetcher_1.apiFetcher)(`/Functions/${sessionId}/${from}/${howMany}`, {
|
|
10
|
+
method: 'GET',
|
|
11
|
+
apiUrl,
|
|
12
|
+
}),
|
|
13
|
+
getFunction: async (sessionId, functionID) => (0, apiFetcher_1.apiFetcher)(`/Function/${sessionId}/${functionID}`, {
|
|
14
|
+
method: 'GET',
|
|
15
|
+
apiUrl,
|
|
16
|
+
}),
|
|
17
|
+
patchFunction: async (sessionId, func) => (0, apiFetcher_1.apiFetcher)(`/Function/${sessionId}/${func.functionID}`, {
|
|
18
|
+
method: 'PATCH',
|
|
19
|
+
apiUrl,
|
|
20
|
+
body: func,
|
|
21
|
+
}),
|
|
22
|
+
deleteFunction: async (sessionId, functionID) => (0, apiFetcher_1.apiFetcher)(`/Function/${sessionId}/${functionID}`, {
|
|
23
|
+
method: 'DELETE',
|
|
24
|
+
apiUrl,
|
|
25
|
+
}),
|
|
26
|
+
createFunction: async (sessionId, func) => (0, apiFetcher_1.apiFetcher)(`/Function/${sessionId}`, {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
apiUrl,
|
|
29
|
+
body: func,
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/engine/functions.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAKlC,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAC3C,IAAA,uBAAU,EAAC,cAAc,SAAS,EAAE,EAAE;QACpC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAWA;IAQH,qBAAqB,EAAE,KAAK,EAC1B,SAAiB,EACjB,IAAY,EACZ,OAAe,EACf,EAAE,CACF,IAAA,uBAAU,EAAC,cAAc,SAAS,IAAI,IAAI,IAAI,OAAO,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAWA;IAOH,WAAW,EAAE,KAAK,EAAE,SAAiB,EAAE,UAAkB,EAAE,EAAE,CAC3D,IAAA,uBAAU,EAAC,aAAa,SAAS,IAAI,UAAU,EAAE,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IAQH,aAAa,EAAE,KAAK,EAClB,SAAiB,EACjB,IAAgD,EAChD,EAAE,CACF,IAAA,uBAAU,EAAC,aAAa,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;QACtD,MAAM,EAAE,OAAO;QACf,MAAM;QACN,IAAI,EAAE,IAAI;KACX,CAA0B;IAO7B,cAAc,EAAE,KAAK,EAAE,SAAiB,EAAE,UAAkB,EAAE,EAAE,CAC9D,IAAA,uBAAU,EAAC,aAAa,SAAS,IAAI,UAAU,EAAE,EAAE;QACjD,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;IAO7B,cAAc,EAAE,KAAK,EAAE,SAAiB,EAAE,IAAc,EAAE,EAAE,CAC1D,IAAA,uBAAU,EAAC,aAAa,SAAS,EAAE,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE,IAAI;KACX,CAIA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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/functions api', () => {
|
|
7
|
+
it('works on functions apis', async () => {
|
|
8
|
+
expect(await client.functions.getFunction('768b9654-e781-4c3c-81fa-ae1529d1bfbe', '768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
it('works on functions apis with shorthand version', async () => {
|
|
11
|
+
expect(await client.getFunction('768b9654-e781-4c3c-81fa-ae1529d1bfbe', '768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=functions.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.test.js","sourceRoot":"","sources":["../../src/engine/functions.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,CACJ,MAAM,MAAM,CAAC,SAAS,CAAC,WAAW,CAChC,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,CACJ,MAAM,MAAM,CAAC,WAAW,CACtB,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
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
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
declare const _default: (apiUrl: string) => {
|
|
2
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
count: number;
|
|
4
|
+
functions: import("./types").Function[];
|
|
5
|
+
}>;
|
|
6
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
7
|
+
count: number;
|
|
8
|
+
functions: import("./types").Function[];
|
|
9
|
+
}>;
|
|
10
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
11
|
+
function: import("./types").Function;
|
|
12
|
+
}>;
|
|
13
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
14
|
+
functionID: string;
|
|
15
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
16
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
17
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
18
|
+
functionID: string;
|
|
19
|
+
}>;
|
|
20
|
+
functions: {
|
|
21
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
22
|
+
count: number;
|
|
23
|
+
functions: import("./types").Function[];
|
|
24
|
+
}>;
|
|
25
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
26
|
+
count: number;
|
|
27
|
+
functions: import("./types").Function[];
|
|
28
|
+
}>;
|
|
29
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
30
|
+
function: import("./types").Function;
|
|
31
|
+
}>;
|
|
32
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
33
|
+
functionID: string;
|
|
34
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
35
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
36
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
37
|
+
functionID: string;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
2
40
|
getTopics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
3
41
|
count: number;
|
|
4
42
|
topics: import("./types").Topic[];
|
|
@@ -304,14 +342,28 @@ declare const _default: (apiUrl: string) => {
|
|
|
304
342
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
305
343
|
matches: import("./types").SearchMatches[];
|
|
306
344
|
}>;
|
|
307
|
-
|
|
308
|
-
|
|
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
|
+
}>;
|
|
309
354
|
search: {
|
|
310
355
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
311
356
|
matches: import("./types").SearchMatches[];
|
|
312
357
|
}>;
|
|
313
|
-
|
|
314
|
-
|
|
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
|
+
}>;
|
|
315
367
|
};
|
|
316
368
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
317
369
|
people: import("./types").Person[];
|
package/dist/engine.js
CHANGED
|
@@ -20,6 +20,7 @@ const expertReferences_1 = tslib_1.__importDefault(require("./engine/expertRefer
|
|
|
20
20
|
const knownFacts_1 = tslib_1.__importDefault(require("./engine/knownFacts"));
|
|
21
21
|
const user_1 = tslib_1.__importDefault(require("./engine/user"));
|
|
22
22
|
const topics_1 = tslib_1.__importDefault(require("./engine/topics"));
|
|
23
|
+
const functions_1 = tslib_1.__importDefault(require("./engine/functions"));
|
|
23
24
|
exports.default = (apiUrl) => ({
|
|
24
25
|
correlationPairs: (0, correlationPairs_1.default)(apiUrl),
|
|
25
26
|
...(0, correlationPairs_1.default)(apiUrl),
|
|
@@ -59,5 +60,7 @@ exports.default = (apiUrl) => ({
|
|
|
59
60
|
...(0, user_1.default)(apiUrl),
|
|
60
61
|
topics: (0, topics_1.default)(apiUrl),
|
|
61
62
|
...(0, topics_1.default)(apiUrl),
|
|
63
|
+
functions: (0, functions_1.default)(apiUrl),
|
|
64
|
+
...(0, functions_1.default)(apiUrl),
|
|
62
65
|
});
|
|
63
66
|
//# sourceMappingURL=engine.js.map
|
package/dist/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":";;;AAAA,yFAAyD;AACzD,qEAAqC;AACrC,uEAAuC;AACvC,yFAAyD;AACzD,mEAAmC;AACnC,yEAAyC;AACzC,+DAA+B;AAC/B,qEAAqC;AACrC,qEAAqC;AACrC,uEAAuC;AACvC,mEAAmC;AACnC,+FAA+D;AAC/D,+EAA+C;AAC/C,yFAAyD;AACzD,yEAAyC;AACzC,yFAAyD;AACzD,6EAA6C;AAC7C,iEAAiC;AACjC,qEAAqC;
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":";;;AAAA,yFAAyD;AACzD,qEAAqC;AACrC,uEAAuC;AACvC,yFAAyD;AACzD,mEAAmC;AACnC,yEAAyC;AACzC,+DAA+B;AAC/B,qEAAqC;AACrC,qEAAqC;AACrC,uEAAuC;AACvC,mEAAmC;AACnC,+FAA+D;AAC/D,+EAA+C;AAC/C,yFAAyD;AACzD,yEAAyC;AACzC,yFAAyD;AACzD,6EAA6C;AAC7C,iEAAiC;AACjC,qEAAqC;AACrC,2EAA2C;AAE3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAClC,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,OAAO,EAAE,IAAA,iBAAO,EAAC,MAAM,CAAC;IACxB,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC;IAClB,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,IAAA,kBAAQ,EAAC,MAAM,CAAC;IAC1B,GAAG,IAAA,kBAAQ,EAAC,MAAM,CAAC;IACnB,GAAG,EAAE,IAAA,aAAG,EAAC,MAAM,CAAC;IAChB,GAAG,IAAA,aAAG,EAAC,MAAM,CAAC;IACd,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,OAAO,EAAE,IAAA,iBAAO,EAAC,MAAM,CAAC;IACxB,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC;IAClB,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,mBAAmB,EAAE,IAAA,6BAAmB,EAAC,MAAM,CAAC;IAChD,GAAG,IAAA,6BAAmB,EAAC,MAAM,CAAC;IAC9B,WAAW,EAAE,IAAA,qBAAW,EAAC,MAAM,CAAC;IAChC,GAAG,IAAA,qBAAW,EAAC,MAAM,CAAC;IACtB,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,IAAA,kBAAQ,EAAC,MAAM,CAAC;IAC1B,GAAG,IAAA,kBAAQ,EAAC,MAAM,CAAC;IACnB,gBAAgB,EAAE,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC1C,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC;IAC3B,UAAU,EAAE,IAAA,oBAAU,EAAC,MAAM,CAAC;IAC9B,GAAG,IAAA,oBAAU,EAAC,MAAM,CAAC;IACrB,IAAI,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC;IAClB,GAAG,IAAA,cAAI,EAAC,MAAM,CAAC;IACf,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,SAAS,EAAE,IAAA,mBAAS,EAAC,MAAM,CAAC;IAC5B,GAAG,IAAA,mBAAS,EAAC,MAAM,CAAC;CACrB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,44 @@ declare const api: (hostname?: string) => {
|
|
|
9
9
|
asset: {
|
|
10
10
|
getResourceUrl: ({ type, resourceURI, sessionID, baseURL, }: import("./helpers/asset").ResourceURLParams) => string;
|
|
11
11
|
};
|
|
12
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
13
|
+
count: number;
|
|
14
|
+
functions: import("./types").Function[];
|
|
15
|
+
}>;
|
|
16
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
17
|
+
count: number;
|
|
18
|
+
functions: import("./types").Function[];
|
|
19
|
+
}>;
|
|
20
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
21
|
+
function: import("./types").Function;
|
|
22
|
+
}>;
|
|
23
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
24
|
+
functionID: string;
|
|
25
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
26
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
27
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
28
|
+
functionID: string;
|
|
29
|
+
}>;
|
|
30
|
+
functions: {
|
|
31
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
32
|
+
count: number;
|
|
33
|
+
functions: import("./types").Function[];
|
|
34
|
+
}>;
|
|
35
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
36
|
+
count: number;
|
|
37
|
+
functions: import("./types").Function[];
|
|
38
|
+
}>;
|
|
39
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
40
|
+
function: import("./types").Function;
|
|
41
|
+
}>;
|
|
42
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
43
|
+
functionID: string;
|
|
44
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
45
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
46
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
47
|
+
functionID: string;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
12
50
|
getTopics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
13
51
|
count: number;
|
|
14
52
|
topics: import("./types").Topic[];
|
|
@@ -314,14 +352,28 @@ declare const api: (hostname?: string) => {
|
|
|
314
352
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
315
353
|
matches: import("./types").SearchMatches[];
|
|
316
354
|
}>;
|
|
317
|
-
|
|
318
|
-
|
|
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
|
+
}>;
|
|
319
364
|
search: {
|
|
320
365
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
321
366
|
matches: import("./types").SearchMatches[];
|
|
322
367
|
}>;
|
|
323
|
-
|
|
324
|
-
|
|
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
|
+
}>;
|
|
325
377
|
};
|
|
326
378
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
327
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;
|
|
@@ -632,6 +636,28 @@ export type IntentSlot = {
|
|
|
632
636
|
lastChangeTimestamp?: string;
|
|
633
637
|
lastChangeSessionID?: string;
|
|
634
638
|
};
|
|
639
|
+
export type FunctionParameter = {
|
|
640
|
+
parameterID?: string;
|
|
641
|
+
name: string;
|
|
642
|
+
description: string;
|
|
643
|
+
parameterType: 'string' | 'number' | 'integer' | 'boolean';
|
|
644
|
+
possibleValues?: string[];
|
|
645
|
+
required?: boolean;
|
|
646
|
+
};
|
|
647
|
+
export type Function = {
|
|
648
|
+
functionID?: string;
|
|
649
|
+
functionType: 'Internal' | 'WebHook';
|
|
650
|
+
name: string;
|
|
651
|
+
description: string;
|
|
652
|
+
parameters?: FunctionParameter[];
|
|
653
|
+
webHook: string;
|
|
654
|
+
httpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
655
|
+
httpHeaders?: {
|
|
656
|
+
[key: string]: string;
|
|
657
|
+
};
|
|
658
|
+
httpQueryStringTemplate?: string;
|
|
659
|
+
httpBodyTemplate?: string;
|
|
660
|
+
};
|
|
635
661
|
export type CustomWord = {
|
|
636
662
|
customWordID: string;
|
|
637
663
|
word: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memori from '../index';
|
|
2
|
-
const client = memori('https://backend
|
|
2
|
+
const client = memori('https://backend.memori.ai');
|
|
3
3
|
describe('backend/analysis api', () => {
|
|
4
4
|
it('works on analysis apis', async () => {
|
|
5
5
|
expect(await client.backend.analysis.analyzeUserQuery('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b', { query: 'test' })).not.toBeNull();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.test.js","sourceRoot":"","sources":["../../src/backend/analysis.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"analysis.test.js","sourceRoot":"","sources":["../../src/backend/analysis.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAC5C,sCAAsC,EACtC,sCAAsC,EACtC,EAAE,KAAK,EAAE,MAAM,EAAE,CAClB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,gBAAgB,CACnC,sCAAsC,EACtC,sCAAsC,EACtC,EAAE,KAAK,EAAE,MAAM,EAAE,CAClB,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memori from '../index';
|
|
2
|
-
const client = memori('https://backend
|
|
2
|
+
const client = memori('https://backend.memori.ai');
|
|
3
3
|
describe('backend/process api', () => {
|
|
4
4
|
it('works on process apis', async () => {
|
|
5
5
|
expect(await client.backend.process.getProcessStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.test.js","sourceRoot":"","sources":["../../src/backend/process.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"process.test.js","sourceRoot":"","sources":["../../src/backend/process.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAC3C,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,gBAAgB,CACnC,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ResponseSpec, Function } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
getAllFunctions: (sessionId: string) => Promise<ResponseSpec & {
|
|
4
|
+
count: number;
|
|
5
|
+
functions: Function[];
|
|
6
|
+
}>;
|
|
7
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<ResponseSpec & {
|
|
8
|
+
count: number;
|
|
9
|
+
functions: Function[];
|
|
10
|
+
}>;
|
|
11
|
+
getFunction: (sessionId: string, functionID: string) => Promise<ResponseSpec & {
|
|
12
|
+
function: Function;
|
|
13
|
+
}>;
|
|
14
|
+
patchFunction: (sessionId: string, func: Partial<Function> & {
|
|
15
|
+
functionID: string;
|
|
16
|
+
}) => Promise<ResponseSpec>;
|
|
17
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<ResponseSpec>;
|
|
18
|
+
createFunction: (sessionId: string, func: Function) => Promise<ResponseSpec & {
|
|
19
|
+
functionID: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { apiFetcher } from '../apiFetcher';
|
|
2
|
+
export default (apiUrl) => ({
|
|
3
|
+
getAllFunctions: async (sessionId) => apiFetcher(`/Functions/${sessionId}`, {
|
|
4
|
+
method: 'GET',
|
|
5
|
+
apiUrl,
|
|
6
|
+
}),
|
|
7
|
+
getFunctionsPaginated: async (sessionId, from, howMany) => apiFetcher(`/Functions/${sessionId}/${from}/${howMany}`, {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
apiUrl,
|
|
10
|
+
}),
|
|
11
|
+
getFunction: async (sessionId, functionID) => apiFetcher(`/Function/${sessionId}/${functionID}`, {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
apiUrl,
|
|
14
|
+
}),
|
|
15
|
+
patchFunction: async (sessionId, func) => apiFetcher(`/Function/${sessionId}/${func.functionID}`, {
|
|
16
|
+
method: 'PATCH',
|
|
17
|
+
apiUrl,
|
|
18
|
+
body: func,
|
|
19
|
+
}),
|
|
20
|
+
deleteFunction: async (sessionId, functionID) => apiFetcher(`/Function/${sessionId}/${functionID}`, {
|
|
21
|
+
method: 'DELETE',
|
|
22
|
+
apiUrl,
|
|
23
|
+
}),
|
|
24
|
+
createFunction: async (sessionId, func) => apiFetcher(`/Function/${sessionId}`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
apiUrl,
|
|
27
|
+
body: func,
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/engine/functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAKlC,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAC3C,UAAU,CAAC,cAAc,SAAS,EAAE,EAAE;QACpC,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAWA;IAQH,qBAAqB,EAAE,KAAK,EAC1B,SAAiB,EACjB,IAAY,EACZ,OAAe,EACf,EAAE,CACF,UAAU,CAAC,cAAc,SAAS,IAAI,IAAI,IAAI,OAAO,EAAE,EAAE;QACvD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAWA;IAOH,WAAW,EAAE,KAAK,EAAE,SAAiB,EAAE,UAAkB,EAAE,EAAE,CAC3D,UAAU,CAAC,aAAa,SAAS,IAAI,UAAU,EAAE,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAIA;IAQH,aAAa,EAAE,KAAK,EAClB,SAAiB,EACjB,IAAgD,EAChD,EAAE,CACF,UAAU,CAAC,aAAa,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;QACtD,MAAM,EAAE,OAAO;QACf,MAAM;QACN,IAAI,EAAE,IAAI;KACX,CAA0B;IAO7B,cAAc,EAAE,KAAK,EAAE,SAAiB,EAAE,UAAkB,EAAE,EAAE,CAC9D,UAAU,CAAC,aAAa,SAAS,IAAI,UAAU,EAAE,EAAE;QACjD,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAA0B;IAO7B,cAAc,EAAE,KAAK,EAAE,SAAiB,EAAE,IAAc,EAAE,EAAE,CAC1D,UAAU,CAAC,aAAa,SAAS,EAAE,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,MAAM;QACN,IAAI,EAAE,IAAI;KACX,CAIA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import memori from '../index';
|
|
2
|
+
const client = memori('https://backend.memori.ai');
|
|
3
|
+
describe('engine/functions api', () => {
|
|
4
|
+
it('works on functions apis', async () => {
|
|
5
|
+
expect(await client.functions.getFunction('768b9654-e781-4c3c-81fa-ae1529d1bfbe', '768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
6
|
+
});
|
|
7
|
+
it('works on functions apis with shorthand version', async () => {
|
|
8
|
+
expect(await client.getFunction('768b9654-e781-4c3c-81fa-ae1529d1bfbe', '768b9654-e781-4c3c-81fa-ae1529d1bfbe')).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=functions.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.test.js","sourceRoot":"","sources":["../../src/engine/functions.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAEnD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,CACJ,MAAM,MAAM,CAAC,SAAS,CAAC,WAAW,CAChC,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,CACJ,MAAM,MAAM,CAAC,WAAW,CACtB,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
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
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
declare const _default: (apiUrl: string) => {
|
|
2
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
count: number;
|
|
4
|
+
functions: import("./types").Function[];
|
|
5
|
+
}>;
|
|
6
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
7
|
+
count: number;
|
|
8
|
+
functions: import("./types").Function[];
|
|
9
|
+
}>;
|
|
10
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
11
|
+
function: import("./types").Function;
|
|
12
|
+
}>;
|
|
13
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
14
|
+
functionID: string;
|
|
15
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
16
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
17
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
18
|
+
functionID: string;
|
|
19
|
+
}>;
|
|
20
|
+
functions: {
|
|
21
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
22
|
+
count: number;
|
|
23
|
+
functions: import("./types").Function[];
|
|
24
|
+
}>;
|
|
25
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
26
|
+
count: number;
|
|
27
|
+
functions: import("./types").Function[];
|
|
28
|
+
}>;
|
|
29
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
30
|
+
function: import("./types").Function;
|
|
31
|
+
}>;
|
|
32
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
33
|
+
functionID: string;
|
|
34
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
35
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
36
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
37
|
+
functionID: string;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
2
40
|
getTopics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
3
41
|
count: number;
|
|
4
42
|
topics: import("./types").Topic[];
|
|
@@ -304,14 +342,28 @@ declare const _default: (apiUrl: string) => {
|
|
|
304
342
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
305
343
|
matches: import("./types").SearchMatches[];
|
|
306
344
|
}>;
|
|
307
|
-
|
|
308
|
-
|
|
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
|
+
}>;
|
|
309
354
|
search: {
|
|
310
355
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
311
356
|
matches: import("./types").SearchMatches[];
|
|
312
357
|
}>;
|
|
313
|
-
|
|
314
|
-
|
|
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
|
+
}>;
|
|
315
367
|
};
|
|
316
368
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
317
369
|
people: import("./types").Person[];
|
package/esm/engine.js
CHANGED
|
@@ -17,6 +17,7 @@ import expertReferences from './engine/expertReferences';
|
|
|
17
17
|
import knownFacts from './engine/knownFacts';
|
|
18
18
|
import user from './engine/user';
|
|
19
19
|
import topics from './engine/topics';
|
|
20
|
+
import functions from './engine/functions';
|
|
20
21
|
export default (apiUrl) => ({
|
|
21
22
|
correlationPairs: correlationPairs(apiUrl),
|
|
22
23
|
...correlationPairs(apiUrl),
|
|
@@ -56,5 +57,7 @@ export default (apiUrl) => ({
|
|
|
56
57
|
...user(apiUrl),
|
|
57
58
|
topics: topics(apiUrl),
|
|
58
59
|
...topics(apiUrl),
|
|
60
|
+
functions: functions(apiUrl),
|
|
61
|
+
...functions(apiUrl),
|
|
59
62
|
});
|
|
60
63
|
//# sourceMappingURL=engine.js.map
|
package/esm/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAClC,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;IACpB,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnB,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;IAChB,GAAG,GAAG,CAAC,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,GAAG,OAAO,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;IACpB,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,mBAAmB,EAAE,mBAAmB,CAAC,MAAM,CAAC;IAChD,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;IAChC,GAAG,WAAW,CAAC,MAAM,CAAC;IACtB,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;IAC1B,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAC1C,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC9B,GAAG,UAAU,CAAC,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;IAClB,GAAG,IAAI,CAAC,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC;IAC5B,GAAG,SAAS,CAAC,MAAM,CAAC;CACrB,CAAC,CAAC"}
|
package/esm/index.d.ts
CHANGED
|
@@ -9,6 +9,44 @@ declare const api: (hostname?: string) => {
|
|
|
9
9
|
asset: {
|
|
10
10
|
getResourceUrl: ({ type, resourceURI, sessionID, baseURL, }: import("./helpers/asset").ResourceURLParams) => string;
|
|
11
11
|
};
|
|
12
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
13
|
+
count: number;
|
|
14
|
+
functions: import("./types").Function[];
|
|
15
|
+
}>;
|
|
16
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
17
|
+
count: number;
|
|
18
|
+
functions: import("./types").Function[];
|
|
19
|
+
}>;
|
|
20
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
21
|
+
function: import("./types").Function;
|
|
22
|
+
}>;
|
|
23
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
24
|
+
functionID: string;
|
|
25
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
26
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
27
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
28
|
+
functionID: string;
|
|
29
|
+
}>;
|
|
30
|
+
functions: {
|
|
31
|
+
getAllFunctions: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
32
|
+
count: number;
|
|
33
|
+
functions: import("./types").Function[];
|
|
34
|
+
}>;
|
|
35
|
+
getFunctionsPaginated: (sessionId: string, from: number, howMany: number) => Promise<import("./types").ResponseSpec & {
|
|
36
|
+
count: number;
|
|
37
|
+
functions: import("./types").Function[];
|
|
38
|
+
}>;
|
|
39
|
+
getFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec & {
|
|
40
|
+
function: import("./types").Function;
|
|
41
|
+
}>;
|
|
42
|
+
patchFunction: (sessionId: string, func: Partial<import("./types").Function> & {
|
|
43
|
+
functionID: string;
|
|
44
|
+
}) => Promise<import("./types").ResponseSpec>;
|
|
45
|
+
deleteFunction: (sessionId: string, functionID: string) => Promise<import("./types").ResponseSpec>;
|
|
46
|
+
createFunction: (sessionId: string, func: import("./types").Function) => Promise<import("./types").ResponseSpec & {
|
|
47
|
+
functionID: string;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
12
50
|
getTopics: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
13
51
|
count: number;
|
|
14
52
|
topics: import("./types").Topic[];
|
|
@@ -314,14 +352,28 @@ declare const api: (hostname?: string) => {
|
|
|
314
352
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
315
353
|
matches: import("./types").SearchMatches[];
|
|
316
354
|
}>;
|
|
317
|
-
|
|
318
|
-
|
|
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
|
+
}>;
|
|
319
364
|
search: {
|
|
320
365
|
searchMemory: (sessionId: string, query?: import("./types").SearchQuery | undefined) => Promise<import("./types").ResponseSpec & {
|
|
321
366
|
matches: import("./types").SearchMatches[];
|
|
322
367
|
}>;
|
|
323
|
-
|
|
324
|
-
|
|
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
|
+
}>;
|
|
325
377
|
};
|
|
326
378
|
getPeople: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
327
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;
|
|
@@ -632,6 +636,28 @@ export type IntentSlot = {
|
|
|
632
636
|
lastChangeTimestamp?: string;
|
|
633
637
|
lastChangeSessionID?: string;
|
|
634
638
|
};
|
|
639
|
+
export type FunctionParameter = {
|
|
640
|
+
parameterID?: string;
|
|
641
|
+
name: string;
|
|
642
|
+
description: string;
|
|
643
|
+
parameterType: 'string' | 'number' | 'integer' | 'boolean';
|
|
644
|
+
possibleValues?: string[];
|
|
645
|
+
required?: boolean;
|
|
646
|
+
};
|
|
647
|
+
export type Function = {
|
|
648
|
+
functionID?: string;
|
|
649
|
+
functionType: 'Internal' | 'WebHook';
|
|
650
|
+
name: string;
|
|
651
|
+
description: string;
|
|
652
|
+
parameters?: FunctionParameter[];
|
|
653
|
+
webHook: string;
|
|
654
|
+
httpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
655
|
+
httpHeaders?: {
|
|
656
|
+
[key: string]: string;
|
|
657
|
+
};
|
|
658
|
+
httpQueryStringTemplate?: string;
|
|
659
|
+
httpBodyTemplate?: string;
|
|
660
|
+
};
|
|
635
661
|
export type CustomWord = {
|
|
636
662
|
customWordID: string;
|
|
637
663
|
word: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import memori from '../index';
|
|
2
|
+
|
|
3
|
+
const client = memori('https://backend.memori.ai');
|
|
4
|
+
|
|
5
|
+
describe('engine/functions api', () => {
|
|
6
|
+
it('works on functions apis', async () => {
|
|
7
|
+
expect(
|
|
8
|
+
await client.functions.getFunction(
|
|
9
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe',
|
|
10
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe'
|
|
11
|
+
)
|
|
12
|
+
).not.toBeNull();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('works on functions apis with shorthand version', async () => {
|
|
16
|
+
expect(
|
|
17
|
+
await client.getFunction(
|
|
18
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe',
|
|
19
|
+
'768b9654-e781-4c3c-81fa-ae1529d1bfbe'
|
|
20
|
+
)
|
|
21
|
+
).not.toBeNull();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { ResponseSpec, Function } from '../types';
|
|
2
|
+
import { apiFetcher } from '../apiFetcher';
|
|
3
|
+
|
|
4
|
+
/*********************
|
|
5
|
+
* *
|
|
6
|
+
* Functions *
|
|
7
|
+
* *
|
|
8
|
+
*********************/
|
|
9
|
+
|
|
10
|
+
export default (apiUrl: string) => ({
|
|
11
|
+
/**
|
|
12
|
+
* Lists all Functions objects.
|
|
13
|
+
* @param {string} sessionId The session ID
|
|
14
|
+
*/
|
|
15
|
+
getAllFunctions: async (sessionId: string) =>
|
|
16
|
+
apiFetcher(`/Functions/${sessionId}`, {
|
|
17
|
+
method: 'GET',
|
|
18
|
+
apiUrl,
|
|
19
|
+
}) as Promise<
|
|
20
|
+
ResponseSpec & {
|
|
21
|
+
/**
|
|
22
|
+
* Total number of Function objects.
|
|
23
|
+
*/
|
|
24
|
+
count: number;
|
|
25
|
+
/**
|
|
26
|
+
* List of Function objects. May be empty.
|
|
27
|
+
*/
|
|
28
|
+
functions: Function[];
|
|
29
|
+
}
|
|
30
|
+
>,
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Lists Function objects with pagination.
|
|
34
|
+
* @param {string} sessionId The session ID
|
|
35
|
+
* @param {number} from The 0-based index of the first Function object to list
|
|
36
|
+
* @param {number} howMany The number of the Function objects to list
|
|
37
|
+
*/
|
|
38
|
+
getFunctionsPaginated: async (
|
|
39
|
+
sessionId: string,
|
|
40
|
+
from: number,
|
|
41
|
+
howMany: number
|
|
42
|
+
) =>
|
|
43
|
+
apiFetcher(`/Functions/${sessionId}/${from}/${howMany}`, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
apiUrl,
|
|
46
|
+
}) as Promise<
|
|
47
|
+
ResponseSpec & {
|
|
48
|
+
/**
|
|
49
|
+
* Total number of Function objects.
|
|
50
|
+
*/
|
|
51
|
+
count: number;
|
|
52
|
+
/**
|
|
53
|
+
* List of Function objects. May be empty.
|
|
54
|
+
*/
|
|
55
|
+
functions: Function[];
|
|
56
|
+
}
|
|
57
|
+
>,
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Gets the details of a Function object.
|
|
61
|
+
* @param {string} sessionId The session ID
|
|
62
|
+
* @param {string} functionID The Function object ID
|
|
63
|
+
*/
|
|
64
|
+
getFunction: async (sessionId: string, functionID: string) =>
|
|
65
|
+
apiFetcher(`/Function/${sessionId}/${functionID}`, {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
apiUrl,
|
|
68
|
+
}) as Promise<
|
|
69
|
+
ResponseSpec & {
|
|
70
|
+
function: Function;
|
|
71
|
+
}
|
|
72
|
+
>,
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Updates an existing Function object.
|
|
76
|
+
* Only non-null (present) fields are considered for update. Null or absent fields are left unaltered.
|
|
77
|
+
* @param {string} sessionId The session ID
|
|
78
|
+
* @param {Function} func The Function object
|
|
79
|
+
*/
|
|
80
|
+
patchFunction: async (
|
|
81
|
+
sessionId: string,
|
|
82
|
+
func: Partial<Function> & { functionID: string }
|
|
83
|
+
) =>
|
|
84
|
+
apiFetcher(`/Function/${sessionId}/${func.functionID}`, {
|
|
85
|
+
method: 'PATCH',
|
|
86
|
+
apiUrl,
|
|
87
|
+
body: func,
|
|
88
|
+
}) as Promise<ResponseSpec>,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Removes an existing Function object.
|
|
92
|
+
* @param {string} sessionId The session ID
|
|
93
|
+
* @param {string} functionID The Function object ID
|
|
94
|
+
*/
|
|
95
|
+
deleteFunction: async (sessionId: string, functionID: string) =>
|
|
96
|
+
apiFetcher(`/Function/${sessionId}/${functionID}`, {
|
|
97
|
+
method: 'DELETE',
|
|
98
|
+
apiUrl,
|
|
99
|
+
}) as Promise<ResponseSpec>,
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Creates a new Function object.
|
|
103
|
+
* @param {string} sessionId The session ID
|
|
104
|
+
* @param {Function} func The Function object
|
|
105
|
+
*/
|
|
106
|
+
createFunction: async (sessionId: string, func: Function) =>
|
|
107
|
+
apiFetcher(`/Function/${sessionId}`, {
|
|
108
|
+
method: 'POST',
|
|
109
|
+
apiUrl,
|
|
110
|
+
body: func,
|
|
111
|
+
}) as Promise<
|
|
112
|
+
ResponseSpec & {
|
|
113
|
+
functionID: string;
|
|
114
|
+
}
|
|
115
|
+
>,
|
|
116
|
+
});
|
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/engine.ts
CHANGED
|
@@ -17,6 +17,7 @@ import expertReferences from './engine/expertReferences';
|
|
|
17
17
|
import knownFacts from './engine/knownFacts';
|
|
18
18
|
import user from './engine/user';
|
|
19
19
|
import topics from './engine/topics';
|
|
20
|
+
import functions from './engine/functions';
|
|
20
21
|
|
|
21
22
|
export default (apiUrl: string) => ({
|
|
22
23
|
correlationPairs: correlationPairs(apiUrl),
|
|
@@ -57,4 +58,6 @@ export default (apiUrl: string) => ({
|
|
|
57
58
|
...user(apiUrl),
|
|
58
59
|
topics: topics(apiUrl),
|
|
59
60
|
...topics(apiUrl),
|
|
61
|
+
functions: functions(apiUrl),
|
|
62
|
+
...functions(apiUrl),
|
|
60
63
|
});
|
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;
|
|
@@ -1037,6 +1048,92 @@ export type IntentSlot = {
|
|
|
1037
1048
|
lastChangeSessionID?: string;
|
|
1038
1049
|
};
|
|
1039
1050
|
|
|
1051
|
+
export type FunctionParameter = {
|
|
1052
|
+
/**
|
|
1053
|
+
* Function Parameter object ID.
|
|
1054
|
+
*/
|
|
1055
|
+
parameterID?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* Name of the Function Parameter object.
|
|
1058
|
+
*/
|
|
1059
|
+
name: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* Description of the Function Parameter object. The description is provided to the generative AI to help it understand the purpose of the parameter.
|
|
1062
|
+
*/
|
|
1063
|
+
description: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* Parameter type, e.g. "string", "number", "integer", "boolean".
|
|
1066
|
+
* Currently supported types are:
|
|
1067
|
+
* - string: string value
|
|
1068
|
+
* - number: floating point value
|
|
1069
|
+
* - integer: integer value
|
|
1070
|
+
* - boolean: boolean value
|
|
1071
|
+
*/
|
|
1072
|
+
parameterType: 'string' | 'number' | 'integer' | 'boolean';
|
|
1073
|
+
/**
|
|
1074
|
+
* Optional list of possible values of the parameter. If empty or null, the parameter accepts any value of the specified type.
|
|
1075
|
+
*/
|
|
1076
|
+
possibleValues?: string[];
|
|
1077
|
+
/**
|
|
1078
|
+
* Whether the parameter is required or not. Default is not required.
|
|
1079
|
+
*/
|
|
1080
|
+
required?: boolean;
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
export type Function = {
|
|
1084
|
+
/**
|
|
1085
|
+
* Function object ID.
|
|
1086
|
+
*/
|
|
1087
|
+
functionID?: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Function type, e.g. Internal or WebHook.
|
|
1090
|
+
* Internal functions are a limited subset implemented internally,
|
|
1091
|
+
* while WebHook intents perform an external HTTP call to the specified web hook, using the specified templates.
|
|
1092
|
+
*/
|
|
1093
|
+
functionType: 'Internal' | 'WebHook';
|
|
1094
|
+
/**
|
|
1095
|
+
* Name of the Function object.
|
|
1096
|
+
*/
|
|
1097
|
+
name: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Description of the Function object. The description is provided to the generative AI to help it understand the purpose of the function.
|
|
1100
|
+
*/
|
|
1101
|
+
description: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* List of its Function Parameter objects. May be empty.
|
|
1104
|
+
*/
|
|
1105
|
+
parameters?: FunctionParameter[];
|
|
1106
|
+
/**
|
|
1107
|
+
* HTTP URL of the web hook to be called when the function is invoked, up to the path part.
|
|
1108
|
+
* The query string part is specified separately.
|
|
1109
|
+
* It may include the value of function parameters using the syntax {parameter}, where "parameter" is the parameter name.
|
|
1110
|
+
* E.g.: http://example.com/{param}/something.
|
|
1111
|
+
*/
|
|
1112
|
+
webHook: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* HTTP method to be used when calling the web hook, e.g. "GET", "POST" etc.
|
|
1115
|
+
*/
|
|
1116
|
+
httpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
1117
|
+
/**
|
|
1118
|
+
* Optional set of HTTP headers to be passed to the web hook.
|
|
1119
|
+
*/
|
|
1120
|
+
httpHeaders?: { [key: string]: string };
|
|
1121
|
+
/**
|
|
1122
|
+
* Template of the HTTP query string to be passed to the web hook.
|
|
1123
|
+
* It may include the value of function parameters using the syntax {parameter}, where "parameter" is the parameter name.
|
|
1124
|
+
* E.g.: param1={param1}¶m2={param2}.
|
|
1125
|
+
*/
|
|
1126
|
+
httpQueryStringTemplate?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Template of the HTTP request body to be passed to the web hook.
|
|
1129
|
+
* It may be in any format (JSON, XML etc.), and may include the value of function parameters using the syntax {parameter},
|
|
1130
|
+
* where "parameter" is the parameter name.
|
|
1131
|
+
* E.g.: { "param1": "{param1}", "param2": "{param2}" },
|
|
1132
|
+
* or: <request><param1>{param1}</param1><param2>{param2}</param2></request>.
|
|
1133
|
+
*/
|
|
1134
|
+
httpBodyTemplate?: string;
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1040
1137
|
export type CustomWord = {
|
|
1041
1138
|
customWordID: string;
|
|
1042
1139
|
word: string;
|