@iblai/data-layer 1.2.3 → 1.2.4

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.
@@ -1,50 +1,71 @@
1
1
  import { SERVICES } from '@data-layer/constants';
2
2
  export declare const MEMORY_REDUCER_PATH = "memoryApiSlice";
3
- export declare const MEMORY_ENDPOINTS: {
4
- GET_MEMORIES: {
3
+ export declare const MEMORY_QUERY_KEYS: {
4
+ MEMSEARCH_USER_SETTINGS: () => string[];
5
+ MEMSEARCH_GLOBAL_MEMORIES: () => string[];
6
+ MEMSEARCH_MENTOR_MEMORIES: () => string[];
7
+ MEMSEARCH_MEMORY_CATEGORIES: () => string[];
8
+ MEMSEARCH_PLATFORM_CONFIG: () => string[];
9
+ };
10
+ export declare const MEMSEARCH_ENDPOINTS: {
11
+ GET_USER_SETTINGS: {
5
12
  service: SERVICES;
6
- path: (tenantKey: string, username: string) => string;
13
+ path: (org: string, userId: string) => string;
7
14
  };
8
- GET_MEMORY_CATEGORIES: {
15
+ UPDATE_USER_SETTINGS: {
9
16
  service: SERVICES;
10
- path: (tenantKey: string, username: string) => string;
17
+ path: (org: string, userId: string) => string;
11
18
  };
12
- GET_MENTOR_USER_SETTINGS: {
19
+ GET_GLOBAL_MEMORIES: {
13
20
  service: SERVICES;
14
- path: (tenantKey: string, username: string, mentorId: string) => string;
21
+ path: (org: string, userId: string) => string;
15
22
  };
16
- UPDATE_MENTOR_USER_SETTINGS: {
23
+ CREATE_GLOBAL_MEMORY: {
17
24
  service: SERVICES;
18
- path: (tenantKey: string, username: string, mentorId: string) => string;
25
+ path: (org: string, userId: string) => string;
19
26
  };
20
- DELETE_MEMORY: {
27
+ DELETE_GLOBAL_MEMORY: {
21
28
  service: SERVICES;
22
- path: (tenantKey: string, username: string, memoryId: string) => string;
29
+ path: (org: string, userId: string, memoryId: number) => string;
23
30
  };
24
- DELETE_MEMORY_BY_CATEGORY: {
31
+ GET_MENTOR_MEMORIES: {
25
32
  service: SERVICES;
26
- path: (tenantKey: string, username: string, category: string) => string;
33
+ path: (org: string, userId: string, mentorId: string) => string;
27
34
  };
28
- UPDATE_MEMORY_ENTRY: {
35
+ CREATE_MENTOR_MEMORY: {
29
36
  service: SERVICES;
30
- path: (tenantKey: string, username: string, entryId: string) => string;
37
+ path: (org: string, userId: string, mentorId: string) => string;
31
38
  };
32
- CREATE_MEMORY: {
39
+ UPDATE_MENTOR_MEMORY: {
33
40
  service: SERVICES;
34
- path: (tenantKey: string, username: string) => string;
41
+ path: (org: string, userId: string, mentorId: string, memoryId: number) => string;
35
42
  };
36
- GET_MEMORY_FILTERS: {
43
+ DELETE_MENTOR_MEMORY: {
37
44
  service: SERVICES;
38
- path: (tenantKey: string, username: string) => string;
45
+ path: (org: string, userId: string, mentorId: string, memoryId: number) => string;
39
46
  };
40
- GET_FILTERED_MEMORIES: {
47
+ GET_MEMSEARCH_CATEGORIES: {
41
48
  service: SERVICES;
42
- path: (tenantKey: string, username: string) => string;
49
+ path: (org: string, mentorId: string) => string;
50
+ };
51
+ CREATE_MEMSEARCH_CATEGORY: {
52
+ service: SERVICES;
53
+ path: (org: string, mentorId: string) => string;
54
+ };
55
+ UPDATE_MEMSEARCH_CATEGORY: {
56
+ service: SERVICES;
57
+ path: (org: string, mentorId: string, categoryId: number) => string;
58
+ };
59
+ DELETE_MEMSEARCH_CATEGORY: {
60
+ service: SERVICES;
61
+ path: (org: string, mentorId: string, categoryId: number) => string;
62
+ };
63
+ GET_MEMSEARCH_CONFIG: {
64
+ service: SERVICES;
65
+ path: (org: string, userId: string) => string;
66
+ };
67
+ UPDATE_MEMSEARCH_CONFIG: {
68
+ service: SERVICES;
69
+ path: (org: string, userId: string) => string;
43
70
  };
44
- };
45
- export declare const MEMORY_QUERY_KEYS: {
46
- GET_MEMORIES: () => string[];
47
- GET_MEMORY_CATEGORIES: () => string[];
48
- GET_MENTOR_USER_SETTINGS: () => string[];
49
- GET_FILTERED_MEMORIES: () => string[];
50
71
  };
@@ -1,3 +1,3 @@
1
- export * from "./api-slice";
2
- export * from "./types";
3
- export * from "./constants";
1
+ export * from './api-slice';
2
+ export * from './types';
3
+ export * from './constants';
@@ -1,123 +1,160 @@
1
- export interface MemoryEntry {
2
- unique_id: string;
3
- key: string;
4
- value: string;
5
- inserted_at: string;
1
+ export interface UserMemorySettings {
2
+ auto_capture_enabled: boolean;
3
+ use_memory_in_responses: boolean;
6
4
  updated_at: string;
7
- expires_at: string | null;
8
- category: string;
9
5
  }
10
- export interface Memory {
11
- mode: string;
12
- name: string;
13
- email: string;
14
- unique_id: string;
6
+ export type GetUserMemorySettingsArgs = {
7
+ org: string;
8
+ userId: string;
9
+ };
10
+ export type UpdateUserMemorySettingsArgs = {
11
+ org: string;
12
+ userId: string;
13
+ settings: {
14
+ auto_capture_enabled?: boolean;
15
+ use_memory_in_responses?: boolean;
16
+ };
17
+ };
18
+ export interface GlobalMemory {
19
+ id: number;
15
20
  username: string;
16
21
  platform: string;
17
- mentor: string | null;
18
- session_id: string | null;
19
- catalog_item_type: string | null;
20
- catalog_item_id: string | null;
21
- entries: MemoryEntry[];
22
- inserted_at: string;
23
- updated_at: string;
22
+ content: string;
23
+ source_session_id: string | null;
24
24
  is_auto_generated: boolean;
25
- category: string;
25
+ created_at: string;
26
+ updated_at: string;
26
27
  }
27
- export type MemoriesFetchResponse = {
28
- results: Memory[];
28
+ export type GlobalMemoriesResponse = {
29
29
  count: number;
30
30
  next: string | null;
31
31
  previous: string | null;
32
+ results: GlobalMemory[];
33
+ };
34
+ export type GetGlobalMemoriesArgs = {
35
+ org: string;
36
+ userId: string;
37
+ params?: {
38
+ page?: number;
39
+ page_size?: number;
40
+ };
32
41
  };
33
- export type MemoryCategoriesResponse = {
34
- categories: string[];
35
- };
36
- export type MentorUserSettings = {
37
- reference_saved_memories: boolean;
42
+ export type CreateGlobalMemoryArgs = {
43
+ org: string;
44
+ userId: string;
45
+ content: string;
38
46
  };
39
- export type GetMemoriesParams = {
40
- category?: string;
41
- limit?: number;
42
- offset?: number;
47
+ export type DeleteGlobalMemoryArgs = {
48
+ org: string;
49
+ userId: string;
50
+ memoryId: number;
43
51
  };
44
- export type GetMemoriesArgs = {
45
- tenantKey: string;
46
- username: string;
47
- params?: GetMemoriesParams;
48
- };
49
- export type GetFilteredMemoriesParams = {
50
- category?: string;
51
- username?: string;
52
- start_date?: string;
53
- end_date?: string;
54
- page?: number;
55
- page_size?: number;
56
- mentor?: string;
57
- };
58
- export type GetFilteredMemoriesArgs = {
59
- tenantKey: string;
60
- username: string;
61
- params?: GetFilteredMemoriesParams;
62
- };
63
- export type GetMemoryCategoriesArgs = {
64
- tenantKey: string;
52
+ export interface MentorMemoryCategory {
53
+ id: number;
54
+ name: string;
55
+ slug: string;
56
+ description?: string;
57
+ extraction_prompt?: string;
58
+ is_active?: boolean;
59
+ created_at?: string;
60
+ }
61
+ export interface MentorMemory {
62
+ id: number;
65
63
  username: string;
64
+ mentor_id: string;
65
+ category: {
66
+ id: number;
67
+ name: string;
68
+ slug: string;
69
+ };
70
+ content: string;
71
+ source_session_id: string | null;
72
+ is_auto_generated: boolean;
73
+ created_at: string;
74
+ updated_at: string;
75
+ }
76
+ export interface MentorMemoriesByCategoryItem {
77
+ category: MentorMemoryCategory;
78
+ memories: MentorMemory[];
79
+ }
80
+ export type MentorMemoriesByCategoryResponse = MentorMemoriesByCategoryItem[];
81
+ export type GetMentorMemoriesArgs = {
82
+ org: string;
83
+ userId: string;
84
+ mentorId: string;
85
+ params?: {
86
+ start_date?: string;
87
+ end_date?: string;
88
+ user_id?: string;
89
+ };
66
90
  };
67
- export type GetMentorUserSettingsArgs = {
68
- tenantKey: string;
69
- username: string;
91
+ export type CreateMentorMemoryArgs = {
92
+ org: string;
93
+ userId: string;
70
94
  mentorId: string;
95
+ data: {
96
+ category_slug: string;
97
+ content: string;
98
+ };
71
99
  };
72
- export type UpdateMentorUserSettingsArgs = {
73
- tenantKey: string;
74
- username: string;
100
+ export type UpdateMentorMemoryArgs = {
101
+ org: string;
102
+ userId: string;
75
103
  mentorId: string;
76
- settings: Partial<MentorUserSettings>;
104
+ memoryId: number;
105
+ data: {
106
+ category_slug?: string;
107
+ content?: string;
108
+ };
77
109
  };
78
- export type DeleteMemoryArgs = {
79
- tenantKey: string;
80
- username: string;
81
- memoryId: string;
110
+ export type DeleteMentorMemoryArgs = {
111
+ org: string;
112
+ userId: string;
113
+ mentorId: string;
114
+ memoryId: number;
82
115
  };
83
- export type DeleteMemoryByCategoryArgs = {
84
- tenantKey: string;
85
- username: string;
86
- category: string;
116
+ export type GetMemoryCategoriesAdminArgs = {
117
+ org: string;
118
+ mentorId: string;
87
119
  };
88
- export type UpdateMemoryEntryArgs = {
89
- tenantKey: string;
90
- username: string;
91
- entryId: string;
120
+ export type CreateMemoryCategoryArgs = {
121
+ org: string;
122
+ mentorId: string;
92
123
  data: {
93
- key?: string;
94
- value?: string;
124
+ name: string;
125
+ slug: string;
126
+ description?: string;
127
+ extraction_prompt?: string;
128
+ is_active?: boolean;
95
129
  };
96
130
  };
97
- export type CreateMemoryRequest = {
98
- name: string;
99
- platform: string;
100
- mentor_unique_id?: string;
101
- entries: Array<{
102
- key: string;
103
- value: string;
104
- }>;
105
- category: string;
106
- };
107
- export type CreateMemoryArgs = {
108
- tenantKey: string;
109
- username: string;
110
- data: CreateMemoryRequest;
131
+ export type UpdateMemoryCategoryArgs = {
132
+ org: string;
133
+ mentorId: string;
134
+ categoryId: number;
135
+ data: {
136
+ name?: string;
137
+ description?: string;
138
+ extraction_prompt?: string;
139
+ is_active?: boolean;
140
+ };
111
141
  };
112
- export type GetMemoryFiltersArgs = {
113
- tenantKey: string;
114
- username: string;
142
+ export type DeleteMemoryCategoryArgs = {
143
+ org: string;
144
+ mentorId: string;
145
+ categoryId: number;
115
146
  };
116
- export type MemoryFiltersResponse = {
117
- categories: string[];
118
- users: {
119
- username: string;
120
- email: string;
121
- lti_email: string;
122
- }[];
147
+ export interface MemsearchConfig {
148
+ enable_memsearch: boolean;
149
+ }
150
+ export type GetMemsearchConfigArgs = {
151
+ org: string;
152
+ userId: string;
153
+ };
154
+ export type UpdateMemsearchConfigArgs = {
155
+ org: string;
156
+ userId: string;
157
+ config: {
158
+ enable_memsearch: boolean;
159
+ };
123
160
  };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/data-layer",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "ibl.ai data layer",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",