@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/bin/cli.js
CHANGED
|
@@ -5,39 +5,60 @@ var __defProp = Object.defineProperty;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
33
|
var __toCommonJS = (from) => {
|
|
21
|
-
var entry = __moduleCache.get(from), desc;
|
|
34
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
22
35
|
if (entry)
|
|
23
36
|
return entry;
|
|
24
37
|
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (var key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(entry, key))
|
|
41
|
+
__defProp(entry, key, {
|
|
42
|
+
get: __accessProp.bind(from, key),
|
|
43
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
44
|
+
});
|
|
45
|
+
}
|
|
30
46
|
__moduleCache.set(from, entry);
|
|
31
47
|
return entry;
|
|
32
48
|
};
|
|
49
|
+
var __moduleCache;
|
|
33
50
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
51
|
+
var __returnValue = (v) => v;
|
|
52
|
+
function __exportSetter(name, newValue) {
|
|
53
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
54
|
+
}
|
|
34
55
|
var __export = (target, all) => {
|
|
35
56
|
for (var name in all)
|
|
36
57
|
__defProp(target, name, {
|
|
37
58
|
get: all[name],
|
|
38
59
|
enumerable: true,
|
|
39
60
|
configurable: true,
|
|
40
|
-
set: (
|
|
61
|
+
set: __exportSetter.bind(all, name)
|
|
41
62
|
});
|
|
42
63
|
};
|
|
43
64
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -598,7 +619,7 @@ var OpenAPI;
|
|
|
598
619
|
var init_OpenAPI = __esm(() => {
|
|
599
620
|
OpenAPI = {
|
|
600
621
|
BASE: "",
|
|
601
|
-
VERSION: "main-
|
|
622
|
+
VERSION: "main-8acda2a920b73ea6f20e54f68ace024752e2d8ff",
|
|
602
623
|
WITH_CREDENTIALS: false,
|
|
603
624
|
CREDENTIALS: "include",
|
|
604
625
|
TOKEN: undefined,
|
|
@@ -842,6 +863,106 @@ var init_request = __esm(() => {
|
|
|
842
863
|
init_CancelablePromise();
|
|
843
864
|
});
|
|
844
865
|
|
|
866
|
+
// src/lib/clients/agents-generator/services/AdminAgentFoldersService.ts
|
|
867
|
+
class AdminAgentFoldersService {
|
|
868
|
+
static createAgentFolder(requestBody, workspaceId) {
|
|
869
|
+
return request(OpenAPI, {
|
|
870
|
+
method: "POST",
|
|
871
|
+
url: "/agent-folders",
|
|
872
|
+
query: {
|
|
873
|
+
workspace_id: workspaceId
|
|
874
|
+
},
|
|
875
|
+
body: requestBody,
|
|
876
|
+
mediaType: "application/json",
|
|
877
|
+
errors: {
|
|
878
|
+
422: `Validation Error`
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
static getAgentFolders(skip, limit = 100, workspaceId) {
|
|
883
|
+
return request(OpenAPI, {
|
|
884
|
+
method: "GET",
|
|
885
|
+
url: "/agent-folders",
|
|
886
|
+
query: {
|
|
887
|
+
skip,
|
|
888
|
+
limit,
|
|
889
|
+
workspace_id: workspaceId
|
|
890
|
+
},
|
|
891
|
+
errors: {
|
|
892
|
+
422: `Validation Error`
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
static getAgentFolder(folderId, workspaceId) {
|
|
897
|
+
return request(OpenAPI, {
|
|
898
|
+
method: "GET",
|
|
899
|
+
url: "/agent-folders/{folder_id}",
|
|
900
|
+
path: {
|
|
901
|
+
folder_id: folderId
|
|
902
|
+
},
|
|
903
|
+
query: {
|
|
904
|
+
workspace_id: workspaceId
|
|
905
|
+
},
|
|
906
|
+
errors: {
|
|
907
|
+
422: `Validation Error`
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
static updateAgentFolder(folderId, requestBody, workspaceId) {
|
|
912
|
+
return request(OpenAPI, {
|
|
913
|
+
method: "PUT",
|
|
914
|
+
url: "/agent-folders/{folder_id}",
|
|
915
|
+
path: {
|
|
916
|
+
folder_id: folderId
|
|
917
|
+
},
|
|
918
|
+
query: {
|
|
919
|
+
workspace_id: workspaceId
|
|
920
|
+
},
|
|
921
|
+
body: requestBody,
|
|
922
|
+
mediaType: "application/json",
|
|
923
|
+
errors: {
|
|
924
|
+
422: `Validation Error`
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
static deleteAgentFolder(folderId, workspaceId) {
|
|
929
|
+
return request(OpenAPI, {
|
|
930
|
+
method: "DELETE",
|
|
931
|
+
url: "/agent-folders/{folder_id}",
|
|
932
|
+
path: {
|
|
933
|
+
folder_id: folderId
|
|
934
|
+
},
|
|
935
|
+
query: {
|
|
936
|
+
workspace_id: workspaceId
|
|
937
|
+
},
|
|
938
|
+
errors: {
|
|
939
|
+
422: `Validation Error`
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
static assignAgentToFolder(agentId, requestBody, workspaceId) {
|
|
944
|
+
return request(OpenAPI, {
|
|
945
|
+
method: "PUT",
|
|
946
|
+
url: "/agent-folders/assign/{agent_id}",
|
|
947
|
+
path: {
|
|
948
|
+
agent_id: agentId
|
|
949
|
+
},
|
|
950
|
+
query: {
|
|
951
|
+
workspace_id: workspaceId
|
|
952
|
+
},
|
|
953
|
+
body: requestBody,
|
|
954
|
+
mediaType: "application/json",
|
|
955
|
+
errors: {
|
|
956
|
+
422: `Validation Error`
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
var init_AdminAgentFoldersService = __esm(() => {
|
|
962
|
+
init_OpenAPI();
|
|
963
|
+
init_request();
|
|
964
|
+
});
|
|
965
|
+
|
|
845
966
|
// src/lib/clients/agents-generator/services/AdminAgentsService.ts
|
|
846
967
|
class AdminAgentsService {
|
|
847
968
|
static createAgent(requestBody, workspaceId) {
|
|
@@ -919,6 +1040,51 @@ class AdminAgentsService {
|
|
|
919
1040
|
}
|
|
920
1041
|
});
|
|
921
1042
|
}
|
|
1043
|
+
static publishAgent(agentId, workspaceId) {
|
|
1044
|
+
return request(OpenAPI, {
|
|
1045
|
+
method: "POST",
|
|
1046
|
+
url: "/agents/{agent_id}/publish",
|
|
1047
|
+
path: {
|
|
1048
|
+
agent_id: agentId
|
|
1049
|
+
},
|
|
1050
|
+
query: {
|
|
1051
|
+
workspace_id: workspaceId
|
|
1052
|
+
},
|
|
1053
|
+
errors: {
|
|
1054
|
+
422: `Validation Error`
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
static discardDraft(agentId, workspaceId) {
|
|
1059
|
+
return request(OpenAPI, {
|
|
1060
|
+
method: "POST",
|
|
1061
|
+
url: "/agents/{agent_id}/discard-draft",
|
|
1062
|
+
path: {
|
|
1063
|
+
agent_id: agentId
|
|
1064
|
+
},
|
|
1065
|
+
query: {
|
|
1066
|
+
workspace_id: workspaceId
|
|
1067
|
+
},
|
|
1068
|
+
errors: {
|
|
1069
|
+
422: `Validation Error`
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
static getAgentDiff(agentId, workspaceId) {
|
|
1074
|
+
return request(OpenAPI, {
|
|
1075
|
+
method: "GET",
|
|
1076
|
+
url: "/agents/{agent_id}/diff",
|
|
1077
|
+
path: {
|
|
1078
|
+
agent_id: agentId
|
|
1079
|
+
},
|
|
1080
|
+
query: {
|
|
1081
|
+
workspace_id: workspaceId
|
|
1082
|
+
},
|
|
1083
|
+
errors: {
|
|
1084
|
+
422: `Validation Error`
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
922
1088
|
static getWorkspaceConversationsTotal(workspaceId) {
|
|
923
1089
|
return request(OpenAPI, {
|
|
924
1090
|
method: "GET",
|
|
@@ -1155,6 +1321,18 @@ class AdminConversationsService {
|
|
|
1155
1321
|
}
|
|
1156
1322
|
});
|
|
1157
1323
|
}
|
|
1324
|
+
static getResearchStatus(conversationId) {
|
|
1325
|
+
return request(OpenAPI, {
|
|
1326
|
+
method: "GET",
|
|
1327
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
1328
|
+
path: {
|
|
1329
|
+
conversation_id: conversationId
|
|
1330
|
+
},
|
|
1331
|
+
errors: {
|
|
1332
|
+
422: `Validation Error`
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1158
1336
|
}
|
|
1159
1337
|
var init_AdminConversationsService = __esm(() => {
|
|
1160
1338
|
init_OpenAPI();
|
|
@@ -1551,122 +1729,162 @@ var init_AdminMcpServersService = __esm(() => {
|
|
|
1551
1729
|
init_request();
|
|
1552
1730
|
});
|
|
1553
1731
|
|
|
1554
|
-
// src/lib/clients/agents-generator/services/
|
|
1555
|
-
class
|
|
1556
|
-
static
|
|
1732
|
+
// src/lib/clients/agents-generator/services/AdminTokenUsageService.ts
|
|
1733
|
+
class AdminTokenUsageService {
|
|
1734
|
+
static getAgentTokenUsage(agentId, startDate, endDate, skip, limit = 100) {
|
|
1557
1735
|
return request(OpenAPI, {
|
|
1558
|
-
method: "
|
|
1559
|
-
url: "/
|
|
1560
|
-
|
|
1561
|
-
|
|
1736
|
+
method: "GET",
|
|
1737
|
+
url: "/token-usage/agents/{agent_id}",
|
|
1738
|
+
path: {
|
|
1739
|
+
agent_id: agentId
|
|
1740
|
+
},
|
|
1741
|
+
query: {
|
|
1742
|
+
start_date: startDate,
|
|
1743
|
+
end_date: endDate,
|
|
1744
|
+
skip,
|
|
1745
|
+
limit
|
|
1746
|
+
},
|
|
1562
1747
|
errors: {
|
|
1563
1748
|
422: `Validation Error`
|
|
1564
1749
|
}
|
|
1565
1750
|
});
|
|
1566
1751
|
}
|
|
1567
|
-
static
|
|
1752
|
+
static getAgentTokenUsageSummary(agentId, startDate, endDate) {
|
|
1568
1753
|
return request(OpenAPI, {
|
|
1569
1754
|
method: "GET",
|
|
1570
|
-
url: "/
|
|
1755
|
+
url: "/token-usage/agents/{agent_id}/summary",
|
|
1756
|
+
path: {
|
|
1757
|
+
agent_id: agentId
|
|
1758
|
+
},
|
|
1571
1759
|
query: {
|
|
1572
|
-
|
|
1573
|
-
|
|
1760
|
+
start_date: startDate,
|
|
1761
|
+
end_date: endDate
|
|
1574
1762
|
},
|
|
1575
1763
|
errors: {
|
|
1576
1764
|
422: `Validation Error`
|
|
1577
1765
|
}
|
|
1578
1766
|
});
|
|
1579
1767
|
}
|
|
1580
|
-
static
|
|
1768
|
+
static getConversationTokenUsage(conversationId, skip, limit = 100) {
|
|
1581
1769
|
return request(OpenAPI, {
|
|
1582
1770
|
method: "GET",
|
|
1583
|
-
url: "/
|
|
1771
|
+
url: "/token-usage/conversations/{conversation_id}",
|
|
1772
|
+
path: {
|
|
1773
|
+
conversation_id: conversationId
|
|
1774
|
+
},
|
|
1775
|
+
query: {
|
|
1776
|
+
skip,
|
|
1777
|
+
limit
|
|
1778
|
+
},
|
|
1779
|
+
errors: {
|
|
1780
|
+
422: `Validation Error`
|
|
1781
|
+
}
|
|
1584
1782
|
});
|
|
1585
1783
|
}
|
|
1586
|
-
static
|
|
1784
|
+
static getConversationTokenUsageSummary(conversationId) {
|
|
1587
1785
|
return request(OpenAPI, {
|
|
1588
1786
|
method: "GET",
|
|
1589
|
-
url: "/
|
|
1787
|
+
url: "/token-usage/conversations/{conversation_id}/summary",
|
|
1590
1788
|
path: {
|
|
1591
|
-
|
|
1789
|
+
conversation_id: conversationId
|
|
1592
1790
|
},
|
|
1593
1791
|
errors: {
|
|
1594
1792
|
422: `Validation Error`
|
|
1595
1793
|
}
|
|
1596
1794
|
});
|
|
1597
1795
|
}
|
|
1598
|
-
static
|
|
1796
|
+
static getMyTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
1599
1797
|
return request(OpenAPI, {
|
|
1600
|
-
method: "
|
|
1601
|
-
url: "/
|
|
1602
|
-
|
|
1603
|
-
workspace_id: workspaceId
|
|
1798
|
+
method: "GET",
|
|
1799
|
+
url: "/token-usage/users/me",
|
|
1800
|
+
query: {
|
|
1801
|
+
workspace_id: workspaceId,
|
|
1802
|
+
start_date: startDate,
|
|
1803
|
+
end_date: endDate,
|
|
1804
|
+
skip,
|
|
1805
|
+
limit
|
|
1604
1806
|
},
|
|
1605
|
-
body: requestBody,
|
|
1606
|
-
mediaType: "application/json",
|
|
1607
1807
|
errors: {
|
|
1608
1808
|
422: `Validation Error`
|
|
1609
1809
|
}
|
|
1610
1810
|
});
|
|
1611
1811
|
}
|
|
1612
|
-
static
|
|
1812
|
+
static getMyTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
1613
1813
|
return request(OpenAPI, {
|
|
1614
|
-
method: "
|
|
1615
|
-
url: "/
|
|
1616
|
-
|
|
1617
|
-
workspace_id: workspaceId
|
|
1814
|
+
method: "GET",
|
|
1815
|
+
url: "/token-usage/users/me/summary",
|
|
1816
|
+
query: {
|
|
1817
|
+
workspace_id: workspaceId,
|
|
1818
|
+
start_date: startDate,
|
|
1819
|
+
end_date: endDate
|
|
1618
1820
|
},
|
|
1619
1821
|
errors: {
|
|
1620
1822
|
422: `Validation Error`
|
|
1621
1823
|
}
|
|
1622
1824
|
});
|
|
1623
1825
|
}
|
|
1624
|
-
static
|
|
1826
|
+
static getWorkspaceTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
1625
1827
|
return request(OpenAPI, {
|
|
1626
|
-
method: "
|
|
1627
|
-
url: "/workspaces/{workspace_id}
|
|
1828
|
+
method: "GET",
|
|
1829
|
+
url: "/token-usage/workspaces/{workspace_id}",
|
|
1628
1830
|
path: {
|
|
1629
1831
|
workspace_id: workspaceId
|
|
1630
1832
|
},
|
|
1631
|
-
|
|
1632
|
-
|
|
1833
|
+
query: {
|
|
1834
|
+
start_date: startDate,
|
|
1835
|
+
end_date: endDate,
|
|
1836
|
+
skip,
|
|
1837
|
+
limit
|
|
1838
|
+
},
|
|
1633
1839
|
errors: {
|
|
1634
1840
|
422: `Validation Error`
|
|
1635
1841
|
}
|
|
1636
1842
|
});
|
|
1637
1843
|
}
|
|
1638
|
-
static
|
|
1844
|
+
static getWorkspaceTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
1639
1845
|
return request(OpenAPI, {
|
|
1640
1846
|
method: "GET",
|
|
1641
|
-
url: "/workspaces/{workspace_id}/
|
|
1847
|
+
url: "/token-usage/workspaces/{workspace_id}/summary",
|
|
1642
1848
|
path: {
|
|
1643
1849
|
workspace_id: workspaceId
|
|
1644
1850
|
},
|
|
1851
|
+
query: {
|
|
1852
|
+
start_date: startDate,
|
|
1853
|
+
end_date: endDate
|
|
1854
|
+
},
|
|
1645
1855
|
errors: {
|
|
1646
1856
|
422: `Validation Error`
|
|
1647
1857
|
}
|
|
1648
1858
|
});
|
|
1649
1859
|
}
|
|
1650
|
-
|
|
1860
|
+
}
|
|
1861
|
+
var init_AdminTokenUsageService = __esm(() => {
|
|
1862
|
+
init_OpenAPI();
|
|
1863
|
+
init_request();
|
|
1864
|
+
});
|
|
1865
|
+
|
|
1866
|
+
// src/lib/clients/agents-generator/services/AdminWebhookConfigsService.ts
|
|
1867
|
+
class AdminWebhookConfigsService {
|
|
1868
|
+
static createWebhookConfig(requestBody, workspaceId) {
|
|
1651
1869
|
return request(OpenAPI, {
|
|
1652
|
-
method: "
|
|
1653
|
-
url: "/
|
|
1654
|
-
|
|
1655
|
-
workspace_id: workspaceId
|
|
1656
|
-
collaborator_id: collaboratorId
|
|
1870
|
+
method: "POST",
|
|
1871
|
+
url: "/webhook-configs",
|
|
1872
|
+
query: {
|
|
1873
|
+
workspace_id: workspaceId
|
|
1657
1874
|
},
|
|
1875
|
+
body: requestBody,
|
|
1876
|
+
mediaType: "application/json",
|
|
1658
1877
|
errors: {
|
|
1659
1878
|
422: `Validation Error`
|
|
1660
1879
|
}
|
|
1661
1880
|
});
|
|
1662
1881
|
}
|
|
1663
|
-
static
|
|
1882
|
+
static updateWebhookConfig(configId, requestBody) {
|
|
1664
1883
|
return request(OpenAPI, {
|
|
1665
1884
|
method: "PUT",
|
|
1666
|
-
url: "/
|
|
1885
|
+
url: "/webhook-configs/{config_id}",
|
|
1667
1886
|
path: {
|
|
1668
|
-
|
|
1669
|
-
collaborator_id: collaboratorId
|
|
1887
|
+
config_id: configId
|
|
1670
1888
|
},
|
|
1671
1889
|
body: requestBody,
|
|
1672
1890
|
mediaType: "application/json",
|
|
@@ -1675,40 +1893,30 @@ class AdminWorkspacesService {
|
|
|
1675
1893
|
}
|
|
1676
1894
|
});
|
|
1677
1895
|
}
|
|
1678
|
-
static
|
|
1896
|
+
static deleteWebhookConfig(configId) {
|
|
1679
1897
|
return request(OpenAPI, {
|
|
1680
1898
|
method: "DELETE",
|
|
1681
|
-
url: "/
|
|
1899
|
+
url: "/webhook-configs/{config_id}",
|
|
1682
1900
|
path: {
|
|
1683
|
-
|
|
1684
|
-
collaborator_id: collaboratorId
|
|
1901
|
+
config_id: configId
|
|
1685
1902
|
},
|
|
1686
1903
|
errors: {
|
|
1687
1904
|
422: `Validation Error`
|
|
1688
1905
|
}
|
|
1689
1906
|
});
|
|
1690
1907
|
}
|
|
1691
|
-
static getMyCollaborativeWorkspaces() {
|
|
1692
|
-
return request(OpenAPI, {
|
|
1693
|
-
method: "GET",
|
|
1694
|
-
url: "/workspaces/{workspace_id}/collaborators/me/workspaces"
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
1908
|
}
|
|
1698
|
-
var
|
|
1909
|
+
var init_AdminWebhookConfigsService = __esm(() => {
|
|
1699
1910
|
init_OpenAPI();
|
|
1700
1911
|
init_request();
|
|
1701
1912
|
});
|
|
1702
1913
|
|
|
1703
|
-
// src/lib/clients/agents-generator/services/
|
|
1704
|
-
class
|
|
1705
|
-
static
|
|
1914
|
+
// src/lib/clients/agents-generator/services/AdminWorkspacesService.ts
|
|
1915
|
+
class AdminWorkspacesService {
|
|
1916
|
+
static createWorkspace(requestBody) {
|
|
1706
1917
|
return request(OpenAPI, {
|
|
1707
1918
|
method: "POST",
|
|
1708
|
-
url: "/
|
|
1709
|
-
query: {
|
|
1710
|
-
workspace_id: workspaceId
|
|
1711
|
-
},
|
|
1919
|
+
url: "/workspaces",
|
|
1712
1920
|
body: requestBody,
|
|
1713
1921
|
mediaType: "application/json",
|
|
1714
1922
|
errors: {
|
|
@@ -1716,10 +1924,162 @@ class AgentService {
|
|
|
1716
1924
|
}
|
|
1717
1925
|
});
|
|
1718
1926
|
}
|
|
1719
|
-
static
|
|
1927
|
+
static getWorkspaces(skip, limit = 100) {
|
|
1720
1928
|
return request(OpenAPI, {
|
|
1721
1929
|
method: "GET",
|
|
1722
|
-
url: "/
|
|
1930
|
+
url: "/workspaces",
|
|
1931
|
+
query: {
|
|
1932
|
+
skip,
|
|
1933
|
+
limit
|
|
1934
|
+
},
|
|
1935
|
+
errors: {
|
|
1936
|
+
422: `Validation Error`
|
|
1937
|
+
}
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
static getDefaultWorkspace() {
|
|
1941
|
+
return request(OpenAPI, {
|
|
1942
|
+
method: "GET",
|
|
1943
|
+
url: "/workspaces/default"
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
static getWorkspace(workspaceId) {
|
|
1947
|
+
return request(OpenAPI, {
|
|
1948
|
+
method: "GET",
|
|
1949
|
+
url: "/workspaces/{workspace_id}",
|
|
1950
|
+
path: {
|
|
1951
|
+
workspace_id: workspaceId
|
|
1952
|
+
},
|
|
1953
|
+
errors: {
|
|
1954
|
+
422: `Validation Error`
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1958
|
+
static updateWorkspace(workspaceId, requestBody) {
|
|
1959
|
+
return request(OpenAPI, {
|
|
1960
|
+
method: "PUT",
|
|
1961
|
+
url: "/workspaces/{workspace_id}",
|
|
1962
|
+
path: {
|
|
1963
|
+
workspace_id: workspaceId
|
|
1964
|
+
},
|
|
1965
|
+
body: requestBody,
|
|
1966
|
+
mediaType: "application/json",
|
|
1967
|
+
errors: {
|
|
1968
|
+
422: `Validation Error`
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
static deleteWorkspace(workspaceId) {
|
|
1973
|
+
return request(OpenAPI, {
|
|
1974
|
+
method: "DELETE",
|
|
1975
|
+
url: "/workspaces/{workspace_id}",
|
|
1976
|
+
path: {
|
|
1977
|
+
workspace_id: workspaceId
|
|
1978
|
+
},
|
|
1979
|
+
errors: {
|
|
1980
|
+
422: `Validation Error`
|
|
1981
|
+
}
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1984
|
+
static addWorkspaceCollaborator(workspaceId, requestBody) {
|
|
1985
|
+
return request(OpenAPI, {
|
|
1986
|
+
method: "POST",
|
|
1987
|
+
url: "/workspaces/{workspace_id}/collaborators",
|
|
1988
|
+
path: {
|
|
1989
|
+
workspace_id: workspaceId
|
|
1990
|
+
},
|
|
1991
|
+
body: requestBody,
|
|
1992
|
+
mediaType: "application/json",
|
|
1993
|
+
errors: {
|
|
1994
|
+
422: `Validation Error`
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
static getWorkspaceCollaborators(workspaceId) {
|
|
1999
|
+
return request(OpenAPI, {
|
|
2000
|
+
method: "GET",
|
|
2001
|
+
url: "/workspaces/{workspace_id}/collaborators",
|
|
2002
|
+
path: {
|
|
2003
|
+
workspace_id: workspaceId
|
|
2004
|
+
},
|
|
2005
|
+
errors: {
|
|
2006
|
+
422: `Validation Error`
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
static getWorkspaceCollaborator(workspaceId, collaboratorId) {
|
|
2011
|
+
return request(OpenAPI, {
|
|
2012
|
+
method: "GET",
|
|
2013
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
2014
|
+
path: {
|
|
2015
|
+
workspace_id: workspaceId,
|
|
2016
|
+
collaborator_id: collaboratorId
|
|
2017
|
+
},
|
|
2018
|
+
errors: {
|
|
2019
|
+
422: `Validation Error`
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
static updateWorkspaceCollaborator(workspaceId, collaboratorId, requestBody) {
|
|
2024
|
+
return request(OpenAPI, {
|
|
2025
|
+
method: "PUT",
|
|
2026
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
2027
|
+
path: {
|
|
2028
|
+
workspace_id: workspaceId,
|
|
2029
|
+
collaborator_id: collaboratorId
|
|
2030
|
+
},
|
|
2031
|
+
body: requestBody,
|
|
2032
|
+
mediaType: "application/json",
|
|
2033
|
+
errors: {
|
|
2034
|
+
422: `Validation Error`
|
|
2035
|
+
}
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
static deleteWorkspaceCollaborator(workspaceId, collaboratorId) {
|
|
2039
|
+
return request(OpenAPI, {
|
|
2040
|
+
method: "DELETE",
|
|
2041
|
+
url: "/workspaces/{workspace_id}/collaborators/{collaborator_id}",
|
|
2042
|
+
path: {
|
|
2043
|
+
workspace_id: workspaceId,
|
|
2044
|
+
collaborator_id: collaboratorId
|
|
2045
|
+
},
|
|
2046
|
+
errors: {
|
|
2047
|
+
422: `Validation Error`
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
static getMyCollaborativeWorkspaces() {
|
|
2052
|
+
return request(OpenAPI, {
|
|
2053
|
+
method: "GET",
|
|
2054
|
+
url: "/workspaces/{workspace_id}/collaborators/me/workspaces"
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
var init_AdminWorkspacesService = __esm(() => {
|
|
2059
|
+
init_OpenAPI();
|
|
2060
|
+
init_request();
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
// src/lib/clients/agents-generator/services/AgentService.ts
|
|
2064
|
+
class AgentService {
|
|
2065
|
+
static createAgent(requestBody, workspaceId) {
|
|
2066
|
+
return request(OpenAPI, {
|
|
2067
|
+
method: "POST",
|
|
2068
|
+
url: "/agents",
|
|
2069
|
+
query: {
|
|
2070
|
+
workspace_id: workspaceId
|
|
2071
|
+
},
|
|
2072
|
+
body: requestBody,
|
|
2073
|
+
mediaType: "application/json",
|
|
2074
|
+
errors: {
|
|
2075
|
+
422: `Validation Error`
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
static getAgents(skip, limit = 100, workspaceId) {
|
|
2080
|
+
return request(OpenAPI, {
|
|
2081
|
+
method: "GET",
|
|
2082
|
+
url: "/agents",
|
|
1723
2083
|
query: {
|
|
1724
2084
|
skip,
|
|
1725
2085
|
limit,
|
|
@@ -1777,6 +2137,51 @@ class AgentService {
|
|
|
1777
2137
|
}
|
|
1778
2138
|
});
|
|
1779
2139
|
}
|
|
2140
|
+
static publishAgent(agentId, workspaceId) {
|
|
2141
|
+
return request(OpenAPI, {
|
|
2142
|
+
method: "POST",
|
|
2143
|
+
url: "/agents/{agent_id}/publish",
|
|
2144
|
+
path: {
|
|
2145
|
+
agent_id: agentId
|
|
2146
|
+
},
|
|
2147
|
+
query: {
|
|
2148
|
+
workspace_id: workspaceId
|
|
2149
|
+
},
|
|
2150
|
+
errors: {
|
|
2151
|
+
422: `Validation Error`
|
|
2152
|
+
}
|
|
2153
|
+
});
|
|
2154
|
+
}
|
|
2155
|
+
static discardDraft(agentId, workspaceId) {
|
|
2156
|
+
return request(OpenAPI, {
|
|
2157
|
+
method: "POST",
|
|
2158
|
+
url: "/agents/{agent_id}/discard-draft",
|
|
2159
|
+
path: {
|
|
2160
|
+
agent_id: agentId
|
|
2161
|
+
},
|
|
2162
|
+
query: {
|
|
2163
|
+
workspace_id: workspaceId
|
|
2164
|
+
},
|
|
2165
|
+
errors: {
|
|
2166
|
+
422: `Validation Error`
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
}
|
|
2170
|
+
static getAgentDiff(agentId, workspaceId) {
|
|
2171
|
+
return request(OpenAPI, {
|
|
2172
|
+
method: "GET",
|
|
2173
|
+
url: "/agents/{agent_id}/diff",
|
|
2174
|
+
path: {
|
|
2175
|
+
agent_id: agentId
|
|
2176
|
+
},
|
|
2177
|
+
query: {
|
|
2178
|
+
workspace_id: workspaceId
|
|
2179
|
+
},
|
|
2180
|
+
errors: {
|
|
2181
|
+
422: `Validation Error`
|
|
2182
|
+
}
|
|
2183
|
+
});
|
|
2184
|
+
}
|
|
1780
2185
|
static getWorkspaceConversationsTotal(workspaceId) {
|
|
1781
2186
|
return request(OpenAPI, {
|
|
1782
2187
|
method: "GET",
|
|
@@ -1871,6 +2276,106 @@ var init_AgentService = __esm(() => {
|
|
|
1871
2276
|
init_request();
|
|
1872
2277
|
});
|
|
1873
2278
|
|
|
2279
|
+
// src/lib/clients/agents-generator/services/AgentFoldersService.ts
|
|
2280
|
+
class AgentFoldersService {
|
|
2281
|
+
static createAgentFolder(requestBody, workspaceId) {
|
|
2282
|
+
return request(OpenAPI, {
|
|
2283
|
+
method: "POST",
|
|
2284
|
+
url: "/agent-folders",
|
|
2285
|
+
query: {
|
|
2286
|
+
workspace_id: workspaceId
|
|
2287
|
+
},
|
|
2288
|
+
body: requestBody,
|
|
2289
|
+
mediaType: "application/json",
|
|
2290
|
+
errors: {
|
|
2291
|
+
422: `Validation Error`
|
|
2292
|
+
}
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
static getAgentFolders(skip, limit = 100, workspaceId) {
|
|
2296
|
+
return request(OpenAPI, {
|
|
2297
|
+
method: "GET",
|
|
2298
|
+
url: "/agent-folders",
|
|
2299
|
+
query: {
|
|
2300
|
+
skip,
|
|
2301
|
+
limit,
|
|
2302
|
+
workspace_id: workspaceId
|
|
2303
|
+
},
|
|
2304
|
+
errors: {
|
|
2305
|
+
422: `Validation Error`
|
|
2306
|
+
}
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
static getAgentFolder(folderId, workspaceId) {
|
|
2310
|
+
return request(OpenAPI, {
|
|
2311
|
+
method: "GET",
|
|
2312
|
+
url: "/agent-folders/{folder_id}",
|
|
2313
|
+
path: {
|
|
2314
|
+
folder_id: folderId
|
|
2315
|
+
},
|
|
2316
|
+
query: {
|
|
2317
|
+
workspace_id: workspaceId
|
|
2318
|
+
},
|
|
2319
|
+
errors: {
|
|
2320
|
+
422: `Validation Error`
|
|
2321
|
+
}
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2324
|
+
static updateAgentFolder(folderId, requestBody, workspaceId) {
|
|
2325
|
+
return request(OpenAPI, {
|
|
2326
|
+
method: "PUT",
|
|
2327
|
+
url: "/agent-folders/{folder_id}",
|
|
2328
|
+
path: {
|
|
2329
|
+
folder_id: folderId
|
|
2330
|
+
},
|
|
2331
|
+
query: {
|
|
2332
|
+
workspace_id: workspaceId
|
|
2333
|
+
},
|
|
2334
|
+
body: requestBody,
|
|
2335
|
+
mediaType: "application/json",
|
|
2336
|
+
errors: {
|
|
2337
|
+
422: `Validation Error`
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2340
|
+
}
|
|
2341
|
+
static deleteAgentFolder(folderId, workspaceId) {
|
|
2342
|
+
return request(OpenAPI, {
|
|
2343
|
+
method: "DELETE",
|
|
2344
|
+
url: "/agent-folders/{folder_id}",
|
|
2345
|
+
path: {
|
|
2346
|
+
folder_id: folderId
|
|
2347
|
+
},
|
|
2348
|
+
query: {
|
|
2349
|
+
workspace_id: workspaceId
|
|
2350
|
+
},
|
|
2351
|
+
errors: {
|
|
2352
|
+
422: `Validation Error`
|
|
2353
|
+
}
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
static assignAgentToFolder(agentId, requestBody, workspaceId) {
|
|
2357
|
+
return request(OpenAPI, {
|
|
2358
|
+
method: "PUT",
|
|
2359
|
+
url: "/agent-folders/assign/{agent_id}",
|
|
2360
|
+
path: {
|
|
2361
|
+
agent_id: agentId
|
|
2362
|
+
},
|
|
2363
|
+
query: {
|
|
2364
|
+
workspace_id: workspaceId
|
|
2365
|
+
},
|
|
2366
|
+
body: requestBody,
|
|
2367
|
+
mediaType: "application/json",
|
|
2368
|
+
errors: {
|
|
2369
|
+
422: `Validation Error`
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
var init_AgentFoldersService = __esm(() => {
|
|
2375
|
+
init_OpenAPI();
|
|
2376
|
+
init_request();
|
|
2377
|
+
});
|
|
2378
|
+
|
|
1874
2379
|
// src/lib/clients/agents-generator/services/ConversationsService.ts
|
|
1875
2380
|
class ConversationsService {
|
|
1876
2381
|
static createConversation(requestBody) {
|
|
@@ -1938,7 +2443,7 @@ class ConversationsService {
|
|
|
1938
2443
|
}
|
|
1939
2444
|
});
|
|
1940
2445
|
}
|
|
1941
|
-
static addMessage(conversationId, requestBody, accept) {
|
|
2446
|
+
static addMessage(conversationId, requestBody, useDraft = false, accept) {
|
|
1942
2447
|
return request(OpenAPI, {
|
|
1943
2448
|
method: "POST",
|
|
1944
2449
|
url: "/conversations/{conversation_id}/messages",
|
|
@@ -1948,6 +2453,9 @@ class ConversationsService {
|
|
|
1948
2453
|
headers: {
|
|
1949
2454
|
accept
|
|
1950
2455
|
},
|
|
2456
|
+
query: {
|
|
2457
|
+
use_draft: useDraft
|
|
2458
|
+
},
|
|
1951
2459
|
body: requestBody,
|
|
1952
2460
|
mediaType: "application/json",
|
|
1953
2461
|
errors: {
|
|
@@ -1957,6 +2465,18 @@ class ConversationsService {
|
|
|
1957
2465
|
}
|
|
1958
2466
|
});
|
|
1959
2467
|
}
|
|
2468
|
+
static getResearchStatus(conversationId) {
|
|
2469
|
+
return request(OpenAPI, {
|
|
2470
|
+
method: "GET",
|
|
2471
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
2472
|
+
path: {
|
|
2473
|
+
conversation_id: conversationId
|
|
2474
|
+
},
|
|
2475
|
+
errors: {
|
|
2476
|
+
422: `Validation Error`
|
|
2477
|
+
}
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
1960
2480
|
}
|
|
1961
2481
|
var init_ConversationsService = __esm(() => {
|
|
1962
2482
|
init_OpenAPI();
|
|
@@ -2495,7 +3015,7 @@ class PublicConversationsService {
|
|
|
2495
3015
|
}
|
|
2496
3016
|
});
|
|
2497
3017
|
}
|
|
2498
|
-
static addMessage(conversationId, requestBody, accept) {
|
|
3018
|
+
static addMessage(conversationId, requestBody, useDraft = false, accept) {
|
|
2499
3019
|
return request(OpenAPI, {
|
|
2500
3020
|
method: "POST",
|
|
2501
3021
|
url: "/conversations/{conversation_id}/messages",
|
|
@@ -2505,6 +3025,9 @@ class PublicConversationsService {
|
|
|
2505
3025
|
headers: {
|
|
2506
3026
|
accept
|
|
2507
3027
|
},
|
|
3028
|
+
query: {
|
|
3029
|
+
use_draft: useDraft
|
|
3030
|
+
},
|
|
2508
3031
|
body: requestBody,
|
|
2509
3032
|
mediaType: "application/json",
|
|
2510
3033
|
errors: {
|
|
@@ -2514,6 +3037,18 @@ class PublicConversationsService {
|
|
|
2514
3037
|
}
|
|
2515
3038
|
});
|
|
2516
3039
|
}
|
|
3040
|
+
static getResearchStatus(conversationId) {
|
|
3041
|
+
return request(OpenAPI, {
|
|
3042
|
+
method: "GET",
|
|
3043
|
+
url: "/conversations/{conversation_id}/research-status",
|
|
3044
|
+
path: {
|
|
3045
|
+
conversation_id: conversationId
|
|
3046
|
+
},
|
|
3047
|
+
errors: {
|
|
3048
|
+
422: `Validation Error`
|
|
3049
|
+
}
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
2517
3052
|
}
|
|
2518
3053
|
var init_PublicConversationsService = __esm(() => {
|
|
2519
3054
|
init_OpenAPI();
|
|
@@ -2559,6 +3094,246 @@ var init_SchemaGeneratorService = __esm(() => {
|
|
|
2559
3094
|
init_request();
|
|
2560
3095
|
});
|
|
2561
3096
|
|
|
3097
|
+
// src/lib/clients/agents-generator/services/TokenUsageService.ts
|
|
3098
|
+
class TokenUsageService {
|
|
3099
|
+
static getAgentTokenUsage(agentId, startDate, endDate, skip, limit = 100) {
|
|
3100
|
+
return request(OpenAPI, {
|
|
3101
|
+
method: "GET",
|
|
3102
|
+
url: "/token-usage/agents/{agent_id}",
|
|
3103
|
+
path: {
|
|
3104
|
+
agent_id: agentId
|
|
3105
|
+
},
|
|
3106
|
+
query: {
|
|
3107
|
+
start_date: startDate,
|
|
3108
|
+
end_date: endDate,
|
|
3109
|
+
skip,
|
|
3110
|
+
limit
|
|
3111
|
+
},
|
|
3112
|
+
errors: {
|
|
3113
|
+
422: `Validation Error`
|
|
3114
|
+
}
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
static getAgentTokenUsageSummary(agentId, startDate, endDate) {
|
|
3118
|
+
return request(OpenAPI, {
|
|
3119
|
+
method: "GET",
|
|
3120
|
+
url: "/token-usage/agents/{agent_id}/summary",
|
|
3121
|
+
path: {
|
|
3122
|
+
agent_id: agentId
|
|
3123
|
+
},
|
|
3124
|
+
query: {
|
|
3125
|
+
start_date: startDate,
|
|
3126
|
+
end_date: endDate
|
|
3127
|
+
},
|
|
3128
|
+
errors: {
|
|
3129
|
+
422: `Validation Error`
|
|
3130
|
+
}
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3133
|
+
static getConversationTokenUsage(conversationId, skip, limit = 100) {
|
|
3134
|
+
return request(OpenAPI, {
|
|
3135
|
+
method: "GET",
|
|
3136
|
+
url: "/token-usage/conversations/{conversation_id}",
|
|
3137
|
+
path: {
|
|
3138
|
+
conversation_id: conversationId
|
|
3139
|
+
},
|
|
3140
|
+
query: {
|
|
3141
|
+
skip,
|
|
3142
|
+
limit
|
|
3143
|
+
},
|
|
3144
|
+
errors: {
|
|
3145
|
+
422: `Validation Error`
|
|
3146
|
+
}
|
|
3147
|
+
});
|
|
3148
|
+
}
|
|
3149
|
+
static getConversationTokenUsageSummary(conversationId) {
|
|
3150
|
+
return request(OpenAPI, {
|
|
3151
|
+
method: "GET",
|
|
3152
|
+
url: "/token-usage/conversations/{conversation_id}/summary",
|
|
3153
|
+
path: {
|
|
3154
|
+
conversation_id: conversationId
|
|
3155
|
+
},
|
|
3156
|
+
errors: {
|
|
3157
|
+
422: `Validation Error`
|
|
3158
|
+
}
|
|
3159
|
+
});
|
|
3160
|
+
}
|
|
3161
|
+
static getMyTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
3162
|
+
return request(OpenAPI, {
|
|
3163
|
+
method: "GET",
|
|
3164
|
+
url: "/token-usage/users/me",
|
|
3165
|
+
query: {
|
|
3166
|
+
workspace_id: workspaceId,
|
|
3167
|
+
start_date: startDate,
|
|
3168
|
+
end_date: endDate,
|
|
3169
|
+
skip,
|
|
3170
|
+
limit
|
|
3171
|
+
},
|
|
3172
|
+
errors: {
|
|
3173
|
+
422: `Validation Error`
|
|
3174
|
+
}
|
|
3175
|
+
});
|
|
3176
|
+
}
|
|
3177
|
+
static getMyTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
3178
|
+
return request(OpenAPI, {
|
|
3179
|
+
method: "GET",
|
|
3180
|
+
url: "/token-usage/users/me/summary",
|
|
3181
|
+
query: {
|
|
3182
|
+
workspace_id: workspaceId,
|
|
3183
|
+
start_date: startDate,
|
|
3184
|
+
end_date: endDate
|
|
3185
|
+
},
|
|
3186
|
+
errors: {
|
|
3187
|
+
422: `Validation Error`
|
|
3188
|
+
}
|
|
3189
|
+
});
|
|
3190
|
+
}
|
|
3191
|
+
static getWorkspaceTokenUsage(workspaceId, startDate, endDate, skip, limit = 100) {
|
|
3192
|
+
return request(OpenAPI, {
|
|
3193
|
+
method: "GET",
|
|
3194
|
+
url: "/token-usage/workspaces/{workspace_id}",
|
|
3195
|
+
path: {
|
|
3196
|
+
workspace_id: workspaceId
|
|
3197
|
+
},
|
|
3198
|
+
query: {
|
|
3199
|
+
start_date: startDate,
|
|
3200
|
+
end_date: endDate,
|
|
3201
|
+
skip,
|
|
3202
|
+
limit
|
|
3203
|
+
},
|
|
3204
|
+
errors: {
|
|
3205
|
+
422: `Validation Error`
|
|
3206
|
+
}
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
static getWorkspaceTokenUsageSummary(workspaceId, startDate, endDate) {
|
|
3210
|
+
return request(OpenAPI, {
|
|
3211
|
+
method: "GET",
|
|
3212
|
+
url: "/token-usage/workspaces/{workspace_id}/summary",
|
|
3213
|
+
path: {
|
|
3214
|
+
workspace_id: workspaceId
|
|
3215
|
+
},
|
|
3216
|
+
query: {
|
|
3217
|
+
start_date: startDate,
|
|
3218
|
+
end_date: endDate
|
|
3219
|
+
},
|
|
3220
|
+
errors: {
|
|
3221
|
+
422: `Validation Error`
|
|
3222
|
+
}
|
|
3223
|
+
});
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
var init_TokenUsageService = __esm(() => {
|
|
3227
|
+
init_OpenAPI();
|
|
3228
|
+
init_request();
|
|
3229
|
+
});
|
|
3230
|
+
|
|
3231
|
+
// src/lib/clients/agents-generator/services/WebhookConfigsService.ts
|
|
3232
|
+
class WebhookConfigsService {
|
|
3233
|
+
static createWebhookConfig(requestBody, workspaceId) {
|
|
3234
|
+
return request(OpenAPI, {
|
|
3235
|
+
method: "POST",
|
|
3236
|
+
url: "/webhook-configs",
|
|
3237
|
+
query: {
|
|
3238
|
+
workspace_id: workspaceId
|
|
3239
|
+
},
|
|
3240
|
+
body: requestBody,
|
|
3241
|
+
mediaType: "application/json",
|
|
3242
|
+
errors: {
|
|
3243
|
+
422: `Validation Error`
|
|
3244
|
+
}
|
|
3245
|
+
});
|
|
3246
|
+
}
|
|
3247
|
+
static listWebhookConfigs(workspaceId) {
|
|
3248
|
+
return request(OpenAPI, {
|
|
3249
|
+
method: "GET",
|
|
3250
|
+
url: "/webhook-configs",
|
|
3251
|
+
query: {
|
|
3252
|
+
workspace_id: workspaceId
|
|
3253
|
+
},
|
|
3254
|
+
errors: {
|
|
3255
|
+
422: `Validation Error`
|
|
3256
|
+
}
|
|
3257
|
+
});
|
|
3258
|
+
}
|
|
3259
|
+
static listWebhookEvents(workspaceId, limit = 50, offset) {
|
|
3260
|
+
return request(OpenAPI, {
|
|
3261
|
+
method: "GET",
|
|
3262
|
+
url: "/webhook-configs/events",
|
|
3263
|
+
query: {
|
|
3264
|
+
workspace_id: workspaceId,
|
|
3265
|
+
limit,
|
|
3266
|
+
offset
|
|
3267
|
+
},
|
|
3268
|
+
errors: {
|
|
3269
|
+
422: `Validation Error`
|
|
3270
|
+
}
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
static getWebhookConfig(configId) {
|
|
3274
|
+
return request(OpenAPI, {
|
|
3275
|
+
method: "GET",
|
|
3276
|
+
url: "/webhook-configs/{config_id}",
|
|
3277
|
+
path: {
|
|
3278
|
+
config_id: configId
|
|
3279
|
+
},
|
|
3280
|
+
errors: {
|
|
3281
|
+
422: `Validation Error`
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
}
|
|
3285
|
+
static updateWebhookConfig(configId, requestBody) {
|
|
3286
|
+
return request(OpenAPI, {
|
|
3287
|
+
method: "PUT",
|
|
3288
|
+
url: "/webhook-configs/{config_id}",
|
|
3289
|
+
path: {
|
|
3290
|
+
config_id: configId
|
|
3291
|
+
},
|
|
3292
|
+
body: requestBody,
|
|
3293
|
+
mediaType: "application/json",
|
|
3294
|
+
errors: {
|
|
3295
|
+
422: `Validation Error`
|
|
3296
|
+
}
|
|
3297
|
+
});
|
|
3298
|
+
}
|
|
3299
|
+
static deleteWebhookConfig(configId) {
|
|
3300
|
+
return request(OpenAPI, {
|
|
3301
|
+
method: "DELETE",
|
|
3302
|
+
url: "/webhook-configs/{config_id}",
|
|
3303
|
+
path: {
|
|
3304
|
+
config_id: configId
|
|
3305
|
+
},
|
|
3306
|
+
errors: {
|
|
3307
|
+
422: `Validation Error`
|
|
3308
|
+
}
|
|
3309
|
+
});
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
var init_WebhookConfigsService = __esm(() => {
|
|
3313
|
+
init_OpenAPI();
|
|
3314
|
+
init_request();
|
|
3315
|
+
});
|
|
3316
|
+
|
|
3317
|
+
// src/lib/clients/agents-generator/services/WebhooksService.ts
|
|
3318
|
+
class WebhooksService {
|
|
3319
|
+
static receiveOpenaiWebhookWebhooksOpenaiWorkspaceIdPost(workspaceId) {
|
|
3320
|
+
return request(OpenAPI, {
|
|
3321
|
+
method: "POST",
|
|
3322
|
+
url: "/webhooks/openai/{workspace_id}",
|
|
3323
|
+
path: {
|
|
3324
|
+
workspace_id: workspaceId
|
|
3325
|
+
},
|
|
3326
|
+
errors: {
|
|
3327
|
+
422: `Validation Error`
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
var init_WebhooksService = __esm(() => {
|
|
3333
|
+
init_OpenAPI();
|
|
3334
|
+
init_request();
|
|
3335
|
+
});
|
|
3336
|
+
|
|
2562
3337
|
// src/lib/clients/agents-generator/services/WorkspaceCollaboratorsService.ts
|
|
2563
3338
|
class WorkspaceCollaboratorsService {
|
|
2564
3339
|
static addWorkspaceCollaborator(workspaceId, requestBody) {
|
|
@@ -2722,14 +3497,18 @@ var init_agents_generator = __esm(() => {
|
|
|
2722
3497
|
init_CancelablePromise();
|
|
2723
3498
|
init_OpenAPI();
|
|
2724
3499
|
init_CollaboratorRole();
|
|
3500
|
+
init_AdminAgentFoldersService();
|
|
2725
3501
|
init_AdminAgentsService();
|
|
2726
3502
|
init_AdminApiKeysService();
|
|
2727
3503
|
init_AdminConversationsService();
|
|
2728
3504
|
init_AdminCredentialsService();
|
|
2729
3505
|
init_AdminFileLibraryService();
|
|
2730
3506
|
init_AdminMcpServersService();
|
|
3507
|
+
init_AdminTokenUsageService();
|
|
3508
|
+
init_AdminWebhookConfigsService();
|
|
2731
3509
|
init_AdminWorkspacesService();
|
|
2732
3510
|
init_AgentService();
|
|
3511
|
+
init_AgentFoldersService();
|
|
2733
3512
|
init_ConversationsService();
|
|
2734
3513
|
init_CredentialsService();
|
|
2735
3514
|
init_FileLibraryService();
|
|
@@ -2740,6 +3519,9 @@ var init_agents_generator = __esm(() => {
|
|
|
2740
3519
|
init_PublicConversationsService();
|
|
2741
3520
|
init_RootService();
|
|
2742
3521
|
init_SchemaGeneratorService();
|
|
3522
|
+
init_TokenUsageService();
|
|
3523
|
+
init_WebhookConfigsService();
|
|
3524
|
+
init_WebhooksService();
|
|
2743
3525
|
init_WorkspaceCollaboratorsService();
|
|
2744
3526
|
init_WorkspacesService();
|
|
2745
3527
|
});
|
|
@@ -2785,7 +3567,8 @@ class AgentClient {
|
|
|
2785
3567
|
collaborators: WorkspaceCollaboratorsService,
|
|
2786
3568
|
apiKeys: AdminApiKeysService,
|
|
2787
3569
|
presence: PresenceService,
|
|
2788
|
-
schema: SchemaGeneratorService
|
|
3570
|
+
schema: SchemaGeneratorService,
|
|
3571
|
+
tokenUsage: TokenUsageService
|
|
2789
3572
|
};
|
|
2790
3573
|
this.public = {
|
|
2791
3574
|
agents: PublicAgentsService,
|