@breign/client 1.0.136 → 1.0.138
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/LibraryAgentsApi.d.ts +211 -0
- package/dist/apis/LibraryAgentsApi.js +537 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AgentBundleDiffUio.d.ts +79 -0
- package/dist/models/AgentBundleDiffUio.js +85 -0
- package/dist/models/AgentBundleListDiffUio.d.ts +44 -0
- package/dist/models/AgentBundleListDiffUio.js +58 -0
- package/dist/models/AgentLibraryLinkLatestVersionUio.d.ts +44 -0
- package/dist/models/AgentLibraryLinkLatestVersionUio.js +58 -0
- package/dist/models/AgentLibraryLinkUio.d.ts +81 -0
- package/dist/models/AgentLibraryLinkUio.js +79 -0
- package/dist/models/AgentLibraryLinkUpdateRequestUio.d.ts +38 -0
- package/dist/models/AgentLibraryLinkUpdateRequestUio.js +52 -0
- package/dist/models/AgentLibraryLinkUpdateResponseUio.d.ts +69 -0
- package/dist/models/AgentLibraryLinkUpdateResponseUio.js +75 -0
- package/dist/models/AgentLibraryLinksResponseUio.d.ts +33 -0
- package/dist/models/AgentLibraryLinksResponseUio.js +51 -0
- package/dist/models/FileAttachmentCreateRequestUio.d.ts +6 -0
- package/dist/models/FileAttachmentCreateRequestUio.js +2 -0
- package/dist/models/FileAttachmentDetailsResponseUio.d.ts +6 -0
- package/dist/models/FileAttachmentDetailsResponseUio.js +2 -0
- package/dist/models/FileAttachmentUio.d.ts +6 -0
- package/dist/models/FileAttachmentUio.js +2 -0
- package/dist/models/FileAttachmentUploadResponseUio.d.ts +6 -0
- package/dist/models/FileAttachmentUploadResponseUio.js +2 -0
- 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/KnowledgeFileCreationRequestUio.d.ts +6 -0
- package/dist/models/KnowledgeFileCreationRequestUio.js +2 -0
- package/dist/models/KnowledgeFileUio.d.ts +6 -0
- package/dist/models/KnowledgeFileUio.js +2 -0
- package/dist/models/LibraryAgentBundleSummaryUio.d.ts +56 -0
- package/dist/models/LibraryAgentBundleSummaryUio.js +66 -0
- package/dist/models/LibraryAgentDiffResponseUio.d.ts +46 -0
- package/dist/models/LibraryAgentDiffResponseUio.js +60 -0
- package/dist/models/LibraryAgentDiffVersionRefUio.d.ts +38 -0
- package/dist/models/LibraryAgentDiffVersionRefUio.js +54 -0
- package/dist/models/LibraryAgentEntryUio.d.ts +87 -0
- package/dist/models/LibraryAgentEntryUio.js +83 -0
- package/dist/models/LibraryAgentInstallRequestUio.d.ts +38 -0
- package/dist/models/LibraryAgentInstallRequestUio.js +52 -0
- package/dist/models/LibraryAgentInstallResponseUio.d.ts +75 -0
- package/dist/models/LibraryAgentInstallResponseUio.js +77 -0
- package/dist/models/LibraryAgentParseBundleRequestUio.d.ts +46 -0
- package/dist/models/LibraryAgentParseBundleRequestUio.js +62 -0
- package/dist/models/LibraryAgentPublishRequestUio.d.ts +68 -0
- package/dist/models/LibraryAgentPublishRequestUio.js +60 -0
- package/dist/models/LibraryAgentPublishVersionRequestUio.d.ts +62 -0
- package/dist/models/LibraryAgentPublishVersionRequestUio.js +58 -0
- package/dist/models/LibraryAgentVersionUio.d.ts +99 -0
- package/dist/models/LibraryAgentVersionUio.js +87 -0
- package/dist/models/LibraryAgentsPageUio.d.ts +63 -0
- package/dist/models/LibraryAgentsPageUio.js +71 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +18 -0
- package/dist/openapi.json +6035 -4919
- package/package.json +1 -1
|
@@ -0,0 +1,537 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.LibraryAgentsApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class LibraryAgentsApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Delete a library agent and all its versions (super-admin)
|
|
58
|
+
*/
|
|
59
|
+
async adminDeleteLibraryAgentRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['slug'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling adminDeleteLibraryAgent().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
66
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
67
|
+
}
|
|
68
|
+
const response = await this.request({
|
|
69
|
+
path: `/admin/library-agents/{slug}`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
70
|
+
method: 'DELETE',
|
|
71
|
+
headers: headerParameters,
|
|
72
|
+
query: queryParameters,
|
|
73
|
+
}, initOverrides);
|
|
74
|
+
return new runtime.VoidApiResponse(response);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Delete a library agent and all its versions (super-admin)
|
|
78
|
+
*/
|
|
79
|
+
async adminDeleteLibraryAgent(slug, initOverrides) {
|
|
80
|
+
await this.adminDeleteLibraryAgentRaw({ slug: slug }, initOverrides);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get a library agent entry by slug (super-admin)
|
|
84
|
+
*/
|
|
85
|
+
async adminGetLibraryAgentRaw(requestParameters, initOverrides) {
|
|
86
|
+
if (requestParameters['slug'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling adminGetLibraryAgent().');
|
|
88
|
+
}
|
|
89
|
+
const queryParameters = {};
|
|
90
|
+
const headerParameters = {};
|
|
91
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
92
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
93
|
+
}
|
|
94
|
+
const response = await this.request({
|
|
95
|
+
path: `/admin/library-agents/{slug}`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
96
|
+
method: 'GET',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
}, initOverrides);
|
|
100
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentEntryUioFromJSON)(jsonValue));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get a library agent entry by slug (super-admin)
|
|
104
|
+
*/
|
|
105
|
+
async adminGetLibraryAgent(slug, initOverrides) {
|
|
106
|
+
const response = await this.adminGetLibraryAgentRaw({ slug: slug }, initOverrides);
|
|
107
|
+
return await response.value();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Returns the raw breign-agent export bundle stored for this version. Used to prefill the publish composer.
|
|
111
|
+
* Get the stored bundle of a published version (super-admin)
|
|
112
|
+
*/
|
|
113
|
+
async adminGetLibraryAgentVersionBundleRaw(requestParameters, initOverrides) {
|
|
114
|
+
if (requestParameters['slug'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling adminGetLibraryAgentVersionBundle().');
|
|
116
|
+
}
|
|
117
|
+
if (requestParameters['versionId'] == null) {
|
|
118
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling adminGetLibraryAgentVersionBundle().');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
123
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
124
|
+
}
|
|
125
|
+
const response = await this.request({
|
|
126
|
+
path: `/admin/library-agents/{slug}/versions/{versionId}/bundle`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))).replace(`{${"versionId"}}`, encodeURIComponent(String(requestParameters['versionId']))),
|
|
127
|
+
method: 'GET',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
}, initOverrides);
|
|
131
|
+
return new runtime.JSONApiResponse(response);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Returns the raw breign-agent export bundle stored for this version. Used to prefill the publish composer.
|
|
135
|
+
* Get the stored bundle of a published version (super-admin)
|
|
136
|
+
*/
|
|
137
|
+
async adminGetLibraryAgentVersionBundle(slug, versionId, initOverrides) {
|
|
138
|
+
const response = await this.adminGetLibraryAgentVersionBundleRaw({ slug: slug, versionId: versionId }, initOverrides);
|
|
139
|
+
return await response.value();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* List all library agents (super-admin)
|
|
143
|
+
*/
|
|
144
|
+
async adminListLibraryAgentsRaw(requestParameters, initOverrides) {
|
|
145
|
+
const queryParameters = {};
|
|
146
|
+
if (requestParameters['page'] != null) {
|
|
147
|
+
queryParameters['page'] = requestParameters['page'];
|
|
148
|
+
}
|
|
149
|
+
if (requestParameters['limit'] != null) {
|
|
150
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
151
|
+
}
|
|
152
|
+
if (requestParameters['search'] != null) {
|
|
153
|
+
queryParameters['search'] = requestParameters['search'];
|
|
154
|
+
}
|
|
155
|
+
if (requestParameters['category'] != null) {
|
|
156
|
+
queryParameters['category'] = requestParameters['category'];
|
|
157
|
+
}
|
|
158
|
+
const headerParameters = {};
|
|
159
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
160
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
161
|
+
}
|
|
162
|
+
const response = await this.request({
|
|
163
|
+
path: `/admin/library-agents`,
|
|
164
|
+
method: 'GET',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentsPageUioFromJSON)(jsonValue));
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* List all library agents (super-admin)
|
|
172
|
+
*/
|
|
173
|
+
async adminListLibraryAgents(page, limit, search, category, initOverrides) {
|
|
174
|
+
const response = await this.adminListLibraryAgentsRaw({ page: page, limit: limit, search: search, category: category }, initOverrides);
|
|
175
|
+
return await response.value();
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Parses a serialized YAML/JSON breign-agent bundle with the same validation rules as publication, and returns the normalized bundle. Used by the composer to prefill from a file.
|
|
179
|
+
* Parse and validate a raw agent bundle (superadmin)
|
|
180
|
+
*/
|
|
181
|
+
async adminParseLibraryAgentBundleRaw(requestParameters, initOverrides) {
|
|
182
|
+
if (requestParameters['libraryAgentParseBundleRequestUio'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('libraryAgentParseBundleRequestUio', 'Required parameter "libraryAgentParseBundleRequestUio" was null or undefined when calling adminParseLibraryAgentBundle().');
|
|
184
|
+
}
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
const headerParameters = {};
|
|
187
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
188
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
189
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
190
|
+
}
|
|
191
|
+
const response = await this.request({
|
|
192
|
+
path: `/admin/library-agents/parse-bundle`,
|
|
193
|
+
method: 'POST',
|
|
194
|
+
headers: headerParameters,
|
|
195
|
+
query: queryParameters,
|
|
196
|
+
body: (0, index_1.LibraryAgentParseBundleRequestUioToJSON)(requestParameters['libraryAgentParseBundleRequestUio']),
|
|
197
|
+
}, initOverrides);
|
|
198
|
+
return new runtime.JSONApiResponse(response);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Parses a serialized YAML/JSON breign-agent bundle with the same validation rules as publication, and returns the normalized bundle. Used by the composer to prefill from a file.
|
|
202
|
+
* Parse and validate a raw agent bundle (superadmin)
|
|
203
|
+
*/
|
|
204
|
+
async adminParseLibraryAgentBundle(libraryAgentParseBundleRequestUio, initOverrides) {
|
|
205
|
+
const response = await this.adminParseLibraryAgentBundleRaw({ libraryAgentParseBundleRequestUio: libraryAgentParseBundleRequestUio }, initOverrides);
|
|
206
|
+
return await response.value();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Exports the given agent as a portable bundle (secrets stripped) and publishes it as the initial version of a new library entry.
|
|
210
|
+
* Publish an agent to the library (super-admin)
|
|
211
|
+
*/
|
|
212
|
+
async adminPublishLibraryAgentRaw(requestParameters, initOverrides) {
|
|
213
|
+
if (requestParameters['libraryAgentPublishRequestUio'] == null) {
|
|
214
|
+
throw new runtime.RequiredError('libraryAgentPublishRequestUio', 'Required parameter "libraryAgentPublishRequestUio" was null or undefined when calling adminPublishLibraryAgent().');
|
|
215
|
+
}
|
|
216
|
+
const queryParameters = {};
|
|
217
|
+
const headerParameters = {};
|
|
218
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
219
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
220
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
221
|
+
}
|
|
222
|
+
const response = await this.request({
|
|
223
|
+
path: `/admin/library-agents`,
|
|
224
|
+
method: 'POST',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
body: (0, index_1.LibraryAgentPublishRequestUioToJSON)(requestParameters['libraryAgentPublishRequestUio']),
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentEntryUioFromJSON)(jsonValue));
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Exports the given agent as a portable bundle (secrets stripped) and publishes it as the initial version of a new library entry.
|
|
233
|
+
* Publish an agent to the library (super-admin)
|
|
234
|
+
*/
|
|
235
|
+
async adminPublishLibraryAgent(libraryAgentPublishRequestUio, initOverrides) {
|
|
236
|
+
const response = await this.adminPublishLibraryAgentRaw({ libraryAgentPublishRequestUio: libraryAgentPublishRequestUio }, initOverrides);
|
|
237
|
+
return await response.value();
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Exports the given agent as a portable bundle and publishes it as the new latest version of an existing library entry. Name, description and category default to the previous latest version.
|
|
241
|
+
* Publish a new version of a library agent (super-admin)
|
|
242
|
+
*/
|
|
243
|
+
async adminPublishLibraryAgentVersionRaw(requestParameters, initOverrides) {
|
|
244
|
+
if (requestParameters['slug'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling adminPublishLibraryAgentVersion().');
|
|
246
|
+
}
|
|
247
|
+
if (requestParameters['libraryAgentPublishVersionRequestUio'] == null) {
|
|
248
|
+
throw new runtime.RequiredError('libraryAgentPublishVersionRequestUio', 'Required parameter "libraryAgentPublishVersionRequestUio" was null or undefined when calling adminPublishLibraryAgentVersion().');
|
|
249
|
+
}
|
|
250
|
+
const queryParameters = {};
|
|
251
|
+
const headerParameters = {};
|
|
252
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
253
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
254
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
255
|
+
}
|
|
256
|
+
const response = await this.request({
|
|
257
|
+
path: `/admin/library-agents/{slug}/versions`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
258
|
+
method: 'POST',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
body: (0, index_1.LibraryAgentPublishVersionRequestUioToJSON)(requestParameters['libraryAgentPublishVersionRequestUio']),
|
|
262
|
+
}, initOverrides);
|
|
263
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentVersionUioFromJSON)(jsonValue));
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Exports the given agent as a portable bundle and publishes it as the new latest version of an existing library entry. Name, description and category default to the previous latest version.
|
|
267
|
+
* Publish a new version of a library agent (super-admin)
|
|
268
|
+
*/
|
|
269
|
+
async adminPublishLibraryAgentVersion(slug, libraryAgentPublishVersionRequestUio, initOverrides) {
|
|
270
|
+
const response = await this.adminPublishLibraryAgentVersionRaw({ slug: slug, libraryAgentPublishVersionRequestUio: libraryAgentPublishVersionRequestUio }, initOverrides);
|
|
271
|
+
return await response.value();
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Removes the provenance link. The agent no longer follows catalog versions and becomes freely editable again; its current configuration is left untouched. Requires organization admin rights.
|
|
275
|
+
* Detach a managed agent from the marketplace
|
|
276
|
+
*/
|
|
277
|
+
async detachAgentLibraryLinkRaw(requestParameters, initOverrides) {
|
|
278
|
+
if (requestParameters['agentId'] == null) {
|
|
279
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling detachAgentLibraryLink().');
|
|
280
|
+
}
|
|
281
|
+
if (requestParameters['organizationId'] == null) {
|
|
282
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling detachAgentLibraryLink().');
|
|
283
|
+
}
|
|
284
|
+
const queryParameters = {};
|
|
285
|
+
if (requestParameters['organizationId'] != null) {
|
|
286
|
+
queryParameters['organizationId'] = requestParameters['organizationId'];
|
|
287
|
+
}
|
|
288
|
+
const headerParameters = {};
|
|
289
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
290
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
291
|
+
}
|
|
292
|
+
const response = await this.request({
|
|
293
|
+
path: `/agent-library-links/{agentId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
294
|
+
method: 'DELETE',
|
|
295
|
+
headers: headerParameters,
|
|
296
|
+
query: queryParameters,
|
|
297
|
+
}, initOverrides);
|
|
298
|
+
return new runtime.VoidApiResponse(response);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Removes the provenance link. The agent no longer follows catalog versions and becomes freely editable again; its current configuration is left untouched. Requires organization admin rights.
|
|
302
|
+
* Detach a managed agent from the marketplace
|
|
303
|
+
*/
|
|
304
|
+
async detachAgentLibraryLink(agentId, organizationId, initOverrides) {
|
|
305
|
+
await this.detachAgentLibraryLinkRaw({ agentId: agentId, organizationId: organizationId }, initOverrides);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Structural diff between two published bundle versions of the same catalog entry — feeds the \"what changes\" modal shown before updating a managed agent. Requires organization membership.
|
|
309
|
+
* Diff two published versions of a library agent
|
|
310
|
+
*/
|
|
311
|
+
async diffLibraryAgentVersionsRaw(requestParameters, initOverrides) {
|
|
312
|
+
if (requestParameters['slug'] == null) {
|
|
313
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling diffLibraryAgentVersions().');
|
|
314
|
+
}
|
|
315
|
+
if (requestParameters['organizationId'] == null) {
|
|
316
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling diffLibraryAgentVersions().');
|
|
317
|
+
}
|
|
318
|
+
if (requestParameters['fromVersionId'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('fromVersionId', 'Required parameter "fromVersionId" was null or undefined when calling diffLibraryAgentVersions().');
|
|
320
|
+
}
|
|
321
|
+
if (requestParameters['toVersionId'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('toVersionId', 'Required parameter "toVersionId" was null or undefined when calling diffLibraryAgentVersions().');
|
|
323
|
+
}
|
|
324
|
+
const queryParameters = {};
|
|
325
|
+
if (requestParameters['organizationId'] != null) {
|
|
326
|
+
queryParameters['organizationId'] = requestParameters['organizationId'];
|
|
327
|
+
}
|
|
328
|
+
if (requestParameters['fromVersionId'] != null) {
|
|
329
|
+
queryParameters['fromVersionId'] = requestParameters['fromVersionId'];
|
|
330
|
+
}
|
|
331
|
+
if (requestParameters['toVersionId'] != null) {
|
|
332
|
+
queryParameters['toVersionId'] = requestParameters['toVersionId'];
|
|
333
|
+
}
|
|
334
|
+
const headerParameters = {};
|
|
335
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
336
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
337
|
+
}
|
|
338
|
+
const response = await this.request({
|
|
339
|
+
path: `/library-agents/{slug}/diff`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
340
|
+
method: 'GET',
|
|
341
|
+
headers: headerParameters,
|
|
342
|
+
query: queryParameters,
|
|
343
|
+
}, initOverrides);
|
|
344
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentDiffResponseUioFromJSON)(jsonValue));
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Structural diff between two published bundle versions of the same catalog entry — feeds the \"what changes\" modal shown before updating a managed agent. Requires organization membership.
|
|
348
|
+
* Diff two published versions of a library agent
|
|
349
|
+
*/
|
|
350
|
+
async diffLibraryAgentVersions(slug, organizationId, fromVersionId, toVersionId, initOverrides) {
|
|
351
|
+
const response = await this.diffLibraryAgentVersionsRaw({ slug: slug, organizationId: organizationId, fromVersionId: fromVersionId, toVersionId: toVersionId }, initOverrides);
|
|
352
|
+
return await response.value();
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Returns a published agent with its full version history.
|
|
356
|
+
* Get a library agent entry by slug
|
|
357
|
+
*/
|
|
358
|
+
async getLibraryAgentRaw(requestParameters, initOverrides) {
|
|
359
|
+
if (requestParameters['slug'] == null) {
|
|
360
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getLibraryAgent().');
|
|
361
|
+
}
|
|
362
|
+
if (requestParameters['organizationId'] == null) {
|
|
363
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getLibraryAgent().');
|
|
364
|
+
}
|
|
365
|
+
const queryParameters = {};
|
|
366
|
+
if (requestParameters['organizationId'] != null) {
|
|
367
|
+
queryParameters['organizationId'] = requestParameters['organizationId'];
|
|
368
|
+
}
|
|
369
|
+
const headerParameters = {};
|
|
370
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
371
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
372
|
+
}
|
|
373
|
+
const response = await this.request({
|
|
374
|
+
path: `/library-agents/{slug}`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
375
|
+
method: 'GET',
|
|
376
|
+
headers: headerParameters,
|
|
377
|
+
query: queryParameters,
|
|
378
|
+
}, initOverrides);
|
|
379
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentEntryUioFromJSON)(jsonValue));
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Returns a published agent with its full version history.
|
|
383
|
+
* Get a library agent entry by slug
|
|
384
|
+
*/
|
|
385
|
+
async getLibraryAgent(slug, organizationId, initOverrides) {
|
|
386
|
+
const response = await this.getLibraryAgentRaw({ slug: slug, organizationId: organizationId }, initOverrides);
|
|
387
|
+
return await response.value();
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Materializes the published agent bundle (agent, skills, knowledge bases, flow, apps) in the organization. MCP tools are only linked when a matching tool already exists in the organization, otherwise they are reported as skipped. Requires organization admin rights.
|
|
391
|
+
* Install a library agent into an organization
|
|
392
|
+
*/
|
|
393
|
+
async installLibraryAgentRaw(requestParameters, initOverrides) {
|
|
394
|
+
if (requestParameters['slug'] == null) {
|
|
395
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling installLibraryAgent().');
|
|
396
|
+
}
|
|
397
|
+
if (requestParameters['libraryAgentInstallRequestUio'] == null) {
|
|
398
|
+
throw new runtime.RequiredError('libraryAgentInstallRequestUio', 'Required parameter "libraryAgentInstallRequestUio" was null or undefined when calling installLibraryAgent().');
|
|
399
|
+
}
|
|
400
|
+
const queryParameters = {};
|
|
401
|
+
const headerParameters = {};
|
|
402
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
403
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
404
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
405
|
+
}
|
|
406
|
+
const response = await this.request({
|
|
407
|
+
path: `/library-agents/{slug}/install`.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
|
|
408
|
+
method: 'POST',
|
|
409
|
+
headers: headerParameters,
|
|
410
|
+
query: queryParameters,
|
|
411
|
+
body: (0, index_1.LibraryAgentInstallRequestUioToJSON)(requestParameters['libraryAgentInstallRequestUio']),
|
|
412
|
+
}, initOverrides);
|
|
413
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentInstallResponseUioFromJSON)(jsonValue));
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Materializes the published agent bundle (agent, skills, knowledge bases, flow, apps) in the organization. MCP tools are only linked when a matching tool already exists in the organization, otherwise they are reported as skipped. Requires organization admin rights.
|
|
417
|
+
* Install a library agent into an organization
|
|
418
|
+
*/
|
|
419
|
+
async installLibraryAgent(slug, libraryAgentInstallRequestUio, initOverrides) {
|
|
420
|
+
const response = await this.installLibraryAgentRaw({ slug: slug, libraryAgentInstallRequestUio: libraryAgentInstallRequestUio }, initOverrides);
|
|
421
|
+
return await response.value();
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Returns the provenance links of the organization\'s managed agents, each enriched with the latest published version of its catalog entry and an updateAvailable flag. Requires organization membership.
|
|
425
|
+
* List marketplace links of an organization\'s agents
|
|
426
|
+
*/
|
|
427
|
+
async listAgentLibraryLinksRaw(requestParameters, initOverrides) {
|
|
428
|
+
if (requestParameters['organizationId'] == null) {
|
|
429
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listAgentLibraryLinks().');
|
|
430
|
+
}
|
|
431
|
+
const queryParameters = {};
|
|
432
|
+
if (requestParameters['organizationId'] != null) {
|
|
433
|
+
queryParameters['organizationId'] = requestParameters['organizationId'];
|
|
434
|
+
}
|
|
435
|
+
if (requestParameters['agentId'] != null) {
|
|
436
|
+
queryParameters['agentId'] = requestParameters['agentId'];
|
|
437
|
+
}
|
|
438
|
+
const headerParameters = {};
|
|
439
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
440
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
441
|
+
}
|
|
442
|
+
const response = await this.request({
|
|
443
|
+
path: `/agent-library-links`,
|
|
444
|
+
method: 'GET',
|
|
445
|
+
headers: headerParameters,
|
|
446
|
+
query: queryParameters,
|
|
447
|
+
}, initOverrides);
|
|
448
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentLibraryLinksResponseUioFromJSON)(jsonValue));
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Returns the provenance links of the organization\'s managed agents, each enriched with the latest published version of its catalog entry and an updateAvailable flag. Requires organization membership.
|
|
452
|
+
* List marketplace links of an organization\'s agents
|
|
453
|
+
*/
|
|
454
|
+
async listAgentLibraryLinks(organizationId, agentId, initOverrides) {
|
|
455
|
+
const response = await this.listAgentLibraryLinksRaw({ organizationId: organizationId, agentId: agentId }, initOverrides);
|
|
456
|
+
return await response.value();
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Returns a paginated, searchable, filterable list of published agents with their versions.
|
|
460
|
+
* List all library agents (agent marketplace)
|
|
461
|
+
*/
|
|
462
|
+
async listLibraryAgentsRaw(requestParameters, initOverrides) {
|
|
463
|
+
if (requestParameters['organizationId'] == null) {
|
|
464
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listLibraryAgents().');
|
|
465
|
+
}
|
|
466
|
+
const queryParameters = {};
|
|
467
|
+
if (requestParameters['organizationId'] != null) {
|
|
468
|
+
queryParameters['organizationId'] = requestParameters['organizationId'];
|
|
469
|
+
}
|
|
470
|
+
if (requestParameters['page'] != null) {
|
|
471
|
+
queryParameters['page'] = requestParameters['page'];
|
|
472
|
+
}
|
|
473
|
+
if (requestParameters['limit'] != null) {
|
|
474
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
475
|
+
}
|
|
476
|
+
if (requestParameters['search'] != null) {
|
|
477
|
+
queryParameters['search'] = requestParameters['search'];
|
|
478
|
+
}
|
|
479
|
+
if (requestParameters['category'] != null) {
|
|
480
|
+
queryParameters['category'] = requestParameters['category'];
|
|
481
|
+
}
|
|
482
|
+
const headerParameters = {};
|
|
483
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
484
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
485
|
+
}
|
|
486
|
+
const response = await this.request({
|
|
487
|
+
path: `/library-agents`,
|
|
488
|
+
method: 'GET',
|
|
489
|
+
headers: headerParameters,
|
|
490
|
+
query: queryParameters,
|
|
491
|
+
}, initOverrides);
|
|
492
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LibraryAgentsPageUioFromJSON)(jsonValue));
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Returns a paginated, searchable, filterable list of published agents with their versions.
|
|
496
|
+
* List all library agents (agent marketplace)
|
|
497
|
+
*/
|
|
498
|
+
async listLibraryAgents(organizationId, page, limit, search, category, initOverrides) {
|
|
499
|
+
const response = await this.listLibraryAgentsRaw({ organizationId: organizationId, page: page, limit: limit, search: search, category: category }, initOverrides);
|
|
500
|
+
return await response.value();
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Re-applies the published bundle onto the installed agent in place (fields replaced, skill/tool/knowledge-base assignments synchronized, flow replaced). Organization skills and knowledge bases are never deleted, only unassigned; existing apps with the same name are kept. Defaults to the latest published version. Requires organization admin rights.
|
|
504
|
+
* Update a managed agent to a catalog version
|
|
505
|
+
*/
|
|
506
|
+
async updateManagedAgentRaw(requestParameters, initOverrides) {
|
|
507
|
+
if (requestParameters['agentId'] == null) {
|
|
508
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateManagedAgent().');
|
|
509
|
+
}
|
|
510
|
+
if (requestParameters['agentLibraryLinkUpdateRequestUio'] == null) {
|
|
511
|
+
throw new runtime.RequiredError('agentLibraryLinkUpdateRequestUio', 'Required parameter "agentLibraryLinkUpdateRequestUio" was null or undefined when calling updateManagedAgent().');
|
|
512
|
+
}
|
|
513
|
+
const queryParameters = {};
|
|
514
|
+
const headerParameters = {};
|
|
515
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
516
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
517
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
518
|
+
}
|
|
519
|
+
const response = await this.request({
|
|
520
|
+
path: `/agent-library-links/{agentId}/update`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
521
|
+
method: 'POST',
|
|
522
|
+
headers: headerParameters,
|
|
523
|
+
query: queryParameters,
|
|
524
|
+
body: (0, index_1.AgentLibraryLinkUpdateRequestUioToJSON)(requestParameters['agentLibraryLinkUpdateRequestUio']),
|
|
525
|
+
}, initOverrides);
|
|
526
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentLibraryLinkUpdateResponseUioFromJSON)(jsonValue));
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Re-applies the published bundle onto the installed agent in place (fields replaced, skill/tool/knowledge-base assignments synchronized, flow replaced). Organization skills and knowledge bases are never deleted, only unassigned; existing apps with the same name are kept. Defaults to the latest published version. Requires organization admin rights.
|
|
530
|
+
* Update a managed agent to a catalog version
|
|
531
|
+
*/
|
|
532
|
+
async updateManagedAgent(agentId, agentLibraryLinkUpdateRequestUio, initOverrides) {
|
|
533
|
+
const response = await this.updateManagedAgentRaw({ agentId: agentId, agentLibraryLinkUpdateRequestUio: agentLibraryLinkUpdateRequestUio }, initOverrides);
|
|
534
|
+
return await response.value();
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
exports.LibraryAgentsApi = LibraryAgentsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './GeneralApi';
|
|
|
14
14
|
export * from './GuardiansApi';
|
|
15
15
|
export * from './InstancesApi';
|
|
16
16
|
export * from './KnowledgeApi';
|
|
17
|
+
export * from './LibraryAgentsApi';
|
|
17
18
|
export * from './ManifestsApi';
|
|
18
19
|
export * from './MetricsApi';
|
|
19
20
|
export * from './OrganizationsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __exportStar(require("./GeneralApi"), exports);
|
|
|
32
32
|
__exportStar(require("./GuardiansApi"), exports);
|
|
33
33
|
__exportStar(require("./InstancesApi"), exports);
|
|
34
34
|
__exportStar(require("./KnowledgeApi"), exports);
|
|
35
|
+
__exportStar(require("./LibraryAgentsApi"), exports);
|
|
35
36
|
__exportStar(require("./ManifestsApi"), exports);
|
|
36
37
|
__exportStar(require("./MetricsApi"), exports);
|
|
37
38
|
__exportStar(require("./OrganizationsApi"), exports);
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
import type { AgentBundleListDiffUio } from './AgentBundleListDiffUio';
|
|
13
|
+
/**
|
|
14
|
+
* Structural diff between two published bundle versions (what an update would change).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AgentBundleDiffUio
|
|
17
|
+
*/
|
|
18
|
+
export interface AgentBundleDiffUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<string>}
|
|
22
|
+
* @memberof AgentBundleDiffUio
|
|
23
|
+
*/
|
|
24
|
+
changedAgentFields: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {AgentBundleListDiffUio}
|
|
28
|
+
* @memberof AgentBundleDiffUio
|
|
29
|
+
*/
|
|
30
|
+
skills: AgentBundleListDiffUio;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {AgentBundleListDiffUio}
|
|
34
|
+
* @memberof AgentBundleDiffUio
|
|
35
|
+
*/
|
|
36
|
+
tools: AgentBundleListDiffUio;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {AgentBundleListDiffUio}
|
|
40
|
+
* @memberof AgentBundleDiffUio
|
|
41
|
+
*/
|
|
42
|
+
knowledgeBases: AgentBundleListDiffUio;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {AgentBundleListDiffUio}
|
|
46
|
+
* @memberof AgentBundleDiffUio
|
|
47
|
+
*/
|
|
48
|
+
apps: AgentBundleListDiffUio;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof AgentBundleDiffUio
|
|
53
|
+
*/
|
|
54
|
+
flow: AgentBundleDiffUioFlowEnum;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof AgentBundleDiffUio
|
|
59
|
+
*/
|
|
60
|
+
hasChanges: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const AgentBundleDiffUioFlowEnum: {
|
|
66
|
+
readonly Unchanged: "unchanged";
|
|
67
|
+
readonly Added: "added";
|
|
68
|
+
readonly Removed: "removed";
|
|
69
|
+
readonly Changed: "changed";
|
|
70
|
+
};
|
|
71
|
+
export type AgentBundleDiffUioFlowEnum = typeof AgentBundleDiffUioFlowEnum[keyof typeof AgentBundleDiffUioFlowEnum];
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the AgentBundleDiffUio interface.
|
|
74
|
+
*/
|
|
75
|
+
export declare function instanceOfAgentBundleDiffUio(value: object): value is AgentBundleDiffUio;
|
|
76
|
+
export declare function AgentBundleDiffUioFromJSON(json: any): AgentBundleDiffUio;
|
|
77
|
+
export declare function AgentBundleDiffUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentBundleDiffUio;
|
|
78
|
+
export declare function AgentBundleDiffUioToJSON(json: any): AgentBundleDiffUio;
|
|
79
|
+
export declare function AgentBundleDiffUioToJSONTyped(value?: AgentBundleDiffUio | null, ignoreDiscriminator?: boolean): any;
|