@ideascol/agents-generator-sdk 0.6.1 → 0.7.2
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/bin/cli.js +861 -78
- package/dist/index.js +869 -79
- package/dist/lib/clients/agents-generator/index.d.ts +24 -0
- package/dist/lib/clients/agents-generator/models/AgentBreakdown.d.ts +10 -0
- package/dist/lib/clients/agents-generator/models/AgentDiffResponse.d.ts +7 -0
- package/dist/lib/clients/agents-generator/models/AgentFolderCreate.d.ts +18 -0
- package/dist/lib/clients/agents-generator/models/AgentFolderResponse.d.ts +24 -0
- package/dist/lib/clients/agents-generator/models/AgentFolderUpdate.d.ts +6 -0
- package/dist/lib/clients/agents-generator/models/AgentRequest.d.ts +4 -0
- package/dist/lib/clients/agents-generator/models/AgentTokenUsageSummary.d.ts +11 -0
- package/dist/lib/clients/agents-generator/models/AssignAgentRequest.d.ts +3 -0
- package/dist/lib/clients/agents-generator/models/ConversationTokenUsageSummary.d.ts +9 -0
- package/dist/lib/clients/agents-generator/models/DiscardDraftResponse.d.ts +6 -0
- package/dist/lib/clients/agents-generator/models/GetAgentResponse.d.ts +4 -0
- package/dist/lib/clients/agents-generator/models/ModelBreakdown.d.ts +11 -0
- package/dist/lib/clients/agents-generator/models/NodeData.d.ts +4 -0
- package/dist/lib/clients/agents-generator/models/PublishAgentResponse.d.ts +7 -0
- package/dist/lib/clients/agents-generator/models/TokenUsageLogResponse.d.ts +19 -0
- package/dist/lib/clients/agents-generator/models/UserBreakdown.d.ts +10 -0
- package/dist/lib/clients/agents-generator/models/UserTokenUsageSummary.d.ts +11 -0
- package/dist/lib/clients/agents-generator/models/WebhookConfigCreate.d.ts +5 -0
- package/dist/lib/clients/agents-generator/models/WebhookConfigUpdate.d.ts +5 -0
- package/dist/lib/clients/agents-generator/models/WorkspaceTokenUsageSummary.d.ts +13 -0
- package/dist/lib/clients/agents-generator/services/AdminAgentFoldersService.d.ts +64 -0
- package/dist/lib/clients/agents-generator/services/AdminAgentsService.d.ts +30 -0
- package/dist/lib/clients/agents-generator/services/AdminConversationsService.d.ts +9 -0
- package/dist/lib/clients/agents-generator/services/AdminTokenUsageService.d.ts +92 -0
- package/dist/lib/clients/agents-generator/services/AdminWebhookConfigsService.d.ts +31 -0
- package/dist/lib/clients/agents-generator/services/AdminWorkspacesService.d.ts +3 -3
- package/dist/lib/clients/agents-generator/services/AgentFoldersService.d.ts +64 -0
- package/dist/lib/clients/agents-generator/services/AgentService.d.ts +30 -0
- package/dist/lib/clients/agents-generator/services/ConversationsService.d.ts +11 -1
- package/dist/lib/clients/agents-generator/services/PublicConversationsService.d.ts +11 -1
- package/dist/lib/clients/agents-generator/services/TokenUsageService.d.ts +92 -0
- package/dist/lib/clients/agents-generator/services/WebhookConfigsService.d.ts +57 -0
- package/dist/lib/clients/agents-generator/services/WebhooksService.d.ts +13 -0
- package/dist/lib/clients/agents-generator/services/WorkspaceCollaboratorsService.d.ts +3 -3
- package/dist/lib/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -166,7 +187,7 @@ var OpenAPI;
|
|
|
166
187
|
var init_OpenAPI = __esm(() => {
|
|
167
188
|
OpenAPI = {
|
|
168
189
|
BASE: "",
|
|
169
|
-
VERSION: "main-
|
|
190
|
+
VERSION: "main-8acda2a920b73ea6f20e54f68ace024752e2d8ff",
|
|
170
191
|
WITH_CREDENTIALS: false,
|
|
171
192
|
CREDENTIALS: "include",
|
|
172
193
|
TOKEN: undefined,
|
|
@@ -410,6 +431,106 @@ var init_request = __esm(() => {
|
|
|
410
431
|
init_CancelablePromise();
|
|
411
432
|
});
|
|
412
433
|
|
|
434
|
+
// src/lib/clients/agents-generator/services/AdminAgentFoldersService.ts
|
|
435
|
+
class AdminAgentFoldersService {
|
|
436
|
+
static createAgentFolder(requestBody, workspaceId) {
|
|
437
|
+
return request(OpenAPI, {
|
|
438
|
+
method: "POST",
|
|
439
|
+
url: "/agent-folders",
|
|
440
|
+
query: {
|
|
441
|
+
workspace_id: workspaceId
|
|
442
|
+
},
|
|
443
|
+
body: requestBody,
|
|
444
|
+
mediaType: "application/json",
|
|
445
|
+
errors: {
|
|
446
|
+
422: `Validation Error`
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
static getAgentFolders(skip, limit = 100, workspaceId) {
|
|
451
|
+
return request(OpenAPI, {
|
|
452
|
+
method: "GET",
|
|
453
|
+
url: "/agent-folders",
|
|
454
|
+
query: {
|
|
455
|
+
skip,
|
|
456
|
+
limit,
|
|
457
|
+
workspace_id: workspaceId
|
|
458
|
+
},
|
|
459
|
+
errors: {
|
|
460
|
+
422: `Validation Error`
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
static getAgentFolder(folderId, workspaceId) {
|
|
465
|
+
return request(OpenAPI, {
|
|
466
|
+
method: "GET",
|
|
467
|
+
url: "/agent-folders/{folder_id}",
|
|
468
|
+
path: {
|
|
469
|
+
folder_id: folderId
|
|
470
|
+
},
|
|
471
|
+
query: {
|
|
472
|
+
workspace_id: workspaceId
|
|
473
|
+
},
|
|
474
|
+
errors: {
|
|
475
|
+
422: `Validation Error`
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
static updateAgentFolder(folderId, requestBody, workspaceId) {
|
|
480
|
+
return request(OpenAPI, {
|
|
481
|
+
method: "PUT",
|
|
482
|
+
url: "/agent-folders/{folder_id}",
|
|
483
|
+
path: {
|
|
484
|
+
folder_id: folderId
|
|
485
|
+
},
|
|
486
|
+
query: {
|
|
487
|
+
workspace_id: workspaceId
|
|
488
|
+
},
|
|
489
|
+
body: requestBody,
|
|
490
|
+
mediaType: "application/json",
|
|
491
|
+
errors: {
|
|
492
|
+
422: `Validation Error`
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
static deleteAgentFolder(folderId, workspaceId) {
|
|
497
|
+
return request(OpenAPI, {
|
|
498
|
+
method: "DELETE",
|
|
499
|
+
url: "/agent-folders/{folder_id}",
|
|
500
|
+
path: {
|
|
501
|
+
folder_id: folderId
|
|
502
|
+
},
|
|
503
|
+
query: {
|
|
504
|
+
workspace_id: workspaceId
|
|
505
|
+
},
|
|
506
|
+
errors: {
|
|
507
|
+
422: `Validation Error`
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
static assignAgentToFolder(agentId, requestBody, workspaceId) {
|
|
512
|
+
return request(OpenAPI, {
|
|
513
|
+
method: "PUT",
|
|
514
|
+
url: "/agent-folders/assign/{agent_id}",
|
|
515
|
+
path: {
|
|
516
|
+
agent_id: agentId
|
|
517
|
+
},
|
|
518
|
+
query: {
|
|
519
|
+
workspace_id: workspaceId
|
|
520
|
+
},
|
|
521
|
+
body: requestBody,
|
|
522
|
+
mediaType: "application/json",
|
|
523
|
+
errors: {
|
|
524
|
+
422: `Validation Error`
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
var init_AdminAgentFoldersService = __esm(() => {
|
|
530
|
+
init_OpenAPI();
|
|
531
|
+
init_request();
|
|
532
|
+
});
|
|
533
|
+
|
|
413
534
|
// src/lib/clients/agents-generator/services/AdminAgentsService.ts
|
|
414
535
|
class AdminAgentsService {
|
|
415
536
|
static createAgent(requestBody, workspaceId) {
|
|
@@ -487,6 +608,51 @@ class AdminAgentsService {
|
|
|
487
608
|
}
|
|
488
609
|
});
|
|
489
610
|
}
|
|
611
|
+
static publishAgent(agentId, workspaceId) {
|
|
612
|
+
return request(OpenAPI, {
|
|
613
|
+
method: "POST",
|
|
614
|
+
url: "/agents/{agent_id}/publish",
|
|
615
|
+
path: {
|
|
616
|
+
agent_id: agentId
|
|
617
|
+
},
|
|
618
|
+
query: {
|
|
619
|
+
workspace_id: workspaceId
|
|
620
|
+
},
|
|
621
|
+
errors: {
|
|
622
|
+
422: `Validation Error`
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
static discardDraft(agentId, workspaceId) {
|
|
627
|
+
return request(OpenAPI, {
|
|
628
|
+
method: "POST",
|
|
629
|
+
url: "/agents/{agent_id}/discard-draft",
|
|
630
|
+
path: {
|
|
631
|
+
agent_id: agentId
|
|
632
|
+
},
|
|
633
|
+
query: {
|
|
634
|
+
workspace_id: workspaceId
|
|
635
|
+
},
|
|
636
|
+
errors: {
|
|
637
|
+
422: `Validation Error`
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
static getAgentDiff(agentId, workspaceId) {
|
|
642
|
+
return request(OpenAPI, {
|
|
643
|
+
method: "GET",
|
|
644
|
+
url: "/agents/{agent_id}/diff",
|
|
645
|
+
path: {
|
|
646
|
+
agent_id: agentId
|
|
647
|
+
},
|
|
648
|
+
query: {
|
|
649
|
+
workspace_id: workspaceId
|
|
650
|
+
},
|
|
651
|
+
errors: {
|
|
652
|
+
422: `Validation Error`
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}
|
|
490
656
|
static getWorkspaceConversationsTotal(workspaceId) {
|
|
491
657
|
return request(OpenAPI, {
|
|
492
658
|
method: "GET",
|
|
@@ -723,6 +889,18 @@ class AdminConversationsService {
|
|
|
723
889
|
}
|
|
724
890
|
});
|
|
725
891
|
}
|
|
892
|
+
static getResearchStatus(conversationId) {
|
|
893
|
+
return request(OpenAPI, {
|
|
894
|
+
method: "GET",
|
|
895
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
896
|
+
path: {
|
|
897
|
+
conversation_id: conversationId
|
|
898
|
+
},
|
|
899
|
+
errors: {
|
|
900
|
+
422: `Validation Error`
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
}
|
|
726
904
|
}
|
|
727
905
|
var init_AdminConversationsService = __esm(() => {
|
|
728
906
|
init_OpenAPI();
|
|
@@ -1119,122 +1297,162 @@ var init_AdminMcpServersService = __esm(() => {
|
|
|
1119
1297
|
init_request();
|
|
1120
1298
|
});
|
|
1121
1299
|
|
|
1122
|
-
// src/lib/clients/agents-generator/services/
|
|
1123
|
-
class
|
|
1124
|
-
static
|
|
1300
|
+
// src/lib/clients/agents-generator/services/AdminTokenUsageService.ts
|
|
1301
|
+
class AdminTokenUsageService {
|
|
1302
|
+
static getAgentTokenUsage(agentId, startDate, endDate, skip, limit = 100) {
|
|
1125
1303
|
return request(OpenAPI, {
|
|
1126
|
-
method: "
|
|
1127
|
-
url: "/
|
|
1128
|
-
|
|
1129
|
-
|
|
1304
|
+
method: "GET",
|
|
1305
|
+
url: "/token-usage/agents/{agent_id}",
|
|
1306
|
+
path: {
|
|
1307
|
+
agent_id: agentId
|
|
1308
|
+
},
|
|
1309
|
+
query: {
|
|
1310
|
+
start_date: startDate,
|
|
1311
|
+
end_date: endDate,
|
|
1312
|
+
skip,
|
|
1313
|
+
limit
|
|
1314
|
+
},
|
|
1130
1315
|
errors: {
|
|
1131
1316
|
422: `Validation Error`
|
|
1132
1317
|
}
|
|
1133
1318
|
});
|
|
1134
1319
|
}
|
|
1135
|
-
static
|
|
1320
|
+
static getAgentTokenUsageSummary(agentId, startDate, endDate) {
|
|
1136
1321
|
return request(OpenAPI, {
|
|
1137
1322
|
method: "GET",
|
|
1138
|
-
url: "/
|
|
1323
|
+
url: "/token-usage/agents/{agent_id}/summary",
|
|
1324
|
+
path: {
|
|
1325
|
+
agent_id: agentId
|
|
1326
|
+
},
|
|
1139
1327
|
query: {
|
|
1140
|
-
|
|
1141
|
-
|
|
1328
|
+
start_date: startDate,
|
|
1329
|
+
end_date: endDate
|
|
1142
1330
|
},
|
|
1143
1331
|
errors: {
|
|
1144
1332
|
422: `Validation Error`
|
|
1145
1333
|
}
|
|
1146
1334
|
});
|
|
1147
1335
|
}
|
|
1148
|
-
static
|
|
1336
|
+
static getConversationTokenUsage(conversationId, skip, limit = 100) {
|
|
1149
1337
|
return request(OpenAPI, {
|
|
1150
1338
|
method: "GET",
|
|
1151
|
-
url: "/
|
|
1339
|
+
url: "/token-usage/conversations/{conversation_id}",
|
|
1340
|
+
path: {
|
|
1341
|
+
conversation_id: conversationId
|
|
1342
|
+
},
|
|
1343
|
+
query: {
|
|
1344
|
+
skip,
|
|
1345
|
+
limit
|
|
1346
|
+
},
|
|
1347
|
+
errors: {
|
|
1348
|
+
422: `Validation Error`
|
|
1349
|
+
}
|
|
1152
1350
|
});
|
|
1153
1351
|
}
|
|
1154
|
-
static
|
|
1352
|
+
static getConversationTokenUsageSummary(conversationId) {
|
|
1155
1353
|
return request(OpenAPI, {
|
|
1156
1354
|
method: "GET",
|
|
1157
|
-
url: "/
|
|
1355
|
+
url: "/token-usage/conversations/{conversation_id}/summary",
|
|
1158
1356
|
path: {
|
|
1159
|
-
|
|
1357
|
+
conversation_id: conversationId
|
|
1160
1358
|
},
|
|
1161
1359
|
errors: {
|
|
1162
1360
|
422: `Validation Error`
|
|
1163
1361
|
}
|
|
1164
1362
|
});
|
|
1165
1363
|
}
|
|
1166
|
-
static
|
|
1364
|
+
static getMyTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
1167
1365
|
return request(OpenAPI, {
|
|
1168
|
-
method: "
|
|
1169
|
-
url: "/
|
|
1170
|
-
|
|
1171
|
-
workspace_id: workspaceId
|
|
1366
|
+
method: "GET",
|
|
1367
|
+
url: "/token-usage/users/me",
|
|
1368
|
+
query: {
|
|
1369
|
+
workspace_id: workspaceId,
|
|
1370
|
+
start_date: startDate,
|
|
1371
|
+
end_date: endDate,
|
|
1372
|
+
skip,
|
|
1373
|
+
limit
|
|
1172
1374
|
},
|
|
1173
|
-
body: requestBody,
|
|
1174
|
-
mediaType: "application/json",
|
|
1175
1375
|
errors: {
|
|
1176
1376
|
422: `Validation Error`
|
|
1177
1377
|
}
|
|
1178
1378
|
});
|
|
1179
1379
|
}
|
|
1180
|
-
static
|
|
1380
|
+
static getMyTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
1181
1381
|
return request(OpenAPI, {
|
|
1182
|
-
method: "
|
|
1183
|
-
url: "/
|
|
1184
|
-
|
|
1185
|
-
workspace_id: workspaceId
|
|
1382
|
+
method: "GET",
|
|
1383
|
+
url: "/token-usage/users/me/summary",
|
|
1384
|
+
query: {
|
|
1385
|
+
workspace_id: workspaceId,
|
|
1386
|
+
start_date: startDate,
|
|
1387
|
+
end_date: endDate
|
|
1186
1388
|
},
|
|
1187
1389
|
errors: {
|
|
1188
1390
|
422: `Validation Error`
|
|
1189
1391
|
}
|
|
1190
1392
|
});
|
|
1191
1393
|
}
|
|
1192
|
-
static
|
|
1394
|
+
static getWorkspaceTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
1193
1395
|
return request(OpenAPI, {
|
|
1194
|
-
method: "
|
|
1195
|
-
url: "/workspaces/{workspace_id}
|
|
1396
|
+
method: "GET",
|
|
1397
|
+
url: "/token-usage/workspaces/{workspace_id}",
|
|
1196
1398
|
path: {
|
|
1197
1399
|
workspace_id: workspaceId
|
|
1198
1400
|
},
|
|
1199
|
-
|
|
1200
|
-
|
|
1401
|
+
query: {
|
|
1402
|
+
start_date: startDate,
|
|
1403
|
+
end_date: endDate,
|
|
1404
|
+
skip,
|
|
1405
|
+
limit
|
|
1406
|
+
},
|
|
1201
1407
|
errors: {
|
|
1202
1408
|
422: `Validation Error`
|
|
1203
1409
|
}
|
|
1204
1410
|
});
|
|
1205
1411
|
}
|
|
1206
|
-
static
|
|
1412
|
+
static getWorkspaceTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
1207
1413
|
return request(OpenAPI, {
|
|
1208
1414
|
method: "GET",
|
|
1209
|
-
url: "/workspaces/{workspace_id}/
|
|
1415
|
+
url: "/token-usage/workspaces/{workspace_id}/summary",
|
|
1210
1416
|
path: {
|
|
1211
1417
|
workspace_id: workspaceId
|
|
1212
1418
|
},
|
|
1419
|
+
query: {
|
|
1420
|
+
start_date: startDate,
|
|
1421
|
+
end_date: endDate
|
|
1422
|
+
},
|
|
1213
1423
|
errors: {
|
|
1214
1424
|
422: `Validation Error`
|
|
1215
1425
|
}
|
|
1216
1426
|
});
|
|
1217
1427
|
}
|
|
1218
|
-
|
|
1428
|
+
}
|
|
1429
|
+
var init_AdminTokenUsageService = __esm(() => {
|
|
1430
|
+
init_OpenAPI();
|
|
1431
|
+
init_request();
|
|
1432
|
+
});
|
|
1433
|
+
|
|
1434
|
+
// src/lib/clients/agents-generator/services/AdminWebhookConfigsService.ts
|
|
1435
|
+
class AdminWebhookConfigsService {
|
|
1436
|
+
static createWebhookConfig(requestBody, workspaceId) {
|
|
1219
1437
|
return request(OpenAPI, {
|
|
1220
|
-
method: "
|
|
1221
|
-
url: "/
|
|
1222
|
-
|
|
1223
|
-
workspace_id: workspaceId
|
|
1224
|
-
collaborator_id: collaboratorId
|
|
1438
|
+
method: "POST",
|
|
1439
|
+
url: "/webhook-configs",
|
|
1440
|
+
query: {
|
|
1441
|
+
workspace_id: workspaceId
|
|
1225
1442
|
},
|
|
1443
|
+
body: requestBody,
|
|
1444
|
+
mediaType: "application/json",
|
|
1226
1445
|
errors: {
|
|
1227
1446
|
422: `Validation Error`
|
|
1228
1447
|
}
|
|
1229
1448
|
});
|
|
1230
1449
|
}
|
|
1231
|
-
static
|
|
1450
|
+
static updateWebhookConfig(configId, requestBody) {
|
|
1232
1451
|
return request(OpenAPI, {
|
|
1233
1452
|
method: "PUT",
|
|
1234
|
-
url: "/
|
|
1453
|
+
url: "/webhook-configs/{config_id}",
|
|
1235
1454
|
path: {
|
|
1236
|
-
|
|
1237
|
-
collaborator_id: collaboratorId
|
|
1455
|
+
config_id: configId
|
|
1238
1456
|
},
|
|
1239
1457
|
body: requestBody,
|
|
1240
1458
|
mediaType: "application/json",
|
|
@@ -1243,40 +1461,30 @@ class AdminWorkspacesService {
|
|
|
1243
1461
|
}
|
|
1244
1462
|
});
|
|
1245
1463
|
}
|
|
1246
|
-
static
|
|
1464
|
+
static deleteWebhookConfig(configId) {
|
|
1247
1465
|
return request(OpenAPI, {
|
|
1248
1466
|
method: "DELETE",
|
|
1249
|
-
url: "/
|
|
1467
|
+
url: "/webhook-configs/{config_id}",
|
|
1250
1468
|
path: {
|
|
1251
|
-
|
|
1252
|
-
collaborator_id: collaboratorId
|
|
1469
|
+
config_id: configId
|
|
1253
1470
|
},
|
|
1254
1471
|
errors: {
|
|
1255
1472
|
422: `Validation Error`
|
|
1256
1473
|
}
|
|
1257
1474
|
});
|
|
1258
1475
|
}
|
|
1259
|
-
static getMyCollaborativeWorkspaces() {
|
|
1260
|
-
return request(OpenAPI, {
|
|
1261
|
-
method: "GET",
|
|
1262
|
-
url: "/workspaces/{workspace_id}/collaborators/me/workspaces"
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
1476
|
}
|
|
1266
|
-
var
|
|
1477
|
+
var init_AdminWebhookConfigsService = __esm(() => {
|
|
1267
1478
|
init_OpenAPI();
|
|
1268
1479
|
init_request();
|
|
1269
1480
|
});
|
|
1270
1481
|
|
|
1271
|
-
// src/lib/clients/agents-generator/services/
|
|
1272
|
-
class
|
|
1273
|
-
static
|
|
1482
|
+
// src/lib/clients/agents-generator/services/AdminWorkspacesService.ts
|
|
1483
|
+
class AdminWorkspacesService {
|
|
1484
|
+
static createWorkspace(requestBody) {
|
|
1274
1485
|
return request(OpenAPI, {
|
|
1275
1486
|
method: "POST",
|
|
1276
|
-
url: "/
|
|
1277
|
-
query: {
|
|
1278
|
-
workspace_id: workspaceId
|
|
1279
|
-
},
|
|
1487
|
+
url: "/workspaces",
|
|
1280
1488
|
body: requestBody,
|
|
1281
1489
|
mediaType: "application/json",
|
|
1282
1490
|
errors: {
|
|
@@ -1284,10 +1492,162 @@ class AgentService {
|
|
|
1284
1492
|
}
|
|
1285
1493
|
});
|
|
1286
1494
|
}
|
|
1287
|
-
static
|
|
1495
|
+
static getWorkspaces(skip, limit = 100) {
|
|
1288
1496
|
return request(OpenAPI, {
|
|
1289
1497
|
method: "GET",
|
|
1290
|
-
url: "/
|
|
1498
|
+
url: "/workspaces",
|
|
1499
|
+
query: {
|
|
1500
|
+
skip,
|
|
1501
|
+
limit
|
|
1502
|
+
},
|
|
1503
|
+
errors: {
|
|
1504
|
+
422: `Validation Error`
|
|
1505
|
+
}
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
static getDefaultWorkspace() {
|
|
1509
|
+
return request(OpenAPI, {
|
|
1510
|
+
method: "GET",
|
|
1511
|
+
url: "/workspaces/default"
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
static getWorkspace(workspaceId) {
|
|
1515
|
+
return request(OpenAPI, {
|
|
1516
|
+
method: "GET",
|
|
1517
|
+
url: "/workspaces/{workspace_id}",
|
|
1518
|
+
path: {
|
|
1519
|
+
workspace_id: workspaceId
|
|
1520
|
+
},
|
|
1521
|
+
errors: {
|
|
1522
|
+
422: `Validation Error`
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
static updateWorkspace(workspaceId, requestBody) {
|
|
1527
|
+
return request(OpenAPI, {
|
|
1528
|
+
method: "PUT",
|
|
1529
|
+
url: "/workspaces/{workspace_id}",
|
|
1530
|
+
path: {
|
|
1531
|
+
workspace_id: workspaceId
|
|
1532
|
+
},
|
|
1533
|
+
body: requestBody,
|
|
1534
|
+
mediaType: "application/json",
|
|
1535
|
+
errors: {
|
|
1536
|
+
422: `Validation Error`
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
static deleteWorkspace(workspaceId) {
|
|
1541
|
+
return request(OpenAPI, {
|
|
1542
|
+
method: "DELETE",
|
|
1543
|
+
url: "/workspaces/{workspace_id}",
|
|
1544
|
+
path: {
|
|
1545
|
+
workspace_id: workspaceId
|
|
1546
|
+
},
|
|
1547
|
+
errors: {
|
|
1548
|
+
422: `Validation Error`
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
static addWorkspaceCollaborator(workspaceId, requestBody) {
|
|
1553
|
+
return request(OpenAPI, {
|
|
1554
|
+
method: "POST",
|
|
1555
|
+
url: "/workspaces/{workspace_id}/collaborators",
|
|
1556
|
+
path: {
|
|
1557
|
+
workspace_id: workspaceId
|
|
1558
|
+
},
|
|
1559
|
+
body: requestBody,
|
|
1560
|
+
mediaType: "application/json",
|
|
1561
|
+
errors: {
|
|
1562
|
+
422: `Validation Error`
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
static getWorkspaceCollaborators(workspaceId) {
|
|
1567
|
+
return request(OpenAPI, {
|
|
1568
|
+
method: "GET",
|
|
1569
|
+
url: "/workspaces/{workspace_id}/collaborators",
|
|
1570
|
+
path: {
|
|
1571
|
+
workspace_id: workspaceId
|
|
1572
|
+
},
|
|
1573
|
+
errors: {
|
|
1574
|
+
422: `Validation Error`
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
static getWorkspaceCollaborator(workspaceId, collaboratorId) {
|
|
1579
|
+
return request(OpenAPI, {
|
|
1580
|
+
method: "GET",
|
|
1581
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
1582
|
+
path: {
|
|
1583
|
+
workspace_id: workspaceId,
|
|
1584
|
+
collaborator_id: collaboratorId
|
|
1585
|
+
},
|
|
1586
|
+
errors: {
|
|
1587
|
+
422: `Validation Error`
|
|
1588
|
+
}
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
static updateWorkspaceCollaborator(workspaceId, collaboratorId, requestBody) {
|
|
1592
|
+
return request(OpenAPI, {
|
|
1593
|
+
method: "PUT",
|
|
1594
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
1595
|
+
path: {
|
|
1596
|
+
workspace_id: workspaceId,
|
|
1597
|
+
collaborator_id: collaboratorId
|
|
1598
|
+
},
|
|
1599
|
+
body: requestBody,
|
|
1600
|
+
mediaType: "application/json",
|
|
1601
|
+
errors: {
|
|
1602
|
+
422: `Validation Error`
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
static deleteWorkspaceCollaborator(workspaceId, collaboratorId) {
|
|
1607
|
+
return request(OpenAPI, {
|
|
1608
|
+
method: "DELETE",
|
|
1609
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
1610
|
+
path: {
|
|
1611
|
+
workspace_id: workspaceId,
|
|
1612
|
+
collaborator_id: collaboratorId
|
|
1613
|
+
},
|
|
1614
|
+
errors: {
|
|
1615
|
+
422: `Validation Error`
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
static getMyCollaborativeWorkspaces() {
|
|
1620
|
+
return request(OpenAPI, {
|
|
1621
|
+
method: "GET",
|
|
1622
|
+
url: "/workspaces/{workspace_id}/collaborators/me/workspaces"
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
var init_AdminWorkspacesService = __esm(() => {
|
|
1627
|
+
init_OpenAPI();
|
|
1628
|
+
init_request();
|
|
1629
|
+
});
|
|
1630
|
+
|
|
1631
|
+
// src/lib/clients/agents-generator/services/AgentService.ts
|
|
1632
|
+
class AgentService {
|
|
1633
|
+
static createAgent(requestBody, workspaceId) {
|
|
1634
|
+
return request(OpenAPI, {
|
|
1635
|
+
method: "POST",
|
|
1636
|
+
url: "/agents",
|
|
1637
|
+
query: {
|
|
1638
|
+
workspace_id: workspaceId
|
|
1639
|
+
},
|
|
1640
|
+
body: requestBody,
|
|
1641
|
+
mediaType: "application/json",
|
|
1642
|
+
errors: {
|
|
1643
|
+
422: `Validation Error`
|
|
1644
|
+
}
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
static getAgents(skip, limit = 100, workspaceId) {
|
|
1648
|
+
return request(OpenAPI, {
|
|
1649
|
+
method: "GET",
|
|
1650
|
+
url: "/agents",
|
|
1291
1651
|
query: {
|
|
1292
1652
|
skip,
|
|
1293
1653
|
limit,
|
|
@@ -1345,6 +1705,51 @@ class AgentService {
|
|
|
1345
1705
|
}
|
|
1346
1706
|
});
|
|
1347
1707
|
}
|
|
1708
|
+
static publishAgent(agentId, workspaceId) {
|
|
1709
|
+
return request(OpenAPI, {
|
|
1710
|
+
method: "POST",
|
|
1711
|
+
url: "/agents/{agent_id}/publish",
|
|
1712
|
+
path: {
|
|
1713
|
+
agent_id: agentId
|
|
1714
|
+
},
|
|
1715
|
+
query: {
|
|
1716
|
+
workspace_id: workspaceId
|
|
1717
|
+
},
|
|
1718
|
+
errors: {
|
|
1719
|
+
422: `Validation Error`
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
static discardDraft(agentId, workspaceId) {
|
|
1724
|
+
return request(OpenAPI, {
|
|
1725
|
+
method: "POST",
|
|
1726
|
+
url: "/agents/{agent_id}/discard-draft",
|
|
1727
|
+
path: {
|
|
1728
|
+
agent_id: agentId
|
|
1729
|
+
},
|
|
1730
|
+
query: {
|
|
1731
|
+
workspace_id: workspaceId
|
|
1732
|
+
},
|
|
1733
|
+
errors: {
|
|
1734
|
+
422: `Validation Error`
|
|
1735
|
+
}
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
static getAgentDiff(agentId, workspaceId) {
|
|
1739
|
+
return request(OpenAPI, {
|
|
1740
|
+
method: "GET",
|
|
1741
|
+
url: "/agents/{agent_id}/diff",
|
|
1742
|
+
path: {
|
|
1743
|
+
agent_id: agentId
|
|
1744
|
+
},
|
|
1745
|
+
query: {
|
|
1746
|
+
workspace_id: workspaceId
|
|
1747
|
+
},
|
|
1748
|
+
errors: {
|
|
1749
|
+
422: `Validation Error`
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1348
1753
|
static getWorkspaceConversationsTotal(workspaceId) {
|
|
1349
1754
|
return request(OpenAPI, {
|
|
1350
1755
|
method: "GET",
|
|
@@ -1439,6 +1844,106 @@ var init_AgentService = __esm(() => {
|
|
|
1439
1844
|
init_request();
|
|
1440
1845
|
});
|
|
1441
1846
|
|
|
1847
|
+
// src/lib/clients/agents-generator/services/AgentFoldersService.ts
|
|
1848
|
+
class AgentFoldersService {
|
|
1849
|
+
static createAgentFolder(requestBody, workspaceId) {
|
|
1850
|
+
return request(OpenAPI, {
|
|
1851
|
+
method: "POST",
|
|
1852
|
+
url: "/agent-folders",
|
|
1853
|
+
query: {
|
|
1854
|
+
workspace_id: workspaceId
|
|
1855
|
+
},
|
|
1856
|
+
body: requestBody,
|
|
1857
|
+
mediaType: "application/json",
|
|
1858
|
+
errors: {
|
|
1859
|
+
422: `Validation Error`
|
|
1860
|
+
}
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
static getAgentFolders(skip, limit = 100, workspaceId) {
|
|
1864
|
+
return request(OpenAPI, {
|
|
1865
|
+
method: "GET",
|
|
1866
|
+
url: "/agent-folders",
|
|
1867
|
+
query: {
|
|
1868
|
+
skip,
|
|
1869
|
+
limit,
|
|
1870
|
+
workspace_id: workspaceId
|
|
1871
|
+
},
|
|
1872
|
+
errors: {
|
|
1873
|
+
422: `Validation Error`
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
static getAgentFolder(folderId, workspaceId) {
|
|
1878
|
+
return request(OpenAPI, {
|
|
1879
|
+
method: "GET",
|
|
1880
|
+
url: "/agent-folders/{folder_id}",
|
|
1881
|
+
path: {
|
|
1882
|
+
folder_id: folderId
|
|
1883
|
+
},
|
|
1884
|
+
query: {
|
|
1885
|
+
workspace_id: workspaceId
|
|
1886
|
+
},
|
|
1887
|
+
errors: {
|
|
1888
|
+
422: `Validation Error`
|
|
1889
|
+
}
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
static updateAgentFolder(folderId, requestBody, workspaceId) {
|
|
1893
|
+
return request(OpenAPI, {
|
|
1894
|
+
method: "PUT",
|
|
1895
|
+
url: "/agent-folders/{folder_id}",
|
|
1896
|
+
path: {
|
|
1897
|
+
folder_id: folderId
|
|
1898
|
+
},
|
|
1899
|
+
query: {
|
|
1900
|
+
workspace_id: workspaceId
|
|
1901
|
+
},
|
|
1902
|
+
body: requestBody,
|
|
1903
|
+
mediaType: "application/json",
|
|
1904
|
+
errors: {
|
|
1905
|
+
422: `Validation Error`
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
static deleteAgentFolder(folderId, workspaceId) {
|
|
1910
|
+
return request(OpenAPI, {
|
|
1911
|
+
method: "DELETE",
|
|
1912
|
+
url: "/agent-folders/{folder_id}",
|
|
1913
|
+
path: {
|
|
1914
|
+
folder_id: folderId
|
|
1915
|
+
},
|
|
1916
|
+
query: {
|
|
1917
|
+
workspace_id: workspaceId
|
|
1918
|
+
},
|
|
1919
|
+
errors: {
|
|
1920
|
+
422: `Validation Error`
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1924
|
+
static assignAgentToFolder(agentId, requestBody, workspaceId) {
|
|
1925
|
+
return request(OpenAPI, {
|
|
1926
|
+
method: "PUT",
|
|
1927
|
+
url: "/agent-folders/assign/{agent_id}",
|
|
1928
|
+
path: {
|
|
1929
|
+
agent_id: agentId
|
|
1930
|
+
},
|
|
1931
|
+
query: {
|
|
1932
|
+
workspace_id: workspaceId
|
|
1933
|
+
},
|
|
1934
|
+
body: requestBody,
|
|
1935
|
+
mediaType: "application/json",
|
|
1936
|
+
errors: {
|
|
1937
|
+
422: `Validation Error`
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
var init_AgentFoldersService = __esm(() => {
|
|
1943
|
+
init_OpenAPI();
|
|
1944
|
+
init_request();
|
|
1945
|
+
});
|
|
1946
|
+
|
|
1442
1947
|
// src/lib/clients/agents-generator/services/ConversationsService.ts
|
|
1443
1948
|
class ConversationsService {
|
|
1444
1949
|
static createConversation(requestBody) {
|
|
@@ -1506,7 +2011,7 @@ class ConversationsService {
|
|
|
1506
2011
|
}
|
|
1507
2012
|
});
|
|
1508
2013
|
}
|
|
1509
|
-
static addMessage(conversationId, requestBody, accept) {
|
|
2014
|
+
static addMessage(conversationId, requestBody, useDraft = false, accept) {
|
|
1510
2015
|
return request(OpenAPI, {
|
|
1511
2016
|
method: "POST",
|
|
1512
2017
|
url: "/conversations/{conversation_id}/messages",
|
|
@@ -1516,6 +2021,9 @@ class ConversationsService {
|
|
|
1516
2021
|
headers: {
|
|
1517
2022
|
accept
|
|
1518
2023
|
},
|
|
2024
|
+
query: {
|
|
2025
|
+
use_draft: useDraft
|
|
2026
|
+
},
|
|
1519
2027
|
body: requestBody,
|
|
1520
2028
|
mediaType: "application/json",
|
|
1521
2029
|
errors: {
|
|
@@ -1525,6 +2033,18 @@ class ConversationsService {
|
|
|
1525
2033
|
}
|
|
1526
2034
|
});
|
|
1527
2035
|
}
|
|
2036
|
+
static getResearchStatus(conversationId) {
|
|
2037
|
+
return request(OpenAPI, {
|
|
2038
|
+
method: "GET",
|
|
2039
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
2040
|
+
path: {
|
|
2041
|
+
conversation_id: conversationId
|
|
2042
|
+
},
|
|
2043
|
+
errors: {
|
|
2044
|
+
422: `Validation Error`
|
|
2045
|
+
}
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
1528
2048
|
}
|
|
1529
2049
|
var init_ConversationsService = __esm(() => {
|
|
1530
2050
|
init_OpenAPI();
|
|
@@ -2063,7 +2583,7 @@ class PublicConversationsService {
|
|
|
2063
2583
|
}
|
|
2064
2584
|
});
|
|
2065
2585
|
}
|
|
2066
|
-
static addMessage(conversationId, requestBody, accept) {
|
|
2586
|
+
static addMessage(conversationId, requestBody, useDraft = false, accept) {
|
|
2067
2587
|
return request(OpenAPI, {
|
|
2068
2588
|
method: "POST",
|
|
2069
2589
|
url: "/conversations/{conversation_id}/messages",
|
|
@@ -2073,6 +2593,9 @@ class PublicConversationsService {
|
|
|
2073
2593
|
headers: {
|
|
2074
2594
|
accept
|
|
2075
2595
|
},
|
|
2596
|
+
query: {
|
|
2597
|
+
use_draft: useDraft
|
|
2598
|
+
},
|
|
2076
2599
|
body: requestBody,
|
|
2077
2600
|
mediaType: "application/json",
|
|
2078
2601
|
errors: {
|
|
@@ -2082,6 +2605,18 @@ class PublicConversationsService {
|
|
|
2082
2605
|
}
|
|
2083
2606
|
});
|
|
2084
2607
|
}
|
|
2608
|
+
static getResearchStatus(conversationId) {
|
|
2609
|
+
return request(OpenAPI, {
|
|
2610
|
+
method: "GET",
|
|
2611
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
2612
|
+
path: {
|
|
2613
|
+
conversation_id: conversationId
|
|
2614
|
+
},
|
|
2615
|
+
errors: {
|
|
2616
|
+
422: `Validation Error`
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
}
|
|
2085
2620
|
}
|
|
2086
2621
|
var init_PublicConversationsService = __esm(() => {
|
|
2087
2622
|
init_OpenAPI();
|
|
@@ -2127,6 +2662,246 @@ var init_SchemaGeneratorService = __esm(() => {
|
|
|
2127
2662
|
init_request();
|
|
2128
2663
|
});
|
|
2129
2664
|
|
|
2665
|
+
// src/lib/clients/agents-generator/services/TokenUsageService.ts
|
|
2666
|
+
class TokenUsageService {
|
|
2667
|
+
static getAgentTokenUsage(agentId, startDate, endDate, skip, limit = 100) {
|
|
2668
|
+
return request(OpenAPI, {
|
|
2669
|
+
method: "GET",
|
|
2670
|
+
url: "/token-usage/agents/{agent_id}",
|
|
2671
|
+
path: {
|
|
2672
|
+
agent_id: agentId
|
|
2673
|
+
},
|
|
2674
|
+
query: {
|
|
2675
|
+
start_date: startDate,
|
|
2676
|
+
end_date: endDate,
|
|
2677
|
+
skip,
|
|
2678
|
+
limit
|
|
2679
|
+
},
|
|
2680
|
+
errors: {
|
|
2681
|
+
422: `Validation Error`
|
|
2682
|
+
}
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
static getAgentTokenUsageSummary(agentId, startDate, endDate) {
|
|
2686
|
+
return request(OpenAPI, {
|
|
2687
|
+
method: "GET",
|
|
2688
|
+
url: "/token-usage/agents/{agent_id}/summary",
|
|
2689
|
+
path: {
|
|
2690
|
+
agent_id: agentId
|
|
2691
|
+
},
|
|
2692
|
+
query: {
|
|
2693
|
+
start_date: startDate,
|
|
2694
|
+
end_date: endDate
|
|
2695
|
+
},
|
|
2696
|
+
errors: {
|
|
2697
|
+
422: `Validation Error`
|
|
2698
|
+
}
|
|
2699
|
+
});
|
|
2700
|
+
}
|
|
2701
|
+
static getConversationTokenUsage(conversationId, skip, limit = 100) {
|
|
2702
|
+
return request(OpenAPI, {
|
|
2703
|
+
method: "GET",
|
|
2704
|
+
url: "/token-usage/conversations/{conversation_id}",
|
|
2705
|
+
path: {
|
|
2706
|
+
conversation_id: conversationId
|
|
2707
|
+
},
|
|
2708
|
+
query: {
|
|
2709
|
+
skip,
|
|
2710
|
+
limit
|
|
2711
|
+
},
|
|
2712
|
+
errors: {
|
|
2713
|
+
422: `Validation Error`
|
|
2714
|
+
}
|
|
2715
|
+
});
|
|
2716
|
+
}
|
|
2717
|
+
static getConversationTokenUsageSummary(conversationId) {
|
|
2718
|
+
return request(OpenAPI, {
|
|
2719
|
+
method: "GET",
|
|
2720
|
+
url: "/token-usage/conversations/{conversation_id}/summary",
|
|
2721
|
+
path: {
|
|
2722
|
+
conversation_id: conversationId
|
|
2723
|
+
},
|
|
2724
|
+
errors: {
|
|
2725
|
+
422: `Validation Error`
|
|
2726
|
+
}
|
|
2727
|
+
});
|
|
2728
|
+
}
|
|
2729
|
+
static getMyTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
2730
|
+
return request(OpenAPI, {
|
|
2731
|
+
method: "GET",
|
|
2732
|
+
url: "/token-usage/users/me",
|
|
2733
|
+
query: {
|
|
2734
|
+
workspace_id: workspaceId,
|
|
2735
|
+
start_date: startDate,
|
|
2736
|
+
end_date: endDate,
|
|
2737
|
+
skip,
|
|
2738
|
+
limit
|
|
2739
|
+
},
|
|
2740
|
+
errors: {
|
|
2741
|
+
422: `Validation Error`
|
|
2742
|
+
}
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2745
|
+
static getMyTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
2746
|
+
return request(OpenAPI, {
|
|
2747
|
+
method: "GET",
|
|
2748
|
+
url: "/token-usage/users/me/summary",
|
|
2749
|
+
query: {
|
|
2750
|
+
workspace_id: workspaceId,
|
|
2751
|
+
start_date: startDate,
|
|
2752
|
+
end_date: endDate
|
|
2753
|
+
},
|
|
2754
|
+
errors: {
|
|
2755
|
+
422: `Validation Error`
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
static getWorkspaceTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
2760
|
+
return request(OpenAPI, {
|
|
2761
|
+
method: "GET",
|
|
2762
|
+
url: "/token-usage/workspaces/{workspace_id}",
|
|
2763
|
+
path: {
|
|
2764
|
+
workspace_id: workspaceId
|
|
2765
|
+
},
|
|
2766
|
+
query: {
|
|
2767
|
+
start_date: startDate,
|
|
2768
|
+
end_date: endDate,
|
|
2769
|
+
skip,
|
|
2770
|
+
limit
|
|
2771
|
+
},
|
|
2772
|
+
errors: {
|
|
2773
|
+
422: `Validation Error`
|
|
2774
|
+
}
|
|
2775
|
+
});
|
|
2776
|
+
}
|
|
2777
|
+
static getWorkspaceTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
2778
|
+
return request(OpenAPI, {
|
|
2779
|
+
method: "GET",
|
|
2780
|
+
url: "/token-usage/workspaces/{workspace_id}/summary",
|
|
2781
|
+
path: {
|
|
2782
|
+
workspace_id: workspaceId
|
|
2783
|
+
},
|
|
2784
|
+
query: {
|
|
2785
|
+
start_date: startDate,
|
|
2786
|
+
end_date: endDate
|
|
2787
|
+
},
|
|
2788
|
+
errors: {
|
|
2789
|
+
422: `Validation Error`
|
|
2790
|
+
}
|
|
2791
|
+
});
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
var init_TokenUsageService = __esm(() => {
|
|
2795
|
+
init_OpenAPI();
|
|
2796
|
+
init_request();
|
|
2797
|
+
});
|
|
2798
|
+
|
|
2799
|
+
// src/lib/clients/agents-generator/services/WebhookConfigsService.ts
|
|
2800
|
+
class WebhookConfigsService {
|
|
2801
|
+
static createWebhookConfig(requestBody, workspaceId) {
|
|
2802
|
+
return request(OpenAPI, {
|
|
2803
|
+
method: "POST",
|
|
2804
|
+
url: "/webhook-configs",
|
|
2805
|
+
query: {
|
|
2806
|
+
workspace_id: workspaceId
|
|
2807
|
+
},
|
|
2808
|
+
body: requestBody,
|
|
2809
|
+
mediaType: "application/json",
|
|
2810
|
+
errors: {
|
|
2811
|
+
422: `Validation Error`
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2815
|
+
static listWebhookConfigs(workspaceId) {
|
|
2816
|
+
return request(OpenAPI, {
|
|
2817
|
+
method: "GET",
|
|
2818
|
+
url: "/webhook-configs",
|
|
2819
|
+
query: {
|
|
2820
|
+
workspace_id: workspaceId
|
|
2821
|
+
},
|
|
2822
|
+
errors: {
|
|
2823
|
+
422: `Validation Error`
|
|
2824
|
+
}
|
|
2825
|
+
});
|
|
2826
|
+
}
|
|
2827
|
+
static listWebhookEvents(workspaceId, limit = 50, offset) {
|
|
2828
|
+
return request(OpenAPI, {
|
|
2829
|
+
method: "GET",
|
|
2830
|
+
url: "/webhook-configs/events",
|
|
2831
|
+
query: {
|
|
2832
|
+
workspace_id: workspaceId,
|
|
2833
|
+
limit,
|
|
2834
|
+
offset
|
|
2835
|
+
},
|
|
2836
|
+
errors: {
|
|
2837
|
+
422: `Validation Error`
|
|
2838
|
+
}
|
|
2839
|
+
});
|
|
2840
|
+
}
|
|
2841
|
+
static getWebhookConfig(configId) {
|
|
2842
|
+
return request(OpenAPI, {
|
|
2843
|
+
method: "GET",
|
|
2844
|
+
url: "/webhook-configs/{config_id}",
|
|
2845
|
+
path: {
|
|
2846
|
+
config_id: configId
|
|
2847
|
+
},
|
|
2848
|
+
errors: {
|
|
2849
|
+
422: `Validation Error`
|
|
2850
|
+
}
|
|
2851
|
+
});
|
|
2852
|
+
}
|
|
2853
|
+
static updateWebhookConfig(configId, requestBody) {
|
|
2854
|
+
return request(OpenAPI, {
|
|
2855
|
+
method: "PUT",
|
|
2856
|
+
url: "/webhook-configs/{config_id}",
|
|
2857
|
+
path: {
|
|
2858
|
+
config_id: configId
|
|
2859
|
+
},
|
|
2860
|
+
body: requestBody,
|
|
2861
|
+
mediaType: "application/json",
|
|
2862
|
+
errors: {
|
|
2863
|
+
422: `Validation Error`
|
|
2864
|
+
}
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2867
|
+
static deleteWebhookConfig(configId) {
|
|
2868
|
+
return request(OpenAPI, {
|
|
2869
|
+
method: "DELETE",
|
|
2870
|
+
url: "/webhook-configs/{config_id}",
|
|
2871
|
+
path: {
|
|
2872
|
+
config_id: configId
|
|
2873
|
+
},
|
|
2874
|
+
errors: {
|
|
2875
|
+
422: `Validation Error`
|
|
2876
|
+
}
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
var init_WebhookConfigsService = __esm(() => {
|
|
2881
|
+
init_OpenAPI();
|
|
2882
|
+
init_request();
|
|
2883
|
+
});
|
|
2884
|
+
|
|
2885
|
+
// src/lib/clients/agents-generator/services/WebhooksService.ts
|
|
2886
|
+
class WebhooksService {
|
|
2887
|
+
static receiveOpenaiWebhookWebhooksOpenaiWorkspaceIdPost(workspaceId) {
|
|
2888
|
+
return request(OpenAPI, {
|
|
2889
|
+
method: "POST",
|
|
2890
|
+
url: "/webhooks/openai/{workspace_id}",
|
|
2891
|
+
path: {
|
|
2892
|
+
workspace_id: workspaceId
|
|
2893
|
+
},
|
|
2894
|
+
errors: {
|
|
2895
|
+
422: `Validation Error`
|
|
2896
|
+
}
|
|
2897
|
+
});
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
var init_WebhooksService = __esm(() => {
|
|
2901
|
+
init_OpenAPI();
|
|
2902
|
+
init_request();
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2130
2905
|
// src/lib/clients/agents-generator/services/WorkspaceCollaboratorsService.ts
|
|
2131
2906
|
class WorkspaceCollaboratorsService {
|
|
2132
2907
|
static addWorkspaceCollaborator(workspaceId, requestBody) {
|
|
@@ -2290,14 +3065,18 @@ var init_agents_generator = __esm(() => {
|
|
|
2290
3065
|
init_CancelablePromise();
|
|
2291
3066
|
init_OpenAPI();
|
|
2292
3067
|
init_CollaboratorRole();
|
|
3068
|
+
init_AdminAgentFoldersService();
|
|
2293
3069
|
init_AdminAgentsService();
|
|
2294
3070
|
init_AdminApiKeysService();
|
|
2295
3071
|
init_AdminConversationsService();
|
|
2296
3072
|
init_AdminCredentialsService();
|
|
2297
3073
|
init_AdminFileLibraryService();
|
|
2298
3074
|
init_AdminMcpServersService();
|
|
3075
|
+
init_AdminTokenUsageService();
|
|
3076
|
+
init_AdminWebhookConfigsService();
|
|
2299
3077
|
init_AdminWorkspacesService();
|
|
2300
3078
|
init_AgentService();
|
|
3079
|
+
init_AgentFoldersService();
|
|
2301
3080
|
init_ConversationsService();
|
|
2302
3081
|
init_CredentialsService();
|
|
2303
3082
|
init_FileLibraryService();
|
|
@@ -2308,6 +3087,9 @@ var init_agents_generator = __esm(() => {
|
|
|
2308
3087
|
init_PublicConversationsService();
|
|
2309
3088
|
init_RootService();
|
|
2310
3089
|
init_SchemaGeneratorService();
|
|
3090
|
+
init_TokenUsageService();
|
|
3091
|
+
init_WebhookConfigsService();
|
|
3092
|
+
init_WebhooksService();
|
|
2311
3093
|
init_WorkspaceCollaboratorsService();
|
|
2312
3094
|
init_WorkspacesService();
|
|
2313
3095
|
});
|
|
@@ -2353,7 +3135,8 @@ class AgentClient {
|
|
|
2353
3135
|
collaborators: WorkspaceCollaboratorsService,
|
|
2354
3136
|
apiKeys: AdminApiKeysService,
|
|
2355
3137
|
presence: PresenceService,
|
|
2356
|
-
schema: SchemaGeneratorService
|
|
3138
|
+
schema: SchemaGeneratorService,
|
|
3139
|
+
tokenUsage: TokenUsageService
|
|
2357
3140
|
};
|
|
2358
3141
|
this.public = {
|
|
2359
3142
|
agents: PublicAgentsService,
|
|
@@ -2609,6 +3392,9 @@ var exports_src = {};
|
|
|
2609
3392
|
__export(exports_src, {
|
|
2610
3393
|
WorkspacesService: () => WorkspacesService,
|
|
2611
3394
|
WorkspaceCollaboratorsService: () => WorkspaceCollaboratorsService,
|
|
3395
|
+
WebhooksService: () => WebhooksService,
|
|
3396
|
+
WebhookConfigsService: () => WebhookConfigsService,
|
|
3397
|
+
TokenUsageService: () => TokenUsageService,
|
|
2612
3398
|
SchemaGeneratorService: () => SchemaGeneratorService,
|
|
2613
3399
|
RootService: () => RootService,
|
|
2614
3400
|
PublicConversationsService: () => PublicConversationsService,
|
|
@@ -2625,14 +3411,18 @@ __export(exports_src, {
|
|
|
2625
3411
|
CancelError: () => CancelError,
|
|
2626
3412
|
ApiError: () => ApiError,
|
|
2627
3413
|
AgentService: () => AgentService,
|
|
3414
|
+
AgentFoldersService: () => AgentFoldersService,
|
|
2628
3415
|
AgentClient: () => AgentClient,
|
|
2629
3416
|
AdminWorkspacesService: () => AdminWorkspacesService,
|
|
3417
|
+
AdminWebhookConfigsService: () => AdminWebhookConfigsService,
|
|
3418
|
+
AdminTokenUsageService: () => AdminTokenUsageService,
|
|
2630
3419
|
AdminMcpServersService: () => AdminMcpServersService,
|
|
2631
3420
|
AdminFileLibraryService: () => AdminFileLibraryService,
|
|
2632
3421
|
AdminCredentialsService: () => AdminCredentialsService,
|
|
2633
3422
|
AdminConversationsService: () => AdminConversationsService,
|
|
2634
3423
|
AdminApiKeysService: () => AdminApiKeysService,
|
|
2635
|
-
AdminAgentsService: () => AdminAgentsService
|
|
3424
|
+
AdminAgentsService: () => AdminAgentsService,
|
|
3425
|
+
AdminAgentFoldersService: () => AdminAgentFoldersService
|
|
2636
3426
|
});
|
|
2637
3427
|
module.exports = __toCommonJS(exports_src);
|
|
2638
3428
|
init_lib();
|