@getsupervisor/agents-studio-sdk 1.14.0 → 1.15.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 +13 -0
- package/dist/index.cjs +121 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -4
- package/dist/index.d.ts +71 -4
- package/dist/index.js +119 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## v1.14.0
|
|
2
|
+
|
|
3
|
+
## [1.14.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.13.0...v1.14.0) (2025-10-21)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add Agent Versions controller and related DTOs, enhance publish functionality with notes ([9227708](https://github.com/julio-supervisor/agents-studio-be/commit/92277085c8441fefba4fb52d6859441269132de1))
|
|
8
|
+
* agregar funcionalidades para clonar, publicar y actualizar notas de versiones de agentes, y ajustar esquemas y rutas en la API ([7a01fa0](https://github.com/julio-supervisor/agents-studio-be/commit/7a01fa03ff30e9fd6a9b4358a2df2f709a61c189))
|
|
9
|
+
* agregar mapeo de módulos para la ruta de versiones de agentes en jest.config.js ([11c4e34](https://github.com/julio-supervisor/agents-studio-be/commit/11c4e340608de1b91f2461912b23e3c484e92f59))
|
|
10
|
+
* agregar mapeo de módulos para la ruta de versiones de agentes en package.json ([a63586e](https://github.com/julio-supervisor/agents-studio-be/commit/a63586eb845c21c276776e0d023719a37f4896e5))
|
|
11
|
+
* implement Agent Version Management with TypeORM ([736ed04](https://github.com/julio-supervisor/agents-studio-be/commit/736ed045a4e395674a4ee1c623d44d265421b386))
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
## v1.13.0
|
|
2
15
|
|
|
3
16
|
## [1.13.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.12.0...v1.13.0) (2025-10-20)
|
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
bindAgentInstructions: () => bindAgentInstructions,
|
|
27
27
|
bindAgentPhones: () => bindAgentPhones,
|
|
28
28
|
bindAgentSchedule: () => bindAgentSchedule,
|
|
29
|
+
bindAgentScheduleExceptions: () => bindAgentScheduleExceptions,
|
|
29
30
|
bindAgentTags: () => bindAgentTags,
|
|
30
31
|
bindAgentVersions: () => bindAgentVersions,
|
|
31
32
|
createAgentBlueprintsApi: () => createAgentBlueprintsApi,
|
|
@@ -33,6 +34,7 @@ __export(index_exports, {
|
|
|
33
34
|
createAgentInstructionsApi: () => createAgentInstructionsApi,
|
|
34
35
|
createAgentPhonesApi: () => createAgentPhonesApi,
|
|
35
36
|
createAgentScheduleApi: () => createAgentScheduleApi,
|
|
37
|
+
createAgentScheduleExceptionsApi: () => createAgentScheduleExceptionsApi,
|
|
36
38
|
createAgentTagsApi: () => createAgentTagsApi,
|
|
37
39
|
createAgentVersionsApi: () => createAgentVersionsApi,
|
|
38
40
|
createAgentsApi: () => createAgentsApi,
|
|
@@ -570,6 +572,14 @@ function createAgentScheduleApi(cfg) {
|
|
|
570
572
|
});
|
|
571
573
|
return res.json();
|
|
572
574
|
},
|
|
575
|
+
async create(agentId, payload) {
|
|
576
|
+
const res = await doFetch(`${base}/v1/agents/${agentId}/schedule`, {
|
|
577
|
+
method: "POST",
|
|
578
|
+
headers: jsonHeaders,
|
|
579
|
+
body: JSON.stringify(payload)
|
|
580
|
+
});
|
|
581
|
+
return res.json();
|
|
582
|
+
},
|
|
573
583
|
async update(agentId, payload) {
|
|
574
584
|
const res = await doFetch(`${base}/v1/agents/${agentId}/schedule`, {
|
|
575
585
|
method: "PUT",
|
|
@@ -581,6 +591,72 @@ function createAgentScheduleApi(cfg) {
|
|
|
581
591
|
};
|
|
582
592
|
}
|
|
583
593
|
|
|
594
|
+
// src/api/agent-schedule-exceptions.ts
|
|
595
|
+
function createAgentScheduleExceptionsApi(cfg) {
|
|
596
|
+
const { base, doFetch } = createHttp(cfg);
|
|
597
|
+
const jsonHeaders = { "content-type": "application/json" };
|
|
598
|
+
const fetchExceptionsPage = async (agentId, options = {}) => {
|
|
599
|
+
const query = serializeListOptions(options ?? {});
|
|
600
|
+
const res = await doFetch(
|
|
601
|
+
`${base}/v1/agents/${agentId}/schedule/exceptions`,
|
|
602
|
+
{
|
|
603
|
+
method: "GET",
|
|
604
|
+
query
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
return res.json();
|
|
608
|
+
};
|
|
609
|
+
return {
|
|
610
|
+
async list(agentId, options = {}) {
|
|
611
|
+
const normalizedOptions = {
|
|
612
|
+
...options ?? {}
|
|
613
|
+
};
|
|
614
|
+
const fetchPage = (pageOptions) => fetchExceptionsPage(agentId, pageOptions);
|
|
615
|
+
const response = await fetchPage(normalizedOptions);
|
|
616
|
+
return attachPaginator(response, fetchPage, normalizedOptions);
|
|
617
|
+
},
|
|
618
|
+
async get(agentId, exceptionId) {
|
|
619
|
+
const res = await doFetch(
|
|
620
|
+
`${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
|
|
621
|
+
{
|
|
622
|
+
method: "GET"
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
return res.json();
|
|
626
|
+
},
|
|
627
|
+
async create(agentId, payload) {
|
|
628
|
+
const res = await doFetch(
|
|
629
|
+
`${base}/v1/agents/${agentId}/schedule/exceptions`,
|
|
630
|
+
{
|
|
631
|
+
method: "POST",
|
|
632
|
+
headers: jsonHeaders,
|
|
633
|
+
body: JSON.stringify(payload)
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
return res.json();
|
|
637
|
+
},
|
|
638
|
+
async update(agentId, exceptionId, payload) {
|
|
639
|
+
const res = await doFetch(
|
|
640
|
+
`${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
|
|
641
|
+
{
|
|
642
|
+
method: "PATCH",
|
|
643
|
+
headers: jsonHeaders,
|
|
644
|
+
body: JSON.stringify(payload)
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
return res.json();
|
|
648
|
+
},
|
|
649
|
+
async delete(agentId, exceptionId) {
|
|
650
|
+
await doFetch(
|
|
651
|
+
`${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
|
|
652
|
+
{
|
|
653
|
+
method: "DELETE"
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
|
|
584
660
|
// src/api/agent-tags.ts
|
|
585
661
|
function createAgentTagsApi(cfg) {
|
|
586
662
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -749,13 +825,34 @@ var bindAgentPhones = (api, agentId) => ({
|
|
|
749
825
|
return api.disconnect(agentId, phoneId);
|
|
750
826
|
}
|
|
751
827
|
});
|
|
752
|
-
var
|
|
828
|
+
var bindAgentScheduleExceptions = (api, agentId) => ({
|
|
829
|
+
list(opts) {
|
|
830
|
+
return api.list(agentId, opts);
|
|
831
|
+
},
|
|
832
|
+
get(exceptionId) {
|
|
833
|
+
return api.get(agentId, exceptionId);
|
|
834
|
+
},
|
|
835
|
+
create(payload) {
|
|
836
|
+
return api.create(agentId, payload);
|
|
837
|
+
},
|
|
838
|
+
update(exceptionId, payload) {
|
|
839
|
+
return api.update(agentId, exceptionId, payload);
|
|
840
|
+
},
|
|
841
|
+
delete(exceptionId) {
|
|
842
|
+
return api.delete(agentId, exceptionId);
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
var bindAgentSchedule = (scheduleApi, exceptionsApi, agentId) => ({
|
|
753
846
|
get() {
|
|
754
|
-
return
|
|
847
|
+
return scheduleApi.get(agentId);
|
|
848
|
+
},
|
|
849
|
+
create(payload) {
|
|
850
|
+
return scheduleApi.create(agentId, payload);
|
|
755
851
|
},
|
|
756
852
|
update(payload) {
|
|
757
|
-
return
|
|
758
|
-
}
|
|
853
|
+
return scheduleApi.update(agentId, payload);
|
|
854
|
+
},
|
|
855
|
+
exceptions: bindAgentScheduleExceptions(exceptionsApi, agentId)
|
|
759
856
|
});
|
|
760
857
|
var bindAgentVersions = (api, agentId) => ({
|
|
761
858
|
list(opts) {
|
|
@@ -822,6 +919,7 @@ var createAgentEntity = (dto, options) => {
|
|
|
822
919
|
tagsApi,
|
|
823
920
|
phonesApi,
|
|
824
921
|
scheduleApi,
|
|
922
|
+
scheduleExceptionsApi,
|
|
825
923
|
versionsApi,
|
|
826
924
|
blueprintsApi,
|
|
827
925
|
reload,
|
|
@@ -833,7 +931,11 @@ var createAgentEntity = (dto, options) => {
|
|
|
833
931
|
instructions: bindAgentInstructions(instructionsApi, dto.agentId),
|
|
834
932
|
tagAssignments: bindAgentTags(tagsApi, dto.agentId),
|
|
835
933
|
phones: bindAgentPhones(phonesApi, dto.agentId),
|
|
836
|
-
schedule: bindAgentSchedule(
|
|
934
|
+
schedule: bindAgentSchedule(
|
|
935
|
+
scheduleApi,
|
|
936
|
+
scheduleExceptionsApi,
|
|
937
|
+
dto.agentId
|
|
938
|
+
),
|
|
837
939
|
versions: bindAgentVersions(versionsApi, dto.agentId),
|
|
838
940
|
blueprints: bindAgentBlueprints(blueprintsApi, dto.agentId),
|
|
839
941
|
async save(patch) {
|
|
@@ -917,6 +1019,7 @@ function createAgentsApi(cfg, relatedApis) {
|
|
|
917
1019
|
tagsApi: relatedApis.tagsApi,
|
|
918
1020
|
phonesApi: relatedApis.phonesApi,
|
|
919
1021
|
scheduleApi: relatedApis.scheduleApi,
|
|
1022
|
+
scheduleExceptionsApi: relatedApis.scheduleExceptionsApi,
|
|
920
1023
|
versionsApi: relatedApis.versionsApi,
|
|
921
1024
|
blueprintsApi: relatedApis.blueprintsApi,
|
|
922
1025
|
reload: async (agentId) => {
|
|
@@ -1207,6 +1310,7 @@ function createClient(initialCfg) {
|
|
|
1207
1310
|
const tagsApi = createAgentTagsApi(runtimeCfg);
|
|
1208
1311
|
const phonesApi = createAgentPhonesApi(runtimeCfg);
|
|
1209
1312
|
const scheduleApi = createAgentScheduleApi(runtimeCfg);
|
|
1313
|
+
const scheduleExceptionsApi = createAgentScheduleExceptionsApi(runtimeCfg);
|
|
1210
1314
|
const versionsApi = createAgentVersionsApi(runtimeCfg);
|
|
1211
1315
|
const blueprintsApi = createAgentBlueprintsApi(runtimeCfg);
|
|
1212
1316
|
const voicesApi = createVoicesApi(runtimeCfg);
|
|
@@ -1216,6 +1320,7 @@ function createClient(initialCfg) {
|
|
|
1216
1320
|
tagsApi,
|
|
1217
1321
|
phonesApi,
|
|
1218
1322
|
scheduleApi,
|
|
1323
|
+
scheduleExceptionsApi,
|
|
1219
1324
|
versionsApi,
|
|
1220
1325
|
blueprintsApi
|
|
1221
1326
|
});
|
|
@@ -1231,9 +1336,16 @@ function createClient(initialCfg) {
|
|
|
1231
1336
|
(agentId) => bindAgentPhones(phonesApi, agentId),
|
|
1232
1337
|
phonesApi
|
|
1233
1338
|
);
|
|
1339
|
+
const scheduleExceptionsNamespace = Object.assign(
|
|
1340
|
+
(agentId) => bindAgentScheduleExceptions(scheduleExceptionsApi, agentId),
|
|
1341
|
+
scheduleExceptionsApi
|
|
1342
|
+
);
|
|
1234
1343
|
const scheduleNamespace = Object.assign(
|
|
1235
|
-
(agentId) => bindAgentSchedule(scheduleApi, agentId),
|
|
1236
|
-
|
|
1344
|
+
(agentId) => bindAgentSchedule(scheduleApi, scheduleExceptionsApi, agentId),
|
|
1345
|
+
{
|
|
1346
|
+
...scheduleApi,
|
|
1347
|
+
exceptions: scheduleExceptionsNamespace
|
|
1348
|
+
}
|
|
1237
1349
|
);
|
|
1238
1350
|
const versionsNamespace = Object.assign(
|
|
1239
1351
|
(agentId) => bindAgentVersions(versionsApi, agentId),
|
|
@@ -1322,6 +1434,7 @@ function createClient(initialCfg) {
|
|
|
1322
1434
|
bindAgentInstructions,
|
|
1323
1435
|
bindAgentPhones,
|
|
1324
1436
|
bindAgentSchedule,
|
|
1437
|
+
bindAgentScheduleExceptions,
|
|
1325
1438
|
bindAgentTags,
|
|
1326
1439
|
bindAgentVersions,
|
|
1327
1440
|
createAgentBlueprintsApi,
|
|
@@ -1329,6 +1442,7 @@ function createClient(initialCfg) {
|
|
|
1329
1442
|
createAgentInstructionsApi,
|
|
1330
1443
|
createAgentPhonesApi,
|
|
1331
1444
|
createAgentScheduleApi,
|
|
1445
|
+
createAgentScheduleExceptionsApi,
|
|
1332
1446
|
createAgentTagsApi,
|
|
1333
1447
|
createAgentVersionsApi,
|
|
1334
1448
|
createAgentsApi,
|