@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.
- package/dist/index.d.ts +1504 -636
- package/dist/index.esm.js +179 -134
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +199 -149
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/memory/api-slice.d.ts +1492 -687
- package/dist/src/features/memory/constants.d.ts +48 -27
- package/dist/src/features/memory/index.d.ts +3 -3
- package/dist/src/features/memory/types.d.ts +134 -97
- package/dist/tests/features/memory/constants.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
|
4
|
-
|
|
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: (
|
|
13
|
+
path: (org: string, userId: string) => string;
|
|
7
14
|
};
|
|
8
|
-
|
|
15
|
+
UPDATE_USER_SETTINGS: {
|
|
9
16
|
service: SERVICES;
|
|
10
|
-
path: (
|
|
17
|
+
path: (org: string, userId: string) => string;
|
|
11
18
|
};
|
|
12
|
-
|
|
19
|
+
GET_GLOBAL_MEMORIES: {
|
|
13
20
|
service: SERVICES;
|
|
14
|
-
path: (
|
|
21
|
+
path: (org: string, userId: string) => string;
|
|
15
22
|
};
|
|
16
|
-
|
|
23
|
+
CREATE_GLOBAL_MEMORY: {
|
|
17
24
|
service: SERVICES;
|
|
18
|
-
path: (
|
|
25
|
+
path: (org: string, userId: string) => string;
|
|
19
26
|
};
|
|
20
|
-
|
|
27
|
+
DELETE_GLOBAL_MEMORY: {
|
|
21
28
|
service: SERVICES;
|
|
22
|
-
path: (
|
|
29
|
+
path: (org: string, userId: string, memoryId: number) => string;
|
|
23
30
|
};
|
|
24
|
-
|
|
31
|
+
GET_MENTOR_MEMORIES: {
|
|
25
32
|
service: SERVICES;
|
|
26
|
-
path: (
|
|
33
|
+
path: (org: string, userId: string, mentorId: string) => string;
|
|
27
34
|
};
|
|
28
|
-
|
|
35
|
+
CREATE_MENTOR_MEMORY: {
|
|
29
36
|
service: SERVICES;
|
|
30
|
-
path: (
|
|
37
|
+
path: (org: string, userId: string, mentorId: string) => string;
|
|
31
38
|
};
|
|
32
|
-
|
|
39
|
+
UPDATE_MENTOR_MEMORY: {
|
|
33
40
|
service: SERVICES;
|
|
34
|
-
path: (
|
|
41
|
+
path: (org: string, userId: string, mentorId: string, memoryId: number) => string;
|
|
35
42
|
};
|
|
36
|
-
|
|
43
|
+
DELETE_MENTOR_MEMORY: {
|
|
37
44
|
service: SERVICES;
|
|
38
|
-
path: (
|
|
45
|
+
path: (org: string, userId: string, mentorId: string, memoryId: number) => string;
|
|
39
46
|
};
|
|
40
|
-
|
|
47
|
+
GET_MEMSEARCH_CATEGORIES: {
|
|
41
48
|
service: SERVICES;
|
|
42
|
-
path: (
|
|
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
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './api-slice';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './constants';
|
|
@@ -1,123 +1,160 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
25
|
+
created_at: string;
|
|
26
|
+
updated_at: string;
|
|
26
27
|
}
|
|
27
|
-
export type
|
|
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
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
reference_saved_memories: boolean;
|
|
42
|
+
export type CreateGlobalMemoryArgs = {
|
|
43
|
+
org: string;
|
|
44
|
+
userId: string;
|
|
45
|
+
content: string;
|
|
38
46
|
};
|
|
39
|
-
export type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
export type DeleteGlobalMemoryArgs = {
|
|
48
|
+
org: string;
|
|
49
|
+
userId: string;
|
|
50
|
+
memoryId: number;
|
|
43
51
|
};
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
68
|
-
|
|
69
|
-
|
|
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
|
|
73
|
-
|
|
74
|
-
|
|
100
|
+
export type UpdateMentorMemoryArgs = {
|
|
101
|
+
org: string;
|
|
102
|
+
userId: string;
|
|
75
103
|
mentorId: string;
|
|
76
|
-
|
|
104
|
+
memoryId: number;
|
|
105
|
+
data: {
|
|
106
|
+
category_slug?: string;
|
|
107
|
+
content?: string;
|
|
108
|
+
};
|
|
77
109
|
};
|
|
78
|
-
export type
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
110
|
+
export type DeleteMentorMemoryArgs = {
|
|
111
|
+
org: string;
|
|
112
|
+
userId: string;
|
|
113
|
+
mentorId: string;
|
|
114
|
+
memoryId: number;
|
|
82
115
|
};
|
|
83
|
-
export type
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
category: string;
|
|
116
|
+
export type GetMemoryCategoriesAdminArgs = {
|
|
117
|
+
org: string;
|
|
118
|
+
mentorId: string;
|
|
87
119
|
};
|
|
88
|
-
export type
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
entryId: string;
|
|
120
|
+
export type CreateMemoryCategoryArgs = {
|
|
121
|
+
org: string;
|
|
122
|
+
mentorId: string;
|
|
92
123
|
data: {
|
|
93
|
-
|
|
94
|
-
|
|
124
|
+
name: string;
|
|
125
|
+
slug: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
extraction_prompt?: string;
|
|
128
|
+
is_active?: boolean;
|
|
95
129
|
};
|
|
96
130
|
};
|
|
97
|
-
export type
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
export type DeleteMemoryCategoryArgs = {
|
|
143
|
+
org: string;
|
|
144
|
+
mentorId: string;
|
|
145
|
+
categoryId: number;
|
|
115
146
|
};
|
|
116
|
-
export
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 {};
|