@getsupervisor/agents-studio-sdk 1.29.0 → 1.30.0
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/index.cjs +37 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
createAgentVersionsApi: () => createAgentVersionsApi,
|
|
44
44
|
createAgentsApi: () => createAgentsApi,
|
|
45
45
|
createApiKeysApi: () => createApiKeysApi,
|
|
46
|
+
createCatalogTemplatesApi: () => createCatalogTemplatesApi,
|
|
46
47
|
createCatalogsApi: () => createCatalogsApi,
|
|
47
48
|
createClient: () => createClient,
|
|
48
49
|
createHttp: () => createHttp,
|
|
@@ -1336,6 +1337,36 @@ function createApiKeysApi(cfg) {
|
|
|
1336
1337
|
};
|
|
1337
1338
|
}
|
|
1338
1339
|
|
|
1340
|
+
// src/api/catalog-templates.ts
|
|
1341
|
+
function createCatalogTemplatesApi(cfg) {
|
|
1342
|
+
const { base, doFetch } = createHttp(cfg);
|
|
1343
|
+
const buildListQuery = (options) => {
|
|
1344
|
+
const query = {};
|
|
1345
|
+
if (options.visibility) {
|
|
1346
|
+
query.visibility = options.visibility;
|
|
1347
|
+
}
|
|
1348
|
+
if (options.tags && options.tags.length > 0) {
|
|
1349
|
+
query.tags = options.tags;
|
|
1350
|
+
}
|
|
1351
|
+
return query;
|
|
1352
|
+
};
|
|
1353
|
+
return {
|
|
1354
|
+
async list(options = {}) {
|
|
1355
|
+
const res = await doFetch(`${base}/catalogs/templates`, {
|
|
1356
|
+
method: "GET",
|
|
1357
|
+
query: buildListQuery(options)
|
|
1358
|
+
});
|
|
1359
|
+
return res.json();
|
|
1360
|
+
},
|
|
1361
|
+
async get(templateId) {
|
|
1362
|
+
const res = await doFetch(`${base}/catalogs/templates/${templateId}`, {
|
|
1363
|
+
method: "GET"
|
|
1364
|
+
});
|
|
1365
|
+
return res.json();
|
|
1366
|
+
}
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1339
1370
|
// src/api/catalogs.ts
|
|
1340
1371
|
function createCatalogsApi(cfg) {
|
|
1341
1372
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -1896,6 +1927,7 @@ function createClient(initialCfg) {
|
|
|
1896
1927
|
const voicesApi = createVoicesApi(runtimeCfg);
|
|
1897
1928
|
const apiKeysApi = createApiKeysApi(runtimeCfg);
|
|
1898
1929
|
const catalogsApi = createCatalogsApi(runtimeCfg);
|
|
1930
|
+
const catalogTemplatesApi = createCatalogTemplatesApi(runtimeCfg);
|
|
1899
1931
|
const webhooksApi = createWebhooksApi(runtimeCfg);
|
|
1900
1932
|
const agentsApi = createAgentsApi(runtimeCfg, {
|
|
1901
1933
|
instructionsApi,
|
|
@@ -1963,7 +1995,10 @@ function createClient(initialCfg) {
|
|
|
1963
1995
|
},
|
|
1964
1996
|
workspaces: createWorkspacesApi(runtimeCfg),
|
|
1965
1997
|
tools: createToolsApi(runtimeCfg),
|
|
1966
|
-
catalogs:
|
|
1998
|
+
catalogs: {
|
|
1999
|
+
...catalogsApi,
|
|
2000
|
+
templates: catalogTemplatesApi
|
|
2001
|
+
},
|
|
1967
2002
|
voices: voicesApi,
|
|
1968
2003
|
apiKeys: apiKeysApi,
|
|
1969
2004
|
webhooks: webhooksApi
|
|
@@ -2049,6 +2084,7 @@ function createClient(initialCfg) {
|
|
|
2049
2084
|
createAgentVersionsApi,
|
|
2050
2085
|
createAgentsApi,
|
|
2051
2086
|
createApiKeysApi,
|
|
2087
|
+
createCatalogTemplatesApi,
|
|
2052
2088
|
createCatalogsApi,
|
|
2053
2089
|
createClient,
|
|
2054
2090
|
createHttp,
|