@breign/client 1.0.5 → 1.0.7
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/apis/AgentApi.d.ts +5 -4
- package/dist/apis/AgentApi.js +6 -3
- package/dist/apis/EngineApi.d.ts +6 -5
- package/dist/apis/EngineApi.js +13 -7
- package/dist/apis/FilesApi.d.ts +21 -21
- package/dist/apis/FilesApi.js +42 -42
- package/dist/apis/GeneralApi.d.ts +2 -2
- package/dist/apis/GeneralApi.js +3 -3
- package/dist/apis/GuardiansApi.d.ts +54 -54
- package/dist/apis/GuardiansApi.js +91 -91
- package/dist/apis/KnowledgeApi.d.ts +72 -72
- package/dist/apis/KnowledgeApi.js +152 -152
- package/dist/apis/ManifestsApi.d.ts +28 -28
- package/dist/apis/ManifestsApi.js +45 -45
- package/dist/apis/MetricsApi.d.ts +14 -14
- package/dist/apis/MetricsApi.js +18 -18
- package/dist/apis/OrganizationsApi.d.ts +3 -3
- package/dist/apis/OrganizationsApi.js +4 -4
- package/dist/apis/PromptsApi.d.ts +31 -31
- package/dist/apis/PromptsApi.js +60 -60
- package/dist/apis/RemotesApi.d.ts +3 -3
- package/dist/apis/RemotesApi.js +4 -4
- package/dist/apis/ToolsApi.d.ts +6 -6
- package/dist/apis/ToolsApi.js +8 -8
- package/dist/models/AgentPatchEngineUio.d.ts +38 -0
- package/dist/models/AgentPatchEngineUio.js +54 -0
- package/dist/models/AgentPatchUio.d.ts +4 -4
- package/dist/models/AgentPatchUio.js +3 -3
- package/dist/models/AgentRequestUio.d.ts +10 -1
- package/dist/models/AgentRequestUio.js +5 -3
- package/dist/models/AgentUio.d.ts +10 -3
- package/dist/models/AgentUio.js +4 -3
- package/dist/models/AppCreateRequestUio.d.ts +6 -0
- package/dist/models/AppCreateRequestUio.js +2 -0
- package/dist/models/AppSequencesInnerUio.d.ts +38 -0
- package/dist/models/AppSequencesInnerUio.js +50 -0
- package/dist/models/AppUio.d.ts +24 -3
- package/dist/models/AppUio.js +11 -10
- package/dist/models/ChatMessageAudioInnerUio.d.ts +38 -0
- package/dist/models/ChatMessageAudioInnerUio.js +54 -0
- package/dist/models/ChatMessageUio.d.ts +10 -2
- package/dist/models/ChatMessageUio.js +6 -2
- package/dist/models/ChatMessageWithFlowNodeUio.d.ts +129 -0
- package/dist/models/ChatMessageWithFlowNodeUio.js +95 -0
- package/dist/models/ChatUio.d.ts +9 -3
- package/dist/models/ChatUio.js +5 -3
- package/dist/models/ConversationFlowNodeEntrypointsUio.d.ts +32 -0
- package/dist/models/ConversationFlowNodeEntrypointsUio.js +48 -0
- package/dist/models/ConversationFlowNodeUio.d.ts +51 -0
- package/dist/models/ConversationFlowNodeUio.js +55 -0
- package/dist/models/ConversationUio.d.ts +7 -0
- package/dist/models/ConversationUio.js +5 -0
- package/dist/models/DefaultEngineRequestUio.d.ts +1 -7
- package/dist/models/DefaultEngineRequestUio.js +3 -7
- package/dist/models/EngineUio.d.ts +4 -7
- package/dist/models/EngineUio.js +6 -7
- package/dist/models/FileCreationRequestUio.d.ts +1 -1
- package/dist/models/FileCreationRequestUio.js +1 -3
- package/dist/models/FileCreationResponseUio.d.ts +6 -0
- package/dist/models/FileCreationResponseUio.js +2 -0
- package/dist/models/FileUio.d.ts +6 -0
- package/dist/models/FileUio.js +2 -0
- package/dist/models/FileWithDownloadUrlUio.d.ts +6 -0
- package/dist/models/FileWithDownloadUrlUio.js +2 -0
- package/dist/models/GuardianCreateRequestUio.d.ts +7 -0
- package/dist/models/GuardianCreateRequestUio.js +5 -0
- package/dist/models/GuardianEngineUio.d.ts +0 -7
- package/dist/models/GuardianEngineUio.js +0 -5
- package/dist/models/GuardianPutRequestUio.d.ts +7 -0
- package/dist/models/GuardianPutRequestUio.js +3 -0
- package/dist/models/GuardianTypeUio.d.ts +26 -0
- package/dist/models/GuardianTypeUio.js +52 -0
- package/dist/models/GuardianUio.d.ts +7 -0
- package/dist/models/GuardianUio.js +5 -0
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.d.ts +56 -0
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.js +56 -0
- package/dist/models/KnowledgeBaseFilesInnerUio.d.ts +44 -0
- package/dist/models/KnowledgeBaseFilesInnerUio.js +58 -0
- package/dist/models/KnowledgeBaseUio.d.ts +124 -0
- package/dist/models/KnowledgeBaseUio.js +88 -0
- package/dist/models/OrganizationUio.d.ts +0 -9
- package/dist/models/OrganizationUio.js +0 -6
- package/dist/models/ProviderCreateRequestUio.d.ts +4 -9
- package/dist/models/ProviderCreateRequestUio.js +4 -9
- package/dist/models/ProviderTypeUio.d.ts +27 -0
- package/dist/models/ProviderTypeUio.js +53 -0
- package/dist/models/ProviderUio.d.ts +4 -9
- package/dist/models/ProviderUio.js +4 -9
- package/dist/models/index.d.ts +11 -6
- package/dist/models/index.js +11 -6
- package/dist/openapi.json +369 -120
- package/package.json +1 -1
- package/dist/models/AgentKnowledgeBaseUio.d.ts +0 -57
- package/dist/models/AgentKnowledgeBaseUio.js +0 -67
- package/dist/models/AgentsAgentIdKnowledgeFileImportsPost200ResponseUio.d.ts +0 -56
- package/dist/models/AgentsAgentIdKnowledgeFileImportsPost200ResponseUio.js +0 -56
- package/dist/models/DuplicateAgent201ResponseUio.d.ts +0 -32
- package/dist/models/DuplicateAgent201ResponseUio.js +0 -50
- package/dist/models/EngineTypeUio.d.ts +0 -25
- package/dist/models/EngineTypeUio.js +0 -51
- package/dist/models/GuardianEngineTypeUio.d.ts +0 -26
- package/dist/models/GuardianEngineTypeUio.js +0 -52
- package/dist/models/GuardianExcludedAgentsRequestUio.d.ts +0 -32
- package/dist/models/GuardianExcludedAgentsRequestUio.js +0 -50
|
@@ -54,42 +54,49 @@ const index_1 = require("../models/index");
|
|
|
54
54
|
*/
|
|
55
55
|
class GuardiansApi extends runtime.BaseAPI {
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Creates a new guardian for content moderation
|
|
58
|
+
* Create a new guardian for an agent
|
|
58
59
|
*/
|
|
59
|
-
async
|
|
60
|
+
async createGuardianForAgentRaw(requestParameters, initOverrides) {
|
|
60
61
|
if (requestParameters['agentId'] == null) {
|
|
61
|
-
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling
|
|
62
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling createGuardianForAgent().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['guardianCreateRequestUio'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('guardianCreateRequestUio', 'Required parameter "guardianCreateRequestUio" was null or undefined when calling createGuardianForAgent().');
|
|
62
66
|
}
|
|
63
67
|
const queryParameters = {};
|
|
64
68
|
const headerParameters = {};
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
65
70
|
if (this.configuration && this.configuration.apiKey) {
|
|
66
71
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
67
72
|
}
|
|
68
73
|
const response = await this.request({
|
|
69
74
|
path: `/agents/{agentId}/guardians`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
70
|
-
method: '
|
|
75
|
+
method: 'POST',
|
|
71
76
|
headers: headerParameters,
|
|
72
77
|
query: queryParameters,
|
|
78
|
+
body: (0, index_1.GuardianCreateRequestUioToJSON)(requestParameters['guardianCreateRequestUio']),
|
|
73
79
|
}, initOverrides);
|
|
74
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
80
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuardianUioFromJSON)(jsonValue));
|
|
75
81
|
}
|
|
76
82
|
/**
|
|
77
|
-
*
|
|
83
|
+
* Creates a new guardian for content moderation
|
|
84
|
+
* Create a new guardian for an agent
|
|
78
85
|
*/
|
|
79
|
-
async
|
|
80
|
-
const response = await this.
|
|
86
|
+
async createGuardianForAgent(agentId, guardianCreateRequestUio, initOverrides) {
|
|
87
|
+
const response = await this.createGuardianForAgentRaw({ agentId: agentId, guardianCreateRequestUio: guardianCreateRequestUio }, initOverrides);
|
|
81
88
|
return await response.value();
|
|
82
89
|
}
|
|
83
90
|
/**
|
|
84
|
-
* Creates a new guardian for content moderation
|
|
85
|
-
* Create a new guardian for an
|
|
91
|
+
* Creates a new organisation-level guardian for content moderation
|
|
92
|
+
* Create a new guardian for an organisation
|
|
86
93
|
*/
|
|
87
|
-
async
|
|
88
|
-
if (requestParameters['
|
|
89
|
-
throw new runtime.RequiredError('
|
|
94
|
+
async createGuardianForOrganizationRaw(requestParameters, initOverrides) {
|
|
95
|
+
if (requestParameters['organizationId'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createGuardianForOrganization().');
|
|
90
97
|
}
|
|
91
98
|
if (requestParameters['guardianCreateRequestUio'] == null) {
|
|
92
|
-
throw new runtime.RequiredError('guardianCreateRequestUio', 'Required parameter "guardianCreateRequestUio" was null or undefined when calling
|
|
99
|
+
throw new runtime.RequiredError('guardianCreateRequestUio', 'Required parameter "guardianCreateRequestUio" was null or undefined when calling createGuardianForOrganization().');
|
|
93
100
|
}
|
|
94
101
|
const queryParameters = {};
|
|
95
102
|
const headerParameters = {};
|
|
@@ -98,7 +105,7 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
98
105
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
99
106
|
}
|
|
100
107
|
const response = await this.request({
|
|
101
|
-
path: `/
|
|
108
|
+
path: `/organizations/{organizationId}/guardians`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
102
109
|
method: 'POST',
|
|
103
110
|
headers: headerParameters,
|
|
104
111
|
query: queryParameters,
|
|
@@ -107,20 +114,20 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
107
114
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuardianUioFromJSON)(jsonValue));
|
|
108
115
|
}
|
|
109
116
|
/**
|
|
110
|
-
* Creates a new guardian for content moderation
|
|
111
|
-
* Create a new guardian for an
|
|
117
|
+
* Creates a new organisation-level guardian for content moderation
|
|
118
|
+
* Create a new guardian for an organisation
|
|
112
119
|
*/
|
|
113
|
-
async
|
|
114
|
-
const response = await this.
|
|
120
|
+
async createGuardianForOrganization(organizationId, guardianCreateRequestUio, initOverrides) {
|
|
121
|
+
const response = await this.createGuardianForOrganizationRaw({ organizationId: organizationId, guardianCreateRequestUio: guardianCreateRequestUio }, initOverrides);
|
|
115
122
|
return await response.value();
|
|
116
123
|
}
|
|
117
124
|
/**
|
|
118
125
|
* Deletes a guardian by ID
|
|
119
126
|
* Delete a guardian
|
|
120
127
|
*/
|
|
121
|
-
async
|
|
128
|
+
async deleteGuardianRaw(requestParameters, initOverrides) {
|
|
122
129
|
if (requestParameters['guardianId'] == null) {
|
|
123
|
-
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling
|
|
130
|
+
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling deleteGuardian().');
|
|
124
131
|
}
|
|
125
132
|
const queryParameters = {};
|
|
126
133
|
const headerParameters = {};
|
|
@@ -139,49 +146,42 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
139
146
|
* Deletes a guardian by ID
|
|
140
147
|
* Delete a guardian
|
|
141
148
|
*/
|
|
142
|
-
async
|
|
143
|
-
await this.
|
|
149
|
+
async deleteGuardian(guardianId, initOverrides) {
|
|
150
|
+
await this.deleteGuardianRaw({ guardianId: guardianId }, initOverrides);
|
|
144
151
|
}
|
|
145
152
|
/**
|
|
146
|
-
*
|
|
147
|
-
* Update excluded agents for a guardian
|
|
153
|
+
* Get a specific guardian by ID
|
|
148
154
|
*/
|
|
149
|
-
async
|
|
155
|
+
async getGuardianRaw(requestParameters, initOverrides) {
|
|
150
156
|
if (requestParameters['guardianId'] == null) {
|
|
151
|
-
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling
|
|
152
|
-
}
|
|
153
|
-
if (requestParameters['guardianExcludedAgentsRequestUio'] == null) {
|
|
154
|
-
throw new runtime.RequiredError('guardianExcludedAgentsRequestUio', 'Required parameter "guardianExcludedAgentsRequestUio" was null or undefined when calling guardiansGuardianIdExcludedAgentsPut().');
|
|
157
|
+
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling getGuardian().');
|
|
155
158
|
}
|
|
156
159
|
const queryParameters = {};
|
|
157
160
|
const headerParameters = {};
|
|
158
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
159
161
|
if (this.configuration && this.configuration.apiKey) {
|
|
160
162
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
161
163
|
}
|
|
162
164
|
const response = await this.request({
|
|
163
|
-
path: `/guardians/{guardianId}
|
|
164
|
-
method: '
|
|
165
|
+
path: `/guardians/{guardianId}`.replace(`{${"guardianId"}}`, encodeURIComponent(String(requestParameters['guardianId']))),
|
|
166
|
+
method: 'GET',
|
|
165
167
|
headers: headerParameters,
|
|
166
168
|
query: queryParameters,
|
|
167
|
-
body: (0, index_1.GuardianExcludedAgentsRequestUioToJSON)(requestParameters['guardianExcludedAgentsRequestUio']),
|
|
168
169
|
}, initOverrides);
|
|
169
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuardianUioFromJSON)(jsonValue));
|
|
170
171
|
}
|
|
171
172
|
/**
|
|
172
|
-
*
|
|
173
|
-
* Update excluded agents for a guardian
|
|
173
|
+
* Get a specific guardian by ID
|
|
174
174
|
*/
|
|
175
|
-
async
|
|
176
|
-
const response = await this.
|
|
175
|
+
async getGuardian(guardianId, initOverrides) {
|
|
176
|
+
const response = await this.getGuardianRaw({ guardianId: guardianId }, initOverrides);
|
|
177
177
|
return await response.value();
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Get a specific
|
|
180
|
+
* Get all guardians for a specific agent
|
|
181
181
|
*/
|
|
182
|
-
async
|
|
183
|
-
if (requestParameters['
|
|
184
|
-
throw new runtime.RequiredError('
|
|
182
|
+
async getGuardiansForAgentRaw(requestParameters, initOverrides) {
|
|
183
|
+
if (requestParameters['agentId'] == null) {
|
|
184
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getGuardiansForAgent().');
|
|
185
185
|
}
|
|
186
186
|
const queryParameters = {};
|
|
187
187
|
const headerParameters = {};
|
|
@@ -189,93 +189,93 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
189
189
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
190
190
|
}
|
|
191
191
|
const response = await this.request({
|
|
192
|
-
path: `/
|
|
192
|
+
path: `/agents/{agentId}/guardians`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
193
193
|
method: 'GET',
|
|
194
194
|
headers: headerParameters,
|
|
195
195
|
query: queryParameters,
|
|
196
196
|
}, initOverrides);
|
|
197
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (
|
|
197
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GuardianUioFromJSON));
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* Get a specific
|
|
200
|
+
* Get all guardians for a specific agent
|
|
201
201
|
*/
|
|
202
|
-
async
|
|
203
|
-
const response = await this.
|
|
202
|
+
async getGuardiansForAgent(agentId, initOverrides) {
|
|
203
|
+
const response = await this.getGuardiansForAgentRaw({ agentId: agentId }, initOverrides);
|
|
204
204
|
return await response.value();
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
207
|
+
* Retrieves all guardians associated with the specified organization
|
|
208
|
+
* Get all guardians for an organization
|
|
209
209
|
*/
|
|
210
|
-
async
|
|
211
|
-
if (requestParameters['
|
|
212
|
-
throw new runtime.RequiredError('
|
|
213
|
-
}
|
|
214
|
-
if (requestParameters['guardianPutRequestUio'] == null) {
|
|
215
|
-
throw new runtime.RequiredError('guardianPutRequestUio', 'Required parameter "guardianPutRequestUio" was null or undefined when calling guardiansGuardianIdPut().');
|
|
210
|
+
async getGuardiansForOrganizationRaw(requestParameters, initOverrides) {
|
|
211
|
+
if (requestParameters['organizationId'] == null) {
|
|
212
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getGuardiansForOrganization().');
|
|
216
213
|
}
|
|
217
214
|
const queryParameters = {};
|
|
218
215
|
const headerParameters = {};
|
|
219
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
220
216
|
if (this.configuration && this.configuration.apiKey) {
|
|
221
217
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
222
218
|
}
|
|
223
219
|
const response = await this.request({
|
|
224
|
-
path: `/
|
|
225
|
-
method: '
|
|
220
|
+
path: `/organizations/{organizationId}/guardians`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
221
|
+
method: 'GET',
|
|
226
222
|
headers: headerParameters,
|
|
227
223
|
query: queryParameters,
|
|
228
|
-
body: (0, index_1.GuardianPutRequestUioToJSON)(requestParameters['guardianPutRequestUio']),
|
|
229
224
|
}, initOverrides);
|
|
230
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (
|
|
225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GuardianUioFromJSON));
|
|
231
226
|
}
|
|
232
227
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
228
|
+
* Retrieves all guardians associated with the specified organization
|
|
229
|
+
* Get all guardians for an organization
|
|
235
230
|
*/
|
|
236
|
-
async
|
|
237
|
-
const response = await this.
|
|
231
|
+
async getGuardiansForOrganization(organizationId, initOverrides) {
|
|
232
|
+
const response = await this.getGuardiansForOrganizationRaw({ organizationId: organizationId }, initOverrides);
|
|
238
233
|
return await response.value();
|
|
239
234
|
}
|
|
240
235
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
236
|
+
* Updates the excluded agents for a guardian
|
|
237
|
+
* Update excluded agents for a guardian
|
|
243
238
|
*/
|
|
244
|
-
async
|
|
245
|
-
if (requestParameters['
|
|
246
|
-
throw new runtime.RequiredError('
|
|
239
|
+
async updateExcludedAgentsRaw(requestParameters, initOverrides) {
|
|
240
|
+
if (requestParameters['guardianId'] == null) {
|
|
241
|
+
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling updateExcludedAgents().');
|
|
242
|
+
}
|
|
243
|
+
if (requestParameters['requestBody'] == null) {
|
|
244
|
+
throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling updateExcludedAgents().');
|
|
247
245
|
}
|
|
248
246
|
const queryParameters = {};
|
|
249
247
|
const headerParameters = {};
|
|
248
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
250
249
|
if (this.configuration && this.configuration.apiKey) {
|
|
251
250
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
252
251
|
}
|
|
253
252
|
const response = await this.request({
|
|
254
|
-
path: `/
|
|
255
|
-
method: '
|
|
253
|
+
path: `/guardians/{guardianId}/excluded-agents`.replace(`{${"guardianId"}}`, encodeURIComponent(String(requestParameters['guardianId']))),
|
|
254
|
+
method: 'PUT',
|
|
256
255
|
headers: headerParameters,
|
|
257
256
|
query: queryParameters,
|
|
257
|
+
body: requestParameters['requestBody'],
|
|
258
258
|
}, initOverrides);
|
|
259
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
259
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BodyWithMessageUioFromJSON)(jsonValue));
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
|
-
*
|
|
263
|
-
*
|
|
262
|
+
* Updates the excluded agents for a guardian
|
|
263
|
+
* Update excluded agents for a guardian
|
|
264
264
|
*/
|
|
265
|
-
async
|
|
266
|
-
const response = await this.
|
|
265
|
+
async updateExcludedAgents(guardianId, requestBody, initOverrides) {
|
|
266
|
+
const response = await this.updateExcludedAgentsRaw({ guardianId: guardianId, requestBody: requestBody }, initOverrides);
|
|
267
267
|
return await response.value();
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
|
-
*
|
|
271
|
-
*
|
|
270
|
+
* Updates an existing guardian\'s configuration
|
|
271
|
+
* Update a guardian
|
|
272
272
|
*/
|
|
273
|
-
async
|
|
274
|
-
if (requestParameters['
|
|
275
|
-
throw new runtime.RequiredError('
|
|
273
|
+
async updateGuardianRaw(requestParameters, initOverrides) {
|
|
274
|
+
if (requestParameters['guardianId'] == null) {
|
|
275
|
+
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling updateGuardian().');
|
|
276
276
|
}
|
|
277
|
-
if (requestParameters['
|
|
278
|
-
throw new runtime.RequiredError('
|
|
277
|
+
if (requestParameters['guardianPutRequestUio'] == null) {
|
|
278
|
+
throw new runtime.RequiredError('guardianPutRequestUio', 'Required parameter "guardianPutRequestUio" was null or undefined when calling updateGuardian().');
|
|
279
279
|
}
|
|
280
280
|
const queryParameters = {};
|
|
281
281
|
const headerParameters = {};
|
|
@@ -284,20 +284,20 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
284
284
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
285
285
|
}
|
|
286
286
|
const response = await this.request({
|
|
287
|
-
path: `/
|
|
288
|
-
method: '
|
|
287
|
+
path: `/guardians/{guardianId}`.replace(`{${"guardianId"}}`, encodeURIComponent(String(requestParameters['guardianId']))),
|
|
288
|
+
method: 'PUT',
|
|
289
289
|
headers: headerParameters,
|
|
290
290
|
query: queryParameters,
|
|
291
|
-
body: (0, index_1.
|
|
291
|
+
body: (0, index_1.GuardianPutRequestUioToJSON)(requestParameters['guardianPutRequestUio']),
|
|
292
292
|
}, initOverrides);
|
|
293
293
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuardianUioFromJSON)(jsonValue));
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
|
-
*
|
|
297
|
-
*
|
|
296
|
+
* Updates an existing guardian\'s configuration
|
|
297
|
+
* Update a guardian
|
|
298
298
|
*/
|
|
299
|
-
async
|
|
300
|
-
const response = await this.
|
|
299
|
+
async updateGuardian(guardianId, guardianPutRequestUio, initOverrides) {
|
|
300
|
+
const response = await this.updateGuardianRaw({ guardianId: guardianId, guardianPutRequestUio: guardianPutRequestUio }, initOverrides);
|
|
301
301
|
return await response.value();
|
|
302
302
|
}
|
|
303
303
|
}
|
|
@@ -10,54 +10,64 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AgentModuleUio,
|
|
14
|
-
export interface
|
|
15
|
-
organizationId: string;
|
|
16
|
-
fileCreationRequestUio: FileCreationRequestUio;
|
|
17
|
-
}
|
|
18
|
-
export interface AgentsAgentIdKnowledgeDocumentsPostRequest {
|
|
13
|
+
import type { AgentModuleUio, BodyWithMessageUio, DocumentAddRequestUio, FileCreationRequestUio, FileCreationResponseUio, FileStatusUpdateRequestUio, FileWithDownloadUrlUio, ImportFileToAgentKnowledge200ResponseUio } from '../models/index';
|
|
14
|
+
export interface AddDocumentToKnowledgeBaseRequest {
|
|
19
15
|
agentId: string;
|
|
20
16
|
documentAddRequestUio: DocumentAddRequestUio;
|
|
21
17
|
noSplit?: boolean;
|
|
22
18
|
}
|
|
23
|
-
export interface
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
export interface AddFileToKnowledgeBaseRequest {
|
|
20
|
+
organizationId: string;
|
|
21
|
+
fileCreationRequestUio: FileCreationRequestUio;
|
|
26
22
|
}
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
export interface CreateModuleForOrganizationRequest {
|
|
24
|
+
organizationId: string;
|
|
25
|
+
agentModuleUio: AgentModuleUio;
|
|
30
26
|
}
|
|
31
|
-
export interface
|
|
27
|
+
export interface DeleteFileFromAgentKnowledgeRequest {
|
|
32
28
|
agentId: string;
|
|
33
29
|
fileId: string;
|
|
34
30
|
}
|
|
35
|
-
export interface
|
|
31
|
+
export interface GetFileFromAgentKnowledgeRequest {
|
|
36
32
|
agentId: string;
|
|
37
33
|
fileId: string;
|
|
38
|
-
fileStatusUpdateRequestUio: FileStatusUpdateRequestUio;
|
|
39
34
|
}
|
|
40
|
-
export interface
|
|
35
|
+
export interface ImportFileToAgentKnowledgeRequest {
|
|
41
36
|
agentId: string;
|
|
42
|
-
|
|
37
|
+
file: Blob;
|
|
43
38
|
}
|
|
44
|
-
export interface
|
|
39
|
+
export interface ImportProjectsToAgentKnowledgeRequest {
|
|
45
40
|
agentId: string;
|
|
46
41
|
}
|
|
47
|
-
export interface
|
|
42
|
+
export interface PrepareFileUploadRequest {
|
|
48
43
|
agentId: string;
|
|
44
|
+
fileCreationRequestUio: FileCreationRequestUio;
|
|
49
45
|
}
|
|
50
|
-
export interface
|
|
51
|
-
|
|
52
|
-
agentModuleUio: AgentModuleUio;
|
|
46
|
+
export interface ResetAgentKnowledgeRequest {
|
|
47
|
+
agentId: string;
|
|
53
48
|
}
|
|
54
49
|
export interface ResetKnowledgeBaseRequest {
|
|
55
50
|
organizationId: string;
|
|
56
51
|
}
|
|
52
|
+
export interface UpdateFileStatusRequest {
|
|
53
|
+
agentId: string;
|
|
54
|
+
fileId: string;
|
|
55
|
+
fileStatusUpdateRequestUio: FileStatusUpdateRequestUio;
|
|
56
|
+
}
|
|
57
57
|
/**
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
60
|
export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
61
|
+
/**
|
|
62
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
63
|
+
* Add a document to agent\'s knowledge base
|
|
64
|
+
*/
|
|
65
|
+
addDocumentToKnowledgeBaseRaw(requestParameters: AddDocumentToKnowledgeBaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
66
|
+
/**
|
|
67
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
68
|
+
* Add a document to agent\'s knowledge base
|
|
69
|
+
*/
|
|
70
|
+
addDocumentToKnowledgeBase(agentId: string, documentAddRequestUio: DocumentAddRequestUio, noSplit?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
61
71
|
/**
|
|
62
72
|
* Add a file to the knowledge base
|
|
63
73
|
* Add a file to the knowledge base
|
|
@@ -69,95 +79,75 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
|
69
79
|
*/
|
|
70
80
|
addFileToKnowledgeBase(organizationId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
|
|
71
81
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
agentsAgentIdKnowledgeDocumentsPostRaw(requestParameters: AgentsAgentIdKnowledgeDocumentsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
76
|
-
/**
|
|
77
|
-
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
78
|
-
* Add a document to agent\'s knowledge base
|
|
79
|
-
*/
|
|
80
|
-
agentsAgentIdKnowledgeDocumentsPost(agentId: string, documentAddRequestUio: DocumentAddRequestUio, noSplit?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
83
|
-
* Upload and import a file into the brain\'s knowledge base
|
|
82
|
+
* Create a new module for an organization
|
|
83
|
+
* Create a new module for an organization
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
createModuleForOrganizationRaw(requestParameters: CreateModuleForOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentModuleUio>>;
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
87
|
+
* Create a new module for an organization
|
|
88
|
+
* Create a new module for an organization
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
createModuleForOrganization(organizationId: string, agentModuleUio: AgentModuleUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentModuleUio>;
|
|
91
91
|
/**
|
|
92
92
|
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
93
93
|
* Delete a knowledge file from an agent
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
deleteFileFromAgentKnowledgeRaw(requestParameters: DeleteFileFromAgentKnowledgeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
96
96
|
/**
|
|
97
97
|
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
98
98
|
* Delete a knowledge file from an agent
|
|
99
99
|
*/
|
|
100
|
-
|
|
100
|
+
deleteFileFromAgentKnowledge(agentId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
101
101
|
/**
|
|
102
102
|
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
103
103
|
* Get a specific knowledge file from an agent
|
|
104
104
|
*/
|
|
105
|
-
|
|
105
|
+
getFileFromAgentKnowledgeRaw(requestParameters: GetFileFromAgentKnowledgeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileWithDownloadUrlUio>>;
|
|
106
106
|
/**
|
|
107
107
|
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
108
108
|
* Get a specific knowledge file from an agent
|
|
109
109
|
*/
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
113
|
-
* Update file status and trigger indexing
|
|
114
|
-
*/
|
|
115
|
-
agentsAgentIdKnowledgeFilesFileIdStatusPostRaw(requestParameters: AgentsAgentIdKnowledgeFilesFileIdStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
116
|
-
/**
|
|
117
|
-
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
118
|
-
* Update file status and trigger indexing
|
|
119
|
-
*/
|
|
120
|
-
agentsAgentIdKnowledgeFilesFileIdStatusPost(agentId: string, fileId: string, fileStatusUpdateRequestUio: FileStatusUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
110
|
+
getFileFromAgentKnowledge(agentId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileWithDownloadUrlUio>;
|
|
121
111
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
112
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
113
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
124
114
|
*/
|
|
125
|
-
|
|
115
|
+
importFileToAgentKnowledgeRaw(requestParameters: ImportFileToAgentKnowledgeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportFileToAgentKnowledge200ResponseUio>>;
|
|
126
116
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
117
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
118
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
129
119
|
*/
|
|
130
|
-
|
|
120
|
+
importFileToAgentKnowledge(agentId: string, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportFileToAgentKnowledge200ResponseUio>;
|
|
131
121
|
/**
|
|
132
122
|
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
133
123
|
* Import projects into agent knowledge
|
|
134
124
|
*/
|
|
135
|
-
|
|
125
|
+
importProjectsToAgentKnowledgeRaw(requestParameters: ImportProjectsToAgentKnowledgeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
136
126
|
/**
|
|
137
127
|
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
138
128
|
* Import projects into agent knowledge
|
|
139
129
|
*/
|
|
140
|
-
|
|
130
|
+
importProjectsToAgentKnowledge(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
141
131
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
132
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
133
|
+
* Prepare file upload for knowledge base
|
|
144
134
|
*/
|
|
145
|
-
|
|
135
|
+
prepareFileUploadRaw(requestParameters: PrepareFileUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileCreationResponseUio>>;
|
|
146
136
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
137
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
138
|
+
* Prepare file upload for knowledge base
|
|
149
139
|
*/
|
|
150
|
-
|
|
140
|
+
prepareFileUpload(agentId: string, fileCreationRequestUio: FileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
|
|
151
141
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
142
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
143
|
+
* Reset all knowledge for an agent
|
|
154
144
|
*/
|
|
155
|
-
|
|
145
|
+
resetAgentKnowledgeRaw(requestParameters: ResetAgentKnowledgeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
156
146
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
147
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
148
|
+
* Reset all knowledge for an agent
|
|
159
149
|
*/
|
|
160
|
-
|
|
150
|
+
resetAgentKnowledge(agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
161
151
|
/**
|
|
162
152
|
* Reset knowledge base
|
|
163
153
|
* Reset knowledge base
|
|
@@ -168,4 +158,14 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
|
|
|
168
158
|
* Reset knowledge base
|
|
169
159
|
*/
|
|
170
160
|
resetKnowledgeBase(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
|
|
161
|
+
/**
|
|
162
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
163
|
+
* Update file status and trigger indexing
|
|
164
|
+
*/
|
|
165
|
+
updateFileStatusRaw(requestParameters: UpdateFileStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
166
|
+
/**
|
|
167
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
168
|
+
* Update file status and trigger indexing
|
|
169
|
+
*/
|
|
170
|
+
updateFileStatus(agentId: string, fileId: string, fileStatusUpdateRequestUio: FileStatusUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
171
171
|
}
|