@budibase/frontend-core 3.35.10 → 3.36.1
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 +23 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.36.1",
|
|
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": "7a83e0e9dc810a0a6e41b006b8a6f26c749c75c0"
|
|
27
27
|
}
|
package/src/api/agents.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentFileUploadResponse,
|
|
3
|
+
ConnectAgentSharePointSiteRequest,
|
|
4
|
+
ConnectAgentSharePointSiteResponse,
|
|
3
5
|
CreateAgentRequest,
|
|
4
6
|
CreateAgentResponse,
|
|
5
|
-
|
|
7
|
+
DisconnectAgentSharePointSiteResponse,
|
|
6
8
|
DuplicateAgentResponse,
|
|
7
|
-
|
|
9
|
+
FetchAgentKnowledgeResponse,
|
|
8
10
|
FetchAgentKnowledgeSourceOptionsResponse,
|
|
9
11
|
FetchAgentsResponse,
|
|
10
12
|
ProvisionAgentSlackChannelRequest,
|
|
11
13
|
ProvisionAgentSlackChannelResponse,
|
|
12
14
|
ProvisionAgentMSTeamsChannelRequest,
|
|
13
15
|
ProvisionAgentMSTeamsChannelResponse,
|
|
14
|
-
SetAgentKnowledgeSourcesRequest,
|
|
15
|
-
SetAgentKnowledgeSourcesResponse,
|
|
16
16
|
SyncAgentDiscordCommandsRequest,
|
|
17
17
|
SyncAgentDiscordCommandsResponse,
|
|
18
18
|
SyncAgentKnowledgeSourcesRequest,
|
|
@@ -57,7 +57,7 @@ export interface AgentEndpoints {
|
|
|
57
57
|
agentId: string,
|
|
58
58
|
enabled: boolean
|
|
59
59
|
) => Promise<ToggleAgentDeploymentResponse>
|
|
60
|
-
|
|
60
|
+
fetchAgentKnowledge: (agentId: string) => Promise<FetchAgentKnowledgeResponse>
|
|
61
61
|
uploadAgentFile: (
|
|
62
62
|
agentId: string,
|
|
63
63
|
file: File
|
|
@@ -69,13 +69,14 @@ export interface AgentEndpoints {
|
|
|
69
69
|
fetchAgentKnowledgeSourceOptions: (
|
|
70
70
|
agentId: string
|
|
71
71
|
) => Promise<FetchAgentKnowledgeSourceOptionsResponse>
|
|
72
|
-
|
|
72
|
+
connectAgentSharePointSite: (
|
|
73
73
|
agentId: string,
|
|
74
|
-
body:
|
|
75
|
-
) => Promise<
|
|
76
|
-
|
|
77
|
-
agentId: string
|
|
78
|
-
|
|
74
|
+
body: ConnectAgentSharePointSiteRequest
|
|
75
|
+
) => Promise<ConnectAgentSharePointSiteResponse>
|
|
76
|
+
disconnectAgentSharePointSite: (
|
|
77
|
+
agentId: string,
|
|
78
|
+
siteId: string
|
|
79
|
+
) => Promise<DisconnectAgentSharePointSiteResponse>
|
|
79
80
|
syncAgentKnowledgeSources: (
|
|
80
81
|
agentId: string,
|
|
81
82
|
body?: SyncAgentKnowledgeSourcesRequest
|
|
@@ -183,9 +184,9 @@ export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
|
|
|
183
184
|
})
|
|
184
185
|
},
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
return await API.get({
|
|
188
|
-
url: `/api/agent/${agentId}/
|
|
187
|
+
fetchAgentKnowledge: async (agentId: string) => {
|
|
188
|
+
return await API.get<FetchAgentKnowledgeResponse>({
|
|
189
|
+
url: `/api/agent/${agentId}/knowledge`,
|
|
189
190
|
})
|
|
190
191
|
},
|
|
191
192
|
|
|
@@ -211,19 +212,19 @@ export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
|
|
|
211
212
|
})
|
|
212
213
|
},
|
|
213
214
|
|
|
214
|
-
|
|
215
|
-
return await API.
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
connectAgentSharePointSite: async (agentId: string, body) => {
|
|
216
|
+
return await API.post<
|
|
217
|
+
ConnectAgentSharePointSiteRequest,
|
|
218
|
+
ConnectAgentSharePointSiteResponse
|
|
218
219
|
>({
|
|
219
|
-
url: `/api/agent/${agentId}/knowledge-sources`,
|
|
220
|
+
url: `/api/agent/${agentId}/knowledge-sources/sharepoint/sites`,
|
|
220
221
|
body,
|
|
221
222
|
})
|
|
222
223
|
},
|
|
223
224
|
|
|
224
|
-
|
|
225
|
-
return await API.delete<void,
|
|
226
|
-
url: `/api/agent/${agentId}/knowledge-sources`,
|
|
225
|
+
disconnectAgentSharePointSite: async (agentId: string, siteId: string) => {
|
|
226
|
+
return await API.delete<void, DisconnectAgentSharePointSiteResponse>({
|
|
227
|
+
url: `/api/agent/${agentId}/knowledge-sources/sharepoint/sites/${encodeURIComponent(siteId)}`,
|
|
227
228
|
})
|
|
228
229
|
},
|
|
229
230
|
|