@memori.ai/memori-api-client 1.0.0 → 1.1.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.
@@ -399,7 +399,7 @@ function _extends() {
399
399
  }
400
400
 
401
401
  var getApiUrl = function getApiUrl(hostname) {
402
- return hostname ? new URL(hostname.startsWith('http') ? hostname : "https://" + hostname).origin.replace('http://', 'https://') : 'https://backend.memori.ai';
402
+ return hostname ? new URL(hostname.startsWith('http') ? hostname : "https://" + hostname).origin : 'https://backend.memori.ai';
403
403
  };
404
404
 
405
405
  var apiFetcher = function apiFetcher(path, opts) {
@@ -462,12 +462,38 @@ var memori = (function (apiUrl) {
462
462
  });
463
463
  },
464
464
 
465
+ /**
466
+ * Gets a list of Memori objects owned by the specified user.
467
+ * @param {string} tenantName - The name of the tenant
468
+ * @param {string} userID - The user name
469
+ * @param {string=} authToken - The login token
470
+ * @returns A list of Memori objects
471
+ */
472
+ getUserByIDMemoriList: function getUserByIDMemoriList(tenantName, userID, authToken) {
473
+ return apiFetcher("/UserMemoriByID/" + tenantName + "/" + userID + (authToken ? "/" + authToken : ''), {
474
+ apiUrl: apiUrl
475
+ });
476
+ },
477
+
478
+ /**
479
+ * Gets a list of Memori objects owned by the specified user.
480
+ * @param {string} tenantName - The name of the tenant
481
+ * @param {string} userName - The user name
482
+ * @param {string=} authToken - The login token
483
+ * @returns A list of Memori objects
484
+ */
485
+ getUserMemoriList: function getUserMemoriList(tenantName, userName, authToken) {
486
+ return apiFetcher("/UserMemori/" + tenantName + "/" + userName + (authToken ? "/" + authToken : ''), {
487
+ apiUrl: apiUrl
488
+ });
489
+ },
490
+
465
491
  /**
466
492
  * Gets a list of Memori objects for the currently logged in User.
467
493
  * @param authToken - The login token
468
494
  * @returns A list of Memori objects
469
495
  */
470
- getUserMemoriList: function getUserMemoriList(authToken) {
496
+ getMemoriList: function getMemoriList(authToken) {
471
497
  return apiFetcher("/Memori/" + authToken, {
472
498
  apiUrl: apiUrl
473
499
  });
@@ -636,7 +662,7 @@ var user = (function (apiUrl) {
636
662
  * @param user - The user object
637
663
  * @returns The created user object
638
664
  */
639
- userSignIn: function userSignIn(user) {
665
+ userSignUp: function userSignUp(user) {
640
666
  return apiFetcher('/User', {
641
667
  apiUrl: apiUrl,
642
668
  body: user,
@@ -649,7 +675,7 @@ var user = (function (apiUrl) {
649
675
  * @param user - The user object
650
676
  * @returns The created user object
651
677
  */
652
- userConfirmSignIn: function userConfirmSignIn(user) {
678
+ userConfirmSignUp: function userConfirmSignUp(user) {
653
679
  return apiFetcher('/UserConfirm', {
654
680
  apiUrl: apiUrl,
655
681
  body: user,