@budibase/frontend-core 3.36.3 → 3.36.5
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/package.json +2 -2
- package/src/api/agents.ts +35 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "3.36.
|
|
3
|
+
"version": "3.36.5",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"vitest": "^3.2.4"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "767fa11d498558b2893bd1c22de62afe9b564c8e"
|
|
27
27
|
}
|
package/src/api/agents.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DisconnectAgentSharePointSiteResponse,
|
|
8
8
|
DuplicateAgentResponse,
|
|
9
9
|
FetchAgentKnowledgeResponse,
|
|
10
|
+
FetchAgentKnowledgeSourceEntriesResponse,
|
|
10
11
|
FetchAgentKnowledgeSourceOptionsResponse,
|
|
11
12
|
FetchAgentsResponse,
|
|
12
13
|
ProvisionAgentSlackChannelRequest,
|
|
@@ -20,6 +21,8 @@ import {
|
|
|
20
21
|
ToggleAgentDeploymentRequest,
|
|
21
22
|
ToggleAgentDeploymentResponse,
|
|
22
23
|
ToolMetadata,
|
|
24
|
+
UpdateAgentSharePointSiteRequest,
|
|
25
|
+
UpdateAgentSharePointSiteResponse,
|
|
23
26
|
UpdateAgentRequest,
|
|
24
27
|
UpdateAgentResponse,
|
|
25
28
|
} from "@budibase/types"
|
|
@@ -69,17 +72,26 @@ export interface AgentEndpoints {
|
|
|
69
72
|
fetchAgentKnowledgeSourceOptions: (
|
|
70
73
|
agentId: string
|
|
71
74
|
) => Promise<FetchAgentKnowledgeSourceOptionsResponse>
|
|
75
|
+
fetchAgentKnowledgeSourceAllEntries: (
|
|
76
|
+
agentId: string,
|
|
77
|
+
siteId: string
|
|
78
|
+
) => Promise<FetchAgentKnowledgeSourceEntriesResponse>
|
|
72
79
|
connectAgentSharePointSite: (
|
|
73
80
|
agentId: string,
|
|
74
81
|
body: ConnectAgentSharePointSiteRequest
|
|
75
82
|
) => Promise<ConnectAgentSharePointSiteResponse>
|
|
83
|
+
updateAgentSharePointSite: (
|
|
84
|
+
agentId: string,
|
|
85
|
+
siteId: string,
|
|
86
|
+
body: UpdateAgentSharePointSiteRequest
|
|
87
|
+
) => Promise<UpdateAgentSharePointSiteResponse>
|
|
76
88
|
disconnectAgentSharePointSite: (
|
|
77
89
|
agentId: string,
|
|
78
90
|
siteId: string
|
|
79
91
|
) => Promise<DisconnectAgentSharePointSiteResponse>
|
|
80
92
|
syncAgentKnowledgeSources: (
|
|
81
93
|
agentId: string,
|
|
82
|
-
|
|
94
|
+
sourceId: string
|
|
83
95
|
) => Promise<SyncAgentKnowledgeSourcesResponse>
|
|
84
96
|
}
|
|
85
97
|
|
|
@@ -212,6 +224,16 @@ export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
|
|
|
212
224
|
})
|
|
213
225
|
},
|
|
214
226
|
|
|
227
|
+
fetchAgentKnowledgeSourceAllEntries: async (
|
|
228
|
+
agentId: string,
|
|
229
|
+
siteId: string
|
|
230
|
+
) => {
|
|
231
|
+
const query = new URLSearchParams({ siteId })
|
|
232
|
+
return await API.get<FetchAgentKnowledgeSourceEntriesResponse>({
|
|
233
|
+
url: `/api/agent/${agentId}/knowledge-sources/sharepoint/entries/all?${query.toString()}`,
|
|
234
|
+
})
|
|
235
|
+
},
|
|
236
|
+
|
|
215
237
|
connectAgentSharePointSite: async (agentId: string, body) => {
|
|
216
238
|
return await API.post<
|
|
217
239
|
ConnectAgentSharePointSiteRequest,
|
|
@@ -222,22 +244,28 @@ export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
|
|
|
222
244
|
})
|
|
223
245
|
},
|
|
224
246
|
|
|
247
|
+
updateAgentSharePointSite: async (agentId: string, siteId: string, body) => {
|
|
248
|
+
return await API.patch<
|
|
249
|
+
UpdateAgentSharePointSiteRequest,
|
|
250
|
+
UpdateAgentSharePointSiteResponse
|
|
251
|
+
>({
|
|
252
|
+
url: `/api/agent/${agentId}/knowledge-sources/sharepoint/sites/${encodeURIComponent(siteId)}`,
|
|
253
|
+
body,
|
|
254
|
+
})
|
|
255
|
+
},
|
|
256
|
+
|
|
225
257
|
disconnectAgentSharePointSite: async (agentId: string, siteId: string) => {
|
|
226
258
|
return await API.delete<void, DisconnectAgentSharePointSiteResponse>({
|
|
227
259
|
url: `/api/agent/${agentId}/knowledge-sources/sharepoint/sites/${encodeURIComponent(siteId)}`,
|
|
228
260
|
})
|
|
229
261
|
},
|
|
230
262
|
|
|
231
|
-
syncAgentKnowledgeSources: async (
|
|
232
|
-
agentId: string,
|
|
233
|
-
body?: SyncAgentKnowledgeSourcesRequest
|
|
234
|
-
) => {
|
|
263
|
+
syncAgentKnowledgeSources: async (agentId: string, sourceId: string) => {
|
|
235
264
|
return await API.post<
|
|
236
265
|
SyncAgentKnowledgeSourcesRequest | undefined,
|
|
237
266
|
SyncAgentKnowledgeSourcesResponse
|
|
238
267
|
>({
|
|
239
|
-
url: `/api/agent/${agentId}/knowledge-sources/sync`,
|
|
240
|
-
body,
|
|
268
|
+
url: `/api/agent/${agentId}/knowledge-sources/${encodeURIComponent(sourceId)}/sync`,
|
|
241
269
|
})
|
|
242
270
|
},
|
|
243
271
|
})
|