@memori.ai/memori-api-client 6.3.0 → 6.5.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,19 @@
1
1
 
2
2
 
3
+ ## [6.5.0](https://github.com/memori-ai/memori-api-client/compare/v6.4.0...v6.5.0) (2025-05-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * add notification management functions including create, get, delete, list, and update ([6e8dfad](https://github.com/memori-ai/memori-api-client/commit/6e8dfad276be195d96aece3758fcdb73789ccda4))
9
+
10
+ ## [6.4.0](https://github.com/memori-ai/memori-api-client/compare/v6.3.0...v6.4.0) (2025-05-22)
11
+
12
+
13
+ ### Features
14
+
15
+ * update CompletionConfig to Vertex_Anthropic provider options ([e2e23ad](https://github.com/memori-ai/memori-api-client/commit/e2e23ad86de1457440b45104bbbb64a2c3d69f69))
16
+
3
17
  ## [6.3.0](https://github.com/memori-ai/memori-api-client/compare/v6.2.0...v6.3.0) (2025-05-22)
4
18
 
5
19
 
@@ -1,4 +1,4 @@
1
- import { ResponseSpec, Notification } from '../types';
1
+ import type { ResponseSpec, Notification } from '../types';
2
2
  declare const _default: (apiUrl: string) => {
3
3
  getTenantNotifications: (tenantID: string) => Promise<ResponseSpec & {
4
4
  notifications: Notification[];
@@ -6,5 +6,10 @@ declare const _default: (apiUrl: string) => {
6
6
  getUserNotifications: (authToken: string) => Promise<ResponseSpec & {
7
7
  notifications: Notification[];
8
8
  }>;
9
+ createNotification: (token: string, notificationData: Notification) => Promise<ResponseSpec>;
10
+ getNotification: (token: string, notificationId: string) => Promise<ResponseSpec>;
11
+ deleteNotification: (token: string, notificationId: string) => Promise<ResponseSpec>;
12
+ listAllNotifications: (token: string, filter?: 'ACTIVE_AND_FUTURE' | 'ONLY_FUTURE' | 'ALL') => Promise<ResponseSpec>;
13
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<Notification>) => Promise<ResponseSpec>;
9
14
  };
10
15
  export default _default;
@@ -8,5 +8,25 @@ exports.default = (apiUrl) => ({
8
8
  getUserNotifications: (authToken) => (0, apiFetcher_1.apiFetcher)(`/UserNotifications/${authToken}`, {
9
9
  apiUrl,
10
10
  }),
11
+ createNotification: (token, notificationData) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}`, {
12
+ apiUrl,
13
+ method: 'POST',
14
+ body: notificationData,
15
+ }),
16
+ getNotification: (token, notificationId) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, {
17
+ apiUrl,
18
+ }),
19
+ deleteNotification: (token, notificationId) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, {
20
+ apiUrl,
21
+ method: 'DELETE',
22
+ }),
23
+ listAllNotifications: (token, filter = 'ACTIVE_AND_FUTURE') => (0, apiFetcher_1.apiFetcher)(`/ListAllNotifications/${token}/${filter}`, {
24
+ apiUrl,
25
+ }),
26
+ updateNotification: (token, notificationId, notificationData) => (0, apiFetcher_1.apiFetcher)(`/Notifications/${token}/${notificationId}`, {
27
+ apiUrl,
28
+ method: 'PATCH',
29
+ body: notificationData,
30
+ }),
11
31
  });
12
32
  //# sourceMappingURL=notifications.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/backend/notifications.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAE3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,sBAAsB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAC3C,IAAA,uBAAU,EAAC,wBAAwB,QAAQ,EAAE,EAAE;QAC7C,MAAM;KACP,CAA8D;IAOjE,oBAAoB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAC1C,IAAA,uBAAU,EAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM;KACP,CAA8D;CAClE,CAAC,CAAC"}
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/backend/notifications.ts"],"names":[],"mappings":";;AACA,8CAA2C;AAE3C,kBAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,sBAAsB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAC3C,IAAA,uBAAU,EAAC,wBAAwB,QAAQ,EAAE,EAAE;QAC7C,MAAM;KACP,CAA8D;IAOjE,oBAAoB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAC1C,IAAA,uBAAU,EAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM;KACP,CAA8D;IAQjE,kBAAkB,EAAE,CAAC,KAAa,EAAE,gBAA8B,EAAE,EAAE,CACpE,IAAA,uBAAU,EAAC,kBAAkB,KAAK,EAAE,EAAE;QACpC,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,gBAAgB;KACvB,CAA0B;IAQ7B,eAAe,EAAE,CAAC,KAAa,EAAE,cAAsB,EAAE,EAAE,CACzD,IAAA,uBAAU,EAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;KACP,CAA0B;IAQ7B,kBAAkB,EAAE,CAAC,KAAa,EAAE,cAAsB,EAAE,EAAE,CAC5D,IAAA,uBAAU,EAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;QACN,MAAM,EAAE,QAAQ;KACjB,CAA0B;IAQ7B,oBAAoB,EAAE,CACpB,KAAa,EACb,SAAsD,mBAAmB,EACzE,EAAE,CACF,IAAA,uBAAU,EAAC,yBAAyB,KAAK,IAAI,MAAM,EAAE,EAAE;QACrD,MAAM;KACP,CAA0B;IAS7B,kBAAkB,EAAE,CAClB,KAAa,EACb,cAAsB,EACtB,gBAAuC,EACvC,EAAE,CACF,IAAA,uBAAU,EAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;QACN,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,gBAAgB;KACvB,CAA0B;CAC9B,CAAC,CAAC"}
package/dist/backend.d.ts CHANGED
@@ -86,6 +86,11 @@ declare const backendAPI: (apiUrl: string) => {
86
86
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
87
87
  notifications: import("./types").Notification[];
88
88
  }>;
89
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
90
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
91
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
92
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
93
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
89
94
  getTenantConsumptionLogs: (authToken: string, tenantID: string, type: "Daily" | "Monthly", dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
90
95
  consumptionLogs: import("./types").ConsumptionLog[];
91
96
  }>;
@@ -437,6 +442,11 @@ declare const backendAPI: (apiUrl: string) => {
437
442
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
438
443
  notifications: import("./types").Notification[];
439
444
  }>;
445
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
446
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
447
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
448
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
449
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
440
450
  };
441
451
  importExport: {
442
452
  importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
package/dist/index.d.ts CHANGED
@@ -832,6 +832,11 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
832
832
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
833
833
  notifications: import("./types").Notification[];
834
834
  }>;
835
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
836
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
837
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
838
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
839
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
835
840
  getTenantConsumptionLogs: (authToken: string, tenantID: string, type: "Daily" | "Monthly", dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
836
841
  consumptionLogs: import("./types").ConsumptionLog[];
837
842
  }>;
@@ -1183,6 +1188,11 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
1183
1188
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
1184
1189
  notifications: import("./types").Notification[];
1185
1190
  }>;
1191
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
1192
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
1193
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
1194
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
1195
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
1186
1196
  };
1187
1197
  importExport: {
1188
1198
  importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
package/dist/types.d.ts CHANGED
@@ -102,7 +102,7 @@ export declare type CompletionConfig = {
102
102
  completionConfigID: string;
103
103
  configName: string;
104
104
  description?: string;
105
- provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI' | 'AWS_Anthropic';
105
+ provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI' | 'AWS_Anthropic' | 'Vertex_Anthropic';
106
106
  endPoint?: string;
107
107
  apiKey?: string;
108
108
  model: string;
@@ -119,6 +119,7 @@ export declare type CompletionConfig = {
119
119
  region?: string;
120
120
  modelId?: string;
121
121
  accessKeyId?: string;
122
+ projectId?: string;
122
123
  secretAccessKey?: string;
123
124
  location?: string;
124
125
  clientSecret?: string;
@@ -1,4 +1,4 @@
1
- import { ResponseSpec, Notification } from '../types';
1
+ import type { ResponseSpec, Notification } from '../types';
2
2
  declare const _default: (apiUrl: string) => {
3
3
  getTenantNotifications: (tenantID: string) => Promise<ResponseSpec & {
4
4
  notifications: Notification[];
@@ -6,5 +6,10 @@ declare const _default: (apiUrl: string) => {
6
6
  getUserNotifications: (authToken: string) => Promise<ResponseSpec & {
7
7
  notifications: Notification[];
8
8
  }>;
9
+ createNotification: (token: string, notificationData: Notification) => Promise<ResponseSpec>;
10
+ getNotification: (token: string, notificationId: string) => Promise<ResponseSpec>;
11
+ deleteNotification: (token: string, notificationId: string) => Promise<ResponseSpec>;
12
+ listAllNotifications: (token: string, filter?: 'ACTIVE_AND_FUTURE' | 'ONLY_FUTURE' | 'ALL') => Promise<ResponseSpec>;
13
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<Notification>) => Promise<ResponseSpec>;
9
14
  };
10
15
  export default _default;
@@ -6,5 +6,25 @@ export default (apiUrl) => ({
6
6
  getUserNotifications: (authToken) => apiFetcher(`/UserNotifications/${authToken}`, {
7
7
  apiUrl,
8
8
  }),
9
+ createNotification: (token, notificationData) => apiFetcher(`/Notifications/${token}`, {
10
+ apiUrl,
11
+ method: 'POST',
12
+ body: notificationData,
13
+ }),
14
+ getNotification: (token, notificationId) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
15
+ apiUrl,
16
+ }),
17
+ deleteNotification: (token, notificationId) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
18
+ apiUrl,
19
+ method: 'DELETE',
20
+ }),
21
+ listAllNotifications: (token, filter = 'ACTIVE_AND_FUTURE') => apiFetcher(`/ListAllNotifications/${token}/${filter}`, {
22
+ apiUrl,
23
+ }),
24
+ updateNotification: (token, notificationId, notificationData) => apiFetcher(`/Notifications/${token}/${notificationId}`, {
25
+ apiUrl,
26
+ method: 'PATCH',
27
+ body: notificationData,
28
+ }),
9
29
  });
10
30
  //# sourceMappingURL=notifications.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/backend/notifications.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,sBAAsB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAC3C,UAAU,CAAC,wBAAwB,QAAQ,EAAE,EAAE;QAC7C,MAAM;KACP,CAA8D;IAOjE,oBAAoB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAC1C,UAAU,CAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM;KACP,CAA8D;CAClE,CAAC,CAAC"}
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/backend/notifications.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAe,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IAMlC,sBAAsB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAC3C,UAAU,CAAC,wBAAwB,QAAQ,EAAE,EAAE;QAC7C,MAAM;KACP,CAA8D;IAOjE,oBAAoB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAC1C,UAAU,CAAC,sBAAsB,SAAS,EAAE,EAAE;QAC5C,MAAM;KACP,CAA8D;IAQjE,kBAAkB,EAAE,CAAC,KAAa,EAAE,gBAA8B,EAAE,EAAE,CACpE,UAAU,CAAC,kBAAkB,KAAK,EAAE,EAAE;QACpC,MAAM;QACN,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,gBAAgB;KACvB,CAA0B;IAQ7B,eAAe,EAAE,CAAC,KAAa,EAAE,cAAsB,EAAE,EAAE,CACzD,UAAU,CAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;KACP,CAA0B;IAQ7B,kBAAkB,EAAE,CAAC,KAAa,EAAE,cAAsB,EAAE,EAAE,CAC5D,UAAU,CAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;QACN,MAAM,EAAE,QAAQ;KACjB,CAA0B;IAQ7B,oBAAoB,EAAE,CACpB,KAAa,EACb,SAAsD,mBAAmB,EACzE,EAAE,CACF,UAAU,CAAC,yBAAyB,KAAK,IAAI,MAAM,EAAE,EAAE;QACrD,MAAM;KACP,CAA0B;IAS7B,kBAAkB,EAAE,CAClB,KAAa,EACb,cAAsB,EACtB,gBAAuC,EACvC,EAAE,CACF,UAAU,CAAC,kBAAkB,KAAK,IAAI,cAAc,EAAE,EAAE;QACtD,MAAM;QACN,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,gBAAgB;KACvB,CAA0B;CAC9B,CAAC,CAAC"}
package/esm/backend.d.ts CHANGED
@@ -86,6 +86,11 @@ declare const backendAPI: (apiUrl: string) => {
86
86
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
87
87
  notifications: import("./types").Notification[];
88
88
  }>;
89
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
90
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
91
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
92
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
93
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
89
94
  getTenantConsumptionLogs: (authToken: string, tenantID: string, type: "Daily" | "Monthly", dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
90
95
  consumptionLogs: import("./types").ConsumptionLog[];
91
96
  }>;
@@ -437,6 +442,11 @@ declare const backendAPI: (apiUrl: string) => {
437
442
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
438
443
  notifications: import("./types").Notification[];
439
444
  }>;
445
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
446
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
447
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
448
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
449
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
440
450
  };
441
451
  importExport: {
442
452
  importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
package/esm/index.d.ts CHANGED
@@ -832,6 +832,11 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
832
832
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
833
833
  notifications: import("./types").Notification[];
834
834
  }>;
835
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
836
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
837
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
838
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
839
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
835
840
  getTenantConsumptionLogs: (authToken: string, tenantID: string, type: "Daily" | "Monthly", dateFrom?: string | undefined, dateTo?: string | undefined) => Promise<import("./types").ResponseSpec & {
836
841
  consumptionLogs: import("./types").ConsumptionLog[];
837
842
  }>;
@@ -1183,6 +1188,11 @@ declare const api: (backendEndpoint?: string, engineEndpoint?: string) => {
1183
1188
  getUserNotifications: (authToken: string) => Promise<import("./types").ResponseSpec & {
1184
1189
  notifications: import("./types").Notification[];
1185
1190
  }>;
1191
+ createNotification: (token: string, notificationData: import("./types").Notification) => Promise<import("./types").ResponseSpec>;
1192
+ getNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
1193
+ deleteNotification: (token: string, notificationId: string) => Promise<import("./types").ResponseSpec>;
1194
+ listAllNotifications: (token: string, filter?: "ACTIVE_AND_FUTURE" | "ONLY_FUTURE" | "ALL") => Promise<import("./types").ResponseSpec>;
1195
+ updateNotification: (token: string, notificationId: string, notificationData: Partial<import("./types").Notification>) => Promise<import("./types").ResponseSpec>;
1186
1196
  };
1187
1197
  importExport: {
1188
1198
  importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<import("./types").ImportParams, "txtSpecs">) => Promise<import("./types").ResponseSpec & {
package/esm/types.d.ts CHANGED
@@ -102,7 +102,7 @@ export declare type CompletionConfig = {
102
102
  completionConfigID: string;
103
103
  configName: string;
104
104
  description?: string;
105
- provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI' | 'AWS_Anthropic';
105
+ provider: 'OpenAI' | 'Anthropic' | 'Mistral' | 'Azure_OpenAI' | 'AWS_Anthropic' | 'Vertex_Anthropic';
106
106
  endPoint?: string;
107
107
  apiKey?: string;
108
108
  model: string;
@@ -119,6 +119,7 @@ export declare type CompletionConfig = {
119
119
  region?: string;
120
120
  modelId?: string;
121
121
  accessKeyId?: string;
122
+ projectId?: string;
122
123
  secretAccessKey?: string;
123
124
  location?: string;
124
125
  clientSecret?: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.3.0",
2
+ "version": "6.5.0",
3
3
  "name": "@memori.ai/memori-api-client",
4
4
  "description": "React library to integrate a Memori in your app or website",
5
5
  "license": "Apache-2.0",
@@ -1,4 +1,4 @@
1
- import { ResponseSpec, Notification } from '../types';
1
+ import type { ResponseSpec, Notification } from '../types';
2
2
  import { apiFetcher } from '../apiFetcher';
3
3
 
4
4
  export default (apiUrl: string) => ({
@@ -21,4 +21,72 @@ export default (apiUrl: string) => ({
21
21
  apiFetcher(`/UserNotifications/${authToken}`, {
22
22
  apiUrl,
23
23
  }) as Promise<ResponseSpec & { notifications: Notification[] }>,
24
+
25
+ /**
26
+ * Create a new notification
27
+ * @param {string} token - Authentication token
28
+ * @param {Notification} notificationData - Notification specification
29
+ * @returns {Promise<ResponseSpec>} The created notification response
30
+ */
31
+ createNotification: (token: string, notificationData: Notification) =>
32
+ apiFetcher(`/Notifications/${token}`, {
33
+ apiUrl,
34
+ method: 'POST',
35
+ body: notificationData,
36
+ }) as Promise<ResponseSpec>,
37
+
38
+ /**
39
+ * Get a specific notification by ID
40
+ * @param {string} token - Authentication token
41
+ * @param {string} notificationId - Notification ID
42
+ * @returns {Promise<ResponseSpec>} The notification response
43
+ */
44
+ getNotification: (token: string, notificationId: string) =>
45
+ apiFetcher(`/Notifications/${token}/${notificationId}`, {
46
+ apiUrl,
47
+ }) as Promise<ResponseSpec>,
48
+
49
+ /**
50
+ * Delete a notification
51
+ * @param {string} token - Authentication token
52
+ * @param {string} notificationId - Notification ID
53
+ * @returns {Promise<ResponseSpec>} The deletion response
54
+ */
55
+ deleteNotification: (token: string, notificationId: string) =>
56
+ apiFetcher(`/Notifications/${token}/${notificationId}`, {
57
+ apiUrl,
58
+ method: 'DELETE',
59
+ }) as Promise<ResponseSpec>,
60
+
61
+ /**
62
+ * List all notifications with optional filtering
63
+ * @param {string} token - Authentication token
64
+ * @param {'ACTIVE_AND_FUTURE' | 'ONLY_FUTURE' | 'ALL'} filter - Notification filter
65
+ * @returns {Promise<ResponseSpec>} The list of notifications
66
+ */
67
+ listAllNotifications: (
68
+ token: string,
69
+ filter: 'ACTIVE_AND_FUTURE' | 'ONLY_FUTURE' | 'ALL' = 'ACTIVE_AND_FUTURE'
70
+ ) =>
71
+ apiFetcher(`/ListAllNotifications/${token}/${filter}`, {
72
+ apiUrl,
73
+ }) as Promise<ResponseSpec>,
74
+
75
+ /**
76
+ * Update an existing notification
77
+ * @param {string} token - Authentication token
78
+ * @param {string} notificationId - Notification ID
79
+ * @param {Partial<Notification>} notificationData - Updated notification specification
80
+ * @returns {Promise<ResponseSpec>} The updated notification response
81
+ */
82
+ updateNotification: (
83
+ token: string,
84
+ notificationId: string,
85
+ notificationData: Partial<Notification>
86
+ ) =>
87
+ apiFetcher(`/Notifications/${token}/${notificationId}`, {
88
+ apiUrl,
89
+ method: 'PATCH',
90
+ body: notificationData,
91
+ }) as Promise<ResponseSpec>,
24
92
  });
package/src/types.ts CHANGED
@@ -145,13 +145,16 @@ export declare type CompletionConfig = {
145
145
  * - Anthropic
146
146
  * - Mistral
147
147
  * - Azure_OpenAI
148
+ * - AWS_Anthropic
149
+ * - Vertex_Anthropic
148
150
  */
149
151
  provider:
150
152
  | 'OpenAI'
151
153
  | 'Anthropic'
152
154
  | 'Mistral'
153
155
  | 'Azure_OpenAI'
154
- | 'AWS_Anthropic';
156
+ | 'AWS_Anthropic'
157
+ | 'Vertex_Anthropic';
155
158
  /**
156
159
  * @type {string=}
157
160
  * URL of the Completion Provider API end-point. If not specified, the default end-point for the provider is used.
@@ -238,6 +241,11 @@ export declare type CompletionConfig = {
238
241
  * Access Key ID of the AWS Anthropic model.
239
242
  */
240
243
  accessKeyId?: string;
244
+ /**
245
+ * @type {string=}
246
+ * Project ID of the Vertex Anthropic model.
247
+ */
248
+ projectId?: string;
241
249
  /**
242
250
  * @type {string=}
243
251
  * Secret Access Key of the AWS Anthropic model.