@getsupervisor/agents-studio-sdk 1.17.0 → 1.18.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/CHANGELOG.md +20 -0
- package/dist/index.cjs +116 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -1
- package/dist/index.d.ts +81 -1
- package/dist/index.js +115 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## v1.17.0
|
|
2
|
+
|
|
3
|
+
## [1.17.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.16.0...v1.17.0) (2025-10-22)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* actualizar documentación del SDK y especificaciones de API, eliminando referencias a 'retell' y mejorando ejemplos ([362a379](https://github.com/julio-supervisor/agents-studio-be/commit/362a379f4b44123a19f9f8921fe7674994ecbf8c))
|
|
8
|
+
## v1.16.0
|
|
9
|
+
|
|
10
|
+
## [1.16.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.15.0...v1.16.0) (2025-10-22)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add centralized catalogs management API ([4a6cb3e](https://github.com/julio-supervisor/agents-studio-be/commit/4a6cb3ef36e5ed9f1752438df59cf3f7e94083c3))
|
|
15
|
+
* add tests and mappers for catalog items, including CRUD operations and specifications ([f20d939](https://github.com/julio-supervisor/agents-studio-be/commit/f20d939819e4e29bcfb9ae73fa5c0b3c87211bcd))
|
|
16
|
+
* **catalogs:** implement CatalogItem entity and related value objects ([7f06e93](https://github.com/julio-supervisor/agents-studio-be/commit/7f06e93288ed909b3db08380a4c47e4b9616bd04))
|
|
17
|
+
* refactor sorting logic and add unit tests for resolveSingleSort utility ([a8d9812](https://github.com/julio-supervisor/agents-studio-be/commit/a8d981219aaa4f2c91705ee121a08225436f4166))
|
|
18
|
+
* simplify toPrimitives method in CatalogItemMetadata class ([cf8d91c](https://github.com/julio-supervisor/agents-studio-be/commit/cf8d91c61c419cd487967311b1fedeeb8a439993))
|
|
19
|
+
|
|
20
|
+
|
|
1
21
|
## v1.15.0
|
|
2
22
|
|
|
3
23
|
## [1.15.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.14.0...v1.15.0) (2025-10-21)
|
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
createHttp: () => createHttp,
|
|
45
45
|
createToolsApi: () => createToolsApi,
|
|
46
46
|
createVoicesApi: () => createVoicesApi,
|
|
47
|
+
createWebhooksApi: () => createWebhooksApi,
|
|
47
48
|
createWorkspacesApi: () => createWorkspacesApi
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1282,6 +1283,117 @@ function createVoicesApi(cfg) {
|
|
|
1282
1283
|
};
|
|
1283
1284
|
}
|
|
1284
1285
|
|
|
1286
|
+
// src/api/webhooks.ts
|
|
1287
|
+
function createWebhooksApi(cfg) {
|
|
1288
|
+
const { base, doFetch } = createHttp(cfg);
|
|
1289
|
+
const jsonHeaders = { "content-type": "application/json" };
|
|
1290
|
+
const fetchWebhooksPage = async (options = {}) => {
|
|
1291
|
+
const query = serializeListOptions({
|
|
1292
|
+
page: options.page,
|
|
1293
|
+
limit: options.limit,
|
|
1294
|
+
sort: options.sort,
|
|
1295
|
+
fields: options.fields,
|
|
1296
|
+
include: options.include,
|
|
1297
|
+
search: options.search,
|
|
1298
|
+
filter: options.filter
|
|
1299
|
+
});
|
|
1300
|
+
const res = await doFetch(`${base}/v1/webhooks`, {
|
|
1301
|
+
method: "GET",
|
|
1302
|
+
query
|
|
1303
|
+
});
|
|
1304
|
+
return res.json();
|
|
1305
|
+
};
|
|
1306
|
+
return {
|
|
1307
|
+
async list(options = {}) {
|
|
1308
|
+
const normalized = { ...options ?? {} };
|
|
1309
|
+
const response = await fetchWebhooksPage(normalized);
|
|
1310
|
+
return attachPaginator(response, fetchWebhooksPage, normalized);
|
|
1311
|
+
},
|
|
1312
|
+
async create(payload) {
|
|
1313
|
+
const res = await doFetch(`${base}/v1/webhooks`, {
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
headers: jsonHeaders,
|
|
1316
|
+
body: JSON.stringify(payload)
|
|
1317
|
+
});
|
|
1318
|
+
return res.json();
|
|
1319
|
+
},
|
|
1320
|
+
async get(webhookId) {
|
|
1321
|
+
const res = await doFetch(`${base}/v1/webhooks/${webhookId}`, {
|
|
1322
|
+
method: "GET"
|
|
1323
|
+
});
|
|
1324
|
+
return res.json();
|
|
1325
|
+
},
|
|
1326
|
+
async update(webhookId, payload) {
|
|
1327
|
+
const res = await doFetch(`${base}/v1/webhooks/${webhookId}`, {
|
|
1328
|
+
method: "PATCH",
|
|
1329
|
+
headers: jsonHeaders,
|
|
1330
|
+
body: JSON.stringify(payload)
|
|
1331
|
+
});
|
|
1332
|
+
return res.json();
|
|
1333
|
+
},
|
|
1334
|
+
async delete(webhookId) {
|
|
1335
|
+
await doFetch(`${base}/v1/webhooks/${webhookId}`, { method: "DELETE" });
|
|
1336
|
+
},
|
|
1337
|
+
// Subscriptions
|
|
1338
|
+
async listSubscriptions(webhookId, options = {}) {
|
|
1339
|
+
const fetchPage = async (opts) => {
|
|
1340
|
+
const query = serializeListOptions({
|
|
1341
|
+
page: opts.page,
|
|
1342
|
+
limit: opts.limit,
|
|
1343
|
+
sort: opts.sort,
|
|
1344
|
+
fields: opts.fields,
|
|
1345
|
+
include: opts.include,
|
|
1346
|
+
search: opts.search,
|
|
1347
|
+
filter: opts.filter
|
|
1348
|
+
});
|
|
1349
|
+
const res = await doFetch(
|
|
1350
|
+
`${base}/v1/webhooks/${webhookId}/subscriptions`,
|
|
1351
|
+
{ method: "GET", query }
|
|
1352
|
+
);
|
|
1353
|
+
return res.json();
|
|
1354
|
+
};
|
|
1355
|
+
const normalized = { ...options ?? {} };
|
|
1356
|
+
const response = await fetchPage(normalized);
|
|
1357
|
+
return attachPaginator(response, fetchPage, normalized);
|
|
1358
|
+
},
|
|
1359
|
+
async createSubscription(webhookId, payload) {
|
|
1360
|
+
const res = await doFetch(
|
|
1361
|
+
`${base}/v1/webhooks/${webhookId}/subscriptions`,
|
|
1362
|
+
{
|
|
1363
|
+
method: "POST",
|
|
1364
|
+
headers: jsonHeaders,
|
|
1365
|
+
body: JSON.stringify(payload)
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
return res.json();
|
|
1369
|
+
},
|
|
1370
|
+
async getSubscription(webhookId, subscriptionId) {
|
|
1371
|
+
const res = await doFetch(
|
|
1372
|
+
`${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
|
|
1373
|
+
{ method: "GET" }
|
|
1374
|
+
);
|
|
1375
|
+
return res.json();
|
|
1376
|
+
},
|
|
1377
|
+
async updateSubscription(webhookId, subscriptionId, payload) {
|
|
1378
|
+
const res = await doFetch(
|
|
1379
|
+
`${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
|
|
1380
|
+
{
|
|
1381
|
+
method: "PATCH",
|
|
1382
|
+
headers: jsonHeaders,
|
|
1383
|
+
body: JSON.stringify(payload)
|
|
1384
|
+
}
|
|
1385
|
+
);
|
|
1386
|
+
return res.json();
|
|
1387
|
+
},
|
|
1388
|
+
async deleteSubscription(webhookId, subscriptionId) {
|
|
1389
|
+
await doFetch(
|
|
1390
|
+
`${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
|
|
1391
|
+
{ method: "DELETE" }
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1285
1397
|
// src/api/workspaces.ts
|
|
1286
1398
|
function createWorkspacesApi(cfg) {
|
|
1287
1399
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -1363,6 +1475,7 @@ function createClient(initialCfg) {
|
|
|
1363
1475
|
const voicesApi = createVoicesApi(runtimeCfg);
|
|
1364
1476
|
const apiKeysApi = createApiKeysApi(runtimeCfg);
|
|
1365
1477
|
const catalogsApi = createCatalogsApi(runtimeCfg);
|
|
1478
|
+
const webhooksApi = createWebhooksApi(runtimeCfg);
|
|
1366
1479
|
const agentsApi = createAgentsApi(runtimeCfg, {
|
|
1367
1480
|
instructionsApi,
|
|
1368
1481
|
tagsApi,
|
|
@@ -1417,7 +1530,8 @@ function createClient(initialCfg) {
|
|
|
1417
1530
|
tools: createToolsApi(runtimeCfg),
|
|
1418
1531
|
catalogs: catalogsApi,
|
|
1419
1532
|
voices: voicesApi,
|
|
1420
|
-
apiKeys: apiKeysApi
|
|
1533
|
+
apiKeys: apiKeysApi,
|
|
1534
|
+
webhooks: webhooksApi
|
|
1421
1535
|
};
|
|
1422
1536
|
return {
|
|
1423
1537
|
...apis,
|
|
@@ -1501,6 +1615,7 @@ function createClient(initialCfg) {
|
|
|
1501
1615
|
createHttp,
|
|
1502
1616
|
createToolsApi,
|
|
1503
1617
|
createVoicesApi,
|
|
1618
|
+
createWebhooksApi,
|
|
1504
1619
|
createWorkspacesApi
|
|
1505
1620
|
});
|
|
1506
1621
|
//# sourceMappingURL=index.cjs.map
|