@memori.ai/memori-api-client 2.1.4 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/backend/importExport.d.ts +20 -0
- package/dist/backend/importExport.js +43 -0
- package/dist/backend/importExport.js.map +1 -0
- package/dist/backend/importExport.test.d.ts +1 -0
- package/dist/backend/importExport.test.js +14 -0
- package/dist/backend/importExport.test.js.map +1 -0
- package/dist/backend.d.ts +34 -0
- package/dist/backend.js +3 -0
- package/dist/backend.js.map +1 -1
- package/dist/engine.d.ts +0 -34
- package/dist/engine.js +0 -3
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +34 -34
- package/dist/types.d.ts +30 -18
- package/esm/backend/importExport.d.ts +20 -0
- package/esm/backend/importExport.js +41 -0
- package/esm/backend/importExport.js.map +1 -0
- package/esm/backend/importExport.test.d.ts +1 -0
- package/esm/backend/importExport.test.js +11 -0
- package/esm/backend/importExport.test.js.map +1 -0
- package/esm/backend.d.ts +34 -0
- package/esm/backend.js +3 -0
- package/esm/backend.js.map +1 -1
- package/esm/engine.d.ts +0 -34
- package/esm/engine.js +0 -3
- package/esm/engine.js.map +1 -1
- package/esm/index.d.ts +34 -34
- package/esm/types.d.ts +30 -18
- package/package.json +1 -1
- package/src/backend/importExport.test.ts +23 -0
- package/src/backend/importExport.ts +135 -0
- package/src/backend.ts +3 -0
- package/src/engine.ts +0 -3
- package/src/types.ts +68 -18
- package/src/engine/importExport.test.ts +0 -38
- package/src/engine/importExport.ts +0 -115
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/memori-ai/memori-api-client/compare/v2.1.5...v2.2.0) (2023-07-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update importexport apis and typings ([d86f38e](https://github.com/memori-ai/memori-api-client/commit/d86f38ebd411c7ea5d6382556e37704060a59e2a))
|
|
9
|
+
|
|
10
|
+
## [2.1.5](https://github.com/memori-ai/memori-api-client/compare/v2.1.4...v2.1.5) (2023-04-17)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Maintenance
|
|
14
|
+
|
|
15
|
+
* cleanup lockfile ([dd4cf88](https://github.com/memori-ai/memori-api-client/commit/dd4cf8851f07cfb97d0f77f0f4f214e63a4daf40))
|
|
16
|
+
|
|
3
17
|
## [2.1.4](https://github.com/memori-ai/memori-api-client/compare/v2.1.3...v2.1.4) (2023-04-17)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
4
|
+
status: ImportResponse;
|
|
5
|
+
}>;
|
|
6
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
7
|
+
status: ImportResponse;
|
|
8
|
+
}>;
|
|
9
|
+
importProcesses: (authToken: string) => Promise<ResponseSpec & {
|
|
10
|
+
importProcesses: ImportResponse[];
|
|
11
|
+
}>;
|
|
12
|
+
importStatus: (authToken: string, importID: string) => Promise<ResponseSpec & {
|
|
13
|
+
status: ImportResponse;
|
|
14
|
+
}>;
|
|
15
|
+
stopImport: (authToken: string, importID: string) => Promise<ResponseSpec & {
|
|
16
|
+
status: ImportResponse;
|
|
17
|
+
}>;
|
|
18
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const apiFetcher_1 = require("../apiFetcher");
|
|
4
|
+
exports.default = (apiUrl) => ({
|
|
5
|
+
importCSV: async (authToken, memoriID, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportCSV/${authToken}/${memoriID}`, {
|
|
6
|
+
apiUrl,
|
|
7
|
+
method: 'POST',
|
|
8
|
+
body: {
|
|
9
|
+
rows,
|
|
10
|
+
...params,
|
|
11
|
+
},
|
|
12
|
+
}),
|
|
13
|
+
importTXT: async (authToken, memoriID, rows, params) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportTXT/${authToken}/${memoriID}`, {
|
|
14
|
+
apiUrl,
|
|
15
|
+
method: 'POST',
|
|
16
|
+
body: {
|
|
17
|
+
rows,
|
|
18
|
+
...params,
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
importProcesses: async (authToken) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportProcesses/${authToken}`, {
|
|
22
|
+
apiUrl,
|
|
23
|
+
method: 'GET',
|
|
24
|
+
}),
|
|
25
|
+
importStatus: async (authToken, importID) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ImportStatus/${authToken}/${importID}`, {
|
|
26
|
+
apiUrl,
|
|
27
|
+
method: 'GET',
|
|
28
|
+
}),
|
|
29
|
+
stopImport: async (authToken, importID) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/StopImport/${authToken}/${importID}`, {
|
|
30
|
+
apiUrl,
|
|
31
|
+
method: 'POST',
|
|
32
|
+
}),
|
|
33
|
+
exportCSV: async (authToken, memoriID, csvSpecs, password) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ExportCSV/${authToken}/${memoriID}`, {
|
|
34
|
+
apiUrl,
|
|
35
|
+
method: 'POST',
|
|
36
|
+
body: {
|
|
37
|
+
csvSpecs,
|
|
38
|
+
password,
|
|
39
|
+
},
|
|
40
|
+
text: true,
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=importExport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":";;AAMA,8CAA2C;AAQ3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,IAAA,uBAAU,EAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,IAAA,uBAAU,EAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IAMH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAC3C,IAAA,uBAAU,EAAC,iCAAiC,SAAS,EAAE,EAAE;QACvD,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CAC1D,IAAA,uBAAU,EAAC,8BAA8B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAChE,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACxD,IAAA,uBAAU,EAAC,4BAA4B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC9D,MAAM;QACN,MAAM,EAAE,MAAM;KACf,CAIA;IAUH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,QAAkB,EAClB,QAAiB,EACjB,EAAE,CACF,IAAA,uBAAU,EAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,QAAQ;YACR,QAAQ;SACT;QACD,IAAI,EAAE,IAAI;KACX,CAAoB;CACxB,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-staging.memori.ai');
|
|
6
|
+
describe('backend/importexport api', () => {
|
|
7
|
+
it('works on importexport apis', async () => {
|
|
8
|
+
expect(await client.backend.importExport.importStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
it('works on importexport apis with shorthand version', async () => {
|
|
11
|
+
expect(await client.backend.importStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=importExport.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExport.test.js","sourceRoot":"","sources":["../../src/backend/importExport.test.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAE9B,MAAM,MAAM,GAAG,IAAA,eAAM,EAAC,mCAAmC,CAAC,CAAC;AAE3D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAC5C,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACjE,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,YAAY,CAC/B,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/backend.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
declare const backendAPI: (apiUrl: string) => {
|
|
2
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
status: import("./types").ImportResponse;
|
|
4
|
+
}>;
|
|
5
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
6
|
+
status: import("./types").ImportResponse;
|
|
7
|
+
}>;
|
|
8
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
9
|
+
importProcesses: import("./types").ImportResponse[];
|
|
10
|
+
}>;
|
|
11
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
12
|
+
status: import("./types").ImportResponse;
|
|
13
|
+
}>;
|
|
14
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
15
|
+
status: import("./types").ImportResponse;
|
|
16
|
+
}>;
|
|
17
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
2
18
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
3
19
|
notifications: import("./types").Notification[];
|
|
4
20
|
}>;
|
|
@@ -341,5 +357,23 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
341
357
|
notifications: import("./types").Notification[];
|
|
342
358
|
}>;
|
|
343
359
|
};
|
|
360
|
+
importExport: {
|
|
361
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
status: import("./types").ImportResponse;
|
|
363
|
+
}>;
|
|
364
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
365
|
+
status: import("./types").ImportResponse;
|
|
366
|
+
}>;
|
|
367
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
368
|
+
importProcesses: import("./types").ImportResponse[];
|
|
369
|
+
}>;
|
|
370
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
371
|
+
status: import("./types").ImportResponse;
|
|
372
|
+
}>;
|
|
373
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
374
|
+
status: import("./types").ImportResponse;
|
|
375
|
+
}>;
|
|
376
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
377
|
+
};
|
|
344
378
|
};
|
|
345
379
|
export default backendAPI;
|
package/dist/backend.js
CHANGED
|
@@ -8,6 +8,7 @@ const asset_1 = tslib_1.__importDefault(require("./backend/asset"));
|
|
|
8
8
|
const invitation_1 = tslib_1.__importDefault(require("./backend/invitation"));
|
|
9
9
|
const consumptionLogs_1 = tslib_1.__importDefault(require("./backend/consumptionLogs"));
|
|
10
10
|
const notifications_1 = tslib_1.__importDefault(require("./backend/notifications"));
|
|
11
|
+
const importExport_1 = tslib_1.__importDefault(require("./backend/importExport"));
|
|
11
12
|
const backendAPI = (apiUrl) => ({
|
|
12
13
|
asset: (0, asset_1.default)(apiUrl),
|
|
13
14
|
memori: (0, memori_1.default)(apiUrl),
|
|
@@ -16,6 +17,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
16
17
|
invitation: (0, invitation_1.default)(apiUrl),
|
|
17
18
|
consumptionLogs: (0, consumptionLogs_1.default)(apiUrl),
|
|
18
19
|
notifications: (0, notifications_1.default)(apiUrl),
|
|
20
|
+
importExport: (0, importExport_1.default)(apiUrl),
|
|
19
21
|
...(0, asset_1.default)(apiUrl),
|
|
20
22
|
...(0, memori_1.default)(apiUrl),
|
|
21
23
|
...(0, user_1.default)(apiUrl),
|
|
@@ -23,6 +25,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
23
25
|
...(0, invitation_1.default)(apiUrl),
|
|
24
26
|
...(0, consumptionLogs_1.default)(apiUrl),
|
|
25
27
|
...(0, notifications_1.default)(apiUrl),
|
|
28
|
+
...(0, importExport_1.default)(apiUrl),
|
|
26
29
|
});
|
|
27
30
|
exports.default = backendAPI;
|
|
28
31
|
//# sourceMappingURL=backend.js.map
|
package/dist/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";;;AAAA,sEAAsC;AACtC,kEAAkC;AAClC,gFAAgD;AAChD,oEAAoC;AACpC,8EAA8C;AAC9C,wFAAwD;AACxD,oFAAoD;
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":";;;AAAA,sEAAsC;AACtC,kEAAkC;AAClC,gFAAgD;AAChD,oEAAoC;AACpC,8EAA8C;AAC9C,wFAAwD;AACxD,oFAAoD;AACpD,kFAAkD;AAElD,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,KAAK,EAAE,IAAA,eAAK,EAAC,MAAM,CAAC;IACpB,MAAM,EAAE,IAAA,gBAAM,EAAC,MAAM,CAAC;IACtB,IAAI,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC;IAClB,WAAW,EAAE,IAAA,qBAAW,EAAC,MAAM,CAAC;IAChC,UAAU,EAAE,IAAA,oBAAU,EAAC,MAAM,CAAC;IAC9B,eAAe,EAAE,IAAA,yBAAe,EAAC,MAAM,CAAC;IACxC,aAAa,EAAE,IAAA,uBAAa,EAAC,MAAM,CAAC;IACpC,YAAY,EAAE,IAAA,sBAAY,EAAC,MAAM,CAAC;IAClC,GAAG,IAAA,eAAK,EAAC,MAAM,CAAC;IAChB,GAAG,IAAA,gBAAM,EAAC,MAAM,CAAC;IACjB,GAAG,IAAA,cAAI,EAAC,MAAM,CAAC;IACf,GAAG,IAAA,qBAAW,EAAC,MAAM,CAAC;IACtB,GAAG,IAAA,oBAAU,EAAC,MAAM,CAAC;IACrB,GAAG,IAAA,yBAAe,EAAC,MAAM,CAAC;IAC1B,GAAG,IAAA,uBAAa,EAAC,MAAM,CAAC;IACxB,GAAG,IAAA,sBAAY,EAAC,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -389,40 +389,6 @@ declare const _default: (apiUrl: string) => {
|
|
|
389
389
|
intentSlotID: string;
|
|
390
390
|
}>;
|
|
391
391
|
};
|
|
392
|
-
importCSV: (sessionId: string, rows: string[], params: import("./types").ImportParams) => Promise<import("./types").ResponseSpec & {
|
|
393
|
-
status: import("./types").ImportResponse;
|
|
394
|
-
}>;
|
|
395
|
-
importProcesses: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
396
|
-
importProcesses: import("./types").ImportResponse[];
|
|
397
|
-
}>;
|
|
398
|
-
importStatus: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
399
|
-
status: import("./types").ImportResponse;
|
|
400
|
-
}>;
|
|
401
|
-
stopImport: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
402
|
-
status: import("./types").ImportResponse;
|
|
403
|
-
}>;
|
|
404
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
405
|
-
status: import("./types").ImportResponse;
|
|
406
|
-
}>;
|
|
407
|
-
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
408
|
-
importExport: {
|
|
409
|
-
importCSV: (sessionId: string, rows: string[], params: import("./types").ImportParams) => Promise<import("./types").ResponseSpec & {
|
|
410
|
-
status: import("./types").ImportResponse;
|
|
411
|
-
}>;
|
|
412
|
-
importProcesses: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
413
|
-
importProcesses: import("./types").ImportResponse[];
|
|
414
|
-
}>;
|
|
415
|
-
importStatus: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
416
|
-
status: import("./types").ImportResponse;
|
|
417
|
-
}>;
|
|
418
|
-
stopImport: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
419
|
-
status: import("./types").ImportResponse;
|
|
420
|
-
}>;
|
|
421
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
422
|
-
status: import("./types").ImportResponse;
|
|
423
|
-
}>;
|
|
424
|
-
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
425
|
-
};
|
|
426
392
|
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
427
393
|
sessionId: string;
|
|
428
394
|
text: string;
|
package/dist/engine.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const correlationPairs_1 = tslib_1.__importDefault(require("./engine/correlationPairs"));
|
|
5
5
|
const dialog_1 = tslib_1.__importDefault(require("./engine/dialog"));
|
|
6
|
-
const importExport_1 = tslib_1.__importDefault(require("./engine/importExport"));
|
|
7
6
|
const intents_1 = tslib_1.__importDefault(require("./engine/intents"));
|
|
8
7
|
const localizationKeys_1 = tslib_1.__importDefault(require("./engine/localizationKeys"));
|
|
9
8
|
const media_1 = tslib_1.__importDefault(require("./engine/media"));
|
|
@@ -23,8 +22,6 @@ exports.default = (apiUrl) => ({
|
|
|
23
22
|
...(0, correlationPairs_1.default)(apiUrl),
|
|
24
23
|
dialog: (0, dialog_1.default)(apiUrl),
|
|
25
24
|
...(0, dialog_1.default)(apiUrl),
|
|
26
|
-
importExport: (0, importExport_1.default)(apiUrl),
|
|
27
|
-
...(0, importExport_1.default)(apiUrl),
|
|
28
25
|
intents: (0, intents_1.default)(apiUrl),
|
|
29
26
|
...(0, intents_1.default)(apiUrl),
|
|
30
27
|
localizationKeys: (0, localizationKeys_1.default)(apiUrl),
|
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,
|
|
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,2FAA2D;AAC3D,qEAAqC;AACrC,uEAAuC;AACvC,mEAAmC;AACnC,+FAA+D;AAC/D,+EAA+C;AAC/C,yFAAyD;AACzD,yEAAyC;AAEzC,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,iBAAiB,EAAE,IAAA,2BAAiB,EAAC,MAAM,CAAC;IAC5C,GAAG,IAAA,2BAAiB,EAAC,MAAM,CAAC;IAC5B,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;CACpB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -394,40 +394,6 @@ declare const api: (hostname?: string) => {
|
|
|
394
394
|
intentSlotID: string;
|
|
395
395
|
}>;
|
|
396
396
|
};
|
|
397
|
-
importCSV: (sessionId: string, rows: string[], params: import("./types").ImportParams) => Promise<import("./types").ResponseSpec & {
|
|
398
|
-
status: import("./types").ImportResponse;
|
|
399
|
-
}>;
|
|
400
|
-
importProcesses: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
401
|
-
importProcesses: import("./types").ImportResponse[];
|
|
402
|
-
}>;
|
|
403
|
-
importStatus: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
404
|
-
status: import("./types").ImportResponse;
|
|
405
|
-
}>;
|
|
406
|
-
stopImport: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
407
|
-
status: import("./types").ImportResponse;
|
|
408
|
-
}>;
|
|
409
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
410
|
-
status: import("./types").ImportResponse;
|
|
411
|
-
}>;
|
|
412
|
-
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
413
|
-
importExport: {
|
|
414
|
-
importCSV: (sessionId: string, rows: string[], params: import("./types").ImportParams) => Promise<import("./types").ResponseSpec & {
|
|
415
|
-
status: import("./types").ImportResponse;
|
|
416
|
-
}>;
|
|
417
|
-
importProcesses: (sessionId: string) => Promise<import("./types").ResponseSpec & {
|
|
418
|
-
importProcesses: import("./types").ImportResponse[];
|
|
419
|
-
}>;
|
|
420
|
-
importStatus: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
421
|
-
status: import("./types").ImportResponse;
|
|
422
|
-
}>;
|
|
423
|
-
stopImport: (importID: string) => Promise<import("./types").ResponseSpec & {
|
|
424
|
-
status: import("./types").ImportResponse;
|
|
425
|
-
}>;
|
|
426
|
-
importTXT: (sessionId: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
427
|
-
status: import("./types").ImportResponse;
|
|
428
|
-
}>;
|
|
429
|
-
exportCSV: (sessionID: string, params: import("./types").ExportCSVParams) => Promise<string>;
|
|
430
|
-
};
|
|
431
397
|
postTextEnteredEvent: ({ sessionId, text, }: {
|
|
432
398
|
sessionId: string;
|
|
433
399
|
text: string;
|
|
@@ -503,6 +469,22 @@ declare const api: (hostname?: string) => {
|
|
|
503
469
|
deleteCorrelationPair: (sessionId: string, pairId: string) => Promise<import("./types").ResponseSpec>;
|
|
504
470
|
};
|
|
505
471
|
backend: {
|
|
472
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
473
|
+
status: import("./types").ImportResponse;
|
|
474
|
+
}>;
|
|
475
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
476
|
+
status: import("./types").ImportResponse;
|
|
477
|
+
}>;
|
|
478
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
479
|
+
importProcesses: import("./types").ImportResponse[];
|
|
480
|
+
}>;
|
|
481
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
482
|
+
status: import("./types").ImportResponse;
|
|
483
|
+
}>;
|
|
484
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
485
|
+
status: import("./types").ImportResponse;
|
|
486
|
+
}>;
|
|
487
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
506
488
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
507
489
|
notifications: import("./types").Notification[];
|
|
508
490
|
}>;
|
|
@@ -845,6 +827,24 @@ declare const api: (hostname?: string) => {
|
|
|
845
827
|
notifications: import("./types").Notification[];
|
|
846
828
|
}>;
|
|
847
829
|
};
|
|
830
|
+
importExport: {
|
|
831
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
832
|
+
status: import("./types").ImportResponse;
|
|
833
|
+
}>;
|
|
834
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
835
|
+
status: import("./types").ImportResponse;
|
|
836
|
+
}>;
|
|
837
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
838
|
+
importProcesses: import("./types").ImportResponse[];
|
|
839
|
+
}>;
|
|
840
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
841
|
+
status: import("./types").ImportResponse;
|
|
842
|
+
}>;
|
|
843
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
844
|
+
status: import("./types").ImportResponse;
|
|
845
|
+
}>;
|
|
846
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
847
|
+
};
|
|
848
848
|
};
|
|
849
849
|
};
|
|
850
850
|
export default api;
|
package/dist/types.d.ts
CHANGED
|
@@ -227,6 +227,12 @@ export declare type OpenSession = {
|
|
|
227
227
|
initialQuestion?: string;
|
|
228
228
|
forceCloseSessions?: boolean;
|
|
229
229
|
birthDate?: string;
|
|
230
|
+
additionalInfo?: {
|
|
231
|
+
userID?: string;
|
|
232
|
+
email?: string;
|
|
233
|
+
language?: string;
|
|
234
|
+
referral?: string;
|
|
235
|
+
};
|
|
230
236
|
};
|
|
231
237
|
export declare type MemoriSession = {
|
|
232
238
|
sessionID: string;
|
|
@@ -587,7 +593,8 @@ export type CustomWord = {
|
|
|
587
593
|
lastChangeTimestamp: string;
|
|
588
594
|
lastChangeSessionID: string;
|
|
589
595
|
};
|
|
590
|
-
export interface
|
|
596
|
+
export interface CsvSpecs {
|
|
597
|
+
newLine: '\n' | '\r\n';
|
|
591
598
|
hasHeaders?: boolean;
|
|
592
599
|
headerNames?: string[];
|
|
593
600
|
questionColumnName: string;
|
|
@@ -597,34 +604,25 @@ export interface ImportCSVParams {
|
|
|
597
604
|
csvSeparator?: string;
|
|
598
605
|
questionTitleVariantsSeparator?: string;
|
|
599
606
|
}
|
|
600
|
-
export interface
|
|
601
|
-
|
|
607
|
+
export interface TxtSpecs {
|
|
608
|
+
granularity?: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
609
|
+
attachSource?: boolean;
|
|
610
|
+
sourceAttachmentTitle?: string;
|
|
611
|
+
questionsGenerationInstructions?: string;
|
|
602
612
|
}
|
|
603
613
|
export interface ImportParams {
|
|
604
|
-
includedRows?: number[];
|
|
605
614
|
forceImport?: boolean;
|
|
606
|
-
csvSpecs?:
|
|
607
|
-
txtSpecs?:
|
|
615
|
+
csvSpecs?: CsvSpecs;
|
|
616
|
+
txtSpecs?: TxtSpecs;
|
|
608
617
|
conclusive?: boolean;
|
|
609
618
|
notPickable?: boolean;
|
|
610
619
|
contextVarsToSet?: {
|
|
611
620
|
[key: string]: string;
|
|
612
621
|
};
|
|
613
622
|
}
|
|
614
|
-
export interface ExportCSVParams {
|
|
615
|
-
newLine: '\n' | '\r\n';
|
|
616
|
-
hasHeaders?: boolean;
|
|
617
|
-
questionColumnName: string;
|
|
618
|
-
answerColumnName: string;
|
|
619
|
-
contextVarsToMatchColumnName?: string;
|
|
620
|
-
contextVarsToSetColumnName?: string;
|
|
621
|
-
csvSeparator?: string;
|
|
622
|
-
questionTitleVariantsSeparator?: string;
|
|
623
|
-
}
|
|
624
623
|
export interface ImportWarning {
|
|
625
624
|
warningType: 'Existing Similar Memory' | 'Internal Error';
|
|
626
625
|
rowNumber?: number;
|
|
627
|
-
row: string;
|
|
628
626
|
text?: string;
|
|
629
627
|
similarTexts?: {
|
|
630
628
|
text: string;
|
|
@@ -633,12 +631,26 @@ export interface ImportWarning {
|
|
|
633
631
|
}
|
|
634
632
|
export interface ImportResponse {
|
|
635
633
|
importID: string;
|
|
636
|
-
status: 'Starting' | 'Running' | 'Stopped' | 'Completed' | 'Failed';
|
|
634
|
+
status: 'Pending' | 'Starting' | 'Running' | 'Stopped' | 'Completed' | 'Failed';
|
|
637
635
|
error?: string;
|
|
638
636
|
progress: number;
|
|
637
|
+
importType: 'CSV' | 'TXT';
|
|
638
|
+
importSize: number;
|
|
639
639
|
begin?: string;
|
|
640
640
|
end?: string;
|
|
641
641
|
eta?: number;
|
|
642
642
|
importedMemories?: number;
|
|
643
643
|
importWarnings?: ImportWarning[];
|
|
644
644
|
}
|
|
645
|
+
export interface Badge {
|
|
646
|
+
badgeID?: string;
|
|
647
|
+
date?: string;
|
|
648
|
+
name?: string;
|
|
649
|
+
description?: string;
|
|
650
|
+
imageURL?: string;
|
|
651
|
+
tags?: string[];
|
|
652
|
+
issuerName?: string;
|
|
653
|
+
issuerDescription?: string;
|
|
654
|
+
issuerEmail?: string;
|
|
655
|
+
issuerURL?: string;
|
|
656
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs } from '../types';
|
|
2
|
+
declare const _default: (apiUrl: string) => {
|
|
3
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & {
|
|
4
|
+
status: ImportResponse;
|
|
5
|
+
}>;
|
|
6
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & {
|
|
7
|
+
status: ImportResponse;
|
|
8
|
+
}>;
|
|
9
|
+
importProcesses: (authToken: string) => Promise<ResponseSpec & {
|
|
10
|
+
importProcesses: ImportResponse[];
|
|
11
|
+
}>;
|
|
12
|
+
importStatus: (authToken: string, importID: string) => Promise<ResponseSpec & {
|
|
13
|
+
status: ImportResponse;
|
|
14
|
+
}>;
|
|
15
|
+
stopImport: (authToken: string, importID: string) => Promise<ResponseSpec & {
|
|
16
|
+
status: ImportResponse;
|
|
17
|
+
}>;
|
|
18
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { apiFetcher } from '../apiFetcher';
|
|
2
|
+
export default (apiUrl) => ({
|
|
3
|
+
importCSV: async (authToken, memoriID, rows, params) => apiFetcher(`/ImportExport/ImportCSV/${authToken}/${memoriID}`, {
|
|
4
|
+
apiUrl,
|
|
5
|
+
method: 'POST',
|
|
6
|
+
body: {
|
|
7
|
+
rows,
|
|
8
|
+
...params,
|
|
9
|
+
},
|
|
10
|
+
}),
|
|
11
|
+
importTXT: async (authToken, memoriID, rows, params) => apiFetcher(`/ImportExport/ImportTXT/${authToken}/${memoriID}`, {
|
|
12
|
+
apiUrl,
|
|
13
|
+
method: 'POST',
|
|
14
|
+
body: {
|
|
15
|
+
rows,
|
|
16
|
+
...params,
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
importProcesses: async (authToken) => apiFetcher(`/ImportExport/ImportProcesses/${authToken}`, {
|
|
20
|
+
apiUrl,
|
|
21
|
+
method: 'GET',
|
|
22
|
+
}),
|
|
23
|
+
importStatus: async (authToken, importID) => apiFetcher(`/ImportExport/ImportStatus/${authToken}/${importID}`, {
|
|
24
|
+
apiUrl,
|
|
25
|
+
method: 'GET',
|
|
26
|
+
}),
|
|
27
|
+
stopImport: async (authToken, importID) => apiFetcher(`/ImportExport/StopImport/${authToken}/${importID}`, {
|
|
28
|
+
apiUrl,
|
|
29
|
+
method: 'POST',
|
|
30
|
+
}),
|
|
31
|
+
exportCSV: async (authToken, memoriID, csvSpecs, password) => apiFetcher(`/ImportExport/ExportCSV/${authToken}/${memoriID}`, {
|
|
32
|
+
apiUrl,
|
|
33
|
+
method: 'POST',
|
|
34
|
+
body: {
|
|
35
|
+
csvSpecs,
|
|
36
|
+
password,
|
|
37
|
+
},
|
|
38
|
+
text: true,
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=importExport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExport.js","sourceRoot":"","sources":["../../src/backend/importExport.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAQlC,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IASH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,IAAc,EACd,MAAsC,EACtC,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI;YACJ,GAAG,MAAM;SACV;KACF,CAIA;IAMH,eAAe,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,CAC3C,UAAU,CAAC,iCAAiC,SAAS,EAAE,EAAE;QACvD,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,YAAY,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CAC1D,UAAU,CAAC,8BAA8B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAChE,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAIA;IAOH,UAAU,EAAE,KAAK,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE,CACxD,UAAU,CAAC,4BAA4B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC9D,MAAM;QACN,MAAM,EAAE,MAAM;KACf,CAIA;IAUH,SAAS,EAAE,KAAK,EACd,SAAiB,EACjB,QAAgB,EAChB,QAAkB,EAClB,QAAiB,EACjB,EAAE,CACF,UAAU,CAAC,2BAA2B,SAAS,IAAI,QAAQ,EAAE,EAAE;QAC7D,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,QAAQ;YACR,QAAQ;SACT;QACD,IAAI,EAAE,IAAI;KACX,CAAoB;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import memori from '../index';
|
|
2
|
+
const client = memori('https://backend-staging.memori.ai');
|
|
3
|
+
describe('backend/importexport api', () => {
|
|
4
|
+
it('works on importexport apis', async () => {
|
|
5
|
+
expect(await client.backend.importExport.importStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
6
|
+
});
|
|
7
|
+
it('works on importexport apis with shorthand version', async () => {
|
|
8
|
+
expect(await client.backend.importStatus('768b9654-e781-4c3c-81fa-ae1529d1bfbe', 'be2e4a44-890b-483b-a26a-f6e122f36e2b')).not.toBeNull();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=importExport.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importExport.test.js","sourceRoot":"","sources":["../../src/backend/importExport.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,MAAM,GAAG,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAE3D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAC5C,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACjE,MAAM,CACJ,MAAM,MAAM,CAAC,OAAO,CAAC,YAAY,CAC/B,sCAAsC,EACtC,sCAAsC,CACvC,CACF,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/esm/backend.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
declare const backendAPI: (apiUrl: string) => {
|
|
2
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
3
|
+
status: import("./types").ImportResponse;
|
|
4
|
+
}>;
|
|
5
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
6
|
+
status: import("./types").ImportResponse;
|
|
7
|
+
}>;
|
|
8
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
9
|
+
importProcesses: import("./types").ImportResponse[];
|
|
10
|
+
}>;
|
|
11
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
12
|
+
status: import("./types").ImportResponse;
|
|
13
|
+
}>;
|
|
14
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
15
|
+
status: import("./types").ImportResponse;
|
|
16
|
+
}>;
|
|
17
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
2
18
|
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & {
|
|
3
19
|
notifications: import("./types").Notification[];
|
|
4
20
|
}>;
|
|
@@ -341,5 +357,23 @@ declare const backendAPI: (apiUrl: string) => {
|
|
|
341
357
|
notifications: import("./types").Notification[];
|
|
342
358
|
}>;
|
|
343
359
|
};
|
|
360
|
+
importExport: {
|
|
361
|
+
importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
362
|
+
status: import("./types").ImportResponse;
|
|
363
|
+
}>;
|
|
364
|
+
importTXT: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "csvSpecs">) => Promise<import("./types").ResponseSpec & {
|
|
365
|
+
status: import("./types").ImportResponse;
|
|
366
|
+
}>;
|
|
367
|
+
importProcesses: (authToken: string) => Promise<import("./types").ResponseSpec & {
|
|
368
|
+
importProcesses: import("./types").ImportResponse[];
|
|
369
|
+
}>;
|
|
370
|
+
importStatus: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
371
|
+
status: import("./types").ImportResponse;
|
|
372
|
+
}>;
|
|
373
|
+
stopImport: (authToken: string, importID: string) => Promise<import("./types").ResponseSpec & {
|
|
374
|
+
status: import("./types").ImportResponse;
|
|
375
|
+
}>;
|
|
376
|
+
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>;
|
|
377
|
+
};
|
|
344
378
|
};
|
|
345
379
|
export default backendAPI;
|
package/esm/backend.js
CHANGED
|
@@ -5,6 +5,7 @@ import asset from './backend/asset';
|
|
|
5
5
|
import invitation from './backend/invitation';
|
|
6
6
|
import consumptionLogs from './backend/consumptionLogs';
|
|
7
7
|
import notifications from './backend/notifications';
|
|
8
|
+
import importExport from './backend/importExport';
|
|
8
9
|
const backendAPI = (apiUrl) => ({
|
|
9
10
|
asset: asset(apiUrl),
|
|
10
11
|
memori: memori(apiUrl),
|
|
@@ -13,6 +14,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
13
14
|
invitation: invitation(apiUrl),
|
|
14
15
|
consumptionLogs: consumptionLogs(apiUrl),
|
|
15
16
|
notifications: notifications(apiUrl),
|
|
17
|
+
importExport: importExport(apiUrl),
|
|
16
18
|
...asset(apiUrl),
|
|
17
19
|
...memori(apiUrl),
|
|
18
20
|
...user(apiUrl),
|
|
@@ -20,6 +22,7 @@ const backendAPI = (apiUrl) => ({
|
|
|
20
22
|
...invitation(apiUrl),
|
|
21
23
|
...consumptionLogs(apiUrl),
|
|
22
24
|
...notifications(apiUrl),
|
|
25
|
+
...importExport(apiUrl),
|
|
23
26
|
});
|
|
24
27
|
export default backendAPI;
|
|
25
28
|
//# sourceMappingURL=backend.js.map
|
package/esm/backend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,aAAa,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC9B,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC;IAClC,GAAG,KAAK,CAAC,MAAM,CAAC;IAChB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjB,GAAG,IAAI,CAAC,MAAM,CAAC;IACf,GAAG,WAAW,CAAC,MAAM,CAAC;IACtB,GAAG,UAAU,CAAC,MAAM,CAAC;IACrB,GAAG,eAAe,CAAC,MAAM,CAAC;IAC1B,GAAG,aAAa,CAAC,MAAM,CAAC;IACxB,GAAG,YAAY,CAAC,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|