@breign/client 1.0.124 → 1.0.126
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 +17 -12
- package/dist/apis/AgentApi.js +29 -14
- package/dist/apis/KnowledgeApi.d.ts +122 -168
- package/dist/apis/KnowledgeApi.js +232 -365
- package/dist/apis/MetricsApi.d.ts +15 -13
- package/dist/apis/MetricsApi.js +27 -21
- package/dist/apis/OrganizationsApi.d.ts +1 -26
- package/dist/apis/OrganizationsApi.js +0 -64
- package/dist/apis/SkillsApi.d.ts +14 -1
- package/dist/apis/SkillsApi.js +29 -0
- package/dist/models/AddModuleRequestUio.d.ts +60 -0
- package/dist/models/AddModuleRequestUio.js +68 -0
- package/dist/models/AgentPatchUio.d.ts +0 -30
- package/dist/models/AgentPatchUio.js +0 -10
- package/dist/models/AgentRefUio.d.ts +38 -0
- package/dist/models/AgentRefUio.js +54 -0
- package/dist/models/AgentRequestUio.d.ts +0 -59
- package/dist/models/AgentRequestUio.js +0 -22
- package/dist/models/AgentUio.d.ts +6 -44
- package/dist/models/AgentUio.js +2 -14
- package/dist/models/ChunkCreateRequestContentInnerUio.d.ts +1 -1
- package/dist/models/ChunkCreateRequestContentInnerUio.js +1 -3
- package/dist/models/ChunkCreateRequestUio.d.ts +3 -3
- package/dist/models/ChunkCreateRequestUio.js +10 -4
- package/dist/models/CreateKnowledgeBaseRequestEmbeddingConfigUio.d.ts +44 -0
- package/dist/models/CreateKnowledgeBaseRequestEmbeddingConfigUio.js +58 -0
- package/dist/models/CreateKnowledgeBaseRequestUio.d.ts +59 -0
- package/dist/models/CreateKnowledgeBaseRequestUio.js +65 -0
- package/dist/models/CreateKnowledgeBaseResponseUio.d.ts +46 -0
- package/dist/models/CreateKnowledgeBaseResponseUio.js +62 -0
- package/dist/models/DeleteKnowledgeSitePage200ResponseUio.d.ts +38 -0
- package/dist/models/DeleteKnowledgeSitePage200ResponseUio.js +52 -0
- package/dist/models/FileCreationResponseUio.d.ts +1 -0
- package/dist/models/FileCreationResponseUio.js +2 -1
- package/dist/models/FileUio.d.ts +5 -3
- package/dist/models/FileUio.js +4 -4
- package/dist/models/FileWithDownloadUrlUio.d.ts +5 -3
- package/dist/models/FileWithDownloadUrlUio.js +4 -4
- package/dist/models/ImageKnowledgeUio.d.ts +13 -6
- package/dist/models/ImageKnowledgeUio.js +23 -6
- package/dist/models/KnowledgeBaseConfigurationUio.d.ts +14 -0
- package/dist/models/KnowledgeBaseConfigurationUio.js +10 -1
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationOneOfUio.d.ts +45 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationOneOfUio.js +57 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationUio.d.ts +22 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationUio.js +50 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestUio.d.ts +157 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestUio.js +102 -0
- package/dist/models/KnowledgeBaseUio.d.ts +6 -62
- package/dist/models/KnowledgeBaseUio.js +2 -22
- package/dist/models/KnowledgeFileCreationRequestUio.d.ts +68 -0
- package/dist/models/KnowledgeFileCreationRequestUio.js +64 -0
- package/dist/models/KnowledgeFileParsingCallbackRequestUio.d.ts +51 -0
- package/dist/models/KnowledgeFileParsingCallbackRequestUio.js +58 -0
- package/dist/models/KnowledgeFileSummaryUio.d.ts +2 -3
- package/dist/models/KnowledgeFileSummaryUio.js +2 -3
- package/dist/models/KnowledgeFileUio.d.ts +140 -0
- package/dist/models/KnowledgeFileUio.js +92 -0
- package/dist/models/UploadedStatusUpdateRequestUio.d.ts +39 -0
- package/dist/models/UploadedStatusUpdateRequestUio.js +57 -0
- package/dist/models/index.d.ts +13 -12
- package/dist/models/index.js +13 -12
- package/dist/openapi.json +920 -969
- package/package.json +1 -1
- package/dist/models/AgentRequestProfilePictureUio.d.ts +0 -50
- package/dist/models/AgentRequestProfilePictureUio.js +0 -62
- package/dist/models/DocumentAddRequestUio.d.ts +0 -38
- package/dist/models/DocumentAddRequestUio.js +0 -52
- package/dist/models/FileFormDataUio.d.ts +0 -38
- package/dist/models/FileFormDataUio.js +0 -50
- package/dist/models/FileStatusUpdateRequestUio.d.ts +0 -33
- package/dist/models/FileStatusUpdateRequestUio.js +0 -51
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.d.ts +0 -56
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.js +0 -56
- package/dist/models/KnowledgeBaseFilesInnerUio.d.ts +0 -44
- package/dist/models/KnowledgeBaseFilesInnerUio.js +0 -58
- package/dist/models/KnowledgeBasePrivacyUio.d.ts +0 -25
- package/dist/models/KnowledgeBasePrivacyUio.js +0 -51
- package/dist/models/KnowledgeFilePagePreviewUio.d.ts +0 -44
- package/dist/models/KnowledgeFilePagePreviewUio.js +0 -56
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.d.ts +0 -21
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.js +0 -37
- package/dist/models/UserAgentAccessAgentUio.d.ts +0 -38
- package/dist/models/UserAgentAccessAgentUio.js +0 -54
- package/dist/models/UserAgentAccessRequestUio.d.ts +0 -38
- package/dist/models/UserAgentAccessRequestUio.js +0 -54
- package/dist/models/UserAgentAccessUio.d.ts +0 -45
- package/dist/models/UserAgentAccessUio.js +0 -59
|
@@ -11,17 +11,19 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { EphemeralInstancesMetricsResponseUio, MetricForAgentUio, MetricForDayInnerUio, MetricUio, MetricsBrainsAgentResponseUio, MetricsTopAgentsResponseInnerUio, MetricsTopAgentsUsageResponseInnerUio, MetricsUsersResponseUio, OrgUsageMetricsResponseUio } from '../models/index';
|
|
14
|
-
export interface
|
|
14
|
+
export interface GetBrainsMetricsRequest {
|
|
15
15
|
startDate?: string;
|
|
16
16
|
endDate?: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface GetMetricsRequest {
|
|
19
19
|
startDate?: string;
|
|
20
20
|
endDate?: string;
|
|
21
21
|
}
|
|
22
22
|
export interface GetMetricsBrainsAgentRequest {
|
|
23
23
|
organizationId: string;
|
|
24
24
|
agentId: string;
|
|
25
|
+
startDate?: string;
|
|
26
|
+
endDate?: string;
|
|
25
27
|
}
|
|
26
28
|
export interface GetMetricsDayMetricsRequest {
|
|
27
29
|
organizationId: string;
|
|
@@ -59,6 +61,16 @@ export interface GetMetricsUsersVisitorsRequest {
|
|
|
59
61
|
*
|
|
60
62
|
*/
|
|
61
63
|
export declare class MetricsApi extends runtime.BaseAPI {
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves usage metrics broken down by agent within an optional date range (admin only)
|
|
66
|
+
* Get brains metrics
|
|
67
|
+
*/
|
|
68
|
+
getBrainsMetricsRaw(requestParameters: GetBrainsMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MetricForAgentUio>>>;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves usage metrics broken down by agent within an optional date range (admin only)
|
|
71
|
+
* Get brains metrics
|
|
72
|
+
*/
|
|
73
|
+
getBrainsMetrics(startDate?: string, endDate?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MetricForAgentUio>>;
|
|
62
74
|
/**
|
|
63
75
|
* Retrieves usage metrics for all agents within a date range (admin only)
|
|
64
76
|
* Get usage metrics
|
|
@@ -69,16 +81,6 @@ export declare class MetricsApi extends runtime.BaseAPI {
|
|
|
69
81
|
* Get usage metrics
|
|
70
82
|
*/
|
|
71
83
|
getMetrics(startDate?: string, endDate?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MetricUio>>;
|
|
72
|
-
/**
|
|
73
|
-
* Retrieves usage metrics broken down by agent within a date range (admin only)
|
|
74
|
-
* Get agent-specific metrics
|
|
75
|
-
*/
|
|
76
|
-
getMetricsAgentsRaw(requestParameters: GetMetricsAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MetricForAgentUio>>>;
|
|
77
|
-
/**
|
|
78
|
-
* Retrieves usage metrics broken down by agent within a date range (admin only)
|
|
79
|
-
* Get agent-specific metrics
|
|
80
|
-
*/
|
|
81
|
-
getMetricsAgents(startDate?: string, endDate?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MetricForAgentUio>>;
|
|
82
84
|
/**
|
|
83
85
|
* Retrieves metrics for a brain agent
|
|
84
86
|
* Get metrics for a brain agent
|
|
@@ -88,7 +90,7 @@ export declare class MetricsApi extends runtime.BaseAPI {
|
|
|
88
90
|
* Retrieves metrics for a brain agent
|
|
89
91
|
* Get metrics for a brain agent
|
|
90
92
|
*/
|
|
91
|
-
getMetricsBrainsAgent(organizationId: string, agentId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MetricsBrainsAgentResponseUio>;
|
|
93
|
+
getMetricsBrainsAgent(organizationId: string, agentId: string, startDate?: string, endDate?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MetricsBrainsAgentResponseUio>;
|
|
92
94
|
/**
|
|
93
95
|
* Retrieves usage metrics broken down by day within a date range (admin only)
|
|
94
96
|
* Get day-specific metrics
|
package/dist/apis/MetricsApi.js
CHANGED
|
@@ -54,10 +54,10 @@ const index_1 = require("../models/index");
|
|
|
54
54
|
*/
|
|
55
55
|
class MetricsApi extends runtime.BaseAPI {
|
|
56
56
|
/**
|
|
57
|
-
* Retrieves usage metrics
|
|
58
|
-
* Get
|
|
57
|
+
* Retrieves usage metrics broken down by agent within an optional date range (admin only)
|
|
58
|
+
* Get brains metrics
|
|
59
59
|
*/
|
|
60
|
-
async
|
|
60
|
+
async getBrainsMetricsRaw(requestParameters, initOverrides) {
|
|
61
61
|
const queryParameters = {};
|
|
62
62
|
if (requestParameters['startDate'] != null) {
|
|
63
63
|
queryParameters['startDate'] = requestParameters['startDate'];
|
|
@@ -70,26 +70,26 @@ class MetricsApi extends runtime.BaseAPI {
|
|
|
70
70
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
71
71
|
}
|
|
72
72
|
const response = await this.request({
|
|
73
|
-
path: `/metrics`,
|
|
73
|
+
path: `/metrics/brains`,
|
|
74
74
|
method: 'GET',
|
|
75
75
|
headers: headerParameters,
|
|
76
76
|
query: queryParameters,
|
|
77
77
|
}, initOverrides);
|
|
78
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.
|
|
78
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MetricForAgentUioFromJSON));
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Retrieves usage metrics
|
|
82
|
-
* Get
|
|
81
|
+
* Retrieves usage metrics broken down by agent within an optional date range (admin only)
|
|
82
|
+
* Get brains metrics
|
|
83
83
|
*/
|
|
84
|
-
async
|
|
85
|
-
const response = await this.
|
|
84
|
+
async getBrainsMetrics(startDate, endDate, initOverrides) {
|
|
85
|
+
const response = await this.getBrainsMetricsRaw({ startDate: startDate, endDate: endDate }, initOverrides);
|
|
86
86
|
return await response.value();
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
* Retrieves usage metrics
|
|
90
|
-
* Get
|
|
89
|
+
* Retrieves usage metrics for all agents within a date range (admin only)
|
|
90
|
+
* Get usage metrics
|
|
91
91
|
*/
|
|
92
|
-
async
|
|
92
|
+
async getMetricsRaw(requestParameters, initOverrides) {
|
|
93
93
|
const queryParameters = {};
|
|
94
94
|
if (requestParameters['startDate'] != null) {
|
|
95
95
|
queryParameters['startDate'] = requestParameters['startDate'];
|
|
@@ -102,19 +102,19 @@ class MetricsApi extends runtime.BaseAPI {
|
|
|
102
102
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
103
103
|
}
|
|
104
104
|
const response = await this.request({
|
|
105
|
-
path: `/metrics
|
|
105
|
+
path: `/metrics`,
|
|
106
106
|
method: 'GET',
|
|
107
107
|
headers: headerParameters,
|
|
108
108
|
query: queryParameters,
|
|
109
109
|
}, initOverrides);
|
|
110
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MetricUioFromJSON));
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* Retrieves usage metrics
|
|
114
|
-
* Get
|
|
113
|
+
* Retrieves usage metrics for all agents within a date range (admin only)
|
|
114
|
+
* Get usage metrics
|
|
115
115
|
*/
|
|
116
|
-
async
|
|
117
|
-
const response = await this.
|
|
116
|
+
async getMetrics(startDate, endDate, initOverrides) {
|
|
117
|
+
const response = await this.getMetricsRaw({ startDate: startDate, endDate: endDate }, initOverrides);
|
|
118
118
|
return await response.value();
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
@@ -129,12 +129,18 @@ class MetricsApi extends runtime.BaseAPI {
|
|
|
129
129
|
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getMetricsBrainsAgent().');
|
|
130
130
|
}
|
|
131
131
|
const queryParameters = {};
|
|
132
|
+
if (requestParameters['startDate'] != null) {
|
|
133
|
+
queryParameters['startDate'] = requestParameters['startDate'];
|
|
134
|
+
}
|
|
135
|
+
if (requestParameters['endDate'] != null) {
|
|
136
|
+
queryParameters['endDate'] = requestParameters['endDate'];
|
|
137
|
+
}
|
|
132
138
|
const headerParameters = {};
|
|
133
139
|
if (this.configuration && this.configuration.apiKey) {
|
|
134
140
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
135
141
|
}
|
|
136
142
|
const response = await this.request({
|
|
137
|
-
path: `/organizations/{organizationId}/
|
|
143
|
+
path: `/organizations/{organizationId}/agents/{agentId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
138
144
|
method: 'GET',
|
|
139
145
|
headers: headerParameters,
|
|
140
146
|
query: queryParameters,
|
|
@@ -145,8 +151,8 @@ class MetricsApi extends runtime.BaseAPI {
|
|
|
145
151
|
* Retrieves metrics for a brain agent
|
|
146
152
|
* Get metrics for a brain agent
|
|
147
153
|
*/
|
|
148
|
-
async getMetricsBrainsAgent(organizationId, agentId, initOverrides) {
|
|
149
|
-
const response = await this.getMetricsBrainsAgentRaw({ organizationId: organizationId, agentId: agentId }, initOverrides);
|
|
154
|
+
async getMetricsBrainsAgent(organizationId, agentId, startDate, endDate, initOverrides) {
|
|
155
|
+
const response = await this.getMetricsBrainsAgentRaw({ organizationId: organizationId, agentId: agentId, startDate: startDate, endDate: endDate }, initOverrides);
|
|
150
156
|
return await response.value();
|
|
151
157
|
}
|
|
152
158
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, UserAccessRolesRequestUio, UserAccessUio,
|
|
13
|
+
import type { AccessRoleCreateRequestUio, AccessRolePermissionsRequestUio, AccessRoleUio, AccessRoleUpdateRequestUio, OrganizationEngineUio, OrganizationMemberUio, OrganizationUio, OrganizationUserInviteRequestUio, OrganizationUserInviteResponseUio, RoleCreateRequestUio, RoleUio, UserAccessRolesRequestUio, UserAccessUio, UserDirectPermissionsRequestUio } from '../models/index';
|
|
14
14
|
export interface CreateOrganizationAccessRoleRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
accessRoleCreateRequestUio: AccessRoleCreateRequestUio;
|
|
@@ -47,10 +47,6 @@ export interface GetOrganizationUserAccessRequest {
|
|
|
47
47
|
organizationId: string;
|
|
48
48
|
userId: string;
|
|
49
49
|
}
|
|
50
|
-
export interface GetOrganizationUserAgentsAccessRequest {
|
|
51
|
-
organizationId: string;
|
|
52
|
-
userId: string;
|
|
53
|
-
}
|
|
54
50
|
export interface InviteOrganizationUserRequest {
|
|
55
51
|
organizationId: string;
|
|
56
52
|
organizationUserInviteRequestUio: OrganizationUserInviteRequestUio;
|
|
@@ -74,11 +70,6 @@ export interface SetOrganizationUserAccessRolesRequest {
|
|
|
74
70
|
userId: string;
|
|
75
71
|
userAccessRolesRequestUio: UserAccessRolesRequestUio;
|
|
76
72
|
}
|
|
77
|
-
export interface SetOrganizationUserAgentsAccessRequest {
|
|
78
|
-
organizationId: string;
|
|
79
|
-
userId: string;
|
|
80
|
-
userAgentAccessRequestUio: UserAgentAccessRequestUio;
|
|
81
|
-
}
|
|
82
73
|
export interface SetOrganizationUserDirectPermissionsRequest {
|
|
83
74
|
organizationId: string;
|
|
84
75
|
userId: string;
|
|
@@ -192,14 +183,6 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
|
|
|
192
183
|
* Get user access roles and direct permissions
|
|
193
184
|
*/
|
|
194
185
|
getOrganizationUserAccess(organizationId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserAccessUio>;
|
|
195
|
-
/**
|
|
196
|
-
* Get user agent access configuration
|
|
197
|
-
*/
|
|
198
|
-
getOrganizationUserAgentsAccessRaw(requestParameters: GetOrganizationUserAgentsAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserAgentAccessUio>>;
|
|
199
|
-
/**
|
|
200
|
-
* Get user agent access configuration
|
|
201
|
-
*/
|
|
202
|
-
getOrganizationUserAgentsAccess(organizationId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserAgentAccessUio>;
|
|
203
186
|
/**
|
|
204
187
|
* Invite a user to an organization
|
|
205
188
|
*/
|
|
@@ -260,14 +243,6 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
|
|
|
260
243
|
* Set user access roles
|
|
261
244
|
*/
|
|
262
245
|
setOrganizationUserAccessRoles(organizationId: string, userId: string, userAccessRolesRequestUio: UserAccessRolesRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
263
|
-
/**
|
|
264
|
-
* Set user agent access configuration
|
|
265
|
-
*/
|
|
266
|
-
setOrganizationUserAgentsAccessRaw(requestParameters: SetOrganizationUserAgentsAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
267
|
-
/**
|
|
268
|
-
* Set user agent access configuration
|
|
269
|
-
*/
|
|
270
|
-
setOrganizationUserAgentsAccess(organizationId: string, userId: string, userAgentAccessRequestUio: UserAgentAccessRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
271
246
|
/**
|
|
272
247
|
* Set user direct permissions
|
|
273
248
|
*/
|
|
@@ -352,36 +352,6 @@ class OrganizationsApi extends runtime.BaseAPI {
|
|
|
352
352
|
const response = await this.getOrganizationUserAccessRaw({ organizationId: organizationId, userId: userId }, initOverrides);
|
|
353
353
|
return await response.value();
|
|
354
354
|
}
|
|
355
|
-
/**
|
|
356
|
-
* Get user agent access configuration
|
|
357
|
-
*/
|
|
358
|
-
async getOrganizationUserAgentsAccessRaw(requestParameters, initOverrides) {
|
|
359
|
-
if (requestParameters['organizationId'] == null) {
|
|
360
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationUserAgentsAccess().');
|
|
361
|
-
}
|
|
362
|
-
if (requestParameters['userId'] == null) {
|
|
363
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getOrganizationUserAgentsAccess().');
|
|
364
|
-
}
|
|
365
|
-
const queryParameters = {};
|
|
366
|
-
const headerParameters = {};
|
|
367
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
368
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
369
|
-
}
|
|
370
|
-
const response = await this.request({
|
|
371
|
-
path: `/organizations/{organizationId}/users/{userId}/agents-access`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
372
|
-
method: 'GET',
|
|
373
|
-
headers: headerParameters,
|
|
374
|
-
query: queryParameters,
|
|
375
|
-
}, initOverrides);
|
|
376
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserAgentAccessUioFromJSON)(jsonValue));
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Get user agent access configuration
|
|
380
|
-
*/
|
|
381
|
-
async getOrganizationUserAgentsAccess(organizationId, userId, initOverrides) {
|
|
382
|
-
const response = await this.getOrganizationUserAgentsAccessRaw({ organizationId: organizationId, userId: userId }, initOverrides);
|
|
383
|
-
return await response.value();
|
|
384
|
-
}
|
|
385
355
|
/**
|
|
386
356
|
* Invite a user to an organization
|
|
387
357
|
*/
|
|
@@ -591,40 +561,6 @@ class OrganizationsApi extends runtime.BaseAPI {
|
|
|
591
561
|
async setOrganizationUserAccessRoles(organizationId, userId, userAccessRolesRequestUio, initOverrides) {
|
|
592
562
|
await this.setOrganizationUserAccessRolesRaw({ organizationId: organizationId, userId: userId, userAccessRolesRequestUio: userAccessRolesRequestUio }, initOverrides);
|
|
593
563
|
}
|
|
594
|
-
/**
|
|
595
|
-
* Set user agent access configuration
|
|
596
|
-
*/
|
|
597
|
-
async setOrganizationUserAgentsAccessRaw(requestParameters, initOverrides) {
|
|
598
|
-
if (requestParameters['organizationId'] == null) {
|
|
599
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling setOrganizationUserAgentsAccess().');
|
|
600
|
-
}
|
|
601
|
-
if (requestParameters['userId'] == null) {
|
|
602
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling setOrganizationUserAgentsAccess().');
|
|
603
|
-
}
|
|
604
|
-
if (requestParameters['userAgentAccessRequestUio'] == null) {
|
|
605
|
-
throw new runtime.RequiredError('userAgentAccessRequestUio', 'Required parameter "userAgentAccessRequestUio" was null or undefined when calling setOrganizationUserAgentsAccess().');
|
|
606
|
-
}
|
|
607
|
-
const queryParameters = {};
|
|
608
|
-
const headerParameters = {};
|
|
609
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
610
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
611
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
612
|
-
}
|
|
613
|
-
const response = await this.request({
|
|
614
|
-
path: `/organizations/{organizationId}/users/{userId}/agents-access`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
615
|
-
method: 'PUT',
|
|
616
|
-
headers: headerParameters,
|
|
617
|
-
query: queryParameters,
|
|
618
|
-
body: (0, index_1.UserAgentAccessRequestUioToJSON)(requestParameters['userAgentAccessRequestUio']),
|
|
619
|
-
}, initOverrides);
|
|
620
|
-
return new runtime.VoidApiResponse(response);
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* Set user agent access configuration
|
|
624
|
-
*/
|
|
625
|
-
async setOrganizationUserAgentsAccess(organizationId, userId, userAgentAccessRequestUio, initOverrides) {
|
|
626
|
-
await this.setOrganizationUserAgentsAccessRaw({ organizationId: organizationId, userId: userId, userAgentAccessRequestUio: userAgentAccessRequestUio }, initOverrides);
|
|
627
|
-
}
|
|
628
564
|
/**
|
|
629
565
|
* Set user direct permissions
|
|
630
566
|
*/
|
package/dist/apis/SkillsApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AvailableCommandUio, LibrarySkillInstallRequestUio, LibrarySkillSyncRequestUio, LibrarySkillsPageUio, SkillAssignRequestUio, SkillCreateRequestUio, SkillFileCreateRequestUio, SkillFileSummaryUio, SkillFileUio, SkillFileUpdateRequestUio, SkillUio, SkillUpdateRequestUio } from '../models/index';
|
|
13
|
+
import type { AgentRefUio, AvailableCommandUio, LibrarySkillInstallRequestUio, LibrarySkillSyncRequestUio, LibrarySkillsPageUio, SkillAssignRequestUio, SkillCreateRequestUio, SkillFileCreateRequestUio, SkillFileSummaryUio, SkillFileUio, SkillFileUpdateRequestUio, SkillUio, SkillUpdateRequestUio } from '../models/index';
|
|
14
14
|
export interface AssignSkillToAgentRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
skillAssignRequestUio: SkillAssignRequestUio;
|
|
@@ -38,6 +38,9 @@ export interface GetAgentSkillsRequest {
|
|
|
38
38
|
export interface GetSkillRequest {
|
|
39
39
|
skillId: string;
|
|
40
40
|
}
|
|
41
|
+
export interface GetSkillAgentsRequest {
|
|
42
|
+
skillId: string;
|
|
43
|
+
}
|
|
41
44
|
export interface GetSkillFileRequest {
|
|
42
45
|
skillId: string;
|
|
43
46
|
fileId: string;
|
|
@@ -148,6 +151,16 @@ export declare class SkillsApi extends runtime.BaseAPI {
|
|
|
148
151
|
* Get a skill by ID
|
|
149
152
|
*/
|
|
150
153
|
getSkill(skillId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillUio>;
|
|
154
|
+
/**
|
|
155
|
+
* Returns all agents that have this skill installed. La réponse est une projection minimale : les deux adaptateurs ne sélectionnent que `id` et `name` (skills-pg.adapter.ts, skills-mongodb.adapter.ts).
|
|
156
|
+
* Get agents using a skill
|
|
157
|
+
*/
|
|
158
|
+
getSkillAgentsRaw(requestParameters: GetSkillAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentRefUio>>>;
|
|
159
|
+
/**
|
|
160
|
+
* Returns all agents that have this skill installed. La réponse est une projection minimale : les deux adaptateurs ne sélectionnent que `id` et `name` (skills-pg.adapter.ts, skills-mongodb.adapter.ts).
|
|
161
|
+
* Get agents using a skill
|
|
162
|
+
*/
|
|
163
|
+
getSkillAgents(skillId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentRefUio>>;
|
|
151
164
|
/**
|
|
152
165
|
* Get a skill file with content
|
|
153
166
|
*/
|
package/dist/apis/SkillsApi.js
CHANGED
|
@@ -283,6 +283,35 @@ class SkillsApi extends runtime.BaseAPI {
|
|
|
283
283
|
const response = await this.getSkillRaw({ skillId: skillId }, initOverrides);
|
|
284
284
|
return await response.value();
|
|
285
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Returns all agents that have this skill installed. La réponse est une projection minimale : les deux adaptateurs ne sélectionnent que `id` et `name` (skills-pg.adapter.ts, skills-mongodb.adapter.ts).
|
|
288
|
+
* Get agents using a skill
|
|
289
|
+
*/
|
|
290
|
+
async getSkillAgentsRaw(requestParameters, initOverrides) {
|
|
291
|
+
if (requestParameters['skillId'] == null) {
|
|
292
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling getSkillAgents().');
|
|
293
|
+
}
|
|
294
|
+
const queryParameters = {};
|
|
295
|
+
const headerParameters = {};
|
|
296
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
297
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
298
|
+
}
|
|
299
|
+
const response = await this.request({
|
|
300
|
+
path: `/skills/{skillId}/agents`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))),
|
|
301
|
+
method: 'GET',
|
|
302
|
+
headers: headerParameters,
|
|
303
|
+
query: queryParameters,
|
|
304
|
+
}, initOverrides);
|
|
305
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentRefUioFromJSON));
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Returns all agents that have this skill installed. La réponse est une projection minimale : les deux adaptateurs ne sélectionnent que `id` et `name` (skills-pg.adapter.ts, skills-mongodb.adapter.ts).
|
|
309
|
+
* Get agents using a skill
|
|
310
|
+
*/
|
|
311
|
+
async getSkillAgents(skillId, initOverrides) {
|
|
312
|
+
const response = await this.getSkillAgentsRaw({ skillId: skillId }, initOverrides);
|
|
313
|
+
return await response.value();
|
|
314
|
+
}
|
|
286
315
|
/**
|
|
287
316
|
* Get a skill file with content
|
|
288
317
|
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AddModuleRequestUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AddModuleRequestUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AddModuleRequestUio
|
|
22
|
+
*/
|
|
23
|
+
type: AddModuleRequestUioTypeEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AddModuleRequestUio
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {{ [key: string]: any; }}
|
|
33
|
+
* @memberof AddModuleRequestUio
|
|
34
|
+
*/
|
|
35
|
+
configuration: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof AddModuleRequestUio
|
|
42
|
+
*/
|
|
43
|
+
restricted?: boolean | null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export declare const AddModuleRequestUioTypeEnum: {
|
|
49
|
+
readonly ContextualKnowledgeWeaviate: "ContextualKnowledgeWeaviate";
|
|
50
|
+
readonly External: "External";
|
|
51
|
+
};
|
|
52
|
+
export type AddModuleRequestUioTypeEnum = typeof AddModuleRequestUioTypeEnum[keyof typeof AddModuleRequestUioTypeEnum];
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the AddModuleRequestUio interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfAddModuleRequestUio(value: object): value is AddModuleRequestUio;
|
|
57
|
+
export declare function AddModuleRequestUioFromJSON(json: any): AddModuleRequestUio;
|
|
58
|
+
export declare function AddModuleRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddModuleRequestUio;
|
|
59
|
+
export declare function AddModuleRequestUioToJSON(json: any): AddModuleRequestUio;
|
|
60
|
+
export declare function AddModuleRequestUioToJSONTyped(value?: AddModuleRequestUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AddModuleRequestUioTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfAddModuleRequestUio = instanceOfAddModuleRequestUio;
|
|
18
|
+
exports.AddModuleRequestUioFromJSON = AddModuleRequestUioFromJSON;
|
|
19
|
+
exports.AddModuleRequestUioFromJSONTyped = AddModuleRequestUioFromJSONTyped;
|
|
20
|
+
exports.AddModuleRequestUioToJSON = AddModuleRequestUioToJSON;
|
|
21
|
+
exports.AddModuleRequestUioToJSONTyped = AddModuleRequestUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.AddModuleRequestUioTypeEnum = {
|
|
26
|
+
ContextualKnowledgeWeaviate: 'ContextualKnowledgeWeaviate',
|
|
27
|
+
External: 'External'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the AddModuleRequestUio interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfAddModuleRequestUio(value) {
|
|
33
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('configuration' in value) || value['configuration'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function AddModuleRequestUioFromJSON(json) {
|
|
42
|
+
return AddModuleRequestUioFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function AddModuleRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'type': json['type'],
|
|
50
|
+
'name': json['name'],
|
|
51
|
+
'configuration': json['_configuration'],
|
|
52
|
+
'restricted': json['restricted'] == null ? undefined : json['restricted'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function AddModuleRequestUioToJSON(json) {
|
|
56
|
+
return AddModuleRequestUioToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function AddModuleRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'type': value['type'],
|
|
64
|
+
'name': value['name'],
|
|
65
|
+
'_configuration': value['configuration'],
|
|
66
|
+
'restricted': value['restricted'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -111,24 +111,6 @@ export interface AgentPatchUio {
|
|
|
111
111
|
* @memberof AgentPatchUio
|
|
112
112
|
*/
|
|
113
113
|
description?: string;
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* @type {string}
|
|
117
|
-
* @memberof AgentPatchUio
|
|
118
|
-
*/
|
|
119
|
-
template?: string;
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @type {string}
|
|
123
|
-
* @memberof AgentPatchUio
|
|
124
|
-
*/
|
|
125
|
-
color?: string;
|
|
126
|
-
/**
|
|
127
|
-
*
|
|
128
|
-
* @type {string}
|
|
129
|
-
* @memberof AgentPatchUio
|
|
130
|
-
*/
|
|
131
|
-
picture?: string;
|
|
132
114
|
/**
|
|
133
115
|
*
|
|
134
116
|
* @type {string}
|
|
@@ -147,18 +129,6 @@ export interface AgentPatchUio {
|
|
|
147
129
|
* @memberof AgentPatchUio
|
|
148
130
|
*/
|
|
149
131
|
knowledgeBaseIds?: Array<string>;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* @type {boolean}
|
|
153
|
-
* @memberof AgentPatchUio
|
|
154
|
-
*/
|
|
155
|
-
isTemplate?: boolean;
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
* @type {boolean}
|
|
159
|
-
* @memberof AgentPatchUio
|
|
160
|
-
*/
|
|
161
|
-
deleted?: boolean;
|
|
162
132
|
/**
|
|
163
133
|
*
|
|
164
134
|
* @type {AgentTypeUio}
|
|
@@ -54,14 +54,9 @@ function AgentPatchUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
54
|
'role': json['role'] == null ? undefined : json['role'],
|
|
55
55
|
'defaultLanguage': json['defaultLanguage'] == null ? undefined : json['defaultLanguage'],
|
|
56
56
|
'description': json['description'] == null ? undefined : json['description'],
|
|
57
|
-
'template': json['template'] == null ? undefined : json['template'],
|
|
58
|
-
'color': json['color'] == null ? undefined : json['color'],
|
|
59
|
-
'picture': json['picture'] == null ? undefined : json['picture'],
|
|
60
57
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
61
58
|
'isActivated': json['isActivated'] == null ? undefined : json['isActivated'],
|
|
62
59
|
'knowledgeBaseIds': json['knowledgeBaseIds'] == null ? undefined : json['knowledgeBaseIds'],
|
|
63
|
-
'isTemplate': json['isTemplate'] == null ? undefined : json['isTemplate'],
|
|
64
|
-
'deleted': json['deleted'] == null ? undefined : json['deleted'],
|
|
65
60
|
'agentType': json['agentType'] == null ? undefined : (0, AgentTypeUio_1.AgentTypeUioFromJSON)(json['agentType']),
|
|
66
61
|
'personal': json['personal'] == null ? undefined : json['personal'],
|
|
67
62
|
'hideConversationsInHistory': json['hideConversationsInHistory'] == null ? undefined : json['hideConversationsInHistory'],
|
|
@@ -93,14 +88,9 @@ function AgentPatchUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
93
88
|
'role': value['role'],
|
|
94
89
|
'defaultLanguage': value['defaultLanguage'],
|
|
95
90
|
'description': value['description'],
|
|
96
|
-
'template': value['template'],
|
|
97
|
-
'color': value['color'],
|
|
98
|
-
'picture': value['picture'],
|
|
99
91
|
'createdAt': value['createdAt'],
|
|
100
92
|
'isActivated': value['isActivated'],
|
|
101
93
|
'knowledgeBaseIds': value['knowledgeBaseIds'],
|
|
102
|
-
'isTemplate': value['isTemplate'],
|
|
103
|
-
'deleted': value['deleted'],
|
|
104
94
|
'agentType': (0, AgentTypeUio_1.AgentTypeUioToJSON)(value['agentType']),
|
|
105
95
|
'personal': value['personal'],
|
|
106
96
|
'hideConversationsInHistory': value['hideConversationsInHistory'],
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AgentRefUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AgentRefUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AgentRefUio
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AgentRefUio
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AgentRefUio interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAgentRefUio(value: object): value is AgentRefUio;
|
|
35
|
+
export declare function AgentRefUioFromJSON(json: any): AgentRefUio;
|
|
36
|
+
export declare function AgentRefUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRefUio;
|
|
37
|
+
export declare function AgentRefUioToJSON(json: any): AgentRefUio;
|
|
38
|
+
export declare function AgentRefUioToJSONTyped(value?: AgentRefUio | null, ignoreDiscriminator?: boolean): any;
|