@memori.ai/memori-api-client 0.3.3 → 0.4.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/dist/engine/memories.d.ts +8 -0
- package/dist/engine/unansweredQuestions.d.ts +8 -0
- package/dist/memori-api-client.cjs.development.js +101 -41
- package/dist/memori-api-client.cjs.development.js.map +1 -1
- package/dist/memori-api-client.cjs.production.min.js +1 -1
- package/dist/memori-api-client.cjs.production.min.js.map +1 -1
- package/dist/memori-api-client.esm.js +101 -41
- package/dist/memori-api-client.esm.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/engine/memories.ts +19 -0
- package/src/engine/unansweredQuestions.ts +19 -0
- package/src/types.ts +1 -1
|
@@ -2344,17 +2344,16 @@ var memories = (function (apiUrl) {
|
|
|
2344
2344
|
}(),
|
|
2345
2345
|
|
|
2346
2346
|
/**
|
|
2347
|
-
*
|
|
2347
|
+
* Lists paginated Memory objects.
|
|
2348
2348
|
* @param {string} sessionId The session ID
|
|
2349
|
-
* @param {string} memoryId The Memory object ID
|
|
2350
2349
|
*/
|
|
2351
|
-
|
|
2352
|
-
var
|
|
2350
|
+
getMemoriesPaginated: function () {
|
|
2351
|
+
var _getMemoriesPaginated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sessionId, from, howMany) {
|
|
2353
2352
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2354
2353
|
while (1) {
|
|
2355
2354
|
switch (_context2.prev = _context2.next) {
|
|
2356
2355
|
case 0:
|
|
2357
|
-
return _context2.abrupt("return", apiFetcher("/
|
|
2356
|
+
return _context2.abrupt("return", apiFetcher("/Memories/" + sessionId + "/" + from + "/" + howMany, {
|
|
2358
2357
|
method: 'GET',
|
|
2359
2358
|
apiUrl: apiUrl
|
|
2360
2359
|
}));
|
|
@@ -2367,7 +2366,38 @@ var memories = (function (apiUrl) {
|
|
|
2367
2366
|
}, _callee2);
|
|
2368
2367
|
}));
|
|
2369
2368
|
|
|
2370
|
-
function
|
|
2369
|
+
function getMemoriesPaginated(_x2, _x3, _x4) {
|
|
2370
|
+
return _getMemoriesPaginated.apply(this, arguments);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
return getMemoriesPaginated;
|
|
2374
|
+
}(),
|
|
2375
|
+
|
|
2376
|
+
/**
|
|
2377
|
+
* Gets the details of a Memory object.
|
|
2378
|
+
* @param {string} sessionId The session ID
|
|
2379
|
+
* @param {string} memoryId The Memory object ID
|
|
2380
|
+
*/
|
|
2381
|
+
getMemory: function () {
|
|
2382
|
+
var _getMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(sessionId, memoryId) {
|
|
2383
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
2384
|
+
while (1) {
|
|
2385
|
+
switch (_context3.prev = _context3.next) {
|
|
2386
|
+
case 0:
|
|
2387
|
+
return _context3.abrupt("return", apiFetcher("/Memory/" + sessionId + "/" + memoryId, {
|
|
2388
|
+
method: 'GET',
|
|
2389
|
+
apiUrl: apiUrl
|
|
2390
|
+
}));
|
|
2391
|
+
|
|
2392
|
+
case 1:
|
|
2393
|
+
case "end":
|
|
2394
|
+
return _context3.stop();
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}, _callee3);
|
|
2398
|
+
}));
|
|
2399
|
+
|
|
2400
|
+
function getMemory(_x5, _x6) {
|
|
2371
2401
|
return _getMemory.apply(this, arguments);
|
|
2372
2402
|
}
|
|
2373
2403
|
|
|
@@ -2380,12 +2410,12 @@ var memories = (function (apiUrl) {
|
|
|
2380
2410
|
* @param {Memory} memory The Memory object
|
|
2381
2411
|
*/
|
|
2382
2412
|
patchMemory: function () {
|
|
2383
|
-
var _patchMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2384
|
-
return _regeneratorRuntime().wrap(function
|
|
2413
|
+
var _patchMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(sessionId, memory) {
|
|
2414
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2385
2415
|
while (1) {
|
|
2386
|
-
switch (
|
|
2416
|
+
switch (_context4.prev = _context4.next) {
|
|
2387
2417
|
case 0:
|
|
2388
|
-
return
|
|
2418
|
+
return _context4.abrupt("return", apiFetcher("/Memory/" + sessionId + "/" + memory.memoryID, {
|
|
2389
2419
|
method: 'PATCH',
|
|
2390
2420
|
apiUrl: apiUrl,
|
|
2391
2421
|
body: memory
|
|
@@ -2393,13 +2423,13 @@ var memories = (function (apiUrl) {
|
|
|
2393
2423
|
|
|
2394
2424
|
case 1:
|
|
2395
2425
|
case "end":
|
|
2396
|
-
return
|
|
2426
|
+
return _context4.stop();
|
|
2397
2427
|
}
|
|
2398
2428
|
}
|
|
2399
|
-
},
|
|
2429
|
+
}, _callee4);
|
|
2400
2430
|
}));
|
|
2401
2431
|
|
|
2402
|
-
function patchMemory(
|
|
2432
|
+
function patchMemory(_x7, _x8) {
|
|
2403
2433
|
return _patchMemory.apply(this, arguments);
|
|
2404
2434
|
}
|
|
2405
2435
|
|
|
@@ -2412,25 +2442,25 @@ var memories = (function (apiUrl) {
|
|
|
2412
2442
|
* @param {string} memoryId The Memory object ID
|
|
2413
2443
|
*/
|
|
2414
2444
|
deleteMemory: function () {
|
|
2415
|
-
var _deleteMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2416
|
-
return _regeneratorRuntime().wrap(function
|
|
2445
|
+
var _deleteMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(sessionId, memoryId) {
|
|
2446
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
2417
2447
|
while (1) {
|
|
2418
|
-
switch (
|
|
2448
|
+
switch (_context5.prev = _context5.next) {
|
|
2419
2449
|
case 0:
|
|
2420
|
-
return
|
|
2450
|
+
return _context5.abrupt("return", apiFetcher("/Memory/" + sessionId + "/" + memoryId, {
|
|
2421
2451
|
method: 'DELETE',
|
|
2422
2452
|
apiUrl: apiUrl
|
|
2423
2453
|
}));
|
|
2424
2454
|
|
|
2425
2455
|
case 1:
|
|
2426
2456
|
case "end":
|
|
2427
|
-
return
|
|
2457
|
+
return _context5.stop();
|
|
2428
2458
|
}
|
|
2429
2459
|
}
|
|
2430
|
-
},
|
|
2460
|
+
}, _callee5);
|
|
2431
2461
|
}));
|
|
2432
2462
|
|
|
2433
|
-
function deleteMemory(
|
|
2463
|
+
function deleteMemory(_x9, _x10) {
|
|
2434
2464
|
return _deleteMemory.apply(this, arguments);
|
|
2435
2465
|
}
|
|
2436
2466
|
|
|
@@ -2443,12 +2473,12 @@ var memories = (function (apiUrl) {
|
|
|
2443
2473
|
* @param {Memory} memory The Memory object
|
|
2444
2474
|
*/
|
|
2445
2475
|
postMemory: function () {
|
|
2446
|
-
var _postMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2447
|
-
return _regeneratorRuntime().wrap(function
|
|
2476
|
+
var _postMemory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(sessionId, memory) {
|
|
2477
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
2448
2478
|
while (1) {
|
|
2449
|
-
switch (
|
|
2479
|
+
switch (_context6.prev = _context6.next) {
|
|
2450
2480
|
case 0:
|
|
2451
|
-
return
|
|
2481
|
+
return _context6.abrupt("return", apiFetcher("/Memory/" + sessionId, {
|
|
2452
2482
|
method: 'POST',
|
|
2453
2483
|
apiUrl: apiUrl,
|
|
2454
2484
|
body: memory
|
|
@@ -2456,13 +2486,13 @@ var memories = (function (apiUrl) {
|
|
|
2456
2486
|
|
|
2457
2487
|
case 1:
|
|
2458
2488
|
case "end":
|
|
2459
|
-
return
|
|
2489
|
+
return _context6.stop();
|
|
2460
2490
|
}
|
|
2461
2491
|
}
|
|
2462
|
-
},
|
|
2492
|
+
}, _callee6);
|
|
2463
2493
|
}));
|
|
2464
2494
|
|
|
2465
|
-
function postMemory(
|
|
2495
|
+
function postMemory(_x11, _x12) {
|
|
2466
2496
|
return _postMemory.apply(this, arguments);
|
|
2467
2497
|
}
|
|
2468
2498
|
|
|
@@ -2475,25 +2505,25 @@ var memories = (function (apiUrl) {
|
|
|
2475
2505
|
* @param {string} memoryId The Memory object ID
|
|
2476
2506
|
*/
|
|
2477
2507
|
getMemoryAccess: function () {
|
|
2478
|
-
var _getMemoryAccess = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2479
|
-
return _regeneratorRuntime().wrap(function
|
|
2508
|
+
var _getMemoryAccess = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(sessionId, memoryId) {
|
|
2509
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
2480
2510
|
while (1) {
|
|
2481
|
-
switch (
|
|
2511
|
+
switch (_context7.prev = _context7.next) {
|
|
2482
2512
|
case 0:
|
|
2483
|
-
return
|
|
2513
|
+
return _context7.abrupt("return", apiFetcher("/MemoryAccess/" + sessionId + "/" + memoryId, {
|
|
2484
2514
|
method: 'GET',
|
|
2485
2515
|
apiUrl: apiUrl
|
|
2486
2516
|
}));
|
|
2487
2517
|
|
|
2488
2518
|
case 1:
|
|
2489
2519
|
case "end":
|
|
2490
|
-
return
|
|
2520
|
+
return _context7.stop();
|
|
2491
2521
|
}
|
|
2492
2522
|
}
|
|
2493
|
-
},
|
|
2523
|
+
}, _callee7);
|
|
2494
2524
|
}));
|
|
2495
2525
|
|
|
2496
|
-
function getMemoryAccess(
|
|
2526
|
+
function getMemoryAccess(_x13, _x14) {
|
|
2497
2527
|
return _getMemoryAccess.apply(this, arguments);
|
|
2498
2528
|
}
|
|
2499
2529
|
|
|
@@ -3453,18 +3483,17 @@ var unansweredQuestions = (function (apiUrl) {
|
|
|
3453
3483
|
}(),
|
|
3454
3484
|
|
|
3455
3485
|
/**
|
|
3456
|
-
*
|
|
3486
|
+
* Lists paginated Unanswered Question objects.
|
|
3457
3487
|
* @param {string} sessionId The session ID
|
|
3458
|
-
* @param {string} unansweredQuestionId The Unanswered Question object ID
|
|
3459
3488
|
*/
|
|
3460
|
-
|
|
3461
|
-
var
|
|
3489
|
+
getUnansweredQuestionsPaginated: function () {
|
|
3490
|
+
var _getUnansweredQuestionsPaginated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sessionId, from, howMany) {
|
|
3462
3491
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3463
3492
|
while (1) {
|
|
3464
3493
|
switch (_context2.prev = _context2.next) {
|
|
3465
3494
|
case 0:
|
|
3466
|
-
return _context2.abrupt("return", apiFetcher("/
|
|
3467
|
-
method: '
|
|
3495
|
+
return _context2.abrupt("return", apiFetcher("/UnansweredQuestions/" + sessionId + "/" + from + "/" + howMany, {
|
|
3496
|
+
method: 'GET',
|
|
3468
3497
|
apiUrl: apiUrl
|
|
3469
3498
|
}));
|
|
3470
3499
|
|
|
@@ -3476,7 +3505,38 @@ var unansweredQuestions = (function (apiUrl) {
|
|
|
3476
3505
|
}, _callee2);
|
|
3477
3506
|
}));
|
|
3478
3507
|
|
|
3479
|
-
function
|
|
3508
|
+
function getUnansweredQuestionsPaginated(_x2, _x3, _x4) {
|
|
3509
|
+
return _getUnansweredQuestionsPaginated.apply(this, arguments);
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
return getUnansweredQuestionsPaginated;
|
|
3513
|
+
}(),
|
|
3514
|
+
|
|
3515
|
+
/**
|
|
3516
|
+
* Removes an existing Unanswered Question object.
|
|
3517
|
+
* @param {string} sessionId The session ID
|
|
3518
|
+
* @param {string} unansweredQuestionId The Unanswered Question object ID
|
|
3519
|
+
*/
|
|
3520
|
+
deleteUnansweredQuestion: function () {
|
|
3521
|
+
var _deleteUnansweredQuestion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(sessionId, unansweredQuestionId) {
|
|
3522
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3523
|
+
while (1) {
|
|
3524
|
+
switch (_context3.prev = _context3.next) {
|
|
3525
|
+
case 0:
|
|
3526
|
+
return _context3.abrupt("return", apiFetcher("/UnansweredQuestion/" + sessionId + "/" + unansweredQuestionId, {
|
|
3527
|
+
method: 'DELETE',
|
|
3528
|
+
apiUrl: apiUrl
|
|
3529
|
+
}));
|
|
3530
|
+
|
|
3531
|
+
case 1:
|
|
3532
|
+
case "end":
|
|
3533
|
+
return _context3.stop();
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
}, _callee3);
|
|
3537
|
+
}));
|
|
3538
|
+
|
|
3539
|
+
function deleteUnansweredQuestion(_x5, _x6) {
|
|
3480
3540
|
return _deleteUnansweredQuestion.apply(this, arguments);
|
|
3481
3541
|
}
|
|
3482
3542
|
|