@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
 
2
2
 
3
+ ## [1.1.0](https://github.com/memori-ai/memori-api-client/compare/v1.0.0...v1.1.0) (2023-02-16)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * rename signin in signup, typo
9
+ * update memori lists api, rename user memori list
10
+
11
+ ### Features
12
+
13
+ * add new user attributes ([5b10720](https://github.com/memori-ai/memori-api-client/commit/5b107206331a0ac6a579f983c5eb0fe04b4d9fc4))
14
+ * update memori lists api, rename user memori list ([6349149](https://github.com/memori-ai/memori-api-client/commit/63491496731ae65978c4ad81404881811ab6b13b))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * api url parsing allowing http for localhost ([6b6d881](https://github.com/memori-ai/memori-api-client/commit/6b6d8812385002e40cbbfc7fe87cd72daed3f5aa))
20
+
21
+
22
+ ### Changes
23
+
24
+ * rename signin in signup, typo ([6fc8dc4](https://github.com/memori-ai/memori-api-client/commit/6fc8dc4ecced9b379d7ace49f2c25e83985755c1))
25
+
3
26
  ## [1.0.0](https://github.com/memori-ai/memori-api-client/compare/v0.11.0...v1.0.0) (2023-02-01)
4
27
 
5
28
 
@@ -32,12 +32,32 @@ declare const _default: (apiUrl: string) => {
32
32
  getAllMemori: (authToken: string) => Promise<ResponseSpec & {
33
33
  memori: Memori[];
34
34
  }>;
35
+ /**
36
+ * Gets a list of Memori objects owned by the specified user.
37
+ * @param {string} tenantName - The name of the tenant
38
+ * @param {string} userID - The user name
39
+ * @param {string=} authToken - The login token
40
+ * @returns A list of Memori objects
41
+ */
42
+ getUserByIDMemoriList: (tenantName: string, userID: string, authToken?: string | undefined) => Promise<ResponseSpec & {
43
+ memori: Memori[];
44
+ }>;
45
+ /**
46
+ * Gets a list of Memori objects owned by the specified user.
47
+ * @param {string} tenantName - The name of the tenant
48
+ * @param {string} userName - The user name
49
+ * @param {string=} authToken - The login token
50
+ * @returns A list of Memori objects
51
+ */
52
+ getUserMemoriList: (tenantName: string, userName: string, authToken?: string | undefined) => Promise<ResponseSpec & {
53
+ memori: Memori[];
54
+ }>;
35
55
  /**
36
56
  * Gets a list of Memori objects for the currently logged in User.
37
57
  * @param authToken - The login token
38
58
  * @returns A list of Memori objects
39
59
  */
40
- getUserMemoriList: (authToken: string) => Promise<ResponseSpec & {
60
+ getMemoriList: (authToken: string) => Promise<ResponseSpec & {
41
61
  memori: Memori[];
42
62
  }>;
43
63
  /**
@@ -5,7 +5,7 @@ declare const _default: (apiUrl: string) => {
5
5
  * @param user - The user object
6
6
  * @returns The created user object
7
7
  */
8
- userSignIn: (user: User) => Promise<ResponseSpec & {
8
+ userSignUp: (user: User) => Promise<ResponseSpec & {
9
9
  user: User;
10
10
  }>;
11
11
  /**
@@ -13,7 +13,7 @@ declare const _default: (apiUrl: string) => {
13
13
  * @param user - The user object
14
14
  * @returns The created user object
15
15
  */
16
- userConfirmSignIn: (user: User) => Promise<ResponseSpec & {
16
+ userConfirmSignUp: (user: User) => Promise<ResponseSpec & {
17
17
  user: User;
18
18
  token?: string | undefined;
19
19
  }>;
@@ -405,7 +405,7 @@ function _extends() {
405
405
  }
406
406
 
407
407
  var getApiUrl = function getApiUrl(hostname) {
408
- return hostname ? new URL(hostname.startsWith('http') ? hostname : "https://" + hostname).origin.replace('http://', 'https://') : 'https://backend.memori.ai';
408
+ return hostname ? new URL(hostname.startsWith('http') ? hostname : "https://" + hostname).origin : 'https://backend.memori.ai';
409
409
  };
410
410
 
411
411
  var apiFetcher = function apiFetcher(path, opts) {
@@ -468,12 +468,38 @@ var memori = (function (apiUrl) {
468
468
  });
469
469
  },
470
470
 
471
+ /**
472
+ * Gets a list of Memori objects owned by the specified user.
473
+ * @param {string} tenantName - The name of the tenant
474
+ * @param {string} userID - The user name
475
+ * @param {string=} authToken - The login token
476
+ * @returns A list of Memori objects
477
+ */
478
+ getUserByIDMemoriList: function getUserByIDMemoriList(tenantName, userID, authToken) {
479
+ return apiFetcher("/UserMemoriByID/" + tenantName + "/" + userID + (authToken ? "/" + authToken : ''), {
480
+ apiUrl: apiUrl
481
+ });
482
+ },
483
+
484
+ /**
485
+ * Gets a list of Memori objects owned by the specified user.
486
+ * @param {string} tenantName - The name of the tenant
487
+ * @param {string} userName - The user name
488
+ * @param {string=} authToken - The login token
489
+ * @returns A list of Memori objects
490
+ */
491
+ getUserMemoriList: function getUserMemoriList(tenantName, userName, authToken) {
492
+ return apiFetcher("/UserMemori/" + tenantName + "/" + userName + (authToken ? "/" + authToken : ''), {
493
+ apiUrl: apiUrl
494
+ });
495
+ },
496
+
471
497
  /**
472
498
  * Gets a list of Memori objects for the currently logged in User.
473
499
  * @param authToken - The login token
474
500
  * @returns A list of Memori objects
475
501
  */
476
- getUserMemoriList: function getUserMemoriList(authToken) {
502
+ getMemoriList: function getMemoriList(authToken) {
477
503
  return apiFetcher("/Memori/" + authToken, {
478
504
  apiUrl: apiUrl
479
505
  });
@@ -642,7 +668,7 @@ var user = (function (apiUrl) {
642
668
  * @param user - The user object
643
669
  * @returns The created user object
644
670
  */
645
- userSignIn: function userSignIn(user) {
671
+ userSignUp: function userSignUp(user) {
646
672
  return apiFetcher('/User', {
647
673
  apiUrl: apiUrl,
648
674
  body: user,
@@ -655,7 +681,7 @@ var user = (function (apiUrl) {
655
681
  * @param user - The user object
656
682
  * @returns The created user object
657
683
  */
658
- userConfirmSignIn: function userConfirmSignIn(user) {
684
+ userConfirmSignUp: function userConfirmSignUp(user) {
659
685
  return apiFetcher('/UserConfirm', {
660
686
  apiUrl: apiUrl,
661
687
  body: user,